Gentoo Archives: gentoo-commits

From: Hans de Graaff <graaff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ruby/
Date: Sat, 01 May 2021 06:12:20
Message-Id: 1619849530.81f9f39f05b60fc25865aa4d5b103cd90701f4e6.graaff@gentoo
1 commit: 81f9f39f05b60fc25865aa4d5b103cd90701f4e6
2 Author: Hans de Graaff <graaff <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 1 06:12:03 2021 +0000
4 Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org>
5 CommitDate: Sat May 1 06:12:10 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81f9f39f
7
8 dev-lang/ruby: fix build during bootstrap
9
10 Fix building during a bootstrap situation where no ruby is present yet.
11 Normally ruby uses a pregenerated miniprelude.c file for a miniruby that
12 is functional enough to assist the build process. Since we now patch
13 gem_prelude.rb in f6aa0fc2dcee195658e697026e607dbb91bfd31d the Makefile
14 tries to regenerate miniprelude.c, but this first requires a working
15 ruby, leading to build failures.
16
17 By resetting the date of the patched gem_prelude.c we can avoid this.
18 The gem_predule.rb patch is intended to be used in an installed ruby and
19 does not affect the miniruby usage.
20
21 Closes: https://bugs.gentoo.org/787137
22 Package-Manager: Portage-3.0.18, Repoman-3.0.2
23 Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>
24
25 dev-lang/ruby/ruby-2.7.3-r1.ebuild | 4 ++++
26 1 file changed, 4 insertions(+)
27
28 diff --git a/dev-lang/ruby/ruby-2.7.3-r1.ebuild b/dev-lang/ruby/ruby-2.7.3-r1.ebuild
29 index 682230b1d99..26d8593d705 100644
30 --- a/dev-lang/ruby/ruby-2.7.3-r1.ebuild
31 +++ b/dev-lang/ruby/ruby-2.7.3-r1.ebuild
32 @@ -67,6 +67,10 @@ src_prepare() {
33 # compiles ruby in a non-standard way, may be dropped
34 eapply "${FILESDIR}"/2.7/{002,003,010}*.patch
35
36 + # Reset time on patched gem_prelude.rb to avoid the need for a base
37 + # ruby during bootstrapping, bug 787137
38 + touch -t 202001010000 gem_prelude.rb || die
39 +
40 einfo "Unbundling gems..."
41 cd "$S"
42 # Remove bundled gems that we will install via PDEPEND, bug