summaryrefslogtreecommitdiff
path: root/dev-python/python-poppler
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/python-poppler
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/python-poppler')
-rw-r--r--dev-python/python-poppler/Manifest8
-rw-r--r--dev-python/python-poppler/files/python-poppler-0.12.1-75_74.diff73
-rw-r--r--dev-python/python-poppler/files/python-poppler-0.12.1-79_78.diff52
-rw-r--r--dev-python/python-poppler/files/python-poppler-0.12.1-poppler-0.18.0-minimal-fix.patch65
-rw-r--r--dev-python/python-poppler/files/python-poppler-0.12.1-poppler-0.39.0-changes.patch19
-rw-r--r--dev-python/python-poppler/files/python-poppler-0.12.1-poppler0.15.0-changes.patch66
-rw-r--r--dev-python/python-poppler/metadata.xml11
-rw-r--r--dev-python/python-poppler/python-poppler-0.12.1-r4.ebuild59
8 files changed, 353 insertions, 0 deletions
diff --git a/dev-python/python-poppler/Manifest b/dev-python/python-poppler/Manifest
new file mode 100644
index 000000000000..6875bfd6eb9c
--- /dev/null
+++ b/dev-python/python-poppler/Manifest
@@ -0,0 +1,8 @@
+AUX python-poppler-0.12.1-75_74.diff 1814 BLAKE2B fc503bd35f9f0f2384e49b8805b90d2467324efe40950e2363edd4cf04e3383ea49ddf78943e39e4b0f77c2d1571de1765349124e41fd698e71d403d801af277 SHA512 e9882f399f45dd0ce59cac91a36719dc88246abf2fd61736bc1be742796e5dfae85ca51d171388e04fe2f16065f5485f6a91ec16697ab1000904295562cb300f
+AUX python-poppler-0.12.1-79_78.diff 1434 BLAKE2B ab9e7e9209e0252432d2f1b7e7e6b1223c9899726d2047878cb371c3ad5d7ec1077602485acef867199deaa5e28e8fa1d20cc634b57ca8d1e4ea3b5c2499b8a2 SHA512 0951d34b751d95d7d38ccfdc1ac4f788486d202ca4a4663cf7ecb8d7f9e27260b026258ac5b26f8fa021f12ce2a168f83442118ee6c4f8c35d2a925417df55e3
+AUX python-poppler-0.12.1-poppler-0.18.0-minimal-fix.patch 1667 BLAKE2B 3c8c28b53111033643da297941a9396964bc268d27b3ea0747fec63825a5e4fd041a9af5db7e0ea7a3af5ea2124a99c963b40fcbbc9ebc557799a2bf7b5893a1 SHA512 4117f99441ff88a1e77892ba959003d6a5540760222d387e9067c4fc99afcd68dae5043ff8827787a3082f9bc62e779c91ea7f09c576ee9bf94af24017f22023
+AUX python-poppler-0.12.1-poppler-0.39.0-changes.patch 542 BLAKE2B 2cadd23024d6b9ba2b247d4ee6c70501113ea24218202bc45d26850d43a5e957cc7ffb86e5672625c3aea3fbed633535a0a5cf53bd1c929347bc7a4707afb74c SHA512 ac38068df3db8dc92c981e9e7c5f7de8c2e4fb47a39977b9bbb8e735a686a2e64a750ccb27158cc97b060d3c878be300b750505094e9cdf3c7e465b2cdfbf39f
+AUX python-poppler-0.12.1-poppler0.15.0-changes.patch 1415 BLAKE2B 8a5a00e1eaa26520935aa166784db400dc708270bb5f56885512373fcd7deed1f3d96fb6277a470e2068a7fe59e772866fe070c4cacd276854108ae270d77e59 SHA512 932cad26447a8f8e03199eb91fa2cf422a91575543ad39066f8850f22e80c8ab8f42568d58975fdc73008ed4b2ca1b64cad1b84a1a9dcdf2414772daaa1e2906
+DIST pypoppler-0.12.1.tar.gz 318142 BLAKE2B 4279ed148cb07269620f7faf117e8c03e3a6b781d727c726c97dc1f48f4332749b267e48aedbfc1935205954e2267228a490661b9c0adbcd299e18fc723101cb SHA512 04055411adc19f6af499a7cba0d6c5abb51e0802dd28962f833da3da1caf6ff274ff67d082f9c47548dac7a4ceb1bccf9860cda71fe48b8b7df74c0132498d20
+EBUILD python-poppler-0.12.1-r4.ebuild 1471 BLAKE2B 92f521613ff34ea80541e85aa7a6b74e040b2a436260d77866b2f2e4f1be38d256a2b1e801478819dde33d751c160e01188ba07b3651579e267426a186735c43 SHA512 38903621541764a19bb463abe4d06d7e9794bee0dc623916cffba9f1accf62b865bb4b2e831d5d79495650cbcfaf25bfd2afc0acfe92c717159d20c868992734
+MISC metadata.xml 322 BLAKE2B ccbc6df338eceaf75e074ea8c7c9fb8db3bb7b7f945dab4c224be11e2e3871c0ea7bc4cf2b1151a5ca40a20a863613bccb13e32a8cbede30c5210ac1c59a9571 SHA512 7e1f819e4edfb2783ed2acb264c9d1b2e93c400920d8130b76d4a6a3261f5b7a9b6edb010d4358adda1aff55ba6c751ff8b00c741a742fad4d7c129339dd5ac5
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-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-poppler-0.39.0-changes.patch b/dev-python/python-poppler/files/python-poppler-0.12.1-poppler-0.39.0-changes.patch
new file mode 100644
index 000000000000..dd3ee52ad46d
--- /dev/null
+++ b/dev-python/python-poppler/files/python-poppler-0.12.1-poppler-0.39.0-changes.patch
@@ -0,0 +1,19 @@
+--- poppler.defs 2009-09-27 16:07:59.000000000 +0700
++++ poppler.defs 2015-12-22 16:36:14.000000000 +0600
+@@ -579,16 +579,4 @@
+ )
+
+-(define-enum Orientation
+- (in-module "Poppler")
+- (c-name "PopplerOrientation")
+- (gtype-id "POPPLER_TYPE_ORIENTATION")
+- (values
+- '("portrait" "POPPLER_ORIENTATION_PORTRAIT")
+- '("landscape" "POPPLER_ORIENTATION_LANDSCAPE")
+- '("upsidedown" "POPPLER_ORIENTATION_UPSIDEDOWN")
+- '("seascape" "POPPLER_ORIENTATION_SEASCAPE")
+- )
+-)
+-
+ (define-enum PageTransitionType
+ (in-module "Poppler")
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..b062753424c8
--- /dev/null
+++ b/dev-python/python-poppler/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <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..3e15d470aa32
--- /dev/null
+++ b/dev-python/python-poppler/python-poppler-0.12.1-r4.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools-utils eutils python-r1
+
+DESCRIPTION="Python bindings to the Poppler PDF library"
+HOMEPAGE="https://launchpad.net/poppler-python"
+SRC_URI="https://launchpad.net/poppler-python/trunk/development/+download/pypoppler-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE="examples"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+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
+ "${FILESDIR}"/${P}-poppler-0.39.0-changes.patch
+)
+
+src_configure() {
+ python_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
+}