summaryrefslogtreecommitdiff
path: root/media-gfx/libimagequant/libimagequant-2.11.4.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-01 03:04:39 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-01 03:04:39 +0000
commit407525b571b48cfd65e1ad7a02d250a927c967c9 (patch)
tree844bea44d85dc7218f54970af1c42cc9d55c3f1a /media-gfx/libimagequant/libimagequant-2.11.4.ebuild
parent89c6c06b8c42107dd231687a1012354e7d3039fc (diff)
gentoo resync : 01.12.2017
Diffstat (limited to 'media-gfx/libimagequant/libimagequant-2.11.4.ebuild')
-rw-r--r--media-gfx/libimagequant/libimagequant-2.11.4.ebuild47
1 files changed, 47 insertions, 0 deletions
diff --git a/media-gfx/libimagequant/libimagequant-2.11.4.ebuild b/media-gfx/libimagequant/libimagequant-2.11.4.ebuild
new file mode 100644
index 000000000000..db64a5c57738
--- /dev/null
+++ b/media-gfx/libimagequant/libimagequant-2.11.4.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs eutils
+
+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 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_x86_sse2 debug openmp static-libs"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+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" \
+ $(use debug && echo --enable-debug) \
+ $(use_enable cpu_flags_x86_sse2 sse) \
+ $(use_with openmp) \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+ emake shared || 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
+}