From ed0e36e7b664078c7b7f2c346ea377f7537385f8 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Wed, 16 May 2018 14:13:08 +0200 Subject: eclass/autotools.eclass: Use proper arguments to has_version checking for automake in /. Bug: https://bugs.gentoo.org/655326 --- eclass/autotools.eclass | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'eclass') diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index ea85e73a8042..2bc70f7b3c00 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -442,10 +442,17 @@ autotools_env_setup() { if [[ ${WANT_AUTOMAKE} == "latest" ]]; then local pv for pv in ${_LATEST_AUTOMAKE[@]/#*:} ; do - # has_version respects ROOT, but in this case, we don't want it to, - # thus "ROOT=/" prefix; # Break on first hit to respect _LATEST_AUTOMAKE order. - ROOT=/ has_version "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break + local hv_args="" + case ${EAPI:-0} in + 5|6) + hv_args="--host-root" + ;; + 7) + hv_args="-b" + ;; + esac + ROOT=/ has_version ${hv_args} "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break done [[ ${WANT_AUTOMAKE} == "latest" ]] && \ die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}" -- cgit v1.2.3-65-gdbad