media-gfx/gif2apng: update to EAPI 6 and use external zopfli lib
authorTim Harder <radhermit@gentoo.org>
Fri, 18 Aug 2017 04:42:12 +0000 (00:42 -0400)
committerTim Harder <radhermit@gentoo.org>
Fri, 18 Aug 2017 04:42:12 +0000 (00:42 -0400)
media-gfx/gif2apng/files/gif2apng-1.9-makefile.patch [new file with mode: 0644]
media-gfx/gif2apng/gif2apng-1.9-r1.ebuild [new file with mode: 0644]

diff --git a/media-gfx/gif2apng/files/gif2apng-1.9-makefile.patch b/media-gfx/gif2apng/files/gif2apng-1.9-makefile.patch
new file mode 100644 (file)
index 0000000..2322e21
--- /dev/null
@@ -0,0 +1,18 @@
+--- gif2apng-1.9-src/Makefile
++++ gif2apng-1.9-src/Makefile
+@@ -1,11 +1,9 @@
+ PACKAGE    = gif2apng
+-CC         = gcc
+-SRC_DIRS   = . 7z zopfli
+-CFLAGS     = -Wall -pedantic
+-CFLAGS_OPT = -O2
++CC         ?= gcc
++SRC_DIRS   = . 7z
++CFLAGS     += -Wall -pedantic
+ CFLAGS_7Z  = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
+-LDFLAGS    = -s
+-LIBS       = -lstdc++ -lm -lz
++LIBS       = -lstdc++ -lm -lz -lzopfli
+ INCUDE_DIRS := $(addprefix -I./, $(SRC_DIRS))
+ OBJ_DIRS := $(addprefix obj/, $(SRC_DIRS))
diff --git a/media-gfx/gif2apng/gif2apng-1.9-r1.ebuild b/media-gfx/gif2apng/gif2apng-1.9-r1.ebuild
new file mode 100644 (file)
index 0000000..9e8aa44
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="create an APNG from a GIF"
+HOMEPAGE="https://sourceforge.net/projects/gif2apng/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="ZLIB LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib
+       app-arch/zopfli:="
+DEPEND="${RDEPEND}
+       app-arch/unzip"
+
+S=${WORKDIR}
+
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
+
+src_prepare() {
+       default
+
+       # remove bundled libs
+       rm -r zlib zopfli || die
+
+       tc-export CC
+}
+
+src_install() {
+       dobin ${PN}
+       dodoc readme.txt
+}