A potential patch for rcairo

Hi!

(I realize that this is the wrong list, but Kouhei is on this list,
and it’s related to Ruby-GNOME2, so I’m letting it slide.)

I have attached a small diff to rcairo-1.10.0 to allow it to be
compiled with less warnings on Windows (MINGW) (unused functions and
signed/unsigned comparison). There’s also a problem with
ext/cairo/extconf.rb if you’re not cross-compiling (see the =begin …
=end block). What’s the reason for the implib? Also, messing with
pkgconfig like that won’t work if I’ve actually compiled cairo myself.

Hi,

In [email protected]
“[ruby-gnome2-devel-en] A potential patch for rcairo” on Wed, 14 Sep
2011 14:45:06 +0200,
Nikolai W. [email protected] wrote:

I have attached a small diff to rcairo-1.10.0 to allow it to be
compiled with less warnings on Windows (MINGW) (unused functions and
signed/unsigned comparison).

I’ve merged them. Thanks!

                          There$B!G(Bs also a problem with

ext/cairo/extconf.rb if you$B!G(Bre not cross-compiling (see the =begin $B!D(B
=end block). What$B!G(Bs the reason for the implib? Also, messing with
pkgconfig like that won$B!G(Bt work if I$B!G(Bve actually compiled cairo myself.

implib is used to build Ruby/GTK2 with rcairo.
Please put your compiled cairo into vendor/local/.
The extconf is desgined to build binary bundled gem. It’s
not designed for self build user on Windows.

Thanks,

kou

2011/9/15 Kouhei S. [email protected]:

Nikolai W. [email protected] wrote:

                          There’s also a problem with

ext/cairo/extconf.rb if you’re not cross-compiling (see the =begin …
=end block). What’s the reason for the implib? Also, messing with
pkgconfig like that won’t work if I’ve actually compiled cairo myself.

implib is used to build Ruby/GTK2 with rcairo.
Please put your compiled cairo into vendor/local/.
The extconf is desgined to build binary bundled gem. It’s
not designed for self build user on Windows.

OK. Can I provide a patch that makes it possible for it to do both?
(An environment variable or similar would do, I suppose.)

Also, I noticed that Ruby-GNOME2 mentions that setting CAIRO_PATH
should do something, but I don’t think that it actually works. What I
did to get everything working in the end was placing rcairo at the
same directory level as ruby-gnome2 and renaming it rcairo.win32.
That way ruby-gnome2 found it and everything worked.

Hi,

In CADdV=Mut4yFnCAOvUV9hsrwgj=K=LUJLKm4cJR=removed_email_address@domain.invalid
“Re: [ruby-gnome2-devel-en] A potential patch for rcairo” on Thu, 15
Sep 2011 15:34:57 +0200,
Nikolai W. [email protected] wrote:

The extconf is desgined to build binary bundled gem. It’s
not designed for self build user on Windows.

OK. Can I provide a patch that makes it possible for it to do both?
(An environment variable or similar would do, I suppose.)

Yes. Sure.

Also, I noticed that Ruby-GNOME2 mentions that setting CAIRO_PATH
should do something, but I don’t think that it actually works. What I
did to get everything working in the end was placing rcairo at the
same directory level as ruby-gnome2 and renaming it rcairo.win32.
That way ruby-gnome2 found it and everything worked.

Now, CAIRO_PATH isn’t used. It’s old information… Colud
you remove it?

Ruby-GNOME2 can find installed rcairo gem. Is it good
enough? If it’s not good enough, it seems good that adding
an option to extconf.rb something like --with-rcairo-path.

Thanks,

kou

On Thu, Sep 15, 2011 at 15:47, Kouhei S. [email protected] wrote:

Nikolai W. [email protected] wrote:

2011/9/15 Kouhei S. [email protected]:

The extconf is desgined to build binary bundled gem. It’s
not designed for self build user on Windows.

OK. Can I provide a patch that makes it possible for it to do both?
(An environment variable or similar would do, I suppose.)

Yes. Sure.

Would something like

unless $configure_args[‘–without-vendor-override’]

end

work?

Also, I noticed that Ruby-GNOME2 mentions that setting CAIRO_PATH
should do something, but I don’t think that it actually works. What I
did to get everything working in the end was placing rcairo at the
same directory level as ruby-gnome2 and renaming it rcairo.win32.
That way ruby-gnome2 found it and everything worked.

Now, CAIRO_PATH isn’t used. It’s old information… Colud
you remove it?

Yes, I’ll remove it. I’ll try to unify the handling of cairo. It’s
repeated in pango, gtk+, and other places.

Ruby-GNOME2 can find installed rcairo gem. Is it good
enough? If it’s not good enough, it seems good that adding
an option to extconf.rb something like --with-rcairo-path.

Well, I don’t want to use the gem ;-). I’ll see what I can come up
with tomorrow.

It˚s unfortunate that rcairo is in a separate repository…

On Thu, Sep 15, 2011 at 18:23, Nikolai W. [email protected] wrote:

Would something like

unless $configure_args[‘–without-vendor-override’]

end

work?

Patch sent to [email protected]