diff --git a/.gitignore b/.gitignore index b503632..7f01b22 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ qgis_1.5.0.tar.gz /qgis-1.7.2.tar.bz2 /qgis-1.7.3.tar.bz2 /qgis-1.7.4.tar.bz2 +/qgis-1.8.0.tar.bz2 diff --git a/qgis-1.7.1-spatialindex.patch b/qgis-1.7.1-spatialindex.patch deleted file mode 100644 index ae9dd2e..0000000 --- a/qgis-1.7.1-spatialindex.patch +++ /dev/null @@ -1,257 +0,0 @@ ---- qgis-1.7.1/CMakeLists.txt 2011-09-24 01:38:02.000000000 +0200 -+++ ../BUILD/qgis-1.7.1/CMakeLists.txt 2011-10-16 16:17:07.042202703 +0200 -@@ -66,7 +66,9 @@ - SET (POSTGRESQL_PREFIX "" CACHE PATH "Path to POSTGRESQL base directory") - ENDIF (WITH_POSTGRESQL) - --SET (WITH_INTERNAL_QWTPOLAR TRUE CACHE BOOL "Use internal built of QwtPolar") -+SET (WITH_INTERNAL_QWTPOLAR TRUE CACHE BOOL "Use internal build of QwtPolar") -+ -+SET (WITH_INTERNAL_SPATIALINDEX TRUE CACHE BOOL "Use internal build of Spatialindex") - - SET (WITH_SPATIALITE TRUE CACHE BOOL "Determines whether SPATIALITE support should be built") - -@@ -145,6 +147,11 @@ - FIND_PACKAGE(GSL) # Georeferencer - FIND_PACKAGE(GEOS) - FIND_PACKAGE(GDAL) -+ -+IF (NOT WITH_INTERNAL_SPATIALINDEX) -+ FIND_PACKAGE(Spatialindex REQUIRED) -+ENDIF(NOT WITH_INTERNAL_SPATIALINDEX) -+ - FIND_PACKAGE(Qwt REQUIRED) - IF (NOT WITH_INTERNAL_QWTPOLAR) - FIND_PACKAGE(QwtPolar REQUIRED) ---- qgis-1.7.1/src/core/CMakeLists.txt 2011-09-24 01:38:02.000000000 +0200 -+++ ../BUILD/qgis-1.7.1/src/core/CMakeLists.txt 2011-10-16 16:19:28.845050529 +0200 -@@ -266,7 +266,6 @@ - raster - renderer - symbology -- spatialindex/include - symbology-ng - gps/qextserialport - ${PROJ_INCLUDE_DIR} -@@ -274,6 +273,12 @@ - ${GDAL_INCLUDE_DIR} - ) - -+IF (NOT WITH_INTERNAL_SPATIALINDEX) -+ INCLUDE_DIRECTORIES(${SPATIALINDEX_INCLUDE_DIR}) -+ELSE (NOT WITH_INTERNAL_SPATIALINDEX) -+ INCLUDE_DIRECTORIES(spatialindex/include) -+ENDIF (NOT WITH_INTERNAL_SPATIALINDEX) -+ - IF (NOT WITH_INTERNAL_SPATIALITE) - INCLUDE_DIRECTORIES(${SQLITE3_INCLUDE_DIR}) - ENDIF (NOT WITH_INTERNAL_SPATIALITE) -@@ -296,25 +301,27 @@ - ############################################################# - # spatial indexing library - --# add path prefix to every specified file --MACRO(PATH_PREFIX OUTPUT PREFIX) -- FOREACH(F ${ARGN}) -- SET(${OUTPUT} ${${OUTPUT}} ${PREFIX}/${F}) -- ENDFOREACH(F) --ENDMACRO(PATH_PREFIX) -- --# tools library --PATH_PREFIX(TOOLS_SRC tools ExternalSort.cc ExternalSort.h TemporaryFile.cc Tools.cc) --PATH_PREFIX(GEOM_SRC geometry LineSegment.cc Point.cc Region.cc) -- --# spatial index library --PATH_PREFIX(SPINDEX_SRC spatialindex SpatialIndexImpl.cc) --PATH_PREFIX(STMAN_SRC storagemanager Buffer.cc DiskStorageManager.cc MemoryStorageManager.cc RandomEvictionsBuffer.cc) --PATH_PREFIX(RTREE_SRC rtree BulkLoader.cc Index.cc Leaf.cc Node.cc RTree.cc Statistics.cc) -- --SET(SPINDEX_SRC ${TOOLS_SRC} ${GEOM_SRC} ${SPINDEX_SRC} ${STMAN_SRC} ${RTREE_SRC}) -- --PATH_PREFIX(INDEX_SRC spatialindex ${SPINDEX_SRC}) -+IF (WITH_INTERNAL_SPATIALINDEX) -+ # add path prefix to every specified file -+ MACRO(PATH_PREFIX OUTPUT PREFIX) -+ FOREACH(F ${ARGN}) -+ SET(${OUTPUT} ${${OUTPUT}} ${PREFIX}/${F}) -+ ENDFOREACH(F) -+ ENDMACRO(PATH_PREFIX) -+ -+ # tools library -+ PATH_PREFIX(TOOLS_SRC tools ExternalSort.cc ExternalSort.h TemporaryFile.cc Tools.cc) -+ PATH_PREFIX(GEOM_SRC geometry LineSegment.cc Point.cc Region.cc) -+ -+ # spatial index library -+ PATH_PREFIX(SPINDEX_SRC spatialindex SpatialIndexImpl.cc) -+ PATH_PREFIX(STMAN_SRC storagemanager Buffer.cc DiskStorageManager.cc MemoryStorageManager.cc RandomEvictionsBuffer.cc) -+ PATH_PREFIX(RTREE_SRC rtree BulkLoader.cc Index.cc Leaf.cc Node.cc RTree.cc Statistics.cc) -+ -+ SET(SPINDEX_SRC ${TOOLS_SRC} ${GEOM_SRC} ${SPINDEX_SRC} ${STMAN_SRC} ${RTREE_SRC}) -+ -+ PATH_PREFIX(INDEX_SRC spatialindex ${SPINDEX_SRC}) -+ENDIF (WITH_INTERNAL_SPATIALINDEX) - - ############################################################# - # qgis_core library -@@ -360,6 +367,11 @@ - TARGET_LINK_LIBRARIES(qgis_core ${SQLITE3_LIBRARY}) - ENDIF (WITH_INTERNAL_SPATIALITE) - -+IF (NOT WITH_INTERNAL_SPATIALINDEX) -+ TARGET_LINK_LIBRARIES(qgis_core ${SPATIALINDEX_LIBRARY}) -+ENDIF (NOT WITH_INTERNAL_SPATIALINDEX) -+ -+ - IF (APPLE) - SET_TARGET_PROPERTIES(qgis_core PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE ) - ENDIF (APPLE) ---- qgis-1.7.1/cmake/FindSpatialindex.cmake 1970-01-01 01:00:00.000000000 +0100 -+++ ../BUILD/qgis-1.7.1/cmake/FindSpatialindex.cmake 2011-10-16 16:17:07.043202653 +0200 -@@ -0,0 +1,41 @@ -+# Find Spatialindex -+# ~~~~~~~~ -+# Redistribution and use is allowed according to the terms of the BSD license. -+# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -+# -+# Once run this will define: -+# -+# SPATIALINDEX_FOUND = system has Spatialindex lib -+# SPATIALINDEX_LIBRARY = full path to the Spatialindex library -+# SPATIALINDEX_INCLUDE_DIR = where to find headers -+# -+ -+ -+FIND_PATH(SPATIALINDEX_INCLUDE_DIR NAMES SpatialIndex.h PATHS -+ /usr/include -+ /usr/local/include -+ "$ENV{LIB_DIR}/include" -+ "$ENV{INCLUDE}" -+ PATH_SUFFIXES spatialindex -+ ) -+ -+FIND_LIBRARY(SPATIALINDEX_LIBRARY NAMES spatialindex PATHS -+ /usr/lib -+ /usr/local/lib -+ "$ENV{LIB_DIR}/lib" -+ "$ENV{LIB}/lib" -+ ) -+ -+IF (SPATIALINDEX_INCLUDE_DIR AND SPATIALINDEX_LIBRARY) -+ SET(SPATIALINDEX_FOUND TRUE) -+ENDIF (SPATIALINDEX_INCLUDE_DIR AND SPATIALINDEX_LIBRARY) -+ -+IF (SPATIALINDEX_FOUND) -+ IF (NOT SPATIALINDEX_FIND_QUIETLY) -+ MESSAGE(STATUS "Found Spatialindex: ${SPATIALINDEX_LIBRARY}") -+ ENDIF (NOT SPATIALINDEX_FIND_QUIETLY) -+ELSE (SPATIALINDEX_FOUND) -+ IF (SPATIALINDEX_FIND_REQUIRED) -+ MESSAGE(FATAL_ERROR "Could not find Spatialindex") -+ ENDIF (SPATIALINDEX_FIND_REQUIRED) -+ENDIF (SPATIALINDEX_FOUND) ---- qgis-1.7.1/src/core/spatialindex/qgsspatialindex.h 2011-09-24 01:38:02.000000000 +0200 -+++ ../BUILD/qgis-1.7.1/src/core/spatialindex/qgsspatialindex.h 2011-10-16 16:21:28.682006432 +0200 -@@ -22,6 +22,8 @@ - { - class IStorageManager; - class ISpatialIndex; -+ class Region; -+ class Point; - - namespace StorageManager - { -@@ -29,14 +31,6 @@ - } - } - --namespace Tools --{ -- namespace Geometry -- { -- class Region; -- } --} -- - class QgsFeature; - class QgsRectangle; - class QgsPoint; -@@ -82,9 +76,9 @@ - - protected: - -- Tools::Geometry::Region rectToRegion( QgsRectangle rect ); -+ SpatialIndex::Region rectToRegion( QgsRectangle rect ); - -- bool featureInfo( QgsFeature& f, Tools::Geometry::Region& r, long& id ); -+ bool featureInfo( QgsFeature& f, SpatialIndex::Region& r, long& id ); - - - private: ---- qgis-1.7.1/src/core/spatialindex/qgsspatialindex.cpp 2011-09-24 01:38:02.000000000 +0200 -+++ ../BUILD/qgis-1.7.1/src/core/spatialindex/qgsspatialindex.cpp 2011-10-16 17:06:45.806073042 +0200 -@@ -66,7 +66,7 @@ - RTree::RTreeVariant variant = RTree::RV_RSTAR; - - // create R-tree -- long indexId; -+ SpatialIndex::id_type indexId; - mRTree = RTree::createNewRTree( *mStorage, fillFactor, indexCapacity, - leafCapacity, dimension, variant, indexId ); - } -@@ -78,17 +78,17 @@ - delete mStorageManager; - } - --Tools::Geometry::Region QgsSpatialIndex::rectToRegion( QgsRectangle rect ) -+SpatialIndex::Region QgsSpatialIndex::rectToRegion( QgsRectangle rect ) - { - double pt1[2], pt2[2]; - pt1[0] = rect.xMinimum(); - pt1[1] = rect.yMinimum(); - pt2[0] = rect.xMaximum(); - pt2[1] = rect.yMaximum(); -- return Tools::Geometry::Region( pt1, pt2, 2 ); -+ return Region( pt1, pt2, 2 ); - } - --bool QgsSpatialIndex::featureInfo( QgsFeature& f, Tools::Geometry::Region& r, long& id ) -+bool QgsSpatialIndex::featureInfo( QgsFeature& f, Region& r, long& id ) - { - QgsGeometry *g = f.geometry(); - if ( !g ) -@@ -101,7 +101,7 @@ - - bool QgsSpatialIndex::insertFeature( QgsFeature& f ) - { -- Tools::Geometry::Region r; -+ Region r; - long id; - if ( !featureInfo( f, r, id ) ) - return false; -@@ -131,7 +131,7 @@ - - bool QgsSpatialIndex::deleteFeature( QgsFeature& f ) - { -- Tools::Geometry::Region r; -+ Region r; - long id; - if ( !featureInfo( f, r, id ) ) - return false; -@@ -145,7 +145,7 @@ - QList list; - QgisVisitor visitor( list ); - -- Tools::Geometry::Region r = rectToRegion( rect ); -+ Region r = rectToRegion( rect ); - - mRTree->intersectsWithQuery( r, visitor ); - -@@ -160,7 +160,7 @@ - double pt[2]; - pt[0] = point.x(); - pt[1] = point.y(); -- Tools::Geometry::Point p( pt, 2 ); -+ Point p( pt, 2 ); - - mRTree->nearestNeighborQuery( neighbors, p, visitor ); - diff --git a/qgis.spec b/qgis.spec index a8aadad..f3d6f5d 100644 --- a/qgis.spec +++ b/qgis.spec @@ -1,3 +1,6 @@ +# WARNING: Rebuild QGIS whenever a new version of GRASS is shipped! Even though the soname might stay the same, it won't work anymore. +#http://hub.qgis.org/issues/5274 + %if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif @@ -7,19 +10,22 @@ %global configure_with_spatialite -D WITH_SPATIALITE:BOOL=TRUE -D WITH_INTERNAL_SPATIALITE:BOOL=FALSE %endif +#WITH_GLOBE -- requires osgearth, which is still not packaged #TODO: Run test suite (see debian/rules) -#TODO: Find out about how specific the Grass plugin is to the version of Grass -# See https://bugzilla.redhat.com/show_bug.cgi?id=806442 Name: qgis -Version: 1.7.4 -Release: 4%{?dist} +Version: 1.8.0 +Release: 1%{?dist} Summary: A user friendly Open Source Geographic Information System +# Update FSF address or ship a GPLv3+ license file +# http://hub.qgis.org/issues/3789 Group: Applications/Engineering License: GPLv3+ with exceptions URL: http://www.qgis.org Source0: http://qgis.org/downloads/%{name}-%{version}.tar.bz2 +# The used sources were released as a tarball, the below is only for work in progress +#git archive --format=tar --prefix=qgis-1.8.0/ master | bzip2 >../qgis-1.8.0.tar.gz Source1: %{name}.desktop # Sample configuration files for QGIS mapserver @@ -30,11 +36,7 @@ Source4: %{name}-mapserver-README.fedora Source5: %{name}-mime.xml # Fix detection problem for GRASS libraries -Patch0: qgis-1.5.0-grass.patch - -# Allow to build with system-wide spatialindex -# Solved for releases after the 1.7 series -Patch2: %{name}-1.7.1-spatialindex.patch +Patch0: %{name}-1.5.0-grass.patch # Leaving it to make life easier for ELGIS, as long as they target RHEL 5 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -65,6 +67,7 @@ BuildRequires: PyQt4-devel BuildRequires: PyQwt-devel BuildRequires: python-devel BuildRequires: qt4-devel +#BuildRequires: qt-mobility-devel BuildRequires: qt4-webkit-devel BuildRequires: qwt-devel @@ -72,6 +75,7 @@ BuildRequires: qwtpolar-devel BuildRequires: sip-devel > 4.7 BuildRequires: spatialindex-devel BuildRequires: sqlite-devel +#BuildRequires: xorg-x11-server-Xvfb Requires: gpsbabel @@ -81,10 +85,7 @@ Obsoletes: qgis-theme-gis < 1.1 Obsoletes: qgis-theme-nkids < 1.1 # We don't want to provide private Python extension libs -%{?filter_setup: -%filter_provides_in %{python_sitearch}/.*\.so$ -%filter_setup -} +%global __provides_exclude_from ^%{python_sitearch}/.*\.so$ %description Geographic Information System (GIS) manages, analyzes, and displays @@ -141,13 +142,7 @@ Please refer to %{name}-mapserver-README.fedora for details! %prep %setup -q -%patch0 -p1 -b .grass -%patch2 -p1 -b .spatialindex - -# Update FSF address or ship a GPLv3+ license file -# http://hub.qgis.org/issues/3789 -sed -i 's/59 Temple Place, Suite 330/51 Franklin Street, Fifth Floor/' COPYING -sed -i 's/02111-1307/02110-1301/' COPYING +%patch0 -p1 -b .grass~ # Readme file for QGIS mapserver configuration and Lighttpd sample install -pm0644 %{SOURCE4} . @@ -156,14 +151,11 @@ install -pm0644 %{SOURCE4} . rm -rf src/core/spatialite rm -rf src/core/gps/qwtpolar -# File layout changes for releases after 1.7 series -find src/core/spatialindex -mindepth 1 -depth -type d -exec rm -rf {} \; - -# Solved for releases after 1.7 series -chmod 644 src/mapserver/qgswmsserver.cpp src/app/composer/qgscomposer.cpp - -# The path from WITH_GRASS is used, when trying to find GISBASE. %build + +# Necessary for the test suite +#export LD_LIBRARY_PATH=%{_builddir}%{name}-%{version}/output/%{_lib} + %cmake \ %{_cmake_skip_rpath} \ -D QGIS_LIB_SUBDIR=%{_lib} \ @@ -178,14 +170,20 @@ chmod 644 src/mapserver/qgswmsserver.cpp src/app/composer/qgscomposer.cpp -D GDAL_LIBRARY=%{_libdir}/libgdal.so \ -D ENABLE_TESTS:BOOL=FALSE \ -D WITH_INTERNAL_QWTPOLAR:BOOL=FALSE \ - -D WITH_INTERNAL_SPATIALINDEX:BOOL=FALSE \ + -D WITH_PYSPATIALITE:BOOL=FALSE \ %{configure_with_spatialite} \ . + #TODO: Not ready yet, according to Marco Bernasocchi + #-D WITH_QTMOBILITY:BOOL=TRUE \ + #-D WITH_TOUCH:BOOL=TRUE \ + make %{?_smp_mflags} %install +# Necessary for the test suite +#export LD_LIBRARY_PATH=%{_builddir}%{name}-%{version}/output/%{_lib} rm -rf %{buildroot} make install DESTDIR=%{buildroot} @@ -249,9 +247,18 @@ mv %{buildroot}/usr/share/qgis/i18n/qgis_sr_CS-Latn.qm \ %find_lang %{name} --with-qt + +%check +# All tests basically run fine, but one fails using mock, while a different one fails when building with rpmbuild alone +#export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +#xvfb-run -a -n 1 -s "-screen 0 1280x1024x24 -dpi 96" make Experimental +#rm -f %{_bindir}%{name}_bench + + %clean rm -rf %{buildroot} + %post /sbin/ldconfig touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -264,7 +271,6 @@ if [ $1 -eq 0 ] ; then gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi -#TODO: Wo kommt der Pfad-Vorschlag für GISBASE her? update-mime-database %{_datadir}/mime &> /dev/null || : %posttrans @@ -281,7 +287,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang #TODO: Encoding problem on the help page # CONTRIBUTORS and AUTHORS are intended be viewed in the About-Box -%doc BUGS CHANGELOG CODING COPYING Exception_to_GPL_for_Qt.txt PROVENANCE README +# ChangeLog is 4 MB, therefore don't ship it +%doc BUGS NEWS CODING COPYING Exception_to_GPL_for_Qt.txt PROVENANCE README # QGIS shows these files in the GUI %{_datadir}/%{name}/doc @@ -289,12 +296,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %if ! (0%{?fedora} > 14 || 0%{?rhel}) %lang(sr@latin) %{_datadir}/%{name}/i18n/%{name}_sr@latin.qm %endif -%{_libdir}/lib%{name}_analysis.so.%{version} -%{_libdir}/lib%{name}_core.so.%{version} -%{_libdir}/lib%{name}_gui.so.%{version} -%{_libdir}/lib%{name}sqlanyconnection.so.%{version} +%{_libdir}/lib%{name}_analysis.so.* +%{_libdir}/lib%{name}_core.so.* +%{_libdir}/lib%{name}_gui.so.* +%{_libdir}/lib%{name}sqlanyconnection.so.* +%{_libdir}/lib%{name}_networkanalysis.so.* %{_libdir}/%{name} %{_bindir}/%{name} +%{_bindir}/qbrowser %{_mandir}/man1/%{name}* %dir %{_datadir}/%{name}/ %{_datadir}/mime/packages/qgis.xml @@ -307,7 +316,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/images %{_datadir}/%{name}/resources %{_datadir}/%{name}/svg -%exclude %{_libdir}/libqgisgrass.so.%{version} +%exclude %{_libdir}/libqgisgrass.so.* %exclude %{_libdir}/%{name}/libgrassprovider.so %exclude %{_libdir}/%{name}/libgrassrasterprovider.so %exclude %{_libdir}/%{name}/libgrassplugin.so @@ -319,7 +328,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_libdir}/lib%{name}*.so %files grass -%{_libdir}/lib%{name}grass.so.%{version} +%{_libdir}/lib%{name}grass.so.* %{_libdir}/%{name}/libgrassprovider.so %{_libdir}/%{name}/libgrassrasterprovider.so %{_libdir}/%{name}/libgrassplugin.so @@ -327,7 +336,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/grass %files python -%{_libdir}/libqgispython.so.%{version} +%{_libdir}/libqgispython.so.* %{_datadir}/%{name}/python %{python_sitearch}/%{name} @@ -337,11 +346,20 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_libexecdir}/%{name} %changelog +* Fri Jun 29 2012 Volker Fröhlich - 1.8.0-1 +- New upstream release +- Correct provides-filtering as of https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Usage +- Drop obsolete spatialindex patch +- FSF addresses are now correct +- Explicitly set PYSPATIALITE to false +- Don't ship the 4 MB changelog +- Use wildcard for soname versions + * Tue Apr 10 2012 Volker Fröhlich - 1.7.4-4 -- Been to quick with rebuilding, proper spatialindex build wasn't used yet +- Been to quick with rebuilding, proper spatialindex build wasn't used yet * Mon Apr 9 2012 Volker Fröhlich - 1.7.4-3 -- Apply patch for Spatialindex 1.7's include dir +- Apply patch for Spatialindex 1.7's include dir - Rebuild for Spatialindex 1.7.1 * Fri Mar 23 2012 Volker Fröhlich - 1.7.4-2 diff --git a/sources b/sources index 2df8ac8..9a3fc96 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ad6e2bd8c5eb0c486939c420af5d8c44 qgis-1.7.4.tar.bz2 +1d60520f81d7763c026d0af887ac9a05 qgis-1.8.0.tar.bz2