Okay, after my previous rant about ruby I’ve decided to get to work and try to fix at least part of the problems. The first was getting rmagick, and thus gruff, to work on Ruby 1.9. The solution, obviously, was to use ruby-ng.eclass. And this brought me at extending it further.
The good new is that now ruby-fakegem.eclass can unpack gems! This means that we have an almost total coverage: software not available in tarballs can be fetched and unpacked as gem and then installed with a fake gem. This does not seem to comply with what Hans wanted, but gives us enough space for improvement in the future. This also means I can finally package a few more extensions that I had to ignore before, like hoe for instance.
I also wanted to package an updated version of jruby-openssl (and looking at the downloads I also noticed there’s a rmagick compatible package for JRuby there, I’ll have to look at it so maybe I can do all the work in a single pass with JRuby itself); the new versions actually come in tarball as well as gems (the tarball is still preferred, it’s one step less after all). Unfortunately it turns out that both the gem and the tarball are missing the Rakefile for the tests (which makes it quite impossible to get the tests running). It also comes with two bundled jar for dev-java/bcprov and dev-java/bcmail, but that’s for another moment.
But to test the git version of jruby-openssl (spoiler: it still does not work!), I ended up having to package hoe, and from that rubyforge, which was a stopping bucked before, as it doesn’t come in tarball form… which is no longer a problem) Unfortunately the testsuite of hoe (oh did I say that the gems installed this way can run test and don’t install them any longer? oh yeah it’s sweet!) broke, seems like for an internal error in ruby 1.9 itself.
/usr/bin/ruby19 -w -Ilib:ext:bin:test -e 'require "rubygems"; require "test/unit"; require "test/test_hoe.rb"' Loaded suite -e Started .... Finished in 0.172264 seconds. 4 tests, 34 assertions, 0 failures, 0 errors, 0 skips /usr/lib64/ruby19/1.9.1/pathname.rb:270: warning: `*' interpreted as argument prefix rake aborted! Command failed with status (1): [/usr/bin/ruby19 -w -Ilib:ext:bin:test -e '...]
(The pathname warning is what is causing the error further down the road).
So while this is no real improvement for my job task; this is actually a good improvement for Gentoo and Ruby; now if my fellow devs wouldn’t mind helping me polishing out the eclasses and testing the overlay then we might even get this in the tree one day so that all users could make use of the new shiny support for Ruby 1.8, Ruby 1.9 and JRuby at once.
The following step would probably be supporting even other Ruby implementations, has anybody said Ruby EE, Rubinius or IronRuby? (Indeed it’s theoretically possible to support all of those as well, as far as I can tell, as long as they are commandline-compatible with the original Ruby).