commit 0dc306824167449e5510bb1ac06362e9516db5fa Author: Tomasz Pala <go...@pld-linux.org> Date: Mon Jun 5 00:13:45 2017 +0200
packaging initial update qgis-paralelbuild.patch | 10 --- qgis.spec | 56 +++++++++------ qgis_sip-ftbfs.patch | 183 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 216 insertions(+), 33 deletions(-) --- diff --git a/qgis.spec b/qgis.spec index 5071ad2..01e598e 100644 --- a/qgis.spec +++ b/qgis.spec @@ -1,13 +1,15 @@ +# TODO: grass, python and server subpackages Summary: Quantum GIS (QGIS) - a Geographic Information System (GIS) Summary(pl.UTF-8): Quantum GIS (QGIS) - system informacji geograficznych (GIS) Name: qgis Version: 2.18.9 -Release: 0.1 +Release: 1 License: GPL v2+ Group: Applications/Engineering Source0: http://qgis.org/downloads/%{name}-%{version}.tar.bz2 # Source0-md5: d55d4931651d1967876ba89aab8d2935 -#Patch0: %{name}-paralelbuild.patch +# 1st chunk of https://daniele.vigano.me/git/dani/copr-dani-qgis/raw/25b8f81ccabbfdb183d4850a66e884c183444f14/qgis_sip-ftbfs.patch +Patch0: %{name}_sip-ftbfs.patch URL: http://qgis.org/ BuildRequires: QtGui-devel BuildRequires: QtNetwork-devel @@ -24,7 +26,7 @@ BuildRequires: expat-devel >= 1.95 BuildRequires: flex >= 2.5.6 BuildRequires: gdal-devel >= 1.4.0 BuildRequires: geos-devel >= 3.4.0 -#BuildRequires: grass-devel >= 6.0.0 +BuildRequires: grass-devel >= 6.0.0 BuildRequires: gsl-devel >= 1.8 BuildRequires: libspatialite-devel BuildRequires: postgresql-devel >= 8.0.0 @@ -38,13 +40,14 @@ BuildRequires: qca-devel BuildRequires: qjson-devel BuildRequires: qt4-build BuildRequires: qt4-linguist -BuildRequires: qt4-qmake +BuildRequires: qt4-qmake >= 4.8.0 BuildRequires: qwt-devel >= 5.0.0 BuildConflicts: qwt-devel >= 6.1.0 -BuildRequires: sip-PyQt4-qscintilla2 # ...or -DWITH_QWTPOLAR=OFF +BuildRequires: sip-PyQt4-qscintilla2 BuildRequires: spatialindex-devel BuildRequires: sqlite3-devel +Suggests: gpsbabel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -86,21 +89,28 @@ Statyczna biblioteka QGIS. %prep %setup -q -#%patch0 -p1 +%patch0 -p1 %build %cmake . \ - -DENABLE_TESTS=FALSE + -D GRASS_INCLUDE_DIR7=%{_includedir}/grass72 \ + -D ENABLE_TESTS:BOOL=FALSE +# TODO: rpm/qgis.spec.template %{__make} %install rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_datadir}/mime/packages} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT -rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}{,/designer}/*.{la,a} +install -p debian/q*.desktop $RPM_BUILD_ROOT%{_desktopdir} +install -p debian/q*.png $RPM_BUILD_ROOT%{_pixmapsdir} +install -p debian/qgis.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages + +# %find_lang %{name} --with-qm %clean rm -rf $RPM_BUILD_ROOT @@ -110,27 +120,27 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc AUTHORS BUGS ChangeLog README TODO -%attr(755,root,root) %{_bindir}/gridmaker +%doc BUGS CONTRIBUTE.md ChangeLog Exception_to_GPL_for_Qt.txt NEWS README.md +%attr(755,root,root) %{_bindir}/qbrowser %attr(755,root,root) %{_bindir}/qgis -%attr(755,root,root) %{_bindir}/qgis_help -%attr(755,root,root) %{_bindir}/spit -%attr(755,root,root) %{_libdir}/libqgis.so.*.*.* -%dir %{_libdir}/%{name} -%attr(755,root,root) %{_libdir}/%{name}/*.so -%dir %{_libdir}/%{name}/designer -%attr(755,root,root) %{_libdir}/%{name}/designer/*.so +%attr(755,root,root) %{_libdir}/libqgis*.so.*.*.* +%{_libdir}/%{name} +%exclude %{_libdir}/%{name}/grass +%exclude %{_libdir}/%{name}/plugins/libgrass*.so +%exclude %{_libdir}/libqgisgrass*.so.*.*.* +%exclude %{_libdir}/libqgispython.so.*.*.* %{_datadir}/%{name} -%{_mandir}/man1/* +%exclude %{_datadir}/%{name}/python +%{_desktopdir}/q*.desktop +%{_pixmapsdir}/q*.png +%{_datadir}/mime/packages/%{name}.xml +%{_mandir}/man1/q*.1* %files devel %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/qgis-config -%attr(755,root,root) %{_libdir}/libqgis.so -%{_libdir}/libqgis.la +%attr(755,root,root) %{_libdir}/libqgis*.so %{_includedir}/%{name} -%{_aclocaldir}/qgis.m4 %files static %defattr(644,root,root,755) -%{_libdir}/libqgis.a +#%{_libdir}/libqgis.a diff --git a/qgis-paralelbuild.patch b/qgis-paralelbuild.patch deleted file mode 100644 index 6d8d1e7..0000000 --- a/qgis-paralelbuild.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- qgis-0.5.0/i18n/Makefile.am.old 2004-10-02 02:04:17.000000000 +0200 -+++ qgis-0.5.0/i18n/Makefile.am 2004-12-04 10:58:31.000000000 +0100 -@@ -33,6 +33,6 @@ - qgis_zh_CN.ts - - %.qm: %.ts -- cd ..; ./create_qm_files.sh -+ lrelease $< -qm $@ - - EXTRA_DIST = $(i18n_SOURCES) diff --git a/qgis_sip-ftbfs.patch b/qgis_sip-ftbfs.patch new file mode 100644 index 0000000..3a25e88 --- /dev/null +++ b/qgis_sip-ftbfs.patch @@ -0,0 +1,183 @@ +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 ++}; ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/qgis.git/commitdiff/0dc306824167449e5510bb1ac06362e9516db5fa _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit