summaryrefslogtreecommitdiff
path: root/dev-util/bazel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-11-22 19:06:54 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-11-22 19:06:54 +0000
commit664924d8659185e3b43f99ee8a0b88177efb93dc (patch)
treeaed90b6643b91860a6e68a4a6ef39b5747ed3b31 /dev-util/bazel
parent5d0c50eb490582cf1277e150ee5bb63a90b85aa6 (diff)
gentoo auto-resync : 22:11:2022 - 19:06:54
Diffstat (limited to 'dev-util/bazel')
-rw-r--r--dev-util/bazel/Manifest2
-rw-r--r--dev-util/bazel/bazel-5.3.0.ebuild96
2 files changed, 98 insertions, 0 deletions
diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest
index 9f3d97e566a5..552edb796137 100644
--- a/dev-util/bazel/Manifest
+++ b/dev-util/bazel/Manifest
@@ -5,8 +5,10 @@ DIST bazel-3.7.2-dist.zip 313677756 BLAKE2B cd6363762c68d25739a6bf6c13f10e191302
DIST bazel-4.2.2-dist.zip 279304631 BLAKE2B 2a32838e50b63c4b6400aced10085c6c9aacf28641ea555a44b9c4ed8991fc29658b4d420b26179e8eed0e00cfe7391e8eec84c7851f17493c74d1c5682427af SHA512 123f73dc87053e37705bb729f82bd722d6d2799fe106f79c51cf5566fb2771d824108cbe275aad55ae590b970c549008b433704cbf1245394769e950796eb8db
DIST bazel-5.0.0-dist.zip 235894565 BLAKE2B 3798eb9111772809f0345e0c74bef38d8f9d44a7f20844f20aad187a2e177f4999ffa0e1cc1719e4284cdc7c72295bb903d32ce56821c72ee2908f4d939d0769 SHA512 2a9a972d1cce6b50f959fec3d37506914208169c8aa36e5ec5f9a27942e9beff1080a544a18e9bd5eb13dc434c1864cda0594e6da5b78c2f41085abf808c22d7
DIST bazel-5.1.1-dist.zip 236073335 BLAKE2B dacc98db99a4877bcda743058f8d34c276d893bec14a595155587f9d0a2716caf106e1d08917f8103b9c15c45433285cce2063f15a2653d3d1a4a6b67242876f SHA512 84e2f72df1838fc88a39853afc510bca835fea28590e9aac2138b5416d2f8d9aefd082c81012a2066194fdc440b00b44f9f188b5c896461acebfeb9cd40efc7c
+DIST bazel-5.3.0-dist.zip 235314819 BLAKE2B 771a940e083d569b0297d37877e6d52c16f698bc5141e2c9c895d5d6cdd9e93203fbc941eca7daa4b40026551c25a5bf45d0862b8b13993bc40434aa6bb99dd3 SHA512 6c98e904596764a309e98ea2453c751dc0bf27c683462c5654b72076f8537bccf6c5103ccea60fa3a3dffeaa76b07db80a594feb96ed566282d10bb04f0e1455
EBUILD bazel-3.7.2-r1.ebuild 2778 BLAKE2B d24848fe0b5d5cc71cc754e1f7f6e2d5efc14240c55b00af10b93de298646f0bed8994a69a2767986854f4784dfc820e5dd157ef253325049d4c039b3b79bcf7 SHA512 08d18de4c56f733d638c36317c66a7d2afa6b7dde03ca79c106e0285551514ea9558c68c2c13dd33e6448d8d38d233fff423bde434714345c711ee955ca75f98
EBUILD bazel-4.2.2.ebuild 2368 BLAKE2B 51982c8c7ac6d2d02259c295879a1883f45e83203c8a8ae697697b593dbb5ce7649ee3054ccf624416eba0fae51f942a115c275fbd6d173c6168324a289d933a SHA512 a58e9e1b9df0257806d64df2527d25eea261974de747237b478a009974c492b8f7c414a598029162bf689c6cfe7082660730d72b6d8f78a4620b16d820a885fc
EBUILD bazel-5.0.0.ebuild 2387 BLAKE2B d178d0ae8503b118b307689c3923e5ea859f3c961b01b4c08453e5efe48e9468feee555a47aaad0fe04b645395212935867c18a66cd59369f21b63b1f46cae44 SHA512 aaab839c67430c578a1b9d1de59013b75f29a40bae902a799428726da49c716534c6fa4e400362793816d8c6dc56b2e7dad68b1e673b85928b950b2fa50d9b28
EBUILD bazel-5.1.1.ebuild 2388 BLAKE2B c6ed6fa24af8f9c0a6ac5a6e841926c34201aba47d035c9b344db62faaf9062a8aa05a537dd73b33ff03b168a66da24b081d181585bf18c81d7ce3b204643ab0 SHA512 e334a3366e452bcb4f846bf5379027287a4432621729bf37240425266facf01ee198be74915842db1d524c7c34620b67eadbf08f81b40fae89f1f476c21821f9
+EBUILD bazel-5.3.0.ebuild 2388 BLAKE2B c6ed6fa24af8f9c0a6ac5a6e841926c34201aba47d035c9b344db62faaf9062a8aa05a537dd73b33ff03b168a66da24b081d181585bf18c81d7ce3b204643ab0 SHA512 e334a3366e452bcb4f846bf5379027287a4432621729bf37240425266facf01ee198be74915842db1d524c7c34620b67eadbf08f81b40fae89f1f476c21821f9
MISC metadata.xml 706 BLAKE2B 07f70164b2e809db66f4255b62635e1b93ff58269f323a0efbfd994dd425034e4896599463c900582f0863cebf8f5ee0dd56da01bafbd30c9e27e88ffb99ad46 SHA512 3a335159533ca5f0d7de3b1bde18a737ba2dca2de56121124cdb9cb05009db5fac07bef1d21d5b73bec834b7928e7ec291e2ff3cd964e395431b9deac29bfbe6
diff --git a/dev-util/bazel/bazel-5.3.0.ebuild b/dev-util/bazel/bazel-5.3.0.ebuild
new file mode 100644
index 000000000000..36ee3e954ac0
--- /dev/null
+++ b/dev-util/bazel/bazel-5.3.0.ebuild
@@ -0,0 +1,96 @@
+# 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/jre-11:*"
+DEPEND="
+ virtual/jdk:11
+ 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
+}