freebsd-ports/lang/ruby25/files/patch-tool_mkconfig.rb
Sunpoet Po-Chuan Hsieh 97a290bd3f Update to 2.5.3
- Move USES upward
- Remove no-op MLINKS and create symlinks for manpages
- Sort INSTALLED_SCRIPTS
- Regenerate patch files with makepatch:

Changes:	https://www.ruby-lang.org/en/news/2018/10/18/ruby-2-5-3-released/
		https://www.ruby-lang.org/en/news/2018/10/17/ruby-2-5-2-released/
PR:		232431
Submitted by:	Yasuhiro KIMURA <yasu@utahime.org>
Security:	afc60484-0652-440e-b01a-5ef814747f06
MFH:		2018Q4
2018-10-20 14:57:33 +00:00

14 lines
555 B
Ruby

--- tool/mkconfig.rb.orig 2017-05-02 12:45:07 UTC
+++ tool/mkconfig.rb
@@ -157,8 +157,9 @@ def vars.expand(val, config = self)
val.replace(newval) unless newval == val
val
end
-prefix = vars.expand(vars["prefix"] ||= "")
-rubyarchdir = vars.expand(vars["rubyarchdir"] ||= "")
+prefix = vars.expand(vars["rubyarchdir"])
+major, minor, *rest = RUBY_VERSION.split('.')
+rubyarchdir = "/lib/ruby/#{major}.#{minor}/#{arch}"
relative_archdir = rubyarchdir.rindex(prefix, 0) ? rubyarchdir[prefix.size..-1] : rubyarchdir
puts %[\
# encoding: ascii-8bit