[patch] Rakefile made ready for Psych

Hi there,

I don’t know wheather any of the wxRuby devs has tried to compile
wxRuby on Ruby 1.9 with Psych enabled (Ruby’s new YAML parser
automatically used by RubyGems if available–Psych is available if
libyaml was available when Ruby was compiled. Note this is NOT the
case for most packaged Rubies (Ubuntu/Debian/Arch Linux for sure) for
whatever reason). If you do

$ rake

wxRuby compiles just fine, but

$ rake gem --trace

gives you a wonderful backtrace you may have a look at here:
http://pastie.org/2477361

To correct this, you just need to apply this patch against 2.0.1’s
rakefile.

=============================================
— rakefile.old 2011-09-03 21:30:22.495623323 +0200
+++ rakefile 2011-09-03 22:01:03.332381015 +0200
@@ -2,6 +2,12 @@

Copyright 2004-2008 by wxRuby development team

Released under the MIT-style wxruby2 license

+begin

  • require “psych”
    +rescue LoadError
    +end
    +require “yaml”

Influential environment variables

WXRUBY_RELEASE : build a release version, stripped of debugging

info

WXRUBY_DEBUG : build a debug version

=============================================

Another question: Will there ever be a precompiled 64-bit version of
wxRuby 2.0.1 for Linux? I can provide one, but I don’t have the rights
to push it to rubygems.org making it available for direct
installation. Tell me where to put it, and you can download it and
push it where it ought to be.

Valete,
Marvin

Hi

On 03/09/2011 21:04, Quintus wrote:

$ rake gem --trace

gives you a wonderful backtrace you may have a look at here:
http://pastie.org/2477361

Thanks very much for the report and patch. I’ve been using distro linux
so hadn’t come across it.

Can the change be applied somewhere later, and nearer to the bug it
tickles, instead of at the head of the main rakefile? For example, could
it go at the start of rake/rakepackage.rb, before the requires there,
since it seems to relate to gem tasks?

Also, can it have a one-line comment note of the bug it fixes please,
and the Ruby version affected?

Another question: Will there ever be a precompiled 64-bit version of
wxRuby 2.0.1 for Linux? I can provide one, but I don’t have the rights
to push it to rubygems.org making it available for direct
installation. Tell me where to put it, and you can download it and
push it where it ought to be.

Would be happy to accept and upload a 64-bit version, thank you. Please
drop me a line off-list.

alex

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 06.09.2011 19:04, schrieb Alex F.:

Can the change be applied somewhere later, and nearer to the bug
it tickles, instead of at the head of the main rakefile? For
example, could it go at the start of rake/rakepackage.rb, before
the requires there, since it seems to relate to gem tasks?

I’ll try, but the problem is that it must come before any attempt to
require yaml.rb, because otherwise Syck is already loaded. I’ll post
again when I know more.

Also, can it have a one-line comment note of the bug it fixes
please, and the Ruby version affected?

Of course it can^^. And just for the record, I’ve experienced the
problem with

ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

Vale,
Marvin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOZl+4AAoJELh1XLHFkqhaLQoIAJLg3bY8SK4Zy0T9uhwtrf8Y
xed7Y4tDih2MiCtwqv3KMZL6411XXY0I8CZAh4yA+Z+UOFT39f2W3Y7vtqUlAJc8
qcTA2DfxNfh/VXXy4DkAUhbkd0bOFdBFzOGuWDGQPcDjjtA3L0vxEDtluutJUWuX
KvG4e1N6I3JMK9OZJZ9yurByD2Zlv67W5Bx3AXD99jc5vEHA2a9Lvy+7dtP/iRVw
x1ZeqETaY120bIxDZtUw4uieLYf6t+kgeMm2u2lMYRN446f2W5RrndDMlGwK7mSF
0zZSd57nv2NbHbDmZUWHNSVcIc6d7ktN28ubODIzKM5m9AuZmzeGwD6irjMVJyM=
=mu5s
-----END PGP SIGNATURE-----