Prune x11/xpra
[dports.git] / www / mimetex / Makefile
1 # Created by: Nicola Vitale <nivit@email.it>
2 # $FreeBSD$
3
4 PORTNAME=       mimetex
5 PORTVERSION=    20120331.1.74
6 CATEGORIES=     www math
7 MASTER_SITES=   LOCAL/nivit/${PORTNAME}/${PORTVERSION}/ \
8                 http://www.forkosh.com/
9 DISTNAME=       ${PORTNAME}
10 DIST_SUBDIR=    ${PORTNAME}/${PORTVERSION}
11
12 MAINTAINER=     nivit@FreeBSD.org
13 COMMENT=        CGI script that lets you embed LaTeX math in your HTML pages
14
15 LICENSE=        GPLv3
16
17 NO_WRKSUBDIR=   yes
18 USES=           zip
19
20 OPTIONS_DEFINE= ANTIALIASING DOCS STATIC
21 OPTIONS_DEFAULT=        ANTIALIASING
22 DESC_ANTIALIASING=      Use image format with anti-aliasing
23 DESC_STATIC=    Possible use of mimetex on another machine
24
25 PORTDOCS=       ${PORTNAME}.html
26
27 .include <bsd.port.options.mk>
28
29 # usefull if you run mimetex on another machine
30 .if ${PORT_OPTIONS:MSTATIC}
31 STATIC_MIMETEX= -static
32 .endif
33
34 # anti-aliasing no/yes
35 .if ${PORT_OPTIONS:MANTIALIASING}
36 IMAGES_TYPE=    -DAA
37 .else
38 IMAGES_TYPE=    -DGIF
39 .endif
40
41 # other options (see mimetex.c or online documentation)
42 # example: make install USER_OPTIONS='-DCACHEPATH=\"/tmp\" -DDISPLAYSIZE=10'
43 USER_OPTIONS?=
44
45 do-build:
46         cd ${WRKSRC};\
47         ${CC} ${CFLAGS} ${STATIC_MIMETEX} ${IMAGES_TYPE} ${USER_OPTIONS} mimetex.c gifsave.c -lm -o mimetex.cgi
48
49 do-install:
50         ${MKDIR} ${STAGEDIR}${WWWDIR}/cgi-bin
51         ${INSTALL_PROGRAM} ${WRKSRC}/mimetex.cgi ${STAGEDIR}${WWWDIR}/cgi-bin/mimetex.cgi
52 .if ${PORT_OPTIONS:MDOCS}
53         ${MKDIR} ${STAGEDIR}${DOCSDIR}
54         ${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}
55 .endif
56
57 .include <bsd.port.mk>