Subject: pkg/22860: Fix benchmarks/netpipe on SunOS
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/19/2003 16:01:05
>Number: 22860
>Category: pkg
>Synopsis: Fix benchmarks/netpipe on SunOS
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 19 16:02:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Perkin
>Release: N/A
>Organization:
British Broadcasting Corporation
>Environment:
SunOS build1 5.9 Generic_112233-01 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
More -lsocket -lnsl Solaris fixes.
While here, tidy up hardcoded cc, and move -DHAVE_GETRUSAGE into
pkgsrc Makefile so that any operating systems which don't have it
can do the necessary .ifdef rather than spamming the package one.
>How-To-Repeat:
>Fix:
http://www.perkin.org.uk/projects/netbsd/netpipe.diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/netpipe/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile 2003/07/17 21:24:32 1.2
+++ Makefile 2003/09/19 15:56:58
@@ -8,6 +8,14 @@
HOMEPAGE= http://www.scl.ameslab.gov/netpipe/
COMMENT= TCP/PVM/MPI testing and performance measuring tool
+.include "../../mk/bsd.prefs.mk"
+
+CFLAGS+= -DHAVE_GETRUSAGE
+
+.if ${OPSYS} == "SunOS"
+MAKE_ENV+= EXTRA_LIBS="-lsocket -lnsl"
+.endif
+
do-install:
cd ${WRKSRC} ; \
${INSTALL_PROGRAM} NPtcp ${PREFIX}/bin/NPtcp ; \
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/netpipe/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 2001/07/28 00:15:12 1.2
+++ distinfo 2003/09/19 15:56:58
@@ -2,4 +2,4 @@
SHA1 (netpipe-2.4.tar.gz) = 1d5c795c912dfbf9b48c0a7fc0e751ed521a760b
Size (netpipe-2.4.tar.gz) = 23009 bytes
-SHA1 (patch-aa) = 2fd35e18c315571f93e8c05b4db974c5593b6680
+SHA1 (patch-aa) = 0cbb01a8fb5efb8d14bbeb7f47a456cce758a8e9
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/netpipe/patches/patch-aa,v
retrieving revision 1.2
diff -u -r1.2 patch-aa
--- patches/patch-aa 2001/07/28 00:15:13 1.2
+++ patches/patch-aa 2003/09/19 15:56:58
@@ -1,18 +1,31 @@
$NetBSD: patch-aa,v 1.2 2001/07/28 00:15:13 thorpej Exp $
---- Makefile.orig Tue Apr 27 14:03:25 1999
-+++ Makefile Fri Jul 27 16:20:10 2001
+--- Makefile.orig Tue Apr 27 22:03:25 1999
++++ Makefile Fri Sep 19 16:47:27 2003
+@@ -4,7 +4,7 @@
+ #
+
+ # Default C compiler: must be an ANSI C compiler
+-CC = cc
++#CC = cc
+ # File names for the main source files
+ DRIV_SRC = netpipe.c
+ DRIV_OBJ = netpipe.o
@@ -13,7 +13,7 @@
TARGETS = NPtcp
# If you have TCP, MPI and PVM
#TARGETS = NPtcp NPmpi NPpvm
-CFLAGS = -O
-+CFLAGS = -O -DHAVE_GETRUSAGE
++#CFLAGS = -O
# Adjust these for MPI (only used if you have MPI)
MPI_HOME = /home/mpich
MPI_ARCH = IRIX
-@@ -25,7 +25,7 @@
- EXTRA_LIBS =
+@@ -22,10 +22,10 @@
+ PVM_HOME = /home/pvm3
+ PVM_ARCH = SUN4SOL2
+ # Any extra libraries needed
+-EXTRA_LIBS =
++#EXTRA_LIBS =
#EXTRA_LIBS = -lgcc
-targets: $(TARGETS)
>Release-Note:
>Audit-Trail:
>Unformatted: