summaryrefslogtreecommitdiff
path: root/audio/audacity
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-10-04 08:59:34 +0000
committerjlam <jlam@pkgsrc.org>2002-10-04 08:59:34 +0000
commit712710364669fb643910c3709af91512c7d91c73 (patch)
treefca6fc4f60c8f4b7731400c8280c3bf41fa84b65 /audio/audacity
parent96ec11dd93ac124d5e30e4a176d287efaa1f74fe (diff)
downloadpkgsrc-712710364669fb643910c3709af91512c7d91c73.tar.gz
Update audio/audacity to 1.0.0.2. Pkgsrc changes from version 0.96 include:
* Use the id3lib distributed with the audacity sources instead of audio/id3lib (this seems to fix audacity coredumps when exporting to MP3 after editting ID3 tags). * Install the documentation and license file. Changes from version 0.96 include: * Bug fixes * New effects: invert, reverse, noise removal * Ogg Vorbis import/export support. * Added "Save Changes" dialog. * Added tooltips. * Use libmad instead of libmpeg3 if not using xaudio. XXX OSS audio playback doesn't work on NetBSD with audio/oss. The process XXX hangs in "sndint" state according to top(1).
Diffstat (limited to 'audio/audacity')
-rw-r--r--audio/audacity/Makefile67
-rw-r--r--audio/audacity/PLIST5
-rw-r--r--audio/audacity/distinfo31
-rw-r--r--audio/audacity/patches/patch-aa12
-rw-r--r--audio/audacity/patches/patch-ab33
-rw-r--r--audio/audacity/patches/patch-ad8
-rw-r--r--audio/audacity/patches/patch-ae48
-rw-r--r--audio/audacity/patches/patch-af8
-rw-r--r--audio/audacity/patches/patch-am18
-rw-r--r--audio/audacity/patches/patch-an24
-rw-r--r--audio/audacity/patches/patch-ao20
-rw-r--r--audio/audacity/patches/patch-ap10
-rw-r--r--audio/audacity/patches/patch-aq683
-rw-r--r--audio/audacity/patches/patch-ar84
-rw-r--r--audio/audacity/patches/patch-as25
-rw-r--r--audio/audacity/patches/patch-at13
-rw-r--r--audio/audacity/patches/patch-au13
-rw-r--r--audio/audacity/patches/patch-av13
18 files changed, 888 insertions, 227 deletions
diff --git a/audio/audacity/Makefile b/audio/audacity/Makefile
index c3857d9eb54..05692eb1a35 100644
--- a/audio/audacity/Makefile
+++ b/audio/audacity/Makefile
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2002/08/31 02:42:48 wiz Exp $
-#
+# $NetBSD: Makefile,v 1.9 2002/10/04 08:59:34 jlam Exp $
-DISTNAME= audacity-src-0.96
-PKGNAME= audacity-0.96
-PKGREVISION= 1
+DISTNAME= audacity-src-1.0.0-2
+PKGNAME= audacity-1.0.0.2
+WRKSRC= ${WRKDIR}/audacity-src-1.0.0
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=audacity/}
EXTRACT_SUFX= .tgz
@@ -14,29 +13,43 @@ COMMENT= audio editor
BUILD_DEPENDS+= zip-[0-9]*:../../archivers/zip
-GNU_CONFIGURE= YES
-CONFIGURE_ARGS+= --without-xaudio --with-libmpeg3
-USE_GMAKE= yes
+USE_BUILDLINK2= # defined
+USE_X11= # defined
+USE_GMAKE= # defined
+
+GNU_CONFIGURE= # defined
+CONFIGURE_ARGS+= --without-xaudio
+CONFIGURE_ARGS+= --with-id3
+CONFIGURE_ARGS+= --with-libmad
+CONFIGURE_ARGS+= --with-vorbis
+CONFIGURE_ARGS+= --with-dev-dsp="${DEVOSSSOUND}"
+CONFIGURE_ARGS+= --with-helpdir="${PREFIX}/share"
+HAVE_OSS= NO
+
+USE_LIBTOOL= # defined
+LTCONFIG_OVERRIDE= ${WRKSRC}/id3lib/ltconfig
+
+pre-configure:
+ cd ${WRKSRC}/id3lib/include/id3; ${MV} -f strings.h id3_strings.h
+ cd ${WRKSRC}/id3lib; for file in \
+ `${FIND} . -type f -print | \
+ ${XARGS} ${GREP} -l "\"strings\.h\""`; do \
+ ${SED} -e "s|\"strings\.h\"|\"id3_strings.h\"|g" \
+ $${file} > $${file}.fixed; \
+ ${MV} -f $${file}.fixed $${file}; \
+ done
+ cd ${WRKSRC} && ${AUTOCONF}
-USE_BUILDLINK2= yes
-
-# XXX Internal compiler error with -O2
-.if (${MACHINE_ARCH} == alpha)
-CFLAGS= -O
-.endif
-
-post-patch:
- ${SED} "s|XXXHELPDIRXXX|${PREFIX}/share|" \
- <${WRKSRC}/Help.cpp >${WRKSRC}/Help.cpp.tmp \
- && ${MV} ${WRKSRC}/Help.cpp.tmp ${WRKSRC}/Help.cpp
- ${RM} -rf ${WRKSRC}/mpeg3
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/audacity ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/audacity-help.htb ${PREFIX}/share
-
-.include "../../audio/id3lib/buildlink2.mk"
.include "../../audio/lame/buildlink2.mk"
-.include "../../devel/libmpeg3/buildlink2.mk"
+.include "../../audio/libvorbis/buildlink2.mk"
+.include "../../audio/mad/buildlink2.mk"
.include "../../x11/wxGTK/buildlink2.mk"
+.include "../../mk/ossaudio.buildlink2.mk"
+
+.include "../../mk/autoconf.mk"
.include "../../mk/bsd.pkg.mk"
+
+# XXX Internal compiler error with -O2
+.if ${MACHINE_ARCH} == "alpha"
+CFLAGS+= -O
+.endif
diff --git a/audio/audacity/PLIST b/audio/audacity/PLIST
index df2c1b7ee26..5e336de4256 100644
--- a/audio/audacity/PLIST
+++ b/audio/audacity/PLIST
@@ -1,3 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:15:16 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2002/10/04 08:59:35 jlam Exp $
bin/audacity
share/audacity-help.htb
+share/doc/audacity/LICENSE.txt
+share/doc/audacity/README.txt
+@dirrm share/doc/audacity
diff --git a/audio/audacity/distinfo b/audio/audacity/distinfo
index 79c182d99f8..93b33204d1f 100644
--- a/audio/audacity/distinfo
+++ b/audio/audacity/distinfo
@@ -1,15 +1,20 @@
-$NetBSD: distinfo,v 1.3 2001/11/17 06:36:14 itohy Exp $
+$NetBSD: distinfo,v 1.4 2002/10/04 08:59:35 jlam Exp $
-SHA1 (audacity-src-0.96.tgz) = 77ea8e263fcf72f0b3e42af9e5ee40a3ac83be80
-Size (audacity-src-0.96.tgz) = 1820114 bytes
-SHA1 (patch-aa) = d2ac74e7e82db6e2b23a43d809cb304d60458da1
-SHA1 (patch-ab) = e506c4b4732653f80a745123dbb65ac7bb023516
+SHA1 (audacity-src-1.0.0-2.tgz) = 43e8faae6b08b5da05eee1ca196714d4b46c407d
+Size (audacity-src-1.0.0-2.tgz) = 1699503 bytes
+SHA1 (patch-aa) = a06aca17bda18bf5069c6a9110c6b116378f9a63
+SHA1 (patch-ab) = 139a2c31b0972622c0c743060d26c4def96fbfc6
SHA1 (patch-ac) = 13d3a0f3733d5a155657f4137c1361c07d2f5f54
-SHA1 (patch-ad) = 73f5d6df3d990de5aefd6ee00ac1af371573e783
-SHA1 (patch-ae) = ff23f196a511403806060bbb59efa6465176d619
-SHA1 (patch-af) = bee0d29ef3e420cc3e55d61589d1f43939c57e6c
-SHA1 (patch-am) = 0bc51e734a382f056c31571dd6cc5c7b0a4ae63e
-SHA1 (patch-an) = eed703ca9d2aeaf3ed7d841bb6b7f13ba8b886d7
-SHA1 (patch-ao) = db05833c6f9ce6bf00d0e682a9099ffd583b147c
-SHA1 (patch-ap) = 07d9d67ed7220d61427e3c4746bc9d74f8fe03d6
-SHA1 (patch-aq) = 4d2c5981e4b6c3dfa52ec81dc4366151b82e813b
+SHA1 (patch-ad) = cc23e07d1f72d72fc9751b6370b64da525c4d19f
+SHA1 (patch-ae) = b94af5f25c3d96a9f2113b9a957671c2aaf20512
+SHA1 (patch-af) = 792b7337ef455adbfa935ce6b4923685f48d8b80
+SHA1 (patch-am) = f08098ffda76c7df16e338cde43fc3ae8a4dcb96
+SHA1 (patch-an) = c5ff2eca317134e57c9ce67ace38cf2085d83abb
+SHA1 (patch-ao) = 7e20649a7b56ca7aee66e8a518ec740e8c972c43
+SHA1 (patch-ap) = 0c8fde18fdd12e9986b24df14f4e4c07a2097eb1
+SHA1 (patch-aq) = 00a8ca5e27f0db723c99380193bf5e7fff828a54
+SHA1 (patch-ar) = 3fdc978f37d2f89fde0dcb7ba28f9fc5376d966b
+SHA1 (patch-as) = 1fb481f946bbaaa1b1bb07688bda48fe26702288
+SHA1 (patch-at) = 822621b2bd95cc56a6893a5c16f76317c239b03c
+SHA1 (patch-au) = 1f67a15f24439944e0d9f0c915514e34f696aedc
+SHA1 (patch-av) = 45df7d0d6d67f6ba2c14961f5beea1a656ce52c6
diff --git a/audio/audacity/patches/patch-aa b/audio/audacity/patches/patch-aa
index fc3214db423..5539944afe5 100644
--- a/audio/audacity/patches/patch-aa
+++ b/audio/audacity/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.2 2001/08/02 17:45:32 drochner Exp $
+$NetBSD: patch-aa,v 1.3 2002/10/04 08:59:35 jlam Exp $
---- WaveTrack.cpp.orig Sun Jul 29 03:17:54 2001
-+++ WaveTrack.cpp Mon Jul 30 13:33:15 2001
-@@ -898,7 +898,9 @@
+--- WaveTrack.cpp.orig Wed Jun 5 00:51:19 2002
++++ WaveTrack.cpp
+@@ -907,7 +907,9 @@ bool WaveTrack::Load(wxTextFile * in, Di
numSamples = 0;
block->Clear();
@@ -11,8 +11,8 @@ $NetBSD: patch-aa,v 1.2 2001/08/02 17:45:32 drochner Exp $
+#endif
wxString msg;
- msg.Printf("The file named \"%s\" is missing from the project.",
-@@ -911,7 +913,9 @@
+ msg.Printf("One or more data files is missing from this project.");
+@@ -919,7 +921,9 @@ bool WaveTrack::Load(wxTextFile * in, Di
block->Add(w);
}
diff --git a/audio/audacity/patches/patch-ab b/audio/audacity/patches/patch-ab
index 532021c406e..808c6433038 100644
--- a/audio/audacity/patches/patch-ab
+++ b/audio/audacity/patches/patch-ab
@@ -1,22 +1,27 @@
-$NetBSD: patch-ab,v 1.1.1.1 2001/06/17 19:13:52 drochner Exp $
+$NetBSD: patch-ab,v 1.2 2002/10/04 08:59:36 jlam Exp $
---- snd/audiooss.c.orig Mon Apr 30 01:07:29 2001
-+++ snd/audiooss.c Sun Jun 17 09:18:04 2001
-@@ -9,7 +9,7 @@
- #include <fcntl.h>
+--- snd/audiooss.c.orig Wed Jun 5 00:51:19 2002
++++ snd/audiooss.c
+@@ -16,7 +16,13 @@
+ #include <pthread.h>
#include <sys/ioctl.h>
--#include <sys/soundcard.h>
++#if defined(HAVE_SYS_SOUNDCARD_H)
+ #include <sys/soundcard.h>
++#elif defined(HAVE_SOUNDCARD_H)
+#include <soundcard.h>
++#else
++#error "No OSS soundcard.h header found."
++#endif
#include <sys/time.h>
/* snd includes */
-@@ -70,7 +70,7 @@
- int channels;
- int rate;
- oss_info dp;
-- const char *device = "/dev/dsp";
-+ const char *device = "/dev/sound";
+@@ -187,7 +193,7 @@ int audio_open(snd_type snd, long *flags
+ int channels;
+ int rate;
+ oss_info dp;
+- const char *device = "/dev/dsp";
++ const char *device = DEV_DSP;
+ pthread_t thread;
- snd->u.audio.descriptor = (oss_info) malloc(sizeof(oss_info_struct));
- dp = get_oss_info(snd);
+ snd->u.audio.descriptor = (oss_info) malloc(sizeof(oss_info_struct));
diff --git a/audio/audacity/patches/patch-ad b/audio/audacity/patches/patch-ad
index eb4d2c5373e..67f875a8803 100644
--- a/audio/audacity/patches/patch-ad
+++ b/audio/audacity/patches/patch-ad
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.1.1.1 2001/06/17 19:13:52 drochner Exp $
+$NetBSD: patch-ad,v 1.2 2002/10/04 08:59:36 jlam Exp $
---- snd/sndio.c.orig Fri Jun 15 13:50:37 2001
-+++ snd/sndio.c Fri Jun 15 13:51:00 2001
+--- snd/sndio.c.orig Wed Jun 5 00:51:19 2002
++++ snd/sndio.c
@@ -20,7 +20,7 @@
#ifdef WIN32
#include <sys/stat.h>
@@ -10,4 +10,4 @@ $NetBSD: patch-ad,v 1.1.1.1 2001/06/17 19:13:52 drochner Exp $
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/stat.h>
#else
- #include <stat.h>
+ #ifndef __WXMAC__
diff --git a/audio/audacity/patches/patch-ae b/audio/audacity/patches/patch-ae
index 7e8f62d1aad..373fed3c30a 100644
--- a/audio/audacity/patches/patch-ae
+++ b/audio/audacity/patches/patch-ae
@@ -1,21 +1,43 @@
-$NetBSD: patch-ae,v 1.3 2002/05/20 17:16:08 cjep Exp $
---- Makefile.in.orig Sun Jul 29 03:17:54 2001
-+++ Makefile.in Tue Jul 31 19:28:20 2001
-@@ -8,7 +8,7 @@
+$NetBSD: patch-ae,v 1.4 2002/10/04 08:59:36 jlam Exp $
+
+--- Makefile.in.orig Fri Jun 7 23:00:04 2002
++++ Makefile.in
+@@ -8,7 +8,10 @@
# from Makefile.in
#
-LIBS = @LIBS@
-+LIBS = @LIBS@ -lmpeg3 -lossaudio
++HELPDIR = @HELPDIR@
++DEV_DSP = @DEV_DSP@
++EXTRA_CPPFLAGS = -DHELPDIR=\"$(HELPDIR)\" -DDEV_DSP=\"$(DEV_DSP)\"
++LIBS = @LIBS@ ${LIBOSSAUDIO}
CFLAGS = @CFLAGS@ @CPPFLAGS@ -Iallegro
CCC = @CXX@
CC = @CC@
-@@ -82,7 +82,7 @@
- $(OBJDIR)/prefs/SampleRatePrefs.cpp.o \
- $(OBJDIR)/prefs/FileFormatPrefs.cpp.o \
- $(OBJDIR)/prefs/DirectoriesPrefs.cpp.o \
-- $(OBJDIR)/prefs/SpectrumPrefs.cpp.o @EXTRAOBJS@
-+ $(OBJDIR)/prefs/SpectrumPrefs.cpp.o
+@@ -106,10 +109,11 @@ audacity: $(OBJS) Makefile
+ #
+ #
+ install:
++ -test -d $(HELPDIR) || mkdir -m 755 -p $(HELPDIR)
++ -test -f audacity-help.htb && $(INSTALL) -m 644 audacity-help.htb \
++ $(HELPDIR)/audacity-help.htb
+ -test -d $(PREFIX)/share/doc/audacity || \
+ mkdir -m 755 -p $(PREFIX)/share/doc/audacity
+- -test -f audacity-help.htb && $(INSTALL) -m 644 audacity-help.htb \
+- $(PREFIX)/share/doc/audacity/audacity-help.htb
+ $(INSTALL) -m 644 README.txt $(PREFIX)/share/doc/audacity/README.txt
+ $(INSTALL) -m 644 LICENSE.txt $(PREFIX)/share/doc/audacity/LICENSE.txt
+ -test -d $(PREFIX)/bin || \
+@@ -175,10 +179,10 @@ $(DIRS): %:
+ #
- ########################################
- # DEPENDENCIES
+ $(OBJDIR)/%.cpp.o: %.cpp
+- $(CCC) -c $(CFLAGS) $< -o $@
++ $(CCC) -c $(CFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+ $(OBJDIR)/%.c.o: %.c
+- $(CC) -c $(CFLAGS) $< -o $@
++ $(CC) -c $(CFLAGS) $(EXTRA_CPPFLAGS) $< -o $@
+
+ #
+ # Include ".depend" if it exists (run "make dep" to generate it)
diff --git a/audio/audacity/patches/patch-af b/audio/audacity/patches/patch-af
index a7764cf0881..877b4a0c3e7 100644
--- a/audio/audacity/patches/patch-af
+++ b/audio/audacity/patches/patch-af
@@ -1,7 +1,7 @@
-$NetBSD: patch-af,v 1.1.1.1 2001/06/17 19:13:52 drochner Exp $
+$NetBSD: patch-af,v 1.2 2002/10/04 08:59:36 jlam Exp $
---- snd/sndcvt.c.orig Fri Jun 15 14:42:55 2001
-+++ snd/sndcvt.c Fri Jun 15 14:43:29 2001
+--- snd/sndcvt.c.orig Wed Jun 5 00:51:19 2002
++++ snd/sndcvt.c
@@ -16,7 +16,7 @@
#ifdef WIN32
#include <sys/stat.h>
@@ -10,4 +10,4 @@ $NetBSD: patch-af,v 1.1.1.1 2001/06/17 19:13:52 drochner Exp $
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/stat.h>
#else
- #include <stat.h>
+ #ifndef __WXMAC__
diff --git a/audio/audacity/patches/patch-am b/audio/audacity/patches/patch-am
index f23b0288d83..dcd5ace2a6e 100644
--- a/audio/audacity/patches/patch-am
+++ b/audio/audacity/patches/patch-am
@@ -1,31 +1,31 @@
-$NetBSD: patch-am,v 1.2 2001/08/02 17:45:35 drochner Exp $
+$NetBSD: patch-am,v 1.3 2002/10/04 08:59:36 jlam Exp $
---- AudioIO.cpp.orig Sun Jul 29 03:17:54 2001
-+++ AudioIO.cpp Mon Jul 30 14:01:18 2001
-@@ -33,7 +33,7 @@
+--- AudioIO.cpp.orig Wed Jun 5 00:51:19 2002
++++ AudioIO.cpp
+@@ -27,7 +27,7 @@ AudioIO *gAudioIO;
#ifdef __WXGTK__
bool gLinuxFirstTime = true;
-char gLinuxDevice[256] = "/dev/dsp";
-+char gLinuxDevice[256] = "/dev/sound";
++char gLinuxDevice[256] = DEV_DSP;
#endif
#ifdef BOUNCE
-@@ -74,7 +74,7 @@
+@@ -68,7 +68,7 @@ bool AudioIO::OpenPlaybackDevice(Audacit
wxString deviceStr = gPrefs->Read("/AudioIO/PlaybackDevice", "");
#ifdef __WXGTK__
if (deviceStr == "")
- deviceStr = "/dev/dsp";
-+ deviceStr = "/dev/sound";
++ deviceStr = DEV_DSP;
#endif
strcpy(mPlayNode.u.audio.devicename, deviceStr.c_str());
strcpy(mPlayNode.u.audio.interfacename, "");
-@@ -207,7 +207,7 @@
+@@ -177,7 +177,7 @@ bool AudioIO::StartRecord(AudacityProjec
wxString deviceStr = gPrefs->Read("/AudioIO/RecordingDevice", "");
#ifdef __WXGTK__
if (deviceStr == "")
- deviceStr = "/dev/dsp";
-+ deviceStr = "/dev/sound";
++ deviceStr = DEV_DSP;
#endif
strcpy(mRecordNode.u.audio.devicename, deviceStr.c_str());
strcpy(mRecordNode.u.audio.interfacename, "");
diff --git a/audio/audacity/patches/patch-an b/audio/audacity/patches/patch-an
index cb69e0d9d1c..ab2c70fc630 100644
--- a/audio/audacity/patches/patch-an
+++ b/audio/audacity/patches/patch-an
@@ -1,13 +1,15 @@
-$NetBSD: patch-an,v 1.2 2001/08/02 17:45:35 drochner Exp $
+$NetBSD: patch-an,v 1.3 2002/10/04 08:59:36 jlam Exp $
---- Help.cpp.orig Sun Jul 29 03:17:54 2001
-+++ Help.cpp Mon Jul 30 14:13:57 2001
-@@ -61,7 +61,7 @@
- void InitHelp(wxWindow * parent)
- {
- if (!gHelp) {
-- wxString defaultLoc = wxGetCwd() + wxFILE_SEP_PATH + "audacity-help.htb";
-+ wxString defaultLoc = "XXXHELPDIRXXX/audacity-help.htb";
+--- Help.cpp.orig Wed Jun 5 00:51:19 2002
++++ Help.cpp
+@@ -106,6 +106,10 @@ void InitHelp(wxWindow * parent)
- wxString helpFilePath =
- gPrefs->Read("/Help/HelpFilePath", defaultLoc);
+ paths.Add(wxGetCwd() + wxFILE_SEP_PATH + "audacity-help.htb");
+
++ #ifdef HELPDIR
++ paths.Add(wxString(HELPDIR) + wxFILE_SEP_PATH + "audacity-help.htb");
++ #endif
++
+ #ifdef __WXGTK__
+ paths.Add("/usr/local/share/doc/audacity/audacity-help.htb");
+ paths.Add("/usr/share/doc/audacity/audacity-help.htb");
diff --git a/audio/audacity/patches/patch-ao b/audio/audacity/patches/patch-ao
index ffbc4516146..54db980e25b 100644
--- a/audio/audacity/patches/patch-ao
+++ b/audio/audacity/patches/patch-ao
@@ -1,33 +1,33 @@
-$NetBSD: patch-ao,v 1.2 2001/08/02 17:45:35 drochner Exp $
+$NetBSD: patch-ao,v 1.3 2002/10/04 08:59:37 jlam Exp $
---- prefs/AudioIOPrefs.cpp.orig Sun Jul 29 03:17:54 2001
-+++ prefs/AudioIOPrefs.cpp Mon Jul 30 14:20:42 2001
-@@ -52,8 +52,8 @@
+--- prefs/AudioIOPrefs.cpp.orig Wed Jun 5 00:51:19 2002
++++ prefs/AudioIOPrefs.cpp
+@@ -74,8 +74,8 @@ AudioIOPrefs::AudioIOPrefs(wxWindow * pa
PrefsPanel(parent)
{
#ifdef __WXGTK__
- wxString defaultPlaybackDevice = "/dev/dsp";
- wxString defaultRecordingDevice = "/dev/dsp";
-+ wxString defaultPlaybackDevice = "/dev/sound";
-+ wxString defaultRecordingDevice = "/dev/sound";
++ wxString defaultPlaybackDevice = DEV_DSP;
++ wxString defaultRecordingDevice = DEV_DSP;
#endif // __WXGTK__
#ifdef __WXMSW__
-@@ -513,7 +513,7 @@
+@@ -565,7 +565,7 @@ void AudioIOPrefs::SetPlaybackDeviceDefa
{
/* TODO: attempt autodetection? */
#ifdef __WXGTK__
- mPlaybackDeviceCtrl->SetValue("/dev/dsp");
-+ mPlaybackDeviceCtrl->SetValue("/dev/sound");
++ mPlaybackDeviceCtrl->SetValue(DEV_DSP);
#endif // __WXGTK__
}
-@@ -524,7 +524,7 @@
+@@ -576,7 +576,7 @@ void AudioIOPrefs::TestRecordingDevice(w
void AudioIOPrefs::SetRecordingDeviceDefault(wxCommandEvent & event)
{
#ifdef __WXGTK__
- mRecordingDeviceCtrl->SetValue("/dev/dsp");
-+ mRecordingDeviceCtrl->SetValue("/dev/sound");
++ mRecordingDeviceCtrl->SetValue(DEV_DSP);
#endif // __WXGTK__
}
diff --git a/audio/audacity/patches/patch-ap b/audio/audacity/patches/patch-ap
index 8ce0150513e..a443ea56754 100644
--- a/audio/audacity/patches/patch-ap
+++ b/audio/audacity/patches/patch-ap
@@ -1,13 +1,13 @@
-$NetBSD: patch-ap,v 1.1 2001/11/17 06:36:15 itohy Exp $
+$NetBSD: patch-ap,v 1.2 2002/10/04 08:59:37 jlam Exp $
---- snd/sndhead.h.orig Sun Jul 29 10:17:54 2001
-+++ snd/sndhead.h Fri Nov 16 22:37:01 2001
+--- snd/sndhead.h.orig Wed Jun 5 00:51:19 2002
++++ snd/sndhead.h
@@ -1,7 +1,7 @@
/* sndhead.h -- header info */
/* NeXT sound headers */
--#define NEXT_SND_MAGIC (*((long *) ".snd")) // was: ((int)0x2e736e64)
-+#define NEXT_SND_MAGIC (sndmagic.i[0]) // was: ((int)0x2e736e64)
+-#define NEXT_SND_MAGIC (*((int32_t *) ".snd")) // was: ((int)0x2e736e64)
++#define NEXT_SND_MAGIC (sndmagic.i[0]) // was: ((int)0x2e736e64)
#define NEXT_SND_FORMAT_UNSPECIFIED (0)
#define NEXT_SND_FORMAT_ULAW_8 (1)
#define NEXT_SND_FORMAT_LINEAR_8 (2)
diff --git a/audio/audacity/patches/patch-aq b/audio/audacity/patches/patch-aq
index dd2b0fc6841..f9e1520c160 100644
--- a/audio/audacity/patches/patch-aq
+++ b/audio/audacity/patches/patch-aq
@@ -1,278 +1,741 @@
-$NetBSD: patch-aq,v 1.1 2001/11/17 06:36:15 itohy Exp $
+$NetBSD: patch-aq,v 1.2 2002/10/04 08:59:37 jlam Exp $
---- snd/sndheader.c.orig Sun Jul 29 10:17:54 2001
-+++ snd/sndheader.c Fri Nov 16 22:39:47 2001
-@@ -52,6 +52,23 @@
+--- snd/sndheader.c.orig Wed Jun 5 00:51:19 2002
++++ snd/sndheader.c
+@@ -52,8 +52,12 @@
#endif
-+#ifdef __NetBSD__
-+#include <sys/types.h>
-+typedef int16_t int16;
-+typedef int32_t int32;
-+typedef u_int32_t uint32;
+-#if defined(MAC) && !defined(__MACOSX__)
+-typedef long int32_t;
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(LINUX) || defined(__MACOSX__)
++# include <sys/types.h>
+#else
-+# if defined(__alpha) || defined(__alpha__)
-+typedef short int16;
-+typedef int int32;
-+typedef unsigned int uint32;
-+# else
-+typedef short int16;
-+typedef long int32;
-+typedef unsigned long uint32;
-+# endif
-+#endif
-+
- #ifndef min
- #define min(a, b) ((a) < (b) ? (a) : (b))
++typedef short int16_t;
++typedef long int32_t;
++typedef unsigned long u_int32_t;
#endif
-@@ -71,16 +88,23 @@
+
+ #ifndef min
+@@ -75,16 +79,23 @@ typedef long int32_t;
#define htonl(x) (x)
#endif
+const union {
+ char c[12];
-+ int32 i[3];
++ int32_t i[3];
+} sndmagic = {
-+ ".sndFORMRIFF"
++ ".sndFORMRIFF"
+};
+
/* AIFF file Marker declaration */
typedef struct {
- short id;
- long position;
-+ int16 id;
-+ int32 position;
++ int16_t id;
++ int32_t position;
} marker_node, *marker_type;
/* instrument definitions */
- typedef short marker_id;
+-typedef short marker_id;
++typedef int16_t marker_id;
typedef struct {
- short play_mode;
-+ int16 play_mode;
++ int16_t play_mode;
marker_id begin_loop;
marker_id end_loop;
} aiff_loop_node, *aiff_loop_type;
-@@ -138,21 +162,21 @@
+@@ -97,13 +108,13 @@ typedef struct {
+ char high_note;
+ char low_velocity;
+ char high_velocity;
+- short gain;
++ int16_t gain;
+ aiff_loop_node sustain_loop;
+ aiff_loop_node release_loop;
+ } inst_node;
+
+
+-long snd_read_header(snd_type snd, long *flags);
++int32_t snd_read_header(snd_type snd, long *flags);
+ void snd_write_header(snd_type snd, long *flags);
+
+ double read_ieee_extended(snd_type snd);
+@@ -132,7 +143,7 @@ void resetfile(int file)
+ }
+
+
+-char readchar(int file, long *read_in)
++char readchar(int file, int32_t *read_in)
+ {
+ char c = 0;
+ readitem(file, &c, char);
+@@ -140,23 +151,23 @@ char readchar(int file, long *read_in)
+ }
+
- long readlong(int file, long *read_in)
+-long readlong(int file, long *read_in)
++int32_t read32(int file, int32_t *read_in)
{
- long l = 0;
-- readitem(file, &l, long);
-+ int32 l = 0;
-+ readitem(file, &l, int32);
++ int32_t l = 0;
+ readitem(file, &l, int32_t);
return ntohl(l);
}
- short readshort(int file, long *read_in)
+-short readshort(int file, long *read_in)
++int16_t read16(int file, int32_t *read_in)
{
- short s = 0;
- readitem(file, &s, short);
-+ int16 s = 0;
-+ readitem(file, &s, int16);
++ int16_t s = 0;
++ readitem(file, &s, int16_t);
return ntohs(s);
}
--long revlong(long l)
-+int32 revlong(int32 l)
+-int32_t revlong(int32_t l)
++int32_t rev32(int32_t l)
{
return (((l >> 0) & 0xFF) << 24) |
(((l >> 8) & 0xFF) << 16) |
-@@ -161,19 +185,19 @@
+@@ -165,32 +176,32 @@ int32_t revlong(int32_t l)
}
-long readrevlong(int file, long *read_in)
-+int32 readrevlong(int file, long *read_in)
++int32_t readrev32(int file, int32_t *read_in)
{
- return revlong(readlong(file, read_in));
+- return revlong(readlong(file, read_in));
++ return rev32(read32(file, read_in));
}
-short revshort(short s)
-+int16 revshort(int16 s)
++int16_t rev16(int16_t s)
{
return ((s & 0xFF) << 8) | ((s >> 8) & 0xFF);
}
-short readrevshort(int file, long *read_in)
-+int16 readrevshort(int file, long *read_in)
++int16_t readrev16(int file, int32_t *read_in)
+ {
+- return revshort(readshort(file, read_in));
++ return rev16(read16(file, read_in));
+ }
+
+
+-float readfloat(int file, long *read_in)
++float readfloat(int file, int32_t *read_in)
{
- return revshort(readshort(file, read_in));
+ float f = 0.0F;
+ readitem(file, &f, float);
+ return f;
}
-@@ -200,25 +224,25 @@
+
+-unsigned char readuchar(int file, long *read_in)
++unsigned char readuchar(int file, int32_t *read_in)
+ {
+ unsigned char c = 0;
+ readitem(file, &c, unsigned char);
+@@ -204,27 +215,27 @@ unsigned char readuchar(int file, long *
#define writeitem(F,L,T) snd_file_write(F, (char *) L, sizeof(T));
--void writelong(int file, long l)
-+void writelong(int file, int32 l)
+-void writelong(int file, int32_t l)
++void write32(int file, int32_t l)
{
l = htonl(l);
-- writeitem(file, &l, long);
-+ writeitem(file, &l, int32);
+ writeitem(file, &l, int32_t);
}
-void writeshort(int file, short s)
-+void writeshort(int file, int16 s)
++void write16(int file, int16_t s)
{
s = htons(s);
- writeitem(file, &s, short);
-+ writeitem(file, &s, int16);
++ writeitem(file, &s, int16_t);
}
-void writerevlong(int file, long l)
-+void writerevlong(int file, int32 l)
++void writerev32(int file, int32_t l)
{
- writelong(file, revlong(l));
+- writelong(file, revlong(l));
++ write32(file, rev32(l));
}
-void writerevshort(int file, short s)
-+void writerevshort(int file, int16 s)
++void writerev16(int file, int16_t s)
{
- writeshort(file, revshort(s));
+- writeshort(file, revshort(s));
++ write16(file, rev16(s));
}
-@@ -375,13 +399,14 @@
+
+
+@@ -344,9 +355,9 @@ int snd_open_file(snd_type snd, long *fl
+
+ int snd_seek(snd_type snd, double skip)
+ {
+- long offset_in_bytes = ((long) (skip * snd->format.srate + 0.5)) *
++ int32_t offset_in_bytes = ((int32_t) (skip * snd->format.srate + 0.5)) *
+ snd_bytes_per_frame(snd);
+- long new_offset = snd->u.file.byte_offset + offset_in_bytes;
++ int32_t new_offset = snd->u.file.byte_offset + offset_in_bytes;
+
+ if (new_offset > snd->u.file.end_offset) return !SND_SUCCESS;
+ snd->u.file.byte_offset = new_offset;
+@@ -356,11 +367,11 @@ int snd_seek(snd_type snd, double skip)
+ return SND_SUCCESS;
+ }
+
+-void readloop(aiff_loop_type loop, int file, long *read_in)
++void readloop(aiff_loop_type loop, int file, int32_t *read_in)
+ {
+- loop->play_mode = readshort(file, read_in);
+- loop->begin_loop = readshort(file, read_in);
+- loop->end_loop = readshort(file, read_in);
++ loop->play_mode = read16(file, read_in);
++ loop->begin_loop = read16(file, read_in);
++ loop->end_loop = read16(file, read_in);
}
--#define AIFF_SND_MAGIC (*((long *) "FORM"))
--#define WAVE_SND_MAGIC (*((long *) "RIFF"))
-+#define AIFF_SND_MAGIC (sndmagic.i[1])
-+#define WAVE_SND_MAGIC (sndmagic.i[2])
+@@ -393,44 +404,44 @@ static double StepToHz(double step)
+ #define AIFF_SND_MAGIC (*((int32_t *) "FORM"))
+ #define WAVE_SND_MAGIC (*((int32_t *) "RIFF"))
- long snd_read_header(snd_type snd, long *flags)
+-long snd_read_header(snd_type snd, long *flags)
++int32_t snd_read_header(snd_type snd, long *flags)
{
- long read_in = 0;
+- long read_in = 0;
- long magic, bytemode, len;
-+ int32 magic, bytemode;
-+ long len;
- short type=IRCAM_SND_COMMENT, size=0, encoding;
+- short type=IRCAM_SND_COMMENT, size=0, encoding;
++ int32_t read_in = 0;
++ int32_t magic, bytemode, len;
++ int16_t type=IRCAM_SND_COMMENT, size=0, encoding;
unsigned char buf[SIZEOF_IRCAM_HEADER];
-@@ -472,7 +497,7 @@
+ snd->u.file.loop_info = FALSE;
+ len = snd_file_len(snd->u.file.file); /* get length of file */
+- magic = readlong(snd->u.file.file, &read_in);
+- magic = htonl(magic); /* undo what readlong did */
++ magic = read32(snd->u.file.file, &read_in);
++ magic = htonl(magic); /* undo what read32 did */
+ if (magic == IRCAM_SND_MAGIC) {
+ snd->u.file.header = SND_HEAD_IRCAM;
+ snd->format.srate = (double) readfloat(snd->u.file.file, &read_in);
+- snd->format.channels = readlong(snd->u.file.file, &read_in);
+- bytemode = readlong(snd->u.file.file, &read_in);
++ snd->format.channels = read32(snd->u.file.file, &read_in);
++ bytemode = read32(snd->u.file.file, &read_in);
+ (*flags) |= SND_HEAD_SRATE | SND_HEAD_CHANNELS;
+ /* now SF_ULAW, SF_SHORT, SF_FLOAT,AE_CHAR, AE_ALAW, AE_ULAW, AE_SHORT, AE_LONG, AE_FLOAT or other */
+ while (type != IRCAM_SND_END && type != IRCAM_SND_AUDIOENCODE) {
+- type = readshort(snd->u.file.file, &read_in);
+- size = readshort(snd->u.file.file, &read_in);
+- if (size > 2 * sizeof(short)) {
++ type = read16(snd->u.file.file, &read_in);
++ size = read16(snd->u.file.file, &read_in);
++ if (size > 2 * sizeof(int16_t)) {
+ int rc;
+ /* make sure we don't overflow buffer */
+ if (size < SIZEOF_IRCAM_HEADER) {
+- rc = snd_file_read(snd->u.file.file, (char *) buf, (size - 2 * sizeof(short)));
++ rc = snd_file_read(snd->u.file.file, (char *) buf, (size - 2 * sizeof(int16_t)));
+ } else {
+ rc = 0; /* force error */
+ }
+- if (rc != (size - 2 * (int) sizeof(short))) {
++ if (rc != (size - 2 * (int) sizeof(int16_t))) {
+ return fail(snd, "bad IRCAM header");
+ }
+- read_in += size - 2 * sizeof(short);
++ read_in += size - 2 * sizeof(int16_t);
+ }
+ }
+ if (type == IRCAM_SND_AUDIOENCODE) {
+ /* printf("Got IRCAM sound format\n"); */
+- encoding = *((short *)(buf));
++ encoding = *((int16_t *)(buf));
+ (*flags) |= SND_HEAD_MODE | SND_HEAD_BITS;
+ switch (encoding) {
+ case IRCAM_SND_CHAR:
+@@ -469,7 +480,7 @@ long snd_read_header(snd_type snd, long
+ (*flags) |= SND_HEAD_MODE;
+ snd->format.mode = SND_MODE_ULAW;
+ break;
+- case sizeof(short):
++ case sizeof(int16_t):
+ snd->format.mode = SND_MODE_PCM;
+ break;
+ case sizeof(float):
+@@ -487,13 +498,13 @@ long snd_read_header(snd_type snd, long
snd->u.file.current_offset = snd->u.file.byte_offset;
} else if (magic == NEXT_SND_MAGIC) {
- long hdr_size, trash, rate;
-+ int32 hdr_size, trash, rate;
++ int32_t hdr_size, trash, rate;
snd->u.file.header = SND_HEAD_NEXT;
- hdr_size = readlong(snd->u.file.file, &read_in); /* dataLocation */
- trash = readlong(snd->u.file.file, &read_in); /* dataSize */
-@@ -550,20 +575,20 @@
+- hdr_size = readlong(snd->u.file.file, &read_in); /* dataLocation */
+- trash = readlong(snd->u.file.file, &read_in); /* dataSize */
+- bytemode = readlong(snd->u.file.file, &read_in); /* dataFormat */
+- rate = readlong(snd->u.file.file, &read_in); /* samplingRate */
+- snd->format.channels = readlong(snd->u.file.file, &read_in); /* channelCount */
++ hdr_size = read32(snd->u.file.file, &read_in); /* dataLocation */
++ trash = read32(snd->u.file.file, &read_in); /* dataSize */
++ bytemode = read32(snd->u.file.file, &read_in); /* dataFormat */
++ rate = read32(snd->u.file.file, &read_in); /* samplingRate */
++ snd->format.channels = read32(snd->u.file.file, &read_in); /* channelCount */
+
+ snd->format.srate = (double) rate;
+ (*flags) = SND_HEAD_SRATE | SND_HEAD_CHANNELS;
+@@ -565,20 +576,20 @@ long snd_read_header(snd_type snd, long
}
snd->u.file.byte_offset = read_in;
} else if (magic == AIFF_SND_MAGIC) {
- unsigned long totalsize;
-+ uint32 totalsize;
- unsigned long ssnd_start = 0;
+- unsigned long ssnd_start = 0;
++ u_int32_t totalsize;
++ u_int32_t ssnd_start = 0;
char buf[4];
- long blocksize;
- long offset;
-+ int32 blocksize;
-+ int32 offset;
- long chunksize;
+- long chunksize;
- long ssnd_chunksize;
-+ int32 ssnd_chunksize;
++ int32_t blocksize;
++ int32_t offset;
++ int32_t chunksize;
++ int32_t ssnd_chunksize;
inst_node inst;
- short nmarkers;
+- short nmarkers;
++ int16_t nmarkers;
marker_type markers = NULL;
int inst_read = FALSE;
snd->u.file.header = SND_HEAD_AIFF;
- totalsize = (unsigned long) readlong(snd->u.file.file, &read_in);
-+ totalsize = (uint32) readlong(snd->u.file.file, &read_in);
++ totalsize = (u_int32_t) read32(snd->u.file.file, &read_in);
if (snd_file_read(snd->u.file.file, buf, 4) != 4 || strncmp(buf, "AIFF", 4) != 0) {
return fail(snd,
"AIFF 'FORM' chunk does not specify 'AIFF' as type\n");
-@@ -587,13 +612,13 @@
+@@ -602,15 +613,15 @@ long snd_read_header(snd_type snd, long
#endif
if (strncmp(buf, "COMM", 4) == 0) {
/* COMM chunk */
- long chunksize;
- long frames;
-+ int32 chunksize;
-+ int32 frames;
- chunksize = readlong(snd->u.file.file, &read_in);
+- chunksize = readlong(snd->u.file.file, &read_in);
++ int32_t chunksize;
++ int32_t frames;
++ chunksize = read32(snd->u.file.file, &read_in);
if (chunksize != 18) {
return fail(snd, "AIFF COMM chunk has bad size\n");
}
- snd->format.channels = (long) readshort(snd->u.file.file, &read_in);
-+ snd->format.channels = (int32) readshort(snd->u.file.file, &read_in);
- frames = readlong(snd->u.file.file, &read_in);
- snd->format.bits = readshort(snd->u.file.file, &read_in);
+- frames = readlong(snd->u.file.file, &read_in);
+- snd->format.bits = readshort(snd->u.file.file, &read_in);
++ snd->format.channels = (int32_t) read16(snd->u.file.file, &read_in);
++ frames = read32(snd->u.file.file, &read_in);
++ snd->format.bits = read16(snd->u.file.file, &read_in);
snd->format.mode = SND_MODE_PCM;
-@@ -615,7 +640,7 @@
+ snd->format.srate = read_ieee_extended(snd);
+ snd->u.file.end_offset = frames * snd_bytes_per_frame(snd) +
+@@ -619,9 +630,9 @@ long snd_read_header(snd_type snd, long
+ SND_HEAD_CHANNELS | SND_HEAD_LEN;
+ } else if (strncmp(buf, "SSND", 4) == 0) {
+ /* SSND chunk */
+- ssnd_chunksize = readlong(snd->u.file.file, &read_in);
+- offset = readlong(snd->u.file.file, &read_in);
+- blocksize = readlong(snd->u.file.file, &read_in);
++ ssnd_chunksize = read32(snd->u.file.file, &read_in);
++ offset = read32(snd->u.file.file, &read_in);
++ blocksize = read32(snd->u.file.file, &read_in);
+ /* remember the file offset, there may be more chunks */
+ ssnd_start = snd_file_lseek(snd->u.file.file, 0, SND_SEEK_CUR);
+ chunksize = ssnd_chunksize;
+@@ -630,31 +641,31 @@ long snd_read_header(snd_type snd, long
snd_file_lseek(snd->u.file.file, chunksize - 8, SND_SEEK_CUR);
read_in += chunksize - 8;
} else if (strncmp(buf, "MARK", 4) == 0) {
- long chunksize = readlong(snd->u.file.file, &read_in);
-+ int32 chunksize = readlong(snd->u.file.file, &read_in);
++ int32_t chunksize = read32(snd->u.file.file, &read_in);
int i;
- nmarkers = readshort(snd->u.file.file, &read_in);
-@@ -658,7 +683,7 @@
+- nmarkers = readshort(snd->u.file.file, &read_in);
++ nmarkers = read16(snd->u.file.file, &read_in);
+ markers = (marker_type) snd_alloc(nmarkers * sizeof(marker_node));
+ for (i = 0; i < nmarkers; i++) {
+ unsigned char label[256];
+ int len;
+- markers[i].id = readshort(snd->u.file.file, &read_in);
+- markers[i].position = readlong(snd->u.file.file, &read_in);
+- if (snd_file_read(snd->u.file.file, (char *)label, (long)1) != 1)
++ markers[i].id = read16(snd->u.file.file, &read_in);
++ markers[i].position = read32(snd->u.file.file, &read_in);
++ if (snd_file_read(snd->u.file.file, (char *)label, (int32_t)1) != 1)
+ return fail(snd, "problem reading AIFF file\n");
+ len = label[0] | 1;
+- if (snd_file_read(snd->u.file.file, (char *)label, (long)len) != len)
++ if (snd_file_read(snd->u.file.file, (char *)label, (int32_t)len) != len)
+ return fail(snd, "problam reading AIFF file\n");
+ }
+ } else if (strncmp(buf, "INST", 4) == 0) {
+- chunksize = readlong(snd->u.file.file, &read_in);
++ chunksize = read32(snd->u.file.file, &read_in);
+ inst.base_note = readchar(snd->u.file.file, &read_in);
+ inst.detune = readchar(snd->u.file.file, &read_in);
+ inst.low_note = readchar(snd->u.file.file, &read_in);
+ inst.high_note = readchar(snd->u.file.file, &read_in);
+ inst.low_velocity = readchar(snd->u.file.file, &read_in);
+ inst.high_velocity = readchar(snd->u.file.file, &read_in);
+- inst.gain = readshort(snd->u.file.file, &read_in);
++ inst.gain = read16(snd->u.file.file, &read_in);
+ readloop(&inst.sustain_loop, snd->u.file.file, &read_in);
+ readloop(&inst.release_loop, snd->u.file.file, &read_in);
+
+@@ -673,7 +684,7 @@ long snd_read_header(snd_type snd, long
snd->u.file.high_velocity = inst.high_velocity;
inst_read = TRUE;
} else {
- long chunksize = readlong(snd->u.file.file, &read_in);
-+ int32 chunksize = readlong(snd->u.file.file, &read_in);
++ int32_t chunksize = read32(snd->u.file.file, &read_in);
if (chunksize & 1) chunksize ++; /* round up to even number */
read_in += chunksize;
/* skip the chunk */
-@@ -707,7 +732,7 @@
+@@ -722,13 +733,13 @@ long snd_read_header(snd_type snd, long
snd->u.file.current_offset = snd->u.file.byte_offset;
snd->u.file.end_offset = snd->u.file.byte_offset + ssnd_chunksize - 8;
} else if (magic == WAVE_SND_MAGIC) {
- long size;
-+ int32 size;
++ int32_t size;
char buf[4];
- short format;
+- short format;
++ int16_t format;
-@@ -721,7 +746,7 @@
+ snd->u.file.header = SND_HEAD_WAVE;
+ /* RIFF WAVE uses little-endian format -- be careful! */
+- size = readrevlong(snd->u.file.file, &read_in);
++ size = readrev32(snd->u.file.file, &read_in);
+ if (snd_file_read(snd->u.file.file, buf, 4) != 4 || strncmp(buf, "WAVE", 4) != 0) {
+ return fail(snd,
+ "RIFF file does not specify 'WAVE' as type\n");
+@@ -736,19 +747,19 @@ long snd_read_header(snd_type snd, long
/* Skip to the next "fmt " or end of file */
while (1) {
- long siz;
-+ int32 siz;
++ int32_t siz;
if (snd_file_read(snd->u.file.file, buf, 4) != 4) {
return fail(snd, "WAVE file missing fmt spec");
}
-@@ -893,7 +918,7 @@
+ if (strncmp("fmt ", buf, 4) == 0) break;
+- siz = readrevlong(snd->u.file.file, &read_in);
++ siz = readrev32(snd->u.file.file, &read_in);
+ while (siz > 0) {
+ snd_file_read(snd->u.file.file, buf, 1);
+ siz--;
+ }
+ }
+- size = readrevlong(snd->u.file.file, &read_in);
+- format = readrevshort(snd->u.file.file, &read_in);
++ size = readrev32(snd->u.file.file, &read_in);
++ format = readrev16(snd->u.file.file, &read_in);
+ switch (format) {
+ case WAVE_FORMAT_UNKNOWN:
+ return fail(snd, "file in Microsoft Official Unknown format");
+@@ -775,11 +786,11 @@ long snd_read_header(snd_type snd, long
+ default:
+ return fail(snd, "file in unknown format");
+ }
+- snd->format.channels = readrevshort(snd->u.file.file, &read_in);
+- snd->format.srate = (double) readrevlong(snd->u.file.file, &read_in);
+- readrevlong(snd->u.file.file, &read_in); /* Average bytes/second */
+- readrevshort(snd->u.file.file, &read_in); /* Block align */
+- snd->format.bits = readrevshort(snd->u.file.file, &read_in);
++ snd->format.channels = readrev16(snd->u.file.file, &read_in);
++ snd->format.srate = (double) readrev32(snd->u.file.file, &read_in);
++ readrev32(snd->u.file.file, &read_in); /* Average bytes/second */
++ readrev16(snd->u.file.file, &read_in); /* Block align */
++ snd->format.bits = readrev16(snd->u.file.file, &read_in);
+ snd->format.mode = SND_MODE_PCM;
+ if (snd->format.bits == 8) snd->format.mode = SND_MODE_UPCM; /* unsigned */
+ *flags = SND_HEAD_MODE | SND_HEAD_BITS | SND_HEAD_SRATE |
+@@ -791,19 +802,19 @@ long snd_read_header(snd_type snd, long
+ snd_file_lseek(snd->u.file.file, size - 16, SND_SEEK_CUR);
+ /* skip over any other forms until you find "data" */
+ while (1) {
+- long n = snd_file_read(snd->u.file.file, buf, 4);
++ int32_t n = snd_file_read(snd->u.file.file, buf, 4);
+ if (n != 4) {
+ return fail(snd, "missing data portion");
+ }
+ if (strncmp("data", buf, 4) == 0) break;
+- n = readrevlong(snd->u.file.file, &read_in); /* length of form */
++ n = readrev32(snd->u.file.file, &read_in); /* length of form */
+ snd->u.file.byte_offset =
+ snd_file_lseek(snd->u.file.file, n, SND_SEEK_CUR);
+ }
+ snd->u.file.byte_offset += 8; /* "data" and length use 8 bytes */
+ snd->u.file.current_offset = snd->u.file.byte_offset;
+ snd->u.file.end_offset = snd->u.file.byte_offset +
+- readrevlong(snd->u.file.file, &read_in);
++ readrev32(snd->u.file.file, &read_in);
+ } else {
+ snd->u.file.header = SND_HEAD_NONE;
+ (*flags) = 0;
+@@ -825,15 +836,15 @@ long snd_read_header(snd_type snd, long
+
+ /* write_zeros -- add zeros to end of file */
+ /**/
+-void write_zeros(int fout, long n)
++void write_zeros(int fout, int32_t n)
+ {
+- long zero = 0;
++ int32_t zero = 0;
+ while (n > 0) {
+ /* don't put min() in the arg list of write on an RS6K */
+ /* there seems to be a compiler bug */
+- long len = min(n, sizeof(long));
++ int32_t len = min(n, sizeof(int32_t));
+ snd_file_write(fout, (char *) &zero, len);
+- n -= sizeof(long);
++ n -= sizeof(int32_t);
+ }
+ }
+
+@@ -844,17 +855,17 @@ void write_zeros(int fout, long n)
+ * SIZEOF_IRCAM_HEADER, but in the case of the hybrid CMIX headers, length
+ * will be shorter to accommodate the NeXT header prefix
+ */
+-void write_ircam_start(snd_type snd, long length)
++void write_ircam_start(snd_type snd, int32_t length)
+ {
+- short encoding;
++ int16_t encoding;
+
+- writelong(snd->u.file.file, IRCAM_SND_MAGIC);
++ write32(snd->u.file.file, IRCAM_SND_MAGIC);
+ writefloat(snd->u.file.file, (float) snd->format.srate);
+- writelong(snd->u.file.file, snd->format.channels);
+- writelong(snd->u.file.file, snd->format.bits >> 3);
++ write32(snd->u.file.file, snd->format.channels);
++ write32(snd->u.file.file, snd->format.bits >> 3);
+ /* now write the "CODE" section */
+- writeshort(snd->u.file.file, IRCAM_SND_AUDIOENCODE);
+- writeshort(snd->u.file.file, 3 * sizeof(short)); /* size of this record */
++ write16(snd->u.file.file, IRCAM_SND_AUDIOENCODE);
++ write16(snd->u.file.file, 3 * sizeof(int16_t)); /* size of this record */
+ if (snd->format.bits == 8) {
+ encoding = IRCAM_SND_CHAR;
+ if (snd->format.mode == SND_MODE_ULAW) encoding = IRCAM_SND_ULAW;
+@@ -867,11 +878,11 @@ void write_ircam_start(snd_type snd, lon
+ encoding = IRCAM_SND_FLOAT;
+ if (snd->format.mode == SND_MODE_PCM) encoding = IRCAM_SND_LONG;
+ }
+- writeshort(snd->u.file.file, encoding);
++ write16(snd->u.file.file, encoding);
+
+ /* end the "CODE" section */
+- writeshort(snd->u.file.file, IRCAM_SND_END);
+- writeshort(snd->u.file.file, 2 * sizeof(short));
++ write16(snd->u.file.file, IRCAM_SND_END);
++ write16(snd->u.file.file, 2 * sizeof(int16_t));
+
+ /* write filler */
+ length -= ( 16 /* head */ + 6 /* AudioEncode */ + 4 /* End */ );
+@@ -885,14 +896,14 @@ void write_ircam_start(snd_type snd, lon
+ * Note: uses length for Length field, but does not fill with zeros.
+ * Instead, this routine writes only the NeXT 24 byte header.
+ */
+-void write_next_start(snd_type snd, long length)
++void write_next_start(snd_type snd, int32_t length)
+ {
+- short encoding;
++ int16_t encoding;
+
+- writelong(snd->u.file.file, NEXT_SND_MAGIC);
++ write32(snd->u.file.file, NEXT_SND_MAGIC);
+ /* header size matches cmix's bsd format */
+- writelong(snd->u.file.file, length);
+- writelong(snd->u.file.file, 0); /* data size, 0 -> unspecified */
++ write32(snd->u.file.file, length);
++ write32(snd->u.file.file, 0); /* data size, 0 -> unspecified */
+ if (snd->format.bits == 8) {
+ encoding = NEXT_SND_FORMAT_LINEAR_8;
+ if (snd->format.mode == SND_MODE_ULAW)
+@@ -907,9 +918,9 @@ void write_next_start(snd_type snd, long
+ if (snd->format.mode == SND_MODE_PCM)
encoding = NEXT_SND_FORMAT_LINEAR_32;
}
- writelong(snd->u.file.file, encoding);
+- writelong(snd->u.file.file, encoding);
- writelong(snd->u.file.file, (long) (snd->format.srate + 0.5));
-+ writelong(snd->u.file.file, (int32) (snd->format.srate + 0.5));
- writelong(snd->u.file.file, snd->format.channels);
+- writelong(snd->u.file.file, snd->format.channels);
++ write32(snd->u.file.file, encoding);
++ write32(snd->u.file.file, (int32_t) (snd->format.srate + 0.5));
++ write32(snd->u.file.file, snd->format.channels);
}
-@@ -985,13 +1010,13 @@
+
+@@ -917,8 +928,8 @@ void write_next_start(snd_type snd, long
+ /**/
+ void snd_write_header(snd_type snd, long *flags)
+ {
+- long nframes = 0x7f000000;
+- long bytes_per_frame = snd_bytes_per_frame(snd);
++ int32_t nframes = 0x7f000000;
++ int32_t bytes_per_frame = snd_bytes_per_frame(snd);
+
+ /* end_offset will keep track of how much data written so far */
+ snd->u.file.end_offset = 0;
+@@ -939,23 +950,23 @@ void snd_write_header(snd_type snd, long
+ }
+ snd_file_write(snd->u.file.file, "FORM", 4); /* IFF header */
+ /* (bogus) file size: */
+- writelong(snd->u.file.file,
++ write32(snd->u.file.file,
+ hsize + nframes * bytes_per_frame);
+ snd_file_write(snd->u.file.file, "AIFF", 4); /* File type */
+
+ /* COMM chunk -- describes encoding (and #frames) */
+ snd_file_write(snd->u.file.file, "COMM", 4);
+- writelong(snd->u.file.file, 18); /* COMM chunk size */
+- writeshort(snd->u.file.file, (short) snd->format.channels); /* nchannels */
+- writelong(snd->u.file.file, nframes); /* number of frames */
+- writeshort(snd->u.file.file, (short) snd->format.bits); /* sample width, in bits */
++ write32(snd->u.file.file, 18); /* COMM chunk size */
++ write16(snd->u.file.file, (int16_t) snd->format.channels); /* nchannels */
++ write32(snd->u.file.file, nframes); /* number of frames */
++ write16(snd->u.file.file, (int16_t) snd->format.bits); /* sample width, in bits */
+ write_ieee_extended(snd->u.file.file, snd->format.srate);
+ /* SSND chunk -- describes data */
+ snd_file_write(snd->u.file.file, "SSND", 4);
+- writelong(snd->u.file.file,
++ write32(snd->u.file.file,
+ 8 + nframes * bytes_per_frame); /* chunk size */
+- writelong(snd->u.file.file, 0); /* offset */
+- writelong(snd->u.file.file, 0); /* block size */
++ write32(snd->u.file.file, 0); /* offset */
++ write32(snd->u.file.file, 0); /* block size */
+ snd->u.file.byte_offset = hsize;
+ /* printf("snd_write_header AIFF, byte_offset = %ld\n",
+ snd_lseek(snd->u.file.file, (off_t) 0, SND_SEEK_CUR)); */
+@@ -974,39 +985,39 @@ void snd_write_header(snd_type snd, long
+ break;
+ case SND_HEAD_WAVE:
+ snd_file_write(snd->u.file.file, "RIFF", 4);
+- writerevlong(snd->u.file.file, 12+18+8 + nframes * bytes_per_frame);
++ writerev32(snd->u.file.file, 12+18+8 + nframes * bytes_per_frame);
+ snd_file_write(snd->u.file.file, "WAVE", 4);
+ snd_file_write(snd->u.file.file, "fmt ", 4);
+- writerevlong(snd->u.file.file, 18L);
++ writerev32(snd->u.file.file, 18L);
+ switch (snd->format.mode) /* Format type */
+ {
+ case SND_MODE_ADPCM:
+- writerevshort(snd->u.file.file, 2);
++ writerev16(snd->u.file.file, 2);
+ break;
+ case SND_MODE_PCM:
+ case SND_MODE_UPCM:
+- writerevshort(snd->u.file.file, 1);
++ writerev16(snd->u.file.file, 1);
+ break;
+ case SND_MODE_ULAW:
+- writerevshort(snd->u.file.file, 7);
++ writerev16(snd->u.file.file, 7);
+ break;
+ case SND_MODE_ALAW:
+- writerevshort(snd->u.file.file, 6);
++ writerev16(snd->u.file.file, 6);
+ break;
+ case SND_MODE_UNKNOWN:
+ case SND_MODE_FLOAT:
+ default:
+- writerevshort(snd->u.file.file, 0);
++ writerev16(snd->u.file.file, 0);
break;
}
- writerevshort(snd->u.file.file, (short) snd->format.channels); /* Number of channels */
+- writerevshort(snd->u.file.file, (short) snd->format.channels); /* Number of channels */
- writerevlong(snd->u.file.file, (long) (snd->format.srate + 0.5)); /* Samples per second */
- writerevlong(snd->u.file.file, (((long) snd->format.srate) * bytes_per_frame)); /* Bytes per second*/
-+ writerevlong(snd->u.file.file, (int32) (snd->format.srate + 0.5)); /* Samples per second */
-+ writerevlong(snd->u.file.file, (((int32) snd->format.srate) * bytes_per_frame)); /* Bytes per second*/
- writerevshort(snd->u.file.file, (short) bytes_per_frame); /* Block alignment */
- writerevshort(snd->u.file.file, (short) snd->format.bits); /* Bits per sample */
- writerevshort(snd->u.file.file, (short) 0); /* Size of needed extra data */
+- writerevshort(snd->u.file.file, (short) bytes_per_frame); /* Block alignment */
+- writerevshort(snd->u.file.file, (short) snd->format.bits); /* Bits per sample */
+- writerevshort(snd->u.file.file, (short) 0); /* Size of needed extra data */
++ writerev16(snd->u.file.file, (int16_t) snd->format.channels); /* Number of channels */
++ writerev32(snd->u.file.file, (int32_t) (snd->format.srate + 0.5)); /* Samples per second */
++ writerev32(snd->u.file.file, (((int32_t) snd->format.srate) * bytes_per_frame)); /* Bytes per second*/
++ writerev16(snd->u.file.file, (int16_t) bytes_per_frame); /* Block alignment */
++ writerev16(snd->u.file.file, (int16_t) snd->format.bits); /* Bits per sample */
++ writerev16(snd->u.file.file, (int16_t) 0); /* Size of needed extra data */
snd_file_write(snd->u.file.file, "data", 4);
- writerevlong(snd->u.file.file, (long) (nframes * bytes_per_frame));
-+ writerevlong(snd->u.file.file, (int32) (nframes * bytes_per_frame));
++ writerev32(snd->u.file.file, (int32_t) (nframes * bytes_per_frame));
snd->u.file.byte_offset = 46;
break;
default:
-@@ -1003,7 +1028,7 @@
+@@ -1018,7 +1029,7 @@ void snd_write_header(snd_type snd, long
void write_sndheader_finish(snd_type snd)
{
- long n;
-+ int32 n;
++ int32_t n;
switch (snd->u.file.header) {
case SND_HEAD_NONE:
break;
+@@ -1039,20 +1050,20 @@ void write_sndheader_finish(snd_type snd
+ }
+ /* write filesize in the header */
+ snd_file_lseek(snd->u.file.file, 4, SND_SEEK_SET);
+- writelong(snd->u.file.file, n - 8 /* 'FORM'+size do not count */);
++ write32(snd->u.file.file, n - 8 /* 'FORM'+size do not count */);
+
+ /* write number of frames in COMM chunk */
+ snd_file_lseek(snd->u.file.file, (4 /* 'AIFF' */ + 4 /* 'COMM' */ +
+ 4 /* size */ + 2 /* channels */),
+ SND_SEEK_CUR);
+- writelong(snd->u.file.file,
++ write32(snd->u.file.file,
+ (n - (hsize + 8)) / snd_bytes_per_frame(snd));
+
+ /* write size in SSND chunk */
+ snd_file_lseek(snd->u.file.file, (2 /* snd->format.bits */ +
+ 10 /* sr */ + 4 /* 'SSND' */),
+ SND_SEEK_CUR);
+- writelong(snd->u.file.file, 8 + datasize); /* chunk size */
++ write32(snd->u.file.file, 8 + datasize); /* chunk size */
+ break; }
+ case SND_HEAD_IRCAM:
+ break;
+@@ -1063,9 +1074,9 @@ void write_sndheader_finish(snd_type snd
+ n = snd_file_lseek(snd->u.file.file, 0, SND_SEEK_CUR);
+ /* back to the top */
+ snd_file_lseek(snd->u.file.file, 4, SND_SEEK_SET);
+- writerevlong(snd->u.file.file, n - 8); /* file size - ['RIFF', len] */
++ writerev32(snd->u.file.file, n - 8); /* file size - ['RIFF', len] */
+ snd_file_lseek(snd->u.file.file, 42, SND_SEEK_SET);
+- writerevlong(snd->u.file.file, n - 46); /* data size */
++ writerev32(snd->u.file.file, n - 46); /* data size */
+ break;
+ default:
+ break;
+@@ -1076,7 +1087,7 @@ void write_sndheader_finish(snd_type snd
+ double read_ieee_extended(snd_type snd)
+ {
+ unsigned char buf[10];
+- if (snd_file_read(snd->u.file.file, (char *)buf, (long)10) != 10)
++ if (snd_file_read(snd->u.file.file, (char *)buf, (int32_t)10) != 10)
+ fail(snd, "EOF while reading IEEE extended number");
+ return ConvertFromIeeeExtended(buf);
+ }
+@@ -1099,7 +1110,7 @@ void write_ieee_extended(int file, doubl
+
+ char *mode_string[] = { "ADPCM", "PCM", "ULAW", "ALAW", "Float", "UPCM", "Unknown" };
+
+-char *mode_to_string(long mode)
++char *mode_to_string(int32_t mode)
+ {
+ if (mode < 0 || mode >= SND_NUM_MODES) return "InvalidData";
+ else return mode_string[mode];
diff --git a/audio/audacity/patches/patch-ar b/audio/audacity/patches/patch-ar
new file mode 100644
index 00000000000..cedead838ae
--- /dev/null
+++ b/audio/audacity/patches/patch-ar
@@ -0,0 +1,84 @@
+$NetBSD: patch-ar,v 1.1 2002/10/04 08:59:38 jlam Exp $
+
+--- configure.in.orig Wed Jun 5 00:51:19 2002
++++ configure.in
+@@ -34,6 +34,16 @@ AC_ARG_WITH(oss,
+ [use Open Sound System (OSS) for Audio I/O [default=yes]])],
+ use_oss=$withval,
+ use_oss="default")
++AC_ARG_WITH(dev-dsp,
++ [AC_HELP_STRING([--with-dev-dsp],
++ [the path to the audio device [default="/dev/dsp"]])],
++ DEV_DSP=$withval,
++ DEV_DSP="/dev/dsp")
++AC_ARG_WITH(helpdir,
++ [AC_HELP_STRING([--with-helpdir],
++ [the path to the audacity help file [default=empty]])],
++ HELPDIR=$withval,
++ HELPDIR="$prefix/share/doc/audacity")
+ AC_ARG_WITH(arts-soundserver,
+ [AC_HELP_STRING([--with-arts-soundserver],
+ [use the KDE/aRts soundserver instead of OSS [default=no]])],
+@@ -65,6 +75,9 @@ AC_ARG_WITH(help,
+ use_help=$withval,
+ use_help="yes")
+
++AC_SUBST(DEV_DSP)
++AC_SUBST(HELPDIR)
++
+ dnl check to make sure that all the user's options are valid
+ AC_CANONICAL_HOST
+ host_cpu=`echo "$host_cpu" | sed "s/i.86/i386/"`
+@@ -161,12 +174,26 @@ if [[ $use_vorbis = "yes" ]] ; then
+ fi
+
+ if [[ $use_id3lib = "yes" ]] ; then
++
++ dnl check for both headers and libraries
++
++ AC_CHECK_LIB(z, compress)
++ AC_CHECK_LIB(id3-3.8, main, id3lib_found="-lid3-3.8",
++ AC_CHECK_LIB(id3, main, id3lib_found="-lid3",
++ id3lib_found=no))
++
++ AC_CHECK_HEADER(id3.h, id3inc_found=yes, id3inc_found=no)
++
++ if [[ $id3lib_found = "no" ]] || [[ $id3inc_found = "no" ]] ; then
+ EXTRAOBJS="$EXTRAOBJS id3lib/src/.libs/libid3.a"
+ MAKEALL="$MAKEALL id3lib/src/.libs/libid3.a"
+ CFLAGS="$CFLAGS -Iid3lib/include"
++ elif [[ $id3lib_found != "no" ]] ; then
++ LIBS="$LIBS $id3lib_found"
++ fi
+
+ AC_DEFINE(USE_ID3LIB, 1,
+- [Define if id3lib is present])
++ [Define if id3lib is present])
+ fi
+
+ if [[ $use_help = "yes" ]] ; then
+@@ -174,6 +201,24 @@ if [[ $use_help = "yes" ]] ; then
+ fi
+
+ if [[ $use_oss = "yes" ]] ; then
++ AC_CHECK_HEADER(sys/soundcard.h, [
++ CFLAGS="$CFLAGS -DHAVE_SYS_SOUNDCARD_H=1"
++ AC_EGREP_CPP(yes, [
++#include <sys/soundcard.h>
++#if defined(OPEN_SOUND_SYSTEM) || defined(UNIX_SOUND_SYSTEM)
++yes
++#endif
++ ],, [
++ AC_CHECK_FUNC(_oss_ioctl,,
++ [AC_CHECK_LIB(ossaudio,_oss_ioctl)])
++ ])
++ ], [
++ AC_CHECK_HEADER(soundcard.h, [
++ CFLAGS="$CFLAGS -DHAVE_SOUNDCARD_H=1"
++ AC_CHECK_FUNC(_oss_ioctl,,
++ [AC_CHECK_LIB(ossaudio,_oss_ioctl)])])
++ ])
++
+ EXTRAOBJS="$EXTRAOBJS \$(OBJDIR)/snd/audiooss.c.o"
+
+ AC_DEFINE(USE_OSS, 1,
diff --git a/audio/audacity/patches/patch-as b/audio/audacity/patches/patch-as
new file mode 100644
index 00000000000..9f9d10bef80
--- /dev/null
+++ b/audio/audacity/patches/patch-as
@@ -0,0 +1,25 @@
+$NetBSD: patch-as,v 1.1 2002/10/04 08:59:38 jlam Exp $
+
+--- DiskFunctions.cpp.orig Wed Jun 5 00:51:19 2002
++++ DiskFunctions.cpp
+@@ -18,6 +18,11 @@
+ #include <sys/vfs.h>
+ #endif
+
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++#include <sys/param.h>
++#include <sys/mount.h>
++#endif
++
+ #include <iostream.h>
+ #include <stdio.h> //the std I/O stuff
+ #include <wx/longlong.h>
+@@ -167,7 +172,7 @@ wxLongLong GetFreeDiskSpace(const char *
+ return freeBytes;
+ }
+ #elif defined(__WXGTK__)
+-#ifdef linux
++#if defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)
+ wxLongLong GetFreeDiskSpace(const char *path)
+ {
+ struct statfs theStats;
diff --git a/audio/audacity/patches/patch-at b/audio/audacity/patches/patch-at
new file mode 100644
index 00000000000..66cf8db4143
--- /dev/null
+++ b/audio/audacity/patches/patch-at
@@ -0,0 +1,13 @@
+$NetBSD: patch-at,v 1.1 2002/10/04 08:59:38 jlam Exp $
+
+--- id3lib/include/id3/Makefile.in.orig Fri Oct 4 00:57:56 2002
++++ id3lib/include/id3/Makefile.in
+@@ -108,7 +108,7 @@ the_headers = field.h
+ id3includedir = $(includedir)/id3
+ id3include_HEADERS = $(the_headers)
+
+-noinst_HEADERS = helpers.h io_decorators.h io_helpers.h io_strings.h strings.h
++noinst_HEADERS = helpers.h io_decorators.h io_helpers.h io_strings.h id3_strings.h
+
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ CONFIG_HEADER = ../../config.h
diff --git a/audio/audacity/patches/patch-au b/audio/audacity/patches/patch-au
new file mode 100644
index 00000000000..5b9e696ae6e
--- /dev/null
+++ b/audio/audacity/patches/patch-au
@@ -0,0 +1,13 @@
+$NetBSD: patch-au,v 1.1 2002/10/04 08:59:39 jlam Exp $
+
+--- id3lib/include/id3/reader.h.orig Wed Jun 5 00:51:19 2002
++++ id3lib/include/id3/reader.h
+@@ -33,7 +33,7 @@
+ class ID3_CPP_EXPORT ID3_Reader
+ {
+ public:
+- typedef uint32 size_type;
++ typedef size_t size_type;
+ typedef uint8 char_type;
+ typedef uint32 pos_type;
+ typedef int32 off_type;
diff --git a/audio/audacity/patches/patch-av b/audio/audacity/patches/patch-av
new file mode 100644
index 00000000000..4a77f5e5286
--- /dev/null
+++ b/audio/audacity/patches/patch-av
@@ -0,0 +1,13 @@
+$NetBSD: patch-av,v 1.1 2002/10/04 08:59:39 jlam Exp $
+
+--- id3lib/include/id3/writer.h.orig Wed Jun 5 00:51:19 2002
++++ id3lib/include/id3/writer.h
+@@ -33,7 +33,7 @@
+ class ID3_CPP_EXPORT ID3_Writer
+ {
+ public:
+- typedef uint32 size_type;
++ typedef size_t size_type;
+ typedef uint8 char_type;
+ typedef uint32 pos_type;
+ typedef int32 off_type;