aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/Ebnf2ps/Makefile
blob: 6da72ded7be768f63fbdb18aa6204b2a2038d8ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# New ports collection makefile for:    Ebnf2ps
# Date created:             Nov 27, 2003
# Whom:                 Bruce M Simpson <bms@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   Ebnf2ps
PORTVERSION=    1.05
PORTREVISION=   1
CATEGORIES= textproc devel
MASTER_SITES=   http://www.informatik.uni-freiburg.de/~thiemann/haskell/ebnf2ps/
DISTNAME=   ebnf2ps-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Generate EPS/FIG diagrams from EBNF/yacc/bison grammars

BUILD_DEPENDS=  ghc:${PORTSDIR}/lang/ghc

WRKSRC=     ${WRKDIR}/${PORTNAME}
USE_GMAKE=  yes
USE_XLIB=   yes
USE_SUBMAKE=    yes

MAKE_ENV+=  X11BASE=${X11BASE}
.if defined(AFMPATH)
MAKE_ENV+=  AFMPATH=${AFMPATH}
.endif

EXAMPLES=   ebnf.BNF examples.ps gofer.BNF regular.BNF

.if !defined(NOPORTDOCS)
DOC_EPS=    Atom.eps Atom_unfold.eps Character.eps Export.eps \
        ExtAtom.eps Factor.eps File.eps Nonterminal.eps \
        Production.eps Production_unfold.eps RAtom.eps \
        RAtom_unfold.eps RExtAtom.eps RFactor.eps Regexp.eps \
        String.eps Term.eps
.endif

do-configure:
    @( cd ${WRKSRC}/src && ${MAKE} ${MAKE_ENV} afmpath.h && \
        ${MAKE} ${MAKE_ENV} rgbpath.h )

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin
    ${MKDIR} ${EXAMPLESDIR}
.for example in ${EXAMPLES}
    ${INSTALL_DATA} ${WRKSRC}/examples/${example} ${EXAMPLESDIR}
.endfor
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_MAN} ${WRKSRC}/doc/doc.ps ${DOCSDIR}
    ${INSTALL_MAN} ${WRKSRC}/doc/doc.tex ${DOCSDIR}
.for eps in ${DOC_EPS}
    ${INSTALL_MAN} ${WRKSRC}/doc/${eps} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>