summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantoine <antoine@FreeBSD.org>2015-11-12 18:35:53 +0000
committerantoine <antoine@FreeBSD.org>2015-11-12 18:35:53 +0000
commitd0f1ec94be6a99911f6cca042256e5988f348e2b (patch)
tree07ffa1194a060dd6c8f50a2046c9b422bc054830
parente68f201aed7fe126d43c2e327bee9b8d651694ec (diff)
downloadFreeBSD-ports-d0f1ec94be6a99911f6cca042256e5988f348e2b.zip
FreeBSD-ports-d0f1ec94be6a99911f6cca042256e5988f348e2b.tar.gz
Allow building with giflib 5.1
PR: 204492
-rw-r--r--graphics/exact-image/files/patch-codecs__gif.cc28
-rw-r--r--graphics/mapserver/files/patch-mapimageio.c14
-rw-r--r--graphics/ocaml-images/files/patch-src_gifread.c14
-rw-r--r--graphics/ocaml-images/files/patch-src_gifwrite.c14
-rw-r--r--graphics/osg/files/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp14
-rw-r--r--graphics/php5-swfed/files/patch-swf__gif.c51
-rw-r--r--graphics/simpleviewer/files/patch-src_formats_formatgif.cpp24
-rw-r--r--japanese/ming/files/patch-util_gif2dbl.c16
-rw-r--r--mail/spamprobe/files/patch-src_parser_GifParser.cc14
-rw-r--r--net-im/kmess-kde4/Makefile5
-rw-r--r--net-im/kmess-kde4/files/patch-contrib_isf-qt_src_isfqt.cpp7
-rw-r--r--net-mgmt/driftnet/files/patch-gif.c24
-rw-r--r--textproc/gladtex/files/patch-eqn2img.c14
-rw-r--r--x11-toolkits/libgdiplus/files/patch-src_gifcodec.c60
14 files changed, 269 insertions, 30 deletions
diff --git a/graphics/exact-image/files/patch-codecs__gif.cc b/graphics/exact-image/files/patch-codecs__gif.cc
index 361e891..e12cc6c 100644
--- a/graphics/exact-image/files/patch-codecs__gif.cc
+++ b/graphics/exact-image/files/patch-codecs__gif.cc
@@ -115,7 +115,19 @@
return false;
}
}
-@@ -166,7 +212,11 @@ bool GIFCodec::writeImage (std::ostream*
+@@ -155,7 +201,11 @@ int GIFCodec::readImage (std::istream* s
+ // convert colormap to our 16bit "TIFF"format
+ colorspace_de_palette (image, ColorMap->ColorCount, rmap, gmap, bmap);
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ EGifCloseFile(GifFile, NULL);
++#else
+ EGifCloseFile(GifFile);
++#endif
+
+ return true;
+ }
+@@ -166,7 +216,11 @@ bool GIFCodec::writeImage (std::ostream*
GifFileType* GifFile;
GifByteType* Ptr;
@@ -127,7 +139,7 @@
{
std::cerr << "Error preparing GIF file for writing." << std::endl;
return false;
-@@ -175,7 +225,11 @@ bool GIFCodec::writeImage (std::ostream*
+@@ -175,7 +229,11 @@ bool GIFCodec::writeImage (std::ostream*
int ColorMapSize = 256;
// later use our own colormap generation
@@ -139,7 +151,7 @@
if (!OutputColorMap)
return false;
-@@ -203,7 +257,11 @@ bool GIFCodec::writeImage (std::ostream*
+@@ -203,7 +261,11 @@ bool GIFCodec::writeImage (std::ostream*
}
@@ -151,7 +163,7 @@
RedBuffer, GreenBuffer, BlueBuffer,
OutputBuffer, OutputColorMap->Colors) == GIF_ERROR) {
return false;
-@@ -215,7 +273,7 @@ bool GIFCodec::writeImage (std::ostream*
+@@ -215,7 +277,7 @@ bool GIFCodec::writeImage (std::ostream*
if (EGifPutScreenDesc(GifFile, image.w, image.h,
ColorMapSize, 0, OutputColorMap) == GIF_ERROR ||
EGifPutImageDesc(GifFile, 0, 0, image.w, image.h,
@@ -160,12 +172,18 @@
{
std::cerr << "Error writing GIF header." << std::endl;
return false;
-@@ -232,7 +290,7 @@ bool GIFCodec::writeImage (std::ostream*
+@@ -232,9 +294,13 @@ bool GIFCodec::writeImage (std::ostream*
}
free (OutputBuffer);
- delete (RedBuffer); delete (GreenBuffer); delete (BlueBuffer);
+ delete[] RedBuffer; delete[] GreenBuffer; delete[] BlueBuffer;
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ EGifCloseFile(GifFile, NULL);
++#else
EGifCloseFile(GifFile);
++#endif
return true;
+ }
+
diff --git a/graphics/mapserver/files/patch-mapimageio.c b/graphics/mapserver/files/patch-mapimageio.c
new file mode 100644
index 0000000..f103715
--- /dev/null
+++ b/graphics/mapserver/files/patch-mapimageio.c
@@ -0,0 +1,14 @@
+--- mapimageio.c.orig 2015-07-24 07:59:36 UTC
++++ mapimageio.c
+@@ -1058,7 +1058,11 @@ int readGIF(char *path, rasterBufferObj
+
+ } while (recordType != TERMINATE_RECORD_TYPE);
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ if (DGifCloseFile(image, NULL) == GIF_ERROR) {
++#else
+ if (DGifCloseFile(image) == GIF_ERROR) {
++#endif
+ #if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
+ msSetError(MS_MISCERR,"failed to close gif after loading: %s","readGIF()", gif_error_msg(image->Error));
+ #else
diff --git a/graphics/ocaml-images/files/patch-src_gifread.c b/graphics/ocaml-images/files/patch-src_gifread.c
index cc4bb94..c2b4955 100644
--- a/graphics/ocaml-images/files/patch-src_gifread.c
+++ b/graphics/ocaml-images/files/patch-src_gifread.c
@@ -12,7 +12,19 @@
failwith("DGifOpenFileName");
}
-@@ -200,7 +204,6 @@ value dGifGetLine( value hdl )
+@@ -161,7 +165,11 @@ value dGifCloseFile( value hdl )
+ segmentation faults */
+ ((GifFileType *)hdl)->Image.ColorMap = NULL;
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile( (GifFileType *) hdl, NULL );
++#else
+ DGifCloseFile( (GifFileType *) hdl );
++#endif
+ CAMLreturn(Val_unit);
+ }
+
+@@ -200,7 +208,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 715f8e0..0fbcede 100644
--- a/graphics/ocaml-images/files/patch-src_gifwrite.c
+++ b/graphics/ocaml-images/files/patch-src_gifwrite.c
@@ -33,7 +33,19 @@
failwith("EGifOpenFileName");
}
/* gcc -fwritable-strings is required to compile libungif */
-@@ -133,7 +141,6 @@ value eGifPutLine( value oc, value buf )
+@@ -88,7 +96,11 @@ value eGifCloseFile( value hdl )
+ segmentation faults */
+ ((GifFileType *)hdl)->Image.ColorMap = NULL;
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ EGifCloseFile( (GifFileType *) hdl, NULL );
++#else
+ EGifCloseFile( (GifFileType *) hdl );
++#endif
+ CAMLreturn(Val_unit);
+ }
+
+@@ -133,7 +145,6 @@ value eGifPutLine( value oc, value buf )
if ( EGifPutLine(GifFileOut, String_val(buf), GifFileOut->Image.Width)
== GIF_ERROR ){
diff --git a/graphics/osg/files/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp b/graphics/osg/files/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp
new file mode 100644
index 0000000..f825216
--- /dev/null
+++ b/graphics/osg/files/patch-src_osgPlugins_gif_ReaderWriterGIF.cpp
@@ -0,0 +1,14 @@
+--- src/osgPlugins/gif/ReaderWriterGIF.cpp.orig 2013-06-03 14:04:02 UTC
++++ src/osgPlugins/gif/ReaderWriterGIF.cpp
+@@ -561,7 +561,11 @@ GifImageStream** obj)
+ *width_ret = giffile->SWidth;
+ *height_ret = giffile->SHeight;
+ *numComponents_ret = 4;
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(giffile, NULL);
++#else
+ DGifCloseFile(giffile);
++#endif
+ return buffer;
+ }
+
diff --git a/graphics/php5-swfed/files/patch-swf__gif.c b/graphics/php5-swfed/files/patch-swf__gif.c
index 01812c8..b91cb70 100644
--- a/graphics/php5-swfed/files/patch-swf__gif.c
+++ b/graphics/php5-swfed/files/patch-swf__gif.c
@@ -1,6 +1,6 @@
--- swf_gif.c.orig 2014-02-10 02:32:16 UTC
+++ swf_gif.c
-@@ -132,7 +132,11 @@ gifconv_gif2lossless(unsigned char *gif_
+@@ -132,14 +132,22 @@ gifconv_gif2lossless(unsigned char *gif_
gif_buff.data = gif_data;
gif_buff.data_len = gif_data_len;
gif_buff.data_offset = 0;
@@ -12,7 +12,42 @@
if (GifFile == NULL) {
fprintf(stderr, "gifconv_gif2lossless: can't open GIFFile\n");
return NULL;
-@@ -252,7 +256,11 @@ gifconv_lossless2gif(void *image_data,
+ }
+ if (DGifSlurp(GifFile) == GIF_ERROR) {
+ fprintf(stderr, "gifconv_gif2lossless: DGifSlurp failed\n");
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(GifFile, NULL);
++#else
+ DGifCloseFile(GifFile);
++#endif
+ return NULL;
+ }
+ Image = GifFile->SavedImages[0];
+@@ -152,7 +160,11 @@ gifconv_gif2lossless(unsigned char *gif_
+ bpp = ColorMap->BitsPerPixel;
+ if (bpp > 8) {
+ fprintf(stderr, "gifconv_gif2lossless: bpp=%d not implemented. accept only bpp <= 8\n", bpp);
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(GifFile, NULL);
++#else
+ DGifCloseFile(GifFile);
++#endif
+ return NULL;
+ }
+ palette_num = ColorMap->ColorCount;
+@@ -216,7 +228,11 @@ gifconv_gif2lossless(unsigned char *gif_
+ * destruct
+ */
+ if (GifFile) {
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(GifFile, NULL);
++#else
+ DGifCloseFile(GifFile);
++#endif
+ }
+ return image_data;
+ }
+@@ -252,7 +268,11 @@ gifconv_lossless2gif(void *image_data,
gif_buff.data = NULL;
gif_buff.data_len = 0;
gif_buff.data_offset = 0;
@@ -24,7 +59,7 @@
if (GifFile == NULL) {
fprintf(stderr, "gifconv_lossless2gif: can't open GIFFile\n");
return NULL;
-@@ -292,7 +300,11 @@ gifconv_lossless2gif(void *image_data,
+@@ -292,13 +312,21 @@ gifconv_lossless2gif(void *image_data,
}
GifFile->SavedImages[0].RasterBits = gif_image_data;
@@ -36,3 +71,13 @@
EGifSpew(GifFile); // XXX
free(gif_image_data);
+
+ if (GifFile) {
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ EGifCloseFile(GifFile, NULL);
++#else
+ EGifCloseFile(GifFile);
++#endif
+ }
+ *length = gif_buff.data_offset;
+ return gif_buff.data;
diff --git a/graphics/simpleviewer/files/patch-src_formats_formatgif.cpp b/graphics/simpleviewer/files/patch-src_formats_formatgif.cpp
index 046ba05..a387caa 100644
--- a/graphics/simpleviewer/files/patch-src_formats_formatgif.cpp
+++ b/graphics/simpleviewer/files/patch-src_formats_formatgif.cpp
@@ -12,3 +12,27 @@
if(file == 0) {
std::cout << "Error Opening GIF image" << std::endl;
return false;
+@@ -31,7 +35,11 @@ bool CFormatGif::Load(const char* filena
+ int res = DGifSlurp(file);
+ if(res != GIF_OK || file->ImageCount < 1) {
+ std::cout << "Error Opening GIF image" << std::endl;
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(file, NULL);
++#else
+ DGifCloseFile(file);
++#endif
+ return false;
+ }
+
+@@ -130,7 +138,11 @@ bool CFormatGif::Load(const char* filena
+ //
+ // std::cout << "Record Type" << (int)recordType << std::endl;
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(file, NULL);
++#else
+ DGifCloseFile(file);
++#endif
+
+ return true;
+ }
diff --git a/japanese/ming/files/patch-util_gif2dbl.c b/japanese/ming/files/patch-util_gif2dbl.c
index 78da800..72ab6db 100644
--- a/japanese/ming/files/patch-util_gif2dbl.c
+++ b/japanese/ming/files/patch-util_gif2dbl.c
@@ -1,5 +1,5 @@
---- ../util/gif2dbl.c.orig 2002-06-24 12:21:54.000000000 +0000
-+++ ../util/gif2dbl.c 2014-12-26 17:29:52.000000000 +0000
+--- ../util/gif2dbl.c.orig 2002-06-24 12:21:54 UTC
++++ ../util/gif2dbl.c
@@ -16,7 +16,6 @@
void error(char *msg)
{
@@ -20,3 +20,15 @@
error("Error opening file");
if(DGifSlurp(file) != GIF_OK)
+@@ -181,7 +184,11 @@ unsigned char *readGif(char *fileName, i
+ }
+
+ /* Done! */
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(file, NULL);
++#else
+ DGifCloseFile(file);
++#endif
+
+ *length = size;
+ return data;
diff --git a/mail/spamprobe/files/patch-src_parser_GifParser.cc b/mail/spamprobe/files/patch-src_parser_GifParser.cc
index 9019836..5fc65da 100644
--- a/mail/spamprobe/files/patch-src_parser_GifParser.cc
+++ b/mail/spamprobe/files/patch-src_parser_GifParser.cc
@@ -1,6 +1,18 @@
--- src/parser/GifParser.cc.orig 2006-11-17 07:24:49 UTC
+++ src/parser/GifParser.cc
-@@ -99,7 +99,11 @@ bool GifParser::parseImage()
+@@ -81,7 +81,11 @@ GifParser::GifParser(Message *message,
+ GifParser::~GifParser()
+ {
+ if (m_gif) {
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(m_gif, NULL);
++#else
+ DGifCloseFile(m_gif);
++#endif
+ }
+ }
+
+@@ -99,7 +103,11 @@ bool GifParser::parseImage()
void GifParser::openImage()
{
m_nextByteIndex = 0;
diff --git a/net-im/kmess-kde4/Makefile b/net-im/kmess-kde4/Makefile
index f7650c9..7c7fc92 100644
--- a/net-im/kmess-kde4/Makefile
+++ b/net-im/kmess-kde4/Makefile
@@ -3,14 +3,15 @@
PORTNAME= kmess
PORTVERSION= 2.0.6.2
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= net-im kde
MASTER_SITES= SF/${PORTNAME}/Latest%20versions/${PORTVERSION}/
MAINTAINER= syncer@gmail.com
COMMENT= MSN Messenger client for KDE
-LIB_DEPENDS= libqca.so:${PORTSDIR}/devel/qca
+LIB_DEPENDS= libqca.so:${PORTSDIR}/devel/qca \
+ libgif.so:${PORTSDIR}/graphics/giflib
USE_GNOME= libxml2 libxslt
USE_KDE4= kdeprefix kdelibs libkonq automoc4
diff --git a/net-im/kmess-kde4/files/patch-contrib_isf-qt_src_isfqt.cpp b/net-im/kmess-kde4/files/patch-contrib_isf-qt_src_isfqt.cpp
index 92ece07..6ac2efa 100644
--- a/net-im/kmess-kde4/files/patch-contrib_isf-qt_src_isfqt.cpp
+++ b/net-im/kmess-kde4/files/patch-contrib_isf-qt_src_isfqt.cpp
@@ -72,10 +72,15 @@
{
qWarning() << "EGifPutExtensionLast (0) failed!";
goto writeError;
-@@ -624,12 +648,16 @@ QByteArray Stream::writerGif( const Draw
+@@ -623,13 +647,21 @@ QByteArray Stream::writerGif( const Draw
+
writeError:
// Clean up the GIF converter etc
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ EGifCloseFile( gifImage, NULL );
++#else
EGifCloseFile( gifImage );
++#endif
+#if GIFLIB_MAJOR >= 5
+ GifFreeMapObject( cmap );
+#else
diff --git a/net-mgmt/driftnet/files/patch-gif.c b/net-mgmt/driftnet/files/patch-gif.c
index f50a8ad..7a007d6 100644
--- a/net-mgmt/driftnet/files/patch-gif.c
+++ b/net-mgmt/driftnet/files/patch-gif.c
@@ -12,3 +12,27 @@
if (!I->us) {
I->err = IE_HDRFORMAT;
return 0;
+@@ -36,7 +40,11 @@ int gif_load_hdr(img I) {
+ * Abort loading a GIF file after the header is done.
+ */
+ int gif_abort_load(img I) {
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile((GifFileType*)I->us, NULL);
++#else
+ DGifCloseFile((GifFileType*)I->us);
++#endif
+ return 1;
+ }
+
+@@ -114,7 +122,11 @@ int gif_load_img(img I) {
+ ret = 1;
+ fail:
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile(g, NULL);
++#else
+ DGifCloseFile(g);
++#endif
+
+ return ret;
+ }
diff --git a/textproc/gladtex/files/patch-eqn2img.c b/textproc/gladtex/files/patch-eqn2img.c
index 1f7b034..1b663c4 100644
--- a/textproc/gladtex/files/patch-eqn2img.c
+++ b/textproc/gladtex/files/patch-eqn2img.c
@@ -50,7 +50,19 @@
/* EGifSetGifVersion("89a"); this causes segfault (but is really required for transparency, I think) */
EGifPutScreenDesc(fp, width, height, 256, 255, color_map);
-@@ -715,7 +727,7 @@ int to_ps(char *basename, int verbose) {
+@@ -649,7 +661,11 @@ int gif_write(png_bytepp image, char *im
+ return -1;
+ }
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ EGifCloseFile(fp, NULL);
++#else
+ EGifCloseFile(fp);
++#endif
+
+ return 0;
+ }
+@@ -715,7 +731,7 @@ int to_ps(char *basename, int verbose) {
fprintf(stderr, " -> ps");
cmd = NEW(char, 2*strlen(basename) + 46);
diff --git a/x11-toolkits/libgdiplus/files/patch-src_gifcodec.c b/x11-toolkits/libgdiplus/files/patch-src_gifcodec.c
index 07944d5..fdaa7a8 100644
--- a/x11-toolkits/libgdiplus/files/patch-src_gifcodec.c
+++ b/x11-toolkits/libgdiplus/files/patch-src_gifcodec.c
@@ -1,6 +1,6 @@
---- src/gifcodec.c.orig
+--- src/gifcodec.c.orig 2015-01-05 10:27:06 UTC
+++ src/gifcodec.c
-@@ -40,9 +40,13 @@
+@@ -40,9 +40,13 @@ GUID gdip_gif_image_format_guid = {0xb96
#include "gifcodec.h"
#ifdef EgifOpen
@@ -15,7 +15,7 @@
/* Data structure used for callback */
typedef struct
-@@ -131,7 +135,11 @@
+@@ -131,7 +135,11 @@ AddExtensionBlockMono(SavedImage *New, i
if (ExtData) {
memcpy(ep->Bytes, ExtData, Len);
@@ -27,7 +27,7 @@
}
return (GIF_OK);
-@@ -234,7 +242,11 @@
+@@ -234,7 +242,11 @@ DGifSlurpMono(GifFileType * GifFile, Sav
}
case EXTENSION_RECORD_TYPE: {
@@ -39,7 +39,7 @@
return (GIF_ERROR);
}
-@@ -247,7 +259,9 @@
+@@ -247,7 +259,9 @@ DGifSlurpMono(GifFileType * GifFile, Sav
if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) {
return (GIF_ERROR);
}
@@ -49,7 +49,7 @@
}
break;
}
-@@ -306,9 +320,17 @@
+@@ -306,9 +320,17 @@ gdip_load_gif_image (void *stream, GpIma
loop_counter = FALSE;
if (from_file) {
@@ -67,7 +67,31 @@
}
if (gif == NULL) {
-@@ -663,9 +685,17 @@
+@@ -583,7 +605,11 @@ gdip_load_gif_image (void *stream, GpIma
+ }
+
+ FreeExtensionMono(&global_extensions);
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile (gif, NULL);
++#else
+ DGifCloseFile (gif);
++#endif
+
+ *image = result;
+ return Ok;
+@@ -599,7 +625,11 @@ error:
+
+ if (gif != NULL) {
+ FreeExtensionMono (&global_extensions);
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ DGifCloseFile (gif, NULL);
++#else
+ DGifCloseFile (gif);
++#endif
+ }
+
+ *image = NULL;
+@@ -663,9 +693,17 @@ gdip_save_gif_image (void *stream, GpIma
}
if (from_file) {
@@ -85,7 +109,7 @@
}
if (!fp) {
-@@ -704,7 +734,11 @@
+@@ -704,7 +742,11 @@ gdip_save_gif_image (void *stream, GpIma
goto error;
}
@@ -97,7 +121,7 @@
pixbuf = GdipAlloc(pixbuf_size);
if (pixbuf == NULL) {
-@@ -795,7 +829,11 @@
+@@ -795,7 +837,11 @@ gdip_save_gif_image (void *stream, GpIma
pixbuf = pixbuf_org;
} else {
cmap_size = 256;
@@ -109,7 +133,7 @@
red = GdipAlloc(pixbuf_size);
green = GdipAlloc(pixbuf_size);
-@@ -826,13 +864,21 @@
+@@ -826,13 +872,21 @@ gdip_save_gif_image (void *stream, GpIma
v += 4;
}
}
@@ -131,7 +155,7 @@
cmap->ColorCount = 1 << cmap->BitsPerPixel;
if ((frame == 0) && (k == 0)) {
-@@ -850,8 +896,15 @@
+@@ -850,8 +904,15 @@ gdip_save_gif_image (void *stream, GpIma
Buffer[0] = 1;
Buffer[1] = ptr[0];
Buffer[2] = ptr[1];
@@ -147,7 +171,7 @@
}
}
-@@ -903,7 +956,11 @@
+@@ -903,7 +964,11 @@ gdip_save_gif_image (void *stream, GpIma
pixbuf += bitmap_data->width;
}
@@ -159,7 +183,17 @@
if (red != NULL) {
GdipFree (red);
}
-@@ -931,7 +988,11 @@
+@@ -925,13 +990,21 @@ gdip_save_gif_image (void *stream, GpIma
+ }
+ }
+
++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
++ EGifCloseFile (fp, NULL);
++#else
+ EGifCloseFile (fp);
++#endif
+
+ return Ok;
error:
if (cmap != NULL) {
OpenPOWER on IntegriCloud