aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2014-12-27 08:51:07 +0800
committerantoine <antoine@FreeBSD.org>2014-12-27 08:51:07 +0800
commitaea7dadd114c2c2bae1ced9a62900398082e40ed (patch)
tree08eb8851aa220322ea755e771804b18a5c7f9112
parent14388e135289bd2f2bea8e62319ec4da3c9e2c27 (diff)
downloadfreebsd-ports-gnome-aea7dadd114c2c2bae1ced9a62900398082e40ed.tar.gz
freebsd-ports-gnome-aea7dadd114c2c2bae1ced9a62900398082e40ed.tar.zst
freebsd-ports-gnome-aea7dadd114c2c2bae1ced9a62900398082e40ed.zip
Allow building with either giflib 4.2 or 5.0
-rw-r--r--graphics/php5-swfed/files/patch-swf__gif.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/graphics/php5-swfed/files/patch-swf__gif.c b/graphics/php5-swfed/files/patch-swf__gif.c
new file mode 100644
index 000000000000..01812c8cbe15
--- /dev/null
+++ b/graphics/php5-swfed/files/patch-swf__gif.c
@@ -0,0 +1,38 @@
+--- swf_gif.c.orig 2014-02-10 02:32:16 UTC
++++ swf_gif.c
+@@ -132,7 +132,11 @@ gifconv_gif2lossless(unsigned char *gif_
+ gif_buff.data = gif_data;
+ gif_buff.data_len = gif_data_len;
+ gif_buff.data_offset = 0;
++#if GIFLIB_MAJOR >= 5
++ GifFile = DGifOpen(& gif_buff, gif_data_read_func, NULL);
++#else
+ GifFile = DGifOpen(& gif_buff, gif_data_read_func);
++#endif
+ if (GifFile == NULL) {
+ fprintf(stderr, "gifconv_gif2lossless: can't open GIFFile\n");
+ return NULL;
+@@ -252,7 +256,11 @@ gifconv_lossless2gif(void *image_data,
+ gif_buff.data = NULL;
+ gif_buff.data_len = 0;
+ gif_buff.data_offset = 0;
++#if GIFLIB_MAJOR >= 5
++ GifFile = EGifOpen(& gif_buff, gif_data_write_func, NULL);
++#else
+ GifFile = EGifOpen(& gif_buff, gif_data_write_func);
++#endif
+ if (GifFile == NULL) {
+ fprintf(stderr, "gifconv_lossless2gif: can't open GIFFile\n");
+ return NULL;
+@@ -292,7 +300,11 @@ gifconv_lossless2gif(void *image_data,
+ }
+
+ GifFile->SavedImages[0].RasterBits = gif_image_data;
++#if GIFLIB_MAJOR >= 5
++ GifFile->SColorMap = GifMakeMapObject(ColorCount, Colors);
++#else
+ GifFile->SColorMap = MakeMapObject(ColorCount, Colors);
++#endif
+ EGifSpew(GifFile); // XXX
+
+ free(gif_image_data);