aboutsummaryrefslogtreecommitdiffstats
path: root/net/ns/Makefile
blob: 9d6c3ec295fc04d22a56e72f2d082f3cb4b92035 (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
# Created by: Oscar Bonilla <obonilla@fisicc-ufm.edu>
# $FreeBSD$

PORTNAME=   ns
PORTVERSION=    2.35
CATEGORIES= net
MASTER_SITES=   SF/${PORTNAME}nam/${PORTNAME}-2/${PORTVERSION}
DISTNAME=   ${PORTNAME}-src-${PORTVERSION}

MAINTAINER= masaki@club.kyutech.ac.jp
COMMENT=    Discrete event simulator for networking research

BUILD_DEPENDS=  ${LOCALBASE}/lib/libtclcl.a:${PORTSDIR}/devel/tclcl

USES=       gmake tk:85+
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-tcl-ver=${TCL_VER} \
        --with-tk-ver=${TK_VER} \
        --x-libraries=${LOCALBASE}/lib \
        --x-includes=${LOCALBASE}/include

WRKSRC=     ${WRKDIR}/ns-${PORTVERSION}

OPTIONS_DEFINE= EXAMPLES

.include <bsd.port.options.mk>

post-patch:
    @${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE},g" \
        ${WRKSRC}/configure
    @${REINPLACE_CMD} -e "s,Tcl_GetHashKey,static_cast<char*>&," \
        ${WRKSRC}/pushback/ident-tree.h \
        ${WRKSRC}/webcache/pagepool.cc
    @${REINPLACE_CMD} -e "/^CFLAGS =/s,$$, -DUSE_INTERP_RESULT," \
        ${WRKSRC}/indep-utils/webtrace-conv/dec/Makefile.in \
        ${WRKSRC}/indep-utils/webtrace-conv/epa/Makefile.in \
        ${WRKSRC}/indep-utils/webtrace-conv/nlanr/Makefile.in \
        ${WRKSRC}/indep-utils/webtrace-conv/ucb/Makefile.in

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/ns ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_MAN} ${WRKSRC}/ns.1 ${STAGEDIR}${PREFIX}/man/man1
.if ${PORT_OPTIONS:MEXAMPLES}
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/tcl/ex/*.tcl ${STAGEDIR}${EXAMPLESDIR}
.endif

.include <bsd.port.mk>