On Sep 10, 2010, at 1:43 PM, Eric MSP Veith wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Yippie, my first actual usuful CVS commit to RPM5! *celebrate* >
Hehe ... congrats! > On Friday 10 September 2010, "Eric Veith" <eve...@rpm5.org> wrote: >> +WITH_RUBY_CPPFLAGS="" >> RPM_CHECK_LIB( >> [Ruby], [ruby], >> [ruby], [ruby_init], [ruby.h], >> [no,external:none], [], >> - [ AC_DEFINE(WITH_RUBYEMBED, 1, [Define to 1 if you want embedded >> Ruby]) - WITH_RUBY_SUBDIR=ruby >> + [ >> + AC_DEFINE(WITH_RUBYEMBED, 1, [Define to 1 if you want embedded >> Ruby]) + WITH_RUBY_SUBDIR=ruby >> + >> + WITH_RUBY_CPPFLAGS="-I`ruby -rrbconfig -e 'puts >> RbConfig::expand(RbConfig::CONFIG[[\"rubyhdrdir\"]])'` -I`ruby >> -rrbconfig -e 'puts >> RbConfig::expand(\"#{RbConfig::CONFIG[\"rubyhdrdir\"]}/$(arch)\")'`" ], >> []) >> AC_SUBST(WITH_RUBY_SUBDIR) >> +AC_SUBST(WITH_RUBY_CPPFLAGS) > > Fun aside: Could somebody with real AutoFu experience and knowledge please > have a look at that and tell me whether it's the best/most elegant way to > solve this problem? Currently it only WORKSFORME. > todo++. Feel free to make the call about ruby 1.8.x <-> 1.9.x and minimum necessary version etc as you progress. I haven't a clue which ruby version is "best" to target. > Ok, now on to rpmio/rpmruby fun. Already gcc complains that the ruby folks > have a xmalloc/xcalloc/xfree, too. *sigh* > Mind if I write up a blueprint for "rpm-embed-ruby" at http://launchpad.net/rpm to describe some of the details? Its your work, so I ask first. You are more than welcome to change/delete/ignore/whatever the blueprint. But with a blueprint I can target a milestone (aka an rpm release) and attach dependencies and bugs and more. Just process scheduling administrivia, chlorox-ing my neurons nightly is getting to be a chore ;-) For starters, there's global <-> instance that needs worrying about (I'd suggest targeting/using global initially: multiple interpreters have all sorts of weird surprises). There's also deciding on some mechanism for what modules get automagically loaded (and from where) as a side effect of calling rpmrubyNew(). I likely did the minimimum necessary change to capture stdout in a buffer to return as the %{ruby OPTS ARGS: BODY} expansion value, using whatever seemed like a reasonable "Rubyesque" way to redirect a stream. If I looked, I'd remember why I did whatever I did. And there's some toy *.spec test cases that should be written to exercise both macro/scriptlet syntaxes attached to embedded ruby. Then there's the whole messiness of exception and signal handling in embedded ruby as well as threading that need to start to be worked through. There's some utterly simple things that could/should be done to display diagnostics while trying to devise a real world framework not only for ruby, but all the embeddings. hth 73 de Jeff ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org