[csw-devel] SF.net SVN: gar:[18431] csw/mgar/pkg/gdal/trunk
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Sat Jun 16 04:36:22 CEST 2012
Revision: 18431
http://gar.svn.sourceforge.net/gar/?rev=18431&view=rev
Author: bdwalton
Date: 2012-06-16 02:36:21 +0000 (Sat, 16 Jun 2012)
Log Message:
-----------
gdal/trunk: version bump and add two patches - one is from upstream to handle new libgif the other is to fix a compilation error with gcc; http://trac.osgeo.org/gdal/ticket/4705
Modified Paths:
--------------
csw/mgar/pkg/gdal/trunk/Makefile
csw/mgar/pkg/gdal/trunk/checksums
Added Paths:
-----------
csw/mgar/pkg/gdal/trunk/files/0001-Force-use-of-double-data-type-before-checking-for-is.patch
csw/mgar/pkg/gdal/trunk/files/0002-apply-patch-from-upstream-to-handle-building-with-a-.patch
Modified: csw/mgar/pkg/gdal/trunk/Makefile
===================================================================
--- csw/mgar/pkg/gdal/trunk/Makefile 2012-06-16 02:30:23 UTC (rev 18430)
+++ csw/mgar/pkg/gdal/trunk/Makefile 2012-06-16 02:36:21 UTC (rev 18431)
@@ -1,6 +1,6 @@
# $Id$
NAME = gdal
-VERSION = 1.8.0
+VERSION = 1.9.1
CATEGORIES = lib
GARTYPE = v2
@@ -13,7 +13,9 @@
MASTER_SITES = http://download.osgeo.org/$(NAME)/
DISTFILES = $(DISTNAME).tar.gz
-PATCHFILES += 0001-Force-the-use-of-CSWbash.patch
+PATCHFILES += 0001-Force-use-of-double-data-type-before-checking-for-is.patch
+PATCHFILES += 0002-apply-patch-from-upstream-to-handle-building-with-a-.patch
+#PATCHFILES += 0001-Force-the-use-of-CSWbash.patch
PACKAGES += CSWgdal
CATALOGNAME_CSWgdal = gdal
Modified: csw/mgar/pkg/gdal/trunk/checksums
===================================================================
--- csw/mgar/pkg/gdal/trunk/checksums 2012-06-16 02:30:23 UTC (rev 18430)
+++ csw/mgar/pkg/gdal/trunk/checksums 2012-06-16 02:36:21 UTC (rev 18431)
@@ -1 +1 @@
-c762cdab0f7e51a677ba49278a8a263d gdal-1.8.0.tar.gz
+c5cf09b92dac1f5775db056e165b34f5 gdal-1.9.1.tar.gz
Added: csw/mgar/pkg/gdal/trunk/files/0001-Force-use-of-double-data-type-before-checking-for-is.patch
===================================================================
--- csw/mgar/pkg/gdal/trunk/files/0001-Force-use-of-double-data-type-before-checking-for-is.patch (rev 0)
+++ csw/mgar/pkg/gdal/trunk/files/0001-Force-use-of-double-data-type-before-checking-for-is.patch 2012-06-16 02:36:21 UTC (rev 18431)
@@ -0,0 +1,38 @@
+From 48b717d14411826609a81331055818ed2d77784d Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at opencsw.org>
+Date: Fri, 15 Jun 2012 02:40:47 +0200
+Subject: [PATCH] Force use of double data type before checking for isnan
+
+On Solaris 10 the netCDFRasterBand::CheckValidData function was
+triggering errors of the form:
+
+non-floating-point argument in call to function '__builtin_isnan'
+
+This is because math.h includes iso/math_c99.h where isnan is defined
+as __builtin_isnan when GCC v4 or greater is used. This method
+requires a floating point data type.
+
+Fix this issue by casting all values checked by CPLIsNan in this
+function to double.
+
+Signed-off-by: Ben Walton <bwalton at opencsw.org>
+---
+ frmts/netcdf/netcdfdataset.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/frmts/netcdf/netcdfdataset.cpp b/frmts/netcdf/netcdfdataset.cpp
+index 1634360..ebdce25 100644
+--- a/frmts/netcdf/netcdfdataset.cpp
++++ b/frmts/netcdf/netcdfdataset.cpp
+@@ -964,7 +964,7 @@ void netCDFRasterBand::CheckValidData ( void * pImage, int bCheckIsNan )
+ /* check for nodata and nan */
+ if ( CPLIsEqual( (double) ((T *)pImage)[i], dfNoDataValue ) )
+ continue;
+- if( bCheckIsNan && CPLIsNan( ( (T *) pImage)[i] ) ) {
++ if( bCheckIsNan && CPLIsNan( (double)(( (T *) pImage))[i] ) ) {
+ ( (T *)pImage )[i] = (T)dfNoDataValue;
+ continue;
+ }
+--
+1.7.10.3
+
Added: csw/mgar/pkg/gdal/trunk/files/0002-apply-patch-from-upstream-to-handle-building-with-a-.patch
===================================================================
--- csw/mgar/pkg/gdal/trunk/files/0002-apply-patch-from-upstream-to-handle-building-with-a-.patch (rev 0)
+++ csw/mgar/pkg/gdal/trunk/files/0002-apply-patch-from-upstream-to-handle-building-with-a-.patch 2012-06-16 02:36:21 UTC (rev 18431)
@@ -0,0 +1,70 @@
+From 0ea01de68d4fb8b80a141d4607f463e37902e8cd Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at opencsw.org>
+Date: Sat, 16 Jun 2012 02:06:45 +0200
+Subject: [PATCH] apply patch from upstream to handle building with a newer
+ libgif
+
+Signed-off-by: Ben Walton <bwalton at opencsw.org>
+---
+ frmts/gif/gifdataset.cpp | 31 +++++++++++++++++++++++++------
+ 1 file changed, 25 insertions(+), 6 deletions(-)
+
+diff --git a/frmts/gif/gifdataset.cpp b/frmts/gif/gifdataset.cpp
+index c89f34c..67fdb1f 100644
+--- a/frmts/gif/gifdataset.cpp
++++ b/frmts/gif/gifdataset.cpp
+@@ -469,6 +469,29 @@ GDALDataset *GIFDataset::Open( GDALOpenInfo * poOpenInfo )
+ return poDS;
+ }
+
++/************************************************************************/
++/* GDALPrintGifError() */
++/************************************************************************/
++
++static void GDALPrintGifError(const char* pszMsg)
++{
++/* GIFLIB_MAJOR is only defined in libgif >= 4.2.0 */
++/* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
++ ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
++ /* Static string actually, hence the const char* cast */
++ const char* pszGIFLIBError = (const char*) GifErrorString();
++ if (pszGIFLIBError == NULL)
++ pszGIFLIBError = "Unknown error";
++
++ CPLError( CE_Failure, CPLE_AppDefined,
++ "%s. GIFLib Error : %s", pszMsg, pszGIFLIBError );
++#else
++ PrintGifError();
++ CPLError( CE_Failure, CPLE_AppDefined, "%s", pszMsg );
++#endif
++}
++
+ /************************************************************************/
+ /* CreateCopy() */
+ /************************************************************************/
+@@ -596,9 +619,7 @@ GIFDataset::CreateCopy( const char * pszFilename, GDALDataset *poSrcDS,
+ psGifCT->ColorCount, 255, psGifCT) == GIF_ERROR)
+ {
+ FreeMapObject(psGifCT);
+- PrintGifError();
+- CPLError( CE_Failure, CPLE_AppDefined,
+- "Error writing gif file." );
++ GDALPrintGifError("Error writing gif file." );
+ EGifCloseFile(hGifFile);
+ VSIFCloseL( fp );
+ return NULL;
+@@ -622,9 +643,7 @@ GIFDataset::CreateCopy( const char * pszFilename, GDALDataset *poSrcDS,
+
+ if (EGifPutImageDesc(hGifFile, 0, 0, nXSize, nYSize, bInterlace, NULL) == GIF_ERROR )
+ {
+- PrintGifError();
+- CPLError( CE_Failure, CPLE_AppDefined,
+- "Error writing gif file." );
++ GDALPrintGifError("Error writing gif file." );
+ EGifCloseFile(hGifFile);
+ VSIFCloseL( fp );
+ return NULL;
+--
+1.7.10.3
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list