- Fix build for 9 and above

- Add USE_PERL5_RUN
- Support CFLAGS properly
- Support PORTDOCS/PORTEXAMPLES/PLIST_FILES

PR:		168021
Submitted by:	Ports Fury
This commit is contained in:
Martin Wilke 2012-05-21 03:10:02 +00:00
parent 99bae5eaf7
commit 90c22c44a4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=297071
5 changed files with 44 additions and 44 deletions

View File

@ -7,40 +7,51 @@
PORTNAME= dbs
PORTVERSION= 1.1.5
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= benchmarks
MASTER_SITES= http://www.kusa.ac.jp/~yukio-m/dbs/software1.1.5/ \
${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= jkoshy
LOCAL/jkoshy
MAINTAINER= ports@FreeBSD.org
COMMENT= A distributed network benchmarking system
RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot
DOCDIR= ${PREFIX}/share/doc/dbs/
DOCS= dbs.man dbs.man.jis dbs_paper.ps Copyright
EXDIR= ${PREFIX}/share/examples/dbs/
EXS= TCP2.cmd TCPvsMPEG.cmd
BUILD_WRKSRC= ${WRKSRC}/obj/${OPSYS}
INSTALL_WRKSRC= ${WRKSRC}/obj/${OPSYS}
.include <bsd.port.pre.mk>
USE_PERL5_RUN= yes
MAKEFILE= makefile
.if ${OSVERSION} >= 900000
BROKEN= does not compile on FreeBSD 9.X
.endif
PORTDOCS= *
PORTEXAMPLES= *
PLIST_FILES= bin/dbs_view bin/dbsc bin/dbsd
do-build:
post-patch:
@${REINPLACE_CMD} -e \
's|/usr/local/bin/perl|${PERL}|' ${WRKSRC}/script/dbs_view
pre-build:
cd ${WRKSRC}/src; ${MAKE} dir
cd ${WRKSRC}/obj/${OPSYS}; ${MAKE} ${ALL_TARGET} PREFIX=${PREFIX}
do-install:
cd ${WRKSRC}/obj/${OPSYS}; ${MAKE} ${INSTALL_TARGET} PREFIX=${PREFIX}
${STRIP_CMD} ${PREFIX}/bin/dbsc ${PREFIX}/bin/dbsd
${MKDIR} ${EXDIR}
cd ${WRKSRC}/sample; ${CP} -p ${EXS} ${EXDIR}
.for bin in dbsc dbsd
cd ${INSTALL_WRKSRC}; ${INSTALL_PROGRAM} ${bin} ${PREFIX}/bin
.endfor
.for bin in dbs_view
cd ${WRKSRC}/script; ${INSTALL_SCRIPT} ${bin} ${PREFIX}/bin
.endfor
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCDIR}
cd ${WRKSRC}/doc; ${CP} -p ${DOCS} ${DOCDIR}
@${MKDIR} ${DOCSDIR}
.for doc in Copyright dbs.man dbs.man.jis dbs_paper.ps
cd ${WRKSRC}/doc; ${INSTALL_DATA} ${doc} ${DOCSDIR}
.endfor
.endif
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
.for ex in TCP2.cmd TCPvsMPEG.cmd
cd ${WRKSRC}/sample; ${INSTALL_DATA} ${ex} ${EXAMPLESDIR}
.endfor
.endif
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -9,7 +9,7 @@
#CC =gcc
-CFLAGS =-O
+CFLAGS =-O -DHAVE_SYS_PARAM_H
+CFLAGS +=-DHAVE_SYS_PARAM_H
#CFLAGS =-g # debug
#CFLAGS =-g -DDEBUGMODE

View File

@ -1,12 +0,0 @@
--- script/dbs_view-- Fri Jul 11 00:53:57 1997
+++ script/dbs_view Sat Aug 1 20:44:46 1998
@@ -1,7 +1,7 @@
-#!/usr/local/bin/perl
-#!/usr/local/bin/perl -d
#!/usr/bin/perl
#!/usr/bin/perl -d
+#!/usr/local/bin/perl
+#!/usr/local/bin/perl -d
######################################################################
# DBS: Distributed Benchmark System

View File

@ -0,0 +1,12 @@
--- src/record.h.orig 1997-10-13 09:36:38.000000000 +0900
+++ src/record.h 2012-04-29 03:08:53.000000000 +0900
@@ -69,7 +69,9 @@
#include <netinet/tcp.h>
#ifndef __linux__
+#ifndef __FreeBSD__
#include <netinet/in_pcb.h>
+#endif
#include <netinet/ip_var.h>
#include <netinet/tcpip.h>
/*#define TCPSTATES*/

View File

@ -1,11 +0,0 @@
bin/dbs_view
bin/dbsc
bin/dbsd
%%PORTDOCS%%%%DOCSDIR%%/Copyright
%%PORTDOCS%%%%DOCSDIR%%/dbs.man
%%PORTDOCS%%%%DOCSDIR%%/dbs.man.jis
%%PORTDOCS%%%%DOCSDIR%%/dbs_paper.ps
%%EXAMPLESDIR%%/TCP2.cmd
%%EXAMPLESDIR%%/TCPvsMPEG.cmd
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%EXAMPLESDIR%%