summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin39161 -> 39146 bytes
-rw-r--r--eclass/bazel.eclass11
2 files changed, 9 insertions, 2 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 74587d0ff2b4..3306f9d6fd7e 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/bazel.eclass b/eclass/bazel.eclass
index 8897ea175a84..9d4dfd881d2b 100644
--- a/eclass/bazel.eclass
+++ b/eclass/bazel.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: bazel.eclass
@@ -27,6 +27,13 @@ if [[ ${CATEGORY}/${PN} != "dev-util/bazel" ]]; then
BDEPEND=">=dev-util/bazel-0.20"
fi
+# @ECLASS_VARIABLE: BAZEL_BINARY
+# @DESCRIPTION:
+# The program to invoke for bazel. Defaults to `bazel`. Useful if you have
+# multiple bazel installations on your machine that differ in verson suffix,
+# e.g., `bazel-5`, `bazel-6`.
+BAZEL_BINARY="${BAZEL_BINARY:-bazel}"
+
# @FUNCTION: bazel_get_flags
# @DESCRIPTION:
# Obtain and print the bazel flags for target and host *FLAGS.
@@ -138,7 +145,7 @@ ebazel() {
output_base="${output_base%/}-bazel-base"
mkdir -p "${output_base}" || die
- set -- bazel --bazelrc="${T}/bazelrc" --output_base="${output_base}" ${@}
+ set -- "${BAZEL_BINARY}" --bazelrc="${T}/bazelrc" --output_base="${output_base}" ${@}
echo "${*}" >&2
"${@}" || die "ebazel failed"
}