commit:     250b40499fe9dc1e9a327cb9ec42ffe2b2330b47
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  1 01:18:58 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep  1 01:23:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=250b4049

media-gfx/pngquant: fix tests with newer libimagequant

Closes: https://bugs.gentoo.org/867760
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../pngquant/files/pngquant-2.17.0-fix-test-version.patch  | 14 ++++++++++++++
 media-gfx/pngquant/pngquant-2.17.0.ebuild                  |  5 ++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/media-gfx/pngquant/files/pngquant-2.17.0-fix-test-version.patch 
b/media-gfx/pngquant/files/pngquant-2.17.0-fix-test-version.patch
new file mode 100644
index 000000000000..6b7fe013e5dc
--- /dev/null
+++ b/media-gfx/pngquant/files/pngquant-2.17.0-fix-test-version.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/867760
+
+Drop check which looks at version as with newer libimagequant,
+it becomes 4.0.0.
+--- a/test/test.sh
++++ b/test/test.sh
+@@ -9,7 +9,6 @@ BIN=$2
+ TESTBIN=$3
+ PATH=.:$PATH # Required, since BIN may be just 'pngquant'
+ 
+-$BIN --version 2>&1 | fgrep 2.
+ $BIN --help | fgrep -q "usage:"
+ 
+ $BIN 2>/dev/null && { echo "should fail without args"; exit 1; } || true

diff --git a/media-gfx/pngquant/pngquant-2.17.0.ebuild 
b/media-gfx/pngquant/pngquant-2.17.0.ebuild
index 39b969796e38..95adcc0f4890 100644
--- a/media-gfx/pngquant/pngquant-2.17.0.ebuild
+++ b/media-gfx/pngquant/pngquant-2.17.0.ebuild
@@ -27,7 +27,10 @@ BDEPEND="virtual/pkgconfig"
 
 RESTRICT="!test? ( test )"
 
-PATCHES=( "${FILESDIR}"/${PN}-2.12.2-respect-CFLAGS.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.12.2-respect-CFLAGS.patch
+       "${FILESDIR}"/${PN}-2.17.0-fix-test-version.patch
+)
 
 pkg_pretend() {
        [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp

Reply via email to