Skip to content
Browse files

merge revision(s) 38776: [Backport #7172]

	* tool/mkconfig.rb: use configured libdir value to fix
	  --enable-load-relative on systems where libdir is not default value,
	  overridden in config.site files.  [ruby-core:47267] [Bug #6903]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@38828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 00decfd commit ae92565e04071d63867cedd05f48b1ff39664534 @unak unak committed Jan 15, 2013
Showing with 11 additions and 2 deletions.
  1. +6 −0 ChangeLog
  2. +4 −1 tool/mkconfig.rb
  3. +1 −1 version.h
View
6 ChangeLog
@@ -1,3 +1,9 @@
+Tue Jan 15 16:03:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * tool/mkconfig.rb: use configured libdir value to fix
+ --enable-load-relative on systems where libdir is not default value,
+ overridden in config.site files. [ruby-core:47267] [Bug #6903]
+
Tue Jan 15 15:55:09 2013 Eric Hodel <drbrain@segment7.net>
* object.c (Init_Object): Added RDoc location pointers for
View
5 tool/mkconfig.rb
@@ -39,6 +39,7 @@ module RbConfig
universal = /universal.*darwin/ =~ arch
v_fast = []
v_others = []
+v_runtime = {}
vars = {}
continued_name = nil
continued_line = nil
@@ -114,6 +115,8 @@ module RbConfig
if name == "configure_args"
val.gsub!(/ +(?!-)/, "=") if win32
val.gsub!(/--with-out-ext/, "--without-ext")
+ elsif name == "libdir"
+ v_runtime[:libdir] = val[/\$(\(exec_prefix\)|\{exec_prefix\})\/(.*)/, 2]
end
val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump
case name
@@ -145,7 +148,7 @@ module RbConfig
drive = File::PATH_SEPARATOR == ';'
-prefix = "/lib/ruby/#{version}/#{arch}"
+prefix = "/#{v_runtime[:libdir] || 'lib'}/ruby/#{version}/#{arch}"
print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"
print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n"
print <<'ARCH' if universal
View
2 version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 368
+#define RUBY_PATCHLEVEL 369
#define RUBY_RELEASE_DATE "2013-01-15"
#define RUBY_RELEASE_YEAR 2013

0 comments on commit ae92565

Please sign in to comment.
Something went wrong with that request. Please try again.