Skip to content

Commit 8e4a967

Browse files
committedMar 20, 2020
Default to module support on and disable on 9.2-
Defaulting to module support off meant master would build a binary that doesn't open up appropriate packages, which is supported by the last 11 JRuby releases. This change defaults to on so that the default build will add those flags. It disables module flags if the JRuby version installing the gem is 9.2.0 or lower.
1 parent 4ffda5a commit 8e4a967

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
PREFIX = notspecified
33
BINDIR = $(PREFIX)/bin
44
JRUBY_VERSION = notspecified
5-
JRUBY_MODULE =
5+
JRUBY_MODULE = 1
66
INSTALLDIR = $(PREFIX)/lib/ruby/shared/rubygems/defaults
77
INSTALLDIR9000 = $(PREFIX)/lib/ruby/stdlib/rubygems/defaults
88
OLDINSTALLDIR = $(PREFIX)/lib/ruby/site_ruby/1.8/rubygems/defaults

‎extconf.rb

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
mf = mf.gsub(/^JRUBY_VERSION\s*=.*$/, "JRUBY_VERSION = #{JRUBY_VERSION}")
55

66
# Launcher will use .module_opts file if present, otherwise hardcoded add-opens for this module.
7-
# Pre-9.2.1: ALL-UNNAMED because no name was exported
8-
# 9.2.1 and higher: org.jruby.dist
9-
if JRUBY_VERSION !~ /(^1)|(^9\.[01])|(^9\.2\.0\.0)/
10-
mf = mf.gsub(/^JRUBY_MODULE\s*=.*$/, "JRUBY_MODULE = 1")
7+
# Module options are only supported on JRuby 9.2.1 or higher.
8+
if JRUBY_VERSION =~ /(^1)|(^9\.[01])|(^9\.2\.0\.0)/
9+
mf = mf.gsub(/^JRUBY_MODULE\s*=.*1$/, "JRUBY_MODULE =")
1110
end
1211
puts mf
1312
File.open('Makefile', 'wb') {|f| f << mf}

0 commit comments

Comments
 (0)
Please sign in to comment.