From 7a21742ca7dc04bda68aeee54c67bf21b90d4190 Mon Sep 17 00:00:00 2001 From: jef Date: Thu, 13 May 2010 08:58:55 +0000 Subject: [PATCH] make PyQt4 detection work with CMake 2.6.0 as found in Debian lenny git-svn-id: http://svn.osgeo.org/qgis/trunk@13473 c8812cc2-4d05-0410-92ff-de0c093fc19c --- cmake/FindPyQt4.cmake | 12 +++++++++--- debian/changelog | 6 +++--- debian/control | 2 +- python/CMakeLists.txt | 4 ++-- src/core/symbology-ng/qgsmarkersymbollayerv2.cpp | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/cmake/FindPyQt4.cmake b/cmake/FindPyQt4.cmake index 37f645ea6c2..9935c31c72c 100644 --- a/cmake/FindPyQt4.cmake +++ b/cmake/FindPyQt4.cmake @@ -22,10 +22,10 @@ # # PYQT4_SIP_FLAGS - The SIP flags used to build PyQt. -IF(EXISTS PYQT4_VERSION) +IF(EXISTS PYQT4_VERSION_STR) # Already in cache, be silent SET(PYQT4_FOUND TRUE) -ELSE(EXISTS PYQT4_VERSION) +ELSE(EXISTS PYQT4_VERSION_STR) FIND_FILE(_find_pyqt_py FindPyQt.py PATHS ${CMAKE_MODULE_PATH}) @@ -50,4 +50,10 @@ ELSE(EXISTS PYQT4_VERSION) ENDIF(PYQT4_FIND_REQUIRED) ENDIF(PYQT4_FOUND) -ENDIF(EXISTS PYQT4_VERSION) +ENDIF(EXISTS PYQT4_VERSION_STR) + +STRING(REGEX REPLACE "^([0-9]*)\\.[0-9]*\\.[0-9]*$" "\\1" PYQT4_MAJOR_VERSION ${PYQT4_VERSION_STR}) +STRING(REGEX REPLACE "^[0-9]*\\.([0-9]*)\\.[0-9]*$" "\\1" PYQT4_MINOR_VERSION ${PYQT4_VERSION_STR}) +STRING(REGEX REPLACE "^[0-9]*\\.[0-9]*\\.([0-9]*)$" "\\1" PYQT4_PATCH_VERSION ${PYQT4_VERSION_STR}) +MATH( EXPR PYQT4_NUM_VERSION "${PYQT4_MAJOR_VERSION}*10000 + ${PYQT4_MINOR_VERSION}*100 + ${PYQT4_PATCH_VERSION}") + diff --git a/debian/changelog b/debian/changelog index a2642e929e3..d2850b8bcf9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,15 +2,15 @@ qgis (1.5.0) UNRELEASED; urgency=low * new development version after 1.5 branch * adapted Francesco Paolo Lovergine's updates to Debian qgis 1.4 package - * require CMake >2.6 and Qt 4.4 for sid + * require CMake >2.6 and Qt 4.4 * remove circular dependencies * integrate new GRASS raster provider and remove dependency to libgdal1-$VERSION-grass * add spatialquery plugin * include qgis.g.browser in grass plugin - * drop symbol tracking, C++ ABIs change too frequently + * drop symbol tracking as C++ ABIs change too frequently - -- Jürgen E. Fischer Sat, 08 May 2010 13:26:13 +0200 + -- Jürgen E. Fischer Thu, 13 May 2010 10:54:06 +0200 qgis (1.4.0) UNRELEASED; urgency=low diff --git a/debian/control b/debian/control index 8481cd2d695..bf3295c1943 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: science Priority: extra Maintainer: Quantum GIS developers Build-Depends: debhelper (>= 7), libgdal1-dev, libpq-dev, - libgeos-dev (>= 3.0.0), grass-dev, libsqlite3-dev, libgsl0-dev, libproj-dev, libexpat1-dev, + libgeos-dev (>= 3.0.0), grass-dev, libsqlite3-dev, libgsl0-dev, proj (< 4.7.0) | libproj-dev (>= 4.7.0), libexpat1-dev, flex, bison, python-dev, cmake (>= 2.6), python-sip4 (>= 4.5.0), python-central (>=0.5), python, sharutils, sip4 (>= 4.5), libqt4-core (>=4.4.0), libqt4-dev (>=4.4.0), libqt4-gui (>=4.4.0), libqt4-sql (>=4.4.0), python-qt4 (>=4.1.0), python-qt4-dev (>=4.1.0), diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index e7ac8462801..dcc47eb6f1d 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -35,9 +35,9 @@ IF(MSVC) ADD_DEFINITIONS(-DNOMINMAX) ENDIF(MSVC) -IF(${PYQT4_VERSION_STR} VERSION_LESS "4.6.0") +IF(${PYQT4_NUM_VERSION} LESS 40600) SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} PROXY_FACTORY) -ENDIF(${PYQT4_VERSION_STR} VERSION_LESS "4.6.0") +ENDIF(${PYQT4_NUM_VERSION} LESS 40600) # core module FILE(GLOB sip_files_core core/*.sip) diff --git a/src/core/symbology-ng/qgsmarkersymbollayerv2.cpp b/src/core/symbology-ng/qgsmarkersymbollayerv2.cpp index 3a161d3f4f0..c6f53208baf 100644 --- a/src/core/symbology-ng/qgsmarkersymbollayerv2.cpp +++ b/src/core/symbology-ng/qgsmarkersymbollayerv2.cpp @@ -342,7 +342,7 @@ void QgsSimpleMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV { QMatrix transform; - bool hasDataDefinedRotation = context.renderHints() & QgsSymbolV2::DataDefinedRotation; + // bool hasDataDefinedRotation = context.renderHints() & QgsSymbolV2::DataDefinedRotation; bool hasDataDefinedSize = context.renderHints() & QgsSymbolV2::DataDefinedSizeScale; // move to the desired position