Compare commits
14 Commits
426022bd63
...
66ec016fab
Author | SHA1 | Date | |
---|---|---|---|
66ec016fab | |||
441611c62e | |||
15c15d9274 | |||
4d41f88e5a | |||
3521cf407f | |||
82347897a9 | |||
|
25b8f81cca | ||
|
e756dbbffd | ||
|
7dfe643382 | ||
|
08ea430bf9 | ||
|
b736bd1807 | ||
|
4502f08c4b | ||
|
3b4e476f50 | ||
|
83af99f3bd |
23
qgis.spec
23
qgis.spec
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
Name: qgis
|
Name: qgis
|
||||||
Version: 2.18.6
|
Version: 2.18.6
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A user friendly Open Source Geographic Information System
|
Summary: A user friendly Open Source Geographic Information System
|
||||||
Group: Applications/Engineering
|
Group: Applications/Engineering
|
||||||
|
|
||||||
|
@ -40,8 +40,15 @@ Source4: %{name}-server-README.fedora
|
||||||
Source5: %{name}-mime.xml
|
Source5: %{name}-mime.xml
|
||||||
# Fix builds on 64-bit machines
|
# Fix builds on 64-bit machines
|
||||||
# https://hub.qgis.org/issues/15602
|
# https://hub.qgis.org/issues/15602
|
||||||
|
# https://github.com/qgis/QGIS/commit/718581ffb12b723f9a3c0ae01b7ec2d8aed9d4bb.patch
|
||||||
Patch0: %{name}-lib64.patch
|
Patch0: %{name}-lib64.patch
|
||||||
|
|
||||||
|
# Fix some SIP related FTBFS issues
|
||||||
|
# upstream fix: qgsfiledownloader.sip:33:0: src/gui/qgsfiledownloader.h:94:5: error: overriding non-deleted function 'virtual QgsFileDownloader::~QgsFileDownloader()'
|
||||||
|
# workaround (?): RuntimeError: qgis._core cannot import type 'QList<QVariant>' from PyQt4.QtCore
|
||||||
|
# workaround (?): RuntimeError: qgis._core cannot import type 'QList<QPolygonF>' from PyQt4.QtCore
|
||||||
|
Patch1: qgis_sip-ftbfs.patch
|
||||||
|
|
||||||
# Some plug-ins need Pyspatialite (bundled)
|
# Some plug-ins need Pyspatialite (bundled)
|
||||||
# The license is not totally clear, see:
|
# The license is not totally clear, see:
|
||||||
# http://code.google.com/p/pyspatialite/issues/detail?id=3
|
# http://code.google.com/p/pyspatialite/issues/detail?id=3
|
||||||
|
@ -72,7 +79,7 @@ BuildRequires: postgresql-devel
|
||||||
BuildRequires: proj-devel
|
BuildRequires: proj-devel
|
||||||
BuildRequires: PyQt4-devel
|
BuildRequires: PyQt4-devel
|
||||||
# PyQwt doesn't support qwt6, so just turn it off for now on RHEL
|
# PyQwt doesn't support qwt6, so just turn it off for now on RHEL
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora} < 26
|
||||||
BuildRequires: PyQwt-devel
|
BuildRequires: PyQwt-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
|
@ -186,6 +193,10 @@ Please refer to %{name}-server-README.fedora for details!
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .lib64
|
%patch0 -p1 -b .lib64
|
||||||
|
# Only Fedora >= 26 needs this patch
|
||||||
|
%if 0%{?fedora} >= 26
|
||||||
|
%patch1 -p1 -b .sip
|
||||||
|
%endif
|
||||||
|
|
||||||
# Remove executable permissions from source code files
|
# Remove executable permissions from source code files
|
||||||
find . \( -name "*.cpp" -o -name "*.h" \) -type f -perm /111 -execdir chmod -x {} \+
|
find . \( -name "*.cpp" -o -name "*.h" \) -type f -perm /111 -execdir chmod -x {} \+
|
||||||
|
@ -411,10 +422,16 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
||||||
* Sun Apr 09 2017 Daniele Viganò <daniele@vigano.me> - 2.18.6-1
|
* Sun Apr 09 2017 Daniele Viganò <daniele@vigano.me> - 2.18.6-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
|
|
||||||
|
* Fri Apr 7 2017 Daniele Viganò <daniele@vigano.me> - 2.18.5-2
|
||||||
|
- Build for F26
|
||||||
|
|
||||||
* Mon Mar 27 2017 Daniele Viganò <daniele@vigano.me> - 2.18.5-1
|
* Mon Mar 27 2017 Daniele Viganò <daniele@vigano.me> - 2.18.5-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
|
|
||||||
* Thu Mar 02 2017 Daniele Viganò <daniele@vigano.me> - 2.18.4-1
|
* Wed Mar 01 2017 Sandro Mani <manisandro@gmail.com> - 2.18.4-2
|
||||||
|
- Add patch to fix FTBFS
|
||||||
|
|
||||||
|
* Wed Mar 01 2017 Daniele Viganò <daniele@vigano.me> - 2.18.4-1
|
||||||
- New upstream release
|
- New upstream release
|
||||||
|
|
||||||
* Wed Feb 01 2017 Daniele Viganò <daniele@vigano.me> - 2.18.3-1
|
* Wed Feb 01 2017 Daniele Viganò <daniele@vigano.me> - 2.18.3-1
|
||||||
|
|
186
qgis_sip-ftbfs.patch
Normal file
186
qgis_sip-ftbfs.patch
Normal file
|
@ -0,0 +1,186 @@
|
||||||
|
diff --git a/python/core/conversions.sip b/python/core/conversions.sip
|
||||||
|
index f07d3ab1db..948821e91e 100644
|
||||||
|
--- a/python/core/conversions.sip
|
||||||
|
+++ b/python/core/conversions.sip
|
||||||
|
@@ -2041,3 +2041,178 @@ register_from_qvariant_convertor = (void (*)(FromQVariantConvertorFn))sipImportS
|
||||||
|
register_from_qvariant_convertor(null_from_qvariant_convertor);
|
||||||
|
%End
|
||||||
|
%End
|
||||||
|
+
|
||||||
|
+// QList<QVariant> is implemented as a Python list.
|
||||||
|
+%MappedType QList<QVariant> /TypeHintIn="Sequence[QVariant]", TypeHintOut="List[QVariant]", TypeHintValue="[]"/
|
||||||
|
+{
|
||||||
|
+%TypeHeaderCode
|
||||||
|
+#include <qlist.h>
|
||||||
|
+%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)
|
||||||
|
+ {
|
||||||
|
+ QVariant *t = new QVariant(sipCpp->at(i));
|
||||||
|
+ PyObject *tobj;
|
||||||
|
+
|
||||||
|
+ if ((tobj = sipConvertFromNewType(t, sipType_QVariant, sipTransferObj)) == NULL)
|
||||||
|
+ {
|
||||||
|
+ Py_DECREF(l);
|
||||||
|
+ delete t;
|
||||||
|
+
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ PyList_SET_ITEM(l, i, tobj);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return l;
|
||||||
|
+%End
|
||||||
|
+
|
||||||
|
+%ConvertToTypeCode
|
||||||
|
+ SIP_SSIZE_T len;
|
||||||
|
+
|
||||||
|
+ // Check the type if that is all that is required.
|
||||||
|
+ if (sipIsErr == NULL)
|
||||||
|
+ {
|
||||||
|
+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||||
|
+ {
|
||||||
|
+ PyObject *itm = PySequence_ITEM(sipPy, i);
|
||||||
|
+ bool ok = (itm && sipCanConvertToType(itm, sipType_QVariant, SIP_NOT_NONE));
|
||||||
|
+
|
||||||
|
+ Py_XDECREF(itm);
|
||||||
|
+
|
||||||
|
+ if (!ok)
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ QList<QVariant> *ql = new QList<QVariant>;
|
||||||
|
+ len = PySequence_Size(sipPy);
|
||||||
|
+
|
||||||
|
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||||
|
+ {
|
||||||
|
+ PyObject *itm = PySequence_ITEM(sipPy, i);
|
||||||
|
+ int state;
|
||||||
|
+ QVariant *t = reinterpret_cast<QVariant *>(sipConvertToType(itm, sipType_QVariant, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
|
||||||
|
+
|
||||||
|
+ Py_DECREF(itm);
|
||||||
|
+
|
||||||
|
+ if (*sipIsErr)
|
||||||
|
+ {
|
||||||
|
+ sipReleaseType(t, sipType_QVariant, state);
|
||||||
|
+
|
||||||
|
+ delete ql;
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ql->append(*t);
|
||||||
|
+
|
||||||
|
+ sipReleaseType(t, sipType_QVariant, state);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ *sipCppPtr = ql;
|
||||||
|
+
|
||||||
|
+ return sipGetState(sipTransferObj);
|
||||||
|
+%End
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+// QList<QPolygonF> is implemented as a Python list.
|
||||||
|
+%MappedType QList<QPolygonF> /TypeHintIn="Sequence[QPolygonF]", TypeHintOut="List[QPolygonF]", TypeHintValue="[]"/
|
||||||
|
+{
|
||||||
|
+%TypeHeaderCode
|
||||||
|
+#include <qlist.h>
|
||||||
|
+%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)
|
||||||
|
+ {
|
||||||
|
+ QPolygonF *t = new QPolygonF(sipCpp->at(i));
|
||||||
|
+ PyObject *tobj;
|
||||||
|
+
|
||||||
|
+ if ((tobj = sipConvertFromNewType(t, sipType_QPolygonF, sipTransferObj)) == NULL)
|
||||||
|
+ {
|
||||||
|
+ Py_DECREF(l);
|
||||||
|
+ delete t;
|
||||||
|
+
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ PyList_SET_ITEM(l, i, tobj);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return l;
|
||||||
|
+%End
|
||||||
|
+
|
||||||
|
+%ConvertToTypeCode
|
||||||
|
+ SIP_SSIZE_T len;
|
||||||
|
+
|
||||||
|
+ // Check the type if that is all that is required.
|
||||||
|
+ if (sipIsErr == NULL)
|
||||||
|
+ {
|
||||||
|
+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||||
|
+ {
|
||||||
|
+ PyObject *itm = PySequence_ITEM(sipPy, i);
|
||||||
|
+ bool ok = (itm && sipCanConvertToType(itm, sipType_QPolygonF, SIP_NOT_NONE));
|
||||||
|
+
|
||||||
|
+ Py_XDECREF(itm);
|
||||||
|
+
|
||||||
|
+ if (!ok)
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ QList<QPolygonF> *ql = new QList<QPolygonF>;
|
||||||
|
+ len = PySequence_Size(sipPy);
|
||||||
|
+
|
||||||
|
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||||
|
+ {
|
||||||
|
+ PyObject *itm = PySequence_ITEM(sipPy, i);
|
||||||
|
+ int state;
|
||||||
|
+ QPolygonF *t = reinterpret_cast<QPolygonF *>(sipConvertToType(itm, sipType_QPolygonF, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
|
||||||
|
+
|
||||||
|
+ Py_DECREF(itm);
|
||||||
|
+
|
||||||
|
+ if (*sipIsErr)
|
||||||
|
+ {
|
||||||
|
+ sipReleaseType(t, sipType_QPolygonF, state);
|
||||||
|
+
|
||||||
|
+ delete ql;
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ ql->append(*t);
|
||||||
|
+
|
||||||
|
+ sipReleaseType(t, sipType_QPolygonF, state);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ *sipCppPtr = ql;
|
||||||
|
+
|
||||||
|
+ return sipGetState(sipTransferObj);
|
||||||
|
+%End
|
||||||
|
+};
|
||||||
|
--
|
||||||
|
2.12.0
|
||||||
|
|
Reference in New Issue
Block a user