aboutsummaryrefslogtreecommitdiffstats
path: root/cad/mars/Makefile
blob: 913cef80bff0133e745e3c8b94ceea0f3de4b5e0 (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
# Created by: David O'Brien <obrien@cs.ucdavis.edu>
# $FreeBSD$

PORTNAME=   mars
PORTVERSION=    2.1
PORTREVISION=   3
CATEGORIES= cad
MASTER_SITES=   ftp://ftp.cs.umd.edu/pub/sdag/MaRS/
DISTNAME=   MaRS-${PORTVERSION}
.if !defined(NOPORTDOCS)
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} MaRS-2-doc${EXTRACT_SUFX}
.endif
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= gahr@FreeBSD.org
COMMENT=    Maryland Routing Simulator

OPTIONS_DEFINE= X11
OPTIONS_DEFAULT=X11

MAKE_JOBS_UNSAFE=   yes
NO_WRKSUBDIR=   yes

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MX11}
USES+=      motif
MAKEFILE=   Makefile.XMotif
.else
MAKEFILE=   Makefile.NoX
.endif
ALL_TARGET= depend mars
MAN1=       mars.1

post-configure:
    @${REINPLACE_CMD} -e 's/INFINITY/MARS_INFINITY/g' \
        ${WRKSRC}/include/route.h \
        ${WRKSRC}/comps/exBF.c \
        ${WRKSRC}/comps/exBF_ack.c \
        ${WRKSRC}/comps/route.c \
        ${WRKSRC}/comps/segal.c \
        ${WRKSRC}/comps/spf.c

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/mars ${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/man/man1/mars.1 ${PREFIX}/man/man1
.if !defined(NOPORTDOCS)
    @${MKDIR} ${PREFIX}/share/doc/mars
    @${CHMOD} a+rx ${PREFIX}/share/doc/mars
    @(cd ${PREFIX}/share/doc ; \
        ${TAR} xfpz /${DISTDIR}/MaRS-2-doc${EXTRACT_SUFX} ; \
        [ -d mars ] && ${RM} -rf mars; \
        ${MV} doc mars )
.endif

.include <bsd.port.mk>