* [gentoo-commits] repo/gentoo:master commit in: media-gfx/libimagequant/files/, media-gfx/libimagequant/
@ 2018-12-14 1:08 Thomas Deutschmann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Deutschmann @ 2018-12-14 1:08 UTC (permalink / raw
To: gentoo-commits
commit: 9c5b9dc59bfbe618bd9e066e884060b024c4c83d
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 14 00:35:49 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Dec 14 01:08:38 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c5b9dc5
media-gfx/libimagequant: bump to v2.12.2
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
media-gfx/libimagequant/Manifest | 1 +
.../files/libimagequant-2.12.2-fix-pkgconfig.patch | 25 ++++++++++
.../libimagequant-2.12.2-respect-CFLAGS.patch | 17 +++++++
.../libimagequant/libimagequant-2.12.2.ebuild | 55 ++++++++++++++++++++++
4 files changed, 98 insertions(+)
diff --git a/media-gfx/libimagequant/Manifest b/media-gfx/libimagequant/Manifest
index 3ddb32f3c86..539afb1f3c9 100644
--- a/media-gfx/libimagequant/Manifest
+++ b/media-gfx/libimagequant/Manifest
@@ -1 +1,2 @@
DIST libimagequant-2.11.7.tar.gz 74311 BLAKE2B 204fbe794014c11d767991a03e729b234978fb1edb1fdffcb7d332461ccaa1a536a1e9dbc7b44a8838db61cc76fdbc1eb75087b480f4fc42bf791fea913639a2 SHA512 8816811c06eec27232e39725c581e382b7076f3bc23b017810de0e92236e6e4eb480def7b50347c9b75f7d792245669398c39a17359eb81077badf12e6f0a172
+DIST libimagequant-2.12.2.tar.gz 75611 BLAKE2B 23f5d3666fd21696d4f4dab9db3669642a9e3f6ca971804b914e845018df538136c3db900419ac35230be9fd487b48e0ab672b653e2ee82387c19569b49d6cfc SHA512 7e7bfcffd163d8b73a46d523dc441e4a4726f5dde804f306f13900f74afae6f6e7cf780bf157b5823a71c790bcdd0e9c9c34cf43f84a21289e470fc78835d8d8
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 00000000000..0b058fbecc2
--- /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 00000000000..c290af36fe5
--- /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.12.2.ebuild b/media-gfx/libimagequant/libimagequant-2.12.2.ebuild
new file mode 100644
index 00000000000..f9e1c3ed54c
--- /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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/libimagequant/files/, media-gfx/libimagequant/
@ 2021-02-12 15:10 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-02-12 15:10 UTC (permalink / raw
To: gentoo-commits
commit: db5965eea124499d3dbc7cc220bca5413f43a27a
Author: Theo Anderson <telans <AT> posteo <DOT> de>
AuthorDate: Tue Feb 9 21:55:29 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 12 15:10:14 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db5965ee
media-gfx/libimagequant: bump to 2.14.0
Closes: https://bugs.gentoo.org/703142
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Theo Anderson <telans <AT> posteo.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/libimagequant/Manifest | 1 +
.../libimagequant-2.14.0-fix-openmp-pragma.patch | 25 ++++++++++++
.../libimagequant/libimagequant-2.14.0.ebuild | 47 ++++++++++++++++++++++
3 files changed, 73 insertions(+)
diff --git a/media-gfx/libimagequant/Manifest b/media-gfx/libimagequant/Manifest
index e540bad6592..c94710e72de 100644
--- a/media-gfx/libimagequant/Manifest
+++ b/media-gfx/libimagequant/Manifest
@@ -1,3 +1,4 @@
DIST libimagequant-2.11.7.tar.gz 74311 BLAKE2B 204fbe794014c11d767991a03e729b234978fb1edb1fdffcb7d332461ccaa1a536a1e9dbc7b44a8838db61cc76fdbc1eb75087b480f4fc42bf791fea913639a2 SHA512 8816811c06eec27232e39725c581e382b7076f3bc23b017810de0e92236e6e4eb480def7b50347c9b75f7d792245669398c39a17359eb81077badf12e6f0a172
DIST libimagequant-2.12.2.tar.gz 75611 BLAKE2B 23f5d3666fd21696d4f4dab9db3669642a9e3f6ca971804b914e845018df538136c3db900419ac35230be9fd487b48e0ab672b653e2ee82387c19569b49d6cfc SHA512 7e7bfcffd163d8b73a46d523dc441e4a4726f5dde804f306f13900f74afae6f6e7cf780bf157b5823a71c790bcdd0e9c9c34cf43f84a21289e470fc78835d8d8
DIST libimagequant-2.12.3.tar.gz 75866 BLAKE2B 857a0e3f0187251e37e0c7f4f5f5cbf49266e4eb9f684118705778d9469330cf95780ea11b83d19e28251f047a7e9b8e7ac32ac4d9554cb5d9e1b3230d39e796 SHA512 4818b00b6f154407f3e402d56f4891c2d7594c8056fada0402d7fa0024ae50127340dd8295da5f5dca13fe1829670a3fa8793aa528f3e74a2294c9a7e37b7257
+DIST libimagequant-2.14.0.tar.gz 97471 BLAKE2B df6403aea0b0e3cbaf05c6c60726ac3de85195779e4829dd04acec28ba93ea8d629846fa71d765949e721f592300da1d35227ec7bb28e00c600c575ba3fdc4fe SHA512 d34aa2ac9f08eebd80fb9e3e7fe22a3f10ce840152c4192735d57ae37c223350af09eeff6870ee2634b3fc51b03d1663cd6afd17daeab923af3b5f60fbef57d4
diff --git a/media-gfx/libimagequant/files/libimagequant-2.14.0-fix-openmp-pragma.patch b/media-gfx/libimagequant/files/libimagequant-2.14.0-fix-openmp-pragma.patch
new file mode 100644
index 00000000000..7e2d5861961
--- /dev/null
+++ b/media-gfx/libimagequant/files/libimagequant-2.14.0-fix-openmp-pragma.patch
@@ -0,0 +1,25 @@
+From 44525d34b738f733a81037286ece603ca0fdcf10 Mon Sep 17 00:00:00 2001
+From: Kornel <kornel@geekhood.net>
+Date: Wed, 27 Jan 2021 17:36:33 +0000
+Subject: [PATCH] Update OMP pragma
+
+---
+ libimagequant.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/libimagequant.c b/libimagequant.c
+index 4f0b48f..828f768 100644
+--- a/libimagequant.c
++++ b/libimagequant.c
+@@ -1279,10 +1279,7 @@ LIQ_NONNULL static float remap_to_palette(liq_image *const input_image, unsigned
+
+ #if __GNUC__ >= 9 || __clang__
+ #pragma omp parallel for if (rows*cols > 3000) \
+- schedule(static) default(none) shared(acolormap,average_color,cols,input_image,map,n,output_pixels,rows,transparent_index) reduction(+:remapping_error)
+-#else
+- #pragma omp parallel for if (rows*cols > 3000) \
+- schedule(static) default(none) shared(acolormap) shared(average_color) reduction(+:remapping_error)
++ schedule(static) default(none) shared(background,acolormap,average_color,cols,input_image,map,n,output_pixels,rows,transparent_index) reduction(+:remapping_error)
+ #endif
+ for(int row = 0; row < rows; ++row) {
+ const f_pixel *const row_pixels = liq_image_get_row_f(input_image, row);
diff --git a/media-gfx/libimagequant/libimagequant-2.14.0.ebuild b/media-gfx/libimagequant/libimagequant-2.14.0.ebuild
new file mode 100644
index 00000000000..21f2b031268
--- /dev/null
+++ b/media-gfx/libimagequant/libimagequant-2.14.0.ebuild
@@ -0,0 +1,47 @@
+# 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 debug openmp"
+
+PATCHES=(
+ "${FILESDIR}"/libimagequant-2.12.2-respect-CFLAGS.patch
+ "${FILESDIR}"/libimagequant-2.12.2-fix-pkgconfig.patch
+ "${FILESDIR}"/libimagequant-2.14.0-fix-openmp-pragma.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ default
+ sed -i '/install.*STATICLIB/d' 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 debug) \
+ $(use_enable cpu_flags_x86_sse2 sse) \
+ $(use_with openmp) \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}" || die
+}
+
+src_compile() {
+ emake shared imagequant.pc
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-12 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-14 1:08 [gentoo-commits] repo/gentoo:master commit in: media-gfx/libimagequant/files/, media-gfx/libimagequant/ Thomas Deutschmann
-- strict thread matches above, loose matches on Subject: below --
2021-02-12 15:10 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox