Skip to content

Commit

Permalink
vala.eclass: make has_version aware of ROOT for EAPI 7
Browse files Browse the repository at this point in the history
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 <[email protected]>
Closes: gentoo#18813
Signed-off-by: Matt Turner <[email protected]>
  • Loading branch information
dm0- authored and mattst88 committed Jan 18, 2021
1 parent fe6f990 commit 817f072
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eclass/vala.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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)"
Expand Down

0 comments on commit 817f072

Please sign in to comment.