[netpbm/f18] pnmtops: Multi-page PAM files correction (#833546)

Petr Hracek phracek at fedoraproject.org
Tue May 28 10:04:39 UTC 2013


commit ee7759e7312d682bc47e54c9db7f23c3a4773a88
Author: Petr Hracek <phracek at redhat.com>
Date:   Tue May 28 11:51:15 2013 +0200

    pnmtops: Multi-page PAM files correction (#833546)

 netpbm-multipage-pam.patch |   25 +++++++++++++++++++++++++
 netpbm.spec                |    7 ++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
---
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 0b88668..875557f 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.01
-Release: 1%{?dist}
+Release: 2%{?dist}
 # See copyright_summary for details
 License: BSD and GPLv2 and IJG and MIT and Public Domain
 Group: System Environment/Libraries
@@ -33,6 +33,7 @@ Patch22: netpbm-pamtojpeg2k.patch
 Patch23: netpbm-manfix.patch
 Patch24: netpbm-ppmtopict.patch
 Patch25: netpbm-pnmtopclxl.patch
+Patch26: netpbm-multipage-pam.patch
 BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex
 BuildRequires: libX11-devel, python, jasper-devel, libxml2-devel
 
@@ -106,6 +107,7 @@ netpbm-doc.  You'll also need to install the netpbm-progs package.
 %patch23 -p1 -b .manfix
 %patch24 -p1 -b .ppmtopict
 %patch25 -p1 -b .pnmtopclxl
+%patch26 -p1 -b .multipage-pam
 
 sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in
 rm -rf converter/other/jpeg2000/libjasper/
@@ -256,6 +258,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc userguide/*
 
 %changelog
+* Tue May 28 2013 Petr Hracek <phracek at redhat.com> - 10.61.01-2
+- pnmtops: Multi-page PAM files correction (#833546)
+
 * Thu Jan 03 2013 Jindrich Novy <jnovy at redhat.com> 10.61.01-1
 - update to 10.61.01
 - sync patches


More information about the scm-commits mailing list