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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
# New ports collection makefile for: omnetpp
# Date created: 29 October 2004
# Whom: bkoenig
#
# $FreeBSD$
#
PORTNAME= omnetpp
PORTVERSION= 3.3
PORTREVISION= 2
CATEGORIES= science
MASTER_SITES= http://www.omnetpp.org/download/release/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
EXTRACT_SUFX= .tgz
MAINTAINER= bkoenig@alpha-tierchen.de
COMMENT= A discrete event simulation environment
LIB_DEPENDS= BLT24:${PORTSDIR}/x11-toolkits/blt
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_GNOME= gnometarget libxml libxslt pkgconfig
USE_PERL5= yes
USE_TCL= yes
USE_TK= 84+
USE_LDCONFIG= yes
TCL_VER_NODOT= ${TCL_VER:S/.//}
TK_VER_NODOT= ${TK_VER:S/.//}
LIB_FILES= cmdenv envir nedxml sim_std tkenv
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
CONFIGUREUSER= ${WRKSRC}/configure.user
PKG_CONFIG?= ${LOCALBASE}/bin/pkg-config
PLIST= ${WRKDIR}/pkg-plist
INCLDIR= ${PREFIX}/include/${PORTNAME}
INCLDIR_REL= ${INCLDIR:S,^${PREFIX}/,,}
OPTIONS= MAGICK "Install ImageMagick for EPS-JPG conversion" ON \
GRAPHVIZ "Install Graphviz for generating diagrams" ON \
DOXYGEN "Install Doxygen to create the API reference" ON \
GIFTRANS "Make the background of diagrams transparent" ON
.include <bsd.port.pre.mk>
.if defined(WITH_MAGICK)
depend+= convert:${PORTSDIR}/graphics/ImageMagick
.endif
.if defined(WITH_GRAPHVIZ)
depend+= dot:${PORTSDIR}/graphics/graphviz
.endif
.if defined(WITH_DOXYGEN)
depend+= doxygen:${PORTSDIR}/devel/doxygen
.endif
.if defined(WITH_GIFTRANS)
depend+= giftrans:${PORTSDIR}/graphics/giftrans
.endif
BUILD_DEPENDS+= ${depend}
RUN_DEPENDS+= ${depend}
pre-configure:
@${REINPLACE_CMD} \
-e 's,-O2 -DNDEBUG=1,${CFLAGS} -fPIC,' \
-e 's,^#MSGC,MSGC,' \
${WRKSRC}/configure.user
@${ECHO} "CC=${CC}" >> ${CONFIGUREUSER}
@${ECHO} "CXX=${CXX}" >> ${CONFIGUREUSER}
@${ECHO} "OMNETPP_BITMAP_PATH=${DATADIR}/bitmaps" >> ${CONFIGUREUSER}
@${ECHO} "TK_CFLAGS=\"-I${LOCALBASE}/include -I${LOCALBASE}/include/tcl${TCL_VER} -I${LOCALBASE}/include/tk${TK_VER}\"" >> ${CONFIGUREUSER}
@${ECHO} "TK_LIBS=\"-L${LOCALBASE}/lib -L${LOCALBASE}/lib -lX11 -ltcl${TCL_VER_NODOT} -ltk${TK_VER_NODOT}\"" >> ${CONFIGUREUSER}
@${ECHO} "LIBXML_CFLAGS=\"`${PKG_CONFIG} --cflags libxml-2.0`\"" >> ${CONFIGUREUSER}
@${ECHO} "LIBXML_LIBS=\"`${PKG_CONFIG} --libs libxml-2.0`\"" >> ${CONFIGUREUSER}
@${ECHO} "WISH=wish${TK_VER}" >> ${CONFIGUREUSER}
pre-install:
@${CP} pkg-plist ${PLIST}
@(cd ${WRKSRC}; \
${FIND} -s include -type f | ${SED} "s,^include,${INCLDIR_REL}," >> ${PLIST}; \
${FIND} -s -d include -type d | ${SED} "s,^include,@dirrm ${INCLDIR_REL}," >> ${PLIST}; \
)
@(cd ${WRKSRC}; \
${FIND} -s bitmaps -type f | ${SED} "s,^,%%DATADIR%%/," >> ${PLIST}; \
${FIND} -s -d bitmaps -type d | ${SED} "s,^,@dirrm %%DATADIR%%/," >> ${PLIST} \
)
.if !defined(NOPORTDOCS)
@(cd ${WRKSRC}; \
${FIND} -s doc/ -type f | ${SED} "s,^doc/,%%DOCSDIR%%/," >> ${PLIST}; \
${FIND} -s -d doc/ -type d | ${SED} "s,^doc/,@dirrm %%DOCSDIR%%/," >> ${PLIST} \
)
.endif
@${ECHO} "%%DATADIR%%/neddoc.xsl" >> ${PLIST}
@${ECHO} "%%DATADIR%%/neddocproc.pl" >> ${PLIST}
@${ECHO} "@dirrm %%DATADIR%%" >> ${PLIST}
do-install:
@${MKDIR} ${DATADIR}
@${INSTALL_PROGRAM} ${WRKSRC}/bin/gned ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/bin/nedtool ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/bin/plove ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/bin/seedtool ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/bin/scalars ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKSRC}/bin/opp_* ${PREFIX}/bin
@${INSTALL_SCRIPT} ${WRKSRC}/bin/splitvec ${PREFIX}/bin
@${INSTALL_DATA} ${WRKSRC}/bin/neddoc.xsl ${DATADIR}
@${INSTALL_DATA} ${WRKSRC}/bin/neddocproc.pl ${DATADIR}
@${REINPLACE_CMD} -i '' \
-e 's,${WRKSRC}/bin,${PREFIX}/bin,' \
-e 's,${WRKSRC}/include,${INCLDIR},' \
-e 's,${WRKSRC}/lib,${PREFIX}/lib,' \
${PREFIX}/bin/opp_makemake
@${REINPLACE_CMD} -i '' \
-e 's,^\(.NEDDOC.* = "\).*/\(.*";\),\1${DATADIR}/\2,' \
${PREFIX}/bin/opp_neddoc
.for file in ${LIB_FILES}
@${INSTALL_DATA} ${WRKSRC}/lib/*.${PORTVERSION} ${PREFIX}/lib
@${LN} -s lib${file}.so.${PORTVERSION} ${PREFIX}/lib/lib${file}.so
.endfor
@(cd ${WRKSRC}/include;\
${FIND} . -type d -exec ${MKDIR} ${INCLDIR}/{} \; ;\
${FIND} . -type f | ${XARGS} -I% ${INSTALL_DATA} % ${INCLDIR}/% \
)
@(cd ${WRKSRC}/bitmaps;\
${FIND} . -type d -exec ${MKDIR} ${DATADIR}/bitmaps/{} \; ;\
${FIND} . -type f | ${XARGS} -I% ${INSTALL_DATA} % ${DATADIR}/bitmaps/% \
)
.if !defined(NOPORTDOCS)
@(cd ${WRKSRC}/doc;\
${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} \; ;\
${FIND} . -type f | ${XARGS} -I% ${INSTALL_DATA} % ${DOCSDIR}/% \
)
.endif
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
|