1 |
commit: 0be276b1530c1e98974b9bc0986ad57f882cb6bf |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 29 14:26:52 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 29 14:29:47 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0be276b1 |
7 |
|
8 |
autotools.eclass: import ::prefix automake has_version edgecase logic |
9 |
|
10 |
During bootstrapping, an automake may not exist yet (which is |
11 |
sometimes fine if an ebuild doesn't actually need it). |
12 |
|
13 |
Make the check non-fatal for prefix where automake doesn't |
14 |
yet exist inside BROOT. We could probably do a bit better |
15 |
here and inspect PATH but this is the logic which |
16 |
has been used in ::prefix for a looong time, and it's |
17 |
currently breaking bootstraps, so let's get it fixed. |
18 |
|
19 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
20 |
|
21 |
eclass/autotools.eclass | 14 ++++++++++++-- |
22 |
1 file changed, 12 insertions(+), 2 deletions(-) |
23 |
|
24 |
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass |
25 |
index d6c5b7f0ec0d..025a93d207a4 100644 |
26 |
--- a/eclass/autotools.eclass |
27 |
+++ b/eclass/autotools.eclass |
28 |
@@ -525,8 +525,18 @@ autotools_env_setup() { |
29 |
esac |
30 |
has_version ${hv_args} "=sys-devel/automake-${pv}*" && export WANT_AUTOMAKE="${pv}" && break |
31 |
done |
32 |
- [[ ${WANT_AUTOMAKE} == "latest" ]] && \ |
33 |
- die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}" |
34 |
+ |
35 |
+ # During bootstrap in prefix there might be no automake merged yet |
36 |
+ # due to --nodeps, but still available somewhere in PATH. |
37 |
+ # For example, ncurses needs local libtool on aix and hpux. |
38 |
+ # So, make the check non-fatal where automake doesn't yet |
39 |
+ # exist within BROOT. (We could possibly do better here |
40 |
+ # and inspect PATH, but I'm not sure there's much point.) |
41 |
+ if use prefix && [[ ! -x "${BROOT}"/usr/bin/automake ]] ; then |
42 |
+ [[ ${WANT_AUTOMAKE} == "latest" ]] && ewarn "Ignoring missing automake during Prefix bootstrap! Tried ${_LATEST_AUTOMAKE[*]}" |
43 |
+ else |
44 |
+ [[ ${WANT_AUTOMAKE} == "latest" ]] && die "Cannot find the latest automake! Tried ${_LATEST_AUTOMAKE[*]}" |
45 |
+ fi |
46 |
fi |
47 |
[[ ${WANT_AUTOCONF} == "latest" ]] && export WANT_AUTOCONF=2.71 |
48 |
} |