From dd1b3266e8ba9a5652d00137214155bdf452b3e2 Mon Sep 17 00:00:00 2001 From: mnag Date: Mon, 24 Apr 2006 14:30:00 +0000 Subject: - Fix build when detect pthread_cancel (7.x) - Fix configure detection of pthread_cancel on 4.x 5.x and 6.x - portlint(1) Notified by: kris --- benchmarks/iperf/Makefile | 17 +++++++---------- benchmarks/iperf/files/patch-compat__Thread.c | 11 +++++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 benchmarks/iperf/files/patch-compat__Thread.c (limited to 'benchmarks/iperf') diff --git a/benchmarks/iperf/Makefile b/benchmarks/iperf/Makefile index 906ea52391b0..cf4ce326358d 100644 --- a/benchmarks/iperf/Makefile +++ b/benchmarks/iperf/Makefile @@ -15,37 +15,34 @@ MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= mnag@FreeBSD.org COMMENT= A tool to measure maximum TCP and UDP bandwidth -NO_CDROM= "can't charge a fee for the software" +NO_CDROM= can't charge a fee for the software -HAS_CONFIGURE= yes +GNU_CONFIGURE= yes PLIST_FILES= bin/iperf +PORTDOCS= * OPTIONS= IPV6 "Enable support to IPv6" on \ THREADS "Enable threads support" on .include -CONFIGURE_ARGS+= --prefix=${PREFIX} - .if defined(WITHOUT_IPV6) CONFIGURE_ARGS+= --disable-ipv6 .endif .if defined(WITHOUT_THREADS) CONFIGURE_ARGS+= --disable-threads -.endif - -.if !defined(NOPORTDOCS) -PORTDOCS= * +.else +CONFIGURE_ENV+= CFLAGS=${PTHREAD_LIBS} .endif post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} -.for FILE in ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.gif - @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} +.for f in ${WRKSRC}/doc/*.html ${WRKSRC}/doc/*.gif + ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} .endfor .endif diff --git a/benchmarks/iperf/files/patch-compat__Thread.c b/benchmarks/iperf/files/patch-compat__Thread.c new file mode 100644 index 000000000000..ecec1058f83e --- /dev/null +++ b/benchmarks/iperf/files/patch-compat__Thread.c @@ -0,0 +1,11 @@ +--- ./compat/Thread.c.orig Mon Apr 24 11:02:47 2006 ++++ ./compat/Thread.c Mon Apr 24 11:03:46 2006 +@@ -202,7 +202,7 @@ + #if defined( HAVE_POSIX_THREAD ) + // Cray J90 doesn't have pthread_cancel; Iperf works okay without + #ifdef HAVE_PTHREAD_CANCEL +- pthread_cancel( oldTID ); ++ pthread_cancel( thread->mTID ); + #endif + #else // Win32 + // this is a somewhat dangerous function; it's not -- cgit