Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bazel/
Date: Sat, 17 Feb 2018 19:18:05
Message-Id: 1518895063.524b128b840fcfd36dab6be7fac7b42a091557b5.zmedico@gentoo
1 commit: 524b128b840fcfd36dab6be7fac7b42a091557b5
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 17 19:15:27 2018 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 17 19:17:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=524b128b
7
8 dev-util/bazel: version bump to 0.10.1
9
10 Closes: https://bugs.gentoo.org/646050
11 Package-Manager: Portage-2.3.24, Repoman-2.3.6
12
13 dev-util/bazel/Manifest | 1 +
14 dev-util/bazel/bazel-0.10.1.ebuild | 78 ++++++++++++++++++++++++++++++++++++++
15 2 files changed, 79 insertions(+)
16
17 diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest
18 index fbcd61ffe67..d9990a08374 100644
19 --- a/dev-util/bazel/Manifest
20 +++ b/dev-util/bazel/Manifest
21 @@ -1,3 +1,4 @@
22 +DIST bazel-0.10.1-dist.zip 92973197 BLAKE2B a1d681407e2c72a57b3dcbb5e2afc49e59670be65da3d7d038dc3b8593bc0ab5b4a06c8dd8fc8a617a92eef2fc26a049b6de9a1eab0d05f31efb2fbeeb9ce711 SHA512 1894c951fd39a084011f89dd0d458e182525c2bfd6c80da071865e981e21a8c2b8363530ab53af18e6deae4a488744d6d2b7a5a4acf04715c2e26560a01df707
23 DIST bazel-0.4.5-dist.zip 101505017 BLAKE2B dcdad3e6aaf115486f90c8f04110c475513aa7e8080cc971de2f7aa8ba4d7b6b6239886892cce8d947a96f0bad4e4d43ca8c720c0d76b1cc7bfe7b8079cd5293 SHA512 bc70e379a9f6f962440d05d4a706959461690e28a943833e17d6e2b7e3cd7dd2344f329f72d833ec5104334a71764fde195e50b09a582ae7c1b89bd62822943b
24 DIST bazel-0.5.2-dist.zip 100003640 BLAKE2B b7adf3ac805001fa9950296ff6d6390a2a7c6e925abe83c278c34913e6d0927e51ac7ed55035b5275c8e9e2e814f5df338b3593db722be2bf789891024e6223e SHA512 2580b41a09d8e7766bf06ed55bca06f542a13fecf050b105829811d8a95e8f9a4395ebc8d3ce6436ecec8faab704afd608d71e2d368e51c668df3f766ca6e9c1
25 DIST bazel-0.5.4-dist.zip 100430507 BLAKE2B 11694bdc8acabe6958ffcf8a4befe084a0682e3b06935e0a2c8257c3e150cd686d31071b43c04a5a0972fe1bb940baaf68143147d353f115af350357de17ac85 SHA512 f13c003d1d27213e5a723878f488f02a77f1549b6c377db007d412e3db558ab1dfc4e7434c0a7634959d7f5447e71200bda7f99c16fe70661ea81e610c8089f5
26
27 diff --git a/dev-util/bazel/bazel-0.10.1.ebuild b/dev-util/bazel/bazel-0.10.1.ebuild
28 new file mode 100644
29 index 00000000000..5a238c7915f
30 --- /dev/null
31 +++ b/dev-util/bazel/bazel-0.10.1.ebuild
32 @@ -0,0 +1,78 @@
33 +# Copyright 1999-2018 Gentoo Foundation
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
39 +
40 +DESCRIPTION="Fast and correct automated build system"
41 +HOMEPAGE="http://bazel.io/"
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 zsh-completion"
48 +# strip corrupts the bazel binary
49 +RESTRICT="strip"
50 +RDEPEND="virtual/jdk:1.8"
51 +DEPEND="${RDEPEND}
52 + app-arch/unzip
53 + app-arch/zip"
54 +
55 +S="${WORKDIR}"
56 +
57 +pkg_setup() {
58 + echo ${PATH} | grep -q ccache && \
59 + ewarn "${PN} usually fails to compile with ccache, you have been warned"
60 + java-pkg-2_pkg_setup
61 +}
62 +
63 +src_compile() {
64 + # F: fopen_wr
65 + # S: deny
66 + # P: /proc/self/setgroups
67 + # A: /proc/self/setgroups
68 + # R: /proc/24939/setgroups
69 + # C: /usr/lib/systemd/systemd
70 + addpredict /proc
71 + VERBOSE=yes ./compile.sh || die
72 + # Use standalone strategy to deactivate the bazel sandbox, since it
73 + # conflicts with FEATURES=sandbox.
74 + echo "build --verbose_failures --spawn_strategy=standalone --genrule_strategy=standalone" \
75 + > "${T}/bazelrc" || die
76 + output/bazel --bazelrc="${T}/bazelrc" build scripts:bazel-complete.bash || die
77 + mv bazel-bin/scripts/bazel-complete.bash output/ || die
78 +}
79 +
80 +src_test() {
81 + output/bazel test \
82 + --verbose_failures \
83 + --spawn_strategy=standalone \
84 + --genrule_strategy=standalone \
85 + --verbose_test_summary \
86 + examples/cpp:hello-success_test || die
87 +}
88 +
89 +src_install() {
90 + output/bazel shutdown
91 + dobin output/bazel
92 + newbashcomp output/bazel-complete.bash ${PN}
93 + bashcomp_alias ${PN} ibazel
94 + if use zsh-completion ; then
95 + insinto /usr/share/zsh/site-functions
96 + doins scripts/zsh_completion/_bazel
97 + fi
98 + if use examples; then
99 + docinto examples
100 + dodoc -r examples/*
101 + docompress -x /usr/share/doc/${PF}/examples
102 + fi
103 + # could really build tools but I don't know which ones
104 + # are actually used
105 + if use tools; then
106 + docinto tools
107 + dodoc -r tools/*
108 + docompress -x /usr/share/doc/${PF}/tools
109 + fi
110 +}