diff options
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | pypoppler-0.12.1-poppler-0.16.0.patch | 11 | ||||
-rw-r--r-- | python-poppler-0.12.1-poppler-0.39.0-changes.patch | 19 |
4 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d0ec1a9d6dec --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = python2-poppler + pkgdesc = Python 2.x bindings for Poppler + pkgver = 0.12.1 + pkgrel = 10 + url = https://launchpad.net/poppler-python + arch = x86_64 + license = GPL + depends = pygtk + depends = poppler-glib + source = https://launchpad.net/poppler-python/trunk/development/+download/pypoppler-0.12.1.tar.gz + source = pypoppler-0.12.1-poppler-0.16.0.patch + source = python-poppler-0.12.1-poppler-0.39.0-changes.patch + md5sums = 1a89e5ed3042afc81bbd4d02e0cf640a + md5sums = 683c5b67866d56adc2494120cc329dc8 + md5sums = 5f0a6f7f4b649ad61a71f800a6e0ba91 + +pkgname = python2-poppler + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f27e9c4f0dc9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Balló György <ballogyor+arch at gmail dot com> +# Contributor: Ray Rashif <schiv@archlinux.org + +pkgname=python2-poppler +_realname=pypoppler +pkgver=0.12.1 +pkgrel=10 +pkgdesc="Python 2.x bindings for Poppler" +arch=('x86_64') +url="https://launchpad.net/poppler-python" +license=('GPL') +depends=('pygtk' 'poppler-glib') +source=("https://launchpad.net/poppler-python/trunk/development/+download/$_realname-$pkgver.tar.gz" + 'pypoppler-0.12.1-poppler-0.16.0.patch' + 'python-poppler-0.12.1-poppler-0.39.0-changes.patch') +md5sums=('1a89e5ed3042afc81bbd4d02e0cf640a' + '683c5b67866d56adc2494120cc329dc8' + '5f0a6f7f4b649ad61a71f800a6e0ba91') + +prepare() { + cd $_realname-$pkgver + + # poppler 0.16 compat + patch -Np0 -i ../pypoppler-0.12.1-poppler-0.16.0.patch + + # poppler 0.18 compat + sed -i "/pixbuf/,/^)/d" poppler.defs + + # poppler 0.39 compat + patch -Np0 -i ../python-poppler-0.12.1-poppler-0.39.0-changes.patch +} + +build() { + cd $_realname-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + PYTHON=python2 + make +} + +package() { + cd $_realname-$pkgver + make DESTDIR="$pkgdir" install +} diff --git a/pypoppler-0.12.1-poppler-0.16.0.patch b/pypoppler-0.12.1-poppler-0.16.0.patch new file mode 100644 index 000000000000..0e99b57ecd56 --- /dev/null +++ b/pypoppler-0.12.1-poppler-0.16.0.patch @@ -0,0 +1,11 @@ +--- poppler.defs.orig 2010-12-30 05:55:07.000000000 +0000 ++++ poppler.defs 2010-12-30 05:55:27.000000000 +0000 +@@ -1794,7 +1794,7 @@ + + (define-method get_text + (of-object "PopplerPage") +- (c-name "poppler_page_get_text") ++ (c-name "poppler_page_get_selected_text") + (return-type "char*") + (parameters + '("PopplerSelectionStyle" "style") diff --git a/python-poppler-0.12.1-poppler-0.39.0-changes.patch b/python-poppler-0.12.1-poppler-0.39.0-changes.patch new file mode 100644 index 000000000000..dd3ee52ad46d --- /dev/null +++ b/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") |