summaryrefslogtreecommitdiff
path: root/dev-util/bazel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
commite68d405c5d712af4387159df07e226217bdda049 (patch)
tree009ab0f3d427f0813e62930d71802cb054c07e30 /dev-util/bazel
parent401101f9c8077911929d3f2b60a37098460a5d89 (diff)
gentoo resync : 06.04.2022
Diffstat (limited to 'dev-util/bazel')
-rw-r--r--dev-util/bazel/Manifest4
-rw-r--r--dev-util/bazel/bazel-4.2.2.ebuild2
-rw-r--r--dev-util/bazel/bazel-5.0.0.ebuild95
3 files changed, 99 insertions, 2 deletions
diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest
index bb3468c59ca8..0e535705d34b 100644
--- a/dev-util/bazel/Manifest
+++ b/dev-util/bazel/Manifest
@@ -3,6 +3,8 @@ AUX bazel-3.7.2-musl-temp-failure-retry.patch 1238 BLAKE2B d6890d77ddd256fd1fa68
AUX bazel-4.2.2-absl_numeric_limits.patch 2413 BLAKE2B 3e31f886b3f561faa79255aa65b163fae0ffae94db0374e033e3690119de7b87e183a8f6fc1c88d880a319bb1ea6c5d86640b864711cfb2f4d5b30095b303217 SHA512 3b32947b1e0af9ec367bafea439a4e21a57dd7c782fb6cc32f4c2a15bda05be2a676625b80cfa28c7a98e6be3bd7310ee632d5eef966615d11aaa14afea981bc
DIST bazel-3.7.2-dist.zip 313677756 BLAKE2B cd6363762c68d25739a6bf6c13f10e191302a10b6fb7d97455effbc678d4f0b644c76115cad478aad7c09f703d9e594f4bdb8669ed6ab97d6a559a27723c510c SHA512 e8746ef5ec22feb95e9dbbddb3fb56cf8f49c80f326fc2a4e0ce2619607826fac22f46bfb995daee55bf9ffabb9d646b8454be2bce7b479da5cf2a7e5b3be62b
DIST bazel-4.2.2-dist.zip 279304631 BLAKE2B 2a32838e50b63c4b6400aced10085c6c9aacf28641ea555a44b9c4ed8991fc29658b4d420b26179e8eed0e00cfe7391e8eec84c7851f17493c74d1c5682427af SHA512 123f73dc87053e37705bb729f82bd722d6d2799fe106f79c51cf5566fb2771d824108cbe275aad55ae590b970c549008b433704cbf1245394769e950796eb8db
+DIST bazel-5.0.0-dist.zip 235894565 BLAKE2B 3798eb9111772809f0345e0c74bef38d8f9d44a7f20844f20aad187a2e177f4999ffa0e1cc1719e4284cdc7c72295bb903d32ce56821c72ee2908f4d939d0769 SHA512 2a9a972d1cce6b50f959fec3d37506914208169c8aa36e5ec5f9a27942e9beff1080a544a18e9bd5eb13dc434c1864cda0594e6da5b78c2f41085abf808c22d7
EBUILD bazel-3.7.2-r1.ebuild 2740 BLAKE2B c6aaea27500b46a0aa684410307726b6ba5a306b27331cdee0e4b6af09cd711fb6918eeb0e9ac1c84e4fce1f22b870f7bf0f62b498e16ea71a232ea5280ca5af SHA512 f3b810aa3af9baf87e732029235650bb59c1f9894bc80b7973fbeed47e8c362b5c6dc75365b752043e655c8a57f52bcdb8a8aaa0f7491b7a34619d778571b4ab
-EBUILD bazel-4.2.2.ebuild 2331 BLAKE2B ea7a699f20c41be2c185ea185657c16072c6aeb13ad0f89eb33bcabc44eaa1dab492e27f82af9066f38c98770c0053ae36228d6a0c1e0c07585863040aaa25b9 SHA512 42e147bcfb3f46a85ced3fd68c08019f4f6477863b68a20af5d91f54a9e2289db09a1e8c7f09261436c9d24c0cc7bd4523502a4b62f127d57c559b443f890a39
+EBUILD bazel-4.2.2.ebuild 2330 BLAKE2B db8e9ff6fb17e3687350ec170474758c0b1e5bb65e8028fa5f0a80c3e8642a2f9bd8f96ee82b35b33686ba94ebf984d9de8137694c1b84aac3b8ec2136bd75e8 SHA512 8c1a4755d982826d1b7495d276ee3b788743561121dfe57d5c8d920373ddd749755b9e98e2f102f569468e7a9d97a34f3a7ace9af75079ad405d9735807f4dd8
+EBUILD bazel-5.0.0.ebuild 2382 BLAKE2B e1ad60c714a000ab0b09d77b5e83645c07c3f0c7ea04e264bd37f2769f959a43728d60fc8b09bc3c12d546f551b53740300a8a5deefc0f00415a48bd15e7c07f SHA512 10372e97dd589f05c439988cf84a011797fa673f4c264a9e4a636351ff55b697abcaf446de0b7436ffe891b5220f7f4ff3dc2ba2e08d2b8c474f9aa4ee5a5f90
MISC metadata.xml 706 BLAKE2B 07f70164b2e809db66f4255b62635e1b93ff58269f323a0efbfd994dd425034e4896599463c900582f0863cebf8f5ee0dd56da01bafbd30c9e27e88ffb99ad46 SHA512 3a335159533ca5f0d7de3b1bde18a737ba2dca2de56121124cdb9cb05009db5fac07bef1d21d5b73bec834b7928e7ec291e2ff3cd964e395431b9deac29bfbe6
diff --git a/dev-util/bazel/bazel-4.2.2.ebuild b/dev-util/bazel/bazel-4.2.2.ebuild
index 41553e6c87d4..a8b93d4ab322 100644
--- a/dev-util/bazel/bazel-4.2.2.ebuild
+++ b/dev-util/bazel/bazel-4.2.2.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.z
LICENSE="Apache-2.0"
SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="amd64"
IUSE="examples tools"
# strip corrupts the bazel binary
# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794)
diff --git a/dev-util/bazel/bazel-5.0.0.ebuild b/dev-util/bazel/bazel-5.0.0.ebuild
new file mode 100644
index 000000000000..778608f34249
--- /dev/null
+++ b/dev-util/bazel/bazel-5.0.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit bash-completion-r1 bazel java-pkg-2 multiprocessing
+
+DESCRIPTION="Fast and correct automated build system"
+HOMEPAGE="https://bazel.build/"
+
+SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples tools"
+# strip corrupts the bazel binary
+# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794)
+RESTRICT="strip test"
+RDEPEND=">=virtual/jdk-11:*"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ app-arch/zip"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ if has ccache ${FEATURES}; then
+ ewarn "${PN} usually fails to compile with ccache, you have been warned"
+ fi
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ # Only unpack the main distfile
+ unpack ${P}-dist.zip
+}
+
+src_prepare() {
+ 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
+}
+
+src_compile() {
+ export JAVA_HOME=$(java-config --jre-home) # so keepwork works
+ export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel_get_flags)
+ --java_runtime_version=local_jdk
+ --tool_java_runtime_version=local_jdk"
+ VERBOSE=yes ./compile.sh || die "Failed compiling bazel"
+
+ ./scripts/generate_bash_completion.sh \
+ --bazel=output/bazel \
+ --output=bazel-complete.bash \
+ --prepend=scripts/bazel-complete-header.bash \
+ --prepend=scripts/bazel-complete-template.bash || die "Failed to generate bash completions"
+}
+
+src_test() {
+ output/bazel test \
+ --verbose_failures \
+ --spawn_strategy=standalone \
+ --genrule_strategy=standalone \
+ --verbose_test_summary \
+ examples/cpp:hello-success_test || die
+ output/bazel shutdown
+}
+
+src_install() {
+ dobin output/bazel
+ newbashcomp bazel-complete.bash ${PN}
+ bashcomp_alias ${PN} ibazel
+ insinto /usr/share/zsh/site-functions
+ doins scripts/zsh_completion/_bazel
+
+ 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
+ docompress -x /usr/share/doc/${PF}/tools/build_defs/pkg/testdata
+ fi
+}