- qgis rebuild for sip-4.9.x (#538119)

This commit is contained in:
Rex Dieter 2009-12-24 03:29:48 +00:00
parent 7488326621
commit d4e9cd6c7e
2 changed files with 268 additions and 4 deletions

252
qgis-1.0.2-sip49.patch Normal file
View File

@ -0,0 +1,252 @@
diff -Naur qgis-1.0.2-orig/python/core/conversions.sip qgis-1.0.2/python/core/conversions.sip
--- qgis-1.0.2-orig/python/core/conversions.sip 2008-08-20 02:55:54.000000000 -0400
+++ qgis-1.0.2/python/core/conversions.sip 2009-12-23 10:29:42.819937299 -0500
@@ -77,17 +77,17 @@
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
- //TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+ //TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QVector<TYPE> * t = reinterpret_cast< QVector<TYPE> * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
- sipReleaseInstance(t, sipClass_TYPE, state);
+ sipReleaseInstance(t, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), state);
delete ql;
return 0;
}
ql->append(*t);
- sipReleaseInstance(t, sipClass_TYPE, state);
+ sipReleaseInstance(t, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), state);
}
*sipCppPtr = ql;
@@ -153,17 +153,17 @@
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
- //TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+ //TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QVector<QVector<TYPE> > * t = reinterpret_cast< QVector< QVector<TYPE> > * >(sipConvertToMappedType(PyList_GET_ITEM(sipPy, i), qvector_qgspoint, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
- sipReleaseInstance(t, sipClass_TYPE, state);
+ sipReleaseInstance(t, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), state);
delete ql;
return 0;
}
ql->append(*t);
- sipReleaseInstance(t, sipClass_TYPE, state);
+ sipReleaseInstance(t, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), state);
}
*sipCppPtr = ql;
@@ -243,7 +243,7 @@
TYPE *t = new TYPE(*it);
PyObject *tobj;
- if ((tobj = sipConvertFromNewInstance(t, sipClass_TYPE, sipTransferObj)) == NULL)
+ if ((tobj = sipConvertFromNewInstance(t, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), sipTransferObj)) == NULL)
{
Py_DECREF(l);
delete t;
@@ -263,7 +263,7 @@
return 0;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, SIP_NOT_NONE))
+ if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), SIP_NOT_NONE))
return 0;
return 1;
@@ -274,16 +274,16 @@
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
{
int state;
- TYPE* t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+ TYPE* t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
if (*sipIsErr)
{
- sipReleaseInstance(t, sipClass_TYPE, state);
+ sipReleaseInstance(t, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), state);
delete qset;
return 0;
}
qset->insert(*t);
- sipReleaseInstance(t, sipClass_TYPE, state);
+ sipReleaseInstance(t, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), state);
}
*sipCppPtr = qset;
@@ -364,7 +364,7 @@
Py_ssize_t j = 0;
while (PyDict_Next(tobj, &j, &kobj2, &tobj2))
{
- if (!sipCanConvertToInstance(tobj2, sipClass_TYPE, SIP_NOT_NONE))
+ if (!sipCanConvertToInstance(tobj2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), SIP_NOT_NONE))
return 0;
}
@@ -391,17 +391,17 @@
int k2 = PyInt_AsLong(kobj2);
int state;
- TYPE* fa = reinterpret_cast<TYPE*>(sipConvertToInstance(tobj2, sipClass_TYPE, sipTransferObj,SIP_NOT_NONE,&state,sipIsErr));
+ TYPE* fa = reinterpret_cast<TYPE*>(sipConvertToInstance(tobj2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), sipTransferObj,SIP_NOT_NONE,&state,sipIsErr));
if (*sipIsErr)
{
- sipReleaseInstance(tobj2, sipClass_TYPE, state);
+ sipReleaseInstance(tobj2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), state);
delete qm;
return 0;
}
qm2.insert(k2, *fa);
- sipReleaseInstance(tobj2, sipClass_TYPE, state);
+ sipReleaseInstance(tobj2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE), state);
}
qm->insert(k, qm2);
}
@@ -432,7 +432,7 @@
{
QString *t1 = new QString(i.key());
- PyObject *t1obj = sipConvertFromNewInstance(t1, sipClass_QString, sipTransferObj);
+ PyObject *t1obj = sipConvertFromNewInstance(t1, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString), sipTransferObj);
PyObject *t2obj = PyInt_FromLong( (long) i.value() );
if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
@@ -478,7 +478,7 @@
while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
{
- if (!sipCanConvertToInstance(t1obj, sipClass_QString, SIP_NOT_NONE))
+ if (!sipCanConvertToInstance(t1obj, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString), SIP_NOT_NONE))
return 0;
}
@@ -491,19 +491,19 @@
{
int state;
- QString *t1 = reinterpret_cast<QString *>(sipConvertToInstance(t1obj, sipClass_QString, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+ QString *t1 = reinterpret_cast<QString *>(sipConvertToInstance(t1obj, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString), sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
QVariant::Type t2 = (QVariant::Type) PyInt_AsLong(t1obj);
if (*sipIsErr)
{
- sipReleaseInstance(t1, sipClass_QString, state);
+ sipReleaseInstance(t1, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString), state);
delete qm;
return 0;
}
qm->insert(*t1, t2);
- sipReleaseInstance(t1, sipClass_QString, state);
+ sipReleaseInstance(t1, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString), state);
}
*sipCppPtr = qm;
@@ -534,8 +534,8 @@
TYPE1 *t1 = new TYPE1(i.key());
TYPE2 *t2 = i.value();
- PyObject *t1obj = sipConvertFromNewInstance(t1, sipClass_TYPE1, sipTransferObj);
- PyObject *t2obj = sipConvertFromInstance(t2, sipClass_TYPE2, sipTransferObj);
+ PyObject *t1obj = sipConvertFromNewInstance(t1, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE1), sipTransferObj);
+ PyObject *t2obj = sipConvertFromInstance(t2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), sipTransferObj);
if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
{
@@ -579,10 +579,10 @@
while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
{
- if (!sipCanConvertToInstance(t1obj, sipClass_TYPE1, SIP_NOT_NONE))
+ if (!sipCanConvertToInstance(t1obj, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE1), SIP_NOT_NONE))
return 0;
- if (!sipCanConvertToInstance(t2obj, sipClass_TYPE2, SIP_NOT_NONE))
+ if (!sipCanConvertToInstance(t2obj, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), SIP_NOT_NONE))
return 0;
}
@@ -595,13 +595,13 @@
{
int state1, state2;
- TYPE1 *t1 = reinterpret_cast<TYPE1 *>(sipConvertToInstance(t1obj, sipClass_TYPE1, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
- TYPE2 *t2 = reinterpret_cast<TYPE2 *>(sipConvertToInstance(t2obj, sipClass_TYPE2, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
+ TYPE1 *t1 = reinterpret_cast<TYPE1 *>(sipConvertToInstance(t1obj, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE1), sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
+ TYPE2 *t2 = reinterpret_cast<TYPE2 *>(sipConvertToInstance(t2obj, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
if (*sipIsErr)
{
- sipReleaseInstance(t1, sipClass_TYPE1, state1);
- sipReleaseInstance(t2, sipClass_TYPE2, state2);
+ sipReleaseInstance(t1, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE1), state1);
+ sipReleaseInstance(t2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), state2);
delete qm;
return 0;
@@ -609,8 +609,8 @@
qm->insert(*t1, t2);
- sipReleaseInstance(t1, sipClass_TYPE1, state1);
- sipReleaseInstance(t2, sipClass_TYPE2, state2);
+ sipReleaseInstance(t1, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE1), state1);
+ sipReleaseInstance(t2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), state2);
}
*sipCppPtr = qm;
@@ -642,7 +642,7 @@
const double t1 = i.key();
TYPE2 * t2 = &i.value();
PyObject *t1obj = PyFloat_FromDouble(t1);
- PyObject *t2obj = sipConvertFromInstance(t2, sipClass_TYPE2, sipTransferObj);
+ PyObject *t2obj = sipConvertFromInstance(t2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), sipTransferObj);
if (PyDict_GetItem(d, t1obj) == NULL) {
PyObject *lst = PyList_New(0);
PyDict_SetItem(d, t1obj, lst);
@@ -695,7 +695,7 @@
{
for (int i = 0; i < PyList_GET_SIZE(t2obj); ++i) {
if (!sipCanConvertToInstance(PyList_GET_ITEM(t2obj, i),
- sipClass_TYPE2, SIP_NOT_NONE))
+ (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), SIP_NOT_NONE))
return 0;
}
}
@@ -712,7 +712,7 @@
TYPE2 *t2 =
reinterpret_cast<TYPE2 *>(sipConvertToInstance(PyList_GET_ITEM(t2obj,
i),
- sipClass_TYPE2,
+ (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2),
sipTransferObj,
SIP_NOT_NONE,
&state2,
@@ -720,7 +720,7 @@
if (*sipIsErr)
{
- sipReleaseInstance(t2, sipClass_TYPE2, state2);
+ sipReleaseInstance(t2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), state2);
delete qm;
return 0;
@@ -728,7 +728,7 @@
qm->insert(k, *t2);
- sipReleaseInstance(t2, sipClass_TYPE2, state2);
+ sipReleaseInstance(t2, (sipWrapperType *) sipTypeAsPyTypeObject (sipType_TYPE2), state2);
}
}

View File

@ -1,9 +1,8 @@
%define qt4_bindir %{_libdir}/qt4/bin
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: qgis
Version: 1.0.2
Release: 3%{?dist}
Release: 4%{?dist}
Summary: A user friendly Open Source Geographic Information System
Group: Applications/Engineering
@ -13,6 +12,10 @@ Source0: http://download.osgeo.org/qgis/src/%{name}_%{version}.tar.gz
Source1: %{name}.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
## upstream patches
# http://trac.osgeo.org/qgis/ticket/1959
Patch100: qgis-1.0.2-sip49.patch
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: qt4-devel
@ -102,6 +105,8 @@ Addtional theme for qgis - nkids
%prep
%setup -q -n %{name}-%{version}
%patch100 -p1 -b .sip49
# fix spurious executable bits
%{__chmod} -x \
./src/app/legend/qgslegend.h \
@ -126,12 +131,13 @@ done
-D GDAL_INCLUDE_DIR=%{_includedir}/gdal \
-D GDAL_LIBRARY=%{_libdir}/libgdal.so \
.
make VERBOSE=1 %{?_smp_mflags}
make %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
make VERBOSE=1 DESTDIR=%{buildroot} install
make install DESTDIR=%{buildroot}
# remove rpath from files
chrpath --delete \
@ -246,12 +252,18 @@ desktop-file-install --vendor="fedora" \
%changelog
* Wed Dec 23 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.0.2-4
- qgis rebuild for sip-4.9.x (#538119)
* Fri Dec 04 2009 Devrim GÜNDÜZ <devrim@gunduz.org> - 1.0.2-3
- Rebuild for new Geos.
* Tue Nov 17 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.0.2-2
- -python: Requires: sip-api(%%_sip_api_major) >= %%_sip_api (#538119)
* Thu Oct 22 2009 Alex Lancaster <alexlan[AT] fedoraproject org> - 1.0.2-1.1
- Rebuilt to fix python problem (#518121)
* Thu Jul 30 2009 Douglas E. Warner <silfreed@silfreed.net> 1.0.2-1
- updating for 1.0.2
- moving libqgispython.so to python subpackage for bug#507381