commit:     12543e87df7ab5bb23f22ffcf0f1845eea19568a
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sat Sep 13 05:36:07 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 13 07:25:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12543e87

media-libs/tiff-compat: address tests failings due to disabled tools

Closes: https://bugs.gentoo.org/915075
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/43770
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../tiff-4.4.0-skip-tests-requiring-tools.patch    | 58 ++++++++++++++++++++++
 media-libs/tiff-compat/tiff-compat-4.4.0-r3.ebuild |  1 +
 2 files changed, 59 insertions(+)

diff --git 
a/media-libs/tiff-compat/files/tiff-4.4.0-skip-tests-requiring-tools.patch 
b/media-libs/tiff-compat/files/tiff-4.4.0-skip-tests-requiring-tools.patch
new file mode 100644
index 000000000000..8bffa55c30bf
--- /dev/null
+++ b/media-libs/tiff-compat/files/tiff-4.4.0-skip-tests-requiring-tools.patch
@@ -0,0 +1,58 @@
+https://bugs.gentoo.org/915075
+https://gitlab.com/libtiff/libtiff/-/issues/421
+https://gitlab.com/libtiff/libtiff/-/merge_requests/334
+
+Modified to apply without prerequisite AM_CONDITIONAL. This a "dead"
+version of tiff so hardcoded patches aren't biggest sin.
+
+From 223078d72232c1e71e2fddb140d232c457667d19 Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Sat, 21 May 2022 01:01:35 +0100
+Subject: [PATCH] test (autotools): skip script tests if tools aren't built
+
+In Gentoo, we avoid building the tools for multilib (32-bit, x86) builds on
+amd64/x86_64 because we only need the library to keep binary applications 
working.
+
+This causes a test failure in e.g. tiffcp-thumbnail.sh as the 'thumbnail'
+binary isn't built. Skip it if unavailable.
+
+Fixes: https://gitlab.com/libtiff/libtiff/-/issues/421
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -55,13 +55,14 @@ XFAIL_TESTS =
+ CLEANFILES = test_packbits.tif o-*
+ 
+ if HAVE_JPEG
++if FALSE
+ JPEG_DEPENDENT_CHECK_PROG=raw_decode
+ JPEG_DEPENDENT_TESTSCRIPTS=\
+       tiff2rgba-quad-tile.jpg.sh \
+       tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \
+       tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \
+       tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh
+-
++endif
+ else
+ JPEG_DEPENDENT_CHECK_PROG=
+ JPEG_DEPENDENT_TESTSCRIPTS=
+@@ -80,6 +81,7 @@ check_PROGRAMS = \
+ endif
+ 
+ # Test scripts to execute
++if FALSE
+ TESTSCRIPTS = \
+       ppm2tiff_pbm.sh \
+       ppm2tiff_pgm.sh \
+@@ -161,6 +163,9 @@ TESTSCRIPTS = \
+       testfax3_bug_513.sh \
+       testdeflatelaststripextradata.sh \
+       $(JPEG_DEPENDENT_TESTSCRIPTS)
++else
++TESTSCRIPTS=
++endif
+ 
+ # This list should contain the references files
+ # from the 'refs' subdirectory
+-- 
+GitLab
+

diff --git a/media-libs/tiff-compat/tiff-compat-4.4.0-r3.ebuild 
b/media-libs/tiff-compat/tiff-compat-4.4.0-r3.ebuild
index c89e603135b5..49a62322e6d7 100644
--- a/media-libs/tiff-compat/tiff-compat-4.4.0-r3.ebuild
+++ b/media-libs/tiff-compat/tiff-compat-4.4.0-r3.ebuild
@@ -53,6 +53,7 @@ PATCHES=(
        "${FILESDIR}"/${PN/-compat}-4.4.0_rc1-skip-thumbnail-test.patch
        "${FILESDIR}"/${P/-compat}-hylafaxplus-regression.patch
        "${FILESDIR}"/${P/-compat}-C23.patch
+       "${FILESDIR}"/${P/-compat}-skip-tests-requiring-tools.patch
 )
 
 src_prepare() {

Reply via email to