summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-29 14:26:52 +0000
committerSam James <sam@gentoo.org>2022-06-29 14:29:47 +0000
commit0be276b1530c1e98974b9bc0986ad57f882cb6bf (patch)
treed7cbcb405938ca984e0150bbd65d642ee543669e /eclass
parentprofiles/features/prefix/standalone: fix GCC sed for 12+ (diff)
downloadgentoo-0be276b1530c1e98974b9bc0986ad57f882cb6bf.tar.gz
gentoo-0be276b1530c1e98974b9bc0986ad57f882cb6bf.tar.bz2
gentoo-0be276b1530c1e98974b9bc0986ad57f882cb6bf.zip
autotools.eclass: import ::prefix automake has_version edgecase logic
During bootstrapping, an automake may not exist yet (which is sometimes fine if an ebuild doesn't actually need it). Make the check non-fatal for prefix where automake doesn't yet exist inside BROOT. We could probably do a bit better here and inspect PATH but this is the logic which has been used in ::prefix for a looong time, and it's currently breaking bootstraps, so let's get it fixed. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/autotools.eclass14
1 files changed, 12 insertions, 2 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index d6c5b7f0ec0d..025a93d207a4 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -525,8 +525,18 @@ autotools_env_setup() {
esac
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[*]}"
+
+ # During bootstrap in prefix there might be no automake merged yet
+ # due to --nodeps, but still available somewhere in PATH.
+ # For example, ncurses needs local libtool on aix and hpux.
+ # So, make the check non-fatal where automake doesn't yet
+ # exist within BROOT. (We could possibly do better here
+ # and inspect PATH, but I'm not sure there's much point.)
+ if use prefix && [[ ! -x "${BROOT}"/usr/bin/automake ]] ; then
+ [[ ${WANT_AUTOMAKE} == "latest" ]] && ewarn "Ignoring missing automake during Prefix bootstrap! Tried ${_LATEST_AUTOMAKE[*]}"
+ else
+ [[ ${WANT_AUTOMAKE} == "latest" ]] && die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}"
+ fi
fi
[[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.71
}