Control: tags -1 + patch

Here's what I did to get qgis to build in Ubuntu.

Apparently there's a new upstream release of qgis coming soon (that I
got one of the patches from).

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 465 6908 C: +27 72 419 8559  UCT: x3127
Description: Update FindPythonLibrary to the version in kde4libs 4:4.10.5-1
 Fixes FTBFS with multi-arched Python
Author: Stefano Rivera <stefa...@ubuntu.com>
Bug-Debian: http://bugs.debian.org/713358
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1010508
Forwarded: no

--- a/cmake/FindPythonLibrary.cmake
+++ b/cmake/FindPythonLibrary.cmake
@@ -12,6 +12,11 @@
 # PYTHON_LONG_VERSION - The version of the Python interpreter found as a human
 #     readable string.
 #
+# PYTHON_SITE_PACKAGES_INSTALL_DIR - this cache variable can be used for installing
+#                              own python modules. You may want to adjust this to be the
+#                              same as ${PYTHON_SITE_PACKAGES_DIR}, but then admin
+#                              privileges may be required for installation.
+#
 # PYTHON_SITE_PACKAGES_DIR - Location of the Python site-packages directory.
 #
 # PYTHON_INCLUDE_PATH - Directory holding the python.h include file.
@@ -19,76 +24,50 @@
 # PYTHON_LIBRARY, PYTHON_LIBRARIES- Location of the Python library.
 
 # Copyright (c) 2007, Simon Edwards <si...@simonzone.com>
+# Copyright (c) 2012, Luca Beltrame <lbeltr...@kde.org>
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
+include(FindPackageHandleStandardArgs)
+
+find_package(PythonInterp)
+
+if (PYTHONINTERP_FOUND)
+
+    option(INSTALL_PYTHON_FILES_IN_PYTHON_PREFIX "Install the Python files in the Python packages dir" FALSE)
+
+    # Set the Python libraries to what we actually found for interpreters
+    set(Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
+    # These are kept for compatibility
+    set(PYTHON_SHORT_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
+    set(PYTHON_LONG_VERSION ${PYTHON_VERSION_STRING})
+
+    find_package(PythonLibs QUIET)
+
+    if(PYTHONLIBS_FOUND)
+        set(PYTHON_LIBRARY ${PYTHON_LIBRARIES})
+    endif(PYTHONLIBS_FOUND)
+
+    # Auto detect Python site-packages directory
+    execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))"
+                    OUTPUT_VARIABLE PYTHON_SITE_PACKAGES_DIR
+                    OUTPUT_STRIP_TRAILING_WHITESPACE
+                   )
 
+    message(STATUS "Python system site-packages directory: ${PYTHON_SITE_PACKAGES_DIR}")
+    if(INSTALL_PYTHON_FILES_IN_PYTHON_PREFIX)
+        set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${PYTHON_SITE_PACKAGES_DIR})
+    else()
+        execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}'))"
+                        OUTPUT_VARIABLE PYTHON_SITE_PACKAGES_INSTALL_DIR
+                        OUTPUT_STRIP_TRAILING_WHITESPACE
+                       )
+    endif()
 
-INCLUDE(CMakeFindFrameworks)
+    if(NOT PYTHON_SITE_PACKAGES_INSTALL_DIR STREQUAL PYTHON_SITE_PACKAGES_DIR)
+        message(STATUS "The Python files will be installed to ${PYTHON_SITE_PACKAGES_INSTALL_DIR}. Make sure to add them to the Python search path (e.g. by setting PYTHONPATH)")
+    endif()
 
-if(EXISTS PYTHON_LIBRARY)
-  # Already in cache, be silent
-  set(PYTHONLIBRARY_FOUND TRUE)
-else(EXISTS PYTHON_LIBRARY)
-
-  FIND_PACKAGE(PythonInterp)
-
-  if(PYTHONINTERP_FOUND)
-
-    FIND_FILE(_find_lib_python_py FindLibPython.py PATHS ${CMAKE_MODULE_PATH})
-
-    EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE}  ${_find_lib_python_py} OUTPUT_VARIABLE python_config)
-    if(python_config)
-      STRING(REGEX REPLACE ".*exec_prefix:([^\n]+).*$" "\\1" PYTHON_PREFIX ${python_config})
-      STRING(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" PYTHON_SHORT_VERSION ${python_config})
-      STRING(REGEX REPLACE ".*\nlong_version:([^\n]+).*$" "\\1" PYTHON_LONG_VERSION ${python_config})
-      STRING(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" PYTHON_INCLUDE_PATH ${python_config})
-      if(NOT PYTHON_SITE_PACKAGES_DIR)
-        if(NOT PYTHON_LIBS_WITH_KDE_LIBS)
-          STRING(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" PYTHON_SITE_PACKAGES_DIR ${python_config})
-        else(NOT PYTHON_LIBS_WITH_KDE_LIBS)
-          set(PYTHON_SITE_PACKAGES_DIR ${KDE4_LIB_INSTALL_DIR}/python${PYTHON_SHORT_VERSION}/site-packages)
-        endif(NOT PYTHON_LIBS_WITH_KDE_LIBS)
-      endif(NOT PYTHON_SITE_PACKAGES_DIR)
-      STRING(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION})
-      set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT})
-      if(WIN32)
-          STRING(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR})
-      endif(WIN32)
-      FIND_LIBRARY(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} PATHS ${PYTHON_PREFIX}/lib ${PYTHON_PREFIX}/libs NO_DEFAULT_PATH)
-      set(PYTHONLIBRARY_FOUND TRUE)
-    endif(python_config)
-
-    # adapted from cmake's builtin FindPythonLibs
-    if(APPLE)
-      CMAKE_FIND_FRAMEWORKS(Python)
-      set(PYTHON_FRAMEWORK_INCLUDES)
-      if(Python_FRAMEWORKS)
-        # If a framework has been selected for the include path,
-        # make sure "-framework" is used to link it.
-        if("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework")
-          set(PYTHON_LIBRARY "")
-          set(PYTHON_DEBUG_LIBRARY "")
-        endif("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework")
-        if(NOT PYTHON_LIBRARY)
-          set (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE)
-        endif(NOT PYTHON_LIBRARY)
-        set(PYTHONLIBRARY_FOUND TRUE)
-      endif(Python_FRAMEWORKS)
-    endif(APPLE)
-  endif(PYTHONINTERP_FOUND)
-
-  if(PYTHONLIBRARY_FOUND)
-    set(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
-    if(NOT PYTHONLIBRARY_FIND_QUIETLY)
-      message(STATUS "Found Python executable: ${PYTHON_EXECUTABLE}")
-      message(STATUS "Found Python version: ${PYTHON_LONG_VERSION}")
-      message(STATUS "Found Python library: ${PYTHON_LIBRARY}")
-    endif(NOT PYTHONLIBRARY_FIND_QUIETLY)
-  else(PYTHONLIBRARY_FOUND)
-    if(PYTHONLIBRARY_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find Python")
-    endif(PYTHONLIBRARY_FIND_REQUIRED)
-  endif(PYTHONLIBRARY_FOUND)
+endif(PYTHONINTERP_FOUND)
 
-endif (EXISTS PYTHON_LIBRARY)
+find_package_handle_standard_args(PythonLibrary DEFAULT_MSG PYTHON_LIBRARY)
Description: Build against SIP >= 4.15
Origin: upstream, http://hub.qgis.org/projects/quantum-gis/repository/revisions/641359d3cb70706f367014648cd961e905bca2dd
Author: Christian Urich <christian.ur...@gmail.com>
Bug-Upstream: http://hub.qgis.org/issues/8507
Last-Updated: 2013-09-19

--- a/src/core/qgsmaplayerregistry.h
+++ b/src/core/qgsmaplayerregistry.h
@@ -121,16 +121,17 @@
 //! protected constructor
     QgsMapLayerRegistry( QObject * parent = 0 );
 
+    /** debugging member
+        invoked when a connect() is made to this object
+    */
+    void connectNotify( const char * signal );
+
   private:
 
     static QgsMapLayerRegistry* mInstance;
 
     QMap<QString, QgsMapLayer*> mMapLayers;
 
-    /** debugging member
-        invoked when a connect() is made to this object
-    */
-    void connectNotify( const char * signal );
 
 
 }; // class QgsMapLayerRegistry
--- a/src/app/qgsattributedialog.h
+++ b/src/app/qgsattributedialog.h
@@ -58,9 +58,10 @@
 
     void dialogDestroyed();
 
-  private:
+  protected:
     bool eventFilter( QObject *obj, QEvent *event );
 
+  private:
     QDialog *mDialog;
     QString mSettingsPath;
     QList<QWidget *> mpWidgets;
--- a/src/gui/qgsmapcanvas.h
+++ b/src/gui/qgsmapcanvas.h
@@ -389,6 +389,11 @@
     /// Handle pattern for implementation object
     std::auto_ptr<CanvasProperties> mCanvasProperties;
 
+    /**debugging member
+       invoked when a connect() is made to this object
+    */
+    void connectNotify( const char * signal );
+
   private:
     /// this class is non-copyable
     /**
@@ -433,11 +438,6 @@
        the last entry in case a lot of resize events arrive in short time*/
     QList< QPair<int, int> > mResizeQueue;
 
-    /**debugging member
-       invoked when a connect() is made to this object
-    */
-    void connectNotify( const char * signal );
-
     //! current layer in legend
     QgsMapLayer* mCurrentLayer;
 
_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to