ok? -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org
Index: Makefile =================================================================== RCS file: /cvs/ports/games/xscavenger/Makefile,v retrieving revision 1.12 diff -N -u -p Makefile --- Makefile 10 Aug 2009 06:31:43 -0000 1.12 +++ Makefile 3 Jan 2009 09:56:04 -0000 @@ -1,16 +1,17 @@ # $OpenBSD: Makefile,v 1.12 2009/08/10 06:31:43 kili Exp $ DISTNAME= xscavenger-1.4.4 -PKGNAME= ${DISTNAME}p1 +PKGNAME= ${DISTNAME}p2 EXTRACT_SUFX= .tgz CATEGORIES= games +# GPLv2 PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB= X11 Xau Xdmcp Xext c ossaudio pthread-stubs xcb +WANTLIB= X11 Xau Xdmcp Xext c pthread-stubs sndio xcb COMMENT= Lode Runner clone HOMEPAGE= http://www.xdr.com/dash/scavenger.html Index: patches/patch-src-Imakefile =================================================================== RCS file: /cvs/ports/games/xscavenger/patches/patch-src-Imakefile,v retrieving revision 1.1.1.1 diff -N -u -p patches/patch-src-Imakefile --- patches/patch-src-Imakefile 16 Jul 2001 13:03:57 -0000 1.1.1.1 +++ patches/patch-src-Imakefile 3 Jan 2009 09:56:04 -0000 @@ -1,5 +1,5 @@ ---- src/Imakefile.orig Mon Jan 10 06:15:30 2000 -+++ src/Imakefile Mon Jul 16 14:58:25 2001 +--- src/Imakefile.orig Sun Jan 9 21:15:30 2000 ++++ src/Imakefile Sun Jan 3 01:35:51 2010 @@ -1,7 +1,7 @@ # set this to the path where data files should be stored. LIBDIR # is automatically defined by imake, usually to /usr/X11R6/lib/X11, so @@ -14,7 +14,7 @@ ../data/victory.raw -LOCAL_LIBRARIES = $(XLIB) -+LOCAL_LIBRARIES = $(XLIB) -lossaudio ++LOCAL_LIBRARIES = $(XLIB) -lsndio EXTRA_DEFINES = -DLIBNAME=\"$(LIBNAME)\" ComplexProgramTarget(scavenger) Index: patches/patch-src-sound_c =================================================================== RCS file: /cvs/ports/games/xscavenger/patches/patch-src-sound_c,v retrieving revision 1.3 diff -N -u -p patches/patch-src-sound_c --- patches/patch-src-sound_c 21 Mar 2002 02:18:21 -0000 1.3 +++ patches/patch-src-sound_c 3 Jan 2009 09:56:04 -0000 @@ -1,25 +1,92 @@ $OpenBSD: patch-src-sound_c,v 1.3 2002/03/21 02:18:21 jcs Exp $ ---- src/sound.c.orig Wed Mar 20 20:06:22 2002 -+++ src/sound.c Wed Mar 20 20:07:17 2002 -@@ -5,7 +5,7 @@ +--- src/sound.c.orig Sun Dec 1 22:03:54 2002 ++++ src/sound.c Sun Jan 3 01:53:43 2010 +@@ -4,8 +4,7 @@ + #include <stdlib.h> #include <unistd.h> #include <fcntl.h> - #include <sys/ioctl.h> +-#include <sys/ioctl.h> -#include <linux/soundcard.h> -+#include <soundcard.h> ++#include <sndio.h> #include <sys/time.h> #include <signal.h> #include <string.h> -@@ -14,7 +14,7 @@ +@@ -14,8 +13,6 @@ #include "scav.h" #include "sound.h" -#define SOUNDDEV "/dev/dsp" -+#define SOUNDDEV "/dev/audio" - +- char dirlist[512]; -@@ -207,7 +207,7 @@ + #define NUMSOUNDS (sizeof(soundnames)/sizeof(char*)) +@@ -42,7 +39,8 @@ sample samples[NUMSOUNDS]; + + int soundworking=0; + int fragment; +-int dsp; ++struct sio_hdl *hdl; ++struct sio_par par; + int soundwrite,soundread; + int *soundbuffer; + int soundbufferlen; +@@ -52,7 +50,6 @@ int soundbufferlen; + void soundinit(void) + { + int fd[2]; +-char devname[256]; + int value; + + sprintf(dirlist,"%s/%s,%s",localname,localdirname,libname); +@@ -67,17 +64,29 @@ int value; + } + close(soundwrite); + memset(samples,0,sizeof(samples)); +- strcpy(devname,SOUNDDEV); +- dsp=open(devname,O_WRONLY); +- if(dsp<0) goto failed; +- fragment=0x20009; +- ioctl(dsp,SNDCTL_DSP_SETFRAGMENT,&fragment); +- value=10000; +- ioctl(dsp,SNDCTL_DSP_SPEED,&value); +- value=0; +- ioctl(dsp,SNDCTL_DSP_STEREO,&value); +- ioctl(dsp,SNDCTL_DSP_GETBLKSIZE,&fragment); +- if(!fragment) {close(dsp);goto failed;} ++ hdl=sio_open(NULL,SIO_PLAY,0); ++ if(hdl==NULL) goto failed; ++ sio_initpar(&par); ++ par.bits=8; ++ par.sig=0; ++ par.rate=10000; ++ par.pchan=1; ++ par.le=SIO_LE_NATIVE; ++ par.appbufsz=par.rate/20; ++ if(!sio_setpar(hdl,&par) || !sio_getpar(hdl,&par)) { ++ sio_close(hdl); ++ goto failed; ++ } ++ if(par.bits!=8 || par.sig!=0 || par.rate!=10000 || par.pchan!=1) { ++ sio_close(hdl); ++ goto failed; ++ } ++ if(!sio_start(hdl)) { ++ sio_close(hdl); ++ goto failed; ++ } ++ fragment=par.round*par.bps*par.pchan; ++ if(!fragment) {sio_close(hdl);goto failed;} + soundbufferlen=fragment*sizeof(int); + soundbuffer=malloc(soundbufferlen); + if(!soundbuffer) goto failed; +@@ -207,13 +216,13 @@ int which; + ip=soundbuffer; + p=(char *) soundbuffer; + while(j--) *p++ = clip[4096+*ip++]; +- write(dsp,(char *)soundbuffer,fragment); ++ sio_write(hdl,(char *)soundbuffer,fragment); + } + } void playsound(int n) { Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/games/xscavenger/pkg/PLIST,v retrieving revision 1.2 diff -N -u -p pkg/PLIST --- pkg/PLIST 15 Sep 2004 00:46:12 -0000 1.2 +++ pkg/PLIST 3 Jan 2009 09:56:04 -0000 @@ -1,5 +1,5 @@ @comment $OpenBSD: PLIST,v 1.2 2004/09/15 00:46:12 espie Exp $ -bin/scavenger +...@bin bin/scavenger @man man/cat1/scavenger.0 share/doc/scavenger/ share/doc/scavenger/DOC