1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit bash-completion-r1 java-pkg-2
8 DESCRIPTION="Fast and correct automated build system"
9 HOMEPAGE="http://bazel.io/"
10 SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
15 IUSE="examples tools zsh-completion"
16 # strip corrupts the bazel binary
18 RDEPEND="virtual/jdk:1.8"
26 echo ${PATH} | grep -q ccache && \
27 ewarn "${PN} usually fails to compile with ccache, you have been warned"
34 # P: /proc/self/setgroups
35 # A: /proc/self/setgroups
36 # R: /proc/24939/setgroups
37 # C: /usr/lib/systemd/systemd
39 VERBOSE=yes ./compile.sh || die
40 # Use standalone strategy to deactivate the bazel sandbox, since it
41 # conflicts with FEATURES=sandbox.
42 echo "build --verbose_failures --spawn_strategy=standalone --genrule_strategy=standalone" \
43 > "${T}/bazelrc" || die
44 output/bazel --bazelrc="${T}/bazelrc" build scripts:bazel-complete.bash || die
45 mv bazel-bin/scripts/bazel-complete.bash output/ || die
51 --spawn_strategy=standalone \
52 --genrule_strategy=standalone \
53 --verbose_test_summary \
54 examples/cpp:hello-success_test || die
60 newbashcomp output/bazel-complete.bash ${PN}
61 if use zsh-completion ; then
62 insinto /usr/share/zsh/site-functions
63 doins scripts/zsh_completion/_bazel
68 docompress -x /usr/share/doc/${PF}/examples
70 # could really build tools but I don't know which ones
75 docompress -x /usr/share/doc/${PF}/tools