commit:     387601ab22030d12bfa9cb819c6c88f10c28965e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 14 17:31:42 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 14 17:31:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=387601ab

bootstrap-prefix.sh: try m4 1.4.19 (for glibc-2.34 fix)

m4 1.4.19 has a glibc-2.34 fix we need to fix bootstraps w/ newer
glibc on host.

We don't apply older patches to this version but ew should fall back to 1.4.18
if the build fails anyway (the patches don't seem to be needed now, at least
the gnulib-ish one).

Signed-off-by: Sam James <sam <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index a9b5635c4c..6bb4e5e439 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -913,13 +913,15 @@ bootstrap_gnu() {
                # doesn't match
                sed -i -e '/_GL_WARN_ON_USE (gets/d' lib/stdio.in.h lib/stdio.h
 
-               # macOS 10.13 have an issue with %n, which crashes m4
-               efetch 
"http://rsync.prefix.bitzolder.nl/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch";
 || return 1
-               patch -p1 < "${DISTDIR}"/m4-1.4.18-darwin17-printf-n.patch || 
return 1
-
-               # Bug 715880
-               efetch http://dev.gentoo.org/~heroxbd/m4-1.4.18-glibc228.patch 
|| return 1
-               patch -p1 < "${DISTDIR}"/m4-1.4.18-glibc228.patch || return 1
+               if [[ ${PV} == "1.4.18" ]] ; then
+                       # macOS 10.13 have an issue with %n, which crashes m4
+                       efetch 
"http://rsync.prefix.bitzolder.nl/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch";
 || return 1
+                       patch -p1 < 
"${DISTDIR}"/m4-1.4.18-darwin17-printf-n.patch || return 1
+
+                       # Bug 715880
+                       efetch 
http://dev.gentoo.org/~heroxbd/m4-1.4.18-glibc228.patch || return 1
+                       patch -p1 < "${DISTDIR}"/m4-1.4.18-glibc228.patch || 
return 1
+               fi
        fi
 
        fix_config_sub
@@ -1413,7 +1415,7 @@ bootstrap_bison() {
 }
 
 bootstrap_m4() {
-       bootstrap_gnu m4 1.4.18 # version is patched, so beware
+       bootstrap_gnu m4 1.4.19 || bootstrap_gnu m4 1.4.18 # version is 
patched, so beware
 }
 
 bootstrap_gzip() {

Reply via email to