diff --git a/netpbm-compare-same-images.patch b/netpbm-compare-same-images.patch new file mode 100644 index 0000000..c629c4c --- /dev/null +++ b/netpbm-compare-same-images.patch @@ -0,0 +1,23 @@ +diff --git a/analyzer/pnmpsnr.c b/analyzer/pnmpsnr.c +index ce2708b..b04316c 100644 +--- a/analyzer/pnmpsnr.c ++++ b/analyzer/pnmpsnr.c +@@ -55,14 +55,14 @@ validateInput(struct pam const pam1, + "maxval of one of them.", + (unsigned int) pam1.maxval, (unsigned int) pam2.maxval); + +- if (streq(pam1.tuple_type, pam2.tuple_type)) ++ if (!streq(pam1.tuple_type, pam2.tuple_type)) + pm_error("images are not of the same type. The tuple types are " + "'%s' and '%s', respectively.", + pam1.tuple_type, pam2.tuple_type); + +- if (streq(pam1.tuple_type, PAM_PBM_TUPLETYPE) && +- streq(pam1.tuple_type, PAM_PGM_TUPLETYPE) && +- streq(pam1.tuple_type, PAM_PPM_TUPLETYPE)) ++ if (!streq(pam1.tuple_type, PAM_PBM_TUPLETYPE) && ++ !streq(pam1.tuple_type, PAM_PGM_TUPLETYPE) && ++ !streq(pam1.tuple_type, PAM_PPM_TUPLETYPE)) + pm_error("Images are not of a PNM type. Tuple type is '%s'", + pam1.tuple_type); + } diff --git a/netpbm.spec b/netpbm.spec index b1c42a9..76b9ff5 100644 --- a/netpbm.spec +++ b/netpbm.spec @@ -1,7 +1,7 @@ Summary: A library for handling different graphics file formats Name: netpbm Version: 10.61.02 -Release: 3%{?dist} +Release: 4%{?dist} # See copyright_summary for details License: BSD and GPLv2 and IJG and MIT and Public Domain Group: System Environment/Libraries @@ -35,6 +35,7 @@ Patch24: netpbm-ppmtopict.patch Patch25: netpbm-pnmtopclxl.patch Patch26: netpbm-man-repeated.patch Patch27: netpbm-multipage-pam.patch +Patch28: netpbm-compare-same-images.patch BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel @@ -110,6 +111,7 @@ netpbm-doc. You'll also need to install the netpbm-progs package. %patch25 -p1 -b .pnmtopclxl %patch26 -p1 -b .man-repeated %patch27 -p1 -b .multipage-pam +%patch28 -p1 -b .compare-same-images sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in rm -rf converter/other/jpeg2000/libjasper/ @@ -260,6 +262,9 @@ rm -rf $RPM_BUILD_ROOT %doc userguide/* %changelog +* Wed Jun 05 2013 Petr Hracek - 10.61.02-4 +- pnmpsnr: compare the same images failed (#969479) + * Tue May 28 2013 Petr Hracek - 10.61.02-3 - pnmtops: Multi-page PAM files correction (#833546)