aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2015-11-12 23:47:56 +0800
committerantoine <antoine@FreeBSD.org>2015-11-12 23:47:56 +0800
commit6265495100ea47abc64dea8ff35069592f7423a0 (patch)
tree0f7bb51f6a20255e2f09ae3db9bd32aa601ac5cd /graphics
parentd8f53985747abaad0ce805a93e3e292874657a90 (diff)
downloadfreebsd-ports-gnome-6265495100ea47abc64dea8ff35069592f7423a0.tar.gz
freebsd-ports-gnome-6265495100ea47abc64dea8ff35069592f7423a0.tar.zst
freebsd-ports-gnome-6265495100ea47abc64dea8ff35069592f7423a0.zip
Allow building with giflib 5.1
PR: 204492
Diffstat (limited to 'graphics')
-rw-r--r--graphics/swftools/files/patch-gif2swf.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/graphics/swftools/files/patch-gif2swf.c b/graphics/swftools/files/patch-gif2swf.c
index 812b0a87fc2f..c9409f32fa92 100644
--- a/graphics/swftools/files/patch-gif2swf.c
+++ b/graphics/swftools/files/patch-gif2swf.c
@@ -49,7 +49,19 @@
return t;
}
-@@ -488,7 +515,11 @@ int CheckInputFile(char *fname, char **r
+@@ -455,7 +482,11 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, c
+
+ free(pal);
+ free(imagedata);
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(gft, NULL);
++#else
+ DGifCloseFile(gft);
++#endif
+
+ return t;
+ }
+@@ -488,7 +519,11 @@ int CheckInputFile(char *fname, char **r
}
fclose(fi);
@@ -61,7 +73,7 @@
fprintf(stderr, "%s is not a GIF file!\n", fname);
return -1;
}
-@@ -499,7 +530,11 @@ int CheckInputFile(char *fname, char **r
+@@ -499,7 +534,11 @@ int CheckInputFile(char *fname, char **r
global.max_image_height = gft->SHeight;
if (DGifSlurp(gft) != GIF_OK) {
@@ -74,3 +86,15 @@
return -1;
}
// After DGifSlurp() call, gft->ImageCount become available
+@@ -518,7 +557,11 @@ int CheckInputFile(char *fname, char **r
+ fprintf(stderr, "frame: %u, delay: %.3f sec\n", i + 1, getGifDelayTime(gft, i) / 100.0);
+ }
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(gft, NULL);
++#else
+ DGifCloseFile(gft);
++#endif
+
+ return 0;
+ }