From 36c8f6ec2973f25c0d2438be3957af02152323e58596c1bb3e2529335e893f71 Mon Sep 17 00:00:00 2001 From: Otto Dassau Date: Sat, 30 Aug 2008 17:13:51 +0000 Subject: [PATCH] added patch from Juergen Fischer to fix sqlite problem OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=47 --- qgis.spec | 3 ++ sqlite3.patch | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 sqlite3.patch diff --git a/qgis.spec b/qgis.spec index d4ac9bc..d07e86a 100644 --- a/qgis.spec +++ b/qgis.spec @@ -6,6 +6,7 @@ Group: Applications/GIS Source: %{name}-%{version}.tar.bz2 Source1: %{name}.desktop Source2: %{name}.rpmlintrc +Patch: sqlite3.patch Url: http://www.qgis.org/ Summary: Quantum GIS (QGIS) is a Geographic Information System (GIS) Packager: Otto Dassau @@ -67,6 +68,7 @@ GRASS plugin for Quantum GIS required to interface with GRASS system. %prep %setup +%patch -p0 %build export CFLAGS="$RPM_OPT_FLAGS" @@ -86,6 +88,7 @@ cmake -Wno-dev \ -D QGIS_PLUGIN_SUBDIR=%{lib}/qgis \ -D QGIS_MANUAL_SUBDIR=share/man \ -D WITH_INTERNAL_SQLITE3=TRUE \ + -D SQLITE3_INCLUDE_DIR=%{buildroot}/src/core/sqlite3 \ . #echo "for 'make' run first:" diff --git a/sqlite3.patch b/sqlite3.patch new file mode 100644 index 0000000..8fcc42e --- /dev/null +++ b/sqlite3.patch @@ -0,0 +1,97 @@ +Index: debian/rules +=================================================================== +--- debian/rules (revision 9215) ++++ debian/rules (working copy) +@@ -36,6 +36,7 @@ + -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_SKIP_RPATH=TRUE \ + -D BINDINGS_GLOBAL_INSTALL=TRUE \ ++ -D WITH_INTERNAL_SQLITE3=TRUE \ + ../.. + + build: patch build-stamp +Index: src/app/CMakeLists.txt +=================================================================== +--- src/app/CMakeLists.txt (revision 9215) ++++ src/app/CMakeLists.txt (working copy) +@@ -189,11 +189,16 @@ + ../plugins + ../python + ${PROJ_INCLUDE_DIR} +- ${SQLITE3_INCLUDE_DIR} + ${GEOS_INCLUDE_DIR} + ${GDAL_INCLUDE_DIR} + ) + ++IF(WITH_INTERNAL_SQLITE3) ++ INCLUDE_DIRECTORIES(../core/sqlite3) ++ELSE(WITH_INTERNAL_SQLITE3) ++ INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR}) ++ENDIF(WITH_INTERNAL_SQLITE3) ++ + IF (POSTGRES_FOUND) + INCLUDE_DIRECTORIES(${POSTGRES_INCLUDE_DIR}) + ENDIF (POSTGRES_FOUND) +Index: src/gui/CMakeLists.txt +=================================================================== +--- src/gui/CMakeLists.txt (revision 9215) ++++ src/gui/CMakeLists.txt (working copy) +@@ -83,10 +83,15 @@ + ${QT_QTSVG_LIBRARY} + ${QT_QTNETWORK_LIBRARY} + ${QT_QTMAIN_LIBRARY} +- ${SQLITE3_LIBRARIES} + qgis_core + ) + ++IF (WITH_INTERNAL_SQLITE3) ++ TARGET_LINK_LIBRARIES(qgis_gui ++ ${SQLITE3_LIBRARIES} ++ ) ++ENDIF(WITH_INTERNAL_SQLITE3) ++ + INSTALL(TARGETS qgis_gui + RUNTIME DESTINATION ${QGIS_BIN_DIR} + LIBRARY DESTINATION ${QGIS_LIB_DIR} +Index: src/helpviewer/CMakeLists.txt +=================================================================== +--- src/helpviewer/CMakeLists.txt (revision 9215) ++++ src/helpviewer/CMakeLists.txt (working copy) +@@ -6,10 +6,15 @@ + main.cpp + qgshelpserver.cpp + qgshelpviewer.cpp +- #../core/qgsapplication.cpp +- #../core/qgslogger.cpp + ) + ++IF(WITH_INTERNAL_SQLITE3) ++ SET(HELP_SRCS ++ ${HELP_SRCS} ++ ${CMAKE_CURRENT_SOURCE_DIR}/../core/sqlite3/sqlite3.c ++ ) ++ENDIF(WITH_INTERNAL_SQLITE3) ++ + SET (HELP_UIS qgshelpviewerbase.ui) + + SET (HELP_MOC_HDRS +@@ -34,13 +39,17 @@ + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../core + ${CMAKE_CURRENT_BINARY_DIR} +- ${SQLITE3_INCLUDE_DIR} + ) + ++ + TARGET_LINK_LIBRARIES(qgis_help +- ${SQLITE3_LIBRARY} + qgis_core + ) ++ ++IF(NOT WITH_INTERNAL_SQLITE3) ++ TARGET_LINK_LIBRARIES(qgis_help ${SQLITE3_LIBRARY}) ++ENDIF(NOT WITH_INTERNAL_SQLITE3) ++ + IF (${QTVERSION} STRLESS "4.3.0") + TARGET_LINK_LIBRARIES(qgis_help + ${QT_LIBRARIES}