[QGIS Commit] r11250 - in trunk/qgis: . cmake python src/core src/gui src/providers/grass src/providers/postgres src/ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Aug 2 11:28:05 EDT 2009


Author: jef
Date: 2009-08-02 11:28:05 -0400 (Sun, 02 Aug 2009)
New Revision: 11250

Modified:
   trunk/qgis/CMakeLists.txt
   trunk/qgis/cmake/FindGSL.cmake
   trunk/qgis/python/configure.py.in
   trunk/qgis/src/core/CMakeLists.txt
   trunk/qgis/src/core/qgsattributeaction.cpp
   trunk/qgis/src/core/qgsattributeaction.h
   trunk/qgis/src/core/qgsvectorlayer.cpp
   trunk/qgis/src/gui/CMakeLists.txt
   trunk/qgis/src/providers/grass/CMakeLists.txt
   trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
   trunk/qgis/src/ui/qgsattributeactiondialogbase.ui
   trunk/qgis/src/ui/qgsogrsublayersdialogbase.ui
Log:
more cleanups:
- don't link GSL's CBLAS. We don't use it.
- don't link GEOS and GDAL into python bindings. They don't use them directly.
- link libdl on unix when internal spatialite is used
- update SONAMEs
- fix some warnings and typos



Modified: trunk/qgis/CMakeLists.txt
===================================================================
--- trunk/qgis/CMakeLists.txt	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/CMakeLists.txt	2009-08-02 15:28:05 UTC (rev 11250)
@@ -107,6 +107,9 @@
 #############################################################
 # search for dependencies
 
+# we don't use cblas
+SET(DONT_LINK_CBLAS TRUE)
+
 # required
 FIND_PACKAGE(Proj)
 FIND_PACKAGE(Expat)    # GPS importer plugin

Modified: trunk/qgis/cmake/FindGSL.cmake
===================================================================
--- trunk/qgis/cmake/FindGSL.cmake	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/cmake/FindGSL.cmake	2009-08-02 15:28:05 UTC (rev 11250)
@@ -27,24 +27,30 @@
 
   SET(GSL_MINGW_PREFIX "c:/msys/local" )
   SET(GSL_MSVC_PREFIX "$ENV{LIB_DIR}")
-  FIND_LIBRARY(GSL_LIB gsl PATHS 
-    ${GSL_MINGW_PREFIX}/lib 
-    ${GSL_MSVC_PREFIX}/lib
-    )
-  #MSVC version of the lib is just called 'cblas'
-  FIND_LIBRARY(GSLCBLAS_LIB gslcblas cblas PATHS 
-    ${GSL_MINGW_PREFIX}/lib 
-    ${GSL_MSVC_PREFIX}/lib
-    )
 
   FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_blas.h 
     ${GSL_MINGW_PREFIX}/include 
     ${GSL_MSVC_PREFIX}/include
     )
 
-  IF (GSL_LIB AND GSLCBLAS_LIB)
-    SET (GSL_LIBRARIES ${GSL_LIB} ${GSLCBLAS_LIB})
-  ENDIF (GSL_LIB AND GSLCBLAS_LIB)
+  FIND_LIBRARY(GSL_LIB gsl PATHS 
+    ${GSL_MINGW_PREFIX}/lib 
+    ${GSL_MSVC_PREFIX}/lib
+    )
+
+  IF (DONT_LINK_CBLAS)
+    IF (GSL_LIB)
+      SET (GSL_LIBRARIES ${GSL_LIB} )
+    ENDIF (GSL_LIB)
+  ELSE (DONT_LINK_CBLAS)
+    FIND_LIBRARY(GSLCBLAS_LIB gslcblas cblas PATHS 
+      ${GSL_MINGW_PREFIX}/lib 
+      ${GSL_MSVC_PREFIX}/lib
+      )
+    IF (GSL_LIB AND GSLCBLAS_LIB)
+      SET (GSL_LIBRARIES ${GSL_LIB} ${GSLCBLAS_LIB})
+    ENDIF (GSL_LIB AND GSLCBLAS_LIB)
+  ENDIF (DONT_LINK_CBLAS)
   
 ELSE(WIN32)
   IF(UNIX) 
@@ -55,8 +61,14 @@
       /usr/bin/
       )
     # MESSAGE("DBG GSL_CONFIG ${GSL_CONFIG}")
+
+    IF (GSL_CONFIG) 
+      IF (DONT_LINK_CBLAS)
+        SET(LIBS_ARG "--libs-without-cblas")
+      ELSE (DONT_LINK_CBLAS)
+        SET(LIBS_ARG "--libs")
+      ENDIF (DONT_LINK_CBLAS)
     
-    IF (GSL_CONFIG) 
       # set CXXFLAGS to be fed into CXX_FLAGS by the user:
       SET(GSL_CXX_FLAGS "`${GSL_CONFIG} --cflags`")
       
@@ -68,12 +80,12 @@
 
       # set link libraries and link flags
       EXEC_PROGRAM(${GSL_CONFIG}
-          ARGS --libs
+          ARGS ${LIBS_ARG}
           OUTPUT_VARIABLE GSL_LIBRARIES)
       
       ## extract link dirs for rpath  
       EXEC_PROGRAM(${GSL_CONFIG}
-        ARGS --libs
+        ARGS ${LIBS_ARG}
         OUTPUT_VARIABLE GSL_CONFIG_LIBS )
 
       ## split off the link dirs (for rpath)

Modified: trunk/qgis/python/configure.py.in
===================================================================
--- trunk/qgis/python/configure.py.in	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/python/configure.py.in	2009-08-02 15:28:05 UTC (rev 11250)
@@ -9,10 +9,6 @@
 python_path = src_path + '/python'
 gdal_inc_dir = '@GDAL_INCLUDE_DIR@'
 geos_inc_dir = '@GEOS_INCLUDE_DIR@'
-geos_library = '@GEOS_LIB_NAME@'
-geos_library_path = '@GEOS_LIB_PATH@'
-gdal_library = '@GDAL_LIB_NAME@'
-gdal_library_path = '@GDAL_LIB_PATH@'
 
 qt_libs = ["QtCore","QtGui","QtNetwork","QtSvg","QtXml"]
 if sys.platform == 'darwin':
@@ -127,15 +123,7 @@
 # common settings for both core and gui libs
 for mk in [ makefile_core, makefile_gui ]:
   mk.extra_libs = ["qgis_core"]
-  if geos_library!="":
-    mk.extra_libs.append(geos_library)
-  if gdal_library!="":
-    mk.extra_libs.append(gdal_library)
   mk.extra_lib_dirs = [build_path+"/src/core"+intdir]
-  if geos_library_path!="":
-    mk.extra_lib_dirs.append(geos_library_path)
-  if gdal_library_path!="":
-    mk.extra_lib_dirs.append(gdal_library_path)
   mk.extra_include_dirs = [src_path+"/src/core", src_path+"/src/core/composer", 
                            src_path+"/src/core/raster",
                            src_path+"/src/core/renderer",

Modified: trunk/qgis/src/core/CMakeLists.txt
===================================================================
--- trunk/qgis/src/core/CMakeLists.txt	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/core/CMakeLists.txt	2009-08-02 15:28:05 UTC (rev 11250)
@@ -248,9 +248,7 @@
 
 ADD_LIBRARY(qgis_core SHARED ${QGIS_CORE_SRCS} ${QGIS_CORE_MOC_SRCS} ${INDEX_SRC})
 
-SET_TARGET_PROPERTIES(qgis_core PROPERTIES
-			VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
-			SOVERSION ${COMPLETE_VERSION})
+SET_TARGET_PROPERTIES(qgis_core PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})
 
 # make sure to create qgssvnversion.h before compiling
 ADD_DEPENDENCIES(qgis_core svnversion)
@@ -282,7 +280,7 @@
     TARGET_LINK_LIBRARIES(qgis_core ${ICONV_LIBRARY})
   ENDIF (WIN32 OR APPLE)
   IF (UNIX)
-    TARGET_LINK_LIBRARIES(qgis_core pthread)
+    TARGET_LINK_LIBRARIES(qgis_core pthread dl)
   ENDIF (UNIX)
 ELSE (WITH_INTERNAL_SPATIALITE)
   TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY})

Modified: trunk/qgis/src/core/qgsattributeaction.cpp
===================================================================
--- trunk/qgis/src/core/qgsattributeaction.cpp	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/core/qgsattributeaction.cpp	2009-08-02 15:28:05 UTC (rev 11250)
@@ -23,7 +23,6 @@
  ***************************************************************************/
 /*  $Id$ */
 
-#include <iostream>
 #include <vector>
 
 #include <QStringList>
@@ -40,7 +39,7 @@
   mActions.push_back( QgsAction( name, action, capture ) );
 }
 
-void QgsAttributeAction::doAction( unsigned int index, const std::vector<std::pair<QString, QString> >& values,
+void QgsAttributeAction::doAction( unsigned int index, const std::vector< std::pair<QString, QString> > &values,
                                    uint defaultValueIndex )
 {
   aIter action = retrieveAction( index );
@@ -79,7 +78,7 @@
   return a_iter;
 }
 
-QString QgsAttributeAction::expandAction( QString action, const std::vector<std::pair<QString, QString> >& values,
+QString QgsAttributeAction::expandAction( QString action, const std::vector< std::pair<QString, QString> > &values,
     uint clickedOnValue )
 {
   // This function currently replaces all %% characters in the action

Modified: trunk/qgis/src/core/qgsattributeaction.h
===================================================================
--- trunk/qgis/src/core/qgsattributeaction.h	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/core/qgsattributeaction.h	2009-08-02 15:28:05 UTC (rev 11250)
@@ -88,7 +88,7 @@
     //! Does the action using the given values. defaultValueIndex is an
     // index into values which indicates which value in the values vector
     // is to be used if the action has a default placeholder.
-    void doAction( unsigned int index, const std::vector<std::pair<QString, QString> >& values,
+    void doAction( unsigned int index, const std::vector< std::pair<QString, QString> > &values,
                    uint defaultValueIndex = 0 );
 
     //! Returns a const_iterator that points to the QgsAction at the
@@ -114,7 +114,7 @@
 
     //! Expands the given action, replacing all %'s with the value as
     // given.
-    static QString expandAction( QString action, const std::vector<std::pair<QString, QString> >& values,
+    static QString expandAction( QString action, const std::vector< std::pair<QString, QString> > &values,
                                  uint defaultValueIndex );
 
     //! Writes the actions out in XML format

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2009-08-02 15:28:05 UTC (rev 11250)
@@ -3688,7 +3688,9 @@
 
   // FIXME: throw an exception!?
   if ( fields.contains( idx ) )
+  {
     QgsDebugMsg( QString( "field %1 not found" ).arg( idx ) );
+  }
 
   if ( !mValueMaps.contains( fields[idx].name() ) )
     mValueMaps[ fields[idx].name()] = QMap<QString, QVariant>();
@@ -3702,7 +3704,9 @@
 
   // FIXME: throw an exception!?
   if ( fields.contains( idx ) )
+  {
     QgsDebugMsg( QString( "field %1 not found" ).arg( idx ) );
+  }
 
   if ( !mRanges.contains( fields[idx].name() ) )
     mRanges[ fields[idx].name()] = RangeData();

Modified: trunk/qgis/src/gui/CMakeLists.txt
===================================================================
--- trunk/qgis/src/gui/CMakeLists.txt	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/gui/CMakeLists.txt	2009-08-02 15:28:05 UTC (rev 11250)
@@ -72,9 +72,7 @@
 
 ADD_LIBRARY(qgis_gui SHARED ${QGIS_GUI_SRCS} ${QGIS_GUI_MOC_SRCS})
 
-SET_TARGET_PROPERTIES(qgis_gui PROPERTIES 
-			VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
-			SOVERSION ${COMPLETE_VERSION})
+SET_TARGET_PROPERTIES(qgis_gui PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})
 
 # make sure that UI files will be processed first
 ADD_DEPENDENCIES(qgis_gui ui)

Modified: trunk/qgis/src/providers/grass/CMakeLists.txt
===================================================================
--- trunk/qgis/src/providers/grass/CMakeLists.txt	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/providers/grass/CMakeLists.txt	2009-08-02 15:28:05 UTC (rev 11250)
@@ -21,9 +21,7 @@
 
 ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})
 
-SET_TARGET_PROPERTIES(qgisgrass PROPERTIES 
-			VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}
-			SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
+SET_TARGET_PROPERTIES(qgisgrass PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})
 
 IF (WIN32)
   SET_TARGET_PROPERTIES(qgisgrass PROPERTIES COMPILE_FLAGS "\"-DGRASS_EXPORT=__declspec(dllexport)\"" )

Modified: trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp
===================================================================
--- trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/providers/postgres/qgspostgresprovider.cpp	2009-08-02 15:28:05 UTC (rev 11250)
@@ -2950,7 +2950,7 @@
 
   if ( --openCursors == 0 )
   {
-    QgsDebugMsg( "Commiting read-only transaction" );
+    QgsDebugMsg( "Committing read-only transaction" );
     PQexecNR( "COMMIT" );
   }
 

Modified: trunk/qgis/src/ui/qgsattributeactiondialogbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsattributeactiondialogbase.ui	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/ui/qgsattributeactiondialogbase.ui	2009-08-02 15:28:05 UTC (rev 11250)
@@ -63,7 +63,7 @@
       <item row="1" column="0" >
        <widget class="QLabel" name="textLabel2" >
         <property name="whatsThis" >
-         <string>Enter the action here. This can be any program, script or command that is available on your system. When the action is invoked any set of characters that start with a % and then have the name of a field will be replaced by the value of that field. The special characters %% will be replaced by the value of the field that was selected. Double quote marks group text into single arguments to the program, script or command. Double quotes will be ignored if preceeded by a backslash</string>
+         <string>Enter the action here. This can be any program, script or command that is available on your system. When the action is invoked any set of characters that start with a % and then have the name of a field will be replaced by the value of that field. The special characters %% will be replaced by the value of the field that was selected. Double quote marks group text into single arguments to the program, script or command. Double quotes will be ignored if prefixed with a backslash</string>
         </property>
         <property name="text" >
          <string>Action</string>
@@ -79,7 +79,7 @@
          <string>Enter the action command here</string>
         </property>
         <property name="whatsThis" >
-         <string>Enter the action here. This can be any program, script or command that is available on your system. When the action is invoked any set of characters that start with a % and then have the name of a field will be replaced by the value of that field. The special characters %% will be replaced by the value of the field that was selected. Double quote marks group text into single arguments to the program, script or command. Double quotes will be ignored if preceeded by a backslash</string>
+         <string>Enter the action here. This can be any program, script or command that is available on your system. When the action is invoked any set of characters that start with a % and then have the name of a field will be replaced by the value of that field. The special characters %% will be replaced by the value of the field that was selected. Double quote marks group text into single arguments to the program, script or command. Double quotes will be ignored if prefixed with a backslash</string>
         </property>
        </widget>
       </item>

Modified: trunk/qgis/src/ui/qgsogrsublayersdialogbase.ui
===================================================================
--- trunk/qgis/src/ui/qgsogrsublayersdialogbase.ui	2009-08-02 15:25:31 UTC (rev 11249)
+++ trunk/qgis/src/ui/qgsogrsublayersdialogbase.ui	2009-08-02 15:28:05 UTC (rev 11250)
@@ -79,7 +79,7 @@
 &lt;/style>&lt;/head>&lt;body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
 &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">This is the list of all layers available in the datasource of the active layer. You can select the layers to load. The layers will be loaded when you press "OK".&lt;/p>
 &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">&lt;/p>
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">The layer name is format dependant. Consult the OGR documentation or the documentation of your data format to determine the nature of the included information.&lt;/p>
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">The layer name is format dependent. Consult the OGR documentation or the documentation of your data format to determine the nature of the included information.&lt;/p>
 &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">&lt;/p>
 &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif';">&lt;span style=" font-weight:600;">Be advised: &lt;/span>selecting an already opened layer will not generate an error message and the layer will end up loaded twice!&lt;/p>&lt;/body>&lt;/html></string>
      </property>



More information about the QGIS-commit mailing list