diff options
author | jlam <jlam@pkgsrc.org> | 2002-09-26 12:29:55 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-09-26 12:29:55 +0000 |
commit | c3c74b88b62d1546055959eed224e8bb7656b0d9 (patch) | |
tree | 7e6c725fae596454a6f1f77777989001ea121efc /sysutils/xcdroast | |
parent | ad3d77880de390edc9dbc515eb609300510b1102 (diff) | |
download | pkgsrc-c3c74b88b62d1546055959eed224e8bb7656b0d9.tar.gz |
* Use buildlink2.
* Install some documentation.
* Honor PKG_SYSCONFDIR (and warn user that the config file directory may
have changed).
* Allow for compiling with OSS support on NetBSD, though it is currently
commented out.
Diffstat (limited to 'sysutils/xcdroast')
-rw-r--r-- | sysutils/xcdroast/INSTALL | 20 | ||||
-rw-r--r-- | sysutils/xcdroast/MESSAGE | 7 | ||||
-rw-r--r-- | sysutils/xcdroast/Makefile | 41 | ||||
-rw-r--r-- | sysutils/xcdroast/PLIST | 51 | ||||
-rw-r--r-- | sysutils/xcdroast/distinfo | 10 | ||||
-rw-r--r-- | sysutils/xcdroast/patches/patch-aa | 32 | ||||
-rw-r--r-- | sysutils/xcdroast/patches/patch-ab | 12 | ||||
-rw-r--r-- | sysutils/xcdroast/patches/patch-ac | 110 | ||||
-rw-r--r-- | sysutils/xcdroast/patches/patch-ad | 62 |
9 files changed, 258 insertions, 87 deletions
diff --git a/sysutils/xcdroast/INSTALL b/sysutils/xcdroast/INSTALL new file mode 100644 index 00000000000..800ff036a84 --- /dev/null +++ b/sysutils/xcdroast/INSTALL @@ -0,0 +1,20 @@ +# $NetBSD: INSTALL,v 1.1 2002/09/26 12:29:55 jlam Exp $ + +case ${STAGE} in +POST-INSTALL) + if [ "${PKG_SYSCONFDIR}" != "${PKG_PREFIX}/etc" ]; then + if [ -f ${PREFIX}/etc/xcdroast.conf ]; then + ${CAT} << EOF +=========================================================================== + ======================== + === IMPORTANT NOTICE === + ======================== + + The default location of the xcdroast configuration files has changed. + Please move them from ${PKG_PREFIX}/etc to /etc. +=========================================================================== +EOF + fi + fi + ;; +esac diff --git a/sysutils/xcdroast/MESSAGE b/sysutils/xcdroast/MESSAGE index e46924a404f..96fc6c803e1 100644 --- a/sysutils/xcdroast/MESSAGE +++ b/sysutils/xcdroast/MESSAGE @@ -1,9 +1,6 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.1 2001/10/31 22:54:18 zuntum Exp $ +$NetBSD: MESSAGE,v 1.2 2002/09/26 12:29:55 jlam Exp $ -xcdroast creates its config file into ${PREFIX}/etc/xcdroast.conf. -It will not get removed with pkg_delete(1) automatically. So if you no longer -intend to use this package don't forget to remove it by hand. -xcdroast doesn't work as SUID program if linked against gtk-1.2.9. Other +xcdroast doesn't work as SUID program if linked against GTK+. Other options include making cdrecord SUID or using a wrapper like sudo. =========================================================================== diff --git a/sysutils/xcdroast/Makefile b/sysutils/xcdroast/Makefile index 6c888fb0706..ae7742d6394 100644 --- a/sysutils/xcdroast/Makefile +++ b/sysutils/xcdroast/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2002/03/17 15:46:16 fredb Exp $ +# $NetBSD: Makefile,v 1.8 2002/09/26 12:29:55 jlam Exp $ DISTNAME= xcdroast-0.98alpha9 PKGNAME= xcdroast-0.98a9 @@ -10,14 +10,43 @@ MAINTAINER= frueauf@netbsd.org HOMEPAGE= http://www.xcdroast.org/ COMMENT= graphical user interface for the command-line cdrecord-tools -DEPENDS+= imlib>=1.9.11nb1:../../graphics/imlib DEPENDS+= cdrecord-1.10:../../sysutils/cdrecord +.include "../../mk/bsd.prefs.mk" + +USE_BUILDLINK2= YES USE_X11= YES -post-patch: - ${MV} -f ${WRKSRC}/xcdroast.h ${WRKSRC}/xcdroast.h.bak - ${SED} -e "s,@@PREFIX@@,${PREFIX},g" \ - < ${WRKSRC}/xcdroast.h.bak > ${WRKSRC}/xcdroast.h +BASE_VERS= ${PKGVERSION:C/a.*//} +PLIST_SUBST+= BASE_VERS=${BASE_VERS} +MAKE_ENV+= X_CFLAGS="${CFLAGS}" +MAKE_ENV+= X_LDFLAGS="${LDFLAGS}" + +#.if ${_OPSYS_HAS_OSSAUDIO} == "yes" +#CFLAGS+= -DHAVE_OSS +#.endif + +DOCDIR= ${PREFIX}/share/doc/xcdroast +SUPPORT_FILES= /dev/null ${PKG_SYSCONFDIR}/xcdroast.conf + +pre-build: + cd ${WRKSRC}; for file in io.c wavplay.c xcdroast.h; do \ + ${SED} -e "s|@PREFIX@|${PREFIX}|g" \ + -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" \ + -e "s|@DEVOSSAUDIO@|${DEVOSSAUDIO}|g" \ + $${file} > $${file}.fixed; \ + ${MV} -f $${file}.fixed $${file}; \ + done + +post-install: + ${INSTALL_DATA_DIR} ${DOCDIR} + cd ${WRKSRC}; \ + for file in COPYING DOCUMENTATION FAQ README.nonroot; do \ + ${INSTALL_DATA} $${file} ${DOCDIR}; \ + done + +.include "../../graphics/imlib/buildlink2.mk" +.include "../../mk/ossaudio.buildlink2.mk" +.include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/xcdroast/PLIST b/sysutils/xcdroast/PLIST index 7e96b7e8fd1..d8fd7f1cb7f 100644 --- a/sysutils/xcdroast/PLIST +++ b/sysutils/xcdroast/PLIST @@ -1,24 +1,29 @@ -@comment $NetBSD: PLIST,v 1.1 2001/10/31 22:54:18 zuntum Exp $ +@comment $NetBSD: PLIST,v 1.2 2002/09/26 12:29:55 jlam Exp $ bin/xcdroast -lib/xcdroast-0.98/bin/wavplay -lib/xcdroast-0.98/bin/rmtool -lib/xcdroast-0.98/bin/vrfytool -lib/xcdroast-0.98/bin/cddbtool -lib/xcdroast-0.98/bin/xcdrwrap -lib/xcdroast-0.98/icons/burnproof.gif -lib/xcdroast-0.98/icons/cddblogo.gif -lib/xcdroast-0.98/icons/dialog_default.png -lib/xcdroast-0.98/icons/dialog_error.png -lib/xcdroast-0.98/icons/dialog_information.png -lib/xcdroast-0.98/icons/dialog_question.png -lib/xcdroast-0.98/icons/dialog_warning.png -lib/xcdroast-0.98/icons/xcdrlogo.gif -lib/xcdroast-0.98/lang/lang_extract.sh -lib/xcdroast-0.98/lang/langhelp.def -lib/xcdroast-0.98/lang/language.def -lib/xcdroast-0.98/sound/test.wav -@dirrm lib/xcdroast-0.98/bin -@dirrm lib/xcdroast-0.98/icons -@dirrm lib/xcdroast-0.98/lang -@dirrm lib/xcdroast-0.98/sound -@dirrm lib/xcdroast-0.98 +lib/xcdroast-${BASE_VERS}/bin/wavplay +lib/xcdroast-${BASE_VERS}/bin/rmtool +lib/xcdroast-${BASE_VERS}/bin/vrfytool +lib/xcdroast-${BASE_VERS}/bin/cddbtool +lib/xcdroast-${BASE_VERS}/bin/xcdrwrap +lib/xcdroast-${BASE_VERS}/icons/burnproof.gif +lib/xcdroast-${BASE_VERS}/icons/cddblogo.gif +lib/xcdroast-${BASE_VERS}/icons/dialog_default.png +lib/xcdroast-${BASE_VERS}/icons/dialog_error.png +lib/xcdroast-${BASE_VERS}/icons/dialog_information.png +lib/xcdroast-${BASE_VERS}/icons/dialog_question.png +lib/xcdroast-${BASE_VERS}/icons/dialog_warning.png +lib/xcdroast-${BASE_VERS}/icons/xcdrlogo.gif +lib/xcdroast-${BASE_VERS}/lang/lang_extract.sh +lib/xcdroast-${BASE_VERS}/lang/langhelp.def +lib/xcdroast-${BASE_VERS}/lang/language.def +lib/xcdroast-${BASE_VERS}/sound/test.wav +share/doc/xcdroast/COPYING +share/doc/xcdroast/DOCUMENTATION +share/doc/xcdroast/FAQ +share/doc/xcdroast/README.nonroot +@dirrm share/doc/xcdroast +@dirrm lib/xcdroast-${BASE_VERS}/bin +@dirrm lib/xcdroast-${BASE_VERS}/icons +@dirrm lib/xcdroast-${BASE_VERS}/lang +@dirrm lib/xcdroast-${BASE_VERS}/sound +@dirrm lib/xcdroast-${BASE_VERS} diff --git a/sysutils/xcdroast/distinfo b/sysutils/xcdroast/distinfo index c691d9ccf82..3089ffb6c72 100644 --- a/sysutils/xcdroast/distinfo +++ b/sysutils/xcdroast/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.3 2001/08/07 11:27:35 drochner Exp $ +$NetBSD: distinfo,v 1.4 2002/09/26 12:29:55 jlam Exp $ SHA1 (xcdroast-0.98alpha9.tar.gz) = 7994b54ce0a0b55fe140f4b2ba14e0d1317d5d52 Size (xcdroast-0.98alpha9.tar.gz) = 649469 bytes -SHA1 (patch-aa) = a215d9737f0d69e7410ce5e4b902b865493624b2 -SHA1 (patch-ab) = bb019f49215db561d29f52971d186600f1db710e -SHA1 (patch-ac) = 5a9e1dafcc5438aa28e81025b32c356eee6c5d08 -SHA1 (patch-ad) = 0a9ec2f5f20a39211669fdb0b613955295a41720 +SHA1 (patch-aa) = 48365964de9a0ee2349fea063695c7b1d999b645 +SHA1 (patch-ab) = 39c716a03162a1c093e95442befbc65c8bd6fb76 +SHA1 (patch-ac) = 5d462c9c2521c85258b53030174fa91a2c76d73b +SHA1 (patch-ad) = 875d4c2a31a3590d7a566d4452b253edf30a75d9 diff --git a/sysutils/xcdroast/patches/patch-aa b/sysutils/xcdroast/patches/patch-aa index 7f88b408463..21bf181d0a7 100644 --- a/sysutils/xcdroast/patches/patch-aa +++ b/sysutils/xcdroast/patches/patch-aa @@ -1,7 +1,7 @@ -$NetBSD: patch-aa,v 1.2 2001/08/07 11:27:35 drochner Exp $ +$NetBSD: patch-aa,v 1.3 2002/09/26 12:29:56 jlam Exp $ ---- Makefile.orig Tue Jul 17 23:46:26 2001 -+++ Makefile Mon Aug 6 12:28:22 2001 +--- Makefile.orig Tue Jul 17 14:46:26 2001 ++++ Makefile @@ -6,7 +6,7 @@ # Installation prefix directory: @@ -11,3 +11,29 @@ $NetBSD: patch-aa,v 1.2 2001/08/07 11:27:35 drochner Exp $ PRE_LIBDIR=$(PREFIX)/lib/xcdroast-0.98 # put here the prefix where you want xcdroast to look for +@@ -23,9 +23,9 @@ INSTALL=/usr/bin/install -c + + #--- + +-CFLAGS=-Wall `gtk-config --cflags` `imlib-config --cflags` -DPRE_PREFIX="\"$(PREFIX)\"" -DPRE_LIBDIR="\"$(PRE_LIBDIR)\"" -DCDRTOOLS_PREFIX="\"$(CDRTOOLS_PREFIX)\"" +-CFLAGS2=-Wall `glib-config --cflags --libs` -DPRE_PREFIX="\"$(PREFIX)\"" -DPRE_LIBDIR="\"$(PRE_LIBDIR)\"" -DCDRTOOLS_PREFIX="\"$(CDRTOOLS_PREFIX)\"" +-LIBS=`gtk-config --libs` `imlib-config --libs` -lgdk_imlib ++CFLAGS=${X_CFLAGS} -Wall `gtk-config --cflags` `imlib-config --cflags` -DPRE_PREFIX="\"$(PREFIX)\"" -DPRE_LIBDIR="\"$(PRE_LIBDIR)\"" -DCDRTOOLS_PREFIX="\"$(CDRTOOLS_PREFIX)\"" ++CFLAGS2=${X_CFLAGS} -Wall `glib-config --cflags --libs` -DPRE_PREFIX="\"$(PREFIX)\"" -DPRE_LIBDIR="\"$(PRE_LIBDIR)\"" -DCDRTOOLS_PREFIX="\"$(CDRTOOLS_PREFIX)\"" ++LIBS=${X_LDFLAGS} `gtk-config --libs` `imlib-config --libs` -lgdk_imlib + TOOLLIBS=`gtk-config --libs` + CC=gcc + +@@ -48,10 +48,10 @@ all: xcdroast wavplay rmtool vrfytool cd + $(CC) $(CFLAGS) -c $< + + xcdroast: $(OBJ) +- $(CC) $(OBJ) $(LIBS) -o xcdroast ++ $(CC) $(OBJ) $(LIBS) $(LIBOSSAUDIO) -o xcdroast + + wavplay: wavplay.o wav_id.o tools.o +- $(CC) wavplay.o wav_id.o tools.o $(TOOLLIBS) -o wavplay ++ $(CC) wavplay.o wav_id.o tools.o $(TOOLLIBS) $(LIBOSSAUDIO) -o wavplay + cp wavplay lib/bin + + rmtool: rmtool.o diff --git a/sysutils/xcdroast/patches/patch-ab b/sysutils/xcdroast/patches/patch-ab index b87d8da5037..ce00c84bee4 100644 --- a/sysutils/xcdroast/patches/patch-ab +++ b/sysutils/xcdroast/patches/patch-ab @@ -1,13 +1,13 @@ -$NetBSD: patch-ab,v 1.1.1.1 2001/02/10 23:23:35 frueauf Exp $ +$NetBSD: patch-ab,v 1.2 2002/09/26 12:29:56 jlam Exp $ ---- xcdroast.h-orig Sun Nov 26 15:51:09 2000 -+++ xcdroast.h Sat Feb 10 00:03:29 2001 -@@ -80,14 +80,14 @@ +--- xcdroast.h.orig Tue Jul 17 12:40:54 2001 ++++ xcdroast.h +@@ -89,14 +89,14 @@ #define SAVEMASTERTRACK "mkisofs.out" /* default paths/configfile */ -#define PREFIX "/usr/local" -+#define PREFIX "@@PREFIX@@" ++#define PREFIX "@PREFIX@" #define LIBDIR "lib/xcdroast-0.98" #define CONFIGDIR "~/.xcdroast" #define CONFFILE "xcdr098.cfg" @@ -15,7 +15,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2001/02/10 23:23:35 frueauf Exp $ #define ISOOPTFILE "isoopt.cfg" #define ISOHEADERFILE "isoheader.cfg" -#define ROOTCONFIG "/etc/xcdroast.conf" -+#define ROOTCONFIG "@@PREFIX@@/etc/xcdroast.conf" ++#define ROOTCONFIG "@PKG_SYSCONFDIR@/xcdroast.conf" /* language stuff*/ #define MAXENTRIES 512 diff --git a/sysutils/xcdroast/patches/patch-ac b/sysutils/xcdroast/patches/patch-ac index 84e0a4363cf..81c7d5a7dcc 100644 --- a/sysutils/xcdroast/patches/patch-ac +++ b/sysutils/xcdroast/patches/patch-ac @@ -1,81 +1,137 @@ -$NetBSD: patch-ac,v 1.3 2001/08/07 11:27:35 drochner Exp $ +$NetBSD: patch-ac,v 1.4 2002/09/26 12:29:56 jlam Exp $ ---- io.c.orig Tue Jul 17 21:39:11 2001 -+++ io.c Mon Aug 6 12:18:41 2001 -@@ -20,7 +20,8 @@ +--- io.c.orig Tue Jul 17 12:39:11 2001 ++++ io.c +@@ -16,6 +16,14 @@ + #include <sys/wait.h> + #include <signal.h> + #include <time.h> ++#ifdef __NetBSD__ ++# include <sys/ioctl.h> ++# ifdef HAVE_OSS ++# include <soundcard.h> ++# else ++# include <sys/audioio.h> ++# endif ++#endif + #if defined(linux) || defined(__FreeBSD__) # include <sys/soundcard.h> # include <sys/ioctl.h> - #endif --#ifdef sun -+#if defined(sun) || defined(__NetBSD__) -+#include <sys/ioctl.h> - # include <sys/audioio.h> - #endif - #ifdef hpux -@@ -996,7 +997,7 @@ +@@ -996,22 +1004,22 @@ GList *get_dsp_devices() { GList *dsp; GList *loop; struct stat buf; -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) gchar *audiodev; #endif dsp = NULL; -@@ -1011,7 +1012,7 @@ + +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) + /* for linux check if /dev/dsp or /dev/dsp1 exist */ + +- if (stat("/dev/dsp",&buf) == 0) { +- dsp = g_list_append(dsp,"/dev/dsp"); ++ if (stat("@DEVOSSAUDIO@",&buf) == 0) { ++ dsp = g_list_append(dsp,"@DEVOSSAUDIO@"); + } + if (stat("/dev/dsp1",&buf) == 0) { dsp = g_list_append(dsp,"/dev/dsp1"); } #endif -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) /* check if the user has any special audio-hardware running, which set the AUDIODEV-environment-variable */ audiodev = getenv("AUDIODEV"); -@@ -1084,7 +1085,7 @@ +@@ -1066,15 +1074,15 @@ gchar *audiodev; + gchar *gen_mix_from_dspdev(gchar *dsp, gchar *ret) { + gchar tmp[MAXLINE]; + struct stat buf; +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) + gchar tmp2[MAXLINE]; + #endif + + strcpy(ret,""); + +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) + +- if (strncmp(dsp,"/dev/dsp",8) == 0) { ++ if (strncmp(dsp,"@DEVOSSAUDIO@",8) == 0) { + strcpy(tmp,dsp+8); + g_snprintf(tmp2,MAXLINE,"/dev/mixer%s",tmp); + +@@ -1084,7 +1092,7 @@ gchar tmp2[MAXLINE]; } } #endif -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) g_snprintf(tmp,MAXLINE,"%s%s",dsp,"ctl"); -@@ -2365,7 +2366,7 @@ - #if defined(linux) || defined(__FreeBSD__) +@@ -2362,10 +2370,10 @@ gint count; + + gint query_mixer() { + gint mix; +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) gint val; #endif -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) audio_info_t ainfo; #endif #ifdef hpux -@@ -2400,7 +2401,7 @@ +@@ -2380,7 +2388,7 @@ struct audio_gains again; + return -1; + } + +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) + + dodebug(10,"quering mixer %s\n", setupdata.mix_device); + mix = open(setupdata.mix_device, O_RDWR); +@@ -2400,7 +2408,7 @@ struct audio_gains again; return ((val & 0x7f) + ((val >> 8) & 0x7f))/2; #endif -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) dodebug(10,"quering mixer %s\n", setupdata.mix_device); mix = open(setupdata.mix_device, O_RDONLY); -@@ -2450,7 +2451,7 @@ +@@ -2450,7 +2458,7 @@ struct audio_gains again; gint set_mixer(gint val) { gint mix; -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) audio_info_t ainfo; #endif #ifdef hpux -@@ -2482,7 +2483,7 @@ +@@ -2464,7 +2472,7 @@ struct audio_gains again; + return -1; + } + +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) + + dodebug(10,"setting mixer %s to %d\n", setupdata.mix_device, val); + mix = open(setupdata.mix_device, O_RDWR); +@@ -2482,7 +2490,7 @@ struct audio_gains again; close(mix); #endif -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) dodebug(10,"setting mixer %s to %d\n", setupdata.mix_device, val); mix = open(setupdata.mix_device, O_WRONLY); -@@ -3275,6 +3276,9 @@ +@@ -3275,6 +3283,9 @@ gint ret,found; /* got the message that no medium is present? in this case, ignore return code */ if (strstr(line,"medium not present")) { diff --git a/sysutils/xcdroast/patches/patch-ad b/sysutils/xcdroast/patches/patch-ad index db6e4123bdb..fbcfb4f2a00 100644 --- a/sysutils/xcdroast/patches/patch-ad +++ b/sysutils/xcdroast/patches/patch-ad @@ -1,27 +1,61 @@ -$NetBSD: patch-ad,v 1.1 2001/03/10 10:31:34 drochner Exp $ +$NetBSD: patch-ad,v 1.2 2002/09/26 12:29:56 jlam Exp $ ---- wavplay.c~ Sat Jul 15 16:47:44 2000 -+++ wavplay.c Fri Mar 9 21:11:28 2001 -@@ -22,7 +22,8 @@ +--- wavplay.c.orig Tue Jul 17 12:39:14 2001 ++++ wavplay.c +@@ -14,6 +14,14 @@ + #include <unistd.h> + #include <fcntl.h> + #include <string.h> ++#ifdef __NetBSD__ ++#include <sys/ioctl.h> ++# ifdef HAVE_OSS ++# include <soundcard.h> ++# else ++# include <sys/audioio.h> ++# endif ++#endif + #if defined(linux) || defined(__CYGWIN32__) + #include <getopt.h> + #endif +@@ -22,7 +30,7 @@ #include <sys/soundcard.h> #include <sys/ioctl.h> #endif -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) -+#include <sys/ioctl.h> ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) #include <sys/audioio.h> #endif #ifdef hpux -@@ -100,7 +101,7 @@ +@@ -48,8 +56,8 @@ guchar waveHdr[44]; + gint abuf_size; + gchar *audiobuf; + +-#if defined(linux) || defined(__FreeBSD__) +-#define DEFAULT_AUDIO_DEVICE "/dev/dsp" ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) ++#define DEFAULT_AUDIO_DEVICE "@DEVOSSAUDIO@" + #elif defined (aix) + #define DEFAULT_AUDIO_DEVICE "" + #else +@@ -59,7 +67,7 @@ gchar *audiobuf; + #define DEFAULT_BUFFER_SIZE 32768 + + +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) + + /* open the sound-device of linux and set cd-quality */ + +@@ -110,7 +118,7 @@ gint flags; #endif -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) /* open the sound-device of solaris and set cd-quality */ -@@ -127,7 +128,9 @@ +@@ -137,7 +145,9 @@ gint flags; info.play.precision = 16; info.play.encoding = AUDIO_ENCODING_LINEAR; info.play.buffer_size = abuf_size; @@ -31,12 +65,16 @@ $NetBSD: patch-ad,v 1.1 2001/03/10 10:31:34 drochner Exp $ if (ioctl(audio, AUDIO_SETINFO, &info) == -1) { g_warning("Unable to set audio parameters\n"); -@@ -251,7 +254,7 @@ - #if defined(linux) || defined(__FreeBSD__) +@@ -332,10 +342,10 @@ gchar tmpswap; + } + + /* this sets also the global abuf_size-variable */ +-#if defined(linux) || defined(__FreeBSD__) ++#if defined(linux) || defined(__FreeBSD__) || (defined(__NetBSD__) && defined(HAVE_OSS)) audio = open_linux_audio(audio_dev); #endif -#ifdef sun -+#if defined(sun) || defined(__NetBSD__) ++#if defined(sun) || (defined(__NetBSD__) && !defined(HAVE_OSS)) audio = open_solaris_audio(audio_dev); #endif #ifdef hpux |