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