1 |
commit: a1b1f5702499c5ca0d7a758d2189d7f60d870975 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 11 00:47:24 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 11 00:48:37 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1b1f570 |
7 |
|
8 |
dev-util/bazel: Bump to version 0.29.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.75, Repoman-2.3.17 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
dev-util/bazel/Manifest | 1 + |
14 |
dev-util/bazel/bazel-0.29.1.ebuild | 109 +++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 110 insertions(+) |
16 |
|
17 |
diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest |
18 |
index bc96aabab66..c80c930700b 100644 |
19 |
--- a/dev-util/bazel/Manifest |
20 |
+++ b/dev-util/bazel/Manifest |
21 |
@@ -5,3 +5,4 @@ DIST bazel-0.26.1-dist.zip 244633948 BLAKE2B 667078bda6e52f696127b7a4914ec52ab67 |
22 |
DIST bazel-0.27.0-dist.zip 247946763 BLAKE2B f061793de89144c77bd42de56c495e8b3399ac1892bdd2b0e210102ea1c2835a848432b2964ddcc6ebe77aa580efa378d46afad1faa6dec0831666f201a6dd74 SHA512 f5c6a0c789eb55790479ff839f7f959e7d0e46e5f14b5cdcd720e4dc2c36122345c9dcd6bfa803f88fb5264553a3d63ae0c8e4c7b9779bfc65183e2aaee5a666 |
23 |
DIST bazel-0.27.2-dist.zip 247948037 BLAKE2B ee3dafbb104f434080ad803cb40585e36a8c816eddac3d1a680752dd4ac65d588f1d5f4bb759dad0f59e9f6d7aad0ea5b54cd050d75a5434ee6ef079d8127641 SHA512 5fd7c2af2123424d3e5e4c9216de10d12ce604798f4831800c8d68cfd9bcf1133f4db9a947f0ee16db1a1513be17340ab8e36fba994a016d98c74ad5e026b4ab |
24 |
DIST bazel-0.28.1-dist.zip 256641169 BLAKE2B 489dfb1a27f83ff244cd05c11ec206689c12319a48f000379277073a108a79ad2dff61ed159efcbb1405531114ccb2d749e974004f969623cd4e9470166609f0 SHA512 640d3a9644436379e989d5993b5de9f2dc14d651a9f444c8795853989fdded7a62d71ab7cfa491d2aaf6402020c4931c8dc190d4dae63727b172ccb48ed55931 |
25 |
+DIST bazel-0.29.1-dist.zip 265744999 BLAKE2B 8495ab96947b02ec827cc2b5f542454e0d631eb077514c740d8be813495644f0be1020e706e2dbd321fa6f39af3060c4a7b2e68499201eaffc197704c1ecf760 SHA512 4da49e3f1ba681003afc2536d55954ed5a2c29de4a68e5a07f2627f3573d97bd6e244bc8a4f43c8951ecddd221041d87270ca9b7dd59ab16676306c9716f003d |
26 |
|
27 |
diff --git a/dev-util/bazel/bazel-0.29.1.ebuild b/dev-util/bazel/bazel-0.29.1.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..84224be1166 |
30 |
--- /dev/null |
31 |
+++ b/dev-util/bazel/bazel-0.29.1.ebuild |
32 |
@@ -0,0 +1,109 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
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 |
+# test fails with network-sandbox: An error occurred during the fetch of repository 'io_bazel_skydoc' (bug 690794) |
51 |
+RESTRICT="strip test" |
52 |
+RDEPEND=">=virtual/jdk-1.8:*" |
53 |
+DEPEND="${RDEPEND} |
54 |
+ app-arch/unzip |
55 |
+ app-arch/zip" |
56 |
+ |
57 |
+S="${WORKDIR}" |
58 |
+ |
59 |
+bazel-get-flags() { |
60 |
+ local i fs=() |
61 |
+ for i in ${CFLAGS}; do |
62 |
+ fs+=( "--copt=${i}" "--host_copt=${i}" ) |
63 |
+ done |
64 |
+ for i in ${CXXFLAGS}; do |
65 |
+ fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) |
66 |
+ done |
67 |
+ for i in ${CPPFLAGS}; do |
68 |
+ fs+=( "--copt=${i}" "--host_copt=${i}" ) |
69 |
+ fs+=( "--cxxopt=${i}" "--host_cxxopt=${i}" ) |
70 |
+ done |
71 |
+ for i in ${LDFLAGS}; do |
72 |
+ fs+=( "--linkopt=${i}" "--host_linkopt=${i}" ) |
73 |
+ done |
74 |
+ echo "${fs[*]}" |
75 |
+} |
76 |
+ |
77 |
+pkg_setup() { |
78 |
+ echo ${PATH} | grep -q ccache && \ |
79 |
+ ewarn "${PN} usually fails to compile with ccache, you have been warned" |
80 |
+ java-pkg-2_pkg_setup |
81 |
+} |
82 |
+ |
83 |
+src_unpack() { |
84 |
+ # Only unpack the main distfile |
85 |
+ unpack ${P}-dist.zip |
86 |
+} |
87 |
+ |
88 |
+src_prepare() { |
89 |
+ default |
90 |
+ |
91 |
+ # F: fopen_wr |
92 |
+ # S: deny |
93 |
+ # P: /proc/self/setgroups |
94 |
+ # A: /proc/self/setgroups |
95 |
+ # R: /proc/24939/setgroups |
96 |
+ # C: /usr/lib/systemd/systemd |
97 |
+ addpredict /proc |
98 |
+} |
99 |
+ |
100 |
+src_compile() { |
101 |
+ export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs) $(bazel-get-flags) --host_javabase=@local_jdk//:jdk" |
102 |
+ VERBOSE=yes ./compile.sh || die |
103 |
+ |
104 |
+ ./scripts/generate_bash_completion.sh \ |
105 |
+ --bazel=output/bazel \ |
106 |
+ --output=bazel-complete.bash \ |
107 |
+ --prepend=scripts/bazel-complete-header.bash \ |
108 |
+ --prepend=scripts/bazel-complete-template.bash |
109 |
+} |
110 |
+ |
111 |
+src_test() { |
112 |
+ output/bazel test \ |
113 |
+ --verbose_failures \ |
114 |
+ --spawn_strategy=standalone \ |
115 |
+ --genrule_strategy=standalone \ |
116 |
+ --verbose_test_summary \ |
117 |
+ examples/cpp:hello-success_test || die |
118 |
+ output/bazel shutdown |
119 |
+} |
120 |
+ |
121 |
+src_install() { |
122 |
+ dobin output/bazel |
123 |
+ newbashcomp bazel-complete.bash ${PN} |
124 |
+ bashcomp_alias ${PN} ibazel |
125 |
+ insinto /usr/share/zsh/site-functions |
126 |
+ doins scripts/zsh_completion/_bazel |
127 |
+ |
128 |
+ if use examples; then |
129 |
+ docinto examples |
130 |
+ dodoc -r examples/* |
131 |
+ docompress -x /usr/share/doc/${PF}/examples |
132 |
+ fi |
133 |
+ # could really build tools but I don't know which ones |
134 |
+ # are actually used |
135 |
+ if use tools; then |
136 |
+ docinto tools |
137 |
+ dodoc -r tools/* |
138 |
+ docompress -x /usr/share/doc/${PF}/tools |
139 |
+ docompress -x /usr/share/doc/${PF}/tools/build_defs/pkg/testdata |
140 |
+ fi |
141 |
+} |