summaryrefslogtreecommitdiff
path: root/geography
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2014-05-23 13:04:09 +0000
committerobache <obache@pkgsrc.org>2014-05-23 13:04:09 +0000
commit3ae636fdd7b9c1b893d126368413900790e73f7e (patch)
treeab6149416208355268c5498adea6433f8191df38 /geography
parent0b5e2d904a1f59a930bf9bcc1596e926efada4f2 (diff)
downloadpkgsrc-3ae636fdd7b9c1b893d126368413900790e73f7e.tar.gz
Fixes build with giflib>=5.1.
Diffstat (limited to 'geography')
-rw-r--r--geography/gdal-lib/distinfo5
-rw-r--r--geography/gdal-lib/patches/patch-frmts_gif_biggifdataset.cpp45
-rw-r--r--geography/gdal-lib/patches/patch-frmts_gif_gifabstractdataset.cpp19
-rw-r--r--geography/gdal-lib/patches/patch-frmts_gif_gifdataset.cpp95
4 files changed, 163 insertions, 1 deletions
diff --git a/geography/gdal-lib/distinfo b/geography/gdal-lib/distinfo
index 0174816a50f..86008f95b53 100644
--- a/geography/gdal-lib/distinfo
+++ b/geography/gdal-lib/distinfo
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.21 2013/04/09 15:58:54 adam Exp $
+$NetBSD: distinfo,v 1.22 2014/05/23 13:04:09 obache Exp $
SHA1 (gdal-1.9.2.tar.gz) = 7eda6a4d735b8d6903740e0acdd702b43515e351
RMD160 (gdal-1.9.2.tar.gz) = 1ab34a85946bae4313cbd925cdbbf728d23d7b57
Size (gdal-1.9.2.tar.gz) = 9495381 bytes
+SHA1 (patch-frmts_gif_biggifdataset.cpp) = ec591ad57fdc96e04713ef769f93df6b8e101e0d
+SHA1 (patch-frmts_gif_gifabstractdataset.cpp) = a36bfacd0c1c329d221af8554fa8d236033b970d
+SHA1 (patch-frmts_gif_gifdataset.cpp) = 7d307e0530bad5f5364e08c157e45c39b20b5026
diff --git a/geography/gdal-lib/patches/patch-frmts_gif_biggifdataset.cpp b/geography/gdal-lib/patches/patch-frmts_gif_biggifdataset.cpp
new file mode 100644
index 00000000000..912e75d6e22
--- /dev/null
+++ b/geography/gdal-lib/patches/patch-frmts_gif_biggifdataset.cpp
@@ -0,0 +1,45 @@
+$NetBSD: patch-frmts_gif_biggifdataset.cpp,v 1.1 2014/05/23 13:04:10 obache Exp $
+
+* giflib>=5.1 API change
+
+--- frmts/gif/biggifdataset.cpp.orig 2012-10-09 00:58:25.000000000 +0000
++++ frmts/gif/biggifdataset.cpp
+@@ -337,7 +337,12 @@ CPLErr BIGGIFDataset::ReOpen()
+ /* If the file is already open, close it so we can restart. */
+ /* -------------------------------------------------------------------- */
+ if( hGifFile != NULL )
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ DGifCloseFile( hGifFile, NULL );
++#else
+ DGifCloseFile( hGifFile );
++#endif
+
+ /* -------------------------------------------------------------------- */
+ /* If we are actually reopening, then we assume that access to */
+@@ -411,7 +416,12 @@ CPLErr BIGGIFDataset::ReOpen()
+
+ if( RecordType != IMAGE_DESC_RECORD_TYPE )
+ {
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ DGifCloseFile( hGifFile, NULL );
++#else
+ DGifCloseFile( hGifFile );
++#endif
+ hGifFile = NULL;
+
+ CPLError( CE_Failure, CPLE_OpenFailed,
+@@ -421,7 +431,12 @@ CPLErr BIGGIFDataset::ReOpen()
+
+ if (DGifGetImageDesc(hGifFile) == GIF_ERROR)
+ {
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ DGifCloseFile( hGifFile, NULL );
++#else
+ DGifCloseFile( hGifFile );
++#endif
+ hGifFile = NULL;
+
+ CPLError( CE_Failure, CPLE_OpenFailed,
diff --git a/geography/gdal-lib/patches/patch-frmts_gif_gifabstractdataset.cpp b/geography/gdal-lib/patches/patch-frmts_gif_gifabstractdataset.cpp
new file mode 100644
index 00000000000..441cc4b49ae
--- /dev/null
+++ b/geography/gdal-lib/patches/patch-frmts_gif_gifabstractdataset.cpp
@@ -0,0 +1,19 @@
+$NetBSD: patch-frmts_gif_gifabstractdataset.cpp,v 1.1 2014/05/23 13:04:10 obache Exp $
+
+* giflib>=5.1 API change
+
+--- frmts/gif/gifabstractdataset.cpp.orig 2012-10-09 00:58:25.000000000 +0000
++++ frmts/gif/gifabstractdataset.cpp
+@@ -82,7 +82,12 @@ GIFAbstractDataset::~GIFAbstractDataset(
+ }
+
+ if( hGifFile )
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ DGifCloseFile( hGifFile, NULL );
++#else
+ DGifCloseFile( hGifFile );
++#endif
+
+ if( fp != NULL )
+ VSIFCloseL( fp );
diff --git a/geography/gdal-lib/patches/patch-frmts_gif_gifdataset.cpp b/geography/gdal-lib/patches/patch-frmts_gif_gifdataset.cpp
new file mode 100644
index 00000000000..c8f7e4b421a
--- /dev/null
+++ b/geography/gdal-lib/patches/patch-frmts_gif_gifdataset.cpp
@@ -0,0 +1,95 @@
+$NetBSD: patch-frmts_gif_gifdataset.cpp,v 1.1 2014/05/23 13:04:10 obache Exp $
+
+* giflib>=5.1 API change
+
+--- frmts/gif/gifdataset.cpp.orig 2012-10-09 00:58:25.000000000 +0000
++++ frmts/gif/gifdataset.cpp
+@@ -385,13 +385,23 @@ GDALDataset *GIFDataset::Open( GDALOpenI
+ 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) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ DGifCloseFile( hGifFile, NULL );
++#else
+ DGifCloseFile( hGifFile );
++#endif
+ VSIFCloseL( fp );
+ return NULL;
+ }
+ }
+
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ DGifCloseFile( hGifFile, NULL );
++#else
+ DGifCloseFile( hGifFile );
++#endif
+
+ VSIFSeekL( fp, 0, SEEK_SET);
+
+@@ -416,7 +426,12 @@ GDALDataset *GIFDataset::Open( GDALOpenI
+ if( nGifErr != GIF_OK || hGifFile->SavedImages == NULL )
+ {
+ VSIFCloseL( fp );
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ DGifCloseFile(hGifFile, NULL);
++#else
+ DGifCloseFile(hGifFile);
++#endif
+
+ if( nGifErr == D_GIF_ERR_DATA_TOO_BIG )
+ {
+@@ -648,7 +663,12 @@ GIFDataset::CreateCopy( const char * psz
+ {
+ GifFreeMapObject(psGifCT);
+ GDALPrintGifError(hGifFile, "Error writing gif file.");
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ EGifCloseFile(hGifFile, NULL);
++#else
+ EGifCloseFile(hGifFile);
++#endif
+ VSIFCloseL( fp );
+ return NULL;
+ }
+@@ -672,7 +692,12 @@ GIFDataset::CreateCopy( const char * psz
+ if (EGifPutImageDesc(hGifFile, 0, 0, nXSize, nYSize, bInterlace, NULL) == GIF_ERROR )
+ {
+ GDALPrintGifError(hGifFile, "Error writing gif file.");
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ EGifCloseFile(hGifFile, NULL);
++#else
+ EGifCloseFile(hGifFile);
++#endif
+ VSIFCloseL( fp );
+ return NULL;
+ }
+@@ -755,7 +780,12 @@ GIFDataset::CreateCopy( const char * psz
+ /* -------------------------------------------------------------------- */
+ /* cleanup */
+ /* -------------------------------------------------------------------- */
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ if (EGifCloseFile(hGifFile, NULL) == GIF_ERROR)
++#else
+ if (EGifCloseFile(hGifFile) == GIF_ERROR)
++#endif
+ {
+ CPLError( CE_Failure, CPLE_AppDefined,
+ "EGifCloseFile() failed.\n" );
+@@ -806,7 +836,12 @@ GIFDataset::CreateCopy( const char * psz
+
+ error:
+ if (hGifFile)
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5)
++ EGifCloseFile(hGifFile, NULL);
++#else
+ EGifCloseFile(hGifFile);
++#endif
+ if (fp)
+ VSIFCloseL( fp );
+ if (pabyScanline)