diff options
author | Michael Mair-Keimberger <mmk@levelnine.at> | 2023-09-17 15:48:53 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2023-09-17 15:48:53 +0200 |
commit | 7d91cd4932a8c3ebe09dc097808c0e6046b4ff6c (patch) | |
tree | 5d8ad5971ecb15d9a5c692e4073816730ded29ae | |
parent | dev-python/django-filter: Enable py3.12 (diff) | |
download | gentoo-7d91cd4932a8c3ebe09dc097808c0e6046b4ff6c.tar.gz gentoo-7d91cd4932a8c3ebe09dc097808c0e6046b4ff6c.tar.bz2 gentoo-7d91cd4932a8c3ebe09dc097808c0e6046b4ff6c.zip |
media-gfx/apngopt: EAPI8 bump, fix #724818
Closes: https://bugs.gentoo.org/724818
Signed-off-by: Michael Mair-Keimberger <mmk@levelnine.at>
Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r-- | media-gfx/apngopt/apngopt-1.4-r1.ebuild | 38 | ||||
-rw-r--r-- | media-gfx/apngopt/files/apngopt-1.4-r1-makefile.patch | 43 |
2 files changed, 81 insertions, 0 deletions
diff --git a/media-gfx/apngopt/apngopt-1.4-r1.ebuild b/media-gfx/apngopt/apngopt-1.4-r1.ebuild new file mode 100644 index 000000000000..9a1255fc6ef8 --- /dev/null +++ b/media-gfx/apngopt/apngopt-1.4-r1.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Optimize APNG images" +HOMEPAGE="https://sourceforge.net/projects/apng/" +SRC_URI="mirror://sourceforge/apng/${P}-src.zip" +S="${WORKDIR}" + +LICENSE="LGPL-2.1 ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + app-arch/zopfli:= + media-libs/libpng:= + sys-libs/zlib" +DEPEND="${RDEPEND}" +BDEPEND="app-arch/unzip" + +PATCHES=( "${FILESDIR}"/${PF}-makefile.patch ) + +src_prepare() { + default + rm -rf libpng zlib zopfli || die +} + +src_configure() { + tc-export CXX +} + +src_install() { + dobin apngopt + dodoc readme.txt +} diff --git a/media-gfx/apngopt/files/apngopt-1.4-r1-makefile.patch b/media-gfx/apngopt/files/apngopt-1.4-r1-makefile.patch new file mode 100644 index 000000000000..0726f81db4a2 --- /dev/null +++ b/media-gfx/apngopt/files/apngopt-1.4-r1-makefile.patch @@ -0,0 +1,43 @@ +Use system zopfli library and respect CFLAGS. + +--- a/Makefile ++++ b/Makefile +@@ -1,10 +1,9 @@ + PACKAGE = apngopt +-CC = gcc +-SRC_DIRS = . 7z zopfli +-CFLAGS = -Wall -pedantic +-CFLAGS_OPT = -O2 +-CFLAGS_7Z = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses +-LIBS = -lstdc++ -lm -lpng -lz ++ ++SRC_DIRS = . 7z ++CXXFLAGS += -Wall -pedantic ++CXXFLAGS_7Z = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses ++LIBS += -lm -lpng -lz -lzopfli + + INCUDE_DIRS := $(addprefix -I./, $(SRC_DIRS)) + OBJ_DIRS := $(addprefix obj/, $(SRC_DIRS)) +@@ -16,19 +15,16 @@ + all : $(PACKAGE) + + $(PACKAGE) : objdirs $(OBJECTS) +- $(CC) -o $@ $(OBJECTS) -s $(LIBS) ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) + + objdirs : + mkdir -p $(OBJ_DIRS) + + obj/%.o : %.cpp +- $(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT) +- +-obj/%.o : %.c +- $(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $< $(INCUDE_DIRS) + + obj/%.o : %.cc +- $(CC) -o $@ -c $< $(INCUDE_DIRS) $(CFLAGS) $(CFLAGS_OPT) $(CFLAGS_7Z) ++ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -o $@ -c $< $(INCUDE_DIRS) $(CXXFLAGS_7Z) + + .PHONY : clean + |