From 90f02db8757cfd402c8450c6ddf1c3fc1e6a1651 Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Feb 09 2021 14:57:03 +0000 Subject: Adapt tests to libtiff-4.2.0 --- diff --git a/Graphics-TIFF-7-Adapt-tests-to-tiff-4.2.0.patch b/Graphics-TIFF-7-Adapt-tests-to-tiff-4.2.0.patch new file mode 100644 index 0000000..56a2aac --- /dev/null +++ b/Graphics-TIFF-7-Adapt-tests-to-tiff-4.2.0.patch @@ -0,0 +1,32 @@ +From 67bf130d212b647d9756f24333f038f93b24a8d2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 8 Feb 2021 12:44:48 +0100 +Subject: [PATCH] Adapt tests to tiff-4.2.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +tiff-4.2.0 added a -m option to tiff2pdf tool. This broke '-?' test +because of the unexpected -m option. This patch adjusts the test. + +Signed-off-by: Petr Písař +--- + t/93_tiff2pdf.t | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/t/93_tiff2pdf.t b/t/93_tiff2pdf.t +index e01f16a..14d38d8 100644 +--- a/t/93_tiff2pdf.t ++++ b/t/93_tiff2pdf.t +@@ -26,6 +26,8 @@ my $make_reproducible = + # strip '' from around ?, which newer glibc libraries seem to have added + my $expected = `tiff2pdf -? $tif 2>&1`; + $expected =~ s/'\?'/?/xsm; ++# strip '-m' option added in tiff-4.2.0 ++$expected =~ s/^ -m: .*?\R//ms; + is( `$cmd -? $tif 2>&1`, $expected, '-?' ); + + ######################### +-- +2.26.2 + diff --git a/perl-Graphics-TIFF.spec b/perl-Graphics-TIFF.spec index 1a9873e..710e3c6 100644 --- a/perl-Graphics-TIFF.spec +++ b/perl-Graphics-TIFF.spec @@ -3,11 +3,13 @@ Name: perl-Graphics-TIFF Version: 7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Perl extension for the LibTIFF library License: GPL+ or Artistic URL: https://metacpan.org/release/Graphics-TIFF Source0: https://cpan.metacpan.org/authors/id/R/RA/RATCLIFFE/Graphics-TIFF-%{version}.tar.gz +# Adapt tests to libtiff-4.2.0, CPAN RT#134344, proposed to the upstream +Patch0: Graphics-TIFF-7-Adapt-tests-to-tiff-4.2.0.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc @@ -55,6 +57,7 @@ LibTIFF library in a Perlish and object-oriented way. %prep %setup -q -n Graphics-TIFF-%{version} +%patch0 -p1 %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" @@ -76,6 +79,9 @@ make test %{_mandir}/man3/* %changelog +* Mon Feb 08 2021 Petr Pisar - 7-2 +- Adapt tests to libtiff-4.2.0 (CPAN RT#134344) + * Thu Oct 29 2020 Petr Pisar - 7-1 - Version 7 bump