1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit bash-completion-r1 java-pkg-2
9 DESCRIPTION="Fast and correct automated build system"
10 HOMEPAGE="http://bazel.io/"
11 SRC_URI="https://github.com/bazelbuild/bazel/archive/${PV}.tar.gz -> ${P}.tar.gz"
16 IUSE="examples tools zsh-completion"
17 # strip corrupts the bazel binary
19 DEPEND="virtual/jdk:1.8"
23 echo ${PATH} | grep -q ccache && \
24 ewarn "${PN} usually fails to compile with ccache, you have been warned"
29 VERBOSE=yes ./compile.sh || die
30 # Use standalone strategy to deactivate the bazel sandbox, since it
31 # conflicts with FEATURES=sandbox.
32 echo "build --verbose_failures --spawn_strategy=standalone --genrule_strategy=standalone" \
33 > "${T}/bazelrc" || die
34 output/bazel --bazelrc="${T}/bazelrc" build //scripts:bazel-complete.bash || die
40 --spawn_strategy=standalone \
41 --genrule_strategy=standalone \
42 --verbose_test_summary \
43 examples/cpp:hello-success_test || die
48 newbashcomp bazel-bin/scripts/bazel-complete.bash ${PN}
49 if use zsh-completion ; then
50 insinto /usr/share/zsh/site-functions
51 doins scripts/zsh_completion/_bazel
56 docompress -x /usr/share/doc/${PF}/examples
58 # could really build tools but I don't know which ones
63 docompress -x /usr/share/doc/${PF}/tools