summaryrefslogtreecommitdiff
path: root/media-gfx/pngquant/pngquant-2.17.0.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /media-gfx/pngquant/pngquant-2.17.0.ebuild
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'media-gfx/pngquant/pngquant-2.17.0.ebuild')
-rw-r--r--media-gfx/pngquant/pngquant-2.17.0.ebuild58
1 files changed, 58 insertions, 0 deletions
diff --git a/media-gfx/pngquant/pngquant-2.17.0.ebuild b/media-gfx/pngquant/pngquant-2.17.0.ebuild
new file mode 100644
index 000000000000..dff2d725f4fd
--- /dev/null
+++ b/media-gfx/pngquant/pngquant-2.17.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs
+
+DESCRIPTION="Command-line utility and library for lossy compression of PNG images"
+HOMEPAGE="https://pngquant.org/ https://github.com/kornelski/pngquant"
+SRC_URI="https://github.com/kornelski/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3 HPND rwpng"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+
+IUSE="cpu_flags_x86_sse2 debug lcms openmp test"
+REQUIRED_USE="test? ( lcms )"
+
+RDEPEND="
+ media-libs/libpng:0=
+ media-gfx/libimagequant:=
+ sys-libs/zlib:=
+ lcms? ( media-libs/lcms:2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.12.2-respect-CFLAGS.patch )
+
+src_prepare() {
+ default
+
+ # avoid silent fallback to bundled lib
+ rm -rv lib || die
+}
+
+src_configure() {
+ tc-export AR CC
+ # Hand rolled configure script, so not all flags are supported.
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --with-libimagequant \
+ $(use debug && echo --enable-debug) \
+ $(use_enable cpu_flags_x86_sse2 sse) \
+ $(use openmp && tc-has-openmp && echo --with-openmp) \
+ $(use_with lcms lcms2) \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc CHANGELOG README.md
+}