Permalink
Browse files

fix 1.9.3 --enable-load-relative

  • Loading branch information...
1 parent 0d2015b commit 7e6c2c47129f2f0dc21d1beb6165a00052508ff8 @mpapis mpapis committed Aug 26, 2012
Showing with 28 additions and 2 deletions.
  1. +24 −0 patches/ruby/1.9.3/ruby-multilib.patch
  2. +4 −2 scripts/functions/manage/ruby
@@ -0,0 +1,24 @@
+--- a/configure.in
++++ b/configure.in
+@@ -2362,7 +2362,8 @@
+ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
+ if test "$load_relative" = yes; then
+- LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../lib'"
++ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
++ LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../lib/${lt_multi_os_dir}'"
+ LIBRUBY_RELATIVE=yes
+ fi
+ ],
+--- a/ruby.c
++++ b/ruby.c
+@@ -414,6 +414,9 @@
+ if (p - libpath > 3 && !(STRCASECMP(p - 4, "/bin") && strcmp(p - 4, "/lib"))) {
+ p -= 4;
+ *p = 0;
++ } else if (p - libpath > 5 && !(STRCASECMP(p - 4, "/bin") && strcmp(p - 6, "/lib64"))) {
++ p -= 6;
++ *p = 0;
+ }
+ }
+ #if !VARIABLE_LIBPATH
@@ -74,9 +74,11 @@ ruby_install()
;;
esac
- if [[ " ${rvm_configure_flags[*]}" =~ " --enable-load-relative" ]]
+ # TODO: needed <= 1.9.3-p194, confirm with http://bugs.ruby-lang.org/issues/6903
+ if
+ [[ " ${rvm_configure_flags[*]}" =~ " --enable-load-relative" ]]
then
- rvm_configure_flags="${rvm_configure_flags:-} --libdir=$rvm_ruby_home/lib"
+ rvm_patch_names="ruby-multilib ${rvm_patch_names:-}"
fi
case ${rvm_ruby_string} in

0 comments on commit 7e6c2c4

Please sign in to comment.