commit:     79148ea1d49db199aa0f9f1886632b7abca4cc25
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  5 07:49:43 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon Jul  5 07:49:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79148ea1

dev-lang/erlang: run configure in serial

./configure does not take much time. And is certainly orders
of magnitude slower than the build itself. Let's keep predictable
parallelism by running sub-configure serially.

Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/790563
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/erlang/erlang-24.0.2.ebuild                       |  1 +
 dev-lang/erlang/files/erlang-24.0.2-serial-configure.patch | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/dev-lang/erlang/erlang-24.0.2.ebuild 
b/dev-lang/erlang/erlang-24.0.2.ebuild
index 96bfbca4106..e329ba63eea 100644
--- a/dev-lang/erlang/erlang-24.0.2.ebuild
+++ b/dev-lang/erlang/erlang-24.0.2.ebuild
@@ -46,6 +46,7 @@ S="${WORKDIR}/otp-OTP-${PV}"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-22.0-dont-ignore-LDFLAGS.patch
+       "${FILESDIR}"/${PN}-24.0.2-serial-configure.patch
 )
 
 SITEFILE=50"${PN}"-gentoo.el

diff --git a/dev-lang/erlang/files/erlang-24.0.2-serial-configure.patch 
b/dev-lang/erlang/files/erlang-24.0.2-serial-configure.patch
new file mode 100644
index 00000000000..5068be153ea
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-24.0.2-serial-configure.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/790563
+--- a/configure
++++ b/configure
+@@ -355,7 +355,7 @@ for app_dir in $app_dirs; do
+       echo ""
+     elif test $app_dir != erts; then
+       echo $cmd_str >./configure.result.command
+-      eval $cmd_str 1>./configure.result.stdout 2>./configure.result.stderr 
|| echo "fatal" > "./configure.result.failed" &
++      eval $cmd_str 1>./configure.result.stdout 2>./configure.result.stderr 
|| echo "fatal" > "./configure.result.failed"
+     else
+       # ERTS configure gets to use stdout/stderr; the others are printed when 
done...
+       echo "=== Running configure in $ERL_TOP/erts ==="

Reply via email to