On Wednesday 16 December 2009 23:50:45 Jacob Meuser wrote: > also, port-lib-depends-check says pthread-stubs and xcb shouldn't be > WANTLIB.
I have seen this before and don't really understand how it thinks they're not necessary. libX11 needs pthread-stubs and xcb. > -- > jake...@sdf.lonestar.org > SDF Public Access UNIX System - http://sdf.lonestar.org > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/games/xblast/Makefile,v > retrieving revision 1.23 > diff -N -u -p Makefile > --- Makefile 10 Aug 2009 06:31:43 -0000 1.23 > +++ Makefile 17 Dec 2009 04:44:57 -0000 > @@ -3,7 +3,7 @@ > COMMENT= graphical multi-player real-time strategy game for X11 > > DISTNAME= xblast-2.10.4 > -PKGNAME= ${DISTNAME}p0 > +PKGNAME= ${DISTNAME}p1 > DIST_SUBDIR= xblast > DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ > images-2005-01-06${EXTRACT_SUFX} \ > @@ -21,7 +21,7 @@ PERMIT_PACKAGE_FTP= Yes > PERMIT_DISTFILES_CDROM= Yes > PERMIT_DISTFILES_FTP= Yes > > -WANTLIB= ICE X11 c m ossaudio pthread-stubs xcb > +WANTLIB= ICE X11 c m sndio > > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xblast/} > > @@ -31,7 +31,7 @@ MODULES= devel/gettext > > CONFIGURE_STYLE=autoconf > AUTOCONF_VERSION=2.59 > -CONFIGURE_ENV= LDFLAGS="-lossaudio \ > +CONFIGURE_ENV= LDFLAGS="-lsndio \ > -L${LOCALBASE}/lib -liconv -lintl" > CONFIGURE_ARGS= --enable-sound \ > --with-otherdatadir=${PREFIX}/share/xblast \ > Index: patches/patch-xbsndsrv_c > =================================================================== > RCS file: /cvs/ports/games/xblast/patches/patch-xbsndsrv_c,v > retrieving revision 1.3 > diff -N -u -p patches/patch-xbsndsrv_c > --- patches/patch-xbsndsrv_c 20 Dec 2007 22:03:05 -0000 1.3 > +++ patches/patch-xbsndsrv_c 17 Dec 2009 04:44:57 -0000 > @@ -1,24 +1,116 @@ > $OpenBSD: patch-xbsndsrv_c,v 1.3 2007/12/20 22:03:05 ajacoutot Exp $ > ---- xbsndsrv.c.orig Mon Jun 12 13:06:36 2006 > -+++ xbsndsrv.c Sun Dec 16 15:37:02 2007 > -@@ -75,6 +75,9 @@ > +--- xbsndsrv.c.orig Mon Jun 12 04:06:36 2006 > ++++ xbsndsrv.c Wed Dec 16 19:48:41 2009 > +@@ -75,6 +75,10 @@ > #ifdef HAVE_LINUX_SOUNDCARD_H > #include <linux/soundcard.h> > #endif > +#ifdef __OpenBSD__ > -+#include <soundcard.h> > ++#define USE_SNDIO > ++#include <sndio.h> > +#endif > > #endif > > -@@ -263,6 +266,10 @@ static struct _sound_name > +@@ -263,6 +267,10 @@ static struct _sound_name > #define SAMPLE_CHANNELS 2 > #define SAMPLE_SIZE 16 > #define SUN_AUDIO_REF 0 > -+#elif __OpenBSD__ > -+#define SOUND_DEVICE "/dev/sound" > ++#elif defined(USE_SNDIO) > ++#define SOUND_DEVICE "default" > +#define SAMPLE_CHANNELS 1 > +#define SAMPLE_SIZE 8 > #else > #define SOUND_DEVICE "/dev/dsp" > #define SAMPLE_CHANNELS 1 > +@@ -283,6 +291,10 @@ static int sample_rate = SAMPLE_RATE; > + static int sample_channels = SAMPLE_CHANNELS; > + static int sample_size = SAMPLE_SIZE; > + > ++#ifdef USE_SNDIO > ++struct sio_hdl *hdl; > ++#endif > ++ > + /* > + * outcomment the following line to suppress server statistics > + */ > +@@ -371,8 +383,20 @@ init_dsp (dsp) > + fprintf (stderr, " (wanted %d channels, %d bits, %dHz)\n", > + sample_channels, sample_size, sample_rate); > + > +-#else > ++#elif defined(USE_SNDIO) > ++ struct sio_par par; > + > ++ sio_initpar(&par); > ++ par.rate = sample_rate; > ++ par.bits = sample_size; > ++ par.sig = par.bits == 8 ? 0 : 1; > ++ par.pchan = sample_channels ? 2 : 1; > ++ par.appbufsz = 1024; > ++ > ++ if (!sio_setpar(hdl, &par) || !sio_getpar(hdl, &par) || !sio_start(hdl)) > ++ fprintf (stderr, "XBlast sound server: could not configure > sndio\n"); > ++ > ++#else > + if (ioctl (dsp, SNDCTL_DSP_SETFRAGMENT, &fragsize) < 0) { > + fprintf (stderr, "XBlast sound server: could not set fragment > size %8x > on sound device\n", + fragsize); > +@@ -418,7 +442,7 @@ resync (dsp) > + #ifdef __sun__ > + ioctl (dsp, I_FLUSH, NULL); > + fprintf (stderr, "\nsync\n"); > +-#else > ++#elif !defined(USE_SNDIO) > + /* resync sound device to correct any channel flipping */ > + write (dsp, playbuff, SUBSIZE); > + write (dsp, playbuff, SUBSIZE); > +@@ -601,7 +625,11 @@ main (argc, argv) > + /* > + * open and prepare sound device > + */ > ++#ifdef USE_SNDIO > ++ if ((hdl = sio_open (NULL, SIO_PLAY, 0)) == NULL) { > ++#else > + if ((dsp = open (SOUND_DEVICE, O_WRONLY)) < 0) { > ++#endif > + fprintf (stderr, "XBlast sound server: could not open sound > device > %s\n", SOUND_DEVICE); + ack_val = SND_ACK_ERROR; > + write (1, &ack_val, sizeof (ack_val)); > +@@ -780,7 +808,11 @@ main (argc, argv) > + } > + > + /* play buffer */ > ++#ifdef USE_SNDIO > ++ sio_write (hdl, playbuff, SUBSIZE); > ++#else > + write (dsp, playbuff, SUBSIZE); > ++#endif > + } > + } > + else { > +@@ -928,6 +960,15 @@ main (argc, argv) > + } > + } > + > ++#elif defined(USE_SNDIO) > ++ switch (sample_size) { > ++ case 8: > ++ sio_write (hdl, playbuff, SUBSIZE); > ++ break; > ++ case 16: > ++ sio_write (hdl, sumbuff, SUBSIZE * 2); > ++ break; > ++ } > + #else > + switch (sample_size) { > + case 8: > +@@ -950,7 +991,7 @@ main (argc, argv) > + /* ioctl(dsp,AUDIO_DRAIN,NULL); */ > + ioctl (dsp, I_FLUSH, NULL); > + fprintf (stderr, "\nsync\n"); > +-#else > ++#elif !defined(USE_SNDIO) > + (void)ioctl (dsp, SNDCTL_DSP_SYNC, NULL); > + #endif > + did_sync = TRUE; > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/games/xblast/pkg/PLIST,v > retrieving revision 1.7 > diff -N -u -p pkg/PLIST > --- pkg/PLIST 20 Dec 2007 22:03:05 -0000 1.7 > +++ pkg/PLIST 17 Dec 2009 04:44:58 -0000 > @@ -1,6 +1,6 @@ > @comment $OpenBSD: PLIST,v 1.7 2007/12/20 22:03:05 ajacoutot Exp $ > -bin/xblast > -bin/xbsndsrv > +...@bin bin/xblast > +...@bin bin/xbsndsrv > share/locale/de/LC_MESSAGES/xblast.mo > share/locale/fr/LC_MESSAGES/xblast.mo > share/xblast/ -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.