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

Collapse All | Expand All

(-)bazel/Makefile (-6 / +23 lines)
Lines 1-11 Link Here
1
# Created by: Klaus Aehlig <aehlig@linta.de>
1
# Created by: Klaus Aehlig <aehlig@linta.de>
2
# $FreeBSD: head/devel/bazel/Makefile 430235 2017-01-01 03:45:12Z sunpoet $
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.4
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=		1
23
24
BROKEN_FreeBSD_9=	fails with static_assert expression error in src/main/cpp/util/numbers.cc
25
19
NO_WRKSUBDIR=		YES
26
NO_WRKSUBDIR=		YES
20
USES=			shebangfix zip
27
USES=			shebangfix zip
21
SHEBANG_FILES=		${WRKSRC}/tools/cpp/link_dynamic_library.sh
28
SHEBANG_FILES=		${WRKSRC}/tools/cpp/link_dynamic_library.sh
Lines 25-40 Link Here
25
JAVA_BUILD=		yes
32
JAVA_BUILD=		yes
26
JAVA_RUN=		yes
33
JAVA_RUN=		yes
27
34
28
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
29
43
30
do-build:
44
do-build:
31
	@${MKDIR} ${WRKDIR}/bazel_tmp
45
	@${MKDIR} ${WRKDIR}/bazel_tmp
32
	(cd ${WRKSRC} && \
46
	(cd ${WRKSRC} && \
33
	${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \
47
	${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \
34
	TMPDIR=${WRKDIR}/bazel_tmp \
48
	TMPDIR=${WRKDIR}/bazel_tmp \
49
	EMBED_LABEL='${PORTVERSION}' \
35
	${LOCALBASE}/bin/bash ./compile.sh)
50
	${LOCALBASE}/bin/bash ./compile.sh)
36
51
37
do-install:
52
do-install:
38
	@${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
39
56
40
.include <bsd.port.mk>
57
.include <bsd.port.mk>
(-)bazel/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1480863971
1
TIMESTAMP = 1485418133
2
SHA256 (bazel-0.4.2rc2-dist.zip) = 8e6f41252abadcdb2cc7a07f910ec4b45fb12c46f0a578672c6a186c7efcdb36
2
SHA256 (bazel-0.4.4rc1-dist.zip) = 573234b67ee4399d8ae1bccb5f57c8943bce8386f83be37fd1f06ffc9a7c4d7f
3
SIZE (bazel-0.4.2rc2-dist.zip) = 89321429
3
SIZE (bazel-0.4.4rc1-dist.zip) = 93030753
(-)bazel/files/patch-scripts_bootstrap_bootstrap.sh (-5 / +5 lines)
Lines 1-15 Link Here
1
--- scripts/bootstrap/bootstrap.sh.orig	1979-12-31 23:00:00 UTC
1
--- scripts/bootstrap/bootstrap.sh.orig	1979-12-31 23:00:00 UTC
2
+++ scripts/bootstrap/bootstrap.sh
2
+++ scripts/bootstrap/bootstrap.sh
3
@@ -39,7 +39,7 @@ if [ "${JAVA_VERSION}" = "1.7" ]; then
3
@@ -47,7 +47,7 @@ else
4
 else
4
         --host_javabase=$JAVA_HOME \
5
   : ${BAZEL_ARGS:=--java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
5
         --spawn_strategy=standalone \
6
         --host_java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
6
         --nojava_header_compilation \
7
-        --strategy=Javac=worker --worker_quit_after_build --ignore_unsupported_sandboxing \
7
-        --strategy=Javac=worker --worker_quit_after_build --ignore_unsupported_sandboxing \
8
+        --strategy=Javac=standalone --ignore_unsupported_sandboxing \
8
+        --strategy=Javac=standalone --ignore_unsupported_sandboxing \
9
         --compilation_mode=opt \
9
         --compilation_mode=opt \
10
         "${EXTRA_BAZEL_ARGS:-}"}
10
         "${EXTRA_BAZEL_ARGS:-}"}
11
 fi
11
 fi
12
@@ -91,7 +91,7 @@ function bootstrap_test() {
12
@@ -99,7 +99,7 @@ function bootstrap_test() {
13
   local BAZEL_BIN=$1
13
   local BAZEL_BIN=$1
14
   local BAZEL_SUM=$2
14
   local BAZEL_SUM=$2
15
   local BAZEL_TARGET=${3:-src:bazel}
15
   local BAZEL_TARGET=${3:-src:bazel}
(-)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_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