[DRE-maint] Ubuntu ruby-gnome2 0.19.3-2ubuntu2

Ubuntu Merge-o-Matic mom at ubuntu.com
Fri Jun 10 04:50:18 UTC 2011


This e-mail has been sent due to an upload to Ubuntu that contains Ubuntu
changes.  It contains the difference between the new version and the
previous version of the same source package in Ubuntu.
-------------- next part --------------
Format: 1.8
Date: Fri, 10 Jun 2011 02:46:24 +0100
Source: ruby-gnome2
Binary: libglib2-ruby libglib2-ruby1.8 libglib2-ruby1.8-dbg libatk1-ruby libatk1-ruby1.8 libatk1-ruby1.8-dbg libpango1-ruby libpango1-ruby1.8 libpango1-ruby1.8-dbg libgdk-pixbuf2-ruby libgdk-pixbuf2-ruby1.8 libgdk-pixbuf2-ruby1.8-dbg libgtk2-ruby libgtk2-ruby1.8 libgtk2-ruby1.8-dbg libart2-ruby libart2-ruby1.8 libart2-ruby1.8-dbg libgnomecanvas2-ruby libgnomecanvas2-ruby1.8 libgnomecanvas2-ruby1.8-dbg libgnome2-ruby libgnome2-ruby1.8 libgnome2-ruby1.8-dbg libgconf2-ruby libgconf2-ruby1.8 libgconf2-ruby1.8-dbg libglade2-ruby libglade2-ruby1.8 libglade2-ruby1.8-dbg libgoocanvas-ruby libgoocanvas-ruby1.8 libgoocanvas-ruby1.8-dbg libgtkglext1-ruby libgtkglext1-ruby1.8 libgtkglext1-ruby1.8-dbg libgnomevfs2-ruby libgnomevfs2-ruby1.8 libgnomevfs2-ruby1.8-dbg libgtksourceview2-ruby libgtksourceview2-ruby1.8 libgtksourceview2-ruby1.8-dbg libpanel-applet2-ruby libpanel-applet2-ruby1.8 libpanel-applet2-ruby1.8-dbg librsvg2-ruby librsvg2-ruby1.8 librsvg2-ruby1.8-dbg libvte-ruby libvte-ru
 by1.8
 libvte-ruby1.8-dbg libpoppler-glib-ruby libpoppler-glib-ruby1.8 libpoppler-glib-ruby1.8-dbg libgst-ruby libgst-ruby1.8 libgst-ruby1.8-dbg ruby-gnome2 ruby-gnome2-dev
Architecture: source
Version: 0.19.3-2ubuntu2
Distribution: oneiric
Urgency: low
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Changed-By: Chris Coulson <chris.coulson at canonical.com>
Description: 
 libart2-ruby - Libart 2 bindings for the Ruby language
 libart2-ruby1.8 - Libart 2 bindings for the Ruby language
 libart2-ruby1.8-dbg - Libart 2 bindings for the Ruby language
 libatk1-ruby - ATK bindings for the Ruby language
 libatk1-ruby1.8 - ATK bindings for the Ruby language
 libatk1-ruby1.8-dbg - ATK bindings for the Ruby language
 libgconf2-ruby - GConf 2 bindings for the Ruby language
 libgconf2-ruby1.8 - GConf 2 bindings for the Ruby language
 libgconf2-ruby1.8-dbg - GConf 2 bindings for the Ruby language
 libgdk-pixbuf2-ruby - Gdk-Pixbuf 2 bindings for the Ruby language
 libgdk-pixbuf2-ruby1.8 - Gdk-Pixbuf 2 bindings for the Ruby language
 libgdk-pixbuf2-ruby1.8-dbg - Gdk-Pixbuf 2 bindings for the Ruby language
 libglade2-ruby - Libglade 2 bindings for the Ruby language
 libglade2-ruby1.8 - Libglade 2 bindings for the Ruby language
 libglade2-ruby1.8-dbg - Libglade 2 bindings for the Ruby language
 libglib2-ruby - Glib 2 bindings for the Ruby language
 libglib2-ruby1.8 - Glib 2 bindings for the Ruby language
 libglib2-ruby1.8-dbg - Glib 2 bindings for the Ruby language
 libgnome2-ruby - GNOME 2 bindings for the Ruby language
 libgnome2-ruby1.8 - GNOME 2 bindings for the Ruby language
 libgnome2-ruby1.8-dbg - GNOME 2 bindings for the Ruby language
 libgnomecanvas2-ruby - GNOME Canvas 2 bindings for the Ruby language
 libgnomecanvas2-ruby1.8 - GNOME Canvas 2 bindings for the Ruby language
 libgnomecanvas2-ruby1.8-dbg - GNOME Canvas 2 bindings for the Ruby language
 libgnomevfs2-ruby - GNOME VFS 2 bindings for the Ruby language
 libgnomevfs2-ruby1.8 - GNOME VFS 2 bindings for the Ruby language
 libgnomevfs2-ruby1.8-dbg - GNOME VFS 2 bindings for the Ruby language
 libgoocanvas-ruby - GooCanvas bindings for the Ruby language
 libgoocanvas-ruby1.8 - GooCanvas bindings for the Ruby language
 libgoocanvas-ruby1.8-dbg - GooCanvas bindings for the Ruby language
 libgst-ruby - GStreamer bindings for the Ruby language
 libgst-ruby1.8 - GStreamer bindings for the Ruby language
 libgst-ruby1.8-dbg - GStreamer bindings for the Ruby language
 libgtk2-ruby - GTK+ bindings for the Ruby language
 libgtk2-ruby1.8 - GTK+ bindings for the Ruby language
 libgtk2-ruby1.8-dbg - GTK+ bindings for the Ruby language
 libgtkglext1-ruby - GTK+ GL extension bindings for the Ruby language
 libgtkglext1-ruby1.8 - GTK+ GL extension bindings for the Ruby language
 libgtkglext1-ruby1.8-dbg - GTK+ GL extension bindings for the Ruby language
 libgtksourceview2-ruby - GtkSourceView2 bindings for the Ruby language
 libgtksourceview2-ruby1.8 - GtkSourceView2 bindings for the Ruby language
 libgtksourceview2-ruby1.8-dbg - GtkSourceView2 bindings for the Ruby language
 libpanel-applet2-ruby - GNOME 2 panel applet library bindings for the Ruby language
 libpanel-applet2-ruby1.8 - GNOME 2 panel applet library bindings for the Ruby language
 libpanel-applet2-ruby1.8-dbg - GNOME 2 panel applet library bindings for the Ruby language
 libpango1-ruby - Pango bindings for the Ruby language
 libpango1-ruby1.8 - Pango bindings for the Ruby language
 libpango1-ruby1.8-dbg - Pango bindings for the Ruby language
 libpoppler-glib-ruby - Ruby bindinds for the libpoppler-glib library
 libpoppler-glib-ruby1.8 - Ruby bindinds for the libpoppler-glib library
 libpoppler-glib-ruby1.8-dbg - Ruby bindinds for the libpoppler-glib library
 librsvg2-ruby - RSVG renderer bindings for the Ruby language
 librsvg2-ruby1.8 - RSVG renderer bindings for the Ruby language
 librsvg2-ruby1.8-dbg - RSVG renderer bindings for the Ruby language
 libvte-ruby - VTE widget bindings for the Ruby language
 libvte-ruby1.8 - VTE widget bindings for the Ruby language
 libvte-ruby1.8-dbg - VTE widget bindings for the Ruby language
 ruby-gnome2 - GNOME-related bindings for the Ruby language
 ruby-gnome2-dev - GNOME-related bindings for the Ruby language
Changes: 
 ruby-gnome2 (0.19.3-2ubuntu2) oneiric; urgency=low
 .
   * Drop the libgtk-mozembed-ruby* packages. GtkMozEmbed is abandoned upstream,
     and we are removing xulrunner from Ubuntu
     (see https://blueprints.launchpad.net/ubuntu/+spec/
            desktop-o-mozilla-rapid-release-maintenance)
     - update debian/control
     - update debian/rules
     - remove debian/libgtk-mozembed-ruby1.8.install
     - remove debian/libgtk-mozembed-ruby.examples
     - remove debian/patches/greversionrange.patch
     - remove debian/patches/gtkmozembed-rpath.patch
     - update debian/patches/series
   * Add upstream patch for poppler 0.15 compatibility
     - add debian/patches/poppler_0.15.patch
     - update debian/patches/series
Checksums-Sha1: 
 305c3627522f9fcd0960d273e63c1c7f76d84c93 3407 ruby-gnome2_0.19.3-2ubuntu2.dsc
 120c2d7ea0bece669622517c1c63e3fcaf2ef995 19621 ruby-gnome2_0.19.3-2ubuntu2.debian.tar.gz
Checksums-Sha256: 
 0587b11fc601780d9846ac33ca627cb416a5d4e1791847e220d554d42081be25 3407 ruby-gnome2_0.19.3-2ubuntu2.dsc
 5b6b463a0cd858d484b62631cece01b727150305977274810f37de58c3540a9e 19621 ruby-gnome2_0.19.3-2ubuntu2.debian.tar.gz
Files: 
 544eb07510490706f1c0ba07b6ab3dbd 3407 ruby optional ruby-gnome2_0.19.3-2ubuntu2.dsc
 0fd2949238c432412628a4d8bf9b41e1 19621 ruby optional ruby-gnome2_0.19.3-2ubuntu2.debian.tar.gz
Original-Maintainer: Arnaud Cornet <acornet at debian.org>
-------------- next part --------------
diff -pruN 0.19.3-2ubuntu1/debian/changelog 0.19.3-2ubuntu2/debian/changelog
--- 0.19.3-2ubuntu1/debian/changelog	2010-09-17 18:38:47.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/changelog	2011-06-10 03:09:21.000000000 +0100
@@ -1,3 +1,22 @@
+ruby-gnome2 (0.19.3-2ubuntu2) oneiric; urgency=low
+
+  * Drop the libgtk-mozembed-ruby* packages. GtkMozEmbed is abandoned upstream,
+    and we are removing xulrunner from Ubuntu
+    (see https://blueprints.launchpad.net/ubuntu/+spec/
+           desktop-o-mozilla-rapid-release-maintenance)
+    - update debian/control
+    - update debian/rules
+    - remove debian/libgtk-mozembed-ruby1.8.install
+    - remove debian/libgtk-mozembed-ruby.examples
+    - remove debian/patches/greversionrange.patch
+    - remove debian/patches/gtkmozembed-rpath.patch
+    - update debian/patches/series
+  * Add upstream patch for poppler 0.15 compatibility
+    - add debian/patches/poppler_0.15.patch
+    - update debian/patches/series
+
+ -- Chris Coulson <chris.coulson at canonical.com>  Fri, 10 Jun 2011 02:46:24 +0100
+
 ruby-gnome2 (0.19.3-2ubuntu1) maverick; urgency=low
 
   * Merge with Debian unstable. remaining changes:
diff -pruN 0.19.3-2ubuntu1/debian/control 0.19.3-2ubuntu2/debian/control
--- 0.19.3-2ubuntu1/debian/control	2010-09-17 18:36:45.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/control	2011-06-10 02:45:52.000000000 +0100
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
 XSBC-Original-Maintainer: Arnaud Cornet <acornet at debian.org>
 Uploaders: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>, Paul van Tilburg <paulvt at debian.org>, Michael Schutte <m.schutte.jr at gmail.com>, Antonio Terceiro <terceiro at softwarelivre.org>
-Build-Depends: debhelper (>= 7.0.50~), ruby, ruby1.8, ruby1.8-dev, libgnomeui-dev, libglade2-dev, libpng12-dev, libgtkglext1-dev, libxmu-dev, libpanel-applet2-dev, librsvg2-dev (>= 2.8.0), libcairo-ruby, xulrunner-dev (>= 1.9.1.3-2), libvte-dev (>= 0.12.1), libpoppler-glib-dev (>= 0.8.0), pkg-config, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgoocanvas-dev (>= 0.8.0), libgtksourceview2.0-dev, libdrm-dev, libjpeg62-dev
+Build-Depends: debhelper (>= 7.0.50~), ruby, ruby1.8, ruby1.8-dev, libgnomeui-dev, libglade2-dev, libpng12-dev, libgtkglext1-dev, libxmu-dev, libpanel-applet2-dev, librsvg2-dev (>= 2.8.0), libcairo-ruby, libvte-dev (>= 0.12.1), libpoppler-glib-dev (>= 0.8.0), pkg-config, libgstreamer0.10-dev, libgstreamer-plugins-base0.10-dev, libgoocanvas-dev (>= 0.8.0), libgtksourceview2.0-dev, libdrm-dev, libjpeg62-dev
 Standards-Version: 3.8.4
 Homepage: http://ruby-gnome2.sourceforge.jp/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-ruby-extras/trunk/ruby-gnome2/
@@ -552,36 +552,6 @@ Description: RSVG renderer bindings for 
  .
  This package contains the debugging symbols.
 
-Package: libgtk-mozembed-ruby
-Architecture: all
-Depends: libgtk-mozembed-ruby1.8, libgtk2-ruby, ${misc:Depends}
-Description: ruby binding of GtkMozEmbed, gecko renderer
- GtkMozEmbed is a Ruby binding of GtkMozEmbed, a widget embedding a
- Mozilla Gecko renderer.
- .
- This is a dummy package depending on the library for the current default
- version of Ruby.
-
-Package: libgtk-mozembed-ruby1.8
-Architecture: any
-Depends: ${shlibs:Depends}, libgtk2-ruby1.8, ${misc:Depends}
-Replaces: libgtk-mozembed-ruby (<< 0.16.0)
-Conflicts: libgtk-mozembed-ruby (<< 0.16.0)
-Description: ruby binding of GtkMozEmbed, gecko renderer
- GtkMozEmbed is a Ruby binding of GtkMozEmbed, a widget embedding a
- Mozilla Gecko renderer.
-
-Package: libgtk-mozembed-ruby1.8-dbg
-Priority: extra
-Architecture: any
-Section: debug
-Depends: libgtk-mozembed-ruby1.8 (= ${binary:Version}), ${misc:Depends}
-Description: ruby binding of GtkMozEmbed, gecko renderer
- GtkMozEmbed is a Ruby binding of GtkMozEmbed, a widget embedding a
- Mozilla Gecko renderer.
- .
- This package contains the debugging symbols.
-
 Package: libvte-ruby
 Architecture: all
 Depends: libvte-ruby1.8, ${misc:Depends}
@@ -673,7 +643,7 @@ Description: GStreamer bindings for the 
 
 Package: ruby-gnome2
 Architecture: all
-Depends: libgnome2-ruby, libgconf2-ruby, libglade2-ruby, libgtkglext1-ruby, libgnomevfs2-ruby, libpanel-applet2-ruby, librsvg2-ruby, libgtk-mozembed-ruby, libvte-ruby, libart2-ruby, libatk1-ruby, libgdk-pixbuf2-ruby, libgnomecanvas2-ruby, libpango1-ruby, ${misc:Depends}
+Depends: libgnome2-ruby, libgconf2-ruby, libglade2-ruby, libgtkglext1-ruby, libgnomevfs2-ruby, libpanel-applet2-ruby, librsvg2-ruby, libvte-ruby, libart2-ruby, libatk1-ruby, libgdk-pixbuf2-ruby, libgnomecanvas2-ruby, libpango1-ruby, ${misc:Depends}
 Conflicts: libgnomeprint2-ruby (<< 0.19.1-1), libgnomeprint2-ruby1.8(<< 0.19.1-1), libgnomeprintui2-ruby (<< 0.19.1-1), libgnomeprintui2-ruby1.8 (<< 0.19.1-1), libgtksourceview1-ruby (<< 0.19.1-1), libgtksourceview1-ruby1.8 (<< 0.19.1-1)
 Description: GNOME-related bindings for the Ruby language
  These bindings allow use of the GNOME developer platform using the Ruby
diff -pruN 0.19.3-2ubuntu1/debian/libgtk-mozembed-ruby1.8.install 0.19.3-2ubuntu2/debian/libgtk-mozembed-ruby1.8.install
--- 0.19.3-2ubuntu1/debian/libgtk-mozembed-ruby1.8.install	2009-08-20 13:16:48.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/libgtk-mozembed-ruby1.8.install	1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-usr/lib/ruby/1.8/*/gtkmozembed.so
-usr/lib/ruby/1.8/gtkmozembed.rb
diff -pruN 0.19.3-2ubuntu1/debian/libgtk-mozembed-ruby.examples 0.19.3-2ubuntu2/debian/libgtk-mozembed-ruby.examples
--- 0.19.3-2ubuntu1/debian/libgtk-mozembed-ruby.examples	2009-08-20 13:16:48.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/libgtk-mozembed-ruby.examples	1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-gtkmozembed/sample/*.rb
-gtkmozembed/sample/README
diff -pruN 0.19.3-2ubuntu1/debian/patches/greversionrange.patch 0.19.3-2ubuntu2/debian/patches/greversionrange.patch
--- 0.19.3-2ubuntu1/debian/patches/greversionrange.patch	2009-10-14 20:54:43.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/patches/greversionrange.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-Index: ruby-gnome2-0.19.1/gtkmozembed/src/rbgtkmozembed-init.cpp
-===================================================================
---- ruby-gnome2-0.19.1.orig/gtkmozembed/src/rbgtkmozembed-init.cpp	2009-10-14 21:53:41.437971650 +0200
-+++ ruby-gnome2-0.19.1/gtkmozembed/src/rbgtkmozembed-init.cpp	2009-10-14 21:54:03.699652601 +0200
-@@ -35,8 +35,8 @@
- setup_xpcom_glue(void)
- {
-     static const GREVersionRange greVersion = {
--	"1.9b", PR_TRUE,
--	"2", PR_TRUE
-+	"1.9.1", PR_TRUE,
-+	"1.9.2", PR_FALSE
-     };
-     char xpcomPath[PATH_MAX];
- 
diff -pruN 0.19.3-2ubuntu1/debian/patches/gtkmozembed-rpath.patch 0.19.3-2ubuntu2/debian/patches/gtkmozembed-rpath.patch
--- 0.19.3-2ubuntu1/debian/patches/gtkmozembed-rpath.patch	2009-08-20 14:06:33.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/patches/gtkmozembed-rpath.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-Index: ruby-gnome2-0.19.1/gtkmozembed/extconf.rb
-===================================================================
---- ruby-gnome2-0.19.1.orig/gtkmozembed/extconf.rb	2009-07-26 08:16:56.000000000 +0200
-+++ ruby-gnome2-0.19.1/gtkmozembed/extconf.rb	2009-08-20 15:05:28.047212991 +0200
-@@ -47,7 +47,6 @@
- if mozilla_path
-   # please comment the CFLAGS line if you don't want a default comp_path
-   $CFLAGS << " -DDEFAULT_MOZILLA_FIVE_HOME='\"#{mozilla_path}\"' "
--  $LDFLAGS << " -Wl,-rpath #{mozilla_path}"
- else
-   $stderr.puts "${package_id}.pc cannot be found."
-   exit 1
diff -pruN 0.19.3-2ubuntu1/debian/patches/poppler_0.15.patch 0.19.3-2ubuntu2/debian/patches/poppler_0.15.patch
--- 0.19.3-2ubuntu1/debian/patches/poppler_0.15.patch	1970-01-01 01:00:00.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/patches/poppler_0.15.patch	2011-06-10 03:07:03.000000000 +0100
@@ -0,0 +1,32 @@
+--- a/poppler/src/rbpoppler-page.c
++++ b/poppler/src/rbpoppler-page.c
+@@ -332,6 +332,9 @@ page_get_text(int argc, VALUE *argv, VAL
+     }
+ 
+     if (NIL_P(rb_rect)) {
++#if POPPLER_CHECK_VERSION(0, 15, 0)
++        text = poppler_page_get_text(page);
++#else
+         PopplerRectangle rect;
+         double width, height;
+ 
+@@ -343,10 +346,16 @@ page_get_text(int argc, VALUE *argv, VAL
+         text = poppler_page_get_text(page,
+                                      style,
+                                      &rect);
++#endif
+     } else {
+-        text = poppler_page_get_text(page,
+-                                     style,
+-                                     RVAL2POPPLER_RECT(rb_rect));
++        PopplerRectangle *rect;
++
++	rect = RVAL2POPPLER_RECT(rb_rect);
++#if POPPLER_CHECK_VERSION(0, 15, 0)
++        text = poppler_page_get_selected_text(page, style, rect);
++#else
++        text = poppler_page_get_text(page, style, rect);
++#endif
+     }
+ 
+     rb_text = CSTR2RVAL(text);
diff -pruN 0.19.3-2ubuntu1/debian/patches/series 0.19.3-2ubuntu2/debian/patches/series
--- 0.19.3-2ubuntu1/debian/patches/series	2010-09-17 05:28:46.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/patches/series	2011-06-10 03:20:02.000000000 +0100
@@ -2,7 +2,6 @@ drag-signals.patch
 data-from-selection.patch
 extconf-strict.patch
 shebangs.patch
-gtkmozembed-rpath.patch
-greversionrange.patch
 buildsys-abort-on-error.patch
 element-seek-segfault.patch
+poppler_0.15.patch
diff -pruN 0.19.3-2ubuntu1/debian/rules 0.19.3-2ubuntu2/debian/rules
--- 0.19.3-2ubuntu1/debian/rules	2010-04-15 20:20:23.000000000 +0100
+++ 0.19.3-2ubuntu2/debian/rules	2011-06-10 02:51:38.000000000 +0100
@@ -1,6 +1,6 @@
 #!/usr/bin/make -f
 
-RUBY_GNOME2_MODS=atk bonobo bonoboui gconf gdkpixbuf glib gnome gnomecanvas gnomevfs goocanvas gstreamer gtk gtkglext gtkmozembed gtksourceview2 libart libglade panel-applet pango poppler rsvg vte
+RUBY_GNOME2_MODS=atk bonobo bonoboui gconf gdkpixbuf glib gnome gnomecanvas gnomevfs goocanvas gstreamer gtk gtkglext gtksourceview2 libart libglade panel-applet pango poppler rsvg vte
 
 DEB_RUBY_VERSION = 1.8
 DEB_RUBY_LIBDIR=$(strip $(shell ruby$(DEB_RUBY_VERSION) -rrbconfig -e 'puts Config::CONFIG["rubylibdir"]'))
@@ -13,7 +13,7 @@ DEB_RUBY_INSTALL_ARGS = DESTDIR=$(pkgdir
 		        sitearchdir=$(ruby_archdir_ver)
 
 %:
-	dh --with xulrunner $@
+	dh $@
 
 override_dh_auto_configure:
 	/usr/bin/ruby$(DEB_RUBY_VERSION) $(DEB_RUBY_SETUP_RUBY_ARGS) \
diff -pruN 0.19.3-2ubuntu1/gtkmozembed/extconf.rb 0.19.3-2ubuntu2/gtkmozembed/extconf.rb
--- 0.19.3-2ubuntu1/gtkmozembed/extconf.rb	2011-06-10 05:40:41.000000000 +0100
+++ 0.19.3-2ubuntu2/gtkmozembed/extconf.rb	2009-09-23 01:43:01.000000000 +0100
@@ -48,6 +48,7 @@ mozilla_path = mozilla_library_path.stri
 if mozilla_path
   # please comment the CFLAGS line if you don't want a default comp_path
   $CFLAGS << " -DDEFAULT_MOZILLA_FIVE_HOME='\"#{mozilla_path}\"' "
+  $LDFLAGS << " -Wl,-rpath #{mozilla_path}"
 else
   $stderr.puts "${package_id}.pc cannot be found."
   exit 1
diff -pruN 0.19.3-2ubuntu1/gtkmozembed/src/rbgtkmozembed-init.cpp 0.19.3-2ubuntu2/gtkmozembed/src/rbgtkmozembed-init.cpp
--- 0.19.3-2ubuntu1/gtkmozembed/src/rbgtkmozembed-init.cpp	2011-06-10 05:40:41.000000000 +0100
+++ 0.19.3-2ubuntu2/gtkmozembed/src/rbgtkmozembed-init.cpp	2009-07-26 07:16:56.000000000 +0100
@@ -35,8 +35,8 @@ static void
 setup_xpcom_glue(void)
 {
     static const GREVersionRange greVersion = {
-	"1.9.1", PR_TRUE,
-	"1.9.2", PR_FALSE
+	"1.9b", PR_TRUE,
+	"2", PR_TRUE
     };
     char xpcomPath[PATH_MAX];
 
diff -pruN 0.19.3-2ubuntu1/.pc/applied-patches 0.19.3-2ubuntu2/.pc/applied-patches
--- 0.19.3-2ubuntu1/.pc/applied-patches	2011-06-10 05:40:41.000000000 +0100
+++ 0.19.3-2ubuntu2/.pc/applied-patches	2011-06-10 05:40:37.000000000 +0100
@@ -2,7 +2,6 @@ drag-signals.patch
 data-from-selection.patch
 extconf-strict.patch
 shebangs.patch
-gtkmozembed-rpath.patch
-greversionrange.patch
 buildsys-abort-on-error.patch
 element-seek-segfault.patch
+poppler_0.15.patch
diff -pruN 0.19.3-2ubuntu1/.pc/greversionrange.patch/gtkmozembed/src/rbgtkmozembed-init.cpp 0.19.3-2ubuntu2/.pc/greversionrange.patch/gtkmozembed/src/rbgtkmozembed-init.cpp
--- 0.19.3-2ubuntu1/.pc/greversionrange.patch/gtkmozembed/src/rbgtkmozembed-init.cpp	2009-07-26 07:16:56.000000000 +0100
+++ 0.19.3-2ubuntu2/.pc/greversionrange.patch/gtkmozembed/src/rbgtkmozembed-init.cpp	1970-01-01 01:00:00.000000000 +0100
@@ -1,84 +0,0 @@
-/* -*- c-file-style: "ruby" -*- */
-/************************************************
-
-  rbgtkmozembed-init.c -
-
-    Ruby-GNOME2 Gtk::MozEmbed - Ruby bindings for GtkMozEmbed
-
-    Copyright (C) 2009 Ruby-GNOME2 Project Team.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-************************************************/
-
-#include "rbgtkmozembed.h"
-
-#ifdef XPCOM_GLUE
-#  include "gtkmozembed_glue.cpp"
-#endif
-
-G_BEGIN_DECLS
-
-#ifdef XPCOM_GLUE
-static void
-setup_xpcom_glue(void)
-{
-    static const GREVersionRange greVersion = {
-	"1.9b", PR_TRUE,
-	"2", PR_TRUE
-    };
-    char xpcomPath[PATH_MAX];
-
-    nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0,
-					       xpcomPath, sizeof(xpcomPath));
-    if (NS_FAILED(rv))
-        return;
-
-    rv = XPCOMGlueStartup(xpcomPath);
-    if (NS_FAILED(rv))
-        return;
-
-    rv = GTKEmbedGlueStartup();
-    if (NS_FAILED(rv))
-        return;
-
-    rv = GTKEmbedGlueStartupInternal();
-    if (NS_FAILED(rv))
-        return;
-
-    char *lastSlash = strrchr(xpcomPath, '/');
-    if (lastSlash)
-	*lastSlash = '\0';
-
-    gtk_moz_embed_set_path(xpcomPath);
-
-    gtk_moz_embed_push_startup();
-}
-#endif
-
-void
-Init_gtkmozembed(void)
-{
-#ifdef XPCOM_GLUE
-    setup_xpcom_glue();
-#else
-#  ifdef DEFAULT_MOZILLA_FIVE_HOME
-    gtk_moz_embed_set_comp_path(DEFAULT_MOZILLA_FIVE_HOME);
-#  endif
-#endif
-
-    Init_gtk_moz_embed();
-}
-
-G_END_DECLS
diff -pruN 0.19.3-2ubuntu1/.pc/gtkmozembed-rpath.patch/gtkmozembed/extconf.rb 0.19.3-2ubuntu2/.pc/gtkmozembed-rpath.patch/gtkmozembed/extconf.rb
--- 0.19.3-2ubuntu1/.pc/gtkmozembed-rpath.patch/gtkmozembed/extconf.rb	2009-09-23 01:43:01.000000000 +0100
+++ 0.19.3-2ubuntu2/.pc/gtkmozembed-rpath.patch/gtkmozembed/extconf.rb	1970-01-01 01:00:00.000000000 +0100
@@ -1,89 +0,0 @@
-=begin
-extconf.rb for Ruby/GtkMozEmbed extention library
-=end
-
-PACKAGE_NAME = "gtkmozembed"
-PACKAGE_IDS = ["libxul-embedding-unstable",
-               "xulrunner-gtkmozembed",
-               "firefox-gtkmozembed",
-               "seamonkey-gtkmozembed",
-               "mozilla-gtkmozembed"]
-
-TOPDIR = File.expand_path(File.dirname(__FILE__) + '/..')
-MKMF_GNOME2_DIR = TOPDIR + '/glib/src/lib'
-SRCDIR = TOPDIR + '/gtkmozembed/src'
-
-$LOAD_PATH.unshift MKMF_GNOME2_DIR
-
-require 'mkmf-gnome2'
-
-package_id = nil
-PACKAGE_IDS.each do |v|
-  if PKGConfig.exist?(v)
-    package_id = v
-    $stderr.puts "#{v} is found."
-    break
-  else
-    $stderr.puts "#{v} is not found."
-  end
-end
-
-unless package_id
-  $stderr.puts "No gtkmozembed is found. Abort."
-  exit 1
-end
-
-
-#
-# detect GTK+ configurations
-#
-
-PKGConfig.have_package('gtk+-2.0')
-PKGConfig.have_package(package_id)
-setup_win32(PACKAGE_NAME)
-
-mozilla_library_path = PKGConfig.libs_only_L(package_id)
-mozilla_path = mozilla_library_path.strip.sub(/^-L/, "")
-
-if mozilla_path
-  # please comment the CFLAGS line if you don't want a default comp_path
-  $CFLAGS << " -DDEFAULT_MOZILLA_FIVE_HOME='\"#{mozilla_path}\"' "
-  $LDFLAGS << " -Wl,-rpath #{mozilla_path}"
-else
-  $stderr.puts "${package_id}.pc cannot be found."
-  exit 1
-end
-
-add_depend_package("glib2", "glib/src", TOPDIR)
-add_depend_package("gtk2", "gtk/src", TOPDIR)
-
-if have_library("xpcomglue")
-  have_header("gtkmozembed_glue.cpp") or exit 1
-  CONFIG['LDSHARED'].gsub!(/\$\(CC\)/, "$(CXX)")
-elsif have_library("gtkembedmoz")
-  have_func('gtk_moz_embed_new') or exit 1
-  have_func('gtk_moz_embed_set_profile_path') or exit 1
-else
-  exit 1
-end
-
-make_version_header("GTKMOZEMBED", package_id)
-
-create_pkg_config_file('Ruby/GtkMozEmbed', package_id)
-
-create_makefile_at_srcdir(PACKAGE_NAME, SRCDIR,
-                          "-DRUBY_GTKMOZEMBED_COMPILATION") do
-  enum_type_prefix = "gtkmozembed-enum-types"
-  include_paths = PKGConfig.cflags_only_I(package_id)
-  include_paths = include_paths.split.collect do |path|
-    path.strip.sub(/^-I/, '')
-  end
-  headers = include_paths.inject([]) do |result, path|
-    gtkmozembed_h = File.join(path, "gtkmozembed.h")
-    result += [gtkmozembed_h] if File.exist?(gtkmozembed_h)
-    result
-  end
-  glib_mkenums(enum_type_prefix, headers, "GTK_TYPE_", ["gtkmozembed.h"])
-end
-
-create_top_makefile
diff -pruN 0.19.3-2ubuntu1/.pc/poppler_0.15.patch/poppler/src/rbpoppler-page.c 0.19.3-2ubuntu2/.pc/poppler_0.15.patch/poppler/src/rbpoppler-page.c
--- 0.19.3-2ubuntu1/.pc/poppler_0.15.patch/poppler/src/rbpoppler-page.c	1970-01-01 01:00:00.000000000 +0100
+++ 0.19.3-2ubuntu2/.pc/poppler_0.15.patch/poppler/src/rbpoppler-page.c	2008-12-10 12:04:46.000000000 +0000
@@ -0,0 +1,773 @@
+/* -*- c-file-style: "ruby" -*- */
+/**********************************************************************
+
+  rbpoppler-page.c -
+
+  Copyright (C) 2006-2008 Ruby-GNOME2 Project Team
+
+**********************************************************************/
+
+#include "rbpoppler-private.h"
+
+#define SELF(self) (POPPLER_PAGE(RVAL2GOBJ(self)))
+
+#ifndef GDK_TYPE_REGION
+extern GType gdk_region_get_type(void);
+#  define GDK_TYPE_REGION (gdk_region_get_type())
+#endif
+
+#define GDK_REGION2RVAL(obj) (BOXED2RVAL(obj, GDK_TYPE_REGION))
+#define RVAL2GDK_PIXBUF(pixbuf) (GDK_PIXBUF(RVAL2GOBJ(pixbuf)))
+
+
+#define SEL_STYLE2RVAL(obj) (GENUM2RVAL(obj, POPPLER_TYPE_SELECTION_STYLE))
+#define RVAL2SEL_STYLE(obj) (RVAL2GENUM(obj, POPPLER_TYPE_SELECTION_STYLE))
+
+#define RVAL2TRANS(obj) ((PopplerPageTransition *)RVAL2BOXED(obj, POPPLER_TYPE_PAGE_TRANSITION))
+#define TRANS2RVAL(obj) (BOXED2RVAL(obj, POPPLER_TYPE_PAGE_TRANSITION))
+#define RVAL2LM(obj) ((PopplerLinkMapping *)RVAL2BOXED(obj, POPPLER_TYPE_LINK_MAPPING))
+#define RVAL2IM(obj) ((PopplerImageMapping *)RVAL2BOXED(obj, POPPLER_TYPE_IMAGE_MAPPING))
+#define RVAL2FFM(obj) ((PopplerFormFieldMapping *)RVAL2BOXED(obj, POPPLER_TYPE_FORM_FIELD_MAPPING))
+#define RVAL2AM(obj) ((PopplerAnnotMapping *)RVAL2BOXED(obj, POPPLER_TYPE_ANNOT_MAPPING))
+
+#define TT2RVAL(obj) (GENUM2RVAL(obj, POPPLER_TYPE_PAGE_TRANSITION_TYPE))
+#define RVAL2TT(obj) (RVAL2GENUM(obj, POPPLER_TYPE_PAGE_TRANSITION_TYPE))
+#define TA2RVAL(obj) (GENUM2RVAL(obj, POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT))
+#define RVAL2TA(obj) (RVAL2GENUM(obj, POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT))
+#define TD2RVAL(obj) (GENUM2RVAL(obj, POPPLER_TYPE_PAGE_TRANSITION_DIRECTION))
+#define RVAL2TD(obj) (RVAL2GENUM(obj, POPPLER_TYPE_PAGE_TRANSITION_DIRECTION))
+
+static VALUE cPSFile, cRectangle;
+
+#ifdef POPPLER_TYPE_COLOR
+VALUE rb_cPopplerColor;
+
+PopplerColor *
+rb_poppler_ruby_object_to_color(VALUE color)
+{
+#ifdef POPPLER_WITH_GDK
+    if (RTEST(rb_obj_is_kind_of(color, rb_cGdkColor))) {
+	GdkColor *gdk_color;
+
+	gdk_color = RVAL2GDKCOLOR(color);
+	color = rb_funcall(rb_cPopplerColor, rb_intern("new"),
+			   3,
+			   UINT2NUM(gdk_color->red),
+			   UINT2NUM(gdk_color->green),
+			   UINT2NUM(gdk_color->blue));
+    }
+#endif
+
+    return RVAL2BOXED(color, POPPLER_TYPE_COLOR);
+}
+
+VALUE
+rb_poppler_ruby_object_from_color_with_free(PopplerColor *color)
+{
+    VALUE rb_color;
+
+    rb_color = POPPLER_COLOR2RVAL(color);
+    g_free(color);
+    return rb_color;
+}
+#endif
+
+#ifdef POPPLER_WITH_GDK
+static VALUE
+page_render_to_pixbuf(VALUE self, VALUE src_x, VALUE src_y, VALUE src_width,
+                      VALUE src_height, VALUE scale, VALUE rotation,
+                      VALUE pixbuf)
+{
+    poppler_page_render_to_pixbuf(SELF(self), NUM2INT(src_x),
+                                  NUM2INT(src_y), NUM2INT(src_width),
+                                  NUM2INT(src_height), NUM2DBL(scale),
+                                  NUM2INT(rotation), RVAL2GOBJ(pixbuf));
+    return Qnil;
+}
+#endif
+
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+static VALUE
+page_render(VALUE self, VALUE cairo)
+{
+    poppler_page_render(SELF(self), RVAL2CRCONTEXT(cairo));
+    return Qnil;
+}
+#endif
+
+static VALUE
+page_render_to_ps(VALUE self, VALUE ps_file)
+{
+    poppler_page_render_to_ps(SELF(self), RVAL2GOBJ(ps_file));
+    return Qnil;
+}
+
+static VALUE
+page_render_generic(int argc, VALUE *argv, VALUE self)
+{
+    if (argc == 1) {
+        if (RVAL2CBOOL(rb_obj_is_kind_of(argv[0], cPSFile))) {
+            return page_render_to_ps(self, argv[0]);
+        } else {
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+            return page_render(self, argv[0]);
+#else
+            rb_raise(rb_eArgError, "cairo is not available");
+#endif
+        }
+    } else if (argc == 7) {
+#ifdef POPPLER_WITH_GDK
+        return page_render_to_pixbuf(self, argv[0], argv[1], argv[2], argv[3],
+                                     argv[4], argv[5], argv[6]);
+#else
+	rb_raise(rb_eArgError, "GDK is not available");
+#endif
+    } else {
+        rb_raise(rb_eArgError,
+                 "wrong number of arguments (%d for 1 or 7)",
+		 argc);
+    }
+}
+
+#ifdef POPPLER_WITH_GDK
+static VALUE
+page_render_to_pixbuf_for_printing(VALUE self, VALUE src_x, VALUE src_y,
+				   VALUE src_width, VALUE src_height,
+				   VALUE scale, VALUE rotation, VALUE pixbuf)
+{
+    poppler_page_render_to_pixbuf_for_printing(SELF(self), NUM2INT(src_x),
+					       NUM2INT(src_y),
+					       NUM2INT(src_width),
+					       NUM2INT(src_height),
+					       NUM2DBL(scale),
+					       NUM2INT(rotation),
+					       RVAL2GOBJ(pixbuf));
+    return Qnil;
+}
+#endif
+
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+static VALUE
+page_render_for_printing(VALUE self, VALUE cairo)
+{
+    poppler_page_render_for_printing(SELF(self), RVAL2CRCONTEXT(cairo));
+    return Qnil;
+}
+#endif
+
+static VALUE
+page_render_for_printing_generic(int argc, VALUE *argv, VALUE self)
+{
+    if (argc == 1) {
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+	return page_render_for_printing(self, argv[0]);
+#else
+	rb_raise(rb_eArgError, "cairo is not available");
+#endif
+    } else if (argc == 7) {
+#ifdef POPPLER_WITH_GDK
+        return page_render_to_pixbuf_for_printing(self, argv[0], argv[1],
+						  argv[2], argv[3],
+						  argv[4], argv[5], argv[6]);
+#else
+	rb_raise(rb_eArgError, "GDK is not available");
+#endif
+    } else {
+        rb_raise(rb_eArgError,
+                 "wrong number of arguments (%d for 1 or 7)", argc);
+    }
+}
+
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+static VALUE
+page_render_selection(VALUE self, VALUE cairo,
+                      VALUE selection, VALUE rb_old_selection,
+                      VALUE style, VALUE glyph_color, VALUE background_color)
+{
+    PopplerRectangle *old_selection = NULL;
+
+    if (!NIL_P(rb_old_selection))
+        old_selection = RVAL2POPPLER_RECT(rb_old_selection);
+    poppler_page_render_selection(SELF(self), RVAL2CRCONTEXT(cairo),
+                                  RVAL2POPPLER_RECT(selection),
+                                  old_selection,
+                                  RVAL2SEL_STYLE(style),
+                                  RVAL2POPPLER_COLOR(glyph_color),
+                                  RVAL2POPPLER_COLOR(background_color));
+    return Qnil;
+}
+#endif
+
+#ifdef POPPLER_WITH_GDK
+static VALUE
+page_render_selection_to_pixbuf(VALUE self, VALUE scale, VALUE rotation,
+                                VALUE pixbuf, VALUE selection,
+                                VALUE rb_old_selection,
+                                VALUE style,
+                                VALUE glyph_color, VALUE background_color)
+{
+    PopplerRectangle *old_selection = NULL;
+
+    if (!NIL_P(rb_old_selection))
+        old_selection = RVAL2POPPLER_RECT(rb_old_selection);
+    poppler_page_render_selection_to_pixbuf(SELF(self),
+                                            NUM2DBL(scale),
+                                            NUM2INT(rotation),
+                                            RVAL2GOBJ(pixbuf),
+                                            RVAL2POPPLER_RECT(selection),
+                                            old_selection,
+                                            RVAL2SEL_STYLE(style),
+                                            RVAL2GDKCOLOR(glyph_color),
+                                            RVAL2GDKCOLOR(background_color));
+    return Qnil;
+}
+#endif
+
+static VALUE
+page_render_selection_generic(int argc, VALUE *argv, VALUE self)
+{
+    if (argc == 6) {
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+        return page_render_selection(self, argv[0], argv[1], argv[2],
+                                     argv[3], argv[4], argv[5]);
+#else
+        rb_raise(rb_eArgError, "cairo is not available");
+#endif
+    } else if (argc == 8) {
+#ifdef POPPLER_WITH_GDK
+        return page_render_selection_to_pixbuf(self, argv[0], argv[1],
+                                               argv[2], argv[3], argv[4],
+                                               argv[5], argv[6], argv[7]);
+#else
+        rb_raise(rb_eArgError, "GDK is not available");
+#endif
+    } else {
+        rb_raise(rb_eArgError,
+                 "wrong number of arguments (%d for 5 or 8)", argc);
+    }
+}
+
+static VALUE
+page_get_size(VALUE self)
+{
+    double width, height;
+    poppler_page_get_size(SELF(self), &width, &height);
+    return rb_ary_new3(2, rb_float_new(width), rb_float_new(height));
+}
+
+static VALUE
+page_get_index(VALUE self)
+{
+    return INT2NUM(poppler_page_get_index(SELF(self)));
+}
+
+static VALUE
+page_get_duration(VALUE self)
+{
+    return rb_float_new(poppler_page_get_duration(SELF(self)));
+}
+
+static VALUE
+page_get_transition(VALUE self)
+{
+    return TRANS2RVAL(poppler_page_get_transition(SELF(self)));
+}
+
+#if RB_POPPLER_CAIRO_AVAILABLE
+static VALUE
+page_get_thumbnail(VALUE self)
+{
+    return CRSURFACE2RVAL(poppler_page_get_thumbnail(SELF(self)));
+}
+#endif
+
+#ifdef POPPLER_WITH_GDK
+static VALUE
+page_get_thumbnail_pixbuf(VALUE self)
+{
+    return GOBJ2RVAL(poppler_page_get_thumbnail_pixbuf(SELF(self)));
+}
+#endif
+
+static VALUE
+page_get_thumbnail_size(VALUE self)
+{
+    int width, height;
+
+    if (poppler_page_get_thumbnail_size(SELF(self), &width, &height))
+        return rb_ary_new3(2, INT2NUM(width), INT2NUM(height));
+    else
+        return Qnil;
+}
+
+static VALUE
+page_find_text(VALUE self, VALUE text)
+{
+    return GLIST2ARY2F(poppler_page_find_text(SELF(self), RVAL2CSTR(text)),
+                       POPPLER_TYPE_RECTANGLE);
+}
+
+static VALUE
+page_get_text(int argc, VALUE *argv, VALUE self)
+{
+    gchar *text;
+    PopplerSelectionStyle style = POPPLER_SELECTION_GLYPH;
+    VALUE rb_text, arg1, arg2, rb_rect;
+    PopplerPage *page;
+
+    rb_scan_args(argc, argv, "02", &arg1, &arg2);
+
+    page = SELF(self);
+    if (NIL_P(arg1)) {
+        rb_rect = arg2;
+    } else {
+        if (RTEST(rb_obj_is_kind_of(arg2, cRectangle))) {
+            rb_rect = arg2;
+        } else {
+            rb_rect = Qnil;
+            if (!NIL_P(arg2)) {
+                style = RVAL2SEL_STYLE(arg2);
+            }
+        }
+    }
+
+    if (NIL_P(rb_rect)) {
+        PopplerRectangle rect;
+        double width, height;
+
+        rect.x1 = 0;
+        rect.y1 = 0;
+        poppler_page_get_size(page, &width, &height);
+        rect.x2 = width;
+        rect.y2 = height;
+        text = poppler_page_get_text(page,
+                                     style,
+                                     &rect);
+    } else {
+        text = poppler_page_get_text(page,
+                                     style,
+                                     RVAL2POPPLER_RECT(rb_rect));
+    }
+
+    rb_text = CSTR2RVAL(text);
+    g_free(text);
+    return rb_text;
+}
+
+static VALUE
+page_get_selection_region(VALUE self, VALUE scale, VALUE style, VALUE selection)
+{
+    return GLIST2ARY2F(poppler_page_get_selection_region(SELF(self),
+							 NUM2DBL(scale),
+							 RVAL2SEL_STYLE(style),
+							 RVAL2POPPLER_RECT(selection)),
+                       POPPLER_TYPE_RECTANGLE);
+}
+
+static VALUE
+page_get_link_mapping(VALUE self)
+{
+    return GLIST2ARY2F(poppler_page_get_link_mapping(SELF(self)),
+                       POPPLER_TYPE_LINK_MAPPING);
+}
+
+static VALUE
+page_get_image_mapping(VALUE self)
+{
+    VALUE mappings;
+    GList *image_mapping, *node;
+
+    mappings = rb_ary_new();
+    image_mapping = poppler_page_get_image_mapping(SELF(self));
+    for (node = image_mapping; node; node = g_list_next(node)) {
+	PopplerImageMapping *image_mapping;
+	VALUE mapping;
+
+	image_mapping = node->data;
+	mapping = BOXED2RVAL(image_mapping, POPPLER_TYPE_IMAGE_MAPPING);
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+	rb_iv_set(mapping, "@page", self);
+#endif
+	rb_ary_push(mappings, mapping);
+    }
+    poppler_page_free_image_mapping(image_mapping);
+
+    return mappings;
+}
+
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+static VALUE
+_page_get_image(VALUE self, gint image_id)
+{
+    return CRSURFACE2RVAL(poppler_page_get_image(SELF(self), image_id));
+}
+
+static VALUE
+page_get_image(VALUE self, VALUE image_id)
+{
+    return _page_get_image(self, NUM2INT(image_id));
+}
+#endif
+
+static VALUE
+page_get_form_field_mapping(VALUE self)
+{
+    return GLIST2ARY2F(poppler_page_get_form_field_mapping(SELF(self)),
+                       POPPLER_TYPE_FORM_FIELD_MAPPING);
+}
+
+static VALUE
+page_get_annot_mapping(VALUE self)
+{
+    return GLIST2ARY2F(poppler_page_get_annot_mapping(SELF(self)),
+                       POPPLER_TYPE_ANNOT_MAPPING);
+}
+
+static VALUE
+page_get_crop_box(VALUE self)
+{
+    PopplerRectangle rect;
+
+    poppler_page_get_crop_box(SELF(self), &rect);
+    return POPPLER_RECT2RVAL(&rect);
+}
+
+
+/* A rectangle on a page, with coordinates in PDF points. */
+static VALUE
+rectangle_initialize(VALUE self, VALUE x1, VALUE y1, VALUE x2, VALUE y2)
+{
+    PopplerRectangle rectangle;
+
+    rectangle.x1 = NUM2DBL(x1);
+    rectangle.y1 = NUM2DBL(y1);
+    rectangle.x2 = NUM2DBL(x2);
+    rectangle.y2 = NUM2DBL(y2);
+
+    G_INITIALIZE(self, &rectangle);
+    return Qnil;
+}
+
+DEF_ACCESSOR(rectangle, x1, RVAL2POPPLER_RECT, rb_float_new, NUM2DBL)
+DEF_ACCESSOR(rectangle, y1, RVAL2POPPLER_RECT, rb_float_new, NUM2DBL)
+DEF_ACCESSOR(rectangle, x2, RVAL2POPPLER_RECT, rb_float_new, NUM2DBL)
+DEF_ACCESSOR(rectangle, y2, RVAL2POPPLER_RECT, rb_float_new, NUM2DBL)
+
+static VALUE
+rectangle_to_a(VALUE self)
+{
+    PopplerRectangle *rectangle = RVAL2POPPLER_RECT(self);
+    return rb_ary_new3(4,
+                       rb_float_new(rectangle->x1),
+                       rb_float_new(rectangle->y1),
+                       rb_float_new(rectangle->x2),
+                       rb_float_new(rectangle->y2));
+}
+
+static VALUE
+rectangle_inspect(VALUE self)
+{
+    VALUE inspected;
+    gchar *points;
+    PopplerRectangle *rectangle;
+
+    rectangle = RVAL2POPPLER_RECT(self);
+    inspected = rb_call_super(0, NULL);
+    rb_str_resize(inspected, RSTRING_LEN(inspected) - 1);
+    points = g_strdup_printf(": [%g, %g, %g, %g]>",
+			     rectangle->x1, rectangle->y1,
+			     rectangle->x2, rectangle->y2);
+    rb_str_cat2(inspected, points);
+    g_free(points);
+    return inspected;
+}
+
+
+#ifdef POPPLER_TYPE_COLOR
+/* A color in RGB */
+static VALUE
+color_initialize(VALUE self, VALUE red, VALUE green, VALUE blue)
+{
+    PopplerColor color;
+
+    color.red = NUM2UINT(red);
+    color.green = NUM2UINT(green);
+    color.blue = NUM2UINT(blue);
+
+    G_INITIALIZE(self, &color);
+    return Qnil;
+}
+
+DEF_ACCESSOR(color, red, RVAL2POPPLER_COLOR, UINT2NUM, NUM2UINT)
+DEF_ACCESSOR(color, green, RVAL2POPPLER_COLOR, UINT2NUM, NUM2UINT)
+DEF_ACCESSOR(color, blue, RVAL2POPPLER_COLOR, UINT2NUM, NUM2UINT)
+
+static VALUE
+color_to_a(VALUE self)
+{
+    PopplerColor *color;
+    color = RVAL2POPPLER_COLOR(self);
+    return rb_ary_new3(3,
+                       UINT2NUM(color->red),
+                       UINT2NUM(color->green),
+                       UINT2NUM(color->blue));
+}
+
+static VALUE
+color_inspect(VALUE self)
+{
+    VALUE inspected;
+    gchar *rgb;
+    PopplerColor *color;
+
+    color = RVAL2POPPLER_COLOR(self);
+    inspected = rb_call_super(0, NULL);
+    rb_str_resize(inspected, RSTRING_LEN(inspected) - 1);
+    rgb = g_strdup_printf(": [%u, %u, %u]>",
+			  color->red, color->green, color->blue);
+    rb_str_cat2(inspected, rgb);
+    g_free(rgb);
+    return inspected;
+}
+#endif
+
+
+/* Mapping between areas on the current page and PopplerActions */
+#define RECT_ENTITY2RVAL(rect) POPPLER_RECT2RVAL(&(rect))
+#define RECT_ENTITY_SET(rect, rb_rect) rectangle_set(&(rect), rb_rect)
+static void
+rectangle_set(PopplerRectangle *rect, VALUE rb_rect)
+{
+    *rect = *(RVAL2POPPLER_RECT(rb_rect));
+}
+
+DEF_ACCESSOR_WITH_SETTER(link_mapping, area,
+                         RVAL2LM, RECT_ENTITY2RVAL, RECT_ENTITY_SET)
+DEF_ACCESSOR(link_mapping, action, RVAL2LM,
+	     POPPLER_ACTION2RVAL, RVAL2POPPLER_ACTION)
+
+
+/* Page Transition */
+DEF_ACCESSOR(page_trans, type, RVAL2TRANS, RVAL2TT, TT2RVAL)
+DEF_ACCESSOR(page_trans, alignment, RVAL2TRANS, RVAL2TA, TA2RVAL)
+DEF_ACCESSOR(page_trans, direction, RVAL2TRANS, RVAL2TD, TD2RVAL)
+DEF_ACCESSOR(page_trans, duration, RVAL2TRANS, NUM2INT, INT2NUM)
+DEF_ACCESSOR(page_trans, angle, RVAL2TRANS, NUM2INT, INT2NUM)
+DEF_ACCESSOR(page_trans, scale, RVAL2TRANS, NUM2DBL, rb_float_new)
+DEF_ACCESSOR(page_trans, rectangular, RVAL2TRANS, RVAL2CBOOL, CBOOL2RVAL)
+
+
+/* Mapping between areas on the current page and images */
+DEF_ACCESSOR_WITH_SETTER(image_mapping, area,
+                         RVAL2IM, RECT_ENTITY2RVAL, RECT_ENTITY_SET)
+DEF_ACCESSOR(image_mapping, image_id, RVAL2IM, INT2NUM, NUM2INT)
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+static VALUE
+image_mapping_get_image(VALUE self)
+{
+    return _page_get_image(rb_iv_get(self, "@page"), RVAL2IM(self)->image_id);
+}
+#endif
+
+
+/* Mapping between areas on the current page and form fields */
+DEF_ACCESSOR_WITH_SETTER(form_field_mapping, area,
+                         RVAL2FFM, RECT_ENTITY2RVAL, RECT_ENTITY_SET)
+DEF_ACCESSOR(form_field_mapping, field, RVAL2FFM,
+	     POPPLER_FORM_FIELD2RVAL, RVAL2POPPLER_FORM_FIELD)
+
+static VALUE
+annot_mapping_initialize(int argc, VALUE *argv, VALUE self)
+{
+    VALUE area, annotation;
+    PopplerAnnotMapping *mapping;
+
+    rb_scan_args(argc, argv, "02", &area, &annotation);
+
+    mapping = poppler_annot_mapping_new();
+    mapping->area = *RVAL2POPPLER_RECT(area);
+    mapping->annot = RVAL2POPPLER_ANNOT(annotation);
+    G_INITIALIZE(self, mapping);
+
+    return Qnil;
+}
+
+DEF_ACCESSOR_WITH_SETTER(annot_mapping, area,
+                         RVAL2AM, RECT_ENTITY2RVAL, RECT_ENTITY_SET)
+DEF_READER(annot_mapping, annotation, annot, RVAL2AM, POPPLER_ANNOT2RVAL)
+
+static VALUE
+annot_mapping_set_annotation(VALUE self, VALUE annotation)
+{
+    PopplerAnnotMapping *mapping;
+
+    mapping = RVAL2AM(self);
+    if (mapping->annot)
+	g_object_unref(mapping->annot);
+
+    mapping->annot = RVAL2POPPLER_ANNOT(annotation);
+    return Qnil;
+}
+
+void
+Init_poppler_page(VALUE mPoppler)
+{
+    VALUE cPage, cLinkMapping;
+    VALUE cPageTransition, cImageMapping, cFormFieldMapping;
+    VALUE cAnnotationMapping;
+
+    cPage = G_DEF_CLASS(POPPLER_TYPE_PAGE, "Page", mPoppler);
+    cRectangle = G_DEF_CLASS(POPPLER_TYPE_RECTANGLE, "Rectangle", mPoppler);
+#ifdef POPPLER_TYPE_COLOR
+    rb_cPopplerColor = G_DEF_CLASS(POPPLER_TYPE_COLOR, "Color", mPoppler);
+#endif
+    cLinkMapping = G_DEF_CLASS(POPPLER_TYPE_LINK_MAPPING, "LinkMapping",
+                               mPoppler);
+    cPageTransition = G_DEF_CLASS(POPPLER_TYPE_PAGE_TRANSITION,
+                                  "PageTransition", mPoppler);
+    cImageMapping = G_DEF_CLASS(POPPLER_TYPE_IMAGE_MAPPING,
+                                "ImageMapping", mPoppler);
+    cFormFieldMapping = G_DEF_CLASS(POPPLER_TYPE_FORM_FIELD_MAPPING,
+                                    "FormFieldMapping", mPoppler);
+    cAnnotationMapping = G_DEF_CLASS(POPPLER_TYPE_ANNOT_MAPPING,
+				     "AnnotationMapping", mPoppler);
+    cPSFile = rb_const_get(mPoppler, rb_intern("PSFile"));
+
+    rb_define_method(cPage, "render", page_render_generic, -1);
+    rb_define_method(cPage, "render_for_printing",
+		     page_render_for_printing_generic, -1);
+    rb_define_method(cPage, "size", page_get_size, 0);
+    rb_define_method(cPage, "index", page_get_index, 0);
+    rb_define_method(cPage, "duration", page_get_duration, 0);
+    rb_define_method(cPage, "transition", page_get_transition, 0);
+
+#if RB_POPPLER_CAIRO_AVAILABLE
+    rb_define_method(cPage, "thumbnail", page_get_thumbnail, 0);
+#endif
+#if POPPLER_WITH_GDK
+    rb_define_method(cPage, "thumbnail_pixbuf", page_get_thumbnail_pixbuf, 0);
+#endif
+    rb_define_method(cPage, "thumbnail_size", page_get_thumbnail_size, 0);
+    rb_define_method(cPage, "find_text", page_find_text, 1);
+    rb_define_method(cPage, "get_text", page_get_text, -1);
+    rb_define_method(cPage, "get_selection_region",
+		     page_get_selection_region, 3);
+    rb_define_method(cPage, "link_mapping", page_get_link_mapping, 0);
+    rb_define_method(cPage, "image_mapping", page_get_image_mapping, 0);
+#if RB_POPPLER_CAIRO_AVAILABLE
+    rb_define_method(cPage, "get_image", page_get_image, 1);
+#endif
+
+    rb_define_method(cPage, "form_field_mapping",
+                     page_get_form_field_mapping, 0);
+    rb_define_method(cPage, "annotation_mapping",
+                     page_get_annot_mapping, 0);
+    rb_define_method(cPage, "render_selection",
+                     page_render_selection_generic, -1);
+    rb_define_method(cPage, "crop_box", page_get_crop_box, 0);
+
+    G_DEF_SETTERS(cPage);
+
+/* A rectangle on a page, with coordinates in PDF points. */
+    rb_define_method(cRectangle, "initialize", rectangle_initialize, 4);
+    rb_define_method(cRectangle, "x1", rectangle_get_x1, 0);
+    rb_define_method(cRectangle, "y1", rectangle_get_y1, 0);
+    rb_define_method(cRectangle, "x2", rectangle_get_x2, 0);
+    rb_define_method(cRectangle, "y2", rectangle_get_y2, 0);
+    rb_define_method(cRectangle, "set_x1", rectangle_set_x1, 1);
+    rb_define_method(cRectangle, "set_y1", rectangle_set_y1, 1);
+    rb_define_method(cRectangle, "set_x2", rectangle_set_x2, 1);
+    rb_define_method(cRectangle, "set_y2", rectangle_set_y2, 1);
+    rb_define_method(cRectangle, "to_a", rectangle_to_a, 0);
+    rb_define_method(cRectangle, "inspect", rectangle_inspect, 0);
+
+    G_DEF_SETTERS(cRectangle);
+
+#ifdef POPPLER_TYPE_COLOR
+/* A color in RGB */
+    rb_define_method(rb_cPopplerColor, "initialize", color_initialize, 3);
+    rb_define_method(rb_cPopplerColor, "red", color_get_red, 0);
+    rb_define_method(rb_cPopplerColor, "green", color_get_green, 0);
+    rb_define_method(rb_cPopplerColor, "blue", color_get_blue, 0);
+    rb_define_method(rb_cPopplerColor, "set_red", color_set_red, 1);
+    rb_define_method(rb_cPopplerColor, "set_green", color_set_green, 1);
+    rb_define_method(rb_cPopplerColor, "set_blue", color_set_blue, 1);
+    rb_define_method(rb_cPopplerColor, "to_a", color_to_a, 0);
+    rb_define_method(rb_cPopplerColor, "inspect", color_inspect, 0);
+
+    G_DEF_SETTERS(rb_cPopplerColor);
+#endif
+
+/* Mapping between areas on the current page and PopplerActions */
+    rb_define_method(cLinkMapping, "area", link_mapping_get_area, 0);
+    rb_define_method(cLinkMapping, "action", link_mapping_get_action, 0);
+
+    rb_define_method(cLinkMapping, "set_area", link_mapping_set_area, 1);
+    rb_define_method(cLinkMapping, "set_action", link_mapping_set_action, 1);
+
+    G_DEF_SETTERS(cLinkMapping);
+
+/* Page Transition */
+    rb_define_method(cPageTransition, "type", page_trans_get_type, 0);
+    rb_define_method(cPageTransition, "alignment", page_trans_get_alignment, 0);
+    rb_define_method(cPageTransition, "direction", page_trans_get_direction, 0);
+    rb_define_method(cPageTransition, "duration", page_trans_get_duration, 0);
+    rb_define_method(cPageTransition, "angle", page_trans_get_angle, 0);
+    rb_define_method(cPageTransition, "scale", page_trans_get_scale, 0);
+    rb_define_method(cPageTransition, "rectangular",
+                     page_trans_get_rectangular, 0);
+
+    rb_define_method(cPageTransition, "set_type", page_trans_set_type, 1);
+    rb_define_method(cPageTransition, "set_alignment",
+                     page_trans_set_alignment, 1);
+    rb_define_method(cPageTransition, "set_direction",
+                     page_trans_set_direction, 1);
+    rb_define_method(cPageTransition, "set_duration",
+                     page_trans_set_duration, 1);
+    rb_define_method(cPageTransition, "set_angle", page_trans_set_angle, 1);
+    rb_define_method(cPageTransition, "set_scale", page_trans_set_scale, 1);
+    rb_define_method(cPageTransition, "set_rectangular",
+                     page_trans_set_rectangular, 1);
+
+    G_DEF_SETTERS(cPageTransition);
+
+
+/* Mapping between areas on the current page and images */
+    rb_define_method(cImageMapping, "area", image_mapping_get_area, 0);
+    rb_define_method(cImageMapping, "image_id", image_mapping_get_image_id, 0);
+#ifdef RB_POPPLER_CAIRO_AVAILABLE
+    rb_define_method(cImageMapping, "image", image_mapping_get_image, 0);
+#endif
+
+    rb_define_method(cImageMapping, "set_area", image_mapping_set_area, 1);
+    rb_define_method(cImageMapping, "set_image_id",
+		     image_mapping_set_image_id, 1);
+
+    G_DEF_SETTERS(cImageMapping);
+
+
+/* Mapping between areas on the current page and form fields */
+    rb_define_method(cFormFieldMapping, "area", form_field_mapping_get_area, 0);
+    rb_define_method(cFormFieldMapping, "field", form_field_mapping_get_field,
+                     0);
+
+    rb_define_method(cFormFieldMapping, "set_area",
+                     form_field_mapping_set_area, 1);
+    rb_define_method(cFormFieldMapping, "set_field",
+                     form_field_mapping_set_field, 1);
+
+    G_DEF_SETTERS(cFormFieldMapping);
+
+    rb_define_method(cAnnotationMapping, "initialize",
+		     annot_mapping_initialize, -1);
+
+    rb_define_method(cAnnotationMapping, "area", annot_mapping_get_area, 0);
+    rb_define_method(cAnnotationMapping, "annotation",
+		     annot_mapping_get_annotation, 0);
+
+    rb_define_method(cAnnotationMapping, "set_area", annot_mapping_set_area, 1);
+    rb_define_method(cAnnotationMapping, "set_annotation",
+		     annot_mapping_set_annotation, 1);
+
+    G_DEF_SETTERS(cAnnotationMapping);
+}
diff -pruN 0.19.3-2ubuntu1/poppler/src/rbpoppler-page.c 0.19.3-2ubuntu2/poppler/src/rbpoppler-page.c
--- 0.19.3-2ubuntu1/poppler/src/rbpoppler-page.c	2008-12-10 12:04:46.000000000 +0000
+++ 0.19.3-2ubuntu2/poppler/src/rbpoppler-page.c	2011-06-10 05:40:37.000000000 +0100
@@ -332,6 +332,9 @@ page_get_text(int argc, VALUE *argv, VAL
     }
 
     if (NIL_P(rb_rect)) {
+#if POPPLER_CHECK_VERSION(0, 15, 0)
+        text = poppler_page_get_text(page);
+#else
         PopplerRectangle rect;
         double width, height;
 
@@ -343,10 +346,16 @@ page_get_text(int argc, VALUE *argv, VAL
         text = poppler_page_get_text(page,
                                      style,
                                      &rect);
+#endif
     } else {
-        text = poppler_page_get_text(page,
-                                     style,
-                                     RVAL2POPPLER_RECT(rb_rect));
+        PopplerRectangle *rect;
+
+	rect = RVAL2POPPLER_RECT(rb_rect);
+#if POPPLER_CHECK_VERSION(0, 15, 0)
+        text = poppler_page_get_selected_text(page, style, rect);
+#else
+        text = poppler_page_get_text(page, style, rect);
+#endif
     }
 
     rb_text = CSTR2RVAL(text);


More information about the Pkg-ruby-extras-maintainers mailing list