Subject: pkg/5600: mikmod-2.14 pkg relies on deprecated unix define.
To: None <gnats-bugs@gnats.netbsd.org>
From: Tim Rightnour <root@polaris.garbled.net>
List: netbsd-bugs
Date: 06/17/1998 07:56:53
>Number:         5600
>Category:       pkg
>Synopsis:       mikmod-2.14 pkg relies on deprecated unix define.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 17 07:50:01 1998
>Last-Modified:
>Originator:     Tim Rightnour
>Organization:
Tim Rightnour    -  root@garbled.net
http://www.zynetwc.com/~garbled/garbled.html
>Release:        6/10/98<NetBSD-current source date>
>Environment:
	
System: NetBSD polaris 1.3 NetBSD 1.3 (POLARIS) #0: Thu Mar 26 13:17:18 MST 1998 root@polaris:/usr/src/sys/arch/i386/compile/POLARIS i386


>Description:
mikmod-2.14 pkg relies on deprecated unix define.  This causes builds to
fail on alpha's and eventually will cause builds to fail when other machines
remove -Dunix from the standard CPP defines.

	
>How-To-Repeat:
Attempt to build mikmod pkg on an arch that does not define "unix"  such as
alpha.

	
>Fix:
replacement for patch-ad:

only changes one line, but a patch for a patch is asking for trouble. ;)

--- Makefile.orig	Sat Mar  7 05:45:21 1998
+++ Makefile	Sat Mar  7 05:47:52 1998
@@ -25,8 +25,8 @@
 #
 ############################################################################
 
-OSDEF=-DOSS
-CC = gcc
+#OSDEF=-DOSS
+#CC = gcc
 
 # if you want to use the Ultra driver uncomment the 3 lines below. 
 # You need a Gravis Ultrasound and the library from the Linux Ultrasound 
@@ -35,12 +35,25 @@
 #ULTRALIB=-lgus
 #ULTRADRV=drv_ultra.o
 
-OSFLAGS = -O2 $(OSDEF) $(ULTRA)
+#OSFLAGS = -O2 $(OSDEF) $(ULTRA)
 #debug options
 #OSFLAGS = -g $(OSDEF) $(ULTRA)
 
-LIBS=-lncurses -lm $(ULTRALIB)
-DRIVERS = drv_nos.o drv_raw.o drv_vox.o $(ULTRADRV)
+#LIBS=-lncurses -lm $(ULTRALIB)
+#DRIVERS = drv_nos.o drv_raw.o drv_vox.o $(ULTRADRV)
+
+############################################################################
+#
+# NetBSD definitions
+#
+# for output on the Sun-like audio device (/dev/audio)
+#
+############################################################################
+
+CC = cc
+OSFLAGS = -O2 -I${PREFIX}/include -Dunix
+LIBS = -L${PREFIX}/lib -lncurses -lm
+DRIVERS = drv_nos.o drv_raw.o drv_sun.o
 
 ############################################################################
 #
--- mikmod.h.orig	Sun Dec 29 13:46:39 1996
+++ mikmod.h	Sat Mar  7 05:49:57 1998
@@ -59,11 +59,15 @@
 
 #elif defined(SUN) 
 #define mikbannerdriver \
-" - Sun/Solaris driver by Valtteri Vuorikoski <vuori@sci.fi>\n"
+" - Sun/Solaris/NetBSD driver by Valtteri Vuorikoski <vuori@sci.fi>\n"
 
 #elif defined(SOLARIS)
 #define mikbannerdriver \
-" - Sun/Solaris driver by Valtteri Vuorikoski <vuori@sci.fi>\n"
+" - Sun/Solaris/NetBSD driver by Valtteri Vuorikoski <vuori@sci.fi>\n"
+
+#elif defined(__NetBSD__)
+#define mikbannerdriver \
+" - Sun/Solaris/NetBSD driver by Valtteri Vuorikoski <vuori@sci.fi>\n"
 
 #elif defined(__alpha)
 #define mikbannerdriver \
--- mikmodux.c.orig	Mon Dec 16 19:31:16 1996
+++ mikmodux.c	Sat Mar  7 05:45:21 1998
@@ -199,6 +199,8 @@
 	MD_RegisterDriver(&drv_sun);
 #elif defined(SOLARIS)
 	MD_RegisterDriver(&drv_sun);
+#elif defined(__NetBSD__)
+	MD_RegisterDriver(&drv_sun);
 #elif defined(__alpha)
         MD_RegisterDriver(&drv_AF);
 #elif defined(OSS)


	
>Audit-Trail:
>Unformatted: