Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/geography/qgis geography/qgis: Work around a py-sip up...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/28b2ee117f87
branches:  trunk
changeset: 434721:28b2ee117f87
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Sun Jun 21 00:30:04 2020 +0000

description:
geography/qgis: Work around a py-sip upgrade

Patch from upstream.  Does not yet build, but gets to the next error now.

diffstat:

 geography/qgis/distinfo                                  |   3 +-
 geography/qgis/patches/patch-python_core_conversions.sip |  88 ++++++++++++++++
 2 files changed, 90 insertions(+), 1 deletions(-)

diffs (109 lines):

diff -r c0884945c96d -r 28b2ee117f87 geography/qgis/distinfo
--- a/geography/qgis/distinfo   Sat Jun 20 22:33:12 2020 +0000
+++ b/geography/qgis/distinfo   Sun Jun 21 00:30:04 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2020/06/20 17:52:05 gdt Exp $
+$NetBSD: distinfo,v 1.16 2020/06/21 00:30:04 gdt Exp $
 
 SHA1 (qgis-3.8.3.tar.bz2) = 4ac18e9818e86433901158185e2c807cf418a043
 RMD160 (qgis-3.8.3.tar.bz2) = dd90e89d522924cedb5152826eae426ad7aa1754
@@ -7,6 +7,7 @@
 SHA1 (patch-cmake_FindQwt.cmake) = bd0c082e53b8647fcdeb671b932180ec16de49d9
 SHA1 (patch-mac_CMakeLists.txt) = 2468c0a629738ce78cccb784395eb1f41049cc73
 SHA1 (patch-mac_cmake_1qt.cmake.in) = d74f7201849ef6dd83f39251e466eb04c791c0e6
+SHA1 (patch-python_core_conversions.sip) = 41df73f8438569392f2158d83c89e86ae8024319
 SHA1 (patch-src_analysis_interpolation_qgsinterpolator.h) = 13e48b38dbe2c2e3a134da7d551a81067ffe25bd
 SHA1 (patch-src_core_CMakeLists.txt) = f476770fcb488385723def8aecaa8146de18d624
 SHA1 (patch-src_core_dxf_qgsdxfpaintengine.h) = 1c574fa457bb9fbbf3fc5421dd806875a883c518
diff -r c0884945c96d -r 28b2ee117f87 geography/qgis/patches/patch-python_core_conversions.sip
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/geography/qgis/patches/patch-python_core_conversions.sip  Sun Jun 21 00:30:04 2020 +0000
@@ -0,0 +1,88 @@
+$NetBSD: patch-python_core_conversions.sip,v 1.1 2020/06/21 00:30:04 gdt Exp $
+
+Accomodate sip 4.19.23 and qt 5.15
+From
+https://git.archlinux.org/svntogit/community.git/plain/trunk/qgis-pyqt-5.15.patch?h=packages/qgis&id=fef9f4c085355242e6455de901813e838cc24fd6
+
+--- python/core/conversions.sip.orig   2019-09-13 12:11:09.000000000 +0000
++++ python/core/conversions.sip
+@@ -1435,79 +1435,6 @@ template <TYPE>
+ %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



Home | Main Index | Thread Index | Old Index