diff options
author | FUJISHIMA Satsuki <sf@FreeBSD.org> | 2001-03-03 21:19:13 +0000 |
---|---|---|
committer | FUJISHIMA Satsuki <sf@FreeBSD.org> | 2001-03-03 21:19:13 +0000 |
commit | 29d1daf7877a35140b019686d18c16036ba6527d (patch) | |
tree | 69ff0c216016f7cbd151356118a75a4bbf0482ec /print/pnm2ppa | |
parent | The "dfsadmin-file" (Solaris specific) has been updated, together with the (diff) |
rename pbm2ppa to pnm2ppa with updating to 1.04 (repository copied).
PR: 24880
Submitted by: KATO Tsuguru <tkato@prontomail.ne.jp>
Notes
Notes:
svn path=/head/; revision=39020
Diffstat (limited to 'print/pnm2ppa')
-rw-r--r-- | print/pnm2ppa/Makefile | 85 | ||||
-rw-r--r-- | print/pnm2ppa/distinfo | 2 | ||||
-rw-r--r-- | print/pnm2ppa/files/asciippafilter.SH | 6 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-aa | 34 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-ab | 22 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-ac | 45 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-ad | 29 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-ae | 13 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-af | 11 | ||||
-rw-r--r-- | print/pnm2ppa/files/ppafilter.SH | 4 | ||||
-rw-r--r-- | print/pnm2ppa/pkg-comment | 2 | ||||
-rw-r--r-- | print/pnm2ppa/pkg-descr | 2 | ||||
-rw-r--r-- | print/pnm2ppa/pkg-message | 21 | ||||
-rw-r--r-- | print/pnm2ppa/pkg-plist | 10 |
14 files changed, 198 insertions, 88 deletions
diff --git a/print/pnm2ppa/Makefile b/print/pnm2ppa/Makefile index faa883d1c081..66b4f17c1bd7 100644 --- a/print/pnm2ppa/Makefile +++ b/print/pnm2ppa/Makefile @@ -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$ # -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 --git a/print/pnm2ppa/distinfo b/print/pnm2ppa/distinfo index d67eb8c1ab87..2d7b72cec72f 100644 --- a/print/pnm2ppa/distinfo +++ b/print/pnm2ppa/distinfo @@ -1 +1 @@ -MD5 (ppa-0.8.6.tar.gz) = fb40576435d5979db64fbea305ec224b +MD5 (pnm2ppa-1.04.tar.gz) = 8db1f0dcdb3cf86d8ccb9a34007b9e21 diff --git a/print/pnm2ppa/files/asciippafilter.SH b/print/pnm2ppa/files/asciippafilter.SH index 3b40c90e8c71..56ac28287d7b 100644 --- a/print/pnm2ppa/files/asciippafilter.SH +++ b/print/pnm2ppa/files/asciippafilter.SH @@ -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 --git a/print/pnm2ppa/files/patch-aa b/print/pnm2ppa/files/patch-aa index 0b90a5ca90ef..dd6530f163c3 100644 --- a/print/pnm2ppa/files/patch-aa +++ b/print/pnm2ppa/files/patch-aa @@ -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= - - default: +--- 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 + diff --git a/print/pnm2ppa/files/patch-ab b/print/pnm2ppa/files/patch-ab index 46fba083a417..3693fc350c8d 100644 --- a/print/pnm2ppa/files/patch-ab +++ b/print/pnm2ppa/files/patch-ab @@ -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 --git a/print/pnm2ppa/files/patch-ac b/print/pnm2ppa/files/patch-ac new file mode 100644 index 000000000000..0d4d7097ebee --- /dev/null +++ b/print/pnm2ppa/files/patch-ac @@ -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 --git a/print/pnm2ppa/files/patch-ad b/print/pnm2ppa/files/patch-ad new file mode 100644 index 000000000000..8674ed091187 --- /dev/null +++ b/print/pnm2ppa/files/patch-ad @@ -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 --git a/print/pnm2ppa/files/patch-ae b/print/pnm2ppa/files/patch-ae new file mode 100644 index 000000000000..339801657a11 --- /dev/null +++ b/print/pnm2ppa/files/patch-ae @@ -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 --git a/print/pnm2ppa/files/patch-af b/print/pnm2ppa/files/patch-af new file mode 100644 index 000000000000..2a7ad69beae1 --- /dev/null +++ b/print/pnm2ppa/files/patch-af @@ -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 --git a/print/pnm2ppa/files/ppafilter.SH b/print/pnm2ppa/files/ppafilter.SH index 0b27e4c44c17..5809fb04d80f 100644 --- a/print/pnm2ppa/files/ppafilter.SH +++ b/print/pnm2ppa/files/ppafilter.SH @@ -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 --git a/print/pnm2ppa/pkg-comment b/print/pnm2ppa/pkg-comment index 37ca750a6560..b171fdaea082 100644 --- a/print/pnm2ppa/pkg-comment +++ b/print/pnm2ppa/pkg-comment @@ -1 +1 @@ -Convert PBM images to PPA for some HP printers +Convert PNM images to PPA for some HP printers diff --git a/print/pnm2ppa/pkg-descr b/print/pnm2ppa/pkg-descr index 0fb5313b00b2..29e466ce6586 100644 --- a/print/pnm2ppa/pkg-descr +++ b/print/pnm2ppa/pkg-descr @@ -3,3 +3,5 @@ architecture) protocol. This protocol is used by some HP "Windows-only" 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 --git a/print/pnm2ppa/pkg-message b/print/pnm2ppa/pkg-message new file mode 100644 index 000000000000..aa1680cf304a --- /dev/null +++ b/print/pnm2ppa/pkg-message @@ -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 --git a/print/pnm2ppa/pkg-plist b/print/pnm2ppa/pkg-plist index cefab9ff6810..11e64a1d0a6a 100644 --- a/print/pnm2ppa/pkg-plist +++ b/print/pnm2ppa/pkg-plist @@ -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 |