From ebbeaa0ca53983295874fad6ca828957984966ec Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Mon, 17 Jan 2011 08:46:01 +0100 Subject: [PATCH] update to 10.47.25 and fix #670082 --- .gitignore | 2 +- netpbm-asciitopgm.patch | 55 +++++++++++++++++++++++++++++++++++++++++ netpbm.spec | 8 +++++- sources | 2 +- 4 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 netpbm-asciitopgm.patch diff --git a/.gitignore b/.gitignore index 451dcc7..1f57647 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -netpbm-10.47.24.tar.xz +netpbm-10.47.25.tar.xz diff --git a/netpbm-asciitopgm.patch b/netpbm-asciitopgm.patch new file mode 100644 index 0000000..503c019 --- /dev/null +++ b/netpbm-asciitopgm.patch @@ -0,0 +1,55 @@ +--- converter/pgm/asciitopgm.c~ 2011-01-01 01:58:56.000000000 -0500 ++++ converter/pgm/asciitopgm.c 2011-01-17 01:20:26.720684456 -0500 +@@ -55,6 +55,7 @@ + bool warned; + int *obuf; + const char * const usage = "[-d ] height width [asciifile]"; ++ char trunc; + + pgm_init( &argc, argv ); + +@@ -112,7 +113,7 @@ + for (col = 0; col < cols; ++col) obuf[col] = 0; + } + grays = pgm_allocarray( cols, rows ); +- row = i = 0; ++ row = i = trunc = 0; + while ( row < rows ) + { + switch (c = getc (ifd)) +@@ -120,6 +121,9 @@ + case EOF: + goto line_done; + case '\n': ++ newline: ++ fputc(c, stderr); ++ trunc = 0; + if ((c = getc (ifd)) == EOF) + goto line_done; + if (c == '+') +@@ -137,11 +141,24 @@ + ++row; + if ( row >= rows ) + break; +- if (c != EOF) ++ if (c == '\n') ++ goto newline; ++ else if (c != EOF) + obuf[i++] += gmap[c]; + } + break; + default: ++ fputc(c, stderr); ++ if (i == cols) ++ { ++ if (! trunc) ++ { ++ pm_message("Warning: row %d being truncated at %d columns", ++ row+1, cols); ++ trunc = 1; ++ } ++ continue; ++ } + if (c > 0x7f) /* !isascii(c) */ + { + if (!warned) diff --git a/netpbm.spec b/netpbm.spec index dcc2147..71e6e8b 100644 --- a/netpbm.spec +++ b/netpbm.spec @@ -1,6 +1,6 @@ Summary: A library for handling different graphics file formats Name: netpbm -Version: 10.47.24 +Version: 10.47.25 Release: 1%{?dist} # See copyright_summary for details License: BSD and GPLv2 and IJG and MIT and Public Domain @@ -34,6 +34,7 @@ Patch20: netpbm-noppmtompeg.patch Patch21: netpbm-cmuwtopbm.patch Patch22: netpbm-pamtojpeg2k.patch Patch23: netpbm-manfix.patch +Patch24: netpbm-asciitopgm.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex BuildRequires: libX11-devel, python, jasper-devel @@ -110,6 +111,7 @@ netpbm-doc. You'll also need to install the netpbm-progs package. %patch21 -p1 -b .cmuwtopbmfix %patch22 -p1 -b .pamtojpeg2kfix %patch23 -p1 -b .manfix +%patch24 -p0 -b .asciitopgmfix sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in rm -rf converter/other/jpeg2000/libjasper/ @@ -253,6 +255,10 @@ rm -rf $RPM_BUILD_ROOT %doc userguide/* %changelog +* Mon Jan 17 2011 Jindrich Novy 10.47.25-1 +- update to 10.47.25 +- fix asciitopgm (#670082), thanks to Jonathan Kamens + * Sat Jan 1 2011 Jindrich Novy 10.47.24-1 - update to 10.47.24 diff --git a/sources b/sources index c12ccab..cb0ee0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -47847734f7689f7daace81bb3eeeffba netpbm-10.47.24.tar.xz +7b4ffef090c40586255042d7d493ffc6 netpbm-10.47.25.tar.xz