commit:     e86df55fc08f6fb8ececc9001e9f25187b8d3eff
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 10 08:16:19 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 10 08:20:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e86df55f

dev-lang/ruby: filter out -Oline from MAKEOPTS, GNUMAKEFLAGS

Sorry for another revbump in such a short period (although maybe it's not so
bad given very few people will have upgraded yet).

Newer Portage sets GNUMAKEFLAGS="--output-sync=line" if MAKEOPTS is unset. It 
looks
like this sometimes leads to Ruby installing no files (or just docs). Filter it 
out
and just parse out --jobs and --load-average from MAKEOPTS.

This is behind at least two reports on Bugzilla and possibly another on the
forums.

Closes: https://bugs.gentoo.org/728424
Closes: https://bugs.gentoo.org/900929
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ruby/{ruby-2.7.8-r2.ebuild => ruby-2.7.8-r3.ebuild} | 11 ++++++++++-
 dev-lang/ruby/{ruby-3.0.6-r1.ebuild => ruby-3.0.6-r2.ebuild} | 11 ++++++++++-
 dev-lang/ruby/{ruby-3.1.4-r1.ebuild => ruby-3.1.4-r2.ebuild} | 11 ++++++++++-
 dev-lang/ruby/{ruby-3.2.2-r1.ebuild => ruby-3.2.2-r2.ebuild} | 11 ++++++++++-
 4 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/dev-lang/ruby/ruby-2.7.8-r2.ebuild 
b/dev-lang/ruby/ruby-2.7.8-r3.ebuild
similarity index 93%
rename from dev-lang/ruby/ruby-2.7.8-r2.ebuild
rename to dev-lang/ruby/ruby-2.7.8-r3.ebuild
index 5e7cad20cb1f..1f208b667274 100644
--- a/dev-lang/ruby/ruby-2.7.8-r2.ebuild
+++ b/dev-lang/ruby/ruby-2.7.8-r3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit autotools flag-o-matic
+inherit autotools flag-o-matic multiprocessing
 
 MY_P="${PN}-$(ver_cut 1-3)"
 S=${WORKDIR}/${MY_P}
@@ -116,6 +116,15 @@ src_prepare() {
 src_configure() {
        local modules= myconf=
 
+       # Ruby's build system does interesting things with MAKEOPTS and doesn't
+       # handle MAKEOPTS="-Oline" or similar well. Just filter it all out
+       # and use -j/-l parsed out from the original MAKEOPTS, then use that.
+       # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing
+       # is set by the user in MAKEOPTS. See bug #900929 and bug #728424.
+       local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+       unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS
+       export MAKEOPTS="${makeopts_tmp}"
+
        # -fomit-frame-pointer makes ruby segfault, see bug #150413.
        filter-flags -fomit-frame-pointer
        # In many places aliasing rules are broken; play it safe

diff --git a/dev-lang/ruby/ruby-3.0.6-r1.ebuild 
b/dev-lang/ruby/ruby-3.0.6-r2.ebuild
similarity index 93%
rename from dev-lang/ruby/ruby-3.0.6-r1.ebuild
rename to dev-lang/ruby/ruby-3.0.6-r2.ebuild
index afed530e4063..c060d4060381 100644
--- a/dev-lang/ruby/ruby-3.0.6-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.0.6-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit autotools flag-o-matic
+inherit autotools flag-o-matic multiprocessing
 
 MY_P="${PN}-$(ver_cut 1-3)"
 S=${WORKDIR}/${MY_P}
@@ -111,6 +111,15 @@ src_prepare() {
 src_configure() {
        local modules= myconf=
 
+       # Ruby's build system does interesting things with MAKEOPTS and doesn't
+       # handle MAKEOPTS="-Oline" or similar well. Just filter it all out
+       # and use -j/-l parsed out from the original MAKEOPTS, then use that.
+       # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing
+       # is set by the user in MAKEOPTS. See bug #900929 and bug #728424.
+       local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+       unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS
+       export MAKEOPTS="${makeopts_tmp}"
+
        # -fomit-frame-pointer makes ruby segfault, see bug #150413.
        filter-flags -fomit-frame-pointer
        # In many places aliasing rules are broken; play it safe

diff --git a/dev-lang/ruby/ruby-3.1.4-r1.ebuild 
b/dev-lang/ruby/ruby-3.1.4-r2.ebuild
similarity index 93%
rename from dev-lang/ruby/ruby-3.1.4-r1.ebuild
rename to dev-lang/ruby/ruby-3.1.4-r2.ebuild
index 06af384a59d1..555c25a75baa 100644
--- a/dev-lang/ruby/ruby-3.1.4-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.1.4-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit autotools flag-o-matic
+inherit autotools flag-o-matic multiprocessing
 
 MY_P="${PN}-$(ver_cut 1-3)"
 S=${WORKDIR}/${MY_P}
@@ -116,6 +116,15 @@ src_prepare() {
 src_configure() {
        local modules="win32,win32ole" myconf=
 
+       # Ruby's build system does interesting things with MAKEOPTS and doesn't
+       # handle MAKEOPTS="-Oline" or similar well. Just filter it all out
+       # and use -j/-l parsed out from the original MAKEOPTS, then use that.
+       # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing
+       # is set by the user in MAKEOPTS. See bug #900929 and bug #728424.
+       local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+       unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS
+       export MAKEOPTS="${makeopts_tmp}"
+
        # -fomit-frame-pointer makes ruby segfault, see bug #150413.
        filter-flags -fomit-frame-pointer
        # In many places aliasing rules are broken; play it safe

diff --git a/dev-lang/ruby/ruby-3.2.2-r1.ebuild 
b/dev-lang/ruby/ruby-3.2.2-r2.ebuild
similarity index 94%
rename from dev-lang/ruby/ruby-3.2.2-r1.ebuild
rename to dev-lang/ruby/ruby-3.2.2-r2.ebuild
index eb755d2a1589..68155cce8bdb 100644
--- a/dev-lang/ruby/ruby-3.2.2-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.2.2-r2.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit autotools flag-o-matic
+inherit autotools flag-o-matic multiprocessing
 
 MY_P="${PN}-$(ver_cut 1-3)"
 S=${WORKDIR}/${MY_P}
@@ -131,6 +131,15 @@ src_prepare() {
 src_configure() {
        local modules="win32,win32ole" myconf=
 
+       # Ruby's build system does interesting things with MAKEOPTS and doesn't
+       # handle MAKEOPTS="-Oline" or similar well. Just filter it all out
+       # and use -j/-l parsed out from the original MAKEOPTS, then use that.
+       # Newer Portage sets this option by default in GNUMAKEFLAGS if nothing
+       # is set by the user in MAKEOPTS. See bug #900929 and bug #728424.
+       local makeopts_tmp="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+       unset MAKEOPTS MAKEFLAGS GNUMAKEFLAGS
+       export MAKEOPTS="${makeopts_tmp}"
+
        # -fomit-frame-pointer makes ruby segfault, see bug #150413.
        filter-flags -fomit-frame-pointer
        # In many places aliasing rules are broken; play it safe

Reply via email to