Subject: pkg/23091: package mbone/imm build fails
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rtr@silence.silence.org>
List: netbsd-bugs
Date: 10/08/2003 16:27:36
>Number:         23091
>Category:       pkg
>Synopsis:       package mbone/imm build fails
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 08 06:29:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Tyler R. Retzlaff
>Release:        NetBSD 1.6ZC
>Organization:
>Environment:
System: NetBSD silence 1.6ZC NetBSD 1.6ZC (silence) #5: Fri Sep 26 22:31:33 EST 2003 rtr@silence:/usr/obj/netbsd/silence i386
Architecture: i386
Machine: i386
Thread model: posix
gcc version 3.3.1
>Description:

Package uses obsolete varargs and should be converted to use stdarg.  Until
done will not build w/ gcc3.

>How-To-Repeat:
cd /usr/pkgsrc/mbone/imm && make
>Fix:

The fix should do the following.
+ Update for distinfo
+ Remove patch-ad and re-add as patch-aa
+ Add patch-ab which patches the package to use stdarg instead of varargs.

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/mbone/imm/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo    19 Jan 2003 07:13:49 -0000      1.3
+++ distinfo    8 Oct 2003 06:25:18 -0000
@@ -2,4 +2,5 @@ $NetBSD: distinfo,v 1.3 2003/01/19 07:13

 SHA1 (imm36a1.tar.Z) = a3c0bd042ebed930739f22ebfec2bf28080a88f6
 Size (imm36a1.tar.Z) = 87695 bytes
-SHA1 (patch-ad) = dc9bc795bc177f5e0087b1bb2bcb2f5d654bdb66
+SHA1 (patch-aa) = dc9bc795bc177f5e0087b1bb2bcb2f5d654bdb66
+SHA1 (patch-ab) = b8133dd4ab0b25c9c6e5ae87ceca6ab7870a438b
--- /dev/null   2003-10-08 16:23:31.000000000 +1000
+++ patches/patch-aa    2003-01-19 18:13:50.000000000 +1100
@@ -0,0 +1,38 @@
+$NetBSD: patch-ad,v 1.7 2003/01/19 07:13:50 salo Exp $
+--- Makefile.orig      Mon Feb 10 08:56:48 1997
++++ Makefile   Sun Sep 13 07:56:03 1998
+@@ -1,9 +1,9 @@
+ ##################################
+ # Common Area
+ SHELL = /bin/sh
+-PREFIX = /usr/local
++#PREFIX = /usr/pkg
+ INCLUDE_DIR = -I$(PREFIX)/include
+-BINDIR= /usr/local/bin
++BINDIR= $(PREFIX)/bin
+
+ noentry:
+       @echo "type 'make clean' followed by  'make SYSTEM' "
+@@ -44,10 +44,10 @@
+ netbsd:
+       $(MAKE) \
+       LIBS='-lm' \
+-      TKLIBS='-L$(PREFIX)/lib -L/usr/X11/lib -ltk4.2 -ltcl7.6 -lX11' \
+-      INCLUDES='-I. $(INCLUDE_DIR) -I/usr/X11/include' \
++      TKLIBS='-Wl,-R${LOCALBASE}/lib -Wl,-R${X11BASE}/lib -L$(LOCALBASE)/lib -L${X11BASE}/lib -ltk83 -ltcl83 -lX11' \
++      INCLUDES='-I. $(INCLUDE_DIR) -I${X11BASE}/include -I${LOCALBASE}/include -I${LOCALBASE}/include' \
+       SYSDEFS='-g -DSIG_T=int -DMULTICAST -DERROR_TEST' \
+-      CC=gcc \
++      CC='cc -O2'\
+       all
+
+ linux:
+@@ -61,7 +61,7 @@
+
+ ##############
+ # common defines
+-INSTALL=cp
++INSTALL=${BSD_INSTALL_PROGRAM}
+ VERSION=36a1
+ EXECS=imm immserv mnm mdpsniff
+
--- /dev/null   2003-10-08 16:23:31.000000000 +1000
+++ patches/patch-ab    2003-10-08 16:18:58.000000000 +1000
@@ -0,0 +1,87 @@
+--- utils.c.orig       2003-10-08 16:18:08.000000000 +1000
++++ utils.c    2003-10-08 16:18:18.000000000 +1000
+@@ -20,7 +20,7 @@
+  * These notices must be retained in any copies of any part of this software.
+  ******************************************************************************/
+ #include <stdio.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #ifdef __NetBSD__
+@@ -40,14 +40,12 @@
+
+ /*----------------------------------------------------------------------------*/
+
+-void warn( va_alist )
+-va_dcl
++void
++warn(const char *fmt, ...)
+ {
+     va_list args;
+-    char *fmt;
+
+-    va_start( args );
+-    fmt = va_arg( args, char * );
++    va_start(args, fmt);
+     fprintf( stderr, "Warning: " );
+     vfprintf( stderr, fmt, args );
+     va_end( args );
+@@ -55,14 +53,12 @@
+
+ /*----------------------------------------------------------------------------*/
+
+-void die( va_alist )
+-va_dcl
++void
++die(const char *fmt, ...)
+ {
+     va_list args;
+-    char *fmt;
+
+-    va_start( args );
+-    fmt = va_arg( args, char * );
++    va_start(args, fmt);
+     fprintf( stderr, "Error: " );
+     vfprintf( stderr, fmt, args );
+     exit( 1 );
+@@ -70,14 +66,12 @@
+
+ /*----------------------------------------------------------------------------*/
+
+-void fatal( va_alist )
+-va_dcl
++void
++fatal(const char *fmt, ...)
+ {
+     va_list args;
+-    char *fmt;
+
+-    va_start( args );
+-    fmt = va_arg( args, char * );
++    va_start(args, fmt);
+     fprintf( stderr, "Internal Error: " );
+     vfprintf( stderr, fmt, args );
+     exit( 2 );
+@@ -142,18 +136,16 @@
+
+ /*----------------------------------------------------------------------------*/
+
+-void mailmessage( va_alist )
+-va_dcl
++void
++mailmessage(const char *fmt, ...)
+ {
+     va_list args;
+-    char *fmt;
+     FILE *popen(), *fp;
+     char cmdline[80];
+      if (whome == NULL) whome = getlogin();
+       sprintf(cmdline,"%s %s",mailprog,whome);
+       fp = popen(cmdline,"w");
+-    va_start( args );
+-    fmt = va_arg( args, char * );
++    va_start(args, fmt);
+     fprintf( fp, "MNM Warning: " );
+     vfprintf( fp, fmt, args );
+     va_end( args );
>Release-Note:
>Audit-Trail:
>Unformatted: