dev-util/bazel: make build respect MAKEOPTS
authorJason Zaman <perfinion@gentoo.org>
Mon, 21 May 2018 17:57:24 +0000 (10:57 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 21 May 2018 18:10:44 +0000 (11:10 -0700)
Bug: https://bugs.gentoo.org/652776
Package-Manager: Portage-2.3.38, Repoman-2.3.9

dev-util/bazel/bazel-0.10.1.ebuild
dev-util/bazel/bazel-0.13.0.ebuild
dev-util/bazel/bazel-0.7.0.ebuild

index 5a238c7915f2038f9d773f073e53302f4b535dde..bb11e0536accffa9941e2a38bdfd0694c8f44654 100644 (file)
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit bash-completion-r1 java-pkg-2
+inherit bash-completion-r1 java-pkg-2 multiprocessing
 
 DESCRIPTION="Fast and correct automated build system"
 HOMEPAGE="http://bazel.io/"
@@ -36,11 +36,12 @@ src_compile() {
        # R: /proc/24939/setgroups
        # C: /usr/lib/systemd/systemd
        addpredict /proc
+       export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs)"
        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
+               "--jobs=$(makeopts_jobs)" > "${T}/bazelrc" || die
        output/bazel --bazelrc="${T}/bazelrc" build scripts:bazel-complete.bash || die
        mv bazel-bin/scripts/bazel-complete.bash output/ || die
 }
index 5a238c7915f2038f9d773f073e53302f4b535dde..bb11e0536accffa9941e2a38bdfd0694c8f44654 100644 (file)
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit bash-completion-r1 java-pkg-2
+inherit bash-completion-r1 java-pkg-2 multiprocessing
 
 DESCRIPTION="Fast and correct automated build system"
 HOMEPAGE="http://bazel.io/"
@@ -36,11 +36,12 @@ src_compile() {
        # R: /proc/24939/setgroups
        # C: /usr/lib/systemd/systemd
        addpredict /proc
+       export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs)"
        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
+               "--jobs=$(makeopts_jobs)" > "${T}/bazelrc" || die
        output/bazel --bazelrc="${T}/bazelrc" build scripts:bazel-complete.bash || die
        mv bazel-bin/scripts/bazel-complete.bash output/ || die
 }
index 4684dc2d3b48e31445d8c9da2d6a39e9eef6fb28..0a5efcceeb51d15b9b2360adeb47208beaeb0ac9 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
 
-inherit bash-completion-r1 java-pkg-2
+inherit bash-completion-r1 java-pkg-2 multiprocessing
 
 DESCRIPTION="Fast and correct automated build system"
 HOMEPAGE="http://bazel.io/"
@@ -36,11 +36,12 @@ src_compile() {
        # R: /proc/24939/setgroups
        # C: /usr/lib/systemd/systemd
        addpredict /proc
+       export EXTRA_BAZEL_ARGS="--jobs=$(makeopts_jobs)"
        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
+               "--jobs=$(makeopts_jobs)" > "${T}/bazelrc" || die
        output/bazel --bazelrc="${T}/bazelrc" build scripts:bazel-complete.bash || die
        mv bazel-bin/scripts/bazel-complete.bash output/ || die
 }