Gentoo Archives: gentoo-commits

From: Jason Zaman <perfinion@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bazel/
Date: Mon, 30 Apr 2018 18:55:57
Message-Id: 1525114530.b611b77bf34fe62440d3f2eb7815a2bed42f9d46.perfinion@gentoo
1 commit: b611b77bf34fe62440d3f2eb7815a2bed42f9d46
2 Author: Jason Zaman <perfinion <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 30 18:54:56 2018 +0000
4 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 30 18:55:30 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b611b77b
7
8 dev-util/bazel: bump 0.13.0
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 dev-util/bazel/Manifest | 1 +
13 dev-util/bazel/bazel-0.13.0.ebuild | 78 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 79 insertions(+)
15
16 diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest
17 index bfd2fa34136..f54010da7c1 100644
18 --- a/dev-util/bazel/Manifest
19 +++ b/dev-util/bazel/Manifest
20 @@ -1,2 +1,3 @@
21 DIST bazel-0.10.1-dist.zip 92973197 BLAKE2B a1d681407e2c72a57b3dcbb5e2afc49e59670be65da3d7d038dc3b8593bc0ab5b4a06c8dd8fc8a617a92eef2fc26a049b6de9a1eab0d05f31efb2fbeeb9ce711 SHA512 1894c951fd39a084011f89dd0d458e182525c2bfd6c80da071865e981e21a8c2b8363530ab53af18e6deae4a488744d6d2b7a5a4acf04715c2e26560a01df707
22 +DIST bazel-0.13.0-dist.zip 90105262 BLAKE2B cb065025524123babef187bac2e1f54f43645d08cb1282a5fe8f8c8b090e595570646072e2380836e2c43403f7953f97321becc24b743d7b9ab43ad208cf2c2d SHA512 3c128e551cff1b685250a68892ca3e1ad6be8b152ee2b8eb527c94adbb8fd50c70e703a363bb938916275030ddb14d756c14e4dc238e7a7b40289c700c5d53c7
23 DIST bazel-0.7.0-dist.zip 84669893 BLAKE2B 2f8bbe3a48224a797bdebdaad8f7c403c8b0232ada5eee8c8619f241e9670dda311b9280f48b5e2013079f959891d94f55aee2af0dfae9fc4f6a486663fa245d SHA512 039ab6a04fd4422bd14503187e6cc0d07301723b3ecae906606fa12ccea72190d82237899c103c1adfdf05dc8672887790780ddfb4cce87cd590adbde3d3f6d4
24
25 diff --git a/dev-util/bazel/bazel-0.13.0.ebuild b/dev-util/bazel/bazel-0.13.0.ebuild
26 new file mode 100644
27 index 00000000000..5a238c7915f
28 --- /dev/null
29 +++ b/dev-util/bazel/bazel-0.13.0.ebuild
30 @@ -0,0 +1,78 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +
36 +inherit bash-completion-r1 java-pkg-2
37 +
38 +DESCRIPTION="Fast and correct automated build system"
39 +HOMEPAGE="http://bazel.io/"
40 +SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
41 +
42 +LICENSE="Apache-2.0"
43 +SLOT="0"
44 +KEYWORDS="~amd64"
45 +IUSE="examples tools zsh-completion"
46 +# strip corrupts the bazel binary
47 +RESTRICT="strip"
48 +RDEPEND="virtual/jdk:1.8"
49 +DEPEND="${RDEPEND}
50 + app-arch/unzip
51 + app-arch/zip"
52 +
53 +S="${WORKDIR}"
54 +
55 +pkg_setup() {
56 + echo ${PATH} | grep -q ccache && \
57 + ewarn "${PN} usually fails to compile with ccache, you have been warned"
58 + java-pkg-2_pkg_setup
59 +}
60 +
61 +src_compile() {
62 + # F: fopen_wr
63 + # S: deny
64 + # P: /proc/self/setgroups
65 + # A: /proc/self/setgroups
66 + # R: /proc/24939/setgroups
67 + # C: /usr/lib/systemd/systemd
68 + addpredict /proc
69 + VERBOSE=yes ./compile.sh || die
70 + # Use standalone strategy to deactivate the bazel sandbox, since it
71 + # conflicts with FEATURES=sandbox.
72 + echo "build --verbose_failures --spawn_strategy=standalone --genrule_strategy=standalone" \
73 + > "${T}/bazelrc" || die
74 + output/bazel --bazelrc="${T}/bazelrc" build scripts:bazel-complete.bash || die
75 + mv bazel-bin/scripts/bazel-complete.bash output/ || die
76 +}
77 +
78 +src_test() {
79 + output/bazel test \
80 + --verbose_failures \
81 + --spawn_strategy=standalone \
82 + --genrule_strategy=standalone \
83 + --verbose_test_summary \
84 + examples/cpp:hello-success_test || die
85 +}
86 +
87 +src_install() {
88 + output/bazel shutdown
89 + dobin output/bazel
90 + newbashcomp output/bazel-complete.bash ${PN}
91 + bashcomp_alias ${PN} ibazel
92 + if use zsh-completion ; then
93 + insinto /usr/share/zsh/site-functions
94 + doins scripts/zsh_completion/_bazel
95 + fi
96 + if use examples; then
97 + docinto examples
98 + dodoc -r examples/*
99 + docompress -x /usr/share/doc/${PF}/examples
100 + fi
101 + # could really build tools but I don't know which ones
102 + # are actually used
103 + if use tools; then
104 + docinto tools
105 + dodoc -r tools/*
106 + docompress -x /usr/share/doc/${PF}/tools
107 + fi
108 +}