[前][次][番号順一覧][スレッド一覧]

ruby-changes:26724

From: nobu <ko1@a...>
Date: Fri, 11 Jan 2013 16:58:24 +0900 (JST)
Subject: [ruby-changes:26724] nobu:r38776 (trunk): mkconfig.rb: use configured libdir value

nobu	2013-01-11 16:56:32 +0900 (Fri, 11 Jan 2013)

  New Revision: 38776

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38776

  Log:
    mkconfig.rb: use configured libdir value
    
    * 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]

  Modified files:
    trunk/ChangeLog
    trunk/tool/mkconfig.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38775)
+++ ChangeLog	(revision 38776)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jan 11 16:56:29 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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]
+
 Fri Jan 11 11:59:32 2013  NARUSE, Yui  <naruse@r...>
 
 	* string.c (dispose_string): use rb_str_free for freeing string in
Index: tool/mkconfig.rb
===================================================================
--- tool/mkconfig.rb	(revision 38775)
+++ tool/mkconfig.rb	(revision 38776)
@@ -39,6 +39,7 @@ win32 = /mswin/ =~ arch https://github.com/ruby/ruby/blob/trunk/tool/mkconfig.rb#L39
 universal = /universal.*darwin/ =~ arch
 v_fast = []
 v_others = []
+v_runtime = {}
 vars = {}
 continued_name = nil
 continued_line = nil
@@ -115,6 +116,8 @@ File.foreach "config.status" do |line| https://github.com/ruby/ruby/blob/trunk/tool/mkconfig.rb#L116
     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
@@ -146,7 +149,7 @@ end https://github.com/ruby/ruby/blob/trunk/tool/mkconfig.rb#L149
 
 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]