commit: f001546b5b91fa9b192aa02cff75fcdbc3d9f34c
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 7 18:05:04 2023 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Dec 7 18:05:04 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f001546b
sys-devel/automake: fix parallel builds
Fix from upstream for building automake in parallel.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
Signed-off-by: Mike Frysinger <vapier <AT> chromium.org>
sys-devel/automake/automake-1.16.5-r1.ebuild | 1 +
.../files/automake-1.16.5-parallel-build.patch | 54 ++++++++++++++++++++++
2 files changed, 55 insertions(+)
diff --git a/sys-devel/automake/automake-1.16.5-r1.ebuild
b/sys-devel/automake/automake-1.16.5-r1.ebuild
index 63a8ed1a1c80..0e6ed8d0b1dc 100644
--- a/sys-devel/automake/automake-1.16.5-r1.ebuild
+++ b/sys-devel/automake/automake-1.16.5-r1.ebuild
@@ -57,6 +57,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.16.5-fix-instmany-python.sh-test.patch
"${FILESDIR}"/${PN}-1.16.5-fix-py-compile-basedir.sh-test.patch
"${FILESDIR}"/${PN}-1.16.5-apostrophe-in-tests.patch
+ "${FILESDIR}"/${PN}-1.16.5-parallel-build.patch
)
pkg_setup() {
diff --git a/sys-devel/automake/files/automake-1.16.5-parallel-build.patch
b/sys-devel/automake/files/automake-1.16.5-parallel-build.patch
new file mode 100644
index 000000000000..985e86aeb32c
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.16.5-parallel-build.patch
@@ -0,0 +1,54 @@
+https://git.savannah.gnu.org/cgit/automake.git/commit/?h=5d02285845acfc20a4900a471c0e7c5e2ff390a0
+
+From 5d02285845acfc20a4900a471c0e7c5e2ff390a0 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <[email protected]>
+Date: Tue, 18 Jan 2022 04:47:09 -0500
+Subject: [PATCH] build: fix race in parallel builds
+
+As reported by Hongxu Jia:
+> The automake-$(APIVERSION) is a hardlink of automake, if it is
+> created later than update_mans executing, there is a failure
+> [snip]
+> |: && mkdir -p doc && ./pre-inst-env /usr/bin/env perl
../automake-1.16.1/doc/help2man --output=doc/aclocal-1.16.1 aclocal-1.16
+> |help2man: can't get `--help' info from aclocal-1.16
+> |Try `--no-discard-stderr' if option outputs to stderr
+> Makefile:3693: recipe for target 'doc/aclocal-1.16.1' failed
+> [snip]
+>
+> The automake_script is required by update_mans and update_mans
+> invokes automake-$(APIVERSION) rather than automake to generate
+> doc, so we should assign `automake-$(APIVERSION)' to automake_script.
+>
+> The same reason to tweak aclocal_script.
+
+However, rather than update the _script variables to point to the
+hardlinked copies of the programs, we can have the help2man steps
+run the existing scripts directly. This makes the relationship a
+bit more explicit and avoids implicit dependencies on names.
+
+* doc/local.mk: Pass $(aclocal_script) and $(automake_script) to
$(update_mans).
+* THANKS: Add Hongxu Jia.
+---
+ THANKS | 1 +
+ doc/local.mk | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/doc/local.mk b/doc/local.mk
+index a29363d2d71b..06c78823a574 100644
+--- a/doc/local.mk
++++ b/doc/local.mk
+@@ -46,9 +46,9 @@ update_mans = \
+ && echo ".so man1/$$f-$(APIVERSION).1" > $@
+
+ %D%/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm
+- $(update_mans) aclocal-$(APIVERSION)
++ $(update_mans) $(aclocal_script)
+ %D%/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm
+- $(update_mans) automake-$(APIVERSION)
++ $(update_mans) $(automake_script)
+
+ ## This target is not invoked as a dependency of anything. It exists
+ ## merely to make checking the links in automake.texi (that is,
+--
+2.43.0
+