dev-lang/ruby: fix build during bootstrap

Fix building during a bootstrap situation where no ruby is present yet.
Normally ruby uses a pregenerated miniprelude.c file for a miniruby that
is functional enough to assist the build process. Since we now patch
gem_prelude.rb in f6aa0fc2dc the Makefile
tries to regenerate miniprelude.c, but this first requires a working
ruby, leading to build failures.

By resetting the date of the patched gem_prelude.c we can avoid this.
The gem_predule.rb patch is intended to be used in an installed ruby and
does not affect the miniruby usage.

Closes: https://bugs.gentoo.org/787137
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
This commit is contained in:
Hans de Graaff
2021-05-01 08:12:03 +02:00
parent 3e8e6088c5
commit 81f9f39f05

View File

@@ -67,6 +67,10 @@ src_prepare() {
# compiles ruby in a non-standard way, may be dropped
eapply "${FILESDIR}"/2.7/{002,003,010}*.patch
# Reset time on patched gem_prelude.rb to avoid the need for a base
# ruby during bootstrapping, bug 787137
touch -t 202001010000 gem_prelude.rb || die
einfo "Unbundling gems..."
cd "$S"
# Remove bundled gems that we will install via PDEPEND, bug