Skip to content

Commit

Permalink
Merge pull request #82 from rake-compiler/flavorjones-ruby-3.2-support
Browse files Browse the repository at this point in the history
[draft] ruby 3.2 support
  • Loading branch information
flavorjones authored Dec 16, 2022
2 parents df0048f + d32cea7 commit 6ec116c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile.mri.erb
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ RUN bash -c " \
axrubies = if platform =~ /x64-mingw-ucrt/
[
# Rubyinstaller-3.1.0+ is platform x64-mingw-ucrt
["3.2.0-rc1", "3.1.0", true],
["3.1.0", "3.1.0", true],
]
elsif platform =~ /x64-mingw32/
Expand All @@ -180,7 +181,7 @@ else
# Build xruby versions prior ruby2_keywords in parallel using ruby-2.5
["2.6.0:2.5.0:2.4.0", "2.5.9", false],
# Build xruby versions with ruby2_keywords in parallel using ruby-3.x
["3.1.0:3.0.0:2.7.0", "3.1.0", true],
["3.2.0-rc1:3.1.0:3.0.0:2.7.0", "3.1.0", true],
]
end

Expand Down Expand Up @@ -273,6 +274,6 @@ RUN echo "source /etc/profile.d/rcd-env.sh" >> /etc/rubybashrc
# Install sudoers configuration
COPY build/sudoers /etc/sudoers.d/rake-compiler-dock

ENV RUBY_CC_VERSION 3.1.0:3.0.0:2.7.0:2.6.0:2.5.0:2.4.0
ENV RUBY_CC_VERSION 3.2.0:3.1.0:3.0.0:2.7.0:2.6.0:2.5.0:2.4.0

CMD bash
19 changes: 19 additions & 0 deletions build/patches2/rake-compiler-1.1.6/0005-make-miniruby.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
fix(temp): rake-compiler explicitly builds miniruby first

See https://bugs.ruby-lang.org/issues/19239 for the upstream bug
report.

TODO: This patch can be removed if that's fixed in a 3.2.0 final release.

diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
index 8317a2a..d9bfe4c 100644
--- a/tasks/bin/cross-ruby.rake
+++ b/tasks/bin/cross-ruby.rake
@@ -129,6 +129,7 @@

# make
file "#{build_dir}/ruby.exe" => ["#{build_dir}/Makefile"] do |t|
+ sh "#{MAKE} miniruby", chdir: File.dirname(t.prerequisites.first)
sh MAKE, chdir: File.dirname(t.prerequisites.first)
end

0 comments on commit 6ec116c

Please sign in to comment.