View | Details | Raw Unified | Return to bug 215490 | Differences between
and this patch

Collapse All | Expand All

(-)bazel/Makefile (-5 / +20 lines)
Lines 2-11 Link Here
2
# $FreeBSD: head/devel/bazel/Makefile 427983 2016-12-06 19:25:23Z pi $
2
# $FreeBSD: head/devel/bazel/Makefile 427983 2016-12-06 19:25:23Z pi $
3
3
4
PORTNAME=		bazel
4
PORTNAME=		bazel
5
PORTVERSION=		0.4.2r # rc2 of 0.4.2
5
PORTVERSION=		0.4.3
6
CATEGORIES=		devel java
6
CATEGORIES=		devel java
7
MASTER_SITES=		https://storage.googleapis.com/bazel/0.4.2/rc2/
7
MASTER_SITES=		https://storage.googleapis.com/bazel/${PORTVERSION}/rc${FINALRC}/
8
DISTNAME=		bazel-0.4.2rc2-dist
8
DISTNAME=		bazel-${PORTVERSION}rc${FINALRC}-dist
9
9
10
MAINTAINER=		aehlig@linta.de
10
MAINTAINER=		aehlig@linta.de
11
COMMENT=		Fast and correct build system
11
COMMENT=		Fast and correct build system
Lines 16-21 Link Here
16
BUILD_DEPENDS=		bash:shells/bash \
16
BUILD_DEPENDS=		bash:shells/bash \
17
			zip:archivers/zip
17
			zip:archivers/zip
18
18
19
# In bazel, a release is always code-wise identical to the final release candidate.
20
# Hence we can also download that one and so have a simple way to also test earlier release
21
# candidates.
22
FINALRC=		6
23
19
BROKEN_FreeBSD_9=	fails with static_assert expression error in src/main/cpp/util/numbers.cc
24
BROKEN_FreeBSD_9=	fails with static_assert expression error in src/main/cpp/util/numbers.cc
20
25
21
NO_WRKSUBDIR=		YES
26
NO_WRKSUBDIR=		YES
Lines 27-42 Link Here
27
JAVA_BUILD=		yes
32
JAVA_BUILD=		yes
28
JAVA_RUN=		yes
33
JAVA_RUN=		yes
29
34
30
PLIST_FILES=		bin/bazel
35
# Have the location of the system-wide rc file reside ${ETCDIR}.
36
# Also adapt the sample file to disable persistent java workers as they
37
# do not work reliably on FreeBSD.
38
post-patch:
39
	@${REINPLACE_CMD} \
40
	-e "s|\"/etc/bazel.bazelrc\"|\"${ETCDIR}/bazel.bazelrc\"|" \
41
	${WRKSRC}/src/main/cpp/workspace_layout.cc
42
	@${ECHO_CMD} build --strategy=Javac=standalone >> ${WRKSRC}/scripts/packages/debian/bazel.bazelrc
31
43
32
do-build:
44
do-build:
33
	@${MKDIR} ${WRKDIR}/bazel_tmp
45
	@${MKDIR} ${WRKDIR}/bazel_tmp
34
	(cd ${WRKSRC} && \
46
	(cd ${WRKSRC} && \
35
	${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \
47
	${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \
36
	TMPDIR=${WRKDIR}/bazel_tmp \
48
	TMPDIR=${WRKDIR}/bazel_tmp \
49
	EMBED_LABEL='${PORTVERSION}' \
37
	${LOCALBASE}/bin/bash ./compile.sh)
50
	${LOCALBASE}/bin/bash ./compile.sh)
38
51
39
do-install:
52
do-install:
40
	@${CP} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin
53
	${CP} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin
54
	@${MKDIR} ${STAGEDIR}${ETCDIR}
55
	${INSTALL_DATA} ${WRKSRC}/scripts/packages/debian/bazel.bazelrc ${STAGEDIR}${ETCDIR}/bazel.bazelrc.sample
41
56
42
.include <bsd.port.mk>
57
.include <bsd.port.mk>
(-)bazel/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1480863971
1
TIMESTAMP = 1482352307
2
SHA256 (bazel-0.4.2rc2-dist.zip) = 8e6f41252abadcdb2cc7a07f910ec4b45fb12c46f0a578672c6a186c7efcdb36
2
SHA256 (bazel-0.4.3rc6-dist.zip) = aeff47c789bf1ab5b0b2e6ad342c69f95efd4e2b284a755103a9477fa29b763c
3
SIZE (bazel-0.4.2rc2-dist.zip) = 89321429
3
SIZE (bazel-0.4.3rc6-dist.zip) = 90362416
(-)bazel/files/patch-src_main_cpp_blaze__util__freebsd.cc (-12 lines)
Lines 1-12 Link Here
1
--- src/main/cpp/blaze_util_freebsd.cc.orig	1979-12-31 23:00:00 UTC
2
+++ src/main/cpp/blaze_util_freebsd.cc
3
@@ -145,6 +145,9 @@ bool IsSharedLibrary(const string &filen
4
 
5
 string GetDefaultHostJavabase() {
6
   // if JAVA_HOME is defined, then use it as default.
7
+  if (getenv("JAVA_HOME") == nullptr) {
8
+    return "/usr/local/openjdk8";
9
+  }
10
   string javahome = getenv("JAVA_HOME");
11
   return !javahome.empty() ? javahome : "/usr/local/openjdk8";
12
 }
(-)bazel/files/patch-src_main_cpp_util_file__platform.h (-10 lines)
Lines 1-10 Link Here
1
--- src/main/cpp/util/file_platform.h.orig	2016-12-05 22:12:53 UTC
2
+++ src/main/cpp/util/file_platform.h
3
@@ -16,6 +16,7 @@
4
 #define BAZEL_SRC_MAIN_CPP_UTIL_FILE_PLATFORM_H_
5
 
6
 #include <stdint.h>
7
+#include <time.h>
8
 
9
 #include <string>
10
 
(-)bazel/files/patch-third__party_ijar_platform__utils.h (+11 lines)
Line 0 Link Here
1
--- third_party/ijar/platform_utils.h.orig	2017-01-02 19:18:55 UTC
2
+++ third_party/ijar/platform_utils.h
3
@@ -18,6 +18,8 @@
4
 #include <stdlib.h>
5
 
6
 #include <string>
7
+#include <sys/stat.h>
8
+#include <sys/types.h>
9
 
10
 #include "third_party/ijar/common.h"
11
 
(-)bazel/files/patch-third__party_protobuf_3.0.0_BUILD (-11 lines)
Lines 1-11 Link Here
1
--- third_party/protobuf/3.0.0/BUILD.orig	1979-12-31 23:00:00 UTC
2
+++ third_party/protobuf/3.0.0/BUILD
3
@@ -87,7 +87,7 @@ COPTS = [
4
     "-Wno-error=unused-variable",
5
 ]
6
 
7
-LINK_OPTS = ["-lpthread"]
8
+LINK_OPTS = ["-lpthread", "-lm"]
9
 
10
 cc_library(
11
     name = "protobuf_lite",
(-)bazel/pkg-plist (+2 lines)
Line 0 Link Here
1
bin/bazel
2
@sample %%ETCDIR%%/bazel.bazelrc.sample

Return to bug 215490