Date: Sat, 27 Dec 2014 00:44:06 +0000 (UTC) From: Antoine Brodin <antoine@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r375667 - head/graphics/ocaml-images/files Message-ID: <201412270044.sBR0i6dH030959@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: antoine Date: Sat Dec 27 00:44:05 2014 New Revision: 375667 URL: https://svnweb.freebsd.org/changeset/ports/375667 QAT: https://qat.redports.org/buildarchive/r375667/ Log: Allow building with either giflib 4.2 or 5.0 Modified: head/graphics/ocaml-images/files/patch-src_gifread.c head/graphics/ocaml-images/files/patch-src_gifwrite.c Modified: head/graphics/ocaml-images/files/patch-src_gifread.c ============================================================================== --- head/graphics/ocaml-images/files/patch-src_gifread.c Sat Dec 27 00:29:08 2014 (r375666) +++ head/graphics/ocaml-images/files/patch-src_gifread.c Sat Dec 27 00:44:05 2014 (r375667) @@ -1,6 +1,18 @@ ---- src/gifread.c.orig 2012-11-07 22:33:55.000000000 +0100 -+++ src/gifread.c 2012-11-07 22:34:04.000000000 +0100 -@@ -200,7 +200,6 @@ +--- src/gifread.c.orig 2011-06-22 18:04:32 UTC ++++ src/gifread.c +@@ -140,7 +140,11 @@ value dGifOpenFileName( value name ) + GifFileType *GifFile; + int i; + ++#if GIFLIB_MAJOR >= 5 ++ if((GifFile = DGifOpenFileName( String_val(name), NULL )) == NULL){ ++#else + if((GifFile = DGifOpenFileName( String_val(name) )) == NULL){ ++#endif + failwith("DGifOpenFileName"); + } + +@@ -200,7 +204,6 @@ value dGifGetLine( value hdl ) if( DGifGetLine(GifFile, String_val(buf), GifFile->Image.Width ) == GIF_ERROR ){ Modified: head/graphics/ocaml-images/files/patch-src_gifwrite.c ============================================================================== --- head/graphics/ocaml-images/files/patch-src_gifwrite.c Sat Dec 27 00:29:08 2014 (r375666) +++ head/graphics/ocaml-images/files/patch-src_gifwrite.c Sat Dec 27 00:44:05 2014 (r375667) @@ -1,5 +1,5 @@ ---- src/gifwrite.c.orig 2011-06-22 20:04:32.000000000 +0200 -+++ src/gifwrite.c 2012-11-07 22:32:25.000000000 +0100 +--- src/gifwrite.c.orig 2011-06-22 18:04:32 UTC ++++ src/gifwrite.c @@ -25,7 +25,7 @@ #include <gif_lib.h> @@ -9,7 +9,31 @@ { CAMLparam1(list); CAMLlocal1(l); -@@ -133,7 +133,6 @@ +@@ -52,7 +52,11 @@ ColorMapObject *ColorMapObject_val( valu + fprintf(stderr, "Creating map with length = %d ...\n", len); + fflush(stderr); + */ ++#if GIFLIB_MAJOR >= 5 ++ cmapobj = GifMakeMapObject( len, NULL ); ++#else + cmapobj = MakeMapObject( len, NULL ); ++#endif + for(i=0; i< len; i++){ + cmapobj->Colors[i].Red = Int_val(Field(Field(cmap,i),0)); + cmapobj->Colors[i].Green = Int_val(Field(Field(cmap,i),1)); +@@ -68,7 +72,11 @@ value eGifOpenFileName( name ) + + GifFileType *GifFileOut; + ++#if GIFLIB_MAJOR >= 5 ++ if ((GifFileOut = EGifOpenFileName( String_val( name ), 0, NULL) )== NULL) { ++#else + if ((GifFileOut = EGifOpenFileName( String_val( name ), 0) )== NULL) { ++#endif + failwith("EGifOpenFileName"); + } + /* gcc -fwritable-strings is required to compile libungif */ +@@ -133,7 +141,6 @@ value eGifPutLine( value oc, value buf ) if ( EGifPutLine(GifFileOut, String_val(buf), GifFileOut->Image.Width) == GIF_ERROR ){
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412270044.sBR0i6dH030959>