Skip to content

Commit 8309e03

Browse files
committed
Patch rake-compiler-dock to handle two-digit patch versions.
I'll upstream this once I know it works.
1 parent fba8664 commit 8309e03

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

Dockerfile.jruby

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ RUN bash -c " \
5050
rbenv shell \$v && \
5151
gem install rake-compiler -v1.2.5 && \
5252
cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.5 && \
53-
patch -p1 < /home/rubyuser/patches/rake-compiler-1.2.5/*.patch ; \
53+
for patch in /home/rubyuser/patches/rake-compiler-1.2.5/*.patch ; do \
54+
patch -p1 < \$patch ; \
55+
done ; \
5456
done \
5557
"
5658

Dockerfile.mri.erb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ RUN bash -c " \
9090
rbenv shell \$v && \
9191
gem install rake-compiler -v1.2.5 && \
9292
cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.5 && \
93-
patch -p1 < /home/rubyuser/patches/rake-compiler-1.2.5/*.patch ; \
93+
for patch in /home/rubyuser/patches/rake-compiler-1.2.5/*.patch ; do \
94+
patch -p1 < \$patch ; \
95+
done ; \
9496
done \
9597
"
9698

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 7118fed4335415c5d8cc3e13d40747bf628f0d72 Mon Sep 17 00:00:00 2001
2+
From: Mike Dalessio <[email protected]>
3+
Date: Sun, 29 Dec 2024 11:38:32 -0500
4+
Subject: [PATCH] fix: rake task 'update-config' supports double-digit version
5+
segments
6+
7+
Previously the regexp was
8+
9+
(\d.\d.\d.)
10+
11+
which does not work for versions with a double-digit segment like
12+
2.6.10. Now the regexp is
13+
14+
(\d+\.\d+\.\d+\d)
15+
---
16+
tasks/bin/cross-ruby.rake | 2 +-
17+
1 file changed, 1 insertion(+), 1 deletion(-)
18+
19+
diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
20+
index 8317a2a3..d37ab97b 100644
21+
--- a/tasks/bin/cross-ruby.rake
22+
+++ b/tasks/bin/cross-ruby.rake
23+
@@ -154,7 +154,7 @@
24+
files = Dir.glob("#{USER_HOME}/ruby/*/*/**/rbconfig.rb").sort
25+
26+
files.each do |rbconfig|
27+
- version, platform = rbconfig.match(/.*-(\d.\d.\d).*\/([-\w]+)\/rbconfig/)[1,2]
28+
+ version, platform = rbconfig.match(/.*-(\d+\.\d+\.\d+).*\/([-\w]+)\/rbconfig/)[1,2]
29+
platforms = [platform]
30+
31+
# fake alternate (binary compatible) i386-mswin32-60 platform
32+
--
33+
2.47.1
34+

0 commit comments

Comments
 (0)