summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-05-14 21:29:27 +0000
committerSam James <sam@gentoo.org>2021-05-14 21:29:44 +0000
commit94b6f22b81322442880700d100f8ac7db852c00e (patch)
tree42fc9c0f3d3cfa493983b5ad910ad8d29b9af1ac /media-gfx/libimagequant
parentkde-misc/kdiff3: Drop 1.9.0 (diff)
downloadgentoo-94b6f22b81322442880700d100f8ac7db852c00e.tar.gz
gentoo-94b6f22b81322442880700d100f8ac7db852c00e.tar.bz2
gentoo-94b6f22b81322442880700d100f8ac7db852c00e.zip
media-gfx/libimagequant: add 2.15.1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/libimagequant')
-rw-r--r--media-gfx/libimagequant/Manifest1
-rw-r--r--media-gfx/libimagequant/files/libimagequant-2.15.1-fix-pkgconfig.patch25
-rw-r--r--media-gfx/libimagequant/libimagequant-2.15.1.ebuild52
3 files changed, 78 insertions, 0 deletions
diff --git a/media-gfx/libimagequant/Manifest b/media-gfx/libimagequant/Manifest
index 234070a5c553..69e34b7921c2 100644
--- a/media-gfx/libimagequant/Manifest
+++ b/media-gfx/libimagequant/Manifest
@@ -1,3 +1,4 @@
DIST libimagequant-2.12.3.tar.gz 75866 BLAKE2B 857a0e3f0187251e37e0c7f4f5f5cbf49266e4eb9f684118705778d9469330cf95780ea11b83d19e28251f047a7e9b8e7ac32ac4d9554cb5d9e1b3230d39e796 SHA512 4818b00b6f154407f3e402d56f4891c2d7594c8056fada0402d7fa0024ae50127340dd8295da5f5dca13fe1829670a3fa8793aa528f3e74a2294c9a7e37b7257
DIST libimagequant-2.14.0.tar.gz 97471 BLAKE2B df6403aea0b0e3cbaf05c6c60726ac3de85195779e4829dd04acec28ba93ea8d629846fa71d765949e721f592300da1d35227ec7bb28e00c600c575ba3fdc4fe SHA512 d34aa2ac9f08eebd80fb9e3e7fe22a3f10ce840152c4192735d57ae37c223350af09eeff6870ee2634b3fc51b03d1663cd6afd17daeab923af3b5f60fbef57d4
DIST libimagequant-2.15.0.tar.gz 98668 BLAKE2B 916bb32ad848c5076502be7f471bd693396e8a7bd36878ec928f294776bd3343e76c2323372e577d58f5bb5c4f4e6aa3a32d5103901b190b0a036684cbf5cf56 SHA512 b856daaf79dd748ed3bb4cdc432dcffebf6678f8dffd6b4b0e79b96ec9c64ebf19597de35cf56ed47d3202947f3f5f208745c2c2c92fadf6c5b62f17e61b3f13
+DIST libimagequant-2.15.1.tar.gz 98668 BLAKE2B cfa223f0ce8fdaac5d55b951507c040c064759756a5595719d02c0ec6983a70b08ad9d5df0176adb03269a9a1b7d39e9f0f7da884df214bd7994f4647e08a9c1 SHA512 56bc8b73859908774ce0a218cfbec81bfb8432c02ddce83880990b5f5ac89ac253ae64ecde43a9664aab3ac69d309bb9ef8ba2201be6c93aacb731b3214ff4b8
diff --git a/media-gfx/libimagequant/files/libimagequant-2.15.1-fix-pkgconfig.patch b/media-gfx/libimagequant/files/libimagequant-2.15.1-fix-pkgconfig.patch
new file mode 100644
index 000000000000..f0e150385a46
--- /dev/null
+++ b/media-gfx/libimagequant/files/libimagequant-2.15.1-fix-pkgconfig.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index 3210d54..ca2acf6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -134,7 +134,7 @@ ifeq ($(filter %clean %distclean, $(MAKECMDGOALS)), )
+ endif
+
+ $(PKGCONFIG): config.mk
+- sed 's|@PREFIX@|$(PREFIX)|;s|@VERSION@|$(VERSION)|' < imagequant.pc.in > $(PKGCONFIG)
++ sed 's|@PREFIX@|$(PREFIX)|;s|@VERSION@|$(VERSION)|;s|LIBDIR|$(LIBDIR)|' < imagequant.pc.in > $(PKGCONFIG)
+
+ .PHONY: all static shared clean dist distclean dll java cargo
+ .DELETE_ON_ERROR:
+diff --git a/imagequant.pc.in b/imagequant.pc.in
+index 16935b7..4810a25 100644
+--- a/imagequant.pc.in
++++ b/imagequant.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@PREFIX@
+ includedir=${prefix}/include
+-libdir=${prefix}/lib
++libdir=LIBDIR
+
+ Name: imagequant
+ Description: Small, portable C library for high-quality conversion of RGBA images to 8-bit indexed-color (palette) images.
diff --git a/media-gfx/libimagequant/libimagequant-2.15.1.ebuild b/media-gfx/libimagequant/libimagequant-2.15.1.ebuild
new file mode 100644
index 000000000000..2eb73642deb8
--- /dev/null
+++ b/media-gfx/libimagequant/libimagequant-2.15.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+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 ~ppc ~ppc64 ~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
+}
+
+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
+}