diff options
author | pi <pi@FreeBSD.org> | 2016-03-01 01:05:01 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2016-03-01 01:05:01 +0800 |
commit | b4cb5a51b694ff42b5cc0767b6f128a9bb43e9d4 (patch) | |
tree | c68525e886b5d306ea3295a69052caa0a914a8d5 /print | |
parent | 63134107b78fde9c0255ee0d1bc2ffe292d65c2e (diff) | |
download | freebsd-ports-gnome-b4cb5a51b694ff42b5cc0767b6f128a9bb43e9d4.tar.gz freebsd-ports-gnome-b4cb5a51b694ff42b5cc0767b6f128a9bb43e9d4.tar.zst freebsd-ports-gnome-b4cb5a51b694ff42b5cc0767b6f128a9bb43e9d4.zip |
Resurrect port: print/pnm2ppa
This software creates output using the PPA (printer performance
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://pnm2ppa.sourceforge.net/
PR: 207468
Submitted by: Miroslav Lachman <000.fbsd@quip.cz>
Diffstat (limited to 'print')
-rw-r--r-- | print/Makefile | 1 | ||||
-rw-r--r-- | print/pnm2ppa/Makefile | 49 | ||||
-rw-r--r-- | print/pnm2ppa/distinfo | 2 | ||||
-rw-r--r-- | print/pnm2ppa/files/asciippafilter.SH | 5 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-docs__en__pnm2ppa.1 | 45 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-pnm2ppa.conf | 29 | ||||
-rw-r--r-- | print/pnm2ppa/files/patch-text-en.h | 11 | ||||
-rw-r--r-- | print/pnm2ppa/files/ppafilter.SH | 4 | ||||
-rw-r--r-- | print/pnm2ppa/pkg-descr | 7 | ||||
-rw-r--r-- | print/pnm2ppa/pkg-message | 17 | ||||
-rw-r--r-- | print/pnm2ppa/pkg-plist | 6 |
11 files changed, 176 insertions, 0 deletions
diff --git a/print/Makefile b/print/Makefile index 3679b830b19b..b5a8c28d108e 100644 --- a/print/Makefile +++ b/print/Makefile @@ -185,6 +185,7 @@ SUBDIR += pkipplib SUBDIR += pkpgcounter SUBDIR += pmw + SUBDIR += pnm2ppa SUBDIR += poster SUBDIR += ps2eps SUBDIR += pscal diff --git a/print/pnm2ppa/Makefile b/print/pnm2ppa/Makefile new file mode 100644 index 000000000000..fd8a59847af3 --- /dev/null +++ b/print/pnm2ppa/Makefile @@ -0,0 +1,49 @@ +# Created by: smace@FreeBSD.org +# $FreeBSD$ + +PORTNAME= pnm2ppa +PORTVERSION= 1.13 +PORTREVISION= 2 +CATEGORIES= print +MASTER_SITES= SF + +MAINTAINER= 000.fbsd@quip.cz +COMMENT= Convert PNM images to PPA for some HP printers + +OPTIONS_DEFINE= A4SIZE +A4SIZE_DESC= Set A4 (not Letter) as a default paper size + +USES= gmake ghostscript:run +GNU_CONFIGURE= yes + +.include <bsd.port.pre.mk> + +.if defined(A4) || !empty(PORT_OPTIONS:MA4SIZE) +RUN_DEPENDS= enscript:${PORTSDIR}/print/enscript-a4 +.else +RUN_DEPENDS= enscript:${PORTSDIR}/print/enscript-letter +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|-Wformat-security -g|-Wformat-security| ; \ + s|-O2 -DNDEBUG|-DNDEBUG|' ${WRKSRC}/configure + @${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: + ${INSTALL_PROGRAM} ${WRKSRC}/calibrate_ppa ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/pnm2ppa ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/asciippafilter ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/ppafilter ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/pnm2ppa.1 ${STAGEDIR}${PREFIX}/man/man1 + ${INSTALL_DATA} ${WRKSRC}/pnm2ppa.conf.sample ${STAGEDIR}${PREFIX}/etc + +.include <bsd.port.post.mk> diff --git a/print/pnm2ppa/distinfo b/print/pnm2ppa/distinfo new file mode 100644 index 000000000000..39ce076af56d --- /dev/null +++ b/print/pnm2ppa/distinfo @@ -0,0 +1,2 @@ +SHA256 (pnm2ppa-1.13.tar.gz) = 1c50ea2c97b232f5bee6ac3fab408d64b6f1380f1e289ac278778a7e368e7379 +SIZE (pnm2ppa-1.13.tar.gz) = 291190 diff --git a/print/pnm2ppa/files/asciippafilter.SH b/print/pnm2ppa/files/asciippafilter.SH new file mode 100644 index 000000000000..56ac28287d7b --- /dev/null +++ b/print/pnm2ppa/files/asciippafilter.SH @@ -0,0 +1,5 @@ +#!/bin/sh + +%%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-docs__en__pnm2ppa.1 b/print/pnm2ppa/files/patch-docs__en__pnm2ppa.1 new file mode 100644 index 000000000000..0d4d7097ebee --- /dev/null +++ b/print/pnm2ppa/files/patch-docs__en__pnm2ppa.1 @@ -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-pnm2ppa.conf b/print/pnm2ppa/files/patch-pnm2ppa.conf new file mode 100644 index 000000000000..6539862efdf9 --- /dev/null +++ b/print/pnm2ppa/files/patch-pnm2ppa.conf @@ -0,0 +1,29 @@ +--- pnm2ppa.conf.orig Sun Nov 10 06:47:47 2002 ++++ pnm2ppa.conf Mon Nov 18 21:10:36 2002 +@@ -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. + # +@@ -44,7 +44,7 @@ + log_info 1 # <= COMMENT THIS OUT TO GET THE NEW DEFAULT BEHAVIOR! + + # Note: the "silent 1" and "log_info" keywords are only accepted from the +-# system configuration file (/etc/pnm2ppa.conf), and not from configuration ++# system configuration file (%%PREFIX%%/etc/pnm2ppa.conf), and not from configuration + # files specified by users with the pnm2ppa option "-f". + + #---------set the margins of the printed page------------------- +@@ -123,7 +123,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-text-en.h b/print/pnm2ppa/files/patch-text-en.h new file mode 100644 index 000000000000..be35fe31b918 --- /dev/null +++ b/print/pnm2ppa/files/patch-text-en.h @@ -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 " SYSCONFDIR "/pnm2ppa.conf\n", + + /* 26 */ "couldn't open config file \n", + diff --git a/print/pnm2ppa/files/ppafilter.SH b/print/pnm2ppa/files/ppafilter.SH new file mode 100644 index 000000000000..5809fb04d80f --- /dev/null +++ b/print/pnm2ppa/files/ppafilter.SH @@ -0,0 +1,4 @@ +#!/bin/sh + +%%LOCALBASE%%/bin/gs -sDEVICE=ppmraw -q -dNOPAUSE -r600 -sOutputFile=- - | \ +%%PREFIX%%/bin/pnm2ppa -i - -o - diff --git a/print/pnm2ppa/pkg-descr b/print/pnm2ppa/pkg-descr new file mode 100644 index 000000000000..0543d41a6165 --- /dev/null +++ b/print/pnm2ppa/pkg-descr @@ -0,0 +1,7 @@ +This software creates output using the PPA (printer performance +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://pnm2ppa.sourceforge.net/ diff --git a/print/pnm2ppa/pkg-message b/print/pnm2ppa/pkg-message new file mode 100644 index 000000000000..744c5cc990eb --- /dev/null +++ b/print/pnm2ppa/pkg-message @@ -0,0 +1,17 @@ +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:" diff --git a/print/pnm2ppa/pkg-plist b/print/pnm2ppa/pkg-plist new file mode 100644 index 000000000000..e9d9607007b3 --- /dev/null +++ b/print/pnm2ppa/pkg-plist @@ -0,0 +1,6 @@ +bin/asciippafilter +bin/calibrate_ppa +bin/pnm2ppa +bin/ppafilter +@sample etc/pnm2ppa.conf.sample +man/man1/pnm2ppa.1.gz |