freebsd-ports/science/omnetpp/Makefile
Pav Lucistnik 601db664b0 Add omnetpp, a public-source, component-based, modular and open-architecture
simulation environment with strong GUI support and an embeddable simulation
kernel.  Its primary application area is the simulation of communication
networks and because of its generic and flexible architecture, it has been
successfully used in other areas like the simulation of IT systems, queueing
networks, hardware architectures and business processes as well.

PR:		ports/73920
Submitted by:	Bjoern Koenig <bkoenig@cs.tu-berlin.de>
2004-11-15 22:53:44 +00:00

106 lines
3.9 KiB
Makefile

# New ports collection makefile for: omnetpp
# Date created: 29 October 2004
# Whom: bkoenig
#
# $FreeBSD$
#
PORTNAME= omnetpp
PORTVERSION= 2.3p1
CATEGORIES= science
MASTER_SITES= http://www.omnetpp.org/download/release/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
EXTRACT_SUFX= .tgz
MAINTAINER= bkoenig@cs.tu-berlin.de
COMMENT= A discrete event simulation environment
USE_BISON= yes
TCL_VERSION?= tcl8.4
TK_VERSION?= tk8.4
TCL_NODOT= ${TCL_VERSION:S/.//}
TK_NODOT= ${TK_VERSION:S/.//}
LIB_DEPENDS= ${TCL_NODOT}:${PORTSDIR}/lang/${TCL_NODOT} \
${TK_NODOT}:${PORTSDIR}/x11-toolkits/${TK_NODOT} \
expat:${PORTSDIR}/textproc/expat2
.include <bsd.port.pre.mk>
COMPONENTS= libs progs
INSTALLS_SHLIB= yes
LDCONFIG_DIRS= %%PREFIX%%/lib/${PORTNAME}
USE_REINPLACE= yes
HAS_CONFIGURE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
CONFIGUREUSER= ${WRKSRC}/configure.user
post-extract:
@${REINPLACE_CMD} -e 's,<malloc.h>,<stdlib.h>,' \
${WRKSRC}/src/gned/ebnf.tab.cc ${WRKSRC}/src/gned/ebnf.y \
${WRKSRC}/src/nedc/ebnf.tab.c ${WRKSRC}/src/nedc/ebnf.y \
${WRKSRC}/src/nedxml/ned.tab.c ${WRKSRC}/src/nedxml/ned.y
pre-configure:
.if defined(CFLAGS)
@${REINPLACE_CMD} -e 's,-O3 -DNDEBUG=1,${CFLAGS},' ${WRKSRC}/configure.user
.endif
@${ECHO} "OMNETPP_ROOT=${PREFIX}" >> ${CONFIGUREUSER}
@${ECHO} "OMNETPP_GNED_DIR=${DATADIR}/gned" >> ${CONFIGUREUSER}
@${ECHO} "OMNETPP_TKENV_DIR=${DATADIR}/tkenv" >> ${CONFIGUREUSER}
@${ECHO} "OMNETPP_BITMAP_PATH=${DATADIR}/bitmaps" >> ${CONFIGUREUSER}
@${ECHO} "TK_CFLAGS=\"-I${X11BASE}/include -I${LOCALBASE}/include/tcl8.4 -I${LOCALBASE}/include/tk8.4\"" >> ${CONFIGUREUSER}
@${ECHO} "TK_LIBS=\"-L${X11BASE}/lib -L${LOCALBASE}/lib -lX11 -ltcl84 -ltk84\"" >> ${CONFIGUREUSER}
@${ECHO} "EXPAT_CFLAGS=\"-I${LOCALBASE}/include\"" >> ${CONFIGUREUSER}
@${ECHO} "EXPAT_LIBS=\"-L${LOCALBASE}/lib -lexpat\"" >> ${CONFIGUREUSER}
post-configure:
.if defined(COMPONENTS)
@${REINPLACE_CMD} -e 's,libs progs samples tutorials,${COMPONENTS},' \
${WRKSRC}/Makefile
.endif
do-install:
@${REINPLACE_CMD} -e 's,${WRKSRC}/include,${PREFIX}/include/${PORTNAME},' \
${WRKSRC}/bin/opp_makemake
@${REINPLACE_CMD} -e 's,${WRKSRC}/lib,${PREFIX}/lib/${PORTNAME},' \
${WRKSRC}/bin/opp_makemake
@${REINPLACE_CMD} -e 's,${WRKSRC}/doc,${DOCSDIR},' \
${WRKSRC}/bin/opp_makemake
@${REINPLACE_CMD} -e 's,${WRKSRC}/src,${DATADIR},' \
${WRKSRC}/bin/plove
@${MKDIR} ${PREFIX}/include/${PORTNAME} ${PREFIX}/lib/${PORTNAME} \
${DATADIR}/bitmaps ${DATADIR}/gned ${DATADIR}/plove ${DATADIR}/tkenv
@${RM} ${WRKSRC}/bin/opp_makemake.bak
@${INSTALL_PROGRAM} ${WRKSRC}/bin/gned ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/bin/nedc ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/bin/nedtool ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/bin/seedtool ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKSRC}/bin/opp_* ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKSRC}/bin/plove ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKSRC}/bin/splitvec ${PREFIX}/bin
@${INSTALL_DATA} ${WRKSRC}/bin/neddoc.xsl ${PREFIX}/bin
@${INSTALL_DATA} ${WRKSRC}/lib/*.${PORTVERSION} ${PREFIX}/lib/${PORTNAME}
@${LS} ${PREFIX}/lib/${PORTNAME} | ${SED} s/.${PORTVERSION}// | ${XARGS} -I% ${LN} -s %.${PORTVERSION} ${PREFIX}/lib/${PORTNAME}/%
@${INSTALL_DATA} ${WRKSRC}/bitmaps/* ${DATADIR}/bitmaps
@${INSTALL_DATA} ${WRKSRC}/include/*.h ${PREFIX}/include/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/include/doxy.cfg ${PREFIX}/include/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/src/gned/*.tcl ${DATADIR}/gned
@${INSTALL_DATA} ${WRKSRC}/src/plove/*.tcl ${DATADIR}/plove
@${INSTALL_DATA} ${WRKSRC}/src/plove/*.sh ${DATADIR}/plove
@${INSTALL_DATA} ${WRKSRC}/src/plove/demo.vec ${DATADIR}/plove
@${INSTALL_DATA} ${WRKSRC}/src/tkenv/*.tcl ${DATADIR}/tkenv
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${CP} -r ${WRKSRC}/doc/* ${DOCSDIR}
@${FIND} ${DOCSDIR} -type f | ${XARGS} ${CHMOD} 444
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>