From 5637b5f6b91ecb73b100863eee117d428cdf6700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= Date: Mon, 9 May 2022 05:23:16 +0200 Subject: [PATCH] python-poppler-qt5: bump version (#6895) --- .../python_poppler_qt5-21.1.0.patchset | 113 ------------------ ...ecipe => python_poppler_qt5-21.3.0.recipe} | 5 +- 2 files changed, 2 insertions(+), 116 deletions(-) delete mode 100644 dev-python/python-poppler-qt5/patches/python_poppler_qt5-21.1.0.patchset rename dev-python/python-poppler-qt5/{python_poppler_qt5-21.1.0.recipe => python_poppler_qt5-21.3.0.recipe} (95%) diff --git a/dev-python/python-poppler-qt5/patches/python_poppler_qt5-21.1.0.patchset b/dev-python/python-poppler-qt5/patches/python_poppler_qt5-21.1.0.patchset deleted file mode 100644 index 63b1665c3..000000000 --- a/dev-python/python-poppler-qt5/patches/python_poppler_qt5-21.1.0.patchset +++ /dev/null @@ -1,113 +0,0 @@ -From 2964f4f4796cfcd7b900ae5c46fccec38d7e0f73 Mon Sep 17 00:00:00 2001 -From: Ben Greiner -Date: Tue, 23 Feb 2021 17:59:33 +0100 -Subject: map type QVector< QPair > for - FormFieldChoice::choicesWithExportValues() - - -diff --git a/types.sip b/types.sip -index 239b8c9..81cb283 100644 ---- a/types.sip -+++ b/types.sip -@@ -331,5 +331,98 @@ template - }; - - -+/** -+ * Convert QVector< QPair > -+ * from and to a Python list of a 2-item tuple -+ */ -+ -+template -+%MappedType QVector< QPair > -+{ -+%TypeHeaderCode -+#include -+#include -+%End -+ -+%ConvertFromTypeCode -+ // Create the list. -+ PyObject *l; -+ -+ if ((l = PyList_New(sipCpp->size())) == NULL) -+ return NULL; -+ -+ // Set the list elements. -+ for (int i = 0; i < sipCpp->size(); ++i) -+ { -+ QPair* p = new QPair(sipCpp->at(i)); -+ PyObject *ptuple = PyTuple_New(2); -+ PyObject *pfirst; -+ PyObject *psecond; -+ -+ TYPE *sfirst = new TYPE(p->first); -+ if ((pfirst = sipConvertFromType(sfirst, sipType_TYPE, sipTransferObj)) == NULL) -+ { -+ Py_DECREF(l); -+ Py_DECREF(ptuple); -+ return NULL; -+ } -+ PyTuple_SET_ITEM(ptuple, 0, pfirst); -+ -+ TYPE *ssecond = new TYPE(p->second); -+ if ((psecond = sipConvertFromType(ssecond, sipType_TYPE, sipTransferObj)) == NULL) -+ { -+ Py_DECREF(l); -+ Py_DECREF(ptuple); -+ Py_DECREF(pfirst); -+ return NULL; -+ } -+ PyTuple_SET_ITEM(ptuple, 1, psecond); -+ -+ PyList_SET_ITEM(l, i, ptuple); -+ } -+ -+ return l; -+%End -+ -+%ConvertToTypeCode -+ const sipTypeDef* qpair_type = sipFindType("QPair"); -+ -+ // Check the type if that is all that is required. -+ if (sipIsErr == NULL) -+ { -+ if (!PySequence_Check(sipPy)) -+ return 0; -+ -+ for (int i = 0; i < PySequence_Size(sipPy); ++i) -+ if (!sipCanConvertToType(PySequence_ITEM(sipPy, i), qpair_type, SIP_NOT_NONE)) -+ return 0; -+ -+ return 1; -+ } -+ -+ -+ QVector< QPair > *qv = new QVector< QPair >; -+ -+ for (int i = 0; i < PySequence_Size(sipPy); ++i) -+ { -+ int state; -+ QPair * p = reinterpret_cast< QPair * >(sipConvertToType(PySequence_ITEM(sipPy, i), qpair_type, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); -+ -+ if (*sipIsErr) -+ { -+ sipReleaseType(p, qpair_type, state); -+ delete qv; -+ return 0; -+ } -+ qv->append(*p); -+ sipReleaseType(p, qpair_type, state); -+ } -+ -+ *sipCppPtr = qv; -+ return sipGetState(sipTransferObj); -+%End -+ -+}; -+ - - /* kate: indent-width 4; space-indent on; hl c++; indent-mode cstyle; */ --- -2.30.2 - diff --git a/dev-python/python-poppler-qt5/python_poppler_qt5-21.1.0.recipe b/dev-python/python-poppler-qt5/python_poppler_qt5-21.3.0.recipe similarity index 95% rename from dev-python/python-poppler-qt5/python_poppler_qt5-21.1.0.recipe rename to dev-python/python-poppler-qt5/python_poppler_qt5-21.3.0.recipe index d8254fa58..e09a98568 100644 --- a/dev-python/python-poppler-qt5/python_poppler_qt5-21.1.0.recipe +++ b/dev-python/python-poppler-qt5/python_poppler_qt5-21.3.0.recipe @@ -3,14 +3,13 @@ DESCRIPTION="A Python binding for libpoppler-qt5 that aims for completeness and actively maintained. Using this module you can access the contents of PDF files inside PyQt5 applications." HOMEPAGE="https://github.com/frescobaldi/python-poppler-qt5/" -COPYRIGHT="2009-2021 Wilbert Berendsen" +COPYRIGHT="2009-2022 Wilbert Berendsen" LICENSE="GNU LGPL v2.1" REVISION="1" SOURCE_URI="https://pypi.python.org/packages/source/p/python-poppler-qt5/python-poppler-qt5-$portVersion.tar.gz" -CHECKSUM_SHA256="add766db2c04026a6087f38f2044e66c8b053c81002f3753d8059713497d022d" +CHECKSUM_SHA256="b477e8841f0ea0e09fdab6f2f305cf38df977d9e142e5693a374605d75dd6fe0" SOURCE_DIR="python-poppler-qt5-$portVersion" PYTHON3_VERSION="3.8" -PATCHES="python_poppler_qt5-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86"