aboutsummaryrefslogtreecommitdiff
path: root/python/pypoppler/patches
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2011-03-28 01:26:21 -0400
committerRobby Workman <rworkman@slackbuilds.org>2011-03-29 00:07:26 -0500
commit6e3ec235efd0b13eb5862780d9ce529205b89d63 (patch)
treea25fb3d3c200fcd862dceb6696961362a27bfa5f /python/pypoppler/patches
parenta496a5d0540baf3adaf8d1b988a63c8d69833d1b (diff)
python/pypoppler: Patched to build with poppler 0.16.
Patched for poppler 0.16 and added some upstream fixes. Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'python/pypoppler/patches')
-rw-r--r--python/pypoppler/patches/poppler0.15.0-changes.patch66
-rw-r--r--python/pypoppler/patches/pypoppler-0.12.1-75_74.diff73
-rw-r--r--python/pypoppler/patches/pypoppler-0.12.1-76_75.diff66
-rw-r--r--python/pypoppler/patches/pypoppler-0.12.1-79_78.diff52
4 files changed, 257 insertions, 0 deletions
diff --git a/python/pypoppler/patches/poppler0.15.0-changes.patch b/python/pypoppler/patches/poppler0.15.0-changes.patch
new file mode 100644
index 0000000000000..a480cfa437a85
--- /dev/null
+++ b/python/pypoppler/patches/poppler0.15.0-changes.patch
@@ -0,0 +1,66 @@
+--- poppler.defs
++++ poppler.defs
+@@ -1760,6 +1760,12 @@
+ (return-type "int")
+ )
+
++(define-method get_label
++ (of-object "PopplerPage")
++ (c-name "poppler_page_get_label")
++ (return-type "gchar*")
++)
++
+ (define-method get_duration
+ (of-object "PopplerPage")
+ (c-name "poppler_page_get_duration")
+@@ -1805,9 +1811,15 @@
+ (of-object "PopplerPage")
+ (c-name "poppler_page_get_text")
+ (return-type "char*")
++)
++
++(define-method get_selected_text
++ (of-object "PopplerPage")
++ (c-name "poppler_page_get_selected_text")
++ (return-type "char*")
+ (parameters
+ '("PopplerSelectionStyle" "style")
+- '("PopplerRectangle*" "rect")
++ '("PopplerRectangle*" "selection")
+ )
+ )
+
+@@ -1895,6 +1907,16 @@
+ )
+ )
+
++(define-function poppler_page_add_annot
++ (of-object "PopplerPage")
++ (c-name "poppler_page_add_annot")
++ (return-type "none")
++ (parameters
++ '("PopplerAnnot*" "annot")
++ '("GList*" "list")
++ )
++)
++
+ (define-method get_crop_box
+ (of-object "PopplerPage")
+ (c-name "poppler_page_get_crop_box")
+@@ -1904,6 +1926,16 @@
+ )
+ )
+
++(define-method get_text_layout
++ (of-object "PopplerPage")
++ (c-name "poppler_page_get_text_layout")
++ (return-type "gboolean")
++ (parameters
++ '("PopplerRectangle**" "rectangles")
++ '("guint*" "n_rectangles")
++ )
++)
++
+ (define-function poppler_rectangle_get_type
+ (c-name "poppler_rectangle_get_type")
+ (return-type "GType")
diff --git a/python/pypoppler/patches/pypoppler-0.12.1-75_74.diff b/python/pypoppler/patches/pypoppler-0.12.1-75_74.diff
new file mode 100644
index 0000000000000..47b7a678e3df8
--- /dev/null
+++ b/python/pypoppler/patches/pypoppler-0.12.1-75_74.diff
@@ -0,0 +1,73 @@
+--- poppler.defs
++++ poppler.defs
+@@ -1642,6 +1642,7 @@
+ (of-object "PopplerPage")
+ (c-name "poppler_page_render_to_pixbuf")
+ (return-type "none")
++ (unblock-threads #t)
+ (parameters
+ '("int" "src_x")
+ '("int" "src_y")
+@@ -1657,6 +1658,7 @@
+ (of-object "PopplerPage")
+ (c-name "poppler_page_render_to_pixbuf_for_printing")
+ (return-type "none")
++ (unblock-threads #t)
+ (parameters
+ '("int" "src_x")
+ '("int" "src_y")
+@@ -1672,12 +1674,14 @@
+ (of-object "PopplerPage")
+ (c-name "poppler_page_get_thumbnail_pixbuf")
+ (return-type "GdkPixbuf*")
++ (unblock-threads #t)
+ )
+
+ (define-method render_selection_to_pixbuf
+ (of-object "PopplerPage")
+ (c-name "poppler_page_render_selection_to_pixbuf")
+ (return-type "none")
++ (unblock-threads #t)
+ (parameters
+ '("gdouble" "scale")
+ '("int" "rotation")
+@@ -1694,6 +1698,7 @@
+ (of-object "PopplerPage")
+ (c-name "poppler_page_render")
+ (return-type "none")
++ (unblock-threads #t)
+ (parameters
+ '("cairo_t*" "cairo")
+ )
+@@ -1703,6 +1708,7 @@
+ (of-object "PopplerPage")
+ (c-name "poppler_page_render_for_printing")
+ (return-type "none")
++ (unblock-threads #t)
+ (parameters
+ '("cairo_t*" "cairo")
+ )
+@@ -1712,12 +1718,14 @@
+ (of-object "PopplerPage")
+ (c-name "poppler_page_get_thumbnail")
+ (return-type "cairo_surface_t*")
++ (unblock-threads #t)
+ )
+
+ (define-method render_selection
+ (of-object "PopplerPage")
+ (c-name "poppler_page_render_selection")
+ (return-type "none")
++ (unblock-threads #t)
+ (parameters
+ '("cairo_t*" "cairo")
+ '("PopplerRectangle*" "selection")
+@@ -1779,6 +1787,7 @@
+ (of-object "PopplerPage")
+ (c-name "poppler_page_render_to_ps")
+ (return-type "none")
++ (unblock-threads #t)
+ (parameters
+ '("PopplerPSFile*" "ps_file")
+ )
+
diff --git a/python/pypoppler/patches/pypoppler-0.12.1-76_75.diff b/python/pypoppler/patches/pypoppler-0.12.1-76_75.diff
new file mode 100644
index 0000000000000..94f4543e87ec5
--- /dev/null
+++ b/python/pypoppler/patches/pypoppler-0.12.1-76_75.diff
@@ -0,0 +1,66 @@
+--- poppler.override
++++ poppler.override
+@@ -600,3 +600,62 @@
+ return PycairoSurface_FromSurface(surface, NULL, NULL);
+ #endif
+ }
++%%
++override poppler_page_render_to_pixbuf kwargs
++static PyObject *
++_wrap_poppler_page_render_to_pixbuf(PyGObject *self,
++ PyObject *args,
++ PyObject *kwargs)
++{
++ static char *kwlist[] = { "src_x", "src_y", "src_width",
++ "src_height", "scale", "rotation", NULL };
++ int src_x, src_y, src_width, src_height, rotation;
++ double scale;
++ GdkPixbuf *pixbuf = NULL;
++
++ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
++ "iiiidi:Poppler.Page.render_to_pixbuf",
++ kwlist, &src_x, &src_y, &src_width,
++ &src_height, &scale, &rotation))
++ return NULL;
++
++ pyg_begin_allow_threads;
++
++ poppler_page_render_to_pixbuf(POPPLER_PAGE(self->obj), src_x, src_y,
++ src_width, src_height, scale,
++ rotation, pixbuf);
++
++ pyg_end_allow_threads;
++
++ return pygobject_new((GObject *)pixbuf);
++}
++%%
++override poppler_page_render_to_pixbuf_for_printing kwargs
++static PyObject *
++_wrap_poppler_page_render_to_pixbuf_for_printing(PyGObject *self,
++ PyObject *args,
++ PyObject *kwargs)
++{
++ static char *kwlist[] = { "src_x", "src_y", "src_width",
++ "src_height", "scale", "rotation", NULL };
++ int src_x, src_y, src_width, src_height, rotation;
++ double scale;
++ GdkPixbuf *pixbuf = NULL;
++
++ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
++ "iiiidi:Poppler.Page.render_to_pixbuf_for_printing",
++ kwlist, &src_x, &src_y, &src_width,
++ &src_height, &scale, &rotation))
++ return NULL;
++
++ pyg_begin_allow_threads;
++
++ poppler_page_render_to_pixbuf_for_printing(POPPLER_PAGE(self->obj),
++ src_x, src_y, src_width,
++ src_height, scale,
++ rotation, pixbuf);
++
++ pyg_end_allow_threads;
++
++ return pygobject_new((GObject *)pixbuf);
++}
+
diff --git a/python/pypoppler/patches/pypoppler-0.12.1-79_78.diff b/python/pypoppler/patches/pypoppler-0.12.1-79_78.diff
new file mode 100644
index 0000000000000..161ec588e1786
--- /dev/null
+++ b/python/pypoppler/patches/pypoppler-0.12.1-79_78.diff
@@ -0,0 +1,52 @@
+--- poppler.override
++++ poppler.override
+@@ -266,6 +266,12 @@
+ import gobject.GObject as PyGObject_Type
+ import gtk.gdk.Pixbuf as PyGdkPixbuf_Type
+ %%
++ignore
++poppler_page_free_link_mapping
++poppler_page_free_image_mapping
++poppler_page_free_form_field_mapping
++poppler_page_free_annot_mapping
++%%
+ ignore-glob
+ *_get_type
+ _*
+@@ -359,7 +365,7 @@
+
+ item_list = poppler_page_get_link_mapping(POPPLER_PAGE(self->obj));
+ ret = _glist_to_pylist_boxed(item_list, POPPLER_TYPE_LINK_MAPPING);
+- g_list_free(item_list);
++ poppler_page_free_link_mapping(item_list);
+ return ret;
+ }
+ %%
+@@ -372,7 +378,7 @@
+
+ item_list = poppler_page_get_image_mapping(POPPLER_PAGE(self->obj));
+ ret = _glist_to_pylist_boxed(item_list, POPPLER_TYPE_IMAGE_MAPPING);
+- g_list_free(item_list);
++ poppler_page_free_image_mapping(item_list);
+ return ret;
+ }
+ %%
+@@ -385,7 +391,7 @@
+
+ item_list = poppler_page_get_form_field_mapping(POPPLER_PAGE(self->obj));
+ ret = _glist_to_pylist_boxed(item_list, POPPLER_TYPE_FORM_FIELD_MAPPING);
+- g_list_free(item_list);
++ poppler_page_free_form_field_mapping(item_list);
+ return ret;
+ }
+ %%
+@@ -398,7 +404,7 @@
+
+ item_list = poppler_page_get_annot_mapping(POPPLER_PAGE(self->obj));
+ ret = _glist_to_pylist_boxed(item_list, POPPLER_TYPE_ANNOT_MAPPING);
+- g_list_free(item_list);
++ poppler_page_free_annot_mapping(item_list);
+ return ret;
+ }
+ %%
+