pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/netpbm Apply patches for the three 10.29 bugs...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5c10a05b98b3
branches:  trunk
changeset: 499333:5c10a05b98b3
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Tue Sep 20 05:04:11 2005 +0000

description:
Apply patches for the three 10.29 bugs listed on SourceForge we
hadn't already fixed. The list:

http://sourceforge.net/project/shownotes.php?group_id=5128&release_id=349291

The problems fixed in this PKGREVISION bump:

* pnmtopng: can crash due to wild pointer if you don't use the
    -alpha option.
* pammasksharpen:  Multiple bugs cause it to produce incorrect
    output.
* pnmhisteq: -rmap doesn't work.

Addresses my own PR pkg/31314, with thanks to Nathan Arthur for
bringing these patches to my attention.

diffstat:

 graphics/netpbm/Makefile         |   4 ++--
 graphics/netpbm/distinfo         |   5 ++++-
 graphics/netpbm/patches/patch-ag |  13 +++++++++++++
 graphics/netpbm/patches/patch-aj |  17 +++++++++++++++++
 graphics/netpbm/patches/patch-ak |  22 ++++++++++++++++++++++
 5 files changed, 58 insertions(+), 3 deletions(-)

diffs (95 lines):

diff -r 44d273ae8b5f -r 5c10a05b98b3 graphics/netpbm/Makefile
--- a/graphics/netpbm/Makefile  Tue Sep 20 04:23:48 2005 +0000
+++ b/graphics/netpbm/Makefile  Tue Sep 20 05:04:11 2005 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.124 2005/09/14 07:38:50 pooka Exp $
+# $NetBSD: Makefile,v 1.125 2005/09/20 05:04:11 schmonz Exp $
 
 DISTNAME=      netpbm-10.29
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    graphics
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=netpbm/}
 EXTRACT_SUFX=  .tgz
diff -r 44d273ae8b5f -r 5c10a05b98b3 graphics/netpbm/distinfo
--- a/graphics/netpbm/distinfo  Tue Sep 20 04:23:48 2005 +0000
+++ b/graphics/netpbm/distinfo  Tue Sep 20 05:04:11 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2005/08/31 19:47:53 reed Exp $
+$NetBSD: distinfo,v 1.44 2005/09/20 05:04:11 schmonz Exp $
 
 SHA1 (netpbm-10.29.tgz) = 0733a0e1a7413e48eeb060aed1d1cc326e12ef8d
 RMD160 (netpbm-10.29.tgz) = c88d01b1106c7eb1f087d98a5570c0c61200d083
@@ -9,5 +9,8 @@
 SHA1 (patch-ad) = 7393993077852e845c1bec14227347b39e973c83
 SHA1 (patch-ae) = 33a5be2843dd85b530f5e6ba496cd0380cd5edd1
 SHA1 (patch-af) = 82e366af1c8b644cf374706c2eb113c370447de9
+SHA1 (patch-ag) = 806f5e87c4b0c6dc2f6127a138809b0587a41de6
 SHA1 (patch-ah) = be2ebb908859da6e030b04acb9e33b6c774137ad
 SHA1 (patch-ai) = 1d8c9585a08f96422f4180719ecc26e305929c62
+SHA1 (patch-aj) = 89845e68fb152f46743213dc0d124b49a42b0f0b
+SHA1 (patch-ak) = 2e2be93baa243b16460252d02bbc8f5d00ce6592
diff -r 44d273ae8b5f -r 5c10a05b98b3 graphics/netpbm/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/netpbm/patches/patch-ag  Tue Sep 20 05:04:11 2005 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ag,v 1.10 2005/09/20 05:04:11 schmonz Exp $
+
+--- converter/other/pnmtopng.c.orig    2005-08-06 13:26:55.000000000 -0400
++++ converter/other/pnmtopng.c
+@@ -1690,7 +1690,7 @@ writeRaster(png_struct *         const p
+             pnm_promoteformatrow(xelrow, cols, maxval, format, maxval,
+                                  PPM_TYPE);
+             
+-            makePngLine(line, xelrow, cols, maxval, alpha, alpha_mask[row],
++            makePngLine(line, xelrow, cols, maxval, alpha, alpha ? alpha_mask[row] : NULL,
+                         cht, caht, info_ptr, png_maxval, depth);
+ 
+             png_write_row(png_ptr, line);
diff -r 44d273ae8b5f -r 5c10a05b98b3 graphics/netpbm/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/netpbm/patches/patch-aj  Tue Sep 20 05:04:11 2005 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-aj,v 1.7 2005/09/20 05:04:11 schmonz Exp $
+
+--- editor/pammasksharpen.c.orig       2004-05-29 14:15:46.000000000 -0400
++++ editor/pammasksharpen.c
+@@ -114,10 +114,10 @@ main(int argc, char *argv[]) {
+             unsigned int plane;
+             
+             for (plane = 0; plane < outpam.depth; ++plane) {
+-                unsigned int const rawResult = 
++                int const rawResult = 
+                     2 * inputTuplerow[col][plane] - maskTuplerow[col][plane];
+ 
+-                outputTuplerow[col][plane] = MIN(255, MAX(0, rawResult));
++                outputTuplerow[col][plane] = MIN(outpam.maxval, MAX(0, rawResult));
+             }
+         }
+         pnm_writepamrow(&outpam, outputTuplerow);
diff -r 44d273ae8b5f -r 5c10a05b98b3 graphics/netpbm/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/netpbm/patches/patch-ak  Tue Sep 20 05:04:11 2005 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ak,v 1.5 2005/09/20 05:04:11 schmonz Exp $
+
+--- editor/pnmhisteq.c.orig    2004-09-17 23:25:46.000000000 -0400
++++ editor/pnmhisteq.c
+@@ -275,6 +275,8 @@ int main(argc, argv)
+        luminosity mapping table which gives the histogram-equalized
+        luminosity for each original luminosity. */
+ 
++    if (rmap == NULL) {
++
+     /* Calculate initial histogram equalisation curve. */
+ 
+     for (i = 0; i <= (int) maxval; i++) {
+@@ -301,6 +303,8 @@ int main(argc, argv)
+           MIN(((long) maxval), ((long) (lumamap[0][i] * lscale + 0.5)));
+     }
+ 
++    }
++
+     /* If requested, print the luminosity map and original histogram. */
+ 
+     if (verbose) {



Home | Main Index | Thread Index | Old Index