1 |
commit: 9d99c68fe66a24455b8a05928d4b79f58c15b5a3 |
2 |
Author: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 3 14:13:22 2019 +0000 |
4 |
Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 3 14:18:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d99c68f |
7 |
|
8 |
dev-util/bazel: bump to 0.22.0 |
9 |
|
10 |
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
dev-util/bazel/Manifest | 1 + |
14 |
dev-util/bazel/bazel-0.22.0.ebuild | 120 +++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 121 insertions(+) |
16 |
|
17 |
diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest |
18 |
index f69343dc6ba..ebcb6de9e27 100644 |
19 |
--- a/dev-util/bazel/Manifest |
20 |
+++ b/dev-util/bazel/Manifest |
21 |
@@ -2,3 +2,4 @@ DIST bazel-0.17.2-dist.zip 79230155 BLAKE2B 62a60011f9605a1d615e648fdbb98b193561 |
22 |
DIST bazel-0.18.0-dist.zip 86890953 BLAKE2B 53da2c2d4467f1f7dd2e613a347acd0ea547bd41fe49fa39cbbcb92c337dca43412ac9b65abf7a3e00c322b8fea075cbdef0da5b064bf4e22aaaa4c545c539de SHA512 128e1041ae0d85be26933bb107b406ca4ab177f00eec2ee1d791ec9089c0cb384857b532498276480d1063b82e7a9a809b9f8a0d0715260534c3e3d202d6cf13 |
23 |
DIST bazel-0.19.0-dist.zip 87333329 BLAKE2B a9a0002b6a1dc98d3c753b9e37001f41c0e9b3e8628600d10d7ffb379686a2fef33032b8264e72cb787135be0a5a3c26aa452320b309da10ed8a1f8fe6667046 SHA512 ea67fb4d13487d24a0442084f42ff3c082a107c56a06d882f579064f17c545d6e9b5f0c4d724238c22e9b3bad12c68c60c58b59f82d9e957fe3af222d44bc969 |
24 |
DIST bazel-0.20.0-dist.zip 87602213 BLAKE2B 0d10fc89a8bc2bf91a67317d42302b894abbec8c4e9f39dd4fbeae71fcba847d5ae35102e3ef4a26d7dfe2da9e47cec5660dd28e1804c3ad562583e9566b78cb SHA512 1628a99a2c95334b7b190c5cf1b80ad3ce61c827103844f68401ffe5cfa994d5b7edd9e314a2775b6ed5b8da70ad79bee0ef47b9acf409919a613069356623a3 |
25 |
+DIST bazel-0.22.0-dist.zip 88633015 BLAKE2B 7cb7ef53c9acb4089b92d82679ad82739fd3c1fd3af7147e13b1474353fdf4cba1f58deed6d1880ec85fe5a07940b8df14af2701361d86e638b5c0e6924300c1 SHA512 b93cd21f0f164c118b90efba761a9492eb9894e24f13ff468defd12b86c7e67f16e51060ac2fc4c2f8dbf51b1c833d41b255fdd8107988e5babf093cfc5b3254 |
26 |
|
27 |
diff --git a/dev-util/bazel/bazel-0.22.0.ebuild b/dev-util/bazel/bazel-0.22.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..68be76691f9 |
30 |
--- /dev/null |
31 |
+++ b/dev-util/bazel/bazel-0.22.0.ebuild |
32 |
@@ -0,0 +1,120 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+inherit bash-completion-r1 java-pkg-2 multiprocessing |
39 |
+ |
40 |
+DESCRIPTION="Fast and correct automated build system" |
41 |
+HOMEPAGE="https://bazel.build/" |
42 |
+ |
43 |
+SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip" |
44 |
+ |
45 |
+LICENSE="Apache-2.0" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64" |
48 |
+IUSE="examples tools" |
49 |
+# strip corrupts the bazel binary |
50 |
+RESTRICT="strip" |
51 |
+RDEPEND="virtual/jdk:1.8" |
52 |
+DEPEND="${RDEPEND} |
53 |
+ app-arch/unzip" |
54 |
+ |
55 |
+S="${WORKDIR}" |
56 |
+QA_FLAGS_IGNORED="usr/bin/bazel" |
57 |
+ |
58 |
+bazel-get-flags() { |
59 |
+ local i fs=() |
60 |
+ for i in ${CFLAGS}; do |
61 |
+ fs+=( "--copt=${i}" "--host_copt=${i}" ) |
62 |
+ done |
63 |
+ for i in ${CXXFLAGS}; do |
64 |
+ fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) |
65 |
+ done |
66 |
+ for i in ${CPPFLAGS}; do |
67 |
+ fs+=( "--copt=${i}" "--host_copt=${i}" ) |
68 |
+ fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) |
69 |
+ done |
70 |
+ for i in ${LDFLAGS}; do |
71 |
+ fs+=( "--linkopt=${i}" "--host_linkopt=${i}" ) |
72 |
+ done |
73 |
+ echo "${fs[*]}" |
74 |
+} |
75 |
+ |
76 |
+pkg_setup() { |
77 |
+ echo ${PATH} | grep -q ccache && \ |
78 |
+ ewarn "${PN} usually fails to compile with ccache, you have been warned" |
79 |
+ java-pkg-2_pkg_setup |
80 |
+} |
81 |
+ |
82 |
+src_unpack() { |
83 |
+ # Only unpack the main distfile |
84 |
+ unpack ${P}-dist.zip |
85 |
+} |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ default |
89 |
+ |
90 |
+ # F: fopen_wr |
91 |
+ # S: deny |
92 |
+ # P: /proc/self/setgroups |
93 |
+ # A: /proc/self/setgroups |
94 |
+ # R: /proc/24939/setgroups |
95 |
+ # C: /usr/lib/systemd/systemd |
96 |
+ addpredict /proc |
97 |
+ |
98 |
+ # Use standalone strategy to deactivate the bazel sandbox, since it |
99 |
+ # conflicts with FEATURES=sandbox. |
100 |
+ cat > "${T}/bazelrc" <<-EOF || die |
101 |
+ build --verbose_failures |
102 |
+ build --spawn_strategy=standalone --genrule_strategy=standalone |
103 |
+ |
104 |
+ build --distdir="${S}/derived/distdir/" |
105 |
+ build --jobs=$(makeopts_jobs) $(bazel-get-flags) |
106 |
+ |
107 |
+ test --verbose_failures --verbose_test_summary |
108 |
+ test --spawn_strategy=standalone --genrule_strategy=standalone |
109 |
+ EOF |
110 |
+} |
111 |
+ |
112 |
+src_compile() { |
113 |
+ export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) --host_javabase=@local_jdk//:jdk" |
114 |
+ VERBOSE=yes ./compile.sh || die |
115 |
+ |
116 |
+ ./scripts/generate_bash_completion.sh \ |
117 |
+ --bazel=output/bazel \ |
118 |
+ --output=bazel-complete.bash \ |
119 |
+ --prepend=scripts/bazel-complete-header.bash \ |
120 |
+ --prepend=scripts/bazel-complete-template.bash |
121 |
+} |
122 |
+ |
123 |
+src_test() { |
124 |
+ output/bazel test \ |
125 |
+ --verbose_failures \ |
126 |
+ --spawn_strategy=standalone \ |
127 |
+ --genrule_strategy=standalone \ |
128 |
+ --verbose_test_summary \ |
129 |
+ examples/cpp:hello-success_test || die |
130 |
+ output/bazel shutdown |
131 |
+} |
132 |
+ |
133 |
+src_install() { |
134 |
+ dobin output/bazel |
135 |
+ newbashcomp bazel-complete.bash ${PN} |
136 |
+ bashcomp_alias ${PN} ibazel |
137 |
+ insinto /usr/share/zsh/site-functions |
138 |
+ doins scripts/zsh_completion/_bazel |
139 |
+ |
140 |
+ if use examples; then |
141 |
+ docinto examples |
142 |
+ dodoc -r examples/* |
143 |
+ docompress -x /usr/share/doc/${PF}/examples |
144 |
+ fi |
145 |
+ # could really build tools but I don't know which ones |
146 |
+ # are actually used |
147 |
+ if use tools; then |
148 |
+ docinto tools |
149 |
+ dodoc -r tools/* |
150 |
+ docompress -x /usr/share/doc/${PF}/tools |
151 |
+ fi |
152 |
+} |