aboutsummaryrefslogtreecommitdiff
path: root/graphics/ocaml-images
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2014-12-27 00:44:05 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2014-12-27 00:44:05 +0000
commitbd2b7646e81fe0e06b546dc4b3a265b7125a1ccc (patch)
tree65874bdacc381799765fd5304f521509af26a77a /graphics/ocaml-images
parent2b2ca44804e7128e5ff31cc08748632fd41869e3 (diff)
downloadports-bd2b7646e81fe0e06b546dc4b3a265b7125a1ccc.tar.gz
ports-bd2b7646e81fe0e06b546dc4b3a265b7125a1ccc.zip
Notes
Diffstat (limited to 'graphics/ocaml-images')
-rw-r--r--graphics/ocaml-images/files/patch-src_gifread.c18
-rw-r--r--graphics/ocaml-images/files/patch-src_gifwrite.c30
2 files changed, 42 insertions, 6 deletions
diff --git a/graphics/ocaml-images/files/patch-src_gifread.c b/graphics/ocaml-images/files/patch-src_gifread.c
index 360520019081..cc4bb948f83f 100644
--- a/graphics/ocaml-images/files/patch-src_gifread.c
+++ b/graphics/ocaml-images/files/patch-src_gifread.c
@@ -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 ){
diff --git a/graphics/ocaml-images/files/patch-src_gifwrite.c b/graphics/ocaml-images/files/patch-src_gifwrite.c
index 15c2acb36171..715f8e018910 100644
--- a/graphics/ocaml-images/files/patch-src_gifwrite.c
+++ b/graphics/ocaml-images/files/patch-src_gifwrite.c
@@ -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 ){