Tweak print/pdf4tcl version 0.8
[dports.git] / print / muttprint / Makefile
1 # Created by: Oliver Braun <obraun@informatik.unibw-muenchen.de>
2 # $FreeBSD$
3
4 PORTNAME=       muttprint
5 PORTVERSION=    0.73
6 PORTREVISION=   1
7 CATEGORIES=     print mail
8 MASTER_SITES=   SF/muttprint/muttprint/muttprint-${PORTVERSION}
9
10 MAINTAINER=     guru@unixarea.de
11 COMMENT=        Utility to print mail for most any mail client
12
13 LICENSE=        GPLv2
14
15 BUILD_DEPENDS=  docbook2pdf:textproc/docbook-utils \
16                 docbook-sgml>0:textproc/docbook-sgml
17 RUN_DEPENDS=    psnup:print/psutils \
18                 uncompface:mail/faces \
19                 p5-TimeDate>=0:devel/p5-TimeDate \
20                 p5-Text-Iconv>=0:converters/p5-Text-Iconv
21
22 GNU_CONFIGURE=  yes
23 USES=           autoreconf gmake perl5
24 USE_TEX=        latex dvipsk
25
26 NO_BUILD=       yes
27 REINPLACE_ARGS= -i ""
28
29 OPTIONS_DEFINE=         CUPS X11
30 OPTIONS_DEFAULT=        X11
31 X11_DESC=               graphics/ImageMagick[-nox11] dependency
32
33 CUPS_RUN_DEPENDS=       lpr-cups:print/cups
34
35 .if !defined(PAPERSIZE)
36 PAPERSIZE=      letter
37 .endif
38
39 .include <bsd.port.options.mk>
40
41 .if ${PORT_OPTIONS:MCUPS}
42 PRINT_COMMAND=CUPS
43 .else
44 PRINT_COMMAND=lpr -P$$PRINTER
45 .endif
46
47 .if ${PORT_OPTIONS:MX11}
48 RUN_DEPENDS+=   convert:graphics/ImageMagick
49 .else
50 RUN_DEPENDS+=   convert:graphics/ImageMagick-nox11
51 .endif
52
53 pre-everything::
54         @${ECHO}
55         @${ECHO} Set PAPERSIZE=a4 if you need that paper size.
56         @${ECHO}
57
58 post-patch:
59         @${RM} ${WRKSRC}/pics/*.orig
60 .if ${PAPERSIZE}==a4
61         @${REINPLACE_CMD} 's|%%PAPERSIZE%%|${PAPERSIZE:tu}|' \
62                 ${WRKSRC}/muttprint
63 .else
64         @${REINPLACE_CMD} 's|%%PAPERSIZE%%|${PAPERSIZE}|' \
65                 ${WRKSRC}/muttprint
66 .endif
67         @${REINPLACE_CMD} 's|%%PRINT_COMMAND%%|${PRINT_COMMAND}| ; \
68                 s|%%PREFIX%%|${PREFIX}|' \
69                 ${WRKSRC}/muttprint
70 .if ${PORT_OPTIONS:MCUPS}
71         @${REINPLACE_CMD} 's|lpr $$CUPS_OPTIONS|${PREFIX}/bin/lpr $$CUPS_OPTIONS|' ${WRKSRC}/muttprint
72 .endif
73
74 .include <bsd.port.mk>