summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2018-12-14 01:35:49 +0100
committerThomas Deutschmann <whissi@gentoo.org>2018-12-14 02:08:38 +0100
commit9c5b9dc59bfbe618bd9e066e884060b024c4c83d (patch)
tree80a8c7d73408039a70f87baacd80846ac97b0399 /media-gfx/libimagequant/libimagequant-2.12.2.ebuild
parentdev-util/cmake: Removed old. (diff)
downloadgentoo-9c5b9dc59bfbe618bd9e066e884060b024c4c83d.tar.gz
gentoo-9c5b9dc59bfbe618bd9e066e884060b024c4c83d.tar.bz2
gentoo-9c5b9dc59bfbe618bd9e066e884060b024c4c83d.zip
media-gfx/libimagequant: bump to v2.12.2
Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'media-gfx/libimagequant/libimagequant-2.12.2.ebuild')
-rw-r--r--media-gfx/libimagequant/libimagequant-2.12.2.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/media-gfx/libimagequant/libimagequant-2.12.2.ebuild b/media-gfx/libimagequant/libimagequant-2.12.2.ebuild
new file mode 100644
index 000000000000..f9e1c3ed54cb
--- /dev/null
+++ b/media-gfx/libimagequant/libimagequant-2.12.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2018 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="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_x86_sse2 debug openmp static-libs"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/libimagequant-2.12.2-respect-CFLAGS.patch
+ "${FILESDIR}"/libimagequant-2.12.2-fix-pkgconfig.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+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 debug && echo --enable-debug) \
+ $(use_enable cpu_flags_x86_sse2 sse) \
+ $(use_with openmp) \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+ emake shared imagequant.pc || die "make failed"
+ use static-libs && (emake static || die "make failed")
+}
+
+src_install() {
+ dolib.so libimagequant.so
+ dolib.so libimagequant.so.*
+ use static-libs && dolib.a libimagequant.a
+ doheader libimagequant.h
+ einstalldocs
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins imagequant.pc
+}