community/gdal to 1.11.0-3

This commit is contained in:
Kevin Mihelich 2014-06-14 19:55:23 +00:00
parent 9372042871
commit 032a693468
2 changed files with 146 additions and 3 deletions

View file

@ -9,7 +9,7 @@
pkgname=gdal
pkgver=1.11.0
pkgrel=2
pkgrel=3
pkgdesc="A translator library for raster geospatial data formats"
arch=('i686' 'x86_64')
url="http://www.gdal.org/"
@ -23,10 +23,12 @@ optdepends=('postgresql: postgresql database support'
changelog=$pkgname.changelog
source=(http://download.osgeo.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz
fix_json_012.patch
gdal-1.5.1-python-install.patch)
gdal-1.5.1-python-install.patch
giflib51.patch)
sha256sums=('989db33ff411e2c888348e71edec5ad06c74ed68781ebfbc4e85179b9d65aafe'
'0ef2a20e9a0e86f85eab9a4a1e5caf7364f1d547deed6f2249fe542d4d2881f4'
'55a0a961b2d1caddf80f18b6763a96690b0b6443fbd5a0c89e29503ded3bcea6')
'55a0a961b2d1caddf80f18b6763a96690b0b6443fbd5a0c89e29503ded3bcea6'
'99bb57b514101a53fda4f163efffb0d9859423c9bd51766bbf99313f1eb0cafc')
prepare() {
cd "${srcdir}/$pkgname-$pkgver"
@ -35,6 +37,8 @@ prepare() {
# Fix compilation failure related to recent json-c changes. FS#40584
patch -Np0 -i "${srcdir}/fix_json_012.patch"
patch -Np0 -i ../giflib51.patch
# python2 fixes
sed -i 's_python python1.5_python2 python python1.5_' configure
for file in swig/python/{,osgeo/,samples/,scripts/}*.py; do

View file

@ -0,0 +1,139 @@
diff -ruN frmts/gif.orig/biggifdataset.cpp frmts/gif/biggifdataset.cpp
--- frmts/gif.orig/biggifdataset.cpp 2014-04-16 20:04:33.000000000 +0000
+++ frmts/gif/biggifdataset.cpp 2014-06-11 12:39:28.420405033 +0000
@@ -339,7 +339,11 @@
/* If the file is already open, close it so we can restart. */
/* -------------------------------------------------------------------- */
if( hGifFile != NULL )
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ DGifCloseFile( hGifFile, NULL );
+#else
DGifCloseFile( hGifFile );
+#endif
/* -------------------------------------------------------------------- */
/* If we are actually reopening, then we assume that access to */
@@ -413,7 +417,11 @@
if( RecordType != IMAGE_DESC_RECORD_TYPE )
{
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ DGifCloseFile( hGifFile, NULL );
+#else
DGifCloseFile( hGifFile );
+#endif
hGifFile = NULL;
CPLError( CE_Failure, CPLE_OpenFailed,
@@ -423,7 +431,11 @@
if (DGifGetImageDesc(hGifFile) == GIF_ERROR)
{
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ DGifCloseFile( hGifFile, NULL );
+#else
DGifCloseFile( hGifFile );
+#endif
hGifFile = NULL;
CPLError( CE_Failure, CPLE_OpenFailed,
diff -ruN frmts/gif.orig/gifabstractdataset.cpp frmts/gif/gifabstractdataset.cpp
--- frmts/gif.orig/gifabstractdataset.cpp 2014-04-16 20:04:33.000000000 +0000
+++ frmts/gif/gifabstractdataset.cpp 2014-06-11 12:54:25.609072106 +0000
@@ -82,7 +82,11 @@
}
if( hGifFile )
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ DGifCloseFile( hGifFile, NULL );
+#else
DGifCloseFile( hGifFile );
+#endif
if( fp != NULL )
VSIFCloseL( fp );
diff -ruN frmts/gif.orig/gifdataset.cpp frmts/gif/gifdataset.cpp
--- frmts/gif.orig/gifdataset.cpp 2014-04-16 20:04:33.000000000 +0000
+++ frmts/gif/gifdataset.cpp 2014-06-11 12:45:37.318469917 +0000
@@ -386,13 +386,21 @@
CPLDebug( "GIF",
"Due to limitations of the GDAL GIF driver we deliberately avoid\n"
"opening large GIF files (larger than 100 megapixels).");
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ DGifCloseFile( hGifFile, NULL );
+#else
DGifCloseFile( hGifFile );
+#endif
VSIFCloseL( fp );
return NULL;
}
}
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ DGifCloseFile( hGifFile, NULL );
+#else
DGifCloseFile( hGifFile );
+#endif
VSIFSeekL( fp, 0, SEEK_SET);
@@ -417,7 +425,11 @@
if( nGifErr != GIF_OK || hGifFile->SavedImages == NULL )
{
VSIFCloseL( fp );
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ DGifCloseFile(hGifFile, NULL);
+#else
DGifCloseFile(hGifFile);
+#endif
if( nGifErr == D_GIF_ERR_DATA_TOO_BIG )
{
@@ -649,7 +661,11 @@
{
GifFreeMapObject(psGifCT);
GDALPrintGifError(hGifFile, "Error writing gif file.");
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ EGifCloseFile(hGifFile, NULL);
+#else
EGifCloseFile(hGifFile);
+#endif
VSIFCloseL( fp );
return NULL;
}
@@ -673,7 +689,11 @@
if (EGifPutImageDesc(hGifFile, 0, 0, nXSize, nYSize, bInterlace, NULL) == GIF_ERROR )
{
GDALPrintGifError(hGifFile, "Error writing gif file.");
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ EGifCloseFile(hGifFile, NULL);
+#else
EGifCloseFile(hGifFile);
+#endif
VSIFCloseL( fp );
return NULL;
}
@@ -756,7 +776,11 @@
/* -------------------------------------------------------------------- */
/* cleanup */
/* -------------------------------------------------------------------- */
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ if (EGifCloseFile(hGifFile, NULL) == GIF_ERROR)
+#else
if (EGifCloseFile(hGifFile) == GIF_ERROR)
+#endif
{
CPLError( CE_Failure, CPLE_AppDefined,
"EGifCloseFile() failed.\n" );
@@ -807,7 +831,11 @@
error:
if (hGifFile)
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
+ EGifCloseFile(hGifFile, NULL);
+#else
EGifCloseFile(hGifFile);
+#endif
if (fp)
VSIFCloseL( fp );
if (pabyScanline)