From de0b17bbc55f74dd3ce2892bf1b608a7d4af0806 Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Sun, 21 Jan 2018 12:15:59 +0100 Subject: pcr/python-poppler-qt5: added --- pcr/python-poppler-qt5/PKGBUILD | 31 +++++++++++++ .../python-poppler-qt5-0.24.2.patch | 51 ++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 pcr/python-poppler-qt5/PKGBUILD create mode 100644 pcr/python-poppler-qt5/python-poppler-qt5-0.24.2.patch (limited to 'pcr') diff --git a/pcr/python-poppler-qt5/PKGBUILD b/pcr/python-poppler-qt5/PKGBUILD new file mode 100644 index 000000000..68efcf00f --- /dev/null +++ b/pcr/python-poppler-qt5/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer (AUR): Johan Reitan (venatux) +# Contributer (AUR): Kenneth Lyons (ixjlyons) + +# parabola changes and rationale: +# no changes. + +pkgname=python-poppler-qt5 +pkgver=0.24.2 +pkgrel=2 +pkgdesc='Python binding to libpoppler-qt5.' +arch=('any') +url='https://github.com/wbsoft/python-poppler-qt5' +license=('LGPL') +depends=('python-pyqt5' 'poppler-qt5') +makedepends=('python-sip') +provides=('python-poppler-qt5') +conflicts=('python-poppler-qt5') +source=(https://github.com/wbsoft/python-poppler-qt5/archive/v${pkgver}.tar.gz + ${pkgname}-${pkgver}.patch) +sha256sums=('542b5ab183e95debd4e05642425da6914e1b5c5a98a8c94752833d5b5ca7289b' + '503c6e0eded717d82cab98459cf10b1eddee73ed45df441f79889aa05e8dcf74') + +prepare() { + cd $srcdir/$pkgname-$pkgver + patch -p1 -i $srcdir/$pkgname-$pkgver.patch +} + +package() { + cd $srcdir/$pkgname-$pkgver + python setup.py install --prefix=/usr --root="$pkgdir" --optimize 1 +} diff --git a/pcr/python-poppler-qt5/python-poppler-qt5-0.24.2.patch b/pcr/python-poppler-qt5/python-poppler-qt5-0.24.2.patch new file mode 100644 index 000000000..fcd427002 --- /dev/null +++ b/pcr/python-poppler-qt5/python-poppler-qt5-0.24.2.patch @@ -0,0 +1,51 @@ +diff -aur python-poppler-qt5-0.24.2/poppler-qt5.sip python-poppler-qt5-0.24.2.new/poppler-qt5.sip +--- python-poppler-qt5-0.24.2/poppler-qt5.sip 2015-02-24 07:54:42.000000000 +0100 ++++ python-poppler-qt5-0.24.2.new/poppler-qt5.sip 2017-01-27 13:12:04.849162349 +0100 +@@ -6,10 +6,13 @@ + */ + + ++%Feature QTXML_AVAILABLE ++ + %Import QtCore/QtCoremod.sip + %Import QtGui/QtGuimod.sip +- +-%Feature QTXML_AVAILABLE ++%If(QTXML_AVAILABLE) ++%Import QtXml/QtXmlmod.sip ++%End + + %Timeline { + POPPLER_V0_20_0 +diff -aur python-poppler-qt5-0.24.2/types.sip python-poppler-qt5-0.24.2.new/types.sip +--- python-poppler-qt5-0.24.2/types.sip 2015-02-24 07:54:42.000000000 +0100 ++++ python-poppler-qt5-0.24.2.new/types.sip 2017-01-27 13:13:53.539750992 +0100 +@@ -212,7 +212,7 @@ + return 0; + + for (int i = 0; i < PySequence_Size(sipPy); ++i) +- if (!sipCanConvertToMappedType(PySequence_ITEM(sipPy, i), qlinkedlist_type, SIP_NOT_NONE)) ++ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qlinkedlist_type, SIP_NOT_NONE)) + return 0; + + return 1; +@@ -224,16 +224,16 @@ + for (int i = 0; i < PySequence_Size(sipPy); ++i) + { + int state; +- QLinkedList * t = reinterpret_cast< QLinkedList * >(sipConvertToMappedType(PySequence_ITEM(sipPy, i), qlinkedlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); ++ QLinkedList * t = reinterpret_cast< QLinkedList * >(sipConvertToType(PySequence_ITEM(sipPy, i), qlinkedlist_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); + + if (*sipIsErr) + { +- sipReleaseInstance(t, sipClass_TYPE, state); ++ sipReleaseType(t, qlinkedlist_type, state); + delete ql; + return 0; + } + ql->append(*t); +- sipReleaseInstance(t, sipClass_TYPE, state); ++ sipReleaseType(t, qlinkedlist_type, state); + } + + *sipCppPtr = ql; -- cgit v1.2.3