summaryrefslogtreecommitdiff
path: root/dev-util/bazel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-06-16 05:02:38 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-06-16 05:02:38 +0100
commitf1bc537f089cc8477a9a18db597cb349e1b00e91 (patch)
treec48eb730c43e5f35729fabbe5cb4bfbe4a1bc794 /dev-util/bazel
parentcb3e8c6af7661fbcafdcacc7e0ecdfb610d098fa (diff)
gentoo resync : 16.06.2018
Diffstat (limited to 'dev-util/bazel')
-rw-r--r--dev-util/bazel/Manifest5
-rw-r--r--dev-util/bazel/bazel-0.14.1.ebuild141
-rw-r--r--dev-util/bazel/metadata.xml3
3 files changed, 148 insertions, 1 deletions
diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest
index 8d237f1c8b13..37dfa6b90af3 100644
--- a/dev-util/bazel/Manifest
+++ b/dev-util/bazel/Manifest
@@ -1,7 +1,10 @@
DIST bazel-0.10.1-dist.zip 92973197 BLAKE2B a1d681407e2c72a57b3dcbb5e2afc49e59670be65da3d7d038dc3b8593bc0ab5b4a06c8dd8fc8a617a92eef2fc26a049b6de9a1eab0d05f31efb2fbeeb9ce711 SHA512 1894c951fd39a084011f89dd0d458e182525c2bfd6c80da071865e981e21a8c2b8363530ab53af18e6deae4a488744d6d2b7a5a4acf04715c2e26560a01df707
DIST bazel-0.13.0-dist.zip 90105262 BLAKE2B cb065025524123babef187bac2e1f54f43645d08cb1282a5fe8f8c8b090e595570646072e2380836e2c43403f7953f97321becc24b743d7b9ab43ad208cf2c2d SHA512 3c128e551cff1b685250a68892ca3e1ad6be8b152ee2b8eb527c94adbb8fd50c70e703a363bb938916275030ddb14d756c14e4dc238e7a7b40289c700c5d53c7
+DIST bazel-0.14.1-dist.zip 89415405 BLAKE2B 7be5d4630d024d235a66f6bdf495c282b04a4034dde156c50d37a7e2eb3bf98df0caead7887f421b664fe92486e6baa5cd90e61b1e82b07b1691dc509ab93a68 SHA512 02c7125438f060d8e5e25b91ce3ca76fac6681b4f12033d807955a4ca5a5c22a3508a7229581b7349f35f343911f8408f43f8d78d54601277576dd32539e4681
DIST bazel-0.7.0-dist.zip 84669893 BLAKE2B 2f8bbe3a48224a797bdebdaad8f7c403c8b0232ada5eee8c8619f241e9670dda311b9280f48b5e2013079f959891d94f55aee2af0dfae9fc4f6a486663fa245d SHA512 039ab6a04fd4422bd14503187e6cc0d07301723b3ecae906606fa12ccea72190d82237899c103c1adfdf05dc8672887790780ddfb4cce87cd590adbde3d3f6d4
+DIST google-desugar_jdk_libs-f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip 1056996 BLAKE2B bf168c41a9958bcdc679a40d1e88911c6af0e47207362204326b712e0129b37348360a855f44af8b76acc46108ac89a707d0c0f793500c513a919070248939b9 SHA512 40cb9ffcaa3c57c69bcbec7b070fad5865e7317817049b7588dd42899054eb97cd17cb0019df99ad2324ed8e2efd8334cd83ace758a4c2d3f453503ccf54a91e
EBUILD bazel-0.10.1.ebuild 2099 BLAKE2B 33d61adacde597d2ce03a8d6ec40d56d774a48f542cc7eb72b5cc407389870b17773468b7164608294239c91d8cc9b346e4720da6770faff8d05884cb45c4672 SHA512 5d6d77837f203d2b4ed377a776935d21519605d06281b9abb906db4844f31beb40caa5d283537c94fe147b8d3d1f3b0de6142b28310f929da609927822c9c14d
EBUILD bazel-0.13.0.ebuild 2099 BLAKE2B 33d61adacde597d2ce03a8d6ec40d56d774a48f542cc7eb72b5cc407389870b17773468b7164608294239c91d8cc9b346e4720da6770faff8d05884cb45c4672 SHA512 5d6d77837f203d2b4ed377a776935d21519605d06281b9abb906db4844f31beb40caa5d283537c94fe147b8d3d1f3b0de6142b28310f929da609927822c9c14d
+EBUILD bazel-0.14.1.ebuild 3603 BLAKE2B 3cc3d61b45ea0595ad543d240c13b7f61ff6f76ae5cd34f7f2ba60823fcbb3ad31653fbc09b5a7030df7f0750ae33d3c0c454d162e72911e0cb2944036fd71f2 SHA512 9369b64769351b94d119323f1d506ffe9816b3ab3a2a33f4f1977b2aeede49b85833aa3454a4ce1b0b4a8026fffe731302b60aaab42c326c1ec733cb20aec332
EBUILD bazel-0.7.0.ebuild 2070 BLAKE2B c9e36a90c5d0233f282608f645db158d5449a2d2305209ff5b2268fb64d8208295316641123fe749446b2775098b7da38ce0fe753af959599995ebb24508cc39 SHA512 25e3293a33aae17cfbe2b4f7c3106bac1ff4362e72bf6becc4cd040088d9dab2cf64b3dca61d5de80631f00925f89a2a3aa24f49ac7520af50dec00181aae0f1
-MISC metadata.xml 703 BLAKE2B a019fea848bd86537d64d63746c1d7459ec1b511ac77c0c8ca9caee9e2b888ad99c15cdb5aca00ad6d6bbbfcfb5a2da05632af4d67b40d231e2234484f2eeb11 SHA512 46c1f55e4949ef3b7d42d769e31e34fcc9bffbe4b36cf6a467a514f8471325597d417f3da5ff955203fdc880531502969cef4fcedb4536cc7bfc64d2b7e50c5d
+MISC metadata.xml 784 BLAKE2B 387004423ccbcb3b2e94cc7824e7a43067f5e455151ad3eaa06baded58ce05ef71203caf8d5a9d89c00046ac0545776bcc6c5a8306a9f76f8a9334b95a92b880 SHA512 188f8323fd19d294e8772391edb87b4a28827b40c42643d6af389f4b3e2d36bc3f0efe637cf572d80dd47a956bd2e51be1993aaf7d080bbfbb6ec4aac2e51ac6
diff --git a/dev-util/bazel/bazel-0.14.1.ebuild b/dev-util/bazel/bazel-0.14.1.ebuild
new file mode 100644
index 000000000000..b972de19c2d7
--- /dev/null
+++ b/dev-util/bazel/bazel-0.14.1.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 java-pkg-2 multiprocessing
+
+DESCRIPTION="Fast and correct automated build system"
+HOMEPAGE="http://bazel.io/"
+
+bazel_external_uris="https://github.com/google/desugar_jdk_libs/archive/f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip -> google-desugar_jdk_libs-f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip"
+SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip
+ ${bazel_external_uris}"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples tools zsh-completion"
+# strip corrupts the bazel binary
+RESTRICT="strip"
+RDEPEND="virtual/jdk:1.8"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ app-arch/zip"
+
+S="${WORKDIR}"
+
+bazel-get-flags() {
+ local i fs=()
+ for i in ${CFLAGS}; do
+ fs+=( "--copt=${i}" "--host_copt=${i}" )
+ done
+ for i in ${CXXFLAGS}; do
+ fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
+ done
+ for i in ${CPPFLAGS}; do
+ fs+=( "--copt=${i}" "--host_copt=${i}" )
+ fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" )
+ done
+ for i in ${LDFLAGS}; do
+ fs+=( "--linkopt=${i}" "--host_linkopt=${i}" )
+ done
+ echo "${fs[*]}"
+}
+
+load_distfiles() {
+ # Populate the bazel distdir to fetch from since it cannot use the network
+ local s d uri rename
+ mkdir -p "${T}/bazel-distdir" || die "failed to create distdir"
+
+ while read uri rename d; do
+ [[ -z "$uri" ]] && continue
+ if [[ "$rename" == "->" ]]; then
+ s="${uri##*/}"
+ einfo "Copying $d to bazel distdir $s ..."
+ else
+ s="${uri##*/}"
+ d="${s}"
+ einfo "Copying $d to bazel distdir ..."
+ fi
+ cp "${DISTDIR}/${d}" "${T}/bazel-distdir/${s}" || die
+ done <<< "${bazel_external_uris}"
+}
+
+pkg_setup() {
+ echo ${PATH} | grep -q ccache && \
+ ewarn "${PN} usually fails to compile with ccache, you have been warned"
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ # Only unpack the main distfile
+ unpack ${P}-dist.zip
+}
+
+src_prepare() {
+ load_distfiles
+ default
+
+ # F: fopen_wr
+ # S: deny
+ # P: /proc/self/setgroups
+ # A: /proc/self/setgroups
+ # R: /proc/24939/setgroups
+ # C: /usr/lib/systemd/systemd
+ addpredict /proc
+
+ # Use standalone strategy to deactivate the bazel sandbox, since it
+ # conflicts with FEATURES=sandbox.
+ cat > "${T}/bazelrc" <<-EOF
+ build --verbose_failures
+ build --spawn_strategy=standalone --genrule_strategy=standalone
+
+ build --experimental_distdir=${T}/bazel-distdir
+ build --jobs=$(makeopts_jobs) $(bazel-get-flags)
+
+ test --verbose_failures --verbose_test_summary
+ test --spawn_strategy=standalone --genrule_strategy=standalone
+ EOF
+
+ echo "import ${T}/bazelrc" >> "${S}/.bazelrc"
+}
+
+src_compile() {
+ export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs)"
+ VERBOSE=yes ./compile.sh || die
+ output/bazel --bazelrc="${T}/bazelrc" build scripts:bazel-complete.bash || die
+ mv bazel-bin/scripts/bazel-complete.bash output/ || die
+}
+
+src_test() {
+ output/bazel test \
+ --verbose_failures \
+ --spawn_strategy=standalone \
+ --genrule_strategy=standalone \
+ --verbose_test_summary \
+ examples/cpp:hello-success_test || die
+}
+
+src_install() {
+ output/bazel shutdown
+ dobin output/bazel
+ newbashcomp output/bazel-complete.bash ${PN}
+ bashcomp_alias ${PN} ibazel
+ if use zsh-completion ; then
+ insinto /usr/share/zsh/site-functions
+ doins scripts/zsh_completion/_bazel
+ fi
+ if use examples; then
+ docinto examples
+ dodoc -r examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ # could really build tools but I don't know which ones
+ # are actually used
+ if use tools; then
+ docinto tools
+ dodoc -r tools/*
+ docompress -x /usr/share/doc/${PF}/tools
+ fi
+}
diff --git a/dev-util/bazel/metadata.xml b/dev-util/bazel/metadata.xml
index e7d5f3b34fd5..7ddb1068e6a0 100644
--- a/dev-util/bazel/metadata.xml
+++ b/dev-util/bazel/metadata.xml
@@ -4,6 +4,9 @@
<maintainer type="person">
<email>zmedico@gentoo.org</email>
</maintainer>
+ <maintainer type="person">
+ <email>perfinion@gentoo.org</email>
+ </maintainer>
<upstream>
<remote-id type="github">bazelbuild/bazel</remote-id>
</upstream>