1 |
commit: 6715ca92f0918c2cc94f43fbdd47c449ccb716ad |
2 |
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Sep 19 01:30:38 2022 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 23 03:06:42 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6715ca92 |
7 |
|
8 |
dev-util/bazel: add 5.1.1 |
9 |
|
10 |
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> |
11 |
|
12 |
dev-util/bazel/Manifest | 1 + |
13 |
dev-util/bazel/bazel-5.1.1.ebuild | 96 +++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 97 insertions(+) |
15 |
|
16 |
diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest |
17 |
index 187f2c4ce9fe..4182cf2b0f1e 100644 |
18 |
--- a/dev-util/bazel/Manifest |
19 |
+++ b/dev-util/bazel/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST bazel-3.7.2-dist.zip 313677756 BLAKE2B cd6363762c68d25739a6bf6c13f10e191302a10b6fb7d97455effbc678d4f0b644c76115cad478aad7c09f703d9e594f4bdb8669ed6ab97d6a559a27723c510c SHA512 e8746ef5ec22feb95e9dbbddb3fb56cf8f49c80f326fc2a4e0ce2619607826fac22f46bfb995daee55bf9ffabb9d646b8454be2bce7b479da5cf2a7e5b3be62b |
22 |
DIST bazel-4.2.2-dist.zip 279304631 BLAKE2B 2a32838e50b63c4b6400aced10085c6c9aacf28641ea555a44b9c4ed8991fc29658b4d420b26179e8eed0e00cfe7391e8eec84c7851f17493c74d1c5682427af SHA512 123f73dc87053e37705bb729f82bd722d6d2799fe106f79c51cf5566fb2771d824108cbe275aad55ae590b970c549008b433704cbf1245394769e950796eb8db |
23 |
DIST bazel-5.0.0-dist.zip 235894565 BLAKE2B 3798eb9111772809f0345e0c74bef38d8f9d44a7f20844f20aad187a2e177f4999ffa0e1cc1719e4284cdc7c72295bb903d32ce56821c72ee2908f4d939d0769 SHA512 2a9a972d1cce6b50f959fec3d37506914208169c8aa36e5ec5f9a27942e9beff1080a544a18e9bd5eb13dc434c1864cda0594e6da5b78c2f41085abf808c22d7 |
24 |
+DIST bazel-5.1.1-dist.zip 236073335 BLAKE2B dacc98db99a4877bcda743058f8d34c276d893bec14a595155587f9d0a2716caf106e1d08917f8103b9c15c45433285cce2063f15a2653d3d1a4a6b67242876f SHA512 84e2f72df1838fc88a39853afc510bca835fea28590e9aac2138b5416d2f8d9aefd082c81012a2066194fdc440b00b44f9f188b5c896461acebfeb9cd40efc7c |
25 |
|
26 |
diff --git a/dev-util/bazel/bazel-5.1.1.ebuild b/dev-util/bazel/bazel-5.1.1.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..36ee3e954ac0 |
29 |
--- /dev/null |
30 |
+++ b/dev-util/bazel/bazel-5.1.1.ebuild |
31 |
@@ -0,0 +1,96 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+inherit bash-completion-r1 bazel java-pkg-2 multiprocessing |
38 |
+ |
39 |
+DESCRIPTION="Fast and correct automated build system" |
40 |
+HOMEPAGE="https://bazel.build/" |
41 |
+ |
42 |
+SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip" |
43 |
+ |
44 |
+LICENSE="Apache-2.0" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64" |
47 |
+IUSE="examples tools" |
48 |
+# strip corrupts the bazel binary |
49 |
+# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794) |
50 |
+RESTRICT="strip test" |
51 |
+RDEPEND=">=virtual/jre-11:*" |
52 |
+DEPEND=" |
53 |
+ virtual/jdk:11 |
54 |
+ app-arch/unzip |
55 |
+ app-arch/zip" |
56 |
+ |
57 |
+S="${WORKDIR}" |
58 |
+ |
59 |
+pkg_setup() { |
60 |
+ if has ccache ${FEATURES}; then |
61 |
+ ewarn "${PN} usually fails to compile with ccache, you have been warned" |
62 |
+ fi |
63 |
+ java-pkg-2_pkg_setup |
64 |
+} |
65 |
+ |
66 |
+src_unpack() { |
67 |
+ # Only unpack the main distfile |
68 |
+ unpack ${P}-dist.zip |
69 |
+} |
70 |
+ |
71 |
+src_prepare() { |
72 |
+ default |
73 |
+ |
74 |
+ # F: fopen_wr |
75 |
+ # S: deny |
76 |
+ # P: /proc/self/setgroups |
77 |
+ # A: /proc/self/setgroups |
78 |
+ # R: /proc/24939/setgroups |
79 |
+ # C: /usr/lib/systemd/systemd |
80 |
+ addpredict /proc |
81 |
+} |
82 |
+ |
83 |
+src_compile() { |
84 |
+ export JAVA_HOME=$(java-config --jre-home) # so keepwork works |
85 |
+ export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel_get_flags) |
86 |
+ --java_runtime_version=local_jdk |
87 |
+ --tool_java_runtime_version=local_jdk" |
88 |
+ VERBOSE=yes ./compile.sh || die "Failed compiling bazel" |
89 |
+ |
90 |
+ ./scripts/generate_bash_completion.sh \ |
91 |
+ --bazel=output/bazel \ |
92 |
+ --output=bazel-complete.bash \ |
93 |
+ --prepend=scripts/bazel-complete-header.bash \ |
94 |
+ --prepend=scripts/bazel-complete-template.bash || die "Failed to generate bash completions" |
95 |
+} |
96 |
+ |
97 |
+src_test() { |
98 |
+ output/bazel test \ |
99 |
+ --verbose_failures \ |
100 |
+ --spawn_strategy=standalone \ |
101 |
+ --genrule_strategy=standalone \ |
102 |
+ --verbose_test_summary \ |
103 |
+ examples/cpp:hello-success_test || die |
104 |
+ output/bazel shutdown |
105 |
+} |
106 |
+ |
107 |
+src_install() { |
108 |
+ dobin output/bazel |
109 |
+ newbashcomp bazel-complete.bash ${PN} |
110 |
+ bashcomp_alias ${PN} ibazel |
111 |
+ insinto /usr/share/zsh/site-functions |
112 |
+ doins scripts/zsh_completion/_bazel |
113 |
+ |
114 |
+ if use examples; then |
115 |
+ docinto examples |
116 |
+ dodoc -r examples/* |
117 |
+ docompress -x /usr/share/doc/${PF}/examples |
118 |
+ fi |
119 |
+ # could really build tools but I don't know which ones |
120 |
+ # are actually used |
121 |
+ if use tools; then |
122 |
+ docinto tools |
123 |
+ dodoc -r tools/* |
124 |
+ docompress -x /usr/share/doc/${PF}/tools |
125 |
+ docompress -x /usr/share/doc/${PF}/tools/build_defs/pkg/testdata |
126 |
+ fi |
127 |
+} |