Sophie

Sophie

distrib > Mandriva > 2011.0 > i586 > media > main-updates-src > by-pkgid > bf620c91985e267171cf8bd756c50d83 > files > 7

ruby-1.8.7.p334-4.1.src.rpm

diff -p -up configure.in.lib64 configure.in
--- configure.in.lib64	2008-07-12 17:06:09.000000000 +0200
+++ configure.in	2009-02-26 11:06:31.000000000 +0100
@@ -1706,7 +1706,7 @@ case "$target_os" in
     rubyw_install_name="$RUBYW_INSTALL_NAME"
     ;;
 esac
-RUBY_LIB_PREFIX=`eval echo \\"${libdir}/ruby\\"`
+RUBY_LIB_PREFIX=`eval echo \\"${prefix}/lib/ruby\\"`
 
 AC_ARG_WITH(sitedir,
 	    [  --with-sitedir=DIR      site libraries in DIR [[LIBDIR/ruby/site_ruby]]],
diff -p -up ext/tk/extconf.rb.lib64 ext/tk/extconf.rb
--- ext/tk/extconf.rb.lib64	2008-04-09 16:15:24.000000000 +0200
+++ ext/tk/extconf.rb	2009-02-26 11:06:31.000000000 +0100
@@ -40,6 +40,11 @@ unless is_win32
   have_library("m", "log") 
 end
 
+$lib = "lib"
+if RUBY_PLATFORM =~ /(x86_64|powerpc64)-linux/
+   $lib = "lib64"
+end
+
 tk_idir,  tk_ldir  = dir_config("tk")
 tcl_idir, tcl_ldir = dir_config("tcl")
 x11_idir, x11_ldir = dir_config("X11")
@@ -95,7 +100,7 @@ def check_tcltk_version(version)
 end
 
 def find_tcl(tcllib, stubs, version, *opt_paths)
-  default_paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"]
+  default_paths = ["/usr/local/#{$lib}", "/usr/pkg/lib", "/usr/#{$lib}"]
   default_paths << "/Tcl/lib"  # default for ActiveTcl
 
   if (paths = opt_paths.compact).empty?
@@ -138,7 +143,7 @@ def find_tcl(tcllib, stubs, version, *op
 end
 
 def find_tk(tklib, stubs, version, *opt_paths)
-  default_paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"]
+  default_paths = ["/usr/local/#{$lib}", "/usr/pkg/lib", "/usr/#{$lib}"]
   default_paths << "/Tcl/lib"  # default for ActiveTcl
 
   if (paths = opt_paths.compact).empty?
@@ -182,7 +187,7 @@ end
 
 def find_X11(*opt_paths)
   default_paths = 
-    [ "/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib" ]
+    [ "/usr/X11/#{$lib}", "/usr/#{$lib}/X11", "/usr/X11R6/#{$lib}", "/usr/openwin/lib" ]
   paths = opt_paths.compact.concat(default_paths)
   st = find_library("X11", "XOpenDisplay", *paths)
   unless st
diff -p -up mkconfig.rb.lib64 mkconfig.rb
--- mkconfig.rb.lib64	2008-06-06 12:39:57.000000000 +0200
+++ mkconfig.rb	2009-02-26 14:06:43.000000000 +0100
@@ -141,8 +141,8 @@ print(*v_fast)
 print(*v_others)
 print <<EOS
   CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
-  CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
-  CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
+  CONFIG["rubylibdir"] = "$(prefix)/lib/ruby/$(ruby_version)"
+  CONFIG["archdir"] = "$(prefix)/lib/ruby/$(ruby_version)/$(arch)"
   CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
   CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
   CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"