media-gfx/swftools: Fix giflib-5.1 support (#572088 by Hank Leininger)
authorPacho Ramos <pacho@gentoo.org>
Sun, 9 Oct 2016 10:37:53 +0000 (12:37 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sun, 9 Oct 2016 11:17:59 +0000 (13:17 +0200)
Package-Manager: portage-2.3.1

media-gfx/swftools/files/swftools-0.9.2_giflib5.patch [new file with mode: 0644]
media-gfx/swftools/swftools-0.9.2-r1.ebuild [moved from media-gfx/swftools/swftools-0.9.2.ebuild with 84% similarity]

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 (file)
index 0000000..6450f82
--- /dev/null
@@ -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;
+ }
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 8f0cd433c7d0c5df8c7debf5b9b67b39f80534fa..0defd169d5a29d87373438b0e99bb824c356c7aa 100644 (file)
@@ -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() {