From 505fab81ad8e378834f54424191c2deb351e807f5f1fd9293e66a46fe9f774e6 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 11 May 2016 08:41:17 +0000 Subject: [PATCH] Accepting request 394770 from Application:Geo:Staging OBS-URL: https://build.opensuse.org/request/show/394770 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=28 --- GDALmake.opt.in.patch | 10 ++--- gdal-2.0.2-sqlite-crash.patch | 79 ----------------------------------- gdal-2.0.2.tar.xz | 3 -- gdal-2.1.0.tar.xz | 3 ++ gdal-python_install.patch | 16 ------- gdal.changes | 14 ++++++- gdal.spec | 22 +++++----- ogr_wrap.patch | 13 ++++++ 8 files changed, 45 insertions(+), 115 deletions(-) delete mode 100644 gdal-2.0.2-sqlite-crash.patch delete mode 100644 gdal-2.0.2.tar.xz create mode 100644 gdal-2.1.0.tar.xz delete mode 100644 gdal-python_install.patch create mode 100644 ogr_wrap.patch diff --git a/GDALmake.opt.in.patch b/GDALmake.opt.in.patch index 5941c85..3d922d5 100644 --- a/GDALmake.opt.in.patch +++ b/GDALmake.opt.in.patch @@ -1,7 +1,7 @@ -diff -rup a/GDALmake.opt.in b/GDALmake.opt.in ---- a/GDALmake.opt.in 2016-01-26 16:21:51.000000000 +0100 -+++ b/GDALmake.opt.in 2016-02-23 12:25:16.102779881 +0100 -@@ -66,7 +66,7 @@ INST_DOCS = @exec_prefix@/doc +diff -rup gdal-2.1.0-orig/GDALmake.opt.in gdal-2.1.0/GDALmake.opt.in +--- gdal-2.1.0-orig/GDALmake.opt.in 2016-04-25 20:35:57.000000000 +0300 ++++ gdal-2.1.0/GDALmake.opt.in 2016-05-10 05:25:25.988438174 +0300 +@@ -68,7 +68,7 @@ INST_DOCS = @exec_prefix@/doc INST_MAN = @mandir@ INST_HTML = $(HOME)/www/gdal @@ -9,4 +9,4 @@ diff -rup a/GDALmake.opt.in b/GDALmake.opt.in +CPPFLAGS = @CPPFLAGS@ -I$(GDAL_ROOT)/port -I$(GDAL_ROOT)/gcore @EXTRA_INCLUDES@ -DGDAL_COMPILATION CFLAGS = @CFLAGS@ @C_WFLAGS@ $(USER_DEFS) CXXFLAGS = @CXXFLAGS@ @CXX_WFLAGS@ $(USER_DEFS) - LDFLAGS = @LDFLAGS@ + CFLAGS_NOFTRAPV = @CFLAGS_NOFTRAPV@ @C_WFLAGS@ $(USER_DEFS) diff --git a/gdal-2.0.2-sqlite-crash.patch b/gdal-2.0.2-sqlite-crash.patch deleted file mode 100644 index 744f98f..0000000 --- a/gdal-2.0.2-sqlite-crash.patch +++ /dev/null @@ -1,79 +0,0 @@ -Index: /branches/2.0/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevfs.cpp -=================================================================== ---- a/ogr/ogrsf_frmts/sqlite/ogrsqlitevfs.cpp (revision 33410) -+++ b/ogr/ogrsf_frmts/sqlite/ogrsqlitevfs.cpp (revision 33411) -@@ -381,9 +381,49 @@ - } - --static int OGRSQLiteVFSCurrentTime (sqlite3_vfs* pVFS, double* p1) --{ -- sqlite3_vfs* pUnderlyingVFS = GET_UNDERLYING_VFS(pVFS); -- //CPLDebug("SQLITE", "OGRSQLiteVFSCurrentTime()"); -- return pUnderlyingVFS->xCurrentTime(pUnderlyingVFS, p1); -+// Derived for sqlite3.c implementation of unixCurrentTime64 and winCurrentTime64 -+#ifdef WIN32 -+#include -+static int OGRSQLiteVFSCurrentTimeInt64 (sqlite3_vfs* /*pVFS*/, sqlite3_int64 *piNow) -+{ -+ FILETIME ft; -+ static const sqlite3_int64 winFiletimeEpoch = 23058135*(sqlite3_int64)8640000; -+ static const sqlite3_int64 max32BitValue = -+ (sqlite3_int64)2000000000 + (sqlite3_int64)2000000000 + -+ (sqlite3_int64)294967296; -+ -+#if defined(_WIN32_WCE) -+ SYSTEMTIME time; -+ GetSystemTime(&time); -+ /* if SystemTimeToFileTime() fails, it returns zero. */ -+ if (!SystemTimeToFileTime(&time,&ft)){ -+ return SQLITE_ERROR; -+ } -+#else -+ GetSystemTimeAsFileTime( &ft ); -+#endif -+ *piNow = winFiletimeEpoch + -+ ((((sqlite3_int64)ft.dwHighDateTime)*max32BitValue) + -+ (sqlite3_int64)ft.dwLowDateTime)/(sqlite3_int64)10000; -+ return SQLITE_OK; -+} -+#else -+#include -+static int OGRSQLiteVFSCurrentTimeInt64 (sqlite3_vfs* /*pVFS*/, sqlite3_int64 *piNow) -+{ -+ struct timeval sNow; -+ static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000; -+ (void)gettimeofday(&sNow, NULL); /* Cannot fail given valid arguments */ -+ *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_usec/1000; -+ -+ return SQLITE_OK; -+} -+#endif -+ -+static int OGRSQLiteVFSCurrentTime (sqlite3_vfs* /*pVFS*/, double* p1) -+{ -+ sqlite3_int64 i = 0; -+ int rc = OGRSQLiteVFSCurrentTimeInt64(NULL, &i); -+ *p1 = i/86400000.0; -+ return rc; - } - -@@ -408,5 +448,9 @@ - pVFSAppData->nCounter = 0; - -+#if SQLITE_VERSION_NUMBER >= 3008000L /* perhaps not the minimal version that defines xCurrentTimeInt64, but who cares */ -+ pMyVFS->iVersion = 2; -+#else - pMyVFS->iVersion = 1; -+#endif - pMyVFS->szOsFile = sizeof(OGRSQLiteFileStruct); - pMyVFS->mxPathname = pDefaultVFS->mxPathname; -@@ -425,4 +469,9 @@ - pMyVFS->xCurrentTime = OGRSQLiteVFSCurrentTime; - pMyVFS->xGetLastError = OGRSQLiteVFSGetLastError; -+#if SQLITE_VERSION_NUMBER >= 3008000L /* perhaps not the minimal version that defines xCurrentTimeInt64, but who cares */ -+ if( pMyVFS->iVersion >= 2 ) -+ pMyVFS->xCurrentTimeInt64 = OGRSQLiteVFSCurrentTimeInt64; -+#endif -+ - return pMyVFS; - } diff --git a/gdal-2.0.2.tar.xz b/gdal-2.0.2.tar.xz deleted file mode 100644 index c0eca21..0000000 --- a/gdal-2.0.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:90f838853cc1c07e55893483faa7e923e4b4b1659c6bc9df3538366030a7e622 -size 7018768 diff --git a/gdal-2.1.0.tar.xz b/gdal-2.1.0.tar.xz new file mode 100644 index 0000000..b7d5de8 --- /dev/null +++ b/gdal-2.1.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:568b43441955b306364fcf97fb47d4c1512ac6f2f5f76b2ec39a890d2418ee03 +size 7656496 diff --git a/gdal-python_install.patch b/gdal-python_install.patch deleted file mode 100644 index 49e733d..0000000 --- a/gdal-python_install.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -rup a/swig/python/GNUmakefile b/swig/python/GNUmakefile ---- a/swig/python/GNUmakefile 2015-06-14 21:06:33.000000000 +0200 -+++ b/swig/python/GNUmakefile 2015-07-27 18:24:17.135954561 +0200 -@@ -67,11 +67,7 @@ egg: - - install: - --ifeq ($(PY_HAVE_SETUPTOOLS),1) -- $(PYTHON) setup.py install --else -- $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix) --endif -+ $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) - - for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done - diff --git a/gdal.changes b/gdal.changes index 4da65cb..02a8be3 100644 --- a/gdal.changes +++ b/gdal.changes @@ -1,7 +1,19 @@ +------------------------------------------------------------------- +Tue May 10 03:11:00 UTC 2016 - Angelos Tzotsos + +- New upstream release 2.1.0 + - https://trac.osgeo.org/gdal/wiki/Release/2.1.0-News +- packaging changes + - Removed gdal-python_install.patch + - Removed gdal-2.0.2-sqlite-crash.patch + - Added ogr_wrap.patch to solve no-return-in-non-void-function error + - Submitted ogr_wrap.patch upstream: https://trac.osgeo.org/gdal/ticket/6506 + - Redone patch GDALmake.opt.in.patch + ------------------------------------------------------------------- Tue Feb 23 14:42:10 UTC 2016 - bruno@ioda-net.ch -- Ugrade to 2x series version : 2.0.2 bugfix release +- Upgrade to 2x series version : 2.0.2 bugfix release - https://trac.osgeo.org/gdal/wiki/Release/2.0.2-News - https://trac.osgeo.org/gdal/wiki/Release/2.0.1-News - https://trac.osgeo.org/gdal/wiki/Release/2.0.0-News diff --git a/gdal.spec b/gdal.spec index d1e5fed..b25247e 100644 --- a/gdal.spec +++ b/gdal.spec @@ -23,24 +23,20 @@ %define sourcename gdal Name: gdal -Version: 2.0.2 +Version: 2.1.0 Release: 0 Summary: GDAL/OGR - a translator library for raster and vector geospatial data formats License: MIT and BSD-3-Clause and SUSE-Public-Domain Group: Development/Libraries/C and C++ Url: http://www.gdal.org/ Source0: http://download.osgeo.org/%{name}/%{version}/%{sourcename}-%{version}.tar.xz -Patch0: gdal-python_install.patch -# Was Java but everything changed keep the reminder for 2 updates -#Patch1: gdal-configure.patch -Patch2: gdal-perl.patch +Patch0: gdal-perl.patch # Fix occasional parallel build failure -Patch3: GDALmake.opt.in.patch +Patch1: GDALmake.opt.in.patch # Fix hard coded name of libproj library # But libproj.so is valid if libproj-devel is installed ? -Patch4: gdal-libproj.patch -# https://trac.osgeo.org/gdal/ticket/6360 -Patch5: gdal-2.0.2-sqlite-crash.patch +Patch2: gdal-libproj.patch +Patch3: ogr_wrap.patch BuildRequires: blas-devel BuildRequires: chrpath BuildRequires: curl-devel @@ -159,10 +155,9 @@ The GDAL python modules provide support to handle multiple GIS file formats. %prep %setup -q -n %{sourcename}-%{version} %patch0 -p1 +%patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch5 -p1 # Fix mandir sed -i "s|^mandir=.*|mandir='\${prefix}/share/man'|" configure @@ -324,6 +319,7 @@ sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_ %{_bindir}/gdal_merge.py %{_bindir}/gdal_polygonize.py %{_bindir}/gdal_proximity.py +%{_bindir}/gdal_pansharpen.py %{_bindir}/gdal_rasterize %{_bindir}/gdal_retile.py %{_bindir}/gdal_sieve.py @@ -363,6 +359,7 @@ sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_ %{_mandir}/man1/gdal_fillnodata.1* %{_mandir}/man1/gdal_grid.1* %{_mandir}/man1/gdal_merge.1* +%{_mandir}/man1/gdal_pansharpen.1* %{_mandir}/man1/gdal_polygonize.1* %{_mandir}/man1/gdal_proximity.1* %{_mandir}/man1/gdal_rasterize.1* @@ -382,6 +379,9 @@ sed -i 's,\(#define PACKAGE_.*\),/* \1 */,' %{buildroot}%{_includedir}/gdal/cpl_ %{_mandir}/man1/gdaltindex.1* %{_mandir}/man1/gdaltransform.1* %{_mandir}/man1/gdalwarp.1* +%{_mandir}/man1/gnm_utilities.1* +%{_mandir}/man1/gnmanalyse.1* +%{_mandir}/man1/gnmmanage.1* %{_mandir}/man1/nearblack.1* %{_mandir}/man1/ogr2ogr.1* %{_mandir}/man1/ogr_utilities.1* diff --git a/ogr_wrap.patch b/ogr_wrap.patch new file mode 100644 index 0000000..44e7aab --- /dev/null +++ b/ogr_wrap.patch @@ -0,0 +1,13 @@ +diff -rup gdal-2.1.0-orig/swig/include/ogr.i gdal-2.1.0/swig/include/ogr.i +--- gdal-2.1.0-orig/swig/include/ogr.i 2016-04-25 20:35:57.000000000 +0300 ++++ gdal-2.1.0/swig/include/ogr.i 2016-05-10 17:37:30.288087450 +0300 +@@ -2020,8 +2020,7 @@ public: + int GetGeomFieldIndex(int i) { + if (i < 0 || i >= OGR_FD_GetGeomFieldCount(self)) + CPLError(CE_Failure, 1, FIELD_INDEX_ERROR_TMPL, i); +- else +- return i; ++ return i; + } + #endif +