summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-08-26 10:34:23 +0100
committerSam James <sam@gentoo.org>2022-08-26 11:01:16 +0100
commit01175dfb78fea0d8aebe7a87eb242b1d553905fc (patch)
treeef1b92c033596bf7031db6f19a29bbb49660b0c0 /media-gfx
parentmail-filter/mimedefang: add github upstream metadata (diff)
downloadgentoo-01175dfb78fea0d8aebe7a87eb242b1d553905fc.tar.gz
gentoo-01175dfb78fea0d8aebe7a87eb242b1d553905fc.tar.bz2
gentoo-01175dfb78fea0d8aebe7a87eb242b1d553905fc.zip
media-gfx/libimagequant: add 2.17.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/libimagequant/Manifest1
-rw-r--r--media-gfx/libimagequant/libimagequant-2.17.0.ebuild56
2 files changed, 57 insertions, 0 deletions
diff --git a/media-gfx/libimagequant/Manifest b/media-gfx/libimagequant/Manifest
index d949e9cc9aba..439cf313b46a 100644
--- a/media-gfx/libimagequant/Manifest
+++ b/media-gfx/libimagequant/Manifest
@@ -1 +1,2 @@
DIST libimagequant-2.15.1.tar.gz 98668 BLAKE2B cfa223f0ce8fdaac5d55b951507c040c064759756a5595719d02c0ec6983a70b08ad9d5df0176adb03269a9a1b7d39e9f0f7da884df214bd7994f4647e08a9c1 SHA512 56bc8b73859908774ce0a218cfbec81bfb8432c02ddce83880990b5f5ac89ac253ae64ecde43a9664aab3ac69d309bb9ef8ba2201be6c93aacb731b3214ff4b8
+DIST libimagequant-2.17.0.tar.gz 99343 BLAKE2B 3ffbd60fe438c1b9e604fb74e839cad2aab5fd771f9250f7594a2d6cbc1e1a8a68d46c726298a66ba15a3e40254a36067dd18023ef22c132bd827c319161a6fe SHA512 12b111f8293c0e37bd75481457b6c96b547a1e3bc1d33bc7a6bbbde6ada284d835c7f5958ef41af7a5a8d3e6fb2d1aa2f641b7d6f2fe2782202f3c760792f394
diff --git a/media-gfx/libimagequant/libimagequant-2.17.0.ebuild b/media-gfx/libimagequant/libimagequant-2.17.0.ebuild
new file mode 100644
index 000000000000..ee030f795c0b
--- /dev/null
+++ b/media-gfx/libimagequant/libimagequant-2.17.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Palette quantization library that powers pngquant and other PNG optimizers"
+HOMEPAGE="https://pngquant.org/lib/"
+SRC_URI="https://github.com/ImageOptim/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_x86_sse2 openmp"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.12.2-respect-CFLAGS.patch
+ "${FILESDIR}"/${PN}-2.15.1-fix-pkgconfig.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ default
+
+ # Avoid always building static library
+ # (Fixes side-effect of compiling in src_install too)
+ sed -i \
+ -e '/install.*STATICLIB/d' \
+ -e 's/all: static shared/all: shared/' \
+ Makefile || die
+}
+
+src_configure() {
+ tc-export AR CC
+
+ # Hand rolled configure script, so not all flags are supported.
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ $(use_enable cpu_flags_x86_sse2 sse) \
+ $(use_with openmp) \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
+
+src_compile() {
+ emake shared imagequant.pc
+}