summaryrefslogtreecommitdiff
path: root/print/muttprint/Makefile
diff options
context:
space:
mode:
authorOliver Braun <obraun@FreeBSD.org>2003-08-06 19:27:25 +0000
committerOliver Braun <obraun@FreeBSD.org>2003-08-06 19:27:25 +0000
commitb653323da3e93c14fa926852e5206f7ba6e0b156 (patch)
tree757bd2fbe7145332b24b52447e4bd96b47b76af7 /print/muttprint/Makefile
parentUpdate to DAT 4283 (diff)
* Set papersize in muttprint.
* Add a 'WITH_CUPS' knob to have muttprint use CUPS by default. * Look for global conffile under ${PREFIX}/etc/ * Make portlint happy: use DOCSDIR and SITE_PERL PR: ports/55317 Submitted by: Glenn Johnson <gjohnson@srrc.ars.usda.gov>
Notes
Notes: svn path=/head/; revision=86398
Diffstat (limited to 'print/muttprint/Makefile')
-rw-r--r--print/muttprint/Makefile33
1 files changed, 31 insertions, 2 deletions
diff --git a/print/muttprint/Makefile b/print/muttprint/Makefile
index 73c9f3876609..247933d62f57 100644
--- a/print/muttprint/Makefile
+++ b/print/muttprint/Makefile
@@ -22,8 +22,12 @@ RUN_DEPENDS= latex:${PORTSDIR}/print/teTeX \
psnup:${PORTSDIR}/print/psutils-${PAPERSIZE} \
uncompface:${PORTSDIR}/mail/faces \
convert:${PORTSDIR}/graphics/ImageMagick \
- ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Date/Parse.pm:${PORTSDIR}/devel/p5-TimeDate \
- ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp
+ ${SITE_PERL}/Date/Parse.pm:${PORTSDIR}/devel/p5-TimeDate \
+ ${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp
+.if defined(WITH_CUPS)
+RUN_DEPENDS+= cupstestppd:${PORTSDIR}/print/cups-lpr \
+ espgs:${PORTSDIR}/print/cups-pstoraster
+.endif
USE_REINPLACE= yes
REINPLACE_ARGS= -i ""
@@ -33,10 +37,22 @@ ALL_TARGET= nothing
MAN1= muttprint.1
MANCOMPRESSED= yes
+.if defined(WITH_CUPS)
+PRINT_COMMAND=CUPS
+.else
+PRINT_COMMAND=lpr -P$$PRINTER
+.endif
+
.if !defined(NOPORTDOCS)
INSTALL_TARGET=install-with-doc
.endif
+pre-everything::
+ @${ECHO}
+ @${ECHO} Set PAPERSIZE=A4 if you need that paper size.
+ @${ECHO} Set WITH_CUPS=yes if you want to use CUPS.
+ @${ECHO}
+
post-patch:
@${RM} -f ${WRKSRC}/pics/*.orig
@${GUNZIP_CMD} ${WRKSRC}/doc/manpages/*/muttprint.1.gz
@@ -47,6 +63,19 @@ post-patch:
s|/usr/lib|${PREFIX}/lib|g' \
${WRKSRC}/doc/manpages/*/muttprint.1 \
${WRKSRC}/doc/manual/*/manual-*/*.html
+.if ${PAPERSIZE}==a4
+ @${REINPLACE_CMD} 's|%%PAPERSIZE%%|${PAPERSIZE:U}|' \
+ ${WRKSRC}/muttprint
+.else
+ @${REINPLACE_CMD} 's|%%PAPERSIZE%%|${PAPERSIZE}|' \
+ ${WRKSRC}/muttprint
+.endif
+ @${REINPLACE_CMD} 's|%%PRINT_COMMAND%%|${PRINT_COMMAND}| ; \
+ s|%%PREFIX%%|${PREFIX}|' \
+ ${WRKSRC}/muttprint
+.if defined(WITH_CUPS)
+ @${REINPLACE_CMD} 's|lpr $$CUPS_OPTIONS|${PREFIX}/bin/lpr $$CUPS_OPTIONS|' ${WRKSRC}/muttprint
+.endif
@${GZIP_CMD} ${WRKSRC}/doc/manpages/*/muttprint.1
.include <bsd.port.mk>