Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/libimagequant/
Date: Fri, 26 Aug 2022 10:03:27
Message-Id: 1661508076.01175dfb78fea0d8aebe7a87eb242b1d553905fc.sam@gentoo
1 commit: 01175dfb78fea0d8aebe7a87eb242b1d553905fc
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 26 09:34:23 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 26 10:01:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01175dfb
7
8 media-gfx/libimagequant: add 2.17.0
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 media-gfx/libimagequant/Manifest | 1 +
13 .../libimagequant/libimagequant-2.17.0.ebuild | 56 ++++++++++++++++++++++
14 2 files changed, 57 insertions(+)
15
16 diff --git a/media-gfx/libimagequant/Manifest b/media-gfx/libimagequant/Manifest
17 index d949e9cc9aba..439cf313b46a 100644
18 --- a/media-gfx/libimagequant/Manifest
19 +++ b/media-gfx/libimagequant/Manifest
20 @@ -1 +1,2 @@
21 DIST libimagequant-2.15.1.tar.gz 98668 BLAKE2B cfa223f0ce8fdaac5d55b951507c040c064759756a5595719d02c0ec6983a70b08ad9d5df0176adb03269a9a1b7d39e9f0f7da884df214bd7994f4647e08a9c1 SHA512 56bc8b73859908774ce0a218cfbec81bfb8432c02ddce83880990b5f5ac89ac253ae64ecde43a9664aab3ac69d309bb9ef8ba2201be6c93aacb731b3214ff4b8
22 +DIST libimagequant-2.17.0.tar.gz 99343 BLAKE2B 3ffbd60fe438c1b9e604fb74e839cad2aab5fd771f9250f7594a2d6cbc1e1a8a68d46c726298a66ba15a3e40254a36067dd18023ef22c132bd827c319161a6fe SHA512 12b111f8293c0e37bd75481457b6c96b547a1e3bc1d33bc7a6bbbde6ada284d835c7f5958ef41af7a5a8d3e6fb2d1aa2f641b7d6f2fe2782202f3c760792f394
23
24 diff --git a/media-gfx/libimagequant/libimagequant-2.17.0.ebuild b/media-gfx/libimagequant/libimagequant-2.17.0.ebuild
25 new file mode 100644
26 index 000000000000..ee030f795c0b
27 --- /dev/null
28 +++ b/media-gfx/libimagequant/libimagequant-2.17.0.ebuild
29 @@ -0,0 +1,56 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +inherit toolchain-funcs
36 +
37 +DESCRIPTION="Palette quantization library that powers pngquant and other PNG optimizers"
38 +HOMEPAGE="https://pngquant.org/lib/"
39 +SRC_URI="https://github.com/ImageOptim/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
40 +
41 +LICENSE="GPL-3"
42 +SLOT="0/0"
43 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
44 +IUSE="cpu_flags_x86_sse2 openmp"
45 +
46 +PATCHES=(
47 + "${FILESDIR}"/${PN}-2.12.2-respect-CFLAGS.patch
48 + "${FILESDIR}"/${PN}-2.15.1-fix-pkgconfig.patch
49 +)
50 +
51 +pkg_pretend() {
52 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
53 +}
54 +
55 +pkg_setup() {
56 + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
57 +}
58 +
59 +src_prepare() {
60 + default
61 +
62 + # Avoid always building static library
63 + # (Fixes side-effect of compiling in src_install too)
64 + sed -i \
65 + -e '/install.*STATICLIB/d' \
66 + -e 's/all: static shared/all: shared/' \
67 + Makefile || die
68 +}
69 +
70 +src_configure() {
71 + tc-export AR CC
72 +
73 + # Hand rolled configure script, so not all flags are supported.
74 + ./configure \
75 + --prefix="${EPREFIX}/usr" \
76 + --libdir="${EPREFIX}/usr/$(get_libdir)" \
77 + $(use_enable cpu_flags_x86_sse2 sse) \
78 + $(use_with openmp) \
79 + CFLAGS="${CFLAGS} ${CPPFLAGS}" \
80 + LDFLAGS="${LDFLAGS}" || die
81 +}
82 +
83 +src_compile() {
84 + emake shared imagequant.pc
85 +}