aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/qgis
diff options
context:
space:
mode:
authorfluffy <fluffy@FreeBSD.org>2009-11-30 17:45:32 +0800
committerfluffy <fluffy@FreeBSD.org>2009-11-30 17:45:32 +0800
commit140b69f77c5c3242c961e935715e7fa6dea6d254 (patch)
treef9188d04ad1b989b63b1dc0822a4f657068f4e1a /graphics/qgis
parentfcaf84e1b436542ccf419bcb868cb5bed6eefd81 (diff)
downloadfreebsd-ports-gnome-140b69f77c5c3242c961e935715e7fa6dea6d254.tar.gz
freebsd-ports-gnome-140b69f77c5c3242c961e935715e7fa6dea6d254.tar.zst
freebsd-ports-gnome-140b69f77c5c3242c961e935715e7fa6dea6d254.zip
- Backport patches from qgis svn to fix build after py-sip/py-qt4 upgrade
Approved by: miwi (mentor)
Diffstat (limited to 'graphics/qgis')
-rw-r--r--graphics/qgis/files/patch-python__core__conversions.sip103
-rw-r--r--graphics/qgis/files/patch-python__plugins__plugin_installer__qgsplugininstallerbase.ui12
-rw-r--r--graphics/qgis/files/patch-src__provider_grass__qgsgrass.cpp87
-rw-r--r--graphics/qgis/files/patch-src__providers__grass__CMakeLists.txt10
4 files changed, 212 insertions, 0 deletions
diff --git a/graphics/qgis/files/patch-python__core__conversions.sip b/graphics/qgis/files/patch-python__core__conversions.sip
new file mode 100644
index 000000000000..4eda9a2206a4
--- /dev/null
+++ b/graphics/qgis/files/patch-python__core__conversions.sip
@@ -0,0 +1,103 @@
+--- python/core/conversions.sip
++++ python/core/conversions.sip
+@@ -28,6 +28,10 @@
+ {
+ %TypeHeaderCode
+ #include <QVector>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
+@@ -104,6 +108,10 @@
+ {
+ %TypeHeaderCode
+ #include <QVector>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
+@@ -179,6 +187,10 @@
+ {
+ %TypeHeaderCode
+ #include <QSet>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
+@@ -229,6 +241,10 @@
+ {
+ %TypeHeaderCode
+ #include <QSet>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
+@@ -301,6 +317,10 @@
+ {
+ %TypeHeaderCode
+ #include <QMap>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
+@@ -418,6 +438,10 @@
+ {
+ %TypeHeaderCode
+ #include <QMap>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
+@@ -518,7 +542,11 @@
+ %MappedType QMap<TYPE1, TYPE2*>
+ {
+ %TypeHeaderCode
+-#include <qmap.h>
++#include <QMap>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
+@@ -626,6 +654,10 @@
+ {
+ %TypeHeaderCode
+ #include <QMultiMap>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
+@@ -744,6 +776,10 @@
+ {
+ %TypeHeaderCode
+ #include <QMap>
++#if (SIP_VERSION >= 0x040900)
++#define sipClass_QString ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QString))
++#define sipClass_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
++#endif
+ %End
+
+ %ConvertFromTypeCode
diff --git a/graphics/qgis/files/patch-python__plugins__plugin_installer__qgsplugininstallerbase.ui b/graphics/qgis/files/patch-python__plugins__plugin_installer__qgsplugininstallerbase.ui
new file mode 100644
index 000000000000..71ab745b07d4
--- /dev/null
+++ b/graphics/qgis/files/patch-python__plugins__plugin_installer__qgsplugininstallerbase.ui
@@ -0,0 +1,12 @@
+--- python/plugins/plugin_installer/qgsplugininstallerbase.ui
++++ python/plugins/plugin_installer/qgsplugininstallerbase.ui
+@@ -14,8 +14,7 @@
+ <string>QGIS Python Plugin Installer</string>
+ </property>
+ <property name="windowIcon" >
+- <iconset resource="resources.qrc" >
+- <normaloff>:/plugins/installer/qgis-icon.png</normaloff>:/plugins/installer/qgis-icon.png</iconset>
++ <iconset resource="resources.qrc" >:/plugins/installer/qgis-icon.png</iconset>
+ </property>
+ <property name="whatsThis" >
+ <string>QGIS Python Plugin Installer</string>
diff --git a/graphics/qgis/files/patch-src__provider_grass__qgsgrass.cpp b/graphics/qgis/files/patch-src__provider_grass__qgsgrass.cpp
new file mode 100644
index 000000000000..1ebdba423cfe
--- /dev/null
+++ b/graphics/qgis/files/patch-src__provider_grass__qgsgrass.cpp
@@ -0,0 +1,87 @@
+--- src/providers/grass/qgsgrass.cpp
++++ src/providers/grass/qgsgrass.cpp
+@@ -335,10 +335,10 @@
+ // #if defined(WIN32)
+ // G__setenv(( char * ) "GISDBASE", shortPath( gisdbase ).toLocal8Bit().data() );
+ //#else
+- G__setenv(( char * ) "GISDBASE", gisdbase.toAscii().constData() );
++ G__setenv( "GISDBASE", gisdbase.toAscii().data() );
+ //#endif
+- G__setenv(( char * ) "LOCATION_NAME", location.toAscii().constData() );
+- G__setenv(( char * ) "MAPSET", ( char * ) "PERMANENT" ); // PERMANENT must always exist
++ G__setenv( "LOCATION_NAME", location.toAscii().data() );
++ G__setenv( "MAPSET", "PERMANENT" ); // PERMANENT must always exist
+
+ // Add all available mapsets to search path
+ char **ms = G_available_mapsets();
+@@ -354,10 +354,10 @@
+ // #if defined(WIN32)
+ // G__setenv(( char * ) "GISDBASE", shortPath( gisdbase ).toUtf8().data() );
+ // #else
+- G__setenv(( char * ) "GISDBASE", gisdbase.toUtf8().data() );
++ G__setenv( "GISDBASE", gisdbase.toUtf8().data() );
+ // #endif
+- G__setenv(( char * ) "LOCATION_NAME", location.toUtf8().data() );
+- G__setenv(( char * ) "MAPSET", mapset.toUtf8().data() );
++ G__setenv( "LOCATION_NAME", location.toUtf8().data() );
++ G__setenv( "MAPSET", mapset.toUtf8().data() );
+
+ // Add all available mapsets to search path
+ char **ms = G_available_mapsets();
+@@ -551,14 +551,14 @@
+ putenv( gisrcEnvChar );
+
+ // Reinitialize GRASS
+- G__setenv(( char * ) "GISRC", gisrcEnv.toUtf8().data() );
++ G__setenv( "GISRC", gisrcEnv.toUtf8().data() );
+ #if defined(WIN32)
+- G__setenv(( char * ) "GISDBASE", shortPath( gisdbase ).toLocal8Bit().data() );
++ G__setenv( "GISDBASE", shortPath( gisdbase ).toLocal8Bit().data() );
+ #else
+- G__setenv(( char * ) "GISDBASE", gisdbase.toUtf8().data() );
++ G__setenv( "GISDBASE", gisdbase.toUtf8().data() );
+ #endif
+- G__setenv(( char * ) "LOCATION_NAME", location.toLocal8Bit().data() );
+- G__setenv(( char * ) "MAPSET", mapset.toLocal8Bit().data() );
++ G__setenv( "LOCATION_NAME", location.toLocal8Bit().data() );
++ G__setenv( "MAPSET", mapset.toLocal8Bit().data() );
+ defaultGisdbase = gisdbase;
+ defaultLocation = location;
+ defaultMapset = mapset;
+@@ -590,13 +590,13 @@
+ }
+ mMapsetLock = "";
+
+- putenv(( char * ) "GISRC" );
++ putenv( "GISRC" );
+
+ // Reinitialize GRASS
+- G__setenv(( char * ) "GISRC", ( char * ) "" );
+- G__setenv(( char * ) "GISDBASE", ( char * ) "" );
+- G__setenv(( char * ) "LOCATION_NAME", ( char * ) "" );
+- G__setenv(( char * ) "MAPSET", ( char * ) "" );
++ G__setenv( "GISRC", "" );
++ G__setenv( "GISDBASE", "" );
++ G__setenv( "LOCATION_NAME", "" );
++ G__setenv( "MAPSET", "" );
+ defaultGisdbase = "";
+ defaultLocation = "";
+ defaultMapset = "";
+@@ -870,7 +870,7 @@
+ {
+ QgsGrass::setLocation( gisbase, location );
+
+- if ( G__get_window( window, ( char * ) "", ( char * ) "WIND", mapset.toUtf8().data() ) )
++ if ( G__get_window( window, "", "WIND", mapset.toUtf8().data() ) )
+ {
+ return false;
+ }
+@@ -1003,7 +1003,7 @@
+ }
+ else if ( type == Region )
+ {
+- if ( G__get_window( window, ( char * ) "windows",
++ if ( G__get_window( window, "windows",
+ map.toUtf8().data(),
+ mapset.toUtf8().data() ) != NULL )
+ {
diff --git a/graphics/qgis/files/patch-src__providers__grass__CMakeLists.txt b/graphics/qgis/files/patch-src__providers__grass__CMakeLists.txt
new file mode 100644
index 000000000000..cc96fbbf524f
--- /dev/null
+++ b/graphics/qgis/files/patch-src__providers__grass__CMakeLists.txt
@@ -0,0 +1,10 @@
+--- src/providers/grass/CMakeLists.txt
++++ src/providers/grass/CMakeLists.txt
+@@ -18,7 +18,6 @@
+ ${GEOS_INCLUDE_DIR}
+ )
+
+-
+ ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})
+
+ SET_TARGET_PROPERTIES(qgisgrass PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})