summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Michael <fedora.dm0@gmail.com>2020-12-25 21:04:16 -0500
committerMatt Turner <mattst88@gentoo.org>2021-01-18 16:09:52 -0500
commit817f07236de8779110a64c4c626a49caec8d5f52 (patch)
tree882e949a0d36d0a33b495a20d8cf89e15e4cc8ef
parentapp-misc/geneweb: do not use incoming camlp5-8.0 (diff)
downloadgentoo-817f07236de8779110a64c4c626a49caec8d5f52.tar.gz
gentoo-817f07236de8779110a64c4c626a49caec8d5f52.tar.bz2
gentoo-817f07236de8779110a64c4c626a49caec8d5f52.zip
vala.eclass: make has_version aware of ROOT for EAPI 7
The vala dependencies are declared in BDEPEND since EAPI 7 so that the valac command is natively executable. With no arguments, the has_version function would look for a cross-compiled vala package in the target ROOT and always fail. Signed-off-by: David Michael <fedora.dm0@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/18813 Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r--eclass/vala.eclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index 52899f163dcf..88c5231286ab 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -102,7 +102,7 @@ vala_best_api_version() {
u=$(_vala_use_depend)
for v in $(vala_api_versions); do
- has_version "dev-lang/vala:${v}${u}" && echo "${v}" && return
+ has_version $([[ $EAPI == [1-6] ]] || echo -b) "dev-lang/vala:${v}${u}" && echo "${v}" && return
done
}
@@ -136,7 +136,7 @@ vala_src_prepare() {
fi
if [[ ${version} ]]; then
- has_version "dev-lang/vala:${version}" || die "No installed vala:${version}"
+ has_version $([[ $EAPI == [1-6] ]] || echo -b) "dev-lang/vala:${version}" || die "No installed vala:${version}"
else
version=$(vala_best_api_version)
[[ ${version} ]] || die "No installed vala in $(vala_depend)"