Subject: pkg/21667: update of print/pnm2ppa
To: None <gnats-bugs@gnats.netbsd.org>
From: None <soren@bob.blef.org>
List: netbsd-bugs
Date: 05/24/2003 20:46:32
>Number:         21667
>Category:       pkg
>Synopsis:       update of print/pnm2ppa
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun May 25 03:47:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Soren Jacobsen
>Release:        NetBSD 1.6.1
>Organization:
>Environment:
pkgsrc as of 05/24/2003.
>Description:
pnm2ppa is outdated.

There is no reason installing a default configuration file, because this
package must be configured before use.
>How-To-Repeat:
>Fix:
Apply:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/print/pnm2ppa/Makefile,v
retrieving revision 1.5
diff -b -u -r1.5 Makefile
--- Makefile	2003/01/28 22:04:01	1.5
+++ Makefile	2003/05/25 03:33:29
@@ -1,8 +1,7 @@
 # $NetBSD: Makefile,v 1.5 2003/01/28 22:04:01 jlam Exp $
 #
 
-DISTNAME=	pnm2ppa-1.04
-PKGREVISION=	1
+DISTNAME=	pnm2ppa-1.12
 CATEGORIES=	print converters graphics
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=pnm2ppa/}
 
@@ -10,10 +9,6 @@
 HOMEPAGE=	http://pnm2ppa.sourceforge.net/
 COMMENT=	filter to convert PNM file to PPA used by some HP DJ printer
 
-USE_PKGINSTALL=	yes
-CONF_FILES+=	${PREFIX}/share/examples/pnm2ppa/pnm2ppa.conf.default	\
-		${PKG_SYSCONFDIR}/pnm2ppa.conf
-
 post-build:
 	for f in				\
 	${WRKSRC}/docs/en/CALIBRATION.txt	\
@@ -25,9 +20,15 @@
 			$$f.orig > $$f ;	\
 	done
 
-post-install:
-	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pnm2ppa
+do-install:
 	cd ${WRKSRC} &&	\
+	${INSTALL_PROGRAM} pnm2ppa ${PREFIX}/bin ; \
+	${INSTALL_PROGRAM} calibrate_ppa ${PREFIX}/bin ; \
+	${INSTALL_DATA} docs/en/pnm2ppa.1 ${PREFIX}/man/man1 ; \
+	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pnm2ppa ; \
+	${INSTALL_DATA} pnm2ppa.conf \
+       		${PREFIX}/share/examples/pnm2ppa/pnm2ppa.conf.default ; \
+	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pnm2ppa ; \
 	${INSTALL_DATA} docs/en/CALIBRATION.txt	docs/en/COLOR.txt	\
 		${PREFIX}/share/doc/pnm2ppa
 
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/print/pnm2ppa/distinfo,v
retrieving revision 1.3
diff -b -u -r1.3 distinfo
--- distinfo	2003/01/19 08:45:38	1.3
+++ distinfo	2003/05/25 03:33:29
@@ -1,5 +1,8 @@
 $NetBSD: distinfo,v 1.3 2003/01/19 08:45:38 salo Exp $
 
-SHA1 (pnm2ppa-1.04.tar.gz) = a3cd26788779bc80fa6c8265f3b2aacaaa5acd92
-Size (pnm2ppa-1.04.tar.gz) = 163851 bytes
-SHA1 (patch-aa) = c9b392694659d4c9a2674725d28a9caa81ca208a
+SHA1 (pnm2ppa-1.12.tar.gz) = a4a8915cb9e3d01dd55bd5958b00a9d19b1d747d
+Size (pnm2ppa-1.12.tar.gz) = 191113 bytes
+SHA1 (patch-aa) = 439336c0a851ec91da61ac7bea689e8c96f31173
+SHA1 (patch-ab) = 2e343bcaaca3e37dd0d393688bbc8cc37b70b4dc
+SHA1 (patch-ac) = 24d15229f9d81839c4b9e145ff554b12748c2153
+SHA1 (patch-ad) = 80d64d7543152698e8b01c8d575ed8f7a12e1109

Add the following patches.
========
patch-aa:
$NetBSD$

--- Makefile.orig	Fri Nov 15 15:29:29 2002
+++ Makefile	Tue May 13 12:57:08 2003
@@ -10,8 +10,8 @@
 MANDIR="/usr/local/man/man1"
 
 #compiler and linker options:
-CC=gcc
-CFLAGS=-Wall -pedantic -O2  
+#CC=gcc
+CFLAGS+=-DPKG_SYSCONFDIR=\"${PKG_SYSCONFDIR}\"
 LDFLAGS=-lm
 
 INSTALL=install


========
patch-ab:
$NetBSD$

--- pnm2ppa.h.orig	Sat Jun 22 22:17:57 2002
+++ pnm2ppa.h	Sun May 11 09:39:33 2003
@@ -20,8 +20,8 @@
 
 #ifdef __PNM2PPA_C__
 
-static char *defaultcfgfile = "/etc/pnm2ppa.conf";
-static char *defaultgammafile = "/etc/pnm2ppa.gamma";
+static char *defaultcfgfile = PKG_SYSCONFDIR"/pnm2ppa.conf";
+static char *defaultgammafile = PKG_SYSCONFDIR"/pnm2ppa.gamma";
 
 static ppaPrinter_t printer;
 

========
patch-ac:
$NetBSD$

--- pnm2ppa.c.orig	Sun May 11 09:40:56 2003
+++ pnm2ppa.c	Sun May 11 09:41:26 2003
@@ -286,7 +286,7 @@
     printf
       ("  The order in which parameters are specified is important:\n");
     printf
-      ("  the file /etc/pnm2ppa.conf, if it exists, is processed as a configuration\n");
+      ("  the file "PKG_SYSCONFDIR"/pnm2ppa.conf, if it exists, is processed as a configuration\n");
     printf 
       ("  file before any command-line parameters are processed.\n");
     printf 


========
patch-ad:
$NetBSD$

--- text-en.h.orig	Sun May 11 09:41:59 2003
+++ text-en.h	Sun May 11 09:42:14 2003
@@ -73,7 +73,7 @@
   
   /* 24 */ "Verbose logging to console\n",
   
-  /* 25 */ "Please configure your printer in /etc/pnm2ppa.conf\n",
+  /* 25 */ "Please configure your printer in"PKG_SYSCONFDIR"/pnm2ppa.conf\n",
   
   /* 26 */ "couldn't open config file \n",
>Release-Note:
>Audit-Trail:
>Unformatted: