summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorwiz <wiz>2002-03-23 02:36:45 +0000
committerwiz <wiz>2002-03-23 02:36:45 +0000
commit8f7c837206a0ea1f30a214bc27b9c9133373f893 (patch)
treeee58074c38372899058419c3bb9b9f1dec0e8589 /audio
parent5ae94513df501ac91b63ac884c6eb236ce57b0f2 (diff)
downloadpkgsrc-8f7c837206a0ea1f30a214bc27b9c9133373f893.tar.gz
Update csound to 4.13.0.2a, provided by Ben Collver in pkg/14631.
Changes unknown, package changes: * the c-preprocessor should now correctly chose whether to build big-endian or little-endian specific code * added support for NetBSD native audio API
Diffstat (limited to 'audio')
-rw-r--r--audio/csound/Makefile13
-rw-r--r--audio/csound/PLIST6
-rw-r--r--audio/csound/distinfo23
-rw-r--r--audio/csound/files/rtNetBSD.c309
-rw-r--r--audio/csound/files/rtNetBSD.h20
-rw-r--r--audio/csound/patches/patch-aa13
-rw-r--r--audio/csound/patches/patch-ac12
-rw-r--r--audio/csound/patches/patch-ae79
-rw-r--r--audio/csound/patches/patch-ah79
-rw-r--r--audio/csound/patches/patch-ai31
-rw-r--r--audio/csound/patches/patch-al22
-rw-r--r--audio/csound/patches/patch-am22
-rw-r--r--audio/csound/patches/patch-ao369
-rw-r--r--audio/csound/patches/patch-at30
-rw-r--r--audio/csound/patches/patch-au13
-rw-r--r--audio/csound/patches/patch-av19
-rw-r--r--audio/csound/patches/patch-aw34
-rw-r--r--audio/csound/patches/patch-ax101
18 files changed, 820 insertions, 375 deletions
diff --git a/audio/csound/Makefile b/audio/csound/Makefile
index 1b38ae714b4..86f9d9f0981 100644
--- a/audio/csound/Makefile
+++ b/audio/csound/Makefile
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile,v 1.6 2002/03/12 22:31:44 jmc Exp $
+# $NetBSD: Makefile,v 1.7 2002/03/23 02:36:45 wiz Exp $
#
-DISTNAME= unofficial-csound-4.12.0.1b-linux.src
-PKGNAME= csound-4.12
+DISTNAME= unofficial-csound-4.13.0.2a-linux.src
+PKGNAME= csound-4.13.0.2a
CATEGORIES= audio
MASTER_SITES= ftp://mustec.bgsu.edu/pub/linux/
-MAINTAINER= collver@softhome.net
+MAINTAINER= collver@linuxfreemail.com
HOMEPAGE= http://www.csound.org
COMMENT= software synthesizer and sequencer
@@ -18,7 +18,10 @@ NO_BIN_ON_CDROM= ${RESTRICTED}
DIST_SUBDIR= csound
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --without-x --enable-OSS-RTAUDIO
+CONFIGURE_ARGS+= --without-x --enable-rtaudio=netbsd
CONFLICTS= csound-bath*
+pre-configure:
+ ${CP} ${FILESDIR}/rtNetBSD.h ${FILESDIR}/rtNetBSD.c ${WRKSRC}/new-src/
+
.include "../../mk/bsd.pkg.mk"
diff --git a/audio/csound/PLIST b/audio/csound/PLIST
index 7542316aae8..0cc72de8974 100644
--- a/audio/csound/PLIST
+++ b/audio/csound/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:15:33 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2002/03/23 02:36:45 wiz Exp $
bin/csound
bin/cvanal
bin/dnoise
@@ -29,9 +29,9 @@ include/sfheader.h
include/sysdep.h
lib/libcscore.so
lib/libcscore.so.4
-lib/libcscore.so.4.12.0.1b
+lib/libcscore.so.4.13.0.2a
lib/libcsound.so
lib/libcsound.so.4
-lib/libcsound.so.4.12.0.1b
+lib/libcsound.so.4.13.0.2a
share/csound/csound.txt
@dirrm share/csound
diff --git a/audio/csound/distinfo b/audio/csound/distinfo
index 490e06cdd49..6d9aa6acaf7 100644
--- a/audio/csound/distinfo
+++ b/audio/csound/distinfo
@@ -1,23 +1,24 @@
-$NetBSD: distinfo,v 1.5 2002/01/21 11:30:03 wiz Exp $
+$NetBSD: distinfo,v 1.6 2002/03/23 02:36:45 wiz Exp $
-SHA1 (csound/unofficial-csound-4.12.0.1b-linux.src.tar.gz) = d8fe02c3443fc0a7c4f1edd71e696dedb80af90a
-Size (csound/unofficial-csound-4.12.0.1b-linux.src.tar.gz) = 1053587 bytes
-SHA1 (patch-aa) = 086efe8952d682a929ceff55b5eb6f38594943e6
+SHA1 (csound/unofficial-csound-4.13.0.2a-linux.src.tar.gz) = 4c329ff4148a775fba9af7e39ce6ba59912d809c
+Size (csound/unofficial-csound-4.13.0.2a-linux.src.tar.gz) = 1076545 bytes
SHA1 (patch-ab) = 35e90d6265b2b7e2b51a0ab1b32ce81202952f5a
-SHA1 (patch-ac) = 935b3b30d5b07263c59d8868466617c94b77d050
+SHA1 (patch-ac) = 3d99734ab4e7324fc5339530e2f0a326ff963c91
SHA1 (patch-ad) = cd4c34a1ced10383c456cf409f053c366092d7ae
-SHA1 (patch-ae) = 6fec4f4c205a8b458dfc1a0861be9eb9b2005156
+SHA1 (patch-ae) = e3755458138c0905068ea8f084fe06a4b74ae815
SHA1 (patch-af) = 4f330a2468fe0a0b97c19076a7f682f6319cc198
SHA1 (patch-ag) = 6cc2cf7c1ac03a5a44ecdefeb7fb43c87f4f2529
-SHA1 (patch-ah) = 73e89feaa419fe2e8287cab303e04494a726f45c
-SHA1 (patch-ai) = cc5c74c0f32b8726e766b739130be5af442a1440
+SHA1 (patch-ah) = 379b41165b1ff39e5021f80809a9ab2e7db66668
SHA1 (patch-aj) = 2d18cf881d09e447969a623c88866c0624b19990
SHA1 (patch-ak) = eef2e5bf815a0359ca9c5474a26c8da038c5da0a
-SHA1 (patch-al) = e2a7a30496cfc70118f145590ed1658b459dd44b
-SHA1 (patch-am) = 4bd719ae9d402d6699a8e45782d04e4929e1e030
SHA1 (patch-an) = 29c786bdfbed4b1ae022b8dfdf4fa17409fbd9c9
-SHA1 (patch-ao) = ea7ed1e6172c3ece8c7f392a3f95504fda4befa3
+SHA1 (patch-ao) = 4b2dbffc454127035a84193f0047b5fd87c19c98
SHA1 (patch-ap) = a9bec9f3f85295544c8dca5c6e5fb8407e018764
SHA1 (patch-aq) = 1cbcf5bf584a1cd2510a6feeba4ab0124334b05b
SHA1 (patch-ar) = 853370ab5104e116d44fd36f4c7552992603ce12
SHA1 (patch-as) = 41a3409f389bd146ff9a21d0b983a7ec2e2ff4b6
+SHA1 (patch-at) = 4d545c4fabcb5cf6211a0f00ea2ea983adb83cd7
+SHA1 (patch-au) = bf1d88e516b9d09d1ea6c6c87101654a30ba98fa
+SHA1 (patch-av) = 194dc38b80780a5626fb2b5262fa2b56d68d337e
+SHA1 (patch-aw) = 31caa505d7d525c573553db59c28c620a09e521b
+SHA1 (patch-ax) = 0333e4289152d8f80b1967ee6331ca697b1729b9
diff --git a/audio/csound/files/rtNetBSD.c b/audio/csound/files/rtNetBSD.c
new file mode 100644
index 00000000000..abc066f9d89
--- /dev/null
+++ b/audio/csound/files/rtNetBSD.c
@@ -0,0 +1,309 @@
+/*
+ --- rtNetBSD.c ---
+
+ Native NetBSD audio support.
+
+ Ben Collver, collver@linuxfreemail.com
+*/
+
+#include <sys/types.h>
+#include <sys/audioio.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "cs.h"
+#include "soundio.h"
+#include "rtNetBSD.h"
+
+static int dspfd;
+
+static int ishift = 0, oshift = 0, oMaxLag;
+extern long nrecs;
+ long inrecs;
+extern OPARMS O;
+extern int Linefd;
+#ifdef PIPES
+extern FILE* Linepipe;
+# define _pclose pclose
+#endif
+
+static int getshift(int dsize) /* turn sample- or frame-size into shiftsize */
+{
+ switch(dsize) {
+ case 1: return(0);
+ case 2: return(1);
+ case 4: return(2);
+ case 8: return(3);
+ default: die("rtaudio: illegal dsize");
+ return(-1); /* Not reached */
+ }
+}
+
+
+void display_audio_info(
+ int fd,
+ const char *message,
+ audio_info_t *info)
+{
+ audio_encoding_t encoding;
+ char *encoding_name;
+
+ encoding.index = info->play.encoding;
+ if (ioctl(fd, AUDIO_GETENC, &encoding) == -1) {
+ asprintf(&encoding_name, "%d", info->play.encoding);
+ } else {
+ encoding_name = strdup(encoding.name);
+ }
+ printf("%-9s\n", message);
+ printf(" info.play.precision = %d\n", info->play.precision);
+ printf(" info.play.encoding = %s\n", encoding_name);
+ printf(" info.play.channels = %d\n", info->play.channels);
+ printf(" info.play.sample_rate = %d\n", info->play.sample_rate);
+ printf(" info.blocksize = %d\n\n", info->blocksize);
+ free(encoding_name);
+}
+
+void setsndparms(
+ int fd,
+ int format,
+ int nchnls,
+ MYFLT esr,
+ unsigned bufsiz)
+{
+ audio_info_t info;
+ int count;
+ int frag_size;
+
+ AUDIO_INITINFO(&info);
+
+ switch (format) {
+ case AE_UNCH:
+ info.play.precision = 8;
+ info.play.encoding = AUDIO_ENCODING_ULINEAR;
+ break;
+ case AE_CHAR:
+ info.play.precision = 8;
+ info.play.encoding = AUDIO_ENCODING_SLINEAR;
+ break;
+ case AE_ULAW:
+ info.play.precision = 8;
+ info.play.encoding = AUDIO_ENCODING_ULAW;
+ break;
+ case AE_ALAW:
+ info.play.precision = 8;
+ info.play.encoding = AUDIO_ENCODING_ALAW;
+ break;
+ case AE_SHORT:
+ /* audio(4) says AUDIO_ENCODING_SLINEAR uses platform's
+ byte order, so the below will automatically be BE on
+ a BE system, and LE on a LE system. Good/Bad/Ok? */
+
+ info.play.precision = 16;
+ info.play.encoding = AUDIO_ENCODING_SLINEAR;
+ break;
+ case AE_LONG:
+ info.play.precision = 32;
+ info.play.encoding = AUDIO_ENCODING_SLINEAR;
+ break;
+ case AE_FLOAT:
+ die("NetBSD audio does not support floating-point samples");
+ default:
+ die("unknown sample format");
+ }
+
+ info.play.channels = nchnls;
+ info.play.sample_rate = (unsigned int) esr;
+
+ /* set DMA buffer fragment size to Csound's output buffer size */
+ /*
+ * The or'ing is ABSOLUTELY crucial to obtaining quick response
+ * of csound to MIDI input - Please don't touch this line unless
+ * you know you can do better (in terms of MIDI response)
+ * [nicb@axnet.it]
+ */
+ frag_size = 16;
+ count = 4;
+ while (frag_size < bufsiz && count < 18) {
+ frag_size <<= 1;
+ count++;
+ }
+ count |= 0x0020000; /* Larry Troxler's Idea */
+ info.blocksize = frag_size;
+
+ /* from ossaudio.c ioctl SNDCTL_DSP_SETFRAGMENT */
+ info.hiwat = ((unsigned)count >> 16) & 0x7fff;
+ if (info.hiwat == 0)
+ info.hiwat = 65536;
+
+ if (ioctl(fd, AUDIO_SETINFO, &info) == -1) {
+ display_audio_info(fd, "requested", &info);
+ if (ioctl(fd, AUDIO_GETINFO, &info) != -1)
+ display_audio_info(fd, "got", &info);
+ die("unable to configure soundcard");
+ }
+}
+
+int find_mixer_label(int fd, int class, const char *name)
+{
+ int i;
+ int mclass;
+ int retval = -1;
+ mixer_devinfo_t info;
+
+ for (i = 0; ; i++) {
+ info.index = i;
+ if (ioctl(fd, AUDIO_MIXER_DEVINFO, &info) < 0)
+ break;
+ mclass = info.mixer_class;
+ if ((info.index == mclass || class == mclass) &&
+ !strcmp(info.label.name, name))
+ {
+ retval = i;
+ }
+ }
+ return retval;
+}
+
+void setvolume(unsigned volume)
+{
+ int fd;
+ int i;
+ int output_class;
+ int vol_output;
+ mixer_devinfo_t info;
+ mixer_ctrl_t value;
+
+ /* volume must be between 0 and 255 */
+
+ if ((fd = open(NETBSD_MIXER, O_WRONLY)) == -1)
+ die("unable to open soundcard mixer for setting volume");
+
+ output_class = find_mixer_label(fd, 0, "outputs");
+ vol_output = find_mixer_label(fd, output_class, "master");
+
+ if (vol_output == -1)
+ die("Could not find mixer control for audio output.");
+
+
+ info.index = vol_output;
+ ioctl(fd, AUDIO_MIXER_DEVINFO, &info);
+
+ value.dev = vol_output;
+ value.type = info.type;
+ value.un.value.num_channels = 2;
+ if (ioctl(fd, AUDIO_MIXER_READ, &value) < 0) {
+ value.un.value.num_channels = 1;
+ if (ioctl(fd, AUDIO_MIXER_READ, &value) < 0)
+ die("unable to read mixer on soundcard");
+ }
+
+ value.un.value.level[0] = 192;
+ value.un.value.level[1] = 192;
+ if (ioctl(fd, AUDIO_MIXER_WRITE, &value) < 0) {
+ die("unable to set output volume on soundcard");
+ }
+}
+
+
+void NetBSD_open(int nchnls, int dsize, MYFLT esr, int scale, int audio_mode)
+{
+ int dup;
+ int wbufsiz;
+ int audio_props;
+ audio_device_t device_info;
+#ifdef USE_SETSCHEDULER
+ extern void setscheduler(void);
+#endif
+
+ oMaxLag = O.oMaxLag; /* import DAC setting from command line */
+ if (oMaxLag <= 0) /* if DAC sampframes ndef in command line */
+ oMaxLag = IODACSAMPS; /* use the default value */
+ wbufsiz = oMaxLag * O.insampsiz;
+ switch (audio_mode) {
+ case NETBSD_RECORD:
+ if ((dspfd = open(NETBSD_SAMPLER, O_RDONLY)) == -1)
+ die("error while opening soundcard for audio input");
+ setsndparms(dspfd, O.informat, nchnls, esr, wbufsiz);
+ ishift = getshift(dsize);
+ break;
+ case NETBSD_PLAY:
+ if ((dspfd = open(NETBSD_SAMPLER, O_WRONLY)) == -1) {
+ perror("foo");
+ die("error while opening soundcard for audio output");
+ }
+ setsndparms(dspfd, O.outformat, nchnls, esr, wbufsiz);
+ /* 'oshift' is not currently used by the Linux driver, but... */
+ oshift = getshift(nchnls * dsize);
+ break;
+ case NETBSD_DUPLEX:
+ if ((dspfd = open(NETBSD_SAMPLER, O_RDWR)) == -1)
+ die("error during soundcard duplex mode query:");
+ ioctl(dspfd, AUDIO_GETPROPS, &audio_props);
+ if (!(audio_props | AUDIO_PROP_FULLDUPLEX))
+ die("hardware does not support full duplex mode");
+ setsndparms(dspfd, O.outformat, nchnls, esr, wbufsiz);
+ if (ioctl(dspfd, AUDIO_SETFD, audio_props) == -1)
+ die("error setting hardware to full duplex mode");
+ /* are these functions both required? */
+ oshift = getshift(nchnls * dsize);
+ ishift = getshift(dsize);
+ break;
+ default:
+ fprintf(stderr, "mode specification error in NetBSD_open: ");
+ fprintf(stderr, "unknown argument %d\n", audio_mode);
+ exit(1);
+ }
+
+ ioctl(dspfd, AUDIO_GETDEV, &device_info);
+ fprintf(stderr, "NetBSD audio info: %s, %s, %s\n",
+ device_info.name,
+ device_info.version,
+ device_info.config);
+#ifdef USE_SETSCHEDULER
+ setscheduler();
+#endif
+}
+
+int rtrecord(char *inbuf, int nbytes) /* get samples from ADC */
+{
+ /* J. Mohr 1995 Oct 17 */
+ if ( (nbytes = read(dspfd, inbuf, nbytes)) == -1 )
+ die("error while reading DSP device for audio input");
+ return(nbytes);
+}
+
+void rtplay(char *outbuf, int nbytes) /* put samples to DAC */
+ /* N.B. This routine serves as a THROTTLE in Csound Realtime Performance, */
+ /* delaying the actual writes and return until the hardware output buffer */
+ /* passes a sample-specific THRESHOLD. If the I/O BLOCKING functionality */
+ /* is implemented ACCURATELY by the vendor-supplied audio-library write, */
+ /* that is sufficient. Otherwise, requires some kind of IOCTL from here. */
+ /* This functionality is IMPORTANT when other realtime I/O is occurring, */
+ /* such as when external MIDI data is being collected from a serial port. */
+ /* Since Csound polls for MIDI input at the software synthesis K-rate */
+ /* (the resolution of all software-synthesized events), the user can */
+ /* eliminate MIDI jitter by requesting that both be made synchronous with */
+ /* the above audio I/O blocks, i.e. by setting -b to some 1 or 2 K-prds. */
+{
+ long sampframes = nbytes >> oshift;
+ /* J. Mohr 1995 Oct 17 */
+ if (write(dspfd, outbuf, nbytes) < nbytes)
+ printf("/dev/audio: couldn't write all bytes requested\n");
+ nrecs++;
+}
+
+void rtclose(void) /* close the I/O device entirely */
+{ /* called only when both complete */
+ /* J. Mohr 1995 Oct 17 */
+ if (close(dspfd) == -1)
+ die("unable to close DSP device");
+ if (O.Linein) {
+#ifdef PIPES
+ if (O.Linename[0]=='|') _pclose(Linepipe);
+ else
+#endif
+ if (strcmp(O.Linename, "stdin")!=0) close(Linefd);
+ }
+}
diff --git a/audio/csound/files/rtNetBSD.h b/audio/csound/files/rtNetBSD.h
new file mode 100644
index 00000000000..ddb410227e1
--- /dev/null
+++ b/audio/csound/files/rtNetBSD.h
@@ -0,0 +1,20 @@
+/* rtNetBSD.h */
+
+#ifndef _RTNETBSD_INCLUDED
+#define _RTNETBSD_INCLUDED
+
+#define NETBSD_RECORD 0
+#define NETBSD_PLAY 1
+#define NETBSD_DUPLEX 2
+
+#define USE_SETSCHEDULER
+
+#define NETBSD_MIXER "/dev/mixer0"
+#define NETBSD_SAMPLER "/dev/sound0"
+
+#define recopen(a,b,c,d) NetBSD_open(a,b,c,d,NETBSD_DUPLEX)
+#define playopen(a,b,c,d) NetBSD_open(a,b,c,d,NETBSD_PLAY)
+
+extern void NetBSD_open(int, int, MYFLT, int, int);
+
+#endif /* _RTNETBSD_INCLUDED */
diff --git a/audio/csound/patches/patch-aa b/audio/csound/patches/patch-aa
deleted file mode 100644
index 854089b84b5..00000000000
--- a/audio/csound/patches/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2001/03/13 13:18:24 wiz Exp $
-
---- LINUXaudio.c.orig Thu Sep 21 21:55:30 2000
-+++ LINUXaudio.c
-@@ -21,7 +21,7 @@
-
- #include <unistd.h>
- #include <sys/ioctl.h>
--#include <sys/soundcard.h>
-+#include <soundcard.h>
- #include "cs.h"
- #include "soundio.h"
-
diff --git a/audio/csound/patches/patch-ac b/audio/csound/patches/patch-ac
index d876fd075ef..89b35f6fd80 100644
--- a/audio/csound/patches/patch-ac
+++ b/audio/csound/patches/patch-ac
@@ -1,13 +1,13 @@
-$NetBSD: patch-ac,v 1.2 2001/06/29 18:39:03 wiz Exp $
+$NetBSD: patch-ac,v 1.3 2002/03/23 02:36:47 wiz Exp $
---- Make.Variables.in.orig Sun Jun 3 18:13:08 2001
-+++ Make.Variables.in Sun Jun 3 18:13:36 2001
-@@ -229,7 +229,7 @@
- $(TOP)/configure.in sliders.tk matrix.tk matrix.hlp
+--- Make.Variables.in.orig Sun Sep 9 10:54:48 2001
++++ Make.Variables.in
+@@ -253,7 +253,7 @@
+ $(DIST_MALDONADO_WIDGET_HEADER)
SRCDISTRIB_DIRS=$(SUBDIRS) $(DOC_DIRS)
STRINGSDB=csound.txt
-CSLIBDIR=${prefix}/lib/csound/${VERSION}
-+CSLIBDIR=${prefix}/share/csound/
++CSLIBDIR=${prefix}/share/csound
ZIP=gzip -f --best
MKDIR=mkdir -p
EXE=
diff --git a/audio/csound/patches/patch-ae b/audio/csound/patches/patch-ae
index d6d35fd78c2..15c3952c062 100644
--- a/audio/csound/patches/patch-ae
+++ b/audio/csound/patches/patch-ae
@@ -1,16 +1,54 @@
-$NetBSD: patch-ae,v 1.2 2001/06/29 18:39:03 wiz Exp $
+$NetBSD: patch-ae,v 1.3 2002/03/23 02:36:47 wiz Exp $
---- configure.in.orig Sun Jun 3 18:14:50 2001
-+++ configure.in Sun Jun 3 18:20:52 2001
-@@ -364,6 +364,7 @@
- CSOUND_CONF_MESSAGE(enable the OSS-RTAUDIO driver...)
- RTAUDIO_DRIVER=["LINUXaudio.c \${LINUX_DISTRIB_DIR}/OSSrtaudio.c"]
- DEFS=["${DEFS} -DOSSRTAUDIO"]
-+ LIBS=["-lossaudio ${LIBS}"]
+--- configure.in.orig Sun Sep 9 10:54:48 2001
++++ configure.in
+@@ -32,6 +32,7 @@
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_CANONICAL_HOST
++AC_C_BIGENDIAN
+
+ dnl Below here is the result of running autoscan on the csound sources
+ dnl Process this file with autoconf to produce a configure script.
+@@ -345,19 +346,21 @@
+ dnl [enable_ALSA_driver="no"])dnl
+
+ dnl
+-dnl --enable-rtaudio={oss,alsa,esd} (default=oss)
++dnl --enable-rtaudio={oss,alsa,esd,netbsd} (default=oss)
+ dnl
+ dnl The oss module has been provided by Steve Kersten {steve@k-hornz.de}
+ dnl The esd module has been provided by Nicola Bernardini {nicb@axnet.it}
+ dnl The alsa module has been provided by Markus Gruber {gruber@eikon.tum.de}
++dnl The netbsd module has been provided by Ben {collver@linuxfreemail.com}
+ dnl
+ dnl
+ AC_ARG_ENABLE(rtaudio,
+- [ --enable-rtaudio={oss|alsa|esd} enable real-time audio (default: oss)],
++ [ --enable-rtaudio={oss|alsa|esd|netbsd} enable real-time audio (default: oss)],
+ [case "${enable_rtaudio}" in
+ oss) ;;
+ alsa) ;;
+ esd) ;;
++ netbsd) ;;
+ *) AC_MSG_ERROR(bad value ${enable_rtaudio} for the real-time audio option) ;;
+ esac],
+ [enable_rtaudio="oss"])dnl
+@@ -384,6 +387,13 @@
+ DEFS=["${DEFS} -DESDRTAUDIO"]
fi
- if test "${enable_rtaudio}" = "alsa"
-@@ -613,8 +614,8 @@
++if test "${enable_rtaudio}" = "netbsd"
++then
++ CSOUND_CONF_MESSAGE(enable the netbsd audio driver...)
++ RTAUDIO_DRIVER=[\${LINUX_DISTRIB_DIR}/rtNetBSD.c]
++ DEFS=["${DEFS} -DNETBSDRTAUDIO"]
++fi
++
+ dnl
+ dnl --enable-OSC-opcodes (default=no)
+ dnl
+@@ -653,8 +663,8 @@
dnl
case $host in
@@ -21,18 +59,11 @@ $NetBSD: patch-ae,v 1.2 2001/06/29 18:39:03 wiz Exp $
;;
*)
;;
-@@ -648,10 +649,10 @@
- changequote(<<, >>)dnl
- csound_version_full=`(cat ${version_file}; echo VERSIONSTRING) | ${CPP} - | ${AWK} '/^" v"/ { gsub(/[" v]/,""); print $0; }'`
- changequote([, ])dnl
-- csound_version_major=`echo ${csound_version_full} | cut -d '.' -f 1 -`
-- csound_version_minor=`echo ${csound_version_full} | cut -d '.' -f 2 -`
-- csound_patchlevel=`echo ${csound_version_full} | cut -d '.' -f 3 -`
-- csound_betalevel=`echo ${csound_version_full} | cut -d '.' -f 4 -`
-+ csound_version_major=`echo ${csound_version_full} | cut -d '.' -f 1`
-+ csound_version_minor=`echo ${csound_version_full} | cut -d '.' -f 2`
-+ csound_patchlevel=`echo ${csound_version_full} | cut -d '.' -f 3`
-+ csound_betalevel=`echo ${csound_version_full} | cut -d '.' -f 4`
+@@ -736,6 +746,7 @@
+ AC_SUBST(LD)dnl
+ AC_SUBST(CSOUND_INSTALLATION_MODE)dnl
+ AC_SUBST(csound_float)dnl
++AC_SUBST(WORDS_BIGENDIAN)dnl
- CSOUND_CONF_MESSAGE(almost done configuring for csound version ${csound_version_major}.${csound_version_minor}.${csound_patchlevel}.${csound_betalevel}...)
- else
+ AC_OUTPUT(Make.Variables new-src/version.h)
+ CSOUND_CONF_MESSAGE(configure process terminated; you should now run 'make depend; make')
diff --git a/audio/csound/patches/patch-ah b/audio/csound/patches/patch-ah
index 32e60b5ed64..f308c1317fc 100644
--- a/audio/csound/patches/patch-ah
+++ b/audio/csound/patches/patch-ah
@@ -1,17 +1,84 @@
-$NetBSD: patch-ah,v 1.1.1.1 2001/03/13 13:18:24 wiz Exp $
+$NetBSD: patch-ah,v 1.2 2002/03/23 02:36:47 wiz Exp $
---- midisend.c.orig Sun Dec 10 16:37:35 2000
+--- midisend.c.orig Mon Feb 22 09:20:19 1999
+++ midisend.c
-@@ -29,8 +29,10 @@
+@@ -22,6 +22,8 @@
+ dlphilp@bright.net
+ */
+
++#undef USE_DLP_MIDI_OUT_CODE
++
+ #ifdef LINUX
+
+ #include <unistd.h>
+@@ -29,8 +31,20 @@
#include <ctype.h>
#include <sys/ioctl.h>
#include <fcntl.h>
-#ifdef FREE_BSD
-# include <sys/soundcard.h>
+#ifdef BSD
-+# include <soundcard.h>
-+#define SEQ_DEFINEBUF(x); /*SEQ_DEFINEBUF(x)*/
-+#define SEQ_MIDIOUT(x,y); /*SEQ_MIDIOUT(x,y)*/
++#ifdef USE_DLP_MIDI_OUT_CODE
++#include <sys/midiio.h>
++#define SEQ_MIDIPUTC SEQOLD_MIDIPUTC
++#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0
++#define _SEQ_ADVBUF(len) _seqbufptr += len
++#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump()
++#define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\
++ _seqbuf[_seqbufptr] = SEQ_MIDIPUTC;\
++ _seqbuf[_seqbufptr+1] = (byte);\
++ _seqbuf[_seqbufptr+2] = (device);\
++ _seqbuf[_seqbufptr+3] = 0;\
++ _SEQ_ADVBUF(4);}
++#endif
#else
# include <linux/soundcard.h>
#endif
+@@ -55,7 +69,7 @@
+
+ /* Older DLP code begins here */
+
+-/*
++#ifdef USE_DLP_MIDI_OUT_CODE
+ int MIDIoutDONE = 0;
+
+ #ifdef LINUX
+@@ -77,8 +91,6 @@
+ _seqbufptr = 0;
+ }
+
+-#define _gotMIDIout (1)
+-
+ void send_midi_message(int status, int data1, int data2)
+ {
+ SEQ_MIDIOUT(DEVNUM,status);
+@@ -150,10 +162,10 @@
+
+ #endif
+
+-*/
+-
+ /* End of older DLP code */
+
++#else /* ! USE_DLP_MIDI_OUT_CODE */
++
+ /* Begin MIDI code from Paul Barton-Davis */
+
+ int MIDIoutDONE = 0;
+@@ -247,7 +259,7 @@
+ {
+ char devname[64];
+
+- sprintf (devname, "/dev/midi%02d", midi_out);
++ sprintf (devname, "/dev/rmidi%d", midi_out);
+ printf ("opening %s as MIDI out\n", devname);
+ if (MIDIoutDONE==0 && (midifd= open(devname, O_WRONLY)) < 0)
+ printf("Can't open MIDI device\n");
+@@ -257,6 +269,7 @@
+ #endif LINUX
+
+ /* End of Paul Barton-Davis code */
++#endif /* ! USE_DLP_MIDI_OUT_CODE */
+
+ /* ********************************* */
+ /* This section for Windows95 and NT */
diff --git a/audio/csound/patches/patch-ai b/audio/csound/patches/patch-ai
deleted file mode 100644
index 0147a965b58..00000000000
--- a/audio/csound/patches/patch-ai
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-ai,v 1.1.1.1 2001/03/13 13:18:24 wiz Exp $
-
---- new-src/OSSrtaudio.c.orig Thu Sep 21 21:56:00 2000
-+++ new-src/OSSrtaudio.c
-@@ -16,14 +16,14 @@
- #include <unistd.h>
- #include <fcntl.h>
- #include <sys/ioctl.h>
--#include <sys/soundcard.h>
-+#include <soundcard.h>
-
- #include "cs.h"
- #include "soundio.h"
- #include "OSSrtaudio.h"
-
--char *oss_in = "/dev/dsp";
--char *oss_out = "/dev/dsp";
-+char *oss_in = "/dev/audio";
-+char *oss_out = "/dev/audio";
-
- static int dspfd;
- void setsndparms(int, int, int, MYFLT, unsigned);
-@@ -130,7 +130,7 @@
- long sampframes = nbytes >> oshift;
- /* J. Mohr 1995 Oct 17 */
- if (write(dspfd, outbuf, nbytes) < nbytes)
-- printf("/dev/dsp: couldn't write all bytes requested\n");
-+ printf("/dev/audio: couldn't write all bytes requested\n");
- nrecs++;
- }
-
diff --git a/audio/csound/patches/patch-al b/audio/csound/patches/patch-al
deleted file mode 100644
index f107a99d833..00000000000
--- a/audio/csound/patches/patch-al
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-al,v 1.1.1.1 2001/03/13 13:18:24 wiz Exp $
-
---- rtaudio.c.orig Thu Feb 3 22:52:01 2000
-+++ rtaudio.c
-@@ -37,7 +37,7 @@
- #ifdef LINUX /* Jonathan Mohr 1995 Oct 17 */
- #include <unistd.h>
- #include <fcntl.h>
--#define DSP_NAME "/dev/dsp"
-+#define DSP_NAME "/dev/audio"
- static int dspfd;
- void setsndparms(int, int, int, float, unsigned);
- void setvolume(unsigned);
-@@ -648,7 +648,7 @@
-
- #ifdef LINUX /* J. Mohr 1995 Oct 17 */
- if (write(dspfd, outbuf, nbytes) < nbytes)
-- printf(Str(X_177,"/dev/dsp: couldn't write all bytes requested\n"));
-+ printf(Str(X_177,"/dev/audio: couldn't write all bytes requested\n"));
- #endif
- #ifdef __BEOS__
- while (nbytes > 0) {
diff --git a/audio/csound/patches/patch-am b/audio/csound/patches/patch-am
deleted file mode 100644
index 50015663f76..00000000000
--- a/audio/csound/patches/patch-am
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-am,v 1.1.1.1 2001/03/13 13:18:24 wiz Exp $
-
---- rtlinux.c.orig Tue Oct 3 08:25:40 2000
-+++ rtlinux.c
-@@ -10,7 +10,7 @@
-
- #include <unistd.h>
- #include <fcntl.h>
--#define DSP_NAME "/dev/dsp"
-+#define DSP_NAME "/dev/audio"
- static int dspfd;
- void setsndparms(int, int, int, MYFLT, unsigned);
- void setvolume(unsigned);
-@@ -112,7 +112,7 @@
- long sampframes = nbytes >> oshift;
- /* J. Mohr 1995 Oct 17 */
- if (write(dspfd, outbuf, nbytes) < nbytes)
-- printf(Str(X_177,"/dev/dsp: couldn't write all bytes requested\n"));
-+ printf(Str(X_177,"/dev/audio: couldn't write all bytes requested\n"));
- nrecs++;
- }
-
diff --git a/audio/csound/patches/patch-ao b/audio/csound/patches/patch-ao
index 907a1a5f6d9..b984bfeec03 100644
--- a/audio/csound/patches/patch-ao
+++ b/audio/csound/patches/patch-ao
@@ -1,8 +1,114 @@
-$NetBSD: patch-ao,v 1.1 2002/01/11 14:50:32 skrll Exp $
+$NetBSD: patch-ao,v 1.2 2002/03/23 02:36:48 wiz Exp $
---- configure.orig Fri Jan 11 13:58:48 2002
+--- configure.orig Sun Sep 9 10:55:54 2001
+++ configure
-@@ -1211,7 +1211,7 @@
+@@ -20,7 +20,7 @@
+ ac_help="$ac_help
+ --enable-debug enable debug flags (default: no)"
+ ac_help="$ac_help
+- --enable-rtaudio={oss|alsa|esd} enable real-time audio (default: oss)"
++ --enable-rtaudio={oss|alsa|esd|netbsd} enable real-time audio (default: oss)"
+ ac_help="$ac_help
+ --enable-OSC-opcodes enable OSC opcodes (default: no)
+ (requires the OSC library - read new-src/README.OSC)"
+@@ -969,6 +969,96 @@
+ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ echo "$ac_t""$host" 1>&6
+
++echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
++echo "configure:974: checking whether byte ordering is bigendian" >&5
++if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ ac_cv_c_bigendian=unknown
++# See if sys/param.h defines the BYTE_ORDER macro.
++cat > conftest.$ac_ext <<EOF
++#line 981 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++#include <sys/param.h>
++int main() {
++
++#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
++ bogus endian macros
++#endif
++; return 0; }
++EOF
++if { (eval echo configure:992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ # It does; now see whether it defined to BIG_ENDIAN or not.
++cat > conftest.$ac_ext <<EOF
++#line 996 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++#include <sys/param.h>
++int main() {
++
++#if BYTE_ORDER != BIG_ENDIAN
++ not big endian
++#endif
++; return 0; }
++EOF
++if { (eval echo configure:1007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_c_bigendian=yes
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -rf conftest*
++ ac_cv_c_bigendian=no
++fi
++rm -f conftest*
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++fi
++rm -f conftest*
++if test $ac_cv_c_bigendian = unknown; then
++if test "$cross_compiling" = yes; then
++ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
++else
++ cat > conftest.$ac_ext <<EOF
++#line 1027 "configure"
++#include "confdefs.h"
++main () {
++ /* Are we little or big endian? From Harbison&Steele. */
++ union
++ {
++ long l;
++ char c[sizeof (long)];
++ } u;
++ u.l = 1;
++ exit (u.c[sizeof (long) - 1] == 1);
++}
++EOF
++if { (eval echo configure:1040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++then
++ ac_cv_c_bigendian=no
++else
++ echo "configure: failed program was:" >&5
++ cat conftest.$ac_ext >&5
++ rm -fr conftest*
++ ac_cv_c_bigendian=yes
++fi
++rm -fr conftest*
++fi
++
++fi
++fi
++
++echo "$ac_t""$ac_cv_c_bigendian" 1>&6
++if test $ac_cv_c_bigendian = yes; then
++ cat >> confdefs.h <<\EOF
++#define WORDS_BIGENDIAN 1
++EOF
++
++fi
++
+
+
+ # Find a good install program. We prefer a C program (faster),
+@@ -1213,7 +1303,7 @@
fi
fi
@@ -11,182 +117,30 @@ $NetBSD: patch-ao,v 1.1 2002/01/11 14:50:32 skrll Exp $
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-@@ -2483,12 +2483,13 @@
- echo "configure:2484: enable the OSS-RTAUDIO driver..." >&5
- RTAUDIO_DRIVER="LINUXaudio.c \${LINUX_DISTRIB_DIR}/OSSrtaudio.c"
- DEFS="${DEFS} -DOSSRTAUDIO"
-+ LIBS="-lossaudio ${LIBS}"
- fi
-
- if test "${enable_rtaudio}" = "alsa"
- then
- echo "enable the ALSA driver..." 1>&6
--echo "configure:2492: enable the ALSA driver..." >&5
-+echo "configure:2493: enable the ALSA driver..." >&5
- RTAUDIO_DRIVER=\${LINUX_DISTRIB_DIR}/ALSArtaudio-block.c
- LIBS="-lasound ${LIBS}"
- fi
-@@ -2496,7 +2497,7 @@
- if test "${enable_rtaudio}" = "esd"
- then
- echo "enable the esound server driver..." 1>&6
--echo "configure:2500: enable the esound server driver..." >&5
-+echo "configure:2501: enable the esound server driver..." >&5
- RTAUDIO_DRIVER=\${LINUX_DISTRIB_DIR}/esd-rtaudio.c
- LIBS="-lesd ${LIBS}"
+@@ -2451,6 +2541,7 @@
+ oss) ;;
+ alsa) ;;
+ esd) ;;
++ netbsd) ;;
+ *) { echo "configure: error: bad value ${enable_rtaudio} for the real-time audio option" 1>&2; exit 1; } ;;
+ esac
+ else
+@@ -2482,6 +2573,14 @@
DEFS="${DEFS} -DESDRTAUDIO"
-@@ -2517,7 +2518,7 @@
- if test "${enable_OSC_opcodes}" = "yes"
- then
- echo "enable the OSC opcodes..." 1>&6
--echo "configure:2521: enable the OSC opcodes..." >&5
-+echo "configure:2522: enable the OSC opcodes..." >&5
- OSC_OPCODES="\${LINUX_DISTRIB_DIR}/OSC-sock.c"
- DEFS="${DEFS} -DENABLE_OSC"
- LIBS="-lOSC -lOSCtools ${LIBS}"
-@@ -2540,18 +2541,18 @@
- if test "${enable_profile}" = "yes"
- then
- echo "enable profile flags (csound will get linked statically)..." 1>&6
--echo "configure:2544: enable profile flags (csound will get linked statically)..." >&5
-+echo "configure:2545: enable profile flags (csound will get linked statically)..." >&5
- want_static_link="yes"
- if test "$GCC" = "yes" -a "$GXX" = "yes"
- then
- echo "we have gcc and g++" 1>&6
--echo "configure:2549: we have gcc and g++" >&5
-+echo "configure:2550: we have gcc and g++" >&5
- CFLAGS="-pg ${CFLAGS}"
- CXXFLAGS="-pg ${CXXFLAGS}"
- LDFLAGS="-pg ${LDFLAGS}"
- else
- echo "we do not have gcc nor g++" 1>&6
--echo "configure:2555: we do not have gcc nor g++" >&5
-+echo "configure:2556: we do not have gcc nor g++" >&5
- CFLAGS="-p ${CFLAGS}"
- CXXFLAGS="-p ${CXXFLAGS}"
- LDFLAGS="-p ${LDFLAGS}"
-@@ -2562,7 +2563,7 @@
- if test "${enable_debug}" != "yes" && test "${enable_profile}" != "yes"
- then
- echo "will strip executables to make them smaller..." 1>&6
--echo "configure:2566: will strip executables to make them smaller..." >&5
-+echo "configure:2567: will strip executables to make them smaller..." >&5
- LDFLAGS="-s ${LDFLAGS}" # we may strip the executables
- fi
-
-@@ -2583,14 +2584,14 @@
- if test "${enable_sliders}" = "tk" -o "${enable_sliders}" = "yes"
- then
- echo "enabling tk sliders..." 1>&6
--echo "configure:2587: enabling tk sliders..." >&5
-+echo "configure:2588: enabling tk sliders..." >&5
- DEFS="${DEFS} -DTCLTK"
- fi
-
- if test "${enable_sliders}" = "ipc"
- then
- echo "enabling unix IPC sliders..." 1>&6
--echo "configure:2594: enabling unix IPC sliders..." >&5
-+echo "configure:2595: enabling unix IPC sliders..." >&5
- DEFS="${DEFS} -DIPCSLIDERS"
fi
-@@ -2609,7 +2610,7 @@
- if test "${enable_suid}" = "yes"
- then
- echo "csound will be installed with the suid flags set..." 1>&6
--echo "configure:2613: csound will be installed with the suid flags set..." >&5
-+echo "configure:2614: csound will be installed with the suid flags set..." >&5
- CSOUND_INSTALLATION_MODE="6755"
- else
- CSOUND_INSTALLATION_MODE="755"
-@@ -2634,7 +2635,7 @@
- if test "${enable_linebuf}" = "yes"
- then
- echo "csound will force line buffering for stdout and stderr (buffering: $linebuf_value...)" 1>&6
--echo "configure:2638: csound will force line buffering for stdout and stderr (buffering: $linebuf_value...)" >&5
-+echo "configure:2639: csound will force line buffering for stdout and stderr (buffering: $linebuf_value...)" >&5
- cat >> confdefs.h <<EOF
- #define FORCE_STDOUT_LBUF $linebuf_value
- EOF
-@@ -2647,7 +2648,7 @@
- # Uses ac_ vars as temps to allow command line to override cache and checks.
- # --without-x overrides everything else, but does not touch the cache.
- echo $ac_n "checking for X""... $ac_c" 1>&6
--echo "configure:2651: checking for X" >&5
-+echo "configure:2652: checking for X" >&5
-
- # Check whether --with-x or --without-x was given.
- if test "${with_x+set}" = set; then
-@@ -2709,12 +2710,12 @@
-
- # First, try using that file with no special directory specified.
- cat > conftest.$ac_ext <<EOF
--#line 2713 "configure"
-+#line 2714 "configure"
- #include "confdefs.h"
- #include <$x_direct_test_include>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
--{ (eval echo configure:2718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-+{ (eval echo configure:2719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
-@@ -2783,14 +2784,14 @@
- ac_save_LIBS="$LIBS"
- LIBS="-l$x_direct_test_library $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 2787 "configure"
-+#line 2788 "configure"
- #include "confdefs.h"
-
- int main() {
- ${x_direct_test_function}()
- ; return 0; }
- EOF
--if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- LIBS="$ac_save_LIBS"
- # We can link X programs with no special library path.
-@@ -2881,14 +2882,14 @@
- if test "$no_x" != "yes" && test "$have_x" = yes
- then
- echo "using X11 libraries..." 1>&6
--echo "configure:2885: using X11 libraries..." >&5
-+echo "configure:2886: using X11 libraries..." >&5
- xlib_used=-lX11
- winsrc_used=winX11.c
- winobj_used=winX11.o
- windows_define_used=-DWINDOWS
- else
- echo "not using X11 libraries..." 1>&6
--echo "configure:2892: not using X11 libraries..." >&5
-+echo "configure:2893: not using X11 libraries..." >&5
- xlib_used=
- winsrc_used=
- winobj_used=
-@@ -2917,7 +2918,7 @@
- if test "${enable_dyn}" = "yes" && test "${want_static_link}" = "no"
- then
- echo "csound will get linked dynamically..." 1>&6
--echo "configure:2921: csound will get linked dynamically..." >&5
-+echo "configure:2922: csound will get linked dynamically..." >&5
- cslib='$(CSADYNSO)'
- libcscore='$(LIBCSCORE_DYNSO)'
- CFLAGS="-fPIC ${CFLAGS}"
-@@ -2925,7 +2926,7 @@
- LIBS="-l${csound_app_prefix}csound ${LIBS}"
- else
- echo "csound will get linked statically${static_link_reason}..." 1>&6
--echo "configure:2929: csound will get linked statically${static_link_reason}..." >&5
-+echo "configure:2930: csound will get linked statically${static_link_reason}..." >&5
- cslib='$(CSASTAT)'
- libcscore='$(LIBCSCORE_STAT)'
- bindistrib_version="-static${bindistrib_version}"
-@@ -2934,8 +2935,8 @@
++if test "${enable_rtaudio}" = "netbsd"
++then
++ echo "enable the netbsd audio driver..." 1>&6
++echo "configure:2580: enable the netbsd audio driver..." >&5
++ RTAUDIO_DRIVER=\${LINUX_DISTRIB_DIR}/rtNetBSD.c
++ DEFS="${DEFS} -DNETBSDRTAUDIO"
++fi
++
+ # Check whether --enable-OSC_opcodes or --disable-OSC_opcodes was given.
+ if test "${enable_OSC_opcodes+set}" = set; then
+ enableval="$enable_OSC_opcodes"
+@@ -3020,8 +3119,8 @@
case $host in
@@ -197,60 +151,11 @@ $NetBSD: patch-ao,v 1.1 2002/01/11 14:50:32 skrll Exp $
;;
*)
;;
-@@ -2944,12 +2945,12 @@
- case $host in
- alpha*linux)
- echo "setting CC wrapper for alpha..." 1>&6
--echo "configure:2948: setting CC wrapper for alpha..." >&5
-+echo "configure:2949: setting CC wrapper for alpha..." >&5
- CC='$(TOP)/new-src/alpha-gcc.sh'
- ;;
- powerpc*linux)
- echo "adjusting MINSHORT for LinuxPPC..." 1>&6
--echo "configure:2953: adjusting MINSHORT for LinuxPPC..." >&5
-+echo "configure:2954: adjusting MINSHORT for LinuxPPC..." >&5
- local_defines="${local_defines} -DHAVE_SHRT_MIN"
- ;;
- *)
-@@ -2959,7 +2960,7 @@
- if test -n "${local_defines}"
- then
- echo "added ${local_defines} compile-time defines..." 1>&6
--echo "configure:2963: added ${local_defines} compile-time defines..." >&5
-+echo "configure:2964: added ${local_defines} compile-time defines..." >&5
- fi
-
- if test "${system_has_cut}" = "yes"
-@@ -2967,20 +2968,20 @@
-
- version_file="${ac_unique_file}"
- csound_version_full=`(cat ${version_file}; echo VERSIONSTRING) | ${CPP} - | ${AWK} '/^" v"/ { gsub(/[" v]/,""); print $0; }'`
-- csound_version_major=`echo ${csound_version_full} | cut -d '.' -f 1 -`
-- csound_version_minor=`echo ${csound_version_full} | cut -d '.' -f 2 -`
-- csound_patchlevel=`echo ${csound_version_full} | cut -d '.' -f 3 -`
-- csound_betalevel=`echo ${csound_version_full} | cut -d '.' -f 4 -`
-+ csound_version_major=`echo ${csound_version_full} | cut -d '.' -f 1`
-+ csound_version_minor=`echo ${csound_version_full} | cut -d '.' -f 2`
-+ csound_patchlevel=`echo ${csound_version_full} | cut -d '.' -f 3`
-+ csound_betalevel=`echo ${csound_version_full} | cut -d '.' -f 4`
+@@ -3249,6 +3348,7 @@
+ s%@LD@%$LD%g
+ s%@CSOUND_INSTALLATION_MODE@%$CSOUND_INSTALLATION_MODE%g
+ s%@csound_float@%$csound_float%g
++s%@WORDS_BIGENDIAN@%$WORDS_BIGENDIAN%g
- echo "almost done configuring for csound version ${csound_version_major}.${csound_version_minor}.${csound_patchlevel}.${csound_betalevel}..." 1>&6
--echo "configure:2977: almost done configuring for csound version ${csound_version_major}.${csound_version_minor}.${csound_patchlevel}.${csound_betalevel}..." >&5
-+echo "configure:2978: almost done configuring for csound version ${csound_version_major}.${csound_version_minor}.${csound_patchlevel}.${csound_betalevel}..." >&5
- else
- csound_version_major="unknown"
- csound_version_minor="unknown"
- csound_patchlevel="unknown"
- csound_betalevel="unknown"
- echo "almost done configuring for csound..." 1>&6
--echo "configure:2984: almost done configuring for csound..." >&5
-+echo "configure:2985: almost done configuring for csound..." >&5
- fi
-
- CXXFLAGS=${CFLAGS}
-@@ -3374,4 +3375,4 @@
- test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
- echo "configure process terminated; you should now run 'make depend; make'" 1>&6
--echo "configure:3378: configure process terminated; you should now run 'make depend; make'" >&5
-+echo "configure:3379: configure process terminated; you should now run 'make depend; make'" >&5
+ CEOF
+ EOF
diff --git a/audio/csound/patches/patch-at b/audio/csound/patches/patch-at
new file mode 100644
index 00000000000..0a9bfad1ae6
--- /dev/null
+++ b/audio/csound/patches/patch-at
@@ -0,0 +1,30 @@
+$NetBSD: patch-at,v 1.1 2002/03/23 02:36:48 wiz Exp $
+
+--- cs.h.orig Sat May 19 03:29:57 2001
++++ cs.h
+@@ -8,6 +8,25 @@
+
+ #include "new-src/config.h"
+
++/*__BIG_ENDIAN__ is used various places in csound
++ BIG_ENDIAN is used by the sdif code
++ in NetBSD, (BIG|LITTLE)_ENDIAN is defined by sys/endian.h
++ included in sys/types included in stdlib.h
++ WORDS_BIGENDIAN is defined in new-src/config.h, info autoconf
++ */
++#ifdef __NetBSD__
++#undef BIG_ENDIAN
++#undef LITTLE_ENDIAN
++#endif
++
++#ifdef WORDS_BIGENDIAN
++#define __BIG_ENDIAN__
++#define BIG_ENDIAN
++#else
++#define __LITTLE_ENDIAN__
++#define LITTLE_ENDIAN
++#endif
++
+ #define VMSGS 1
+ #if VMSGS
+ #define VMSG(x) if (odebug) x
diff --git a/audio/csound/patches/patch-au b/audio/csound/patches/patch-au
new file mode 100644
index 00000000000..09a5656cae1
--- /dev/null
+++ b/audio/csound/patches/patch-au
@@ -0,0 +1,13 @@
+$NetBSD: patch-au,v 1.1 2002/03/23 02:36:48 wiz Exp $
+
+--- sdif.h.orig Tue Dec 5 10:06:31 2000
++++ sdif.h
+@@ -53,7 +53,7 @@
+ #ifndef __SDIF_H
+ #define __SDIF_H
+
+-
++#include "cs.h"
+
+ /****************************************************/
+ /* Create 32-bit and 64-bit int and float typedefs. */
diff --git a/audio/csound/patches/patch-av b/audio/csound/patches/patch-av
new file mode 100644
index 00000000000..4d88e97141c
--- /dev/null
+++ b/audio/csound/patches/patch-av
@@ -0,0 +1,19 @@
+$NetBSD: patch-av,v 1.1 2002/03/23 02:36:48 wiz Exp $
+
+--- sftype.h.orig Tue Dec 5 10:06:31 2000
++++ sftype.h
+@@ -1,3 +1,4 @@
++#include "cs.h"
+
+ #if !defined(_SFTYPE_H)
+ #ifdef __GNUC__
+@@ -25,7 +26,8 @@
+
+ typedef struct
+ {
+-#if defined(macintosh) || defined(SGI) /* and any such bigendian m/c */
++#if defined(macintosh) || defined(SGI) || defined(__BIG_ENDIAN__)
++ /* and any such bigendian m/c */
+ BYTE byHi PACKED;
+ BYTE byLo PACKED;
+ #else
diff --git a/audio/csound/patches/patch-aw b/audio/csound/patches/patch-aw
new file mode 100644
index 00000000000..a8045cc8b22
--- /dev/null
+++ b/audio/csound/patches/patch-aw
@@ -0,0 +1,34 @@
+$NetBSD: patch-aw,v 1.1 2002/03/23 02:36:49 wiz Exp $
+
+--- soundio.c.orig Sat May 19 03:29:57 2001
++++ soundio.c
+@@ -57,7 +57,7 @@
+ extern int rtrecord(char *, int);
+ extern void rtplay(char *, int);
+ extern void rtclose(void);
+-# ifndef OSSRTAUDIO
++# if !defined(OSSRTAUDIO) && !defined(NETBSDRTAUDIO)
+ extern void recopen(int, int, MYFLT, int);
+ extern void playopen(int, int, MYFLT, int);
+ # endif
+@@ -70,6 +70,9 @@
+ # include "OSSrtaudio.h"
+ static int oss_mode = OSS_RECORD; /* Module-global state variable */
+ # endif
++# ifdef NETBSDRTAUDIO
++# include "rtNetBSD.h"
++# endif
+ #ifdef PIPES
+ FILE* pin=NULL, *pout=NULL;
+ /*sbrandon: added NeXT to line below*/
+@@ -469,6 +472,10 @@
+ #endif
+ # ifdef LINUX
+ || strcmp(O.outfilename,"/dev/dsp") ==0
++# endif
++# ifdef BSD
++ || strncmp(O.outfilename,"/dev/sound",10) ==0
++ || strncmp(O.outfilename,"/dev/audio",10) ==0
+ # endif
+ || strcmp(O.outfilename,"dac") == 0) {
+ #ifdef WIN32
diff --git a/audio/csound/patches/patch-ax b/audio/csound/patches/patch-ax
new file mode 100644
index 00000000000..216e23dc866
--- /dev/null
+++ b/audio/csound/patches/patch-ax
@@ -0,0 +1,101 @@
+$NetBSD: patch-ax,v 1.1 2002/03/23 02:36:49 wiz Exp $
+
+--- new-src/config.h.in.orig Fri Mar 22 10:42:32 2002
++++ new-src/config.h.in Fri Mar 22 10:44:05 2002
+@@ -10,8 +10,6 @@
+ * you that towards the end of the process).
+ *
+ */
+-#if !defined(_new_src_config_h_)
+-# define _new_src_config_h_
+
+ /* Define to empty if the keyword does not work. */
+ #undef const
+@@ -52,12 +50,25 @@
+ /* Define vfork as fork if vfork does not work. */
+ #undef vfork
+
++/* Define if your processor stores words with the most significant
++ byte first (like Motorola and SPARC, unlike Intel and VAX). */
++#undef WORDS_BIGENDIAN
++
++/* these are here to silence autoreconf */
++#undef FORCE_STDOUT_LBUF
++#undef NEEDS_MINSHORT
++#undef NEEDS_SAFE_FCLOSE
++#undef HAVE_INLINE
++
+ /* Define if you have the getcwd function. */
+ #undef HAVE_GETCWD
+
+ /* Define if you have the getopt_long function. */
+ #undef HAVE_GETOPT_LONG
+
++/* Define if you have the itoa function. */
++#undef HAVE_ITOA
++
+ /* Define if you have the putenv function. */
+ #undef HAVE_PUTENV
+
+@@ -76,9 +87,6 @@
+ /* Define if you have the strtoul function. */
+ #undef HAVE_STRTOUL
+
+-/* Define if you have the itoa function. */
+-#undef HAVE_ITOA
+-
+ /* Define if you have the <fcntl.h> header file. */
+ #undef HAVE_FCNTL_H
+
+@@ -106,50 +114,6 @@
+ /* Define if you have the <unistd.h> header file. */
+ #undef HAVE_UNISTD_H
+
+-/* Define if you need the safe_close() function */
+-#undef NEEDS_SAFE_FCLOSE
+-
+-/* Define if you need the safe_close() function */
+-#undef NEEDS_MINSHORT
+-
+-/* Define if you need the safe_close() function */
+-#undef FORCE_STDOUT_LBUF
+-
+-/* Define if your compiler supports the inline keyword */
+-#undef HAVE_INLINE
+-
+-/* Define if you have the fltk toolkit library */
++/* yes */
+ #undef HAVE_FLTK
+
+-#if defined(NEEDS_MINSHORT)
+-# if HAVE_LIMITS_H
+-# include <limits.h>
+-# endif /* HAVE_LIMITS_H */
+-# define MINSHORT SHRT_MIN
+-#endif /* defined(HAVE_SHRT_MIN) */
+-
+-#if defined(NEEDS_SAFE_FCLOSE)
+-# include <stdio.h>
+-# define fclose safe_fclose
+-
+- int safe_fclose(FILE *);
+-#endif /* defined(NEEDS_SAFE_FCLOSE) */
+-
+-#if defined(HAVE_INLINE)
+-# define INLINE inline
+-#else
+-# define INLINE /* empty on purpose */
+-#endif /* defined(HAVE_INLINE) */
+-
+-#if !defined(HAVE_ITOA)
+-# if defined(__cplusplus)
+- extern "C"
+- {
+-# endif /* defined(__cplusplus) */
+- char* itoa(int, char *, int);/* add substitute definition */
+-# if defined(__cplusplus)
+- };
+-# endif /* defined(__cplusplus) */
+-#endif /* !defined(HAVE_ITOA) */
+-
+-#endif /* !defined(_new_src_config_h_) */