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 | |
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')
-rw-r--r-- | app-misc/bazel/Manifest | 3 | ||||
-rw-r--r-- | app-misc/bazel/bazel-0.1.1.ebuild | 36 | ||||
-rw-r--r-- | app-misc/bazel/files/bazel-0.1.1-java-1.7.patch | 68 |
3 files changed, 107 insertions, 0 deletions
diff --git a/app-misc/bazel/Manifest b/app-misc/bazel/Manifest new file mode 100644 index 0000000..1d6e8e7 --- /dev/null +++ b/app-misc/bazel/Manifest @@ -0,0 +1,3 @@ +AUX bazel-0.1.1-java-1.7.patch 2904 SHA256 9b666aeb56eec2ba62ef8d47dc212e3eddca7e65313240a43602c6456bae9d62 SHA512 14262ab79bf924d806ebabc7dcc27caf2180c7d22afcc4e5e16411f5cab26fcce0143e89b15e9757152f2b2d7de7a3f7db64626d251973c4501511f4c3944c19 WHIRLPOOL 695ce73068e35c415ba159fd1846ddc852d868a6e8116f4f0acdb9f818aaefcc102d9699f0a98cb36662b7f675a6e3c78421e5b71f3b0ffd1a7c6a69503f703d +DIST bazel-0.1.1.tar.gz 32568290 SHA256 49d11d467cf9e32dea618727198592577fbe76ff2e59217c53e3515ddf61cd95 SHA512 1d7636f7c4b2d7e152685bef27f6913b75c376730e106c85a54fbaf0e0797f74ecc2e7e7fb4ff1cd8cbe2b4d30c391c89a12f03de8ac8e758b3715632ae99717 WHIRLPOOL 20e4d0ab279d6d833a82b4ed986230806a91d31d16ca9c5deb6a78ee7404d81680a15672d2c1970551158f564396f098c749b4c586d86173036f03c8b2eb2f03 +EBUILD bazel-0.1.1.ebuild 595 SHA256 0b8d98c48ea345c6ef31d24cd2e220237852c06145a0420e5b0af1e4b230bb50 SHA512 fad387d3d288da2fc1f068024ed8e9f6de2909e3e6dabfba7e43a75a759f36fdf1ccad084549f027675cca48e7ed0a9f6e3e181f23e299dffc68d91264f0debd WHIRLPOOL e7c4314bf0b53a53876a4c4e527592e8f2d8f9f656b3c4a2f2b19241ce56a407d3b25fdd2b3af3e714e0d2f9691ba964b7a98e465495d4cda11563aa321fde00 diff --git a/app-misc/bazel/bazel-0.1.1.ebuild b/app-misc/bazel/bazel-0.1.1.ebuild new file mode 100644 index 0000000..5f744cc --- /dev/null +++ b/app-misc/bazel/bazel-0.1.1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="Bazel build system" +HOMEPAGE="http://bazel.io/" +SRC_URI="https://github.com/bazelbuild/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}/${P}-java-1.7.patch" +} + +src_configure() { + : +} + +src_compile() { + ./compile.sh +} + +src_install() { + mkdir -p ${ED}/bin + cp -a --reflink=auto output/${PN} ${ED}/bin/${PN} +} 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; + } |