From c51f2c86eb241496fd6226f0cc6b430fd87a75f6 Mon Sep 17 00:00:00 2001 From: Petr Hracek Date: Tue, 28 May 2013 10:34:21 +0200 Subject: [PATCH] pnmtops: Multi-page PAM files correction (#833546) --- netpbm-multipage-pam.patch | 25 +++++++++++++++++++++++++ netpbm.spec | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 netpbm-multipage-pam.patch diff --git a/netpbm-multipage-pam.patch b/netpbm-multipage-pam.patch new file mode 100644 index 0000000..59b1651 --- /dev/null +++ b/netpbm-multipage-pam.patch @@ -0,0 +1,25 @@ +diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c +index 24dc7df..e393931 100644 +--- a/converter/other/pnmtops.c ++++ b/converter/other/pnmtops.c +@@ -1909,6 +1909,7 @@ convertPage(FILE * const ifP, + /* The file stream which is the head of the filter chain; we write to + this and filtered stuff comes out the other end. + */ ++ FILE * filterChainOfP; + + pnm_readpaminit(ifP, &inpam, PAM_STRUCT_SIZE(tuple_type)); + +@@ -1951,7 +1952,11 @@ convertPage(FILE * const ifP, + initOutputEncoder(&oe, inpam.width, bitsPerSample, + rle, flate, ascii85, psFilter); + +- spawnFilters(stdout, &oe, &feedFileP, filterPidList); ++ fflush(stdout); ++ filterChainOfP = fdopen(dup(fileno(stdout)), "w"); ++ /* spawnFilters() closes this. See FILE MANAGEMENT above */ ++ ++ spawnFilters(filterChainOfP, &oe, &feedFileP, filterPidList); + + convertRaster(&inpam, bitsPerSample, psFilter, feedFileP); + diff --git a/netpbm.spec b/netpbm.spec index e1f2e04..b1c42a9 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: 2%{?dist} +Release: 3%{?dist} # See copyright_summary for details License: BSD and GPLv2 and IJG and MIT and Public Domain Group: System Environment/Libraries @@ -34,6 +34,7 @@ Patch23: netpbm-manfix.patch Patch24: netpbm-ppmtopict.patch Patch25: netpbm-pnmtopclxl.patch Patch26: netpbm-man-repeated.patch +Patch27: netpbm-multipage-pam.patch BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel @@ -108,6 +109,7 @@ netpbm-doc. You'll also need to install the netpbm-progs package. %patch24 -p1 -b .ppmtopict %patch25 -p1 -b .pnmtopclxl %patch26 -p1 -b .man-repeated +%patch27 -p1 -b .multipage-pam sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in rm -rf converter/other/jpeg2000/libjasper/ @@ -258,6 +260,9 @@ rm -rf $RPM_BUILD_ROOT %doc userguide/* %changelog +* Tue May 28 2013 Petr Hracek - 10.61.02-3 +- pnmtops: Multi-page PAM files correction (#833546) + * Mon May 27 2013 Petr Hracek 10.61.02-2 - Man page corrections (#948531)