On Tue, May 27, 2014 at 01:51:25PM -0700, Ben Reser wrote:
> On 3/31/14, 7:38 PM, James McCoy wrote:
> > Ruby 2.0 has a few new RbConfig variables, {ruby,vendor,site}archhdrdir.
> > At least rubyarchhdrdir needs to be used to correctly locate
> > ruby/config.h, since it is architecture specific.
> >
> > The attached patch adapts configure.ac to recognize ruby2.0/rdoc2.0 and
> > swig.m4 to use rubyarchhdrdir if it's available.
> >
> > There's some additional work that may be needed in
> > build/ac-macros/swig.m4 and tools/dev/unix-build/Makefile.svn, as
> > sitearchdir isn't necessarily a subset of sitedir for ruby >=2.0.
> >
> > $ ruby1.9.1 -rrbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]'
> > /usr/local/lib/site_ruby/1.9.1/x86_64-linux
> >
> > $ ruby1.9.1 -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]'
> > /usr/local/lib/site_ruby
> >
> > $ ruby2.0 -rrbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]'
> > /usr/local/lib/x86_64-linux-gnu/site_ruby
> >
> > $ ruby2.0 -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]'
> > /usr/local/lib/site_ruby
>
> Is this more of a Ruby 2.1 support than Ruby 2.0 support? Because OS X
> Mavericks (aka 10.9) shipped with Ruby 2.0 and I didn't need to make any
> modifications. Unfortunately, I've always found Ruby's version numbering to be
> confusing so I'm not sure if we're talking about the same things.
I'm talking about the release versions, not the API versions, so we
should be talking about the same things.
I wasn't as clear as I should have been in my initial email. The
functionality new to Ruby 2.x is simply the *archhdrdir variables.
The rest is something that I noticed while investigating the archhdrdir
changes, however they're unrelated to upstream Ruby's 2.x releases.
The assumption that sitearchdir is a subdirectory of sitedir, as pointed
out by Daniel's email, is an existing issue that just hadn't been raised.
Distributors set these values when building the Ruby they ship. In
RedHat's case, it's simply differentiating with /usr/share and
/usr/lib{64,}. Debian has introduced the concept of multi-arch and as a
result configures applications to expect architecture-specific libraries
under /usr{/local,}/lib/$arch-triplet.
Cheers,
--
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <jamessan_at_debian.org>
Received on 2014-05-28 02:30:18 CEST