[DRE-commits] r2732 - in packages/ruby-gnome2/trunk/debian: . patches

michi-guest at alioth.debian.org michi-guest at alioth.debian.org
Thu May 29 15:55:48 UTC 2008


Author: michi-guest
Date: 2008-05-29 15:55:47 +0000 (Thu, 29 May 2008)
New Revision: 2732

Added:
   packages/ruby-gnome2/trunk/debian/patches/poppler-0.7.patch
Modified:
   packages/ruby-gnome2/trunk/debian/changelog
   packages/ruby-gnome2/trunk/debian/control
   packages/ruby-gnome2/trunk/debian/patches/series
Log:
[ruby-gnome2] Fix FTBFS #482242 with current libpoppler-glib in unstable


Modified: packages/ruby-gnome2/trunk/debian/changelog
===================================================================
--- packages/ruby-gnome2/trunk/debian/changelog	2008-05-27 13:46:54 UTC (rev 2731)
+++ packages/ruby-gnome2/trunk/debian/changelog	2008-05-29 15:55:47 UTC (rev 2732)
@@ -1,8 +1,11 @@
-ruby-gnome2 (0.16.0-12) UNRELEASED; urgency=low
+ruby-gnome2 (0.16.0-12) UNRELEASED; urgency=medium
 
   * NOT RELEASED YET
+  * Added poppler-0.7.patch taken from upstream SVN revision 2865 to build
+    with newest version of libpoppler-glib in unstable, closes: #482242.
+  * Added myself to Uploaders.
 
- -- Arnaud Cornet <acornet at debian.org>  Thu, 20 Mar 2008 00:03:35 +0100
+ -- Michael Schutte <m.schutte.jr at gmail.com>  Thu, 29 May 2008 17:54:48 +0200
 
 ruby-gnome2 (0.16.0-11) unstable; urgency=low
 

Modified: packages/ruby-gnome2/trunk/debian/control
===================================================================
--- packages/ruby-gnome2/trunk/debian/control	2008-05-27 13:46:54 UTC (rev 2731)
+++ packages/ruby-gnome2/trunk/debian/control	2008-05-29 15:55:47 UTC (rev 2732)
@@ -2,7 +2,7 @@
 Section: libs
 Priority: optional
 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>
+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>
 Build-Depends: ruby-pkg-tools (>= 0.8), cdbs, debhelper (>= 4), ruby, ruby1.8, ruby1.8-dev, libgnomeui-dev, libglade2-dev, libgtkhtml2-dev, libpng12-dev, libgtkglext1-dev, libxmu-dev, libgtksourceview-dev, libpanel-applet2-dev, libgnomeprint2.2-dev (>= 2.8.0), libgnomeprintui2.2-dev (>= 2.6.0), librsvg2-dev (>= 2.8.0), libcairo-ruby, libxul-dev, libvte-dev (>= 0.12.1), libpoppler-glib-dev (>= 0.5.2), pkg-config, quilt
 Standards-Version: 3.7.3
 Homepage: http://ruby-gnome2.sourceforge.jp/

Added: packages/ruby-gnome2/trunk/debian/patches/poppler-0.7.patch
===================================================================
--- packages/ruby-gnome2/trunk/debian/patches/poppler-0.7.patch	                        (rev 0)
+++ packages/ruby-gnome2/trunk/debian/patches/poppler-0.7.patch	2008-05-29 15:55:47 UTC (rev 2732)
@@ -0,0 +1,251 @@
+Index: ruby-gnome2-0.16.0/poppler/ChangeLog
+===================================================================
+--- ruby-gnome2-0.16.0.orig/poppler/ChangeLog	2008-05-29 17:13:17.000000000 +0200
++++ ruby-gnome2-0.16.0/poppler/ChangeLog	2008-05-29 17:13:46.000000000 +0200
+@@ -1,3 +1,8 @@
++2008-03-20  Kouhei Sutou  <kou at cozmixng.org>
++
++	* src/rbpoppler.[ch], src/rbpoppler-page.c: just buildable with
++	poppler-glib 0.7.3.
++
+ 2007-11-11  Kouhei Sutou  <kou at cozmixng.org>
+ 
+ 	* README: updated supported poppler-glib version: 0.5.2 - 0.6.2.
+Index: ruby-gnome2-0.16.0/poppler/src/rbpoppler-page.c
+===================================================================
+--- ruby-gnome2-0.16.0.orig/poppler/src/rbpoppler-page.c	2008-05-29 17:13:16.000000000 +0200
++++ ruby-gnome2-0.16.0/poppler/src/rbpoppler-page.c	2008-05-29 17:13:25.000000000 +0200
+@@ -39,6 +39,33 @@
+ VALUE cUnknownField, cTextField, cButtonField, cChoiceField, cSignatureField;
+ #endif
+ 
++#ifdef POPPLER_TYPE_COLOR
++extern VALUE mGdk;
++VALUE rb_cPopplerColor;
++
++PopplerColor *
++rb_poppler_ruby_object_to_color(VALUE color)
++{
++    static VALUE rb_cGdkColor = Qnil;
++
++    if (NIL_P(rb_cGdkColor)) {
++	rb_cGdkColor = rb_const_get(mGdk, rb_intern("Color"));
++    }
++
++    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));
++    }
++
++    return RVAL2BOXED(color, POPPLER_TYPE_COLOR);
++}
++#endif
++
+ static VALUE
+ page_render_to_pixbuf(VALUE self, VALUE src_x, VALUE src_y, VALUE src_width,
+                       VALUE src_height, VALUE scale, VALUE rotation,
+@@ -293,8 +320,8 @@
+ #ifdef HAVE_POPPLER_PAGE_RENDER_SELECTION_TO_PIXBUF
+                                             RVAL2SELSTYLE(style),
+ #endif
+-                                            RVAL2COLOR(glyph_color),
+-                                            RVAL2COLOR(background_color));
++                                            RVAL2GDKCOLOR(glyph_color),
++                                            RVAL2GDKCOLOR(background_color));
+     return Qnil;
+ }
+ 
+@@ -415,6 +442,55 @@
+ }
+ 
+ 
++#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, RVAL2COLOR, UINT2NUM, NUM2UINT)
++DEF_ACCESSOR(color, green, RVAL2COLOR, UINT2NUM, NUM2UINT)
++DEF_ACCESSOR(color, blue, RVAL2COLOR, UINT2NUM, NUM2UINT)
++
++static VALUE
++color_to_a(VALUE self)
++{
++    PopplerColor *color;
++    color = RVAL2COLOR(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 = RVAL2COLOR(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) RECT2RVAL(&(rect))
+ #define RECT_ENTITY_SET(rect, rb_rect) rectangle_set(&(rect), rb_rect)
+@@ -443,7 +519,11 @@
+ /* Mapping between areas on the current page and images */
+ DEF_ACCESSOR_WITH_SETTER(image_mapping, area,
+                          RVAL2IM, RECT_ENTITY2RVAL, RECT_ENTITY_SET)
++#ifdef HAVE_ST_IMAGE_ID
++DEF_ACCESSOR(image_mapping, image_id, RVAL2IM, INT2NUM, NUM2INT)
++#else
+ DEF_ACCESSOR(image_mapping, image, RVAL2IM, GOBJ2RVAL, RVAL2GDK_PIXBUF)
++#endif
+ 
+ 
+ /* Mapping between areas on the current page and form fields */
+@@ -668,6 +748,9 @@
+ 
+     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);
+ #if POPPLER_CHECK_VERSION(0, 6, 0)
+@@ -729,6 +812,21 @@
+ 
+     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);
+@@ -766,10 +864,19 @@
+ 
+ /* Mapping between areas on the current page and images */
+     rb_define_method(cImageMapping, "area", image_mapping_get_area, 0);
++#ifdef HAVE_ST_IMAGE_ID
++    rb_define_method(cImageMapping, "image_id", image_mapping_get_image_id, 0);
++#else
+     rb_define_method(cImageMapping, "image", image_mapping_get_image, 0);
++#endif
+ 
+     rb_define_method(cImageMapping, "set_area", image_mapping_set_area, 1);
++#ifdef HAVE_ST_IMAGE_ID
++    rb_define_method(cImageMapping, "set_image_id",
++		     image_mapping_set_image_id, 1);
++#else
+     rb_define_method(cImageMapping, "set_image", image_mapping_set_image, 1);
++#endif
+ 
+     G_DEF_SETTERS(cImageMapping);
+ 
+Index: ruby-gnome2-0.16.0/poppler/src/rbpoppler.c
+===================================================================
+--- ruby-gnome2-0.16.0.orig/poppler/src/rbpoppler.c	2008-05-29 17:13:16.000000000 +0200
++++ ruby-gnome2-0.16.0/poppler/src/rbpoppler.c	2008-05-29 17:13:25.000000000 +0200
+@@ -50,6 +50,7 @@
+ 
+     G_DEF_CLASS(POPPLER_TYPE_ERROR, "Error", mPoppler);
+     G_DEF_CLASS(POPPLER_TYPE_ORIENTATION, "Orientation", mPoppler);
++
+ #if POPPLER_CHECK_VERSION(0, 6, 0)
+     G_DEF_CLASS(POPPLER_TYPE_PAGE_TRANSITION_TYPE,
+                 "PageTransitionType", mPoppler);
+@@ -61,8 +62,24 @@
+     G_DEF_CLASS(POPPLER_TYPE_FORM_BUTTON_TYPE, "FormButtonType", mPoppler);
+     G_DEF_CLASS(POPPLER_TYPE_FORM_TEXT_TYPE, "FormTextType", mPoppler);
+     G_DEF_CLASS(POPPLER_TYPE_FORM_CHOICE_TYPE, "FormChoiceType", mPoppler);
++#endif
+ 
++#if POPPLER_CHECK_VERSION(0, 7, 2)
++    G_RENAME_NICK("3D", "TYPE_3D");
++    G_DEF_CLASS(POPPLER_TYPE_ANNOT_TYPE, "AnnotationType", mPoppler);
++    G_DEF_CLASS(POPPLER_TYPE_ANNOT_FLAG, "AnnotationFlag", mPoppler);
++    G_DEF_CLASS(POPPLER_TYPE_ANNOT_MARKUP_REPLY_TYPE,
++		"AnnotationMarkupReplyType", mPoppler);
++    G_RENAME_NICK("3D", "TYPE_3D");
++    G_DEF_CLASS(POPPLER_TYPE_ANNOT_EXTERNAL_DATA_TYPE,
++		"AnnotationExternalDataType", mPoppler);
++    G_DEF_CLASS(POPPLER_TYPE_ANNOT_TEXT_ICON, "AnnotationTextIcon", mPoppler);
++    G_DEF_CLASS(POPPLER_TYPE_ANNOT_TEXT_STATE, "AnnotationTextState", mPoppler);
++    G_DEF_CLASS(POPPLER_TYPE_ANNOT_FREE_TEXT_QUADDING,
++		"AnnotationFreeTextQuadding", mPoppler);
+ #endif
++
++
+     G_DEF_CLASS(POPPLER_TYPE_BACKEND, "Backend", mPoppler);
+ 
+     rb_define_module_function(mPoppler, "backend", get_backend, 0);
+Index: ruby-gnome2-0.16.0/poppler/src/rbpoppler.h
+===================================================================
+--- ruby-gnome2-0.16.0.orig/poppler/src/rbpoppler.h	2008-05-29 17:13:16.000000000 +0200
++++ ruby-gnome2-0.16.0/poppler/src/rbpoppler.h	2008-05-29 17:13:25.000000000 +0200
+@@ -46,7 +46,14 @@
+ #define RVAL2ACTIONTYPE(obj) (RVAL2GENUM(obj, POPPLER_TYPE_ACTION_TYPE))
+ #define SELSTYLE2RVAL(obj) (GENUM2RVAL(obj, POPPLER_TYPE_SELECTION_STYLE))
+ #define RVAL2SELSTYLE(obj) (RVAL2GENUM(obj, POPPLER_TYPE_SELECTION_STYLE))
+-#define RVAL2COLOR(obj) ((GdkColor *)RVAL2BOXED(obj, GDK_TYPE_COLOR))
++#define RVAL2GDKCOLOR(obj) ((GdkColor *)RVAL2BOXED(obj, GDK_TYPE_COLOR))
++
++#ifdef POPPLER_TYPE_COLOR
++extern PopplerColor *rb_poppler_ruby_object_to_color(VALUE color);
++#  define RVAL2COLOR(obj) (rb_poppler_ruby_object_to_color(obj))
++#else
++#  define RVAL2COLOR(obj) (RVAL2GDKCOLOR(obj))
++#endif
+ 
+ #define ACTION2RVAL(obj) (rb_poppler_ruby_object_from_action(obj))
+ #define RVAL2ACTION(obj) (rb_poppler_action_from_ruby_object(obj))
+Index: ruby-gnome2-0.16.0/poppler/extconf.rb
+===================================================================
+--- ruby-gnome2-0.16.0.orig/poppler/extconf.rb	2008-05-29 17:13:17.000000000 +0200
++++ ruby-gnome2-0.16.0/poppler/extconf.rb	2008-05-29 17:13:25.000000000 +0200
+@@ -31,6 +31,7 @@
+ 
+ make_version_header("POPPLER", PACKAGE_ID)
+ have_func("poppler_page_render_selection_to_pixbuf")
++have_struct_member("PopplerImageMapping", "image_id", ["poppler.h"])
+ 
+ create_makefile_at_srcdir(PACKAGE_NAME, SRCDIR, "-DRUBY_POPPLER_COMPILATION")
+ create_top_makefile

Modified: packages/ruby-gnome2/trunk/debian/patches/series
===================================================================
--- packages/ruby-gnome2/trunk/debian/patches/series	2008-05-27 13:46:54 UTC (rev 2731)
+++ packages/ruby-gnome2/trunk/debian/patches/series	2008-05-29 15:55:47 UTC (rev 2732)
@@ -10,3 +10,4 @@
 poppler-0.6.patch
 CVE-2007-6183.patch
 glib-mkenums.patch
+poppler-0.7.patch




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