From: Pacho Ramos Date: Sun, 9 Oct 2016 10:37:53 +0000 (+0200) Subject: media-gfx/swftools: Fix giflib-5.1 support (#572088 by Hank Leininger) X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6d21e198bd0679145b72707988dbed60b614f1a2;p=gentoo.git media-gfx/swftools: Fix giflib-5.1 support (#572088 by Hank Leininger) Package-Manager: portage-2.3.1 --- diff --git a/media-gfx/swftools/files/swftools-0.9.2_giflib5.patch b/media-gfx/swftools/files/swftools-0.9.2_giflib5.patch new file mode 100644 index 000000000000..6450f827b87b --- /dev/null +++ b/media-gfx/swftools/files/swftools-0.9.2_giflib5.patch @@ -0,0 +1,26 @@ +--- swftools-0.9.2.orig/src/gif2swf.c 2016-02-16 16:15:39.697992195 -0500 ++++ swftools-0.9.2/src/gif2swf.c 2016-02-16 16:25:37.047992256 -0500 +@@ -467,7 +467,11 @@ + + free(pal); + free(imagedata); ++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 ++ DGifCloseFile(gft, D_GIF_SUCCEEDED); ++#else + DGifCloseFile(gft); ++#endif + + return t; + } +@@ -542,7 +546,11 @@ + fprintf(stderr, "frame: %u, delay: %.3f sec\n", i + 1, getGifDelayTime(gft, i) / 100.0); + } + ++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 ++ DGifCloseFile(gft, D_GIF_SUCCEEDED); ++#else + DGifCloseFile(gft); ++#endif + + return 0; + } diff --git a/media-gfx/swftools/swftools-0.9.2.ebuild b/media-gfx/swftools/swftools-0.9.2-r1.ebuild similarity index 84% rename from media-gfx/swftools/swftools-0.9.2.ebuild rename to media-gfx/swftools/swftools-0.9.2-r1.ebuild index 8f0cd433c7d0..0defd169d5a2 100644 --- a/media-gfx/swftools/swftools-0.9.2.ebuild +++ b/media-gfx/swftools/swftools-0.9.2-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -16,8 +16,9 @@ IUSE="" RDEPEND=" app-text/poppler - >=media-libs/t1lib-1.3.1 - media-libs/freetype + media-libs/freetype:2 + media-libs/giflib:0= + >=media-libs/t1lib-1.3.1:5 virtual/jpeg " DEPEND="${RDEPEND} @@ -28,6 +29,7 @@ src_prepare() { epatch "${FILESDIR}"/${P}_nopdf.patch epatch "${FILESDIR}"/${P}_general.patch epatch "${FILESDIR}"/${P}_giflib.patch + epatch "${FILESDIR}"/${P}_giflib5.patch } src_configure() {