[arch-commits] Commit in qgis/trunk (PKGBUILD qgis-pyqt-5.15.patch)
Antonio Rojas
arojas at archlinux.org
Thu Jun 4 09:34:42 UTC 2020
Date: Thursday, June 4, 2020 @ 09:34:42
Author: arojas
Revision: 638878
Rebuild with Qt and PyQt 5.15 (FS#66885)
Added:
qgis/trunk/qgis-pyqt-5.15.patch
Modified:
qgis/trunk/PKGBUILD
----------------------+
PKGBUILD | 12 +++++--
qgis-pyqt-5.15.patch | 82 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 91 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-06-04 09:09:05 UTC (rev 638877)
+++ PKGBUILD 2020-06-04 09:34:42 UTC (rev 638878)
@@ -10,7 +10,7 @@
pkgname=qgis
pkgver=3.12.3
-pkgrel=1
+pkgrel=2
pkgdesc='Geographic Information System (GIS) that supports vector, raster & database formats'
url='https://qgis.org/'
license=(GPL)
@@ -29,9 +29,13 @@
'python-numpy: Processing plugin'
'python-yaml: Processing plugin')
source=("https://qgis.org/downloads/$pkgname-$pkgver.tar.bz2"
- qgis-pyqt5-sip5.patch)
+ qgis-pyqt5-sip5.patch
+ qgis-qt-5.15.patch::"https://github.com/qgis/QGIS/commit/31f586ec.patch"
+ qgis-pyqt-5.15.patch)
sha256sums=('c2b53815f9b994e1662995d1f25f90628156b996758f5471bffb74ab29a95220'
- '47fdab75c94ecf5b61a41b334e23714226e895cef507c35a3bc4b46c7d307981')
+ '47fdab75c94ecf5b61a41b334e23714226e895cef507c35a3bc4b46c7d307981'
+ '8c4280b7cb39f8a4bc7d6f3ba70b7a7f3dc4da593f1336429caf90773d401508'
+ 'ff82eb1fd6a18993a8318c8bd0f45498598c8e5e544fb1f622d4ba0673213351')
prepare() {
[[ -d build ]] || mkdir build
@@ -38,6 +42,8 @@
cd $pkgname-$pkgver
patch -p1 -i ../qgis-pyqt5-sip5.patch # Use new pyqt sip file location
+ patch -p1 -i ../qgis-qt-5.15.patch # Fix build with Qt 5.15
+ patch -p1 -i ../qgis-pyqt-5.15.patch # Remove MappedType already defined in PyQt 5.15
}
build() {
Added: qgis-pyqt-5.15.patch
===================================================================
--- qgis-pyqt-5.15.patch (rev 0)
+++ qgis-pyqt-5.15.patch 2020-06-04 09:34:42 UTC (rev 638878)
@@ -0,0 +1,82 @@
+--- qgis-3.12.1/python/core/conversions.sip.orig 2020-06-04 08:42:00.097929859 +0000
++++ qgis-3.12.1/python/core/conversions.sip 2020-06-04 08:44:29.763486480 +0000
+@@ -1435,79 +1435,6 @@
+ %End
+ };
+
+-template <TYPE>
+-%MappedType QVector< TYPE* >
+-{
+-%TypeHeaderCode
+-#include <QVector>
+-%End
+-
+-%ConvertFromTypeCode
+- // Create the list
+- PyObject *l = PyList_New(sipCpp->size());
+-
+- if (!l)
+- return NULL;
+-
+- // Set the dictionary elements.
+- for( int i = 0; i < sipCpp->size(); i++ )
+- {
+- TYPE *t = sipCpp->at(i);
+- PyObject *tobj = sipConvertFromType(t, sipType_TYPE, sipTransferObj);
+-
+- if (tobj == NULL || PyList_SetItem(l, i, tobj) < 0)
+- {
+- Py_DECREF(tobj);
+- Py_DECREF(l);
+- return NULL;
+- }
+- }
+-
+- return l;
+-%End
+-
+-%ConvertToTypeCode
+- // Check the type if that is all that is required.
+- if (sipIsErr == NULL)
+- {
+- if (!PyList_Check(sipPy))
+- return 0;
+-
+- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- {
+- if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, SIP_NOT_NONE))
+- return 0;
+- }
+-
+- return 1;
+- }
+-
+- QVector<TYPE*> *v = new QVector<TYPE*>( PyList_GET_SIZE(sipPy) );
+-
+- for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- {
+- int state;
+-
+- TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+-
+- if (*sipIsErr)
+- {
+- sipReleaseType(t, sipType_TYPE, state);
+- delete v;
+- return 0;
+- }
+-
+- v->replace( i, t );
+-
+- sipReleaseType(t, sipType_TYPE, state);
+- }
+-
+- *sipCppPtr = v;
+-
+- return sipGetState(sipTransferObj);
+-%End
+-};
+-
+ %MappedType QMap<qint64, QgsFeature*>
+ {
+ %TypeHeaderCode
More information about the arch-commits
mailing list