head 1.4; access; symbols pkgsrc-2013Q2:1.4.0.54 pkgsrc-2013Q2-base:1.4 pkgsrc-2012Q4:1.4.0.52 pkgsrc-2012Q4-base:1.4 pkgsrc-2011Q4:1.4.0.50 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q2:1.4.0.48 pkgsrc-2011Q2-base:1.4 pkgsrc-2009Q4:1.4.0.46 pkgsrc-2009Q4-base:1.4 pkgsrc-2008Q4:1.4.0.44 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.42 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.40 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.38 pkgsrc-2008Q2-base:1.4 pkgsrc-2008Q1:1.4.0.36 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.34 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.32 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.30 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.28 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.26 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.24 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.22 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.20 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.4.0.18 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.16 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.14 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.12 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.10 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.8 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.6 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.4 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.2 pkgsrc-2003Q4-base:1.4 buildlink2-base:1.4 netbsd-1-3-PATCH002:1.2; locks; strict; comment @# @; 1.4 date 98.07.04.07.50.09; author mycroft; state dead; branches; next 1.3; 1.3 date 98.06.27.17.44.24; author tron; state Exp; branches; next 1.2; 1.2 date 98.03.07.11.04.51; author mycroft; state Exp; branches; next 1.1; 1.1 date 97.10.28.23.53.09; author augustss; state Exp; branches; next ; desc @@ 1.4 log @Update to 3.0.3. @ text @--- 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 \n" +" - Sun/Solaris/NetBSD driver by Valtteri Vuorikoski \n" #elif defined(SOLARIS) #define mikbannerdriver \ -" - Sun/Solaris driver by Valtteri Vuorikoski \n" +" - Sun/Solaris/NetBSD driver by Valtteri Vuorikoski \n" + +#elif defined(__NetBSD__) +#define mikbannerdriver \ +" - Sun/Solaris/NetBSD driver by Valtteri Vuorikoski \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) @ 1.3 log @Define "unix" manually as suggested by Tim Rightnour in PR pkg/5600. @ text @@ 1.2 log @Use the native audio interface. @ text @d37 1 a37 1 +OSFLAGS = -O2 -I${PREFIX}/include d74 1 @ 1.1 log @Change RCS id. NetBSD port. @ text @d1 26 a26 10 diff -u ../../../work/mikmod-2.14-unix/source/Makefile ./Makefile --- ../../../work/mikmod-2.14-unix/source/Makefile Mon Oct 27 22:04:48 1997 +++ ./Makefile Mon Oct 27 21:31:45 1997 @@@@ -42,6 +42,10 @@@@ LIBS=-lncurses -lm $(ULTRALIB) DRIVERS = drv_nos.o drv_raw.o drv_vox.o $(ULTRADRV) +# NetBSD needs to find ncurses and the oss audio library +OSFLAGS += -I${PREFIX}/include +LIBS= -L${PREFIX}/lib -lncurses -lossaudio -lm d28 13 d43 3 a45 18 # SUN / Solaris definitions (including Solaris/i386) diff -u ../../../work/mikmod-2.14-unix/source/drv_vox.c ./drv_vox.c --- ../../../work/mikmod-2.14-unix/source/drv_vox.c Tue Dec 17 01:21:12 1996 +++ ./drv_vox.c Mon Oct 27 21:52:18 1997 @@@@ -35,8 +35,10 @@@@ #include #include #include -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) #include +#elif defined(__NetBSD__) +#include #else #include #endif /* __FreeBSD__ */ @@@@ -52,9 +54,15 @@@@ static char* audiobuffer; d47 4 d52 4 a55 5 +#ifdef __NetBSD__ +#define DEV "/dev/audio" +#else +#define DEV "/dev/dsp" +#endif d57 17 a73 16 static BOOL Vox_IsThere(void) { - return (access("/dev/dsp",W_OK)==0); + return (access(DEV,W_OK)==0); } @@@@ -64,7 +72,7 @@@@ int play_precision,play_stereo,play_rate; int fragsize,numfrags; - if((sndfd=open("/dev/dsp",O_WRONLY))<0){ + if((sndfd=open(DEV,O_WRONLY))<0){ myerr="Cannot open sounddevice"; return 0; } @