summaryrefslogtreecommitdiff
path: root/dev-python/python-poppler
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/python-poppler
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/python-poppler')
-rw-r--r--dev-python/python-poppler/Manifest10
-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, 355 insertions, 0 deletions
diff --git a/dev-python/python-poppler/Manifest b/dev-python/python-poppler/Manifest
new file mode 100644
index 000000000000..aacd3a2c28b2
--- /dev/null
+++ b/dev-python/python-poppler/Manifest
@@ -0,0 +1,10 @@
+AUX python-poppler-0.12.1-75_74.diff 1814 SHA256 3df92cfdbc3f3b3868d9d52a44074e6d970aed84cbb6cdab88ab499cce61142f SHA512 e9882f399f45dd0ce59cac91a36719dc88246abf2fd61736bc1be742796e5dfae85ca51d171388e04fe2f16065f5485f6a91ec16697ab1000904295562cb300f WHIRLPOOL 26869bf3680ae87b2cb3ed5505fcc3ca5372cc1265534ad2a6b6434f6ddc68c7c220cb4f5f915b6ad5931aab27bc77126a7048e16af65982bf2d65730ca0c078
+AUX python-poppler-0.12.1-79_78.diff 1434 SHA256 d95a50df3f46d3a86f1ac2e60a179b336e0523435fa92180abfa7966dde8eb9a SHA512 0951d34b751d95d7d38ccfdc1ac4f788486d202ca4a4663cf7ecb8d7f9e27260b026258ac5b26f8fa021f12ce2a168f83442118ee6c4f8c35d2a925417df55e3 WHIRLPOOL 7e6a16ddcfd494c63d00107e4a0be475e2dc255030472139d91599c7d9227c4b6f9a48ef176d61d2d2877dfb79ed34b3e95cddf7c84ecd5d5147b851a5950195
+AUX python-poppler-0.12.1-poppler-0.18.0-minimal-fix.patch 1667 SHA256 e2c60e30eb65d11c01c68ec31e6c1642c9297938cf642228ddc8be423388d40e SHA512 4117f99441ff88a1e77892ba959003d6a5540760222d387e9067c4fc99afcd68dae5043ff8827787a3082f9bc62e779c91ea7f09c576ee9bf94af24017f22023 WHIRLPOOL 9cc6b86a4eaffe19e4593afb09714f0940f7e0a4d8ec4a86c90864b0a4337cb087d99f3fa44e76d0156cd006ac928f8f5cb037807f31df707b6f6126f205dafd
+AUX python-poppler-0.12.1-poppler-0.39.0-changes.patch 542 SHA256 2fcf630eb7925cf1c56e15f3a2cf36bc67a2939fe8619337261f655e87a706b3 SHA512 ac38068df3db8dc92c981e9e7c5f7de8c2e4fb47a39977b9bbb8e735a686a2e64a750ccb27158cc97b060d3c878be300b750505094e9cdf3c7e465b2cdfbf39f WHIRLPOOL 53d1f1a9095a261490d2f5141b3627291cd370a4f0757b9216c2f89b6fa8be66d6bcad31aa05adef1cd8b859cd59c8454331889c9cbaa8396c65e44afb568ac3
+AUX python-poppler-0.12.1-poppler0.15.0-changes.patch 1415 SHA256 e216bf0dc6edba4e414ace0b1911e3e07d06bea5711ecd4378ec2df062b7d532 SHA512 932cad26447a8f8e03199eb91fa2cf422a91575543ad39066f8850f22e80c8ab8f42568d58975fdc73008ed4b2ca1b64cad1b84a1a9dcdf2414772daaa1e2906 WHIRLPOOL 0607bf11e049f0ea685d9ef7b69c66ec3c496de4008572df826ce1d3c98e84cd00017d65c0eafee1bdc03e0215a6719b48ba26187491a886f73a422a04bdfa72
+DIST pypoppler-0.12.1.tar.gz 318142 SHA256 322f183d24798a056f3005d1ab8e3ac27d8cfbbf0982725b323bbfec1bab5355 SHA512 04055411adc19f6af499a7cba0d6c5abb51e0802dd28962f833da3da1caf6ff274ff67d082f9c47548dac7a4ceb1bccf9860cda71fe48b8b7df74c0132498d20 WHIRLPOOL 4419c8dffeea1633374ac0f08222c23850127427543d9ac99385d08567faa402575375bea5595c746adb1d54aa3fe08870bf7a3dc1e84986b44000fea0afbe6b
+EBUILD python-poppler-0.12.1-r4.ebuild 1473 SHA256 b60f279b9e70a545020e83c3607f42e9ef0ecc198c790e4905c41f89cc1bd7dc SHA512 0d4c2fba74e7fbf8e70379b58ec554bb5f981870ed540b25abde977a80dfe277c88f6487ff0d73acdb92be399987eb168cf54cbaf626df9f818b15f5baff6502 WHIRLPOOL e68bd6782049a43ffa61656849f6ea3512123a0d14f8d2c19c697a55a9bbb7411beac3c4a3ce53b422d91c7c8ad6624a8efa3b412c107ea0669f995f1c82539a
+MISC ChangeLog 3795 SHA256 929978c2b7f46ddcd292abb4bb3016b3525301998cf1e9efe63b5f1b56685350 SHA512 824c4c8341548169727f559d51b33edb072395ea6d7eabddd3421b86633489d3551bf0e02143f9a038297c4957000ef086c9940480a7944f8f4f4ecb1e1b3852 WHIRLPOOL 50d396185bd700ebc83a8812e6151c8f5e35f60154d97a3bf9db6eb2ae9fc21eed4f4a0c4b5d2a6e95872e196a50fc9cb4b3b0dfdb0836bf8fc886009978acce
+MISC ChangeLog-2015 4926 SHA256 6292018c34861e5c3112656c04eb0256a313c564768739f0f77d5e2fa0c2320d SHA512 7de21a817174a07553027e45cd2e1d5ffd5497f756ccd112bccde09fc55bf1b7cbe7efbc58b3936ae66ebb0489970eda8d5e4b473823a9a33df44749fff3bf1b WHIRLPOOL 73a61f6f72ddd776a3607c69073c7f6ad6e9af1fd16c5ceeb9a62d09357836d8ecff6b11551d345fd64b783aaca08909e35599ec1fcd7db47a4c2f4a7c38ef51
+MISC metadata.xml 322 SHA256 45d9d5f3fe9dba2115710dc7cc5d8f70336055a4531f88b2ce300daf07a488a4 SHA512 7e1f819e4edfb2783ed2acb264c9d1b2e93c400920d8130b76d4a6a3261f5b7a9b6edb010d4358adda1aff55ba6c751ff8b00c741a742fad4d7c129339dd5ac5 WHIRLPOOL b2e8e62e8ede3e427286c56cdcdb84074fd4e0c55200a8092b8bd468ce0da435518f070a1f8db288b8ea72ced5c4e9709bf02740d1df1860400fab1a5e19ad63
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..33723c09a2c6
--- /dev/null
+++ b/dev-python/python-poppler/python-poppler-0.12.1-r4.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 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
+}