diff options
author | 2015-12-03 12:16:56 -0800 | |
---|---|---|
committer | 2015-12-03 12:16:56 -0800 | |
commit | 07fb9e52ec8423ed07c862cbbcadd78f34f8b3a8 (patch) | |
tree | 8856f0b4ea65d396c1996eec5721a0ef18e488f5 /app-misc/bazel/files/bazel-0.1.1-java-1.7.patch | |
parent | Drop emscripten-fastcomp (diff) | |
download | palmer-07fb9e52ec8423ed07c862cbbcadd78f34f8b3a8.tar.gz palmer-07fb9e52ec8423ed07c862cbbcadd78f34f8b3a8.tar.bz2 palmer-07fb9e52ec8423ed07c862cbbcadd78f34f8b3a8.zip |
Add app-misc/bazel at 0.1.1
This is a Google-related build system. It's a Java thing, and it only
officially supports Java 8. I've hacked it up to not check for Java 8
-- the website says Java 7 works, it just isn't supported.
Diffstat (limited to 'app-misc/bazel/files/bazel-0.1.1-java-1.7.patch')
-rw-r--r-- | app-misc/bazel/files/bazel-0.1.1-java-1.7.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/app-misc/bazel/files/bazel-0.1.1-java-1.7.patch b/app-misc/bazel/files/bazel-0.1.1-java-1.7.patch new file mode 100644 index 0000000..62da1b7 --- /dev/null +++ b/app-misc/bazel/files/bazel-0.1.1-java-1.7.patch @@ -0,0 +1,68 @@ +diff -Nur bazel-0.1.1.orig/scripts/bootstrap/bootstrap.sh bazel-0.1.1/scripts/bootstrap/bootstrap.sh +--- bazel-0.1.1.orig/scripts/bootstrap/bootstrap.sh 2015-12-03 11:53:04.780669965 -0800 ++++ bazel-0.1.1/scripts/bootstrap/bootstrap.sh 2015-12-03 11:53:16.060153924 -0800 +@@ -29,7 +29,7 @@ + EMBED_LABEL_ARG=(--stamp --embed_label "${EMBED_LABEL}") + fi + +-: ${JAVA_VERSION:="1.8"} ++: ${JAVA_VERSION:="1.7"} + : ${BAZEL_ARGS="--singlejar_top=//src/java_tools/singlejar:bootstrap_deploy.jar \ + --javabuilder_top=//src/java_tools/buildjar:bootstrap_deploy.jar \ + --genclass_top=//src/java_tools/buildjar:bootstrap_genclass_deploy.jar \ +diff -Nur bazel-0.1.1.orig/scripts/bootstrap/buildenv.sh bazel-0.1.1/scripts/bootstrap/buildenv.sh +--- bazel-0.1.1.orig/scripts/bootstrap/buildenv.sh 2015-12-03 11:55:40.773535945 -0800 ++++ bazel-0.1.1/scripts/bootstrap/buildenv.sh 2015-12-03 11:55:52.612994729 -0800 +@@ -21,7 +21,7 @@ + DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) + WORKSPACE_DIR="$(dirname $(dirname ${DIR}))" + +-JAVA_VERSION=${JAVA_VERSION:-1.8} ++JAVA_VERSION=${JAVA_VERSION:-1.7} + BAZELRC=${BAZELRC:-"/dev/null"} + PLATFORM="$(uname -s | tr 'A-Z' 'a-z')" + +diff -Nur bazel-0.1.1.orig/compile.sh bazel-0.1.1/compile.sh +--- bazel-0.1.1.orig/compile.sh 2015-12-03 12:05:02.667835113 -0800 ++++ bazel-0.1.1/compile.sh 2015-12-03 12:06:54.222728971 -0800 +@@ -171,15 +171,15 @@ + fi + + [ -n "$JAVAC_VERSION" ] || get_java_version +- if [[ ! "${BAZEL_TEST_FILTERS-}" =~ "-jdk8" ]] \ +- && [ "8" -gt ${JAVAC_VERSION#*.} ]; then +- display "$WARNING Your version of Java is lower than 1.8!" +- display "$WARNING Deactivating Java 8 tests, please use a JDK 8 to fully" ++ if [[ ! "${BAZEL_TEST_FILTERS-}" =~ "-jdk7" ]] \ ++ && [ "7" -gt ${JAVAC_VERSION#*.} ]; then ++ display "$WARNING Your version of Java is lower than 1.7!" ++ display "$WARNING Deactivating Java 8 tests, please use a JDK 7 to fully" + display "$WARNING test Bazel." + if [ -n "${BAZEL_TEST_FILTERS-}" ]; then +- BAZEL_TEST_FILTERS="${BAZEL_TEST_FILTERS},-jdk8" ++ BAZEL_TEST_FILTERS="${BAZEL_TEST_FILTERS},-jdk7" + else +- BAZEL_TEST_FILTERS="-jdk8" ++ BAZEL_TEST_FILTERS="-jdk7" + fi + fi + $BAZEL --bazelrc=${BAZELRC} --nomaster_bazelrc test \ +diff -Nur bazel-0.1.1.orig/src/main/cpp/blaze.cc bazel-0.1.1/src/main/cpp/blaze.cc +--- bazel-0.1.1.orig/src/main/cpp/blaze.cc 2015-12-03 12:09:36.435307609 -0800 ++++ bazel-0.1.1/src/main/cpp/blaze.cc 2015-12-03 12:09:58.874281328 -0800 +@@ -459,6 +459,7 @@ + static string VerifyJavaVersionAndGetJvm() { + string exe = globals->options.GetJvm(); + ++#if 0 + string version_spec_file = blaze_util::JoinPath( + blaze_util::JoinPath(globals->options.install_base, "_embedded_binaries"), + "java.version"); +@@ -480,6 +481,7 @@ + jvm_version.c_str(), version_spec.c_str()); + } + } ++#endif + + return exe; + } |