From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jun 4 20:10:13 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FD79106566C for ; Mon, 4 Jun 2012 20:10:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4348FC16 for ; Mon, 4 Jun 2012 20:10:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q54KACGA065126 for ; Mon, 4 Jun 2012 20:10:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q54KACO3065125; Mon, 4 Jun 2012 20:10:12 GMT (envelope-from gnats) Date: Mon, 4 Jun 2012 20:10:12 GMT Message-Id: <201206042010.q54KACO3065125@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Rainer Hurling Cc: Subject: Re: ports/168612: graphics/gdal: gifdataset.cpp:599:23: error: ' PrintGifError' was not declared in this scope X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rainer Hurling List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2012 20:10:13 -0000 The following reply was made to PR ports/168612; it has been noted by GNATS. From: Rainer Hurling To: bug-followup@FreeBSD.org, ohartman@zedat.fu-berlin.de Cc: Subject: Re: ports/168612: graphics/gdal: gifdataset.cpp:599:23: error: 'PrintGifError' was not declared in this scope Date: Mon, 04 Jun 2012 22:04:56 +0200 This is a multi-part message in MIME format. --------------060800040605020106040105 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit The (first described) error is not related to png update, but giflib. It is fixed upstream for existing gdal 1.9 branches and upcoming gdal 1.9.2 (trunk), see http://trac.osgeo.org/gdal/ticket/4675 The patch should solve this issue for ports version 1.9.0. --------------060800040605020106040105 Content-Type: text/plain; charset=ISO-8859-15; name="patch-frmts__gif__gifdataset.cpp.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-frmts__gif__gifdataset.cpp.txt" --- frmts/gif/gifdataset.cpp.orig 2012-01-04 08:03:28.000000000 +0100 +++ frmts/gif/gifdataset.cpp 2012-06-04 17:21:24.000000000 +0200 @@ -470,6 +470,28 @@ } /************************************************************************/ +/* 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 +618,7 @@ 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 +642,7 @@ 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; --------------060800040605020106040105--