diff options
author | 2015-08-08 13:49:04 -0700 | |
---|---|---|
committer | 2015-08-08 17:38:18 -0700 | |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/python-poppler | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/python-poppler')
8 files changed, 388 insertions, 0 deletions
diff --git a/dev-python/python-poppler/Manifest b/dev-python/python-poppler/Manifest new file mode 100644 index 000000000000..e9e86f83f440 --- /dev/null +++ b/dev-python/python-poppler/Manifest @@ -0,0 +1 @@ +DIST pypoppler-0.12.1.tar.gz 318142 SHA256 322f183d24798a056f3005d1ab8e3ac27d8cfbbf0982725b323bbfec1bab5355 SHA512 04055411adc19f6af499a7cba0d6c5abb51e0802dd28962f833da3da1caf6ff274ff67d082f9c47548dac7a4ceb1bccf9860cda71fe48b8b7df74c0132498d20 WHIRLPOOL 4419c8dffeea1633374ac0f08222c23850127427543d9ac99385d08567faa402575375bea5595c746adb1d54aa3fe08870bf7a3dc1e84986b44000fea0afbe6b diff --git a/dev-python/python-poppler/files/python-poppler-0.12.1-75_74.diff b/dev-python/python-poppler/files/python-poppler-0.12.1-75_74.diff new file mode 100644 index 000000000000..47b7a678e3df --- /dev/null +++ b/dev-python/python-poppler/files/python-poppler-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/dev-python/python-poppler/files/python-poppler-0.12.1-76_75.diff b/dev-python/python-poppler/files/python-poppler-0.12.1-76_75.diff new file mode 100644 index 000000000000..94f4543e87ec --- /dev/null +++ b/dev-python/python-poppler/files/python-poppler-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/dev-python/python-poppler/files/python-poppler-0.12.1-79_78.diff b/dev-python/python-poppler/files/python-poppler-0.12.1-79_78.diff new file mode 100644 index 000000000000..161ec588e178 --- /dev/null +++ b/dev-python/python-poppler/files/python-poppler-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; + } + %% + diff --git a/dev-python/python-poppler/files/python-poppler-0.12.1-poppler-0.18.0-minimal-fix.patch b/dev-python/python-poppler/files/python-poppler-0.12.1-poppler-0.18.0-minimal-fix.patch new file mode 100644 index 000000000000..2099e0af11f8 --- /dev/null +++ b/dev-python/python-poppler/files/python-poppler-0.12.1-poppler-0.18.0-minimal-fix.patch @@ -0,0 +1,65 @@ +--- pypoppler-0.12.1/poppler.defs 2011-10-24 11:57:35.000000000 +0200 ++++ pypoppler-0.12.1/poppler.defs 2011-10-24 12:01:28.000000000 +0200 +@@ -1646,62 +1646,6 @@ + (return-type "GType") + ) + +-(define-method render_to_pixbuf +- (of-object "PopplerPage") +- (c-name "poppler_page_render_to_pixbuf") +- (return-type "none") +- (unblock-threads #t) +- (parameters +- '("int" "src_x") +- '("int" "src_y") +- '("int" "src_width") +- '("int" "src_height") +- '("double" "scale") +- '("int" "rotation") +- '("GdkPixbuf*" "pixbuf") +- ) +-) +- +-(define-method render_to_pixbuf_for_printing +- (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") +- '("int" "src_width") +- '("int" "src_height") +- '("double" "scale") +- '("int" "rotation") +- '("GdkPixbuf*" "pixbuf") +- ) +-) +- +-(define-method get_thumbnail_pixbuf +- (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") +- '("GdkPixbuf*" "pixbuf") +- '("PopplerRectangle*" "selection") +- '("PopplerRectangle*" "old_selection") +- '("PopplerSelectionStyle" "style") +- '("GdkColor*" "glyph_color") +- '("GdkColor*" "background_color") +- ) +-) +- + (define-method render + (of-object "PopplerPage") + (c-name "poppler_page_render") diff --git a/dev-python/python-poppler/files/python-poppler-0.12.1-poppler0.15.0-changes.patch b/dev-python/python-poppler/files/python-poppler-0.12.1-poppler0.15.0-changes.patch new file mode 100644 index 000000000000..a480cfa437a8 --- /dev/null +++ b/dev-python/python-poppler/files/python-poppler-0.12.1-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/dev-python/python-poppler/metadata.xml b/dev-python/python-poppler/metadata.xml new file mode 100644 index 000000000000..071b9c5fe39c --- /dev/null +++ b/dev-python/python-poppler/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <upstream> + <remote-id type="launchpad">poppler-python</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/python-poppler/python-poppler-0.12.1-r4.ebuild b/dev-python/python-poppler/python-poppler-0.12.1-r4.ebuild new file mode 100644 index 000000000000..76c90b99b7af --- /dev/null +++ b/dev-python/python-poppler/python-poppler-0.12.1-r4.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) + +inherit autotools-utils eutils python-r1 + +DESCRIPTION="Python bindings to the Poppler PDF library" +HOMEPAGE="http://launchpad.net/poppler-python" +SRC_URI="http://launchpad.net/poppler-python/trunk/development/+download/pypoppler-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86 ~x86-fbsd" +IUSE="examples" + +S=${WORKDIR}/pypoppler-${PV} + +RDEPEND="${PYTHON_DEPS} + >=app-text/poppler-0.15.0:=[cairo] + >=dev-python/pycairo-1.8.4[${PYTHON_USEDEP}] + dev-python/pygobject:2[${PYTHON_USEDEP}] + dev-python/pygtk:2[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND}" + +# http://pkgs.fedoraproject.org/gitweb/?p=pypoppler.git;a=tree +PATCHES=( + "${FILESDIR}"/${P}-75_74.diff + "${FILESDIR}"/${P}-79_78.diff + "${FILESDIR}"/${P}-poppler0.15.0-changes.patch + "${FILESDIR}"/${P}-poppler-0.18.0-minimal-fix.patch +) + +src_configure() { + python_parallel_foreach_impl autotools-utils_src_configure +} + +src_compile() { + python_foreach_impl autotools-utils_src_compile +} + +src_test() { + python_foreach_impl autotools-utils_src_test +} + +src_install() { + python_foreach_impl autotools-utils_src_install + prune_libtool_files --modules + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + insinto /usr/share/doc/${PF}/examples + doins demo/demo-poppler.py + fi +} |