summaryrefslogtreecommitdiff
path: root/media-gfx/libimagequant
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-24 14:11:38 +0000
commitde49812990871e1705b64051c35161d5e6400269 (patch)
tree5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /media-gfx/libimagequant
parent536c3711867ec947c1738f2c4b96f22e4863322d (diff)
gentoo resync : 24.12.2018
Diffstat (limited to 'media-gfx/libimagequant')
-rw-r--r--media-gfx/libimagequant/Manifest6
-rw-r--r--media-gfx/libimagequant/files/libimagequant-2.12.2-fix-pkgconfig.patch25
-rw-r--r--media-gfx/libimagequant/files/libimagequant-2.12.2-respect-CFLAGS.patch17
-rw-r--r--media-gfx/libimagequant/libimagequant-2.11.7.ebuild2
-rw-r--r--media-gfx/libimagequant/libimagequant-2.12.2.ebuild55
5 files changed, 103 insertions, 2 deletions
diff --git a/media-gfx/libimagequant/Manifest b/media-gfx/libimagequant/Manifest
index 471a6ef6c01a..c886cd02a2a6 100644
--- a/media-gfx/libimagequant/Manifest
+++ b/media-gfx/libimagequant/Manifest
@@ -1,3 +1,7 @@
+AUX libimagequant-2.12.2-fix-pkgconfig.patch 840 BLAKE2B 6b16c3b0a7b916c60814817b69a9d653802e67da5d3431dd0bd00bea21cea7eb60a6d046ec380fc68ca25182c1863a81336f0c76259bb8fcdeeb30644eca06cd SHA512 bb0b1a502dee7126cf64e48628469729a12abafd9a9f58cb76b18d250cb578a49e38c1b05009173ebb4acfbf54e2696f0fa5f7f660248653a8bb8600843fa157
+AUX libimagequant-2.12.2-respect-CFLAGS.patch 449 BLAKE2B fb3679a05e024a276b5ae1070f90d4c59584a2b9dac062febb7bdeb1efbbd1cb4f39f8fd1aa94f81ac4318bd0413bdde44f75d418f69b916a70883220d9ef031 SHA512 68c2bf917d60da653abff4fc20c44a9f692213aed87a220a3ffb03ec308107eda7be1a6e135393658ef54d2d63bb0675f5e2a95bdf4b02628fcf5d367c0ce9ef
DIST libimagequant-2.11.7.tar.gz 74311 BLAKE2B 204fbe794014c11d767991a03e729b234978fb1edb1fdffcb7d332461ccaa1a536a1e9dbc7b44a8838db61cc76fdbc1eb75087b480f4fc42bf791fea913639a2 SHA512 8816811c06eec27232e39725c581e382b7076f3bc23b017810de0e92236e6e4eb480def7b50347c9b75f7d792245669398c39a17359eb81077badf12e6f0a172
-EBUILD libimagequant-2.11.7.ebuild 1185 BLAKE2B 89fe4eca4607c132955d18f54a116df6000f3c76a3dfa007ddded42bc36a307a77823ae81d64e43e2c5dbe02785de903e72246ad1943909b3d2a225618b2deac SHA512 6434d31f4ad8d4262adc60a93e8e408207e8696fc303761aa7962b8554dff710c7a5713c333c34fae42059a625ca228a061f025305e7ad92f004432f6bbd90f1
+DIST libimagequant-2.12.2.tar.gz 75611 BLAKE2B 23f5d3666fd21696d4f4dab9db3669642a9e3f6ca971804b914e845018df538136c3db900419ac35230be9fd487b48e0ab672b653e2ee82387c19569b49d6cfc SHA512 7e7bfcffd163d8b73a46d523dc441e4a4726f5dde804f306f13900f74afae6f6e7cf780bf157b5823a71c790bcdd0e9c9c34cf43f84a21289e470fc78835d8d8
+EBUILD libimagequant-2.11.7.ebuild 1184 BLAKE2B dfc603c736d9d8061b406152a4cc73f0bf0ddd7acff0ff734646b976e5d972195a04f3d10327bf713b549d17ec4286b31063e7b0f452112e0c8c8e7f090cc861 SHA512 a43f2e98875b9e3dd68062c47e74adf7b0e5a1bffe5eaa21850e26929edc0af41b09a352e1feae12e3dbe23d3af1a296e78874cc6e82ea05860ffb4fa08956bd
+EBUILD libimagequant-2.12.2.ebuild 1438 BLAKE2B ebcfdc7e952468596aafab3f9c822c790bdccad8548647410b18b6a57c2121ddd14d98c9ec14cf7a461c9268283c1c1334773ee7124bbe2db30094513fe97d35 SHA512 20ef40f430fd9bcde1370e71c9b4d5413bbf94050199b70c81910639da7658e66e5e9d4e399203cbd0d807fea08f93b2c817a15c49b24aa7f362c50e39bd2179
MISC metadata.xml 527 BLAKE2B c3fa42153fa6cfede4de3d59e12063aeb44f67ce89d36be63c7df4671c57ecfdd43d08aee89bd96387ecbee2e41b1d5921e9ad2486b4dd8f06e6e93529afb0a8 SHA512 82b458b27288b6b49df16d5778f6c75b492d958bcc1c2f2950dee741bfddc82f561be50f590d3f891bf736ee67e5325ae297bf49f99c769ca97ac68042beee11
diff --git a/media-gfx/libimagequant/files/libimagequant-2.12.2-fix-pkgconfig.patch b/media-gfx/libimagequant/files/libimagequant-2.12.2-fix-pkgconfig.patch
new file mode 100644
index 000000000000..0b058fbecc23
--- /dev/null
+++ b/media-gfx/libimagequant/files/libimagequant-2.12.2-fix-pkgconfig.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile b/Makefile
+index 2666b3d..ba58cf1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -133,7 +133,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 980da8c..6c6569d 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/files/libimagequant-2.12.2-respect-CFLAGS.patch b/media-gfx/libimagequant/files/libimagequant-2.12.2-respect-CFLAGS.patch
new file mode 100644
index 000000000000..c290af36fe5f
--- /dev/null
+++ b/media-gfx/libimagequant/files/libimagequant-2.12.2-respect-CFLAGS.patch
@@ -0,0 +1,17 @@
+--- a/configure
++++ b/configure
+@@ -152,12 +152,12 @@ rm -f pngquant-gcccheck pngquant-gcccheck.c
+ status "Compiler" "$CC"
+
+ # init flags
+-CFLAGS=${CFLAGS:--fno-math-errno -funroll-loops -fomit-frame-pointer -Wall}
++CFLAGS=${CFLAGS:--fno-math-errno -funroll-loops -fomit-frame-pointer}
+ cflags "-std=c99 -I."
+
+ # DEBUG
+ if [ -z "$DEBUG" ]; then
+- cflags "-O3 -DNDEBUG"
++ cflags "-DNDEBUG"
+ status "Debug" "no"
+ else
+ cflags "-O1 -g"
diff --git a/media-gfx/libimagequant/libimagequant-2.11.7.ebuild b/media-gfx/libimagequant/libimagequant-2.11.7.ebuild
index 092a935042fc..ba95dbc6cf98 100644
--- a/media-gfx/libimagequant/libimagequant-2.11.7.ebuild
+++ b/media-gfx/libimagequant/libimagequant-2.11.7.ebuild
@@ -11,7 +11,7 @@ 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"
+KEYWORDS="amd64 arm ~arm64 ppc ppc64 x86 ~amd64-linux ~x86-linux"
IUSE="cpu_flags_x86_sse2 debug openmp static-libs"
DEPEND=""
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
+}