Subject: libgtk2-perl: doesn't build when using gtk 2.19
Package: libgtk2-perl
User: [email protected]
Usertags: origin-ubuntu lucid ubuntu-patch
Version: 1:1.221-4
Severity: normal
Tags: patch

In Ubuntu, we've applied the attached patch to achieve the following:

  * debian/patches/git-fix-gtkassistant.patch,
    debian/patches/git-fix-gtkbuildable.patch:
    - upstream git changes to fix build issues on gtk 2.19 (lp: #445621)

We thought you might be interested in doing the same. 

diff -u libgtk2-perl-1.221/debian/changelog libgtk2-perl-1.221/debian/changelog
diff -u libgtk2-perl-1.221/debian/patches/series libgtk2-perl-1.221/debian/patches/series
--- libgtk2-perl-1.221/debian/patches/series
+++ libgtk2-perl-1.221/debian/patches/series
@@ -6,0 +7,2 @@
+git-fix-gtkassistant.patch
+git-fix-gtkbuildable.patch
only in patch2:
unchanged:
--- libgtk2-perl-1.221.orig/debian/patches/git-fix-gtkassistant.patch
+++ libgtk2-perl-1.221/debian/patches/git-fix-gtkassistant.patch
@@ -0,0 +1,34 @@
+From ca7f14947bd85a340c4a139d758491d382e8fea5 Mon Sep 17 00:00:00 2001
+From: Torsten Schönfeld <[email protected]>
+Date: Sat, 06 Mar 2010 01:24:48 +0000
+Subject: Fix a test failure in GtkAssistant.t
+
+GtkAssistant's get_nth_page() recently got fixed so that it returns the
+last page when asked for page -1 (as the docs have been saying all
+along).  So skip asserting the contrary.
+---
+diff --git a/t/GtkAssistant.t b/t/GtkAssistant.t
+index 4bd0b25..32e798f 100644
+--- a/t/GtkAssistant.t
++++ b/t/GtkAssistant.t
+@@ -3,7 +3,7 @@
+ 
+ use strict;
+ use Gtk2::TestHelper
+-  tests => 27,
++  tests => 26,
+   at_least_version => [2, 10, 0, "GtkAssistant is new in 2.10"];
+ 
+ #typedef gint (*GtkAssistantPageFunc) (gint current_page, gpointer data);
+@@ -39,7 +39,6 @@ is ($assistant->get_current_page (), -1, "none set yet");
+ $assistant->set_current_page (3);
+ is ($assistant->get_current_page (), 3);
+ 
+-ok (! $assistant->get_nth_page (-1));
+ my $page = $assistant->get_nth_page (2);
+ isa_ok ($page, 'Gtk2::Widget');
+ 
+--
+cgit v0.8.3.1
+
+
only in patch2:
unchanged:
--- libgtk2-perl-1.221.orig/debian/patches/git-fix-gtkbuildable.patch
+++ libgtk2-perl-1.221/debian/patches/git-fix-gtkbuildable.patch
@@ -0,0 +1,31 @@
+From d0b0e0baf7a611c307040cef13773556a4898d08 Mon Sep 17 00:00:00 2001
+From: Torsten Schönfeld <[email protected]>
+Date: Sat, 06 Mar 2010 01:20:50 +0000
+Subject: Fix a test failure in GtkBuildableIface.t
+
+GtkWidget's implementation of the GtkBuildable methods
+set_name()/get_name() recently changed such that we cannot rely anymore
+on Gtk2::Widget::get_name() and Gtk2::Buildable::get_name() returning
+the same string for objects that inherit the Gtk2::Buildable
+implementation from Gtk2::Widget.
+---
+diff --git a/t/GtkBuildableIface.t b/t/GtkBuildableIface.t
+index 8a576b4..5b766c7 100644
+--- a/t/GtkBuildableIface.t
++++ b/t/GtkBuildableIface.t
+@@ -68,7 +68,11 @@ sub on_thing1_changed {
+ 
+ my $view1 = $builder->get_object ('view1');
+ isa_ok ($view1, 'TestThingView');
+-is ($view1->get_name (), 'view1');
++# TestThingView doesn't directly implement Gtk2::Buildable, thus it's not first
++# in the @ISA chain.  So get_name() alone actually resolves to
++# Gtk2::Widget::get_name(), which breaks things as of gtk+ commit
++# 46f5ee1d0c0f4601853ed57e99b1b513f1baa445.  So fully qualify the method.
++is ($view1->Gtk2::Buildable::get_name (), 'view1');
+ ok (! $view1->get ('visible'));
+ is ($view1->get ('thing'), $thing1);
+ is ($view1->get ('color-string'), 'purple');
+--
+cgit v0.8.3.1
+

Reply via email to