summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorben <ben>2003-12-13 20:26:03 +0000
committerben <ben>2003-12-13 20:26:03 +0000
commita6dd5879594f5b68772129b12ad9269c61338a8f (patch)
treec296549e9cdb57f6c42323f1ba5f8f92acd90f98 /audio
parent8a662d3e24257b90305588d3a5ab6f32e2301552 (diff)
downloadpkgsrc-a6dd5879594f5b68772129b12ad9269c61338a8f.tar.gz
Add csound-dev-4.24.1 as a replacement for the unmaintained and out-of-date
csound package. Csound is a software synthesis package in the tradition of so-called music-N languages, among which the best-known is Music V. It consists of an orchestra- and score-driven executable, written in C for portability. Since Csound is a computational language, it is highly flexible and efficient; complexity is gained only at the expense of computation time. Basically Csound reads some files and creates the result as a file on disk or, on faster machines, through a DAC in real time. This version of csound implements localization and realtime audio as plugins. As a result you need to set the OPCDIR environment variable, and for realtime audio use "-o devaudio" rather than "-o /dev/audio".
Diffstat (limited to 'audio')
-rw-r--r--audio/Makefile4
-rw-r--r--audio/csound-dev/DESCR8
-rw-r--r--audio/csound-dev/MESSAGE9
-rw-r--r--audio/csound-dev/Makefile26
-rw-r--r--audio/csound-dev/PLIST36
-rw-r--r--audio/csound-dev/distinfo25
-rw-r--r--audio/csound-dev/patches/patch-aa133
-rw-r--r--audio/csound-dev/patches/patch-ab52
-rw-r--r--audio/csound-dev/patches/patch-ac54
-rw-r--r--audio/csound-dev/patches/patch-ad59
-rw-r--r--audio/csound-dev/patches/patch-ae72
-rw-r--r--audio/csound-dev/patches/patch-af29
-rw-r--r--audio/csound-dev/patches/patch-ag12
-rw-r--r--audio/csound-dev/patches/patch-ah18
-rw-r--r--audio/csound-dev/patches/patch-ai13
-rw-r--r--audio/csound-dev/patches/patch-aj13
-rw-r--r--audio/csound-dev/patches/patch-ak13
-rw-r--r--audio/csound-dev/patches/patch-al32
-rw-r--r--audio/csound-dev/patches/patch-am21
-rw-r--r--audio/csound-dev/patches/patch-an14
-rw-r--r--audio/csound-dev/patches/patch-ao13
-rw-r--r--audio/csound-dev/patches/patch-ap13
-rw-r--r--audio/csound-dev/patches/patch-aq13
-rw-r--r--audio/csound-dev/patches/patch-ar17
-rw-r--r--audio/csound-dev/patches/patch-as21
-rw-r--r--audio/csound-dev/patches/patch-at41
-rw-r--r--audio/csound-dev/patches/patch-au13
27 files changed, 772 insertions, 2 deletions
diff --git a/audio/Makefile b/audio/Makefile
index 440cbdb4f3d..50e016ca280 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.188 2003/12/03 13:15:52 jmmv Exp $
+# $NetBSD: Makefile,v 1.189 2003/12/13 20:26:03 ben Exp $
#
COMMENT= Audio tools
@@ -21,8 +21,8 @@ SUBDIR+= cddbd
SUBDIR+= cdparanoia
SUBDIR+= cmp3
SUBDIR+= cs4235
-SUBDIR+= csound
SUBDIR+= csound-bath
+SUBDIR+= csound-dev
SUBDIR+= csound-manual
SUBDIR+= dap
SUBDIR+= disc-cover
diff --git a/audio/csound-dev/DESCR b/audio/csound-dev/DESCR
new file mode 100644
index 00000000000..909beaee389
--- /dev/null
+++ b/audio/csound-dev/DESCR
@@ -0,0 +1,8 @@
+Csound is a software synthesis package in the tradition of so-called
+music-N languages, among which the best-known is Music V. It consists
+of an orchestra- and score-driven executable, written in C for
+portability. Since Csound is a computational language, it is highly
+flexible and efficient; complexity is gained only at the expense of
+computation time. Basically Csound reads some files and creates the
+result as a file on disk or, on faster machines, through a DAC in real
+time.
diff --git a/audio/csound-dev/MESSAGE b/audio/csound-dev/MESSAGE
new file mode 100644
index 00000000000..9c74e8ccdd3
--- /dev/null
+++ b/audio/csound-dev/MESSAGE
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+This version of csound implements localization and realtime audio as
+plugins. As a result you need to set the OPCDIR environment variable to
+${PREFIX}/lib/Csound and then run "csound32". To properly play realtime
+audio, specify "-o devaudio" rather than "-o /dev/audio".
+
+===========================================================================
diff --git a/audio/csound-dev/Makefile b/audio/csound-dev/Makefile
new file mode 100644
index 00000000000..035e6e2a064
--- /dev/null
+++ b/audio/csound-dev/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1 2003/12/13 20:26:03 ben Exp $
+#
+
+DISTNAME= Csound-4.24.1
+PKGNAME= csound-dev-4.24.1
+CATEGORIES= audio
+MASTER_SITES= http://www.csounds.com/istvan/archive/misc/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= ben@netbsd.org
+HOMEPAGE= http://www.csounds.com/
+COMMENT= Software synthesizer and sequencer
+
+LICENSE= csound-license
+RESTRICTED= "no for-fee-redistribution"
+NO_SRC_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_CDROM= ${RESTRICTED}
+NOT_FOR_PLATFORM= *-*-alpha *-*-sparc64 # many LP64 problems
+
+DIST_SUBDIR= csound
+USE_GMAKE= yes
+USE_BUILDLINK2= yes
+CONFLICTS= csound-bath*
+
+.include "../../mk/ossaudio.buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/audio/csound-dev/PLIST b/audio/csound-dev/PLIST
new file mode 100644
index 00000000000..bf124175722
--- /dev/null
+++ b/audio/csound-dev/PLIST
@@ -0,0 +1,36 @@
+@comment $NetBSD: PLIST,v 1.1 2003/12/13 20:26:03 ben Exp $
+bin/cs
+bin/csb64enc
+bin/csound32
+bin/cvanal
+bin/dnoise
+bin/envext
+bin/extract
+bin/extractor
+bin/het_export
+bin/het_import
+bin/hetro
+bin/lpanal
+bin/lpc_export
+bin/lpc_import
+bin/makecsd
+bin/mixer
+bin/pv_export
+bin/pv_import
+bin/pvanal
+bin/pvlook
+bin/scale
+bin/scot
+bin/scsort
+bin/sdif2ad
+bin/sndinfo
+bin/srconv
+include/Csound/csdl.h
+include/Csound/csound.h
+include/Csound/csstruct.h
+include/Csound/sysdep.h
+lib/Csound/rtlinux.so
+lib/Csound/stdopcod.so
+lib/libcsound32.so
+@dirrm include/Csound
+@dirrm lib/Csound
diff --git a/audio/csound-dev/distinfo b/audio/csound-dev/distinfo
new file mode 100644
index 00000000000..cf2f39f8ff7
--- /dev/null
+++ b/audio/csound-dev/distinfo
@@ -0,0 +1,25 @@
+$NetBSD: distinfo,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+SHA1 (csound/Csound-4.24.1.tar.bz2) = a14903e23b72c78a870b0d38df7bbdb5e1a56c9e
+Size (csound/Csound-4.24.1.tar.bz2) = 1116589 bytes
+SHA1 (patch-aa) = 586cf46e97b9386fae79e924bebedc06b149feaf
+SHA1 (patch-ab) = 64a0cf6a5b720d05d625613117c26f5669553d79
+SHA1 (patch-ac) = 4c59bab1d38ae65fba96cab5b8718f8d41646ccd
+SHA1 (patch-ad) = e7655efd4ac71e56d0a0ffa29d7651ccbde5e4dc
+SHA1 (patch-ae) = 75b35e8161390aef418055a1d834120f16c7c99c
+SHA1 (patch-af) = 6641f5fce8e919dbe39c0132fd35f6799b54d24d
+SHA1 (patch-ag) = 1cbc8e5070efa0416fd771a77c181f859a3ae4e7
+SHA1 (patch-ah) = 12845b415f1dee76527df4bb60159cda3ffe78e9
+SHA1 (patch-ai) = 652ba4a0dce449605004347e6eb6f6344f559ea3
+SHA1 (patch-aj) = e0c135effca0d33814d4644979dc0be53d62d8a0
+SHA1 (patch-ak) = d62442d9248f48e70e97dfdb7a772d9f5586faaa
+SHA1 (patch-al) = 59f0cc70bfa0a69a00c7926264e9ca1ae17d64e7
+SHA1 (patch-am) = 60dcef719e82f063ae87d23ce0410508bab76b93
+SHA1 (patch-an) = 292b472661a67fd79c6fc9f91b9366e267b4d19f
+SHA1 (patch-ao) = 9aad1dcf08550ddd1ecb5be6b6145bca3a8ca84b
+SHA1 (patch-ap) = 9793773fe30bf3b71fe132ad24a4fb90f8472bbb
+SHA1 (patch-aq) = 4f43102124e7b7fc86abb87a4c46eb8eaf2c449c
+SHA1 (patch-ar) = 0e3b4037adb3220624dde69dc68015f6de4fc266
+SHA1 (patch-as) = 45a18ea81022a722c489aee4013589172490c60f
+SHA1 (patch-at) = fd424477994e026526ed14d9d64a951abcfbb6fb
+SHA1 (patch-au) = 5c002177662b6f9b4eacccba023e88ba8c0699af
diff --git a/audio/csound-dev/patches/patch-aa b/audio/csound-dev/patches/patch-aa
new file mode 100644
index 00000000000..63c7ebca56c
--- /dev/null
+++ b/audio/csound-dev/patches/patch-aa
@@ -0,0 +1,133 @@
+$NetBSD: patch-aa,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- Makefile.defs.orig 2003-02-25 19:24:01.000000000 -0800
++++ Makefile.defs
+@@ -10,7 +10,7 @@ TARGET_OS = unix
+ # -----------------------------------------------------------------------------
+ # installation directories
+
+-INSTDIR = /usr/local
++INSTDIR = $(PREFIX)
+
+ BINDIR = $(INSTDIR)/bin
+ LIBDIR = $(INSTDIR)/lib
+@@ -70,9 +70,9 @@ RANLIB = ranlib
+ # General defines. These set the type of system for which Csound is compiled,
+ # and select various features to be enabled.
+
+-DEFINES = -DWINDOWS -DSFIRCAM -DSYS5 -DLINUX -DHAVE_TERMIOS_H \
+- -DIV_VERSION -DPIPES -DMACROS -DHAVE_FLTK -D_REENTRANT \
+- -DHAVE_SSTREAM -DMYFLT=float
++DEFINES = -DSFIRCAM -DSYS5 -DLINUX -DBSD -DHAVE_TERMIOS_H \
++ -DIV_VERSION -DPIPES -DMACROS -D_REENTRANT \
++ -DHAVE_SSTREAM -DMYFLT=float -DDEVOSSSOUND="\"$(DEVOSSSOUND)\""
+ # choose any of -
+ # -DSYS5 invoke System V headers, e.g. 'string.h' for 'strings.h'
+ # -DHAVE_SSTREAM include <sstream> header from C++ sources, instead of
+@@ -112,9 +112,7 @@ DEFINES = -DWINDOWS -DSFIRCAM -DSYS5 -DL
+ # of your compiler for the list of available settings. $(DEFINES) must always
+ # be included.
+
+-CFLAGS = -pipe -Wall -O2 -ffast-math -fomit-frame-pointer \
+- -finline-functions -funroll-loops -fno-strict-aliasing \
+- $(PIC_FLAG) \
++CFLAGS+= -Wall -O2 $(PIC_FLAG) \
+ -I. -I$(TOPDIR) -I$(TOPDIR)/include -I$(TOPDIR)/opcodes $(DEFINES)
+ # -O Simple optimisation
+ # -O2 to be more specific about the optimization level
+@@ -142,15 +140,12 @@ CFLAGS = -pipe -Wall -O2 -ffast-math -fo
+ # -----------------------------------------------------------------------------
+ # Additional flags for the C compiler only
+
+-C_FLAGS = -march=pentium3 -falign-functions=16 -falign-loops=16 \
+- -falign-jumps=16 -frename-registers -mfpmath=387 -mno-ieee-fp \
+- -mno-sse
+
+ # -----------------------------------------------------------------------------
+ # C++ compiler flags
+
+-CXXFLAGS = $(CFLAGS) $(C_FLAGS) -fno-exceptions -fno-rtti \
+- -fno-unroll-loops -I/usr/local/FLTK-1.1.0/Linux/include
++CXXFLAGS+= $(CFLAGS) $(C_FLAGS) -fno-exceptions -fno-rtti \
++ -fno-unroll-loops
+ # `fltk-config --cxxflags` try adding this if the compilation of
+ # FLTK widgets stops with error messages
+ # related to not finding include files
+@@ -159,14 +154,13 @@ CXXFLAGS = $(CFLAGS) $(C_FLAGS) -fno-exc
+ # -----------------------------------------------------------------------------
+ # uncomment these if HAVE_FLTK was enabled in DEFINES
+
+-FLTKSRC = buttonsched.c widgets.cpp
+-FLTKOBJ = buttonsched.o widgets.o
++FLTKSRC =
++FLTKOBJ =
+ # source and object files for FLTK widgets
+
+ # FLTKLIB = -lfltk -lpthread -lstdc++
+ # FLTKLIB = `fltk-config --libs`
+-FLTKLIB = /usr/local/FLTK-1.1.0/Linux/lib/libfltk.a \
+- /usr/local/gcc-3.2.2/lib/libstdc++.a
++FLTKLIB =
+ # libraries required by widgets.cpp
+ # -lfltk -lpthread -lstdc++ use dynamic libraries
+ #
+@@ -185,10 +179,10 @@ FLTKLIB = /usr/local/FLTK-1.1.0/Linux/li
+ # -----------------------------------------------------------------------------
+ # libraries
+
+-LIBS = -lpthread -lm
++LIBS = -lm
+ # used for linking all executables
+
+-MISC_LIB = -ldl
++MISC_LIB =
+ # these are used by the main Csound executable only
+
+ # -lefence for debugging only
+@@ -203,15 +197,15 @@ MISC_LIB = -ldl
+ # select source and object files for window (X11, FLTK, etc.) displays
+ # all files are in sysdep directory
+
+-WINSRC = sysdep/winX11.c
+-WINOBJ = sysdep/winX11.o
++WINSRC =
++WINOBJ =
+ # ;if WINDOWS enabled in DEFINES, choose one of -
+ # winX11.o for X11 window graphics
+ # winSGI.o for SGI window graphics
+ # winFLTK.o and FL_graph.o for `improved' X graphics
+ # otherwise leave empty
+
+-WINLIBS = -L/usr/X11R6/lib -lX11
++WINLIBS =
+ # ;window system libraries
+ # -lX11 for X window calls
+ # -L/usr/lib/X11R4 for HP X11 library, v.4
+@@ -224,7 +218,7 @@ WINLIBS = -L/usr/X11R6/lib -lX11
+ # -----------------------------------------------------------------------------
+ # real-time audio support
+
+-RTAUDIO_PLUGINS = rtlinux.so rtalsa.so
++RTAUDIO_PLUGINS = rtlinux.so
+ # rtlinux.so for Linux (OSS interface)
+ # rtalsa.so for Linux (ALSA interface)
+ # rtwin32.dll Windows 32bit MM library
+@@ -232,7 +226,7 @@ RTAUDIO_PLUGINS = rtlinux.so rtalsa.so
+ # -----------------------------------------------------------------------------
+ # libraries and headers for real-time audio
+
+-AUDLIBS = -lasound
++AUDLIBS = $(LIBOSSAUDIO)
+ # -laudio on SUN, for SFSUN41
+ # -laudio on SGI, to include rt devaudio library
+ # -lAlib on HP, to include rt devaudio library
+@@ -248,8 +242,7 @@ AUDLIBS = -lasound
+ # Access permissions for main Csound executable. It is recommended to set it
+ # to 4551 under Linux to enable --sched. Other systems should use 0755.
+
+-#CSOUND_PERM = 0755
+-CSOUND_PERM = 4551
++CSOUND_PERM = 0755
+
+ # -----------------------------------------------------------------------------
+ # The Csound MAKE can be run in separate stages, or as a single command.
diff --git a/audio/csound-dev/patches/patch-ab b/audio/csound-dev/patches/patch-ab
new file mode 100644
index 00000000000..7e525cdfc9a
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ab
@@ -0,0 +1,52 @@
+$NetBSD: patch-ab,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- opcodes/midisend.c.orig 2003-02-25 19:24:01.000000000 -0800
++++ opcodes/midisend.c
+@@ -1,6 +1,8 @@
+ #include "cs.h" /* MIDISEND.C */
+ #include "midioops.h"
+
++#undef USE_DLP_MIDI_OUT_CODE
++
+ #ifdef LINUX
+ /*
+ This is very provisional code for Linux Csound MIDI output. Data
+@@ -16,8 +18,20 @@
+ #include <ctype.h>
+ #include <sys/ioctl.h>
+ #include <fcntl.h>
+-#ifdef __FreeBSD__
+-# include <sys/soundcard.h>
++#ifdef BSD
++#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
+@@ -38,6 +52,7 @@ void pitch_bend(int /*chan*/, int /*lsb*
+ void poly_after_touch(int /*chan*/, int /*note_num*/, int /*value*/);
+ void openMIDIout(void);
+
++#ifdef USE_DLP_MIDI_OUT_CODE
+ #ifdef LINUX
+ #define _gotMIDIout
+ void seqbuf_dump(void);
+@@ -127,6 +142,7 @@ void openMIDIout()
+ }
+
+ #endif
++#endif
+
+ /* ********************************* */
+ /* This section for Windows95 and NT */
diff --git a/audio/csound-dev/patches/patch-ac b/audio/csound-dev/patches/patch-ac
new file mode 100644
index 00000000000..55f264d9c2a
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ac
@@ -0,0 +1,54 @@
+$NetBSD: patch-ac,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- extract.c.orig 2003-02-25 19:24:01.000000000 -0800
++++ extract.c
+@@ -5,7 +5,7 @@
+ static char inslst[INSMAX]; /* values set by readxfil */
+ static int onsect, offsect; /* " " " */
+ static MYFLT onbeat, offbeat; /* " " " */
+-static MYFLT ontime, offtime; /* set by readxfil, mod by w-stmnt */
++static MYFLT ontime, cs_offtime; /* set by readxfil, mod by w-stmnt */
+
+ static SRTBLK *frstout, *prvout; /* links for building new outlist */
+
+@@ -63,7 +63,7 @@ void readxfil(FILE *xfp) /* read
+ for(ip = &inslst[0]; ip < &inslst[INSMAX]; *ip++ = 1);
+ }
+ ontime = a0.newp3 = a0.p3val = onbeat;
+- offtime = f0.newp2 = f0.p2val = offbeat;
++ cs_offtime = f0.newp2 = f0.p2val = offbeat;
+ }
+
+ void extract(void) /* extract instr events within the time period */
+@@ -108,7 +108,7 @@ void extract(void) /* extract instr
+ if (sectno == onsect && warped)
+ ontime = a0.newp3 = realt(onbeat);
+ if (sectno == offsect && warped)
+- offtime = f0.newp2 = realt(offbeat);
++ cs_offtime = f0.newp2 = realt(offbeat);
+ include(bp);
+ break;
+ case 't':
+@@ -117,7 +117,7 @@ void extract(void) /* extract instr
+ case 'f':
+ casef: if (sectno == onsect && bp->newp2 < ontime)
+ bp->newp2 = ontime;
+- else if (sectno == offsect && bp->newp2 > offtime)
++ else if (sectno == offsect && bp->newp2 > cs_offtime)
+ break;
+ if (sectno == onsect && !a0done) {
+ if (onbeat > 0)
+@@ -144,10 +144,10 @@ void extract(void) /* extract instr
+ }
+ }
+ if (sectno == offsect) {
+- if (bp->newp2 >= offtime)
++ if (bp->newp2 >= cs_offtime)
+ break;
+- if (turnoff > offtime) {
+- bp->newp3 = offtime - bp->newp2;
++ if (turnoff > cs_offtime) {
++ bp->newp3 = cs_offtime - bp->newp2;
+ bp->p3val = offbeat - bp->p2val;
+ }
+ }
diff --git a/audio/csound-dev/patches/patch-ad b/audio/csound-dev/patches/patch-ad
new file mode 100644
index 00000000000..48235fe9c41
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ad
@@ -0,0 +1,59 @@
+$NetBSD: patch-ad,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- Makefile.orig 2003-02-25 19:24:01.000000000 -0800
++++ Makefile
+@@ -170,7 +170,7 @@ $(INSTALL_DIRS):
+
+ install_libs: $(INSTALL_DIRS)
+ ifeq ($(strip $(BUILD_TYPE)),dynamic)
+- install -p -m 0755 $(LIBCSND_D) $(LIBDIR)
++ $(BSD_INSTALL_DATA) $(LIBCSND_D) $(LIBDIR)
+ ifeq ($(strip $(TARGET_OS)),unix)
+ @echo " *** The Csound shared library ($(LIBCSND_D)) has been"
+ @echo " *** installed to $(LIBDIR). Please add $(LIBDIR) to"
+@@ -179,18 +179,18 @@ ifeq ($(strip $(TARGET_OS)),unix)
+ endif
+ else
+ ifneq ($(strip $(INSTALL_LIBS)),)
+- install -p -m 0644 $(LIBCSND) $(LIBDIR)
++ $(BSD_INSTALL_DATA) $(LIBCSND) $(LIBDIR)
+ endif
+ endif
+ ifneq ($(strip $(INSTALL_LIBS)),)
+- install -p -m 0644 include/Csound/* $(INCLDIR)/Csound
++ $(BSD_INSTALL_DATA) include/Csound/* $(INCLDIR)/Csound
+ ifeq ($(strip $(TARGET_OS)),win32)
+- install -p -m 0644 csound32.def csound64.def $(LIBDIR)
++ $(BSD_INSTALL_DATA) csound32.def csound64.def $(LIBDIR)
+ endif
+ endif
+
+ install: all $(INSTALL_DIRS) install_libs
+- install -p -m $(CSOUND_PERM) $(PROGRAM) $(BINDIR)/$(CSOUND_NAME)
++ $(BSD_INSTALL_PROGRAM) $(PROGRAM) $(BINDIR)/$(CSOUND_NAME)
+ ifneq ($(strip $(BUILD_UTILS)),)
+ cd utils ; make $@
+ endif
+@@ -199,7 +199,7 @@ ifneq ($(strip $(BUILD_PLUGINS)),)
+ endif
+
+ install-strip: all $(INSTALL_DIRS) install_libs
+- install -p -m $(CSOUND_PERM) -s $(PROGRAM) $(BINDIR)/$(CSOUND_NAME)
++ $(BSD_INSTALL_PROGRAM) $(PROGRAM) $(BINDIR)/$(CSOUND_NAME)
+ ifneq ($(strip $(BUILD_UTILS)),)
+ cd utils ; make $@
+ endif
+@@ -254,13 +254,11 @@ ifneq ($(strip $(BUILD_PLUGINS)),)
+ endif
+ $(CXX) -M $(CXXFLAGS) $(OPSRCS) > .depend
+ $(CXX) -M $(CXXFLAGS) $(CSSRCS) >> .depend
+- $(CXX) -M $(CXXFLAGS) $(WINSRC) $(FLTKSRC) >> .depend
+ $(CXX) -M $(CXXFLAGS) main.c >> .depend
+
+ .depend:
+ $(CXX) -M $(CXXFLAGS) $(OPSRCS) > .depend
+ $(CXX) -M $(CXXFLAGS) $(CSSRCS) >> .depend
+- $(CXX) -M $(CXXFLAGS) $(WINSRC) $(FLTKSRC) >> .depend
+ $(CXX) -M $(CXXFLAGS) main.c >> .depend
+
+ include .depend
diff --git a/audio/csound-dev/patches/patch-ae b/audio/csound-dev/patches/patch-ae
new file mode 100644
index 00000000000..c6146a9a920
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ae
@@ -0,0 +1,72 @@
+$NetBSD: patch-ae,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- csmain.c.orig 2003-02-25 19:24:01.000000000 -0800
++++ csmain.c
+@@ -51,18 +51,26 @@ extern void init_pvsys(void);
+
+ #include <signal.h>
+
+-#if defined(LINUX)
++#if defined(LINUX) || defined(__NetBSD__)
+
+ #include <unistd.h> /* Linux real-time by Istvan Varga, Jan 2002 */
+ #include <sys/types.h>
+ #include <errno.h>
++#ifdef BSD
++#include <sys/time.h>
++#include <sys/resource.h>
++#define HIGH_PRIORITY -20
++#else
+ #include <sched.h>
++#endif
+ #include <sys/mman.h>
+
+ void set_rt_priority(int argc, char **argv)
+ {
+ int rtmode;
++#ifndef __NetBSD__
+ struct sched_param p;
++#endif
+ int i;
+
+ if (geteuid() != 0) return; /* not root, nothing to do */
+@@ -95,7 +103,7 @@ void set_rt_priority(int argc, char **ar
+ return;
+ }
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ /* lock all pages into physical memory */
+ if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0) {
+ fprintf(stderr, "csound: cannot lock memory pages: %s\n",
+@@ -104,6 +112,14 @@ void set_rt_priority(int argc, char **ar
+ }
+ #endif
+
++#ifdef __NetBSD__
++ if (setpriority(PRIO_PROCESS, 0, HIGH_PRIORITY) == 0)
++ fprintf(stderr, "csound: scheduler priority %i...\n", HIGH_PRIORITY);
++ else
++ fprintf(stderr, "csound: scheduler priority %i failed: %s\n",
++ HIGH_PRIORITY, strerror(errno));
++ fflush(stderr);
++#else
+ /* set round robin mode with max. priority */
+ p.sched_priority = sched_get_priority_max(SCHED_RR);
+ if (sched_setscheduler(0, SCHED_RR, &p) != 0) {
+@@ -111,13 +127,14 @@ void set_rt_priority(int argc, char **ar
+ strerror(errno));
+ exit(-1);
+ }
++#endif
+ /* give up root permissions */
+ setuid(getuid());
+ }
+
+ #endif
+
+-#if !defined(LINUX) && !defined(SGI) && !defined(__BEOS__) && !defined(MACOSX)
++#if !defined(LINUX) && !defined(SGI) && !defined(__BEOS__) && !defined(MACOSX) && !defined(__NetBSD__)
+ static char *signal_to_string(int sig)
+ {
+ switch(sig) {
diff --git a/audio/csound-dev/patches/patch-af b/audio/csound-dev/patches/patch-af
new file mode 100644
index 00000000000..18afe587f3e
--- /dev/null
+++ b/audio/csound-dev/patches/patch-af
@@ -0,0 +1,29 @@
+$NetBSD: patch-af,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- include/cs.h.orig 2003-02-25 19:24:01.000000000 -0800
++++ include/cs.h
+@@ -21,6 +21,24 @@ extern "C" {
+
+ #include "Csound/csound.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
++ */
++#ifdef __NetBSD__
++#undef BIG_ENDIAN
++#undef LITTLE_ENDIAN
++#endif
++
++#if _BYTE_ORDER == _BIG_ENDIAN
++#define __BIG_ENDIAN__
++#define BIG_ENDIAN
++#else
++#define __LITTLE_ENDIAN__
++#define LITTLE_ENDIAN
++#endif
++
+ #define VMSGS 1
+ #if VMSGS
+ #define VMSG(x) if ((cglob.oparms)->odebug) x
diff --git a/audio/csound-dev/patches/patch-ag b/audio/csound-dev/patches/patch-ag
new file mode 100644
index 00000000000..efb95474a31
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ag
@@ -0,0 +1,12 @@
+$NetBSD: patch-ag,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- sdif.h.orig 2003-02-02 19:24:00.000000000 -0800
++++ sdif.h
+@@ -336,6 +336,7 @@ void SDIF_Copy4Bytes(char *target, const
+ #define LITTLE_ENDIAN 1
+ #else
+ /* Insert other checks for your architecture here if it's little endian. */
++#include "cs.h"
+ #endif
+
+ SDIFresult SDIF_Write1(const void *block, size_t n, FILE *f);
diff --git a/audio/csound-dev/patches/patch-ah b/audio/csound-dev/patches/patch-ah
new file mode 100644
index 00000000000..ad634348802
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ah
@@ -0,0 +1,18 @@
+$NetBSD: patch-ah,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- opcodes/sftype.h.orig 2002-12-15 19:23:01.000000000 -0800
++++ opcodes/sftype.h
+@@ -1,3 +1,4 @@
++#include "cs.h"
+
+ #if !defined(_SFTYPE_H)
+ #ifdef __GNUC__
+@@ -27,7 +28,7 @@ typedef unsigned short SFTransform;
+
+ typedef struct
+ {
+-#if defined(mac_classic) || defined(SGI) || defined(MACOSX)
++#if defined(mac_classic) || defined(SGI) || defined(MACOSX) || defined(__BIG_ENDIAN__)
+ /* and any such bigendian m/c */
+ BYTE byHi PACKED;
+ BYTE byLo PACKED;
diff --git a/audio/csound-dev/patches/patch-ai b/audio/csound-dev/patches/patch-ai
new file mode 100644
index 00000000000..4db271a2fb6
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ai
@@ -0,0 +1,13 @@
+$NetBSD: patch-ai,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- linevent.c.orig 2003-02-02 19:24:00.000000000 -0800
++++ linevent.c
+@@ -13,7 +13,7 @@ void RTclose(void);
+ # include <unistd.h>
+ #else
+ extern int close(int);
+-#if !defined(mac_classic) && !defined(SYMANTEC) && !defined(LINUX)
++#if !defined(mac_classic) && !defined(SYMANTEC) && !defined(LINUX) && !defined(__NetBSD__)
+ extern int read(int, void*, unsigned);
+ #endif
+ #endif
diff --git a/audio/csound-dev/patches/patch-aj b/audio/csound-dev/patches/patch-aj
new file mode 100644
index 00000000000..2b50bda4a12
--- /dev/null
+++ b/audio/csound-dev/patches/patch-aj
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- aiff.c.orig 2003-02-02 19:24:00.000000000 -0800
++++ aiff.c
+@@ -13,7 +13,7 @@ float benfloat(float x);
+ #if defined(__BEOS__) || defined(LINUX)
+ #include <unistd.h>
+ #else
+-#if !defined(mac_classic) && !defined( SYMANTEC ) && !defined( LINUX )
++#if !defined(mac_classic) && !defined( SYMANTEC ) && !defined( LINUX ) && !defined(__NetBSD__)
+ extern int write(int, const void*, unsigned int);
+ #endif
+ extern off_t lseek(int, off_t, int);
diff --git a/audio/csound-dev/patches/patch-ak b/audio/csound-dev/patches/patch-ak
new file mode 100644
index 00000000000..d67c018187d
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ak
@@ -0,0 +1,13 @@
+$NetBSD: patch-ak,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- soundio.c.orig 2003-02-25 19:24:01.000000000 -0800
++++ soundio.c
+@@ -1400,7 +1404,7 @@ static void int24ptran(void)
+
+ if (osfopen) {
+ /* this is for direct 24bit packed output */
+-#if defined(_macintosh)||defined(SGI)||defined(LINUX_BE)||defined(LINUX_PPC)
++#if defined(_macintosh)||defined(SGI)||defined(LINUX_BE)||defined(LINUX_PPC)||defined(__BIG_ENDIAN__)
+ /* and all similar byte order machines */
+ *int24outbufp++ = s24.bytes[0];
+ *int24outbufp++ = s24.bytes[1];
diff --git a/audio/csound-dev/patches/patch-al b/audio/csound-dev/patches/patch-al
new file mode 100644
index 00000000000..1cb2258c2e7
--- /dev/null
+++ b/audio/csound-dev/patches/patch-al
@@ -0,0 +1,32 @@
+$NetBSD: patch-al,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- plugins/rtaudio/rtlinux.c.orig 2003-02-25 19:24:01.000000000 -0800
++++ plugins/rtaudio/rtlinux.c
+@@ -123,7 +123,7 @@ static void setsndparms(void *csound,
+ ENGINE->Message(csound, msg);
+ }
+
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ /* set DMA buffer fragment size to Csound's output buffer size */
+ parm = 0; frag_size = 1;
+ /* find least power of 2 >= bufsiz */
+@@ -178,7 +178,7 @@ static void setvolume(void *csound, unsi
+ }
+ }
+
+-#define DSP_NAME "/dev/dsp"
++#define DSP_NAME DEVOSSSOUND
+
+ static void*
+ recopen(void *csound, AUDIOPARMS *devParms) /* open for audio input */
+@@ -262,7 +262,8 @@ rtplay(void *audioOutData, char *outbuf,
+ {
+ /* J. Mohr 1995 Oct 17 */ /* IV - Nov 10 2002 */
+ if (write((int) audioOutData, outbuf, nbytes) < nbytes)
+- fprintf(stderr, "/dev/dsp: could not write all bytes requested\n");
++ fprintf(stderr, "%s: could not write all bytes requested\n",
++ DSP_NAME);
+ }
+
+ static void rtclose(void *audioInData, void *audioOutData)
diff --git a/audio/csound-dev/patches/patch-am b/audio/csound-dev/patches/patch-am
new file mode 100644
index 00000000000..b68cb1088ce
--- /dev/null
+++ b/audio/csound-dev/patches/patch-am
@@ -0,0 +1,21 @@
+$NetBSD: patch-am,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- Makefile.libnames.orig 2003-02-25 19:24:01.000000000 -0800
++++ Makefile.libnames
+@@ -11,14 +11,14 @@ LIBCSND_S = libcsound.a
+ # dynamic library
+
+ ifneq ($(findstring -DMYFLT=double,$(DEFINES)),)
+-CSLIB = -lcsound64
++CSLIB = -Wl,-R${LIBDIR} -lcsound64
+ ifneq ($(findstring .so,$(DLLSUFFIX)),)
+ LIBCSND_D = libcsound64$(DLLSUFFIX)
+ else
+ LIBCSND_D = csound64$(DLLSUFFIX)
+ endif
+ else
+-CSLIB = -lcsound32
++CSLIB = -Wl,-R${LIBDIR} -lcsound32
+ ifneq ($(findstring .so,$(DLLSUFFIX)),)
+ LIBCSND_D = libcsound32$(DLLSUFFIX)
+ else
diff --git a/audio/csound-dev/patches/patch-an b/audio/csound-dev/patches/patch-an
new file mode 100644
index 00000000000..0b642083ea0
--- /dev/null
+++ b/audio/csound-dev/patches/patch-an
@@ -0,0 +1,14 @@
+$NetBSD: patch-an,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- timers.c.orig 2003-02-02 19:24:00.000000000 -0800
++++ timers.c
+@@ -25,7 +25,9 @@
+ /* could in fact work under any x86/GCC system, but do not */
+ /* know how to query the actual CPU frequency ... */
+
++#ifndef __NetBSD__
+ #define HAVE_RDTSC 1
++#endif
+
+ /* ------------------------------------------------------------------------- */
+
diff --git a/audio/csound-dev/patches/patch-ao b/audio/csound-dev/patches/patch-ao
new file mode 100644
index 00000000000..ab96608581f
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ao
@@ -0,0 +1,13 @@
+$NetBSD: patch-ao,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- globals.c.orig 2003-02-25 19:24:01.000000000 -0800
++++ globals.c
+@@ -253,7 +253,7 @@ void globalsRESET(void *csound)
+ cs_globals->O.sfwrite = 1;
+ cs_globals->O.sfheader = 1;
+ cs_globals->O.displays = 1;
+-#ifdef LINUX
++#if defined(LINUX) && !defined(__NetBSD__)
+ cs_globals->O.msglevel = 231;
+ #elif defined(WIN32)
+ cs_globals->O.msglevel = 135;
diff --git a/audio/csound-dev/patches/patch-ap b/audio/csound-dev/patches/patch-ap
new file mode 100644
index 00000000000..bd932b0bbcd
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ap
@@ -0,0 +1,13 @@
+$NetBSD: patch-ap,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- plugins/Makefile.orig 2003-02-25 19:24:01.000000000 -0800
++++ plugins/Makefile
+@@ -32,7 +32,7 @@ $(PLGNDIR):
+ mkdir -p -m 0755 $@
+
+ install: $(PLUGIN) $(PLGNDIR)
+- install -p -m 0755 $(PLUGIN) $(PLGNDIR)
++ $(BSD_INSTALL_DATA) $(PLUGIN) $(PLGNDIR)
+ ifneq ($(strip $(RTAUDIO_PLUGINS)),)
+ cd rtaudio ; make $@
+ endif
diff --git a/audio/csound-dev/patches/patch-aq b/audio/csound-dev/patches/patch-aq
new file mode 100644
index 00000000000..2b832a10e2c
--- /dev/null
+++ b/audio/csound-dev/patches/patch-aq
@@ -0,0 +1,13 @@
+$NetBSD: patch-aq,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- plugins/rtaudio/Makefile.orig 2003-02-25 19:24:01.000000000 -0800
++++ plugins/rtaudio/Makefile
+@@ -19,7 +19,7 @@ $(PLGNDIR):
+ mkdir -p -m 0755 $@
+
+ install: $(RTAUDIO_PLUGINS) $(PLGNDIR)
+- install -p -m 0755 $(RTAUDIO_PLUGINS) $(PLGNDIR)
++ $(BSD_INSTALL_DATA) $(RTAUDIO_PLUGINS) $(PLGNDIR)
+
+ install-strip: install
+
diff --git a/audio/csound-dev/patches/patch-ar b/audio/csound-dev/patches/patch-ar
new file mode 100644
index 00000000000..8396b781c92
--- /dev/null
+++ b/audio/csound-dev/patches/patch-ar
@@ -0,0 +1,17 @@
+$NetBSD: patch-ar,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- utils/util1/cs/Makefile.orig 2003-02-25 19:24:01.000000000 -0800
++++ utils/util1/cs/Makefile
+@@ -19,10 +19,10 @@ $(BINDIR):
+ mkdir -p -m 0755 $@
+
+ install: $(PGM1) $(PGM2) $(BINDIR)
+- install -p -m 0755 $(PGM1) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM1) $(BINDIR)
+
+ install-strip: $(PGM1) $(PGM2) $(BINDIR)
+- install -p -m 0755 -s $(PGM1) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM1) $(BINDIR)
+
+ uninstall:
+ rm -f $(BINDIR)/$(PGM1)
diff --git a/audio/csound-dev/patches/patch-as b/audio/csound-dev/patches/patch-as
new file mode 100644
index 00000000000..7c497706d17
--- /dev/null
+++ b/audio/csound-dev/patches/patch-as
@@ -0,0 +1,21 @@
+$NetBSD: patch-as,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- utils/util1/csdutils/Makefile.orig 2003-02-25 19:24:01.000000000 -0800
++++ utils/util1/csdutils/Makefile
+@@ -23,12 +23,12 @@ $(BINDIR):
+ mkdir -p -m 0755 $@
+
+ install: $(PGM1) $(PGM2) $(BINDIR)
+- install -p -m 0755 $(PGM1) $(BINDIR)
+- install -p -m 0755 $(PGM2) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM1) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM2) $(BINDIR)
+
+ install-strip: $(PGM1) $(PGM2) $(BINDIR)
+- install -p -m 0755 -s $(PGM1) $(BINDIR)
+- install -p -m 0755 -s $(PGM2) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM1) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM2) $(BINDIR)
+
+ uninstall:
+ rm -f $(BINDIR)/$(PGM1)
diff --git a/audio/csound-dev/patches/patch-at b/audio/csound-dev/patches/patch-at
new file mode 100644
index 00000000000..1d3e55e3ed6
--- /dev/null
+++ b/audio/csound-dev/patches/patch-at
@@ -0,0 +1,41 @@
+$NetBSD: patch-at,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- utils/util1/utilwrap/Makefile.orig 2003-02-25 19:24:01.000000000 -0800
++++ utils/util1/utilwrap/Makefile
+@@ -25,22 +25,22 @@ $(BINDIR):
+ mkdir -p -m 0755 $@
+
+ install: $(PGM1) $(PGM2) $(PGM3) $(PGM4) $(PGM5) $(PGM6) $(PGM7) $(BINDIR)
+- install -p -m 0755 $(PGM1) $(BINDIR)
+- install -p -m 0755 $(PGM2) $(BINDIR)
+- install -p -m 0755 $(PGM3) $(BINDIR)
+- install -p -m 0755 $(PGM4) $(BINDIR)
+- install -p -m 0755 $(PGM5) $(BINDIR)
+- install -p -m 0755 $(PGM6) $(BINDIR)
+- install -p -m 0755 $(PGM7) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM1) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM2) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM3) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM4) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM5) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM6) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM7) $(BINDIR)
+
+ install-strip: $(PGM1) $(PGM2) $(PGM3) $(PGM4) $(PGM5) $(PGM6) $(PGM7) $(BINDIR)
+- install -p -m 0755 -s $(PGM1) $(BINDIR)
+- install -p -m 0755 -s $(PGM2) $(BINDIR)
+- install -p -m 0755 -s $(PGM3) $(BINDIR)
+- install -p -m 0755 -s $(PGM4) $(BINDIR)
+- install -p -m 0755 -s $(PGM5) $(BINDIR)
+- install -p -m 0755 -s $(PGM6) $(BINDIR)
+- install -p -m 0755 -s $(PGM7) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM1) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM2) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM3) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM4) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM5) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM6) $(BINDIR)
++ $(BSD_INSTALL_PROGRAM) $(PGM7) $(BINDIR)
+
+ uninstall:
+ rm -f $(BINDIR)/$(PGM1)
diff --git a/audio/csound-dev/patches/patch-au b/audio/csound-dev/patches/patch-au
new file mode 100644
index 00000000000..5efc856b1a1
--- /dev/null
+++ b/audio/csound-dev/patches/patch-au
@@ -0,0 +1,13 @@
+$NetBSD: patch-au,v 1.1 2003/12/13 20:26:03 ben Exp $
+
+--- pvoc.c.orig 2003-02-25 19:24:01.000000000 -0800
++++ pvoc.c
+@@ -8,7 +8,7 @@
+ #include "Csound/sysdep.h"
+
+ #include <stdio.h>
+-#if defined(mac_classic) || defined(SYMANTEC) || defined(__FreeBSD__)
++#if defined(mac_classic) || defined(SYMANTEC) || defined(__FreeBSD__) || defined(__NetBSD__)
+ # include <stdlib.h> /* for malloc() */
+ # define READMODE "rb"
+ # define WRITEMODE "wb+"