aboutsummaryrefslogtreecommitdiffstats
path: root/science/omnetpp
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-01-29 21:39:20 +0800
committerpav <pav@FreeBSD.org>2005-01-29 21:39:20 +0800
commitd95840151fc6673b2926b49aef86c75b1251df5b (patch)
tree592feeace071dbe3c0e1732415fb6830f7fb3492 /science/omnetpp
parent1c38ee8840ac4b847cee4ba1d9f1736e3ca46a73 (diff)
downloadfreebsd-ports-graphics-d95840151fc6673b2926b49aef86c75b1251df5b.tar.gz
freebsd-ports-graphics-d95840151fc6673b2926b49aef86c75b1251df5b.tar.zst
freebsd-ports-graphics-d95840151fc6673b2926b49aef86c75b1251df5b.zip
- Bugfixes
- Shared libraries moved from ${PREFIX}/lib/${PORTNAME} to ${PREFIX}/lib PR: ports/76717 Submitted by: Bjorn Konig <bkoenig@cs.tu-berlin.de> (maintainer)
Diffstat (limited to 'science/omnetpp')
-rw-r--r--science/omnetpp/Makefile20
-rw-r--r--science/omnetpp/files/patch-src-plove76
-rw-r--r--science/omnetpp/files/patch-src-sim-cstat.cc65
-rw-r--r--science/omnetpp/files/patch-src-utils-opp_makemake.in11
-rw-r--r--science/omnetpp/pkg-plist21
5 files changed, 175 insertions, 18 deletions
diff --git a/science/omnetpp/Makefile b/science/omnetpp/Makefile
index e4644a205eb..584970e53b1 100644
--- a/science/omnetpp/Makefile
+++ b/science/omnetpp/Makefile
@@ -7,6 +7,7 @@
PORTNAME= omnetpp
PORTVERSION= 2.3p1
+PORTREVISION= 1
CATEGORIES= science
MASTER_SITES= http://www.omnetpp.org/download/release/
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
@@ -32,10 +33,11 @@ LIB_DEPENDS= ${TCL_NODOT}:${PORTSDIR}/lang/${TCL_NODOT} \
COMPONENTS= libs progs
INSTALLS_SHLIB= yes
-LDCONFIG_DIRS= %%PREFIX%%/lib/${PORTNAME}
USE_REINPLACE= yes
HAS_CONFIGURE= yes
+LIB_FILES= cmdenv envir nedxml sim_std tkenv
+
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
CONFIGUREUSER= ${WRKSRC}/configure.user
@@ -51,12 +53,14 @@ pre-configure:
.endif
@${ECHO} "OMNETPP_ROOT=${PREFIX}" >> ${CONFIGUREUSER}
@${ECHO} "OMNETPP_GNED_DIR=${DATADIR}/gned" >> ${CONFIGUREUSER}
+ @${ECHO} "OMNETPP_PLOVE_DIR=${DATADIR}/plove" >> ${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} "TK_CFLAGS=\"-I${X11BASE}/include -I${LOCALBASE}/include/${TCL_VERSION} -I${LOCALBASE}/include/${TK_VERSION}\"" >> ${CONFIGUREUSER}
+ @${ECHO} "TK_LIBS=\"-L${X11BASE}/lib -L${LOCALBASE}/lib -lX11 -l${TCL_NODOT} -l${TK_NODOT}\"" >> ${CONFIGUREUSER}
@${ECHO} "EXPAT_CFLAGS=\"-I${LOCALBASE}/include\"" >> ${CONFIGUREUSER}
@${ECHO} "EXPAT_LIBS=\"-L${LOCALBASE}/lib -lexpat\"" >> ${CONFIGUREUSER}
+ @${ECHO} "WISH=wish${TK_VERSION}" | ${SED} 's,tk,,' >> ${CONFIGUREUSER}
post-configure:
.if defined(COMPONENTS)
@@ -67,13 +71,13 @@ post-configure:
do-install:
@${REINPLACE_CMD} -e 's,${WRKSRC}/include,${PREFIX}/include/${PORTNAME},' \
${WRKSRC}/bin/opp_makemake
- @${REINPLACE_CMD} -e 's,${WRKSRC}/lib,${PREFIX}/lib/${PORTNAME},' \
+ @${REINPLACE_CMD} -e 's,${WRKSRC}/lib,${PREFIX}/lib,' \
${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} \
+ @${MKDIR} ${PREFIX}/include/${PORTNAME} \
${DATADIR}/bitmaps ${DATADIR}/gned ${DATADIR}/plove ${DATADIR}/tkenv
@${RM} ${WRKSRC}/bin/opp_makemake.bak
@${INSTALL_PROGRAM} ${WRKSRC}/bin/gned ${PREFIX}/bin
@@ -84,8 +88,10 @@ do-install:
@${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}/%
+.for file in ${LIB_FILES}
+ @${INSTALL_DATA} ${WRKSRC}/lib/*.${PORTVERSION} ${PREFIX}/lib
+ @${LS} ${PREFIX}/lib/lib${file}.so.${PORTVERSION} | ${SED} s/.${PORTVERSION}// | ${XARGS} -I% ${LN} -s %.${PORTVERSION} %
+.endfor
@${INSTALL_DATA} ${WRKSRC}/bitmaps/* ${DATADIR}/bitmaps
@${INSTALL_DATA} ${WRKSRC}/include/*.h ${PREFIX}/include/${PORTNAME}
@${INSTALL_DATA} ${WRKSRC}/include/doxy.cfg ${PREFIX}/include/${PORTNAME}
diff --git a/science/omnetpp/files/patch-src-plove b/science/omnetpp/files/patch-src-plove
new file mode 100644
index 00000000000..e3a0191ec19
--- /dev/null
+++ b/science/omnetpp/files/patch-src-plove
@@ -0,0 +1,76 @@
+--- src/plove/Makefile.in.bak Mon Jan 24 02:21:32 2005
++++ src/plove/Makefile.in Mon Jan 24 02:24:52 2005
+@@ -39,7 +39,12 @@
+ @echo '' # NOP to prevent automatic rules from firing
+
+ plove-sh:
+- echo "$(WISH) -f $(OMNETPP_PLOVE_DIR)/plove.sh "'$$*' > plove
++ echo "#!/bin/sh" > plove
++ echo "if [ -z \`which gnuplot\` ]; then" >> plove
++ echo " echo \"You have to install math/gnuplot in order to use plove.\"" >> plove
++ echo "else" >> plove
++ echo " $(WISH) -f $(OMNETPP_PLOVE_DIR)/plove.sh "'$$*' >> plove
++ echo "fi" >> plove
+ chmod +x plove
+
+ plove-cyg:
+--- src/plove/config.tcl Sat Jan 11 12:07:54 2003
++++ src/plove/config.tcl Wed Dec 15 15:57:23 2004
+@@ -128,7 +128,7 @@
+ -text "my gnuplot prefers filenames with fwd slashes"
+ }
+ label-entry .ize.f.f1.awk "awk:" $config(awk)
+- label-entry .ize.f.f1.mknod "mknod:" $config(mknod)
++ label-entry .ize.f.f1.mkfifo "mkfifo:" $config(mkfifo)
+ label-entry .ize.f.f1.sh "sh:" $config(sh)
+ label-entry .ize.f.f1.tmp "tmp:" $config(tmp)
+
+@@ -140,7 +140,7 @@
+ pack .ize.f.f1.slash -expand 0 -fill x -side top
+ }
+ pack .ize.f.f1.awk -expand 0 -fill x -side top
+- pack .ize.f.f1.mknod -expand 0 -fill x -side top
++ pack .ize.f.f1.mkfifo -expand 0 -fill x -side top
+ pack .ize.f.f1.sh -expand 0 -fill x -side top
+ pack .ize.f.f1.tmp -expand 0 -fill x -side top
+
+@@ -155,7 +155,7 @@
+ set config(gp-slash) $tmp(gp-slash)
+ }
+ set config(awk) [.ize.f.f1.awk.e get]
+- set config(mknod) [.ize.f.f1.mknod.e get]
++ set config(mkfifo) [.ize.f.f1.mkfifo.e get]
+ set config(sh) [.ize.f.f1.sh.e get]
+ set config(tmp) [.ize.f.f1.tmp.e get]
+ }
+--- src/plove/doplot.tcl Sat Jan 11 12:07:54 2003
++++ src/plove/doplot.tcl Wed Dec 15 15:57:57 2004
+@@ -335,7 +335,7 @@
+ -message "Cannot create named pipe $pipe, file name already exists!"
+ }
+ } else {
+- if [catch {exec $config(mknod) $pipe p} errmsg] {
++ if [catch {exec $config(mkfifo) $pipe} errmsg] {
+ tk_messageBox -icon warning -type ok -title Warning \
+ -message "Cannot create named pipe $pipe: $errmsg"
+ }
+@@ -511,7 +511,7 @@
+ # pipes
+ set pipecmd ""
+ foreach id $idlist {
+- append pipecmd "rm -f $pipebasefname-$id; mknod $pipebasefname-$id p\n"
++ append pipecmd "rm -f $pipebasefname-$id; mkfifo $pipebasefname-$id\n"
+ }
+
+ # grep and filter commands
+--- src/plove/main.tcl Sun Jan 19 10:17:00 2003
++++ src/plove/main.tcl Wed Dec 15 15:58:12 2004
+@@ -45,7 +45,7 @@
+ set config(zcat) "zcat"
+ set config(gnuplot) "gnuplot"
+ set config(awk) "awk"
+-set config(mknod) "mknod"
++set config(mkfifo) "mkfifo"
+ set config(sh) "sh"
+ set config(gp-slash) "1" ;# use slash (not backslash) in filenames in gnuplot scripts (WIN32)
+
diff --git a/science/omnetpp/files/patch-src-sim-cstat.cc b/science/omnetpp/files/patch-src-sim-cstat.cc
new file mode 100644
index 00000000000..554ed4def7d
--- /dev/null
+++ b/science/omnetpp/files/patch-src-sim-cstat.cc
@@ -0,0 +1,65 @@
+--- src/sim/cstat.cc 2003-06-25 17:38:24.000000000 +0200
++++ src/sim/cstat.cc 2004-11-19 12:23:03.000000000 +0100
+@@ -252,8 +252,31 @@
+
+ void cWeightedStdDev::collect2(double val, double weight)
+ {
+- cStdDev::collect(weight*val);
++ // Lars Westerhoff: collect weight*val*val for sqrsum_samples for variance
++
++ if (++num_samples <= 0)
++ {
++ // FIXME: num_samples overflow: issue warning and must stop collecting!
++ ev.printf("\a\nWARNING: (%s)%s: observation count overflow!\n\n",className(),fullPath());
++ }
++ sum_samples+=weight*val;
++ sqrsum_samples+=weight*val*val;
+ sum_weights += weight;
++
++ if (num_samples>1)
++ {
++ if (val<min_samples)
++ min_samples=val;
++ else if (val>max_samples)
++ max_samples=val;
++ }
++ else
++ {
++ min_samples=max_samples=val;
++ }
++
++ if (transientDetectionObject()) td->collect(val); //NL
++ if (accuracyDetectionObject()) ra->collect(val); //NL
+ }
+
+ void cWeightedStdDev::clearResult()
+@@ -264,18 +287,18 @@
+
+ double cWeightedStdDev::variance() const
+ {
+- throw new cException(this, "variance()/stddev() not implemented");
++ // Lars Westerhoff
+
+- // if (sum_weights==0)
+- // return 0.0;
+- // else
+- // {
+- // double devsqr = (sqrsum_samples - sum_samples*sum_samples/sum_weights)/(sum_weights-1);
+- // if (devsqr<=0)
+- // return 0.0;
+- // else
+- // return devsqr;
+- //}
++ if (sum_weights==0)
++ return 0.0;
++ else
++ {
++ double devsqr = (sqrsum_samples - sum_samples*sum_samples/sum_weights)/(sum_weights); // sum_weights-1 ???
++ if (devsqr<=0)
++ return 0.0;
++ else
++ return devsqr;
++ }
+ }
+
+ void cWeightedStdDev::saveToFile(FILE *f) const
diff --git a/science/omnetpp/files/patch-src-utils-opp_makemake.in b/science/omnetpp/files/patch-src-utils-opp_makemake.in
new file mode 100644
index 00000000000..f5bda0876de
--- /dev/null
+++ b/science/omnetpp/files/patch-src-utils-opp_makemake.in
@@ -0,0 +1,11 @@
+--- src/utils/opp_makemake.in Sun Jan 23 22:29:17 2005
++++ src/utils/opp_makemake.in Sun Jan 23 22:29:44 2005
+@@ -94,7 +94,7 @@
+
+ -u | --userinterface)
+ shift
+- userif=`echo $1 | tr [a-z] [A-Z]`
++ userif=`echo $1 | tr '[[:lower:]]' '[[:upper:]]'`
+ case "$userif" in
+ CMDENV | TKENV)
+ ;;
diff --git a/science/omnetpp/pkg-plist b/science/omnetpp/pkg-plist
index 3624f53045d..deafc92f945 100644
--- a/science/omnetpp/pkg-plist
+++ b/science/omnetpp/pkg-plist
@@ -55,16 +55,16 @@ include/omnetpp/onstartup.h
include/omnetpp/protocol.h
include/omnetpp/random.h
include/omnetpp/util.h
-lib/omnetpp/libcmdenv.so
-lib/omnetpp/libcmdenv.so.2.3p1
-lib/omnetpp/libenvir.so
-lib/omnetpp/libenvir.so.2.3p1
-lib/omnetpp/libnedxml.so
-lib/omnetpp/libnedxml.so.2.3p1
-lib/omnetpp/libsim_std.so
-lib/omnetpp/libsim_std.so.2.3p1
-lib/omnetpp/libtkenv.so
-lib/omnetpp/libtkenv.so.2.3p1
+lib/libcmdenv.so
+lib/libcmdenv.so.2.3p1
+lib/libenvir.so
+lib/libenvir.so.2.3p1
+lib/libnedxml.so
+lib/libnedxml.so.2.3p1
+lib/libsim_std.so
+lib/libsim_std.so.2.3p1
+lib/libtkenv.so
+lib/libtkenv.so.2.3p1
%%DATADIR%%/bitmaps/README
%%DATADIR%%/bitmaps/app.gif
%%DATADIR%%/bitmaps/ball.gif
@@ -892,7 +892,6 @@ lib/omnetpp/libtkenv.so.2.3p1
%%PORTDOCS%%@dirrm %%DOCSDIR%%/api
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm include/omnetpp
-@dirrm lib/omnetpp
@dirrm %%DATADIR%%/tkenv
@dirrm %%DATADIR%%/bitmaps
@dirrm %%DATADIR%%/plove