diff options
author | Antoine Brodin <antoine@FreeBSD.org> | 2015-11-12 15:41:21 +0000 |
---|---|---|
committer | Antoine Brodin <antoine@FreeBSD.org> | 2015-11-12 15:41:21 +0000 |
commit | b8a95c0b0b803392048a83754c3a2874ec403883 (patch) | |
tree | 71c17f8cc41de44f7c2a0800bf4cc65498292522 /graphics/mtpaint | |
parent | c5c1406991bb9d0b732eef00e1993a013c24502b (diff) | |
download | ports-b8a95c0b0b803392048a83754c3a2874ec403883.tar.gz ports-b8a95c0b0b803392048a83754c3a2874ec403883.zip |
Notes
Diffstat (limited to 'graphics/mtpaint')
-rw-r--r-- | graphics/mtpaint/files/patch-src_png.c | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/graphics/mtpaint/files/patch-src_png.c b/graphics/mtpaint/files/patch-src_png.c index 55be4209de7d..9a39208498de 100644 --- a/graphics/mtpaint/files/patch-src_png.c +++ b/graphics/mtpaint/files/patch-src_png.c @@ -12,7 +12,19 @@ /* Init state structure */ memset(&stat, 0, sizeof(stat)); -@@ -1621,7 +1625,11 @@ static int load_gif(char *file_name, ls_ +@@ -1608,7 +1612,11 @@ static int load_gif_frames(char *file_na + } + res = 1; + fail: mem_free_chanlist(w_set.img); ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++ DGifCloseFile(giffy, NULL); ++#else + DGifCloseFile(giffy); ++#endif + return (res); + } + +@@ -1621,7 +1629,11 @@ static int load_gif(char *file_name, ls_ int delay = settings->gif_delay, trans = -1;//, disposal = 0; @@ -24,7 +36,19 @@ /* Get global palette */ settings->colors = convert_gif_palette(settings->pal, giffy->SColorMap); -@@ -1682,10 +1690,18 @@ static int save_gif(char *file_name, ls_ +@@ -1659,7 +1671,11 @@ static int load_gif(char *file_name, ls_ + } + } + res = 1; ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++fail: DGifCloseFile(giffy, NULL); ++#else + fail: DGifCloseFile(giffy); ++#endif + return (res); + } + +@@ -1682,10 +1698,18 @@ static int save_gif(char *file_name, ls_ nc |= nc >> 1; nc |= nc >> 2; nc |= nc >> 4; nc += !nc + 1; // No less than 2 colors @@ -43,7 +67,18 @@ if (!giffy) goto fail0; for (i = 0; i < settings->colors; i++) -@@ -1732,7 +1748,11 @@ fail: EGifCloseFile(giffy); +@@ -1725,14 +1749,22 @@ static int save_gif(char *file_name, ls_ + if (!settings->silent) progress_end(); + msg = 0; + ++#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5 ++fail: EGifCloseFile(giffy, NULL); ++#else + fail: EGifCloseFile(giffy); ++#endif + #ifndef WIN32 + /* giflib creates files with 0600 permissions, which is nasty - WJ */ + mode = umask(0022); umask(mode); chmod(file_name, 0666 & ~mode); #endif |