aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2017-02-02 14:35:27 +0800
committerpi <pi@FreeBSD.org>2017-02-02 14:35:27 +0800
commitd1b7c92e38d4c781bcffa2824fb382fef94823f0 (patch)
treea05540c9e33aaa7212c60ab904a4e08384d16667
parente293da24de0e27efcf397d9a1a01a97873788c3f (diff)
downloadfreebsd-ports-gnome-d1b7c92e38d4c781bcffa2824fb382fef94823f0.tar.gz
freebsd-ports-gnome-d1b7c92e38d4c781bcffa2824fb382fef94823f0.tar.zst
freebsd-ports-gnome-d1b7c92e38d4c781bcffa2824fb382fef94823f0.zip
devel/bazel: update 0.4.2r -> 0.4.4
PR: 215490 Changes: https://github.com/bazelbuild/bazel/releases Submitted by: Klaus Aehlig <aehlig@linta.de> (maintainer)
-rw-r--r--devel/bazel/Makefile27
-rw-r--r--devel/bazel/distinfo6
-rw-r--r--devel/bazel/files/patch-scripts_bootstrap_bootstrap.sh10
-rw-r--r--devel/bazel/files/patch-src_main_cpp_blaze__util__freebsd.cc12
-rw-r--r--devel/bazel/files/patch-src_main_cpp_util_file__platform.h10
-rw-r--r--devel/bazel/files/patch-third__party_protobuf_3.0.0_BUILD11
-rw-r--r--devel/bazel/pkg-plist2
7 files changed, 32 insertions, 46 deletions
diff --git a/devel/bazel/Makefile b/devel/bazel/Makefile
index cb8b7214af13..49ad72e5999b 100644
--- a/devel/bazel/Makefile
+++ b/devel/bazel/Makefile
@@ -2,10 +2,10 @@
# $FreeBSD$
PORTNAME= bazel
-PORTVERSION= 0.4.2r # rc2 of 0.4.2
+PORTVERSION= 0.4.4
CATEGORIES= devel java
-MASTER_SITES= https://storage.googleapis.com/bazel/0.4.2/rc2/
-DISTNAME= bazel-0.4.2rc2-dist
+MASTER_SITES= https://storage.googleapis.com/bazel/${PORTVERSION}/rc${FINALRC}/
+DISTNAME= bazel-${PORTVERSION}rc${FINALRC}-dist
MAINTAINER= aehlig@linta.de
COMMENT= Fast and correct build system
@@ -16,6 +16,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BUILD_DEPENDS= bash:shells/bash \
zip:archivers/zip
+# In bazel, a release is always code-wise identical to the final release candidate.
+# Hence we can also download that one and so have a simple way to also test earlier release
+# candidates.
+FINALRC= 1
+
+BROKEN_FreeBSD_9= fails with static_assert expression error in src/main/cpp/util/numbers.cc
+
NO_WRKSUBDIR= YES
USES= shebangfix zip
SHEBANG_FILES= ${WRKSRC}/tools/cpp/link_dynamic_library.sh
@@ -25,16 +32,26 @@ JAVA_VERSION= 1.8
JAVA_BUILD= yes
JAVA_RUN= yes
-PLIST_FILES= bin/bazel
+# Have the location of the system-wide rc file reside ${ETCDIR}.
+# Also adapt the sample file to disable persistent java workers as they
+# do not work reliably on FreeBSD.
+post-patch:
+ @${REINPLACE_CMD} \
+ -e "s|\"/etc/bazel.bazelrc\"|\"${ETCDIR}/bazel.bazelrc\"|" \
+ ${WRKSRC}/src/main/cpp/workspace_layout.cc
+ @${ECHO_CMD} build --strategy=Javac=standalone >> ${WRKSRC}/scripts/packages/debian/bazel.bazelrc
do-build:
@${MKDIR} ${WRKDIR}/bazel_tmp
(cd ${WRKSRC} && \
${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \
TMPDIR=${WRKDIR}/bazel_tmp \
+ EMBED_LABEL='${PORTVERSION}' \
${LOCALBASE}/bin/bash ./compile.sh)
do-install:
- @${CP} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin
+ ${CP} ${WRKSRC}/output/bazel ${STAGEDIR}${PREFIX}/bin
+ @${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/scripts/packages/debian/bazel.bazelrc ${STAGEDIR}${ETCDIR}/bazel.bazelrc.sample
.include <bsd.port.mk>
diff --git a/devel/bazel/distinfo b/devel/bazel/distinfo
index fb00ba4036b2..a6e0294b9080 100644
--- a/devel/bazel/distinfo
+++ b/devel/bazel/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1480863971
-SHA256 (bazel-0.4.2rc2-dist.zip) = 8e6f41252abadcdb2cc7a07f910ec4b45fb12c46f0a578672c6a186c7efcdb36
-SIZE (bazel-0.4.2rc2-dist.zip) = 89321429
+TIMESTAMP = 1485418133
+SHA256 (bazel-0.4.4rc1-dist.zip) = 573234b67ee4399d8ae1bccb5f57c8943bce8386f83be37fd1f06ffc9a7c4d7f
+SIZE (bazel-0.4.4rc1-dist.zip) = 93030753
diff --git a/devel/bazel/files/patch-scripts_bootstrap_bootstrap.sh b/devel/bazel/files/patch-scripts_bootstrap_bootstrap.sh
index 7bb60561915e..c5a78309d215 100644
--- a/devel/bazel/files/patch-scripts_bootstrap_bootstrap.sh
+++ b/devel/bazel/files/patch-scripts_bootstrap_bootstrap.sh
@@ -1,15 +1,15 @@
--- scripts/bootstrap/bootstrap.sh.orig 1979-12-31 23:00:00 UTC
+++ scripts/bootstrap/bootstrap.sh
-@@ -39,7 +39,7 @@ if [ "${JAVA_VERSION}" = "1.7" ]; then
- else
- : ${BAZEL_ARGS:=--java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
- --host_java_toolchain=//src/java_tools/buildjar:bootstrap_toolchain \
+@@ -47,7 +47,7 @@ else
+ --host_javabase=$JAVA_HOME \
+ --spawn_strategy=standalone \
+ --nojava_header_compilation \
- --strategy=Javac=worker --worker_quit_after_build --ignore_unsupported_sandboxing \
+ --strategy=Javac=standalone --ignore_unsupported_sandboxing \
--compilation_mode=opt \
"${EXTRA_BAZEL_ARGS:-}"}
fi
-@@ -91,7 +91,7 @@ function bootstrap_test() {
+@@ -99,7 +99,7 @@ function bootstrap_test() {
local BAZEL_BIN=$1
local BAZEL_SUM=$2
local BAZEL_TARGET=${3:-src:bazel}
diff --git a/devel/bazel/files/patch-src_main_cpp_blaze__util__freebsd.cc b/devel/bazel/files/patch-src_main_cpp_blaze__util__freebsd.cc
deleted file mode 100644
index 56a7e0faf6c2..000000000000
--- a/devel/bazel/files/patch-src_main_cpp_blaze__util__freebsd.cc
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/main/cpp/blaze_util_freebsd.cc.orig 1979-12-31 23:00:00 UTC
-+++ src/main/cpp/blaze_util_freebsd.cc
-@@ -145,6 +145,9 @@ bool IsSharedLibrary(const string &filen
-
- string GetDefaultHostJavabase() {
- // if JAVA_HOME is defined, then use it as default.
-+ if (getenv("JAVA_HOME") == nullptr) {
-+ return "/usr/local/openjdk8";
-+ }
- string javahome = getenv("JAVA_HOME");
- return !javahome.empty() ? javahome : "/usr/local/openjdk8";
- }
diff --git a/devel/bazel/files/patch-src_main_cpp_util_file__platform.h b/devel/bazel/files/patch-src_main_cpp_util_file__platform.h
deleted file mode 100644
index 6b0d9261ad31..000000000000
--- a/devel/bazel/files/patch-src_main_cpp_util_file__platform.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/main/cpp/util/file_platform.h.orig 2016-12-05 22:12:53 UTC
-+++ src/main/cpp/util/file_platform.h
-@@ -16,6 +16,7 @@
- #define BAZEL_SRC_MAIN_CPP_UTIL_FILE_PLATFORM_H_
-
- #include <stdint.h>
-+#include <time.h>
-
- #include <string>
-
diff --git a/devel/bazel/files/patch-third__party_protobuf_3.0.0_BUILD b/devel/bazel/files/patch-third__party_protobuf_3.0.0_BUILD
deleted file mode 100644
index 7ee886a6f14e..000000000000
--- a/devel/bazel/files/patch-third__party_protobuf_3.0.0_BUILD
+++ /dev/null
@@ -1,11 +0,0 @@
---- third_party/protobuf/3.0.0/BUILD.orig 1979-12-31 23:00:00 UTC
-+++ third_party/protobuf/3.0.0/BUILD
-@@ -87,7 +87,7 @@ COPTS = [
- "-Wno-error=unused-variable",
- ]
-
--LINK_OPTS = ["-lpthread"]
-+LINK_OPTS = ["-lpthread", "-lm"]
-
- cc_library(
- name = "protobuf_lite",
diff --git a/devel/bazel/pkg-plist b/devel/bazel/pkg-plist
new file mode 100644
index 000000000000..d157c119f36f
--- /dev/null
+++ b/devel/bazel/pkg-plist
@@ -0,0 +1,2 @@
+bin/bazel
+@sample %%ETCDIR%%/bazel.bazelrc.sample