Date: Mon, 5 Feb 2001 10:30:47 -0800 (PST) From: tkato@prontomail.ne.jp To: freebsd-gnats-submit@FreeBSD.org Subject: ports/24880: Update port: print/pbm2ppa to pnm2ppa-1.04 Message-ID: <200102051830.f15IUla52836@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 24880 >Category: ports >Synopsis: Update port: print/pbm2ppa to pnm2ppa-1.04 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Feb 05 10:40:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: 4.2-RELEASE i386 >Organization: >Environment: >Description: - Update to version 1.04 - Add WWW: line New file: files/patch-ac files/patch-ad files/patch-ae files/patch-af pkg-message >How-To-Repeat: >Fix: diff -urN /usr/ports/print/pbm2ppa/Makefile print/pnm2ppa/Makefile --- /usr/ports/print/pbm2ppa/Makefile Tue Jan 30 21:11:47 2001 +++ print/pnm2ppa/Makefile Tue Jan 30 22:28:18 2001 @@ -1,75 +1,46 @@ -# New ports collection makefile for: pbm2ppa +# New ports collection makefile for: pnm2ppa # Date created: 18 November 1998 # Whom: smace@freebsd.org # # $FreeBSD: ports/print/pbm2ppa/Makefile,v 1.13 2001/01/27 05:43:30 will Exp $ # -PORTNAME= pbm2ppa -PORTVERSION= 0.8.6 +PORTNAME= pnm2ppa +PORTVERSION= 1.04 CATEGORIES= print -MASTER_SITES= http://www.httptech.com/ppa/files/ -DISTFILES= ppa-${PORTVERSION}.tar.gz +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= ports@FreeBSD.org +LIB_DEPENDS= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt RUN_DEPENDS= gs:${PORTSDIR}/print/ghostscript55 \ enscript:${PORTSDIR}/print/enscript-letter -USE_GMAKE= yes +MAN1= pnm2ppa.1 -HPMODEL?= 720 -ALL_TARGET= ${HPMODEL} - -pre-configure: -.if ${HPMODEL} != 720 && ${HPMODEL} != 820 && ${HPMODEL} != 1000 - @${ECHO} "HPMODEL is invalid: ${HPMODEL}." - @${ECHO} "You must specify the model of your printer:" - @${ECHO} "720 -- HP720 family (HP 722C, etc.)" - @${ECHO} "820 -- HP820 family" - @${ECHO} "1000 -- HP820 family" - @${FALSE} -.endif -.if !defined(PAPERSIZE) - @${ECHO} - @${ECHO} "No PAPERSIZE environment variable found, will default to enscript-letter" - @${ECHO} -.endif +post-patch: + @${SED} -e "s:%%PREFIX%%:${PREFIX}:g" \ + ${WRKSRC}/pnm2ppa.conf > ${WRKSRC}/pnm2ppa.conf.sample + @${SED} -e "s:%%PREFIX%%:${PREFIX}:g" \ + ${WRKSRC}/docs/en/pnm2ppa.1 > ${WRKSRC}/pnm2ppa.1 + @${SED} -e "s:%%PREFIX%%:${PREFIX}:g" \ + -e "s:%%LOCALBASE%%:${LOCALBASE}:g" \ + ${FILESDIR}/asciippafilter.SH > ${WRKSRC}/asciippafilter + @${SED} -e "s:%%PREFIX%%:${PREFIX}:g" \ + -e "s:%%LOCALBASE%%:${LOCALBASE}:g" \ + ${FILESDIR}/ppafilter.SH > ${WRKSRC}/ppafilter do-install: - ${SED} s#CHANGETHIS#${PREFIX}# < ${FILESDIR}/ppafilter.SH > ${WRKSRC}/ppafilter - ${SED} s#CHANGETHIS#${PREFIX}# < ${FILESDIR}/asciippafilter.SH > ${WRKSRC}/asciippafilter - cd ${WRKSRC} && \ - (${INSTALL_PROGRAM} pbm2ppa pbmtpg \ - ${PREFIX}/bin; \ - ${INSTALL_DATA} pbm2ppa.conf.hp${HPMODEL} \ - ${PREFIX}/etc/pbm2ppa.conf; \ - ${INSTALL_SCRIPT} ppafilter asciippafilter \ - ${PREFIX}/bin ) - -post-install: - @${ECHO} - @${ECHO} "To configure your printcap to print either ascii" - @${ECHO} "or Postscript files, add the following lines to your" - @${ECHO} "/etc/printcap file" - @${ECHO} - @${ECHO} " lp|ascii|unix:\\" - @${ECHO} " :lp=/dev/lpt0:\\" - @${ECHO} " :sd=/var/spool/lpd:\\" - @${ECHO} " :if=/usr/local/bin/asciippafilter:\\" - @${ECHO} " :mx#0:\\" - @${ECHO} " :sh:" - @${ECHO} - @${ECHO} " ps:\\" - @${ECHO} " :lp=/dev/lpt0:\\" - @${ECHO} " :sd=/var/spool/ps:\\" - @${ECHO} " :if=/usr/local/bin/ppafilter:\\" - @${ECHO} " :mx#0:\\" - @${ECHO} " :sh:" - @${ECHO} - @${ECHO} "Please be sure that you install the proper flavor of" - @${ECHO} "enscript, either A4 or Letter, by setting the PAPERSIZE" - @${ECHO} "environment variable." - @${ECHO} + ${INSTALL_PROGRAM} ${WRKSRC}/calibrate_ppa ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/pnm2ppa ${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/asciippafilter ${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/ppafilter ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/pnm2ppa.1 ${MANPREFIX}/man/man1 + ${INSTALL_DATA} ${WRKSRC}/pnm2ppa.conf.sample ${PREFIX}/etc +.if !exists(${PREFIX}/etc/pnm2ppa.conf) + ${CP} ${PREFIX}/etc/pnm2ppa.conf.sample ${PREFIX}/etc/pnm2ppa.conf +.endif + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff -urN /usr/ports/print/pbm2ppa/distinfo print/pnm2ppa/distinfo --- /usr/ports/print/pbm2ppa/distinfo Thu Nov 19 00:50:24 1998 +++ print/pnm2ppa/distinfo Tue Jan 30 21:16:55 2001 @@ -1 +1 @@ -MD5 (ppa-0.8.6.tar.gz) = fb40576435d5979db64fbea305ec224b +MD5 (pnm2ppa-1.04.tar.gz) = 8db1f0dcdb3cf86d8ccb9a34007b9e21 diff -urN /usr/ports/print/pbm2ppa/files/asciippafilter.SH print/pnm2ppa/files/asciippafilter.SH --- /usr/ports/print/pbm2ppa/files/asciippafilter.SH Thu Nov 19 00:50:24 1998 +++ print/pnm2ppa/files/asciippafilter.SH Tue Jan 30 22:31:07 2001 @@ -1,5 +1,5 @@ #!/bin/sh -CHANGETHIS/bin/enscript -B -q -p - | \ -CHANGETHIS/bin/gs -sDEVICE=pbm -q -dNOPAUSE -r600 -sOutputFile=- - | \ -CHANGETHIS/bin/pbm2ppa - - +%%LOCALBASE%%/bin/enscript -B -q -p - | \ +%%LOCALBASE%%/bin/gs -sDEVICE=ppmraw -q -dNOPAUSE -r600 -sOutputFile=- - | \ +%%PREFIX%%/bin/pnm2ppa -i - -o - diff -urN /usr/ports/print/pbm2ppa/files/patch-aa print/pnm2ppa/files/patch-aa --- /usr/ports/print/pbm2ppa/files/patch-aa Thu Nov 19 00:50:24 1998 +++ print/pnm2ppa/files/patch-aa Tue Jan 30 21:50:21 2001 @@ -1,9 +1,25 @@ ---- Makefile.orig Tue Sep 22 22:47:02 1998 -+++ Makefile Tue Sep 22 22:47:23 1998 -@@ -1,5 +1,5 @@ - CC=gcc --CFLAGS=-Wall -O2 -+CFLAGS=-Wall -O2 -DPPA_CONF=\"${PREFIX}/etc/pbm2ppa.conf\" - LDFLAGS= +--- Makefile.orig Fri Nov 3 03:33:08 2000 ++++ Makefile Tue Jan 30 21:25:55 2001 +@@ -2,16 +2,16 @@ + # Makefile for pnm2ppa + # + +-INSTALLDIR=/usr/local/bin +-CONFDIR=/etc +-MANDIR=/usr/local/man/man1 ++INSTALLDIR=${PREFIX}/bin ++CONFDIR=${PREFIX}/etc ++MANDIR=${PREFIX}/man/man1 + +-CC=gcc ++CC?=gcc + INSTALL=install + + # production build +-CFLAGS=-Wall -pedantic -O2 -g -DNDEBUG +-LDFLAGS=-lm ++CFLAGS+=-DCONFDIR=\"$(CONFDIR)\" -DNDEBUG -I${LOCALBASE}/include ++LDFLAGS=-lm -L${LOCALBASE}/lib -lgnugetopt + OBJS = pnm2ppa.o syslog.o ppa.o image.o dither.o cutswath.o hash_ink.o gamma.o + SRC = pnm2ppa.c syslog.c ppa.c image.c dither.c cutswath.c hash_ink.c gamma.c - default: diff -urN /usr/ports/print/pbm2ppa/files/patch-ab print/pnm2ppa/files/patch-ab --- /usr/ports/print/pbm2ppa/files/patch-ab Thu Nov 19 00:50:24 1998 +++ print/pnm2ppa/files/patch-ab Tue Jan 30 21:30:13 2001 @@ -1,11 +1,11 @@ ---- pbm2ppa.c.orig Mon Apr 6 23:20:07 1998 -+++ pbm2ppa.c Tue Sep 22 22:37:45 1998 -@@ -268,7 +268,7 @@ - exit(1); - } - --char* defaultcfgfile="/etc/pbm2ppa.conf"; -+char* defaultcfgfile=PPA_CONF; - int main (int argc, char *argv[]) - { - int argn; +--- pnm2ppa.c.orig Sun Nov 12 04:53:03 2000 ++++ pnm2ppa.c Tue Jan 30 21:27:52 2001 +@@ -279,7 +279,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 " CONFDIR "/pnm2ppa.conf, if it exists, is processed as a configuration\n"); + printf + (" file before any command-line parameters are processed.\n"); + printf diff -urN /usr/ports/print/pbm2ppa/files/patch-ac print/pnm2ppa/files/patch-ac --- /usr/ports/print/pbm2ppa/files/patch-ac Thu Jan 1 09:00:00 1970 +++ print/pnm2ppa/files/patch-ac Tue Jan 30 22:03:55 2001 @@ -0,0 +1,45 @@ +--- docs/en/pnm2ppa.1.orig Mon Nov 6 10:16:38 2000 ++++ docs/en/pnm2ppa.1 Tue Jan 30 22:02:49 2001 +@@ -51,13 +51,13 @@ + .\"{{{ -f configFile + .IP "\fB\-f \fIconfigFile\fR\fP" + Re-reads configuration from \fIconfigFile\fR (after +-initially reading it from /etc/pnm2ppa.conf). ++initially reading it from %%PREFIX%%/etc/pnm2ppa.conf). + .\"}}} + + .\"{{{ -F GammaFile + .IP "\fB\-F \fIGammaFile\fR\fP" + Overrides reading the color-correction table (Gamma curve) from the default +-file /etc/pnm2ppa.gamma, and uses \fIGammaFile\fR instead. ++file %%PREFIX%%/etc/pnm2ppa.gamma, and uses \fIGammaFile\fR instead. + .\"}}} + + .\"{{{ --fd +@@ -161,7 +161,7 @@ + + + .SH NOTES +-The default configuration file \fI/etc/pnm2ppa.conf\fR is read in first. Command line arguments then modify the resulting definitions. ++The default configuration file \fI%%PREFIX%%/etc/pnm2ppa.conf\fR is read in first. Command line arguments then modify the resulting definitions. + .PP + The \fB-v\fP option resets all definitions (margins, offsets, etc.) back to + the inbuilt defaults for that printer and should be used before subsequent +@@ -171,13 +171,13 @@ + + .SH FILES + +-.\"{{{ /etc/pnm2ppa.conf +-.IP "\fB\fI/etc/pnm2ppa.conf\fR\fP" ++.\"{{{ %%PREFIX%%/etc/pnm2ppa.conf ++.IP "\fB\fI%%PREFIX%%/etc/pnm2ppa.conf\fR\fP" + Default configuration file. + .\"}}} + +-.\"{{{ /etc/pnm2ppa.gamma +-.IP "\fB\fI/etc/pnm2ppa.gamma\fR\fP" ++.\"{{{ %%PREFIX%%/etc/pnm2ppa.gamma ++.IP "\fB\fI%%PREFIX%%/etc/pnm2ppa.gamma\fR\fP" + Default Gamma (color-correction) file. + .\"}}} + diff -urN /usr/ports/print/pbm2ppa/files/patch-ad print/pnm2ppa/files/patch-ad --- /usr/ports/print/pbm2ppa/files/patch-ad Thu Jan 1 09:00:00 1970 +++ print/pnm2ppa/files/patch-ad Tue Jan 30 22:07:47 2001 @@ -0,0 +1,29 @@ +--- pnm2ppa.conf.orig Sun Oct 29 00:02:57 2000 ++++ pnm2ppa.conf Tue Jan 30 22:07:29 2001 +@@ -1,7 +1,7 @@ + # Sample configuration file + # + # This file will be automatically read upon startup if it is placed in +-# /etc/pnm2ppa.conf ++# %%PREFIX%%/etc/pnm2ppa.conf + # + # uncomment entries by removing "#" to activate them. + # +@@ -26,7 +26,7 @@ + # in addition to the syslog. (Note: on BeOS, syslog messages are + # diverted to stderr; use "silent 1" to suppress them.) + # Note: the "silent 1" keyword is only accepted from the system +-# configuration file (/etc/pnm2ppa.conf), and not from configuration files ++# configuration file (%%PREFIX%%/etc/pnm2ppa.conf), and not from configuration files + # specified with the pnm2ppa option "-f". + + #silent 1 +@@ -105,7 +105,7 @@ + #------------Color correct curve Gamma parameters------------------------- + # Gamma color correction values for Red, Green and Blue: + # (Note: a more effective method of color correction is to use +-# a calibration file /etc/pnm2ppa.gamma, in which case these ++# a calibration file %%PREFIX%%/etc/pnm2ppa.gamma, in which case these + # Gamma values will not be used. See COLOR.html or COLOR.txt) + # The pnm2ppa option --noGamma suppresses color correction. + diff -urN /usr/ports/print/pbm2ppa/files/patch-ae print/pnm2ppa/files/patch-ae --- /usr/ports/print/pbm2ppa/files/patch-ae Thu Jan 1 09:00:00 1970 +++ print/pnm2ppa/files/patch-ae Tue Jan 30 21:29:40 2001 @@ -0,0 +1,13 @@ +--- pnm2ppa.h.orig Mon Oct 23 11:40:36 2000 ++++ pnm2ppa.h Tue Jan 30 21:28:49 2001 +@@ -20,8 +20,8 @@ + + #ifdef __PNM2PPA_C__ + +-static char *defaultcfgfile = "/etc/pnm2ppa.conf"; +-static char *defaultgammafile = "/etc/pnm2ppa.gamma"; ++static char *defaultcfgfile = CONFDIR "/pnm2ppa.conf"; ++static char *defaultgammafile = CONFDIR "/pnm2ppa.gamma"; + + static ppaPrinter_t printer; + diff -urN /usr/ports/print/pbm2ppa/files/patch-af print/pnm2ppa/files/patch-af --- /usr/ports/print/pbm2ppa/files/patch-af Thu Jan 1 09:00:00 1970 +++ print/pnm2ppa/files/patch-af Tue Jan 30 21:43:00 2001 @@ -0,0 +1,11 @@ +--- text-en.h.orig Sat Oct 14 17:35:25 2000 ++++ text-en.h Tue Jan 30 21:42:43 2001 +@@ -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 " CONFDIR "/pnm2ppa.conf\n", + + /* 26 */ "couldn't open config file \n", + diff -urN /usr/ports/print/pbm2ppa/files/ppafilter.SH print/pnm2ppa/files/ppafilter.SH --- /usr/ports/print/pbm2ppa/files/ppafilter.SH Thu Nov 19 00:50:24 1998 +++ print/pnm2ppa/files/ppafilter.SH Tue Jan 30 22:31:26 2001 @@ -1,4 +1,4 @@ #!/bin/sh -CHANGETHIS/bin/gs -sDEVICE=pbm -q -dNOPAUSE -r600 -sOutputFile=- - | \ -CHANGETHIS/bin/pbm2ppa - - +%%LOCALBASE%%/bin/gs -sDEVICE=ppmraw -q -dNOPAUSE -r600 -sOutputFile=- - | \ +%%PREFIX%%/bin/pnm2ppa -i - -o - diff -urN /usr/ports/print/pbm2ppa/pkg-comment print/pnm2ppa/pkg-comment --- /usr/ports/print/pbm2ppa/pkg-comment Thu Nov 19 00:50:24 1998 +++ print/pnm2ppa/pkg-comment Tue Jan 30 21:16:05 2001 @@ -1 +1 @@ -Convert PBM images to PPA for some HP printers +Convert PNM images to PPA for some HP printers diff -urN /usr/ports/print/pbm2ppa/pkg-descr print/pnm2ppa/pkg-descr --- /usr/ports/print/pbm2ppa/pkg-descr Thu Nov 19 00:50:24 1998 +++ print/pnm2ppa/pkg-descr Tue Jan 30 21:11:58 2001 @@ -3,3 +3,5 @@ printers, including the HP Deskjet 820C series, the HP DeskJet 720 series, and the HP DeskJet 1000 series. It has been tested on all three printers, but your personal experience (positive or negative) is very much appreciated! + +WWW: http://ppm2ppa.sourceforge.net/ diff -urN /usr/ports/print/pbm2ppa/pkg-message print/pnm2ppa/pkg-message --- /usr/ports/print/pbm2ppa/pkg-message Thu Jan 1 09:00:00 1970 +++ print/pnm2ppa/pkg-message Tue Jan 30 22:19:00 2001 @@ -0,0 +1,21 @@ +To configure your printcap to print either ascii" +or Postscript files, add the following lines to your" +/etc/printcap file" + + lp|ascii|unix:\\" + :lp=/dev/lpt0:\\" + :sd=/var/spool/lpd:\\" + :if=/usr/local/bin/asciippafilter:\\" + :mx#0:\\" + :sh:" + + ps:\\" + :lp=/dev/lpt0:\\" + :sd=/var/spool/ps:\\" + :if=/usr/local/bin/ppafilter:\\" + :mx#0:\\" + :sh:" + +Please be sure that you install the proper flavor of" +enscript, either A4 or Letter, by setting the PAPERSIZE" +environment variable." diff -urN /usr/ports/print/pbm2ppa/pkg-plist print/pnm2ppa/pkg-plist --- /usr/ports/print/pbm2ppa/pkg-plist Thu Nov 19 00:50:24 1998 +++ print/pnm2ppa/pkg-plist Tue Jan 30 22:28:35 2001 @@ -1,5 +1,7 @@ -bin/pbm2ppa -bin/pbmtpg -bin/ppafilter bin/asciippafilter -etc/pbm2ppa.conf +bin/calibrate_ppa +bin/pnm2ppa +bin/ppafilter +@unexec if cmp -s %D/etc/pnm2ppa.conf %D/etc/pnm2ppa.conf.sample; then rm -f %D/etc/pnm2ppa.conf; fi +etc/pnm2ppa.conf.sample +@exec test -f %B/pnm2ppa.conf || cp %B/%f %B/pnm2ppa.conf >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102051830.f15IUla52836>