# Gtk2 dependency to gdkpixbuf2

**URL:** <https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273>\
**Category:** Ruby-Gnome 2\
**Created:** [October 10, 2010, 11:21am UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273 "2010-10-10T11:21:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ribbed21](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@ribbed21](https://www.ruby-forum.com/u/ribbed21)\
**Post date:** [October 10, 2010, 11:21am UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273/1 "2010-10-10T11:21:28Z")

</div>

Hello everyone,

I’ve raised the issue some days ago but I haven’t received response  
☹ in short, gtk2 has not gdkpixbuf2 listed as a dependency. I believe  
it  
should have - even the smallest possible sample fails if gdkpixbuf2 is  
not  
installed.  
I’ve prepared a patch (included here) that includes the dependency in  
the  
rakefile (it’s ONE line of code, but still - I’ve done my homework).  
Please let me know - there is maybe a good reason that I don’t know  
about for  
which gdkpixbuf2 shouldn’t be included.

Thanks in advance!

–

Andrea D.

> **[GitHub - bolthar/freightrain: Ruby desktop development made easy](https://github.com/bolthar/freightrain)**
>
> Ruby desktop development made easy. Contribute to bolthar/freightrain development by creating an account on GitHub.

> **[using (IMHO)](https://usingimho.wordpress.com)**
>
> Andrea Dallera 's blog

---

<div class="post-metadata">

**Author:** ![ribbed21](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@ribbed21](https://www.ruby-forum.com/u/ribbed21)\
**Post date:** [October 10, 2010, 5:41pm UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273/2 "2010-10-10T17:41:22Z")

</div>

2010/10/10 Andrea D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Thanks in advance!
> 
> –
> 
> Andrea D.  
> [GitHub - bolthar/freightrain: Ruby desktop development made easy · GitHub](http://github.com/bolthar/freightrain)  
> [http://usingimho.wordpress.com](http://usingimho.wordpress.com)

Hi.  
Just to say that according to README gtk does depend on gdkpixbuf2!

–  
Vincent C.

---

<div class="post-metadata">

**Author:** ![ribbed21](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@ribbed21](https://www.ruby-forum.com/u/ribbed21)\
**Post date:** [October 12, 2010, 3:11am UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273/3 "2010-10-12T03:11:46Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] gtk2 dependency to gdkpixbuf2” on Sun, 10 Oct  
2010 11:21:02 +0200,  
Andrea D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve raised the issue some days ago but I haven’t received response  
> ☹ in short, gtk2 has not gdkpixbuf2 listed as a dependency. I believe it  
> should have - even the smallest possible sample fails if gdkpixbuf2 is not  
> installed.

Where did you summit the issue? I can’t find the issue on [SF.net](http://SF.net)…

> I’ve prepared a patch (included here) that includes the dependency in the  
> rakefile (it’s ONE line of code, but still - I’ve done my homework).  
> Please let me know - there is maybe a good reason that I don’t know about for  
> which gdkpixbuf2 shouldn’t be included.

Ruby/GdkPixbuf2 shouldn’t dependes on Ruby/GTK2. Ruby/GTK2  
depends on Ruby/GdkPixbuf2 is correct.

Could you write a patch to move gdkcairo.h related codes in  
rbgdk-pixbuf.c to Ruby/GTK2?

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![ribbed21](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@ribbed21](https://www.ruby-forum.com/u/ribbed21)\
**Post date:** [October 14, 2010, 1:22pm UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273/4 "2010-10-14T13:22:27Z")

</div>

Hi,

I didn’t submit the issue to the bug tracker - just here on the  
mailing list: I wasn’t sure it was an issue to begin with.  
Ruby/GdkPixbuf2 does not depend on Ruby/GTK2. The problem is that  
Ruby/GTK2  
does depend on Ruby/GdkPixbuf2 but, on the gem manifest, the dependency  
isn’t  
listed and so the Ruby/GdkPixbuf2 gem does not get installed as it  
should when  
installing the Ruby/GTK2 gem.

The little patch I submitted (included in my last message here) was a  
fix for  
the gtk2 rakefile - it just added the gdkpixbuf2 dependency.

> Could you write a patch to move gdkcairo.h related codes in  
> rbgdk-pixbuf.c to Ruby/GTK2?

I’ve taken a look at rbgdk-pixbuf.c and I believe that this is the  
section  
you’re talking about:

#if RBGDK\_PIXBUF\_CHECK\_VERSION(2,8,0) && defined(HAVE\_RB\_CAIRO\_H)

# include \<gdk/gdkcairo.h\>

# include \<rb\_cairo.h\>

# define CAIRO\_AVAILABLE 1

#else

# define CAIRO\_AVAILABLE 0

#endif

problem is, I have absolutely no idea where to move it. I’ve tried  
rbgtk.h in  
gtk2/ext with no luck. Any pointer would be appreciated - I’d like to  
know  
more about the project and be able to help but I lack the necessary  
knowledge.

Andrea

---

<div class="post-metadata">

**Author:** ![ribbed21](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@ribbed21](https://www.ruby-forum.com/u/ribbed21)\
**Post date:** [October 14, 2010, 4:25pm UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273/5 "2010-10-14T16:25:46Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] gtk2 dependency to gdkpixbuf2” on Thu, 14  
Oct 2010 13:21:45 +0200,  
Andrea D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> #else
> 
> # define CAIRO\_AVAILABLE 0
> 
> #endif

and #ifdef CAIRO\_AVAIABLE … #endif sections.

> problem is, I have absolutely no idea where to move it. I’ve tried rbgtk.h in  
> gtk2/ext with no luck. Any pointer would be appreciated - I’d like to know  
> more about the project and be able to help but I lack the necessary knowledge.

gtk2/ext/gtk2/rbgdkcairo.c is the location.

I’m looking for your contribution!

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![ribbed21](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@ribbed21](https://www.ruby-forum.com/u/ribbed21)\
**Post date:** [October 14, 2010, 5:43pm UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273/6 "2010-10-14T17:43:38Z")

</div>

Hi,

enclosed to this mail you’ll find the patch. I tested everything on my  
machine and it builds/installs fine, also my examples and the examples  
in  
gdk\_pixbuf2 run fine. I really hope I didn’t break anything…

Hope this will help!

Andrea

---

<div class="post-metadata">

**Author:** ![ribbed21](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@ribbed21](https://www.ruby-forum.com/u/ribbed21)\
**Post date:** [October 17, 2010, 3:00pm UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273/7 "2010-10-17T15:00:46Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] gtk2 dependency to gdkpixbuf2” on Thu, 14  
Oct 2010 17:42:46 +0200,  
Andrea D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> enclosed to this mail you’ll find the patch. I tested everything on my  
> machine and it builds/installs fine, also my examples and the examples in  
> gdk\_pixbuf2 run fine. I really hope I didn’t break anything…

Thanks!  
I’ve applied your patch with some fixes. Please confirm it!

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![ribbed21](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/f9ae1b/32.png) [@ribbed21](https://www.ruby-forum.com/u/ribbed21)\
**Post date:** [October 17, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/gtk2-dependency-to-gdkpixbuf2/196273/8 "2010-10-17T16:57:42Z")

</div>

Hi Kouhei,

I’ve updated from trunk and built/reinstalled the gems and everything  
works on my machine.

Thanks for your work!

Andrea
