Compare commits

...

6 Commits
master ... f22

Author SHA1 Message Date
José Matos 41d0e23529 Rebuild for armadillo 6 2016-02-26 11:55:41 +00:00
Volker Fröhlich c6c6230486 Correct changelog date 2016-02-14 11:57:15 +01:00
Volker Fröhlich bbf038cd7f New version 1.11.4 plus fix for GDAL #6360 2016-02-14 02:00:34 +01:00
Volker Froehlich 6bf0232d5c New release 1.11.3 2015-10-21 23:59:15 +02:00
Volker Fröhlich 1ad74388d8 Solve BZ #1271906 (Build iso8211 and s57 utilities) 2015-10-21 23:55:24 +02:00
José Matos 0bfd8aac40 Rebuild for armadillo 5(.xxx.y) 2015-07-08 12:08:07 +01:00
6 changed files with 146 additions and 11 deletions

4
.gitignore vendored
View File

@ -15,3 +15,7 @@ gdalautotest-1.7.0.tar.gz
/gdalautotest-1.11.1.tar.gz
/gdalautotest-1.11.2.tar.gz
/gdal-1.11.2-fedora.tar.xz
/gdalautotest-1.11.3.tar.gz
/gdal-1.11.3-fedora.tar.xz
/gdalautotest-1.11.4.tar.gz
/gdal-1.11.4-fedora.tar.xz

View File

@ -0,0 +1,79 @@
Index: /branches/1.11/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevfs.cpp
===================================================================
--- /branches/1.11/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevfs.cpp (revision 33411)
+++ /branches/1.11/gdal/ogr/ogrsf_frmts/sqlite/ogrsqlitevfs.cpp (revision 33412)
@@ -423,9 +423,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 <windows.h>
+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 <sys/time.h>
+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;
}
@@ -450,5 +490,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;
@@ -467,4 +511,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;
}

View File

@ -0,0 +1,11 @@
diff -Nur gdal-2.0.1-fedora/frmts/iso8211/8211createfromxml.cpp gdal-2.0.1-fedora-iso8211/frmts/iso8211/8211createfromxml.cpp
--- gdal-2.0.1-fedora/frmts/iso8211/8211createfromxml.cpp 2015-09-15 16:06:51.000000000 +0200
+++ gdal-2.0.1-fedora-iso8211/frmts/iso8211/8211createfromxml.cpp 2015-10-18 03:04:21.812446373 +0200
@@ -28,6 +28,7 @@
****************************************************************************/
#include "cpl_minixml.h"
+#include "cpl_conv.h"
#include "iso8211.h"
#include <map>
#include <string>

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Volker Fröhlich
VERSION="1.11.2"
VERSION="1.11.4"
tar xvf gdal-"${VERSION}".tar.xz

View File

@ -18,12 +18,11 @@
# Sadly noarch doesn't work in EL 5, see
# http://fedoraproject.org/wiki/EPEL/GuidelinesAndPolicies
#TODO: EvenR suggested to drop Ruby bindings, as they are unmaintained
# He also suggest to use --with-static-proj4 to actually link to proj, instead of dlopen()ing it.
# Tests can be of a different version
%global testversion 1.11.2
%global testversion 1.11.4
%global run_tests 1
%global with_spatialite 1
@ -40,13 +39,13 @@
Name: gdal
Version: 1.11.2
Release: 3%{?dist}
Version: 1.11.4
Release: 2%{?dist}
Summary: GIS file format library
Group: System Environment/Libraries
License: MIT
URL: http://www.gdal.org
# Source0: http://download.osgeo.org/gdal/gdal-%%{version}.tar.gz
# Source0: http://download.osgeo.org/gdal/%%{version}/gdal-%%{version}.tar.xz
# See PROVENANCE.TXT-fedora and the cleaner script for details!
Source0: %{name}-%{version}-fedora.tar.xz
@ -63,6 +62,12 @@ Patch1: %{name}-g2clib.patch
# Patch for Fedora JNI library location
Patch2: %{name}-jni.patch
# https://trac.osgeo.org/gdal/ticket/6159#ticket
Patch3: %{name}-2.0.1-iso8211-include.patch
# https://trac.osgeo.org/gdal/ticket/6360
Patch4: %{name}-1.11.4-sqlite-crash.patch
# Fedora uses Alternatives for Java
Patch8: %{name}-1.9.0-java.patch
@ -113,6 +118,7 @@ BuildRequires: mysql-devel
BuildRequires: numpy
BuildRequires: pcre-devel
BuildRequires: ogdi-devel
BuildRequires: openjpeg2-devel
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: pkgconfig
BuildRequires: poppler-devel
@ -265,6 +271,8 @@ rm -r frmts/grib/degrib18/g2clib-1.0.4
%patch1 -p1 -b .g2clib~
%patch2 -p1 -b .jni~
%patch3 -p1 -b .iso8211~
%patch4 -p4 -b .sqlite~
%patch8 -p1 -b .java~
# Copy in PROVENANCE.TXT-fedora
@ -372,7 +380,6 @@ export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff"
# For future reference:
# epsilon: Stalled review -- https://bugzilla.redhat.com/show_bug.cgi?id=660024
# openjpeg 2.0 necessary, 1.4 is in Fedora
# Building without pgeo driver, because it drags in Java
%configure \
@ -407,7 +414,7 @@ export CPPFLAGS="$CPPFLAGS -I%{_includedir}/libgeotiff"
--with-odbc \
--with-ogdi \
--without-msg \
--without-openjpeg \
--with-openjpeg \
--with-pcraster \
--with-pg \
--with-png \
@ -434,6 +441,15 @@ pushd swig/perl
echo > Makefile.PL;
popd
# Build some utilities, as requested in BZ #1271906
pushd ogr/ogrsf_frmts/s57/
make all
popd
pushd frmts/iso8211/
make all
popd
# Install the Perl modules in the right place
sed -i 's|INSTALLDIRS = site|INSTALLDIRS = vendor|' swig/perl/Makefile_*
@ -488,6 +504,11 @@ make DESTDIR=%{buildroot} \
install \
install-man
install -pm 755 ogr/ogrsf_frmts/s57/s57dump %{buildroot}%{_bindir}
install -pm 755 frmts/iso8211/8211createfromxml %{buildroot}%{_bindir}
install -pm 755 frmts/iso8211/8211dump %{buildroot}%{_bindir}
install -pm 755 frmts/iso8211/8211view %{buildroot}%{_bindir}
# Directory for auto-loading plugins
mkdir -p %{buildroot}%{_libdir}/%{name}plugins
@ -638,6 +659,7 @@ for f in 'GDAL*' BandProperty ColorAssociation CutlineTransformer DatasetPropert
done
#TODO: What's that?
rm -f %{buildroot}%{_mandir}/man1/*_%{name}-%{version}-fedora_apps_*
rm -f %{buildroot}%{_mandir}/man1/_home_rouault_dist_wrk_gdal_apps_.1*
%check
%if %{run_tests}
@ -695,6 +717,8 @@ popd
%{_bindir}/gdaltransform
%{_bindir}/nearblack
%{_bindir}/ogr*
%{_bindir}/8211*
%{_bindir}/s57*
%{_bindir}/testepsg
%{_mandir}/man1/gdal*.1*
%exclude %{_mandir}/man1/gdal-config.1*
@ -764,6 +788,23 @@ popd
#Or as before, using ldconfig
%changelog
* Fri Feb 26 2016 José Matos <jamatos@fedoraproject.org> - 1.11.4-2
- Rebuild for armadillo 6
* Sun Feb 14 2016 Volker Froehlich <volker27@gmx.at> - 1.11.4-1
- New release
- Patch for GDAL issue #6360
* Wed Oct 21 2015 Volker Froehlich <volker27@gmx.at> - 1.11.3-1
- New release
* Wed Oct 21 2015 Volker Froehlich <volker27@gmx.at> - 1.11.2-5
- Solve BZ #1271906 (Build iso8211 and s57 utilities)
- Support openjpeg2
* Wed Jul 8 2015 José Matos <jamatos@fedoraproject.org> - 1.11.2-4
- Rebuild for armadillo 5(.xxx.y)
* Tue Mar 31 2015 Orion Poplawski <orion@cora.nwra.com> - 1.11.2-3
- Rebuild for g2clib fix
@ -800,7 +841,7 @@ popd
- Perl 5.20 rebuild
* Mon Aug 25 2014 Devrim Gündüz <devrim@gunduz.org> - 1.11.0-7
- Rebuilt for libgeotiff
- Rebuilt for libgeotiff
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

View File

@ -1,2 +1,2 @@
f639373d0709858d41997c708ca80c52 gdal-1.11.2-fedora.tar.xz
3d4cb6361005312dc86016b0b7eb57a4 gdalautotest-1.11.2.tar.gz
8b63eaff1df4d8ccd1a17b497b189282 gdalautotest-1.11.4.tar.gz
4003b0a4c6c3eb603cd63e61fb9416e2 gdal-1.11.4-fedora.tar.xz