Philip Martin <philip.mar...@wandisco.com> writes: > James McCoy <james...@debian.org> writes: > >> Updated patch attached. > > I tried Ruby 1.8.7 and 2.1.2 and the regression tests pass so I > committed this in r1596882. Thanks!
I think our Ruby installation stuff is a bit broken. We have --with-ruby-sitedir=SITEDIR install Ruby bindings in SITEDIR (default is same as ruby's one) Ruby, at least since 1.8.7, has both sitedir and vendordir. vendordir is the system installation, typically under /usr, while sitedir is the local stuff, typically under /usr/local. I have Debian/wheezy 1.8.7 ruby and it has sitedir /usr/local/share/ruby/site_ruby sitelibdir /usr/local/lib/site_ruby/1.8 sitearchdir /usr/local/lib/site_ruby/1.8/x86_64-linux vendordir /usr/lib/ruby/vendor_ruby vendorlibdir /usr/lib/ruby/vendor_ruby/1.8 vendorarchdir /usr/lib/ruby/vendor_ruby/1.8/x86_64-linux I have Debian/wheezy 1.9.1/1.9.3 ruby and it has sitedir /usr/local/share/ruby/site_ruby sitelibdir /usr/local/lib/site_ruby/1.9.1 sitearchdir /usr/local/lib/site_ruby/1.9.1/x86_64-linux vendordir /usr/lib/ruby/vendor_ruby vendorlibdir /usr/lib/ruby/vendor_ruby/1.9.1 vendorarchdir /usr/lib/ruby/vendor_ruby/1.9.1/x86_64-linux Note that libdir is a prefix of sitedir for both vendor and site. That allows us to generate installation paths when --with-ruby-sitedir is used: AC_MSG_CHECKING([where to install Ruby extensions]) AC_CACHE_VAL([svn_cv_ruby_sitedir_archsuffix],[ svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ $SED -e "s,^$rbconfig_sitedir,,"`" ]) SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" AC_MSG_RESULT([$SWIG_RB_SITE_ARCH_DIR]) However that breaks down when libdir is not a prefix of sitedir. I have Debian/sid 2.1.2 ruby and it has sitedir /usr/local/lib/site_ruby sitelibdir /usr/local/lib/site_ruby/2.1.0 sitearchdir /usr/local/lib/x86_64-linux-gnu/site_ruby vendordir /usr/lib/ruby/vendor_ruby vendorlibdir /usr/lib/ruby/vendor_ruby/2.1.0 vendorarchdir /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.1.0 I have Fedora/20 2.0.0 and it has sitedir /usr/local/share/ruby/site_ruby sitelibdir /usr/local/share/ruby/site_ruby/ sitearchdir /usr/local/lib64/ruby/site_ruby vendordir /usr/share/ruby/vendor_ruby vendorlibdir /usr/share/ruby/vendor_ruby/ vendorarchdir /usr/lib64/ruby/vendor_ruby On these systems we get the wrong installation directories. If I use ./configure --with-ruby-sitedir=/home/pm/ruby the 1.8.7 system gives a reasonable looking: checking where to install Ruby extensions... /home/pm/ruby/1.8/x86_64-linux while the 2.1.2 system gives a very odd looking: checking where to install Ruby extensions... /home/pm/ruby/usr/local/lib/x86_64-linux-gnu/site_ruby I'm not sure whether the different layout is due to the more modern Ruby or the more modern OS. -- Philip Martin | Subversion Committer WANdisco // *Non-Stop Data*