Hi, this fixes ocaml-camlimages, too. OK?
Christopher
Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/ocaml-camlimages/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile 22 Aug 2014 22:21:53 -0000 1.8
+++ Makefile 29 Mar 2015 17:19:07 -0000
@@ -19,7 +19,7 @@ PERMIT_PACKAGE_CDROM= Yes
MODULES= lang/ocaml
-WANTLIB+= c X11 Xpm freetype gif jpeg m png tiff z
+WANTLIB+= Xpm freetype gif jpeg m png tiff z
LIB_DEPENDS= graphics/jpeg \
graphics/giflib \
Index: patches/patch-src_gifread_c
===================================================================
RCS
file: /cvs/ports/graphics/ocaml-camlimages/patches/patch-src_gifread_c,v
retrieving revision 1.1 diff -u -p -r1.1 patch-src_gifread_c
--- patches/patch-src_gifread_c 25 Sep 2013 07:58:41
-0000 1.1 +++ patches/patch-src_gifread_c 29 Mar 2015
17:19:07 -0000 @@ -1,9 +1,9 @@
$OpenBSD: patch-src_gifread_c,v 1.1 2013/09/25 07:58:41 sthen Exp $
-giflib 5.0+
+giflib 5.1+
---- src/gifread.c.orig Thu Sep 19 16:51:12 2013
-+++ src/gifread.c Thu Sep 19 16:53:32 2013
+--- src/gifread.c.orig Wed Jun 22 20:04:32 2011
++++ src/gifread.c Sun Mar 29 19:13:22 2015
@@ -140,7 +140,7 @@ value dGifOpenFileName( value name )
GifFileType *GifFile;
int i;
@@ -13,7 +13,23 @@ giflib 5.0+
failwith("DGifOpenFileName");
}
-@@ -200,7 +200,7 @@ value dGifGetLine( value hdl )
+@@ -155,13 +155,14 @@ value dGifOpenFileName( value name )
+ value dGifCloseFile( value hdl )
+ {
+ CAMLparam1(hdl);
++ int ret;
+
+ /* For the bug libungif/giflib 4.1.0 */
+ /* This may add a new memory leak, but it is better than having
+ segmentation faults */
+ ((GifFileType *)hdl)->Image.ColorMap = NULL;
+
+- DGifCloseFile( (GifFileType *) hdl );
++ DGifCloseFile( (GifFileType *) hdl, &ret);
+ CAMLreturn(Val_unit);
+ }
+
+@@ -200,7 +201,7 @@ value dGifGetLine( value hdl )
if( DGifGetLine(GifFile, String_val(buf), GifFile->Image.Width )
== GIF_ERROR ){
Index: patches/patch-src_gifwrite_c
===================================================================
RCS
file: /cvs/ports/graphics/ocaml-camlimages/patches/patch-src_gifwrite_c,v
retrieving revision 1.1 diff -u -p -r1.1 patch-src_gifwrite_c
--- patches/patch-src_gifwrite_c 25 Sep 2013 07:58:42
-0000 1.1 +++ patches/patch-src_gifwrite_c 29 Mar 2015
17:19:07 -0000 @@ -1,9 +1,9 @@
$OpenBSD: patch-src_gifwrite_c,v 1.1 2013/09/25 07:58:42 sthen Exp $
-giflib 5.0+
+giflib 5.1+
---- src/gifwrite.c.orig Thu Sep 19 16:50:20 2013
-+++ src/gifwrite.c Thu Sep 19 16:54:09 2013
+--- src/gifwrite.c.orig Wed Jun 22 20:04:32 2011
++++ src/gifwrite.c Sun Mar 29 19:14:13 2015
@@ -52,7 +52,7 @@ ColorMapObject *ColorMapObject_val( value cmap )
fprintf(stderr, "Creating map with length = %d ...\n", len);
fflush(stderr);
@@ -22,7 +22,23 @@ giflib 5.0+
failwith("EGifOpenFileName");
}
/* gcc -fwritable-strings is required to compile libungif */
-@@ -133,7 +133,7 @@ value eGifPutLine( value oc, value buf )
+@@ -82,13 +82,14 @@ value eGifOpenFileName( name )
+ value eGifCloseFile( value hdl )
+ {
+ CAMLparam1(hdl);
++ int ret;
+
+ /* For the bug libungif/giflib 4.1.0 */
+ /* This may add a new memory leak, but it is better than having
+ segmentation faults */
+ ((GifFileType *)hdl)->Image.ColorMap = NULL;
+
+- EGifCloseFile( (GifFileType *) hdl );
++ EGifCloseFile( (GifFileType *) hdl, &ret );
+ CAMLreturn(Val_unit);
+ }
+
+@@ -133,7 +134,7 @@ value eGifPutLine( value oc, value buf )
if ( EGifPutLine(GifFileOut, String_val(buf),
GifFileOut->Image.Width) == GIF_ERROR ){
--
http://gmerlin.de
OpenPGP: http://gmerlin.de/christopher.pub
F190 D013 8F01 AA53 E080 3F3C F17F B0A1 D44E 4FEE
pgp0e9jtedtyM.pgp
Description: OpenPGP digital signature
