Skip to content

Commit

Permalink
dev-util/bazel: version bump to 0.5.4
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/627254
Package-Manager: Portage-2.3.12, Repoman-2.3.3
  • Loading branch information
zmedico committed Oct 25, 2017
1 parent dee8a21 commit 85def18
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-util/bazel/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST bazel-0.4.5-dist.zip 101505017 SHA256 2b737be42678900470ae9e48c975ac5b2296d9ae23c007bf118350dbe7c0552b SHA512 bc70e379a9f6f962440d05d4a706959461690e28a943833e17d6e2b7e3cd7dd2344f329f72d833ec5104334a71764fde195e50b09a582ae7c1b89bd62822943b WHIRLPOOL d236eb387373f4b1cba32084a8b282f2bc75e6a0a714f18229cf5064230ad912bd879df2e7ebcc30da18538958ded4a1b8e59c27c0716aa6b677690b10a0356e
DIST bazel-0.5.2-dist.zip 100003640 SHA256 2418c619bdd44257a170b85b9d2ecb75def29e751b725e27186468ada2e009ea SHA512 2580b41a09d8e7766bf06ed55bca06f542a13fecf050b105829811d8a95e8f9a4395ebc8d3ce6436ecec8faab704afd608d71e2d368e51c668df3f766ca6e9c1 WHIRLPOOL 8ea9522bbd38ec5d9de4eebae0586c71ab2cf2f782430e0e0bd5fc84c8d431df7f758627ad9f0aeb57445c1c3d4b3de34702e2e2a6a73aea246519543d8ff118
DIST bazel-0.5.4-dist.zip 100430507 SHA256 2157b05309614d6af0e4bbc6065987aede590822634a0522161f3af5d647abc9 SHA512 f13c003d1d27213e5a723878f488f02a77f1549b6c377db007d412e3db558ab1dfc4e7434c0a7634959d7f5447e71200bda7f99c16fe70661ea81e610c8089f5 WHIRLPOOL 667d78e2cba875cbe31bb49869881ebc45de9f03eb7a503458ba7a5821ca2cead2489a562a2928f5b701b85f6c9cb652dc5201ecc2804d6b57d9d61c25517b82
77 changes: 77 additions & 0 deletions dev-util/bazel/bazel-0.5.4.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit bash-completion-r1 java-pkg-2

DESCRIPTION="Fast and correct automated build system"
HOMEPAGE="http://bazel.io/"
SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="examples tools zsh-completion"
# strip corrupts the bazel binary
RESTRICT="strip"
RDEPEND="virtual/jdk:1.8"
DEPEND="${RDEPEND}
app-arch/unzip
app-arch/zip"

S="${WORKDIR}"

pkg_setup() {
echo ${PATH} | grep -q ccache && \
ewarn "${PN} usually fails to compile with ccache, you have been warned"
java-pkg-2_pkg_setup
}

src_compile() {
# F: fopen_wr
# S: deny
# P: /proc/self/setgroups
# A: /proc/self/setgroups
# R: /proc/24939/setgroups
# C: /usr/lib/systemd/systemd
addpredict /proc
VERBOSE=yes ./compile.sh || die
# Use standalone strategy to deactivate the bazel sandbox, since it
# conflicts with FEATURES=sandbox.
echo "build --verbose_failures --spawn_strategy=standalone --genrule_strategy=standalone" \
> "${T}/bazelrc" || die
output/bazel --bazelrc="${T}/bazelrc" build scripts:bazel-complete.bash || die
mv bazel-bin/scripts/bazel-complete.bash output/ || die
}

src_test() {
output/bazel test \
--verbose_failures \
--spawn_strategy=standalone \
--genrule_strategy=standalone \
--verbose_test_summary \
examples/cpp:hello-success_test || die
}

src_install() {
output/bazel shutdown
dobin output/bazel
newbashcomp output/bazel-complete.bash ${PN}
if use zsh-completion ; then
insinto /usr/share/zsh/site-functions
doins scripts/zsh_completion/_bazel
fi
if use examples; then
docinto examples
dodoc -r examples/*
docompress -x /usr/share/doc/${PF}/examples
fi
# could really build tools but I don't know which ones
# are actually used
if use tools; then
docinto tools
dodoc -r tools/*
docompress -x /usr/share/doc/${PF}/tools
fi
}

0 comments on commit 85def18

Please sign in to comment.