35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
diff -ruN ruby-1.8.3.orig/mkconfig.rb ruby-1.8.3/mkconfig.rb
|
|
--- ruby-1.8.7/mkconfig.rb 2008-06-06 12:39:57.000000000 +0200
|
|
+++ ruby-1.8.7/mkconfig.rb 2010-06-21 11:17:13.839498249 +0200
|
|
@@ -39,6 +39,7 @@ vars = {}
|
|
has_version = false
|
|
continued_name = nil
|
|
continued_line = nil
|
|
+lib_64 = ''
|
|
File.foreach "config.status" do |line|
|
|
next if /^#/ =~ line
|
|
name = nil
|
|
@@ -96,13 +97,21 @@ File.foreach "config.status" do |line|
|
|
v_others << v
|
|
end
|
|
has_version = true if name == "MAJOR"
|
|
+
|
|
+ # If the target architecture is one of the following,
|
|
+ # ppc64 s390x sparc64 x86_64
|
|
+ # then use "lib64", not "lib" in prefix.
|
|
+ if name == "target_cpu" and (/64"$/ =~ val or val == '"s390x"')
|
|
+ lib_64 = '64'
|
|
+ end
|
|
end
|
|
# break if /^CEOF/
|
|
end
|
|
|
|
drive = File::PATH_SEPARATOR == ';'
|
|
|
|
-prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
|
|
+prefix = "/lib#{lib_64}/ruby/" \
|
|
+ + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM
|
|
print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n"
|
|
print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n"
|
|
print " CONFIG = {}\n"
|