Subject: pkg/22859: Fix benchmarks/nttcp on SunOS
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/19/2003 15:41:05
>Number:         22859
>Category:       pkg
>Synopsis:       Fix benchmarks/nttcp 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 15:42: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 missing library fixes exposed by my SunOS bulk build.

Also tidy up the Makefile patch a little, as we don't need to add
empty (or gcc-specific) NetBSD definitions.
>How-To-Repeat:

>Fix:
http://www.perkin.org.uk/projects/netbsd/nttcp.diff

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/nttcp/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	2003/07/17 21:24:33	1.2
+++ Makefile	2003/09/19 15:37:50
@@ -8,6 +8,12 @@
 HOMEPAGE=	http://www.leo.org/~elmar/nttcp/
 COMMENT=	New TCP testing and performance measuring tool
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+MAKE_ENV+=	LIB="-lsocket -lnsl"
+.endif
+
 do-install:
 	cd ${WRKSRC} ; \
 	${INSTALL_PROGRAM} nttcp ${PREFIX}/bin/nttcp ; \
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/nttcp/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo	2002/08/21 06:36:35	1.2
+++ distinfo	2003/09/19 15:37:50
@@ -2,5 +2,5 @@
 
 SHA1 (nttcp-1.47.tar.gz) = 28de7d65074e7546babdfa42b3b88fd8baa2be88
 Size (nttcp-1.47.tar.gz) = 25693 bytes
-SHA1 (patch-aa) = 4865a0daf25b1ebbbb7e3e01014c50b9c16558a6
+SHA1 (patch-aa) = 1699c1fbaaa703fbda32325a2fe395c9018af459
 SHA1 (patch-ab) = f684e6de0fa6df8f28a6372d5dd0bf8e1eee896f
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/nttcp/patches/patch-aa,v
retrieving revision 1.2
diff -u -r1.2 patch-aa
--- patches/patch-aa	2002/08/21 06:36:35	1.2
+++ patches/patch-aa	2003/09/19 15:37:50
@@ -1,13 +1,18 @@
 $NetBSD: patch-aa,v 1.2 2002/08/21 06:36:35 simonb Exp $
 
---- Makefile.orig	Mon Dec 18 21:17:20 2000
-+++ Makefile
-@@ -108,8 +108,16 @@
+--- Makefile.orig	Mon Dec 18 10:17:20 2000
++++ Makefile	Fri Sep 19 16:31:34 2003
+@@ -108,13 +108,13 @@
  #DBG=	-Wall -g
  #INC=	
  
 -# For FreeBSD
 -ARCH=	-DFreeBSD
+-LIB=
+-OPT=	-O2
+-CC=	cc
+-DBG=	
+-INC=	
 +## For FreeBSD
 +#ARCH=	-DFreeBSD
 +#LIB=
@@ -15,13 +20,10 @@
 +#CC=	cc
 +#DBG=	
 +#INC=	
-+
-+# For NetBSD
-+ARCH=	
- LIB=
- OPT=	-O2
- CC=	cc
-@@ -151,9 +159,12 @@
+ 
+ ## For SGI IRIX 5.3, 6.2 (cc or gcc)
+ #ARCH=
+@@ -151,10 +151,13 @@
  VERSION=	1.47
  #prefix=		/usr/local/dist/DIR/nttcp-$(VERSION)
  #prefix=		/usr/local
@@ -30,8 +32,8 @@
 +prefix=		${PREFIX}
  CFLAGS =	$(ARCH) $(DBG) $(DEF) $(INC) $(OPT) -DVERSION=\"$(VERSION)\"
  LFLAGS = 	$(DBG) 
-+
-+all:		nttcp
  
++all:		nttcp
++
  nttcp:		nttcp.o support.o
  		$(CC) $(LFLAGS) nttcp.o -o nttcp support.o $(LIB)
>Release-Note:
>Audit-Trail:
>Unformatted: