From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: Re: [PATCH] gnu: Add audacity. Date: Tue, 03 Mar 2015 14:10:49 +0100 Message-ID: <871tl6fcpy.fsf@taylan.uni.cx> References: <87mw46kdkq.fsf@taylan.uni.cx> <87sidrpcm3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSmbH-0000I7-8b for guix-devel@gnu.org; Tue, 03 Mar 2015 08:11:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSmb9-0002Re-6Y for guix-devel@gnu.org; Tue, 03 Mar 2015 08:11:03 -0500 In-Reply-To: <87sidrpcm3.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 27 Feb 2015 17:01:40 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: >> - It tries to find libid3tag and libmad via pkg-config even though they >> don't install .pc files. Perhaps we can generate them manually in the >> install phase of those packages, or maybe they just don't get >> installed due to a bug. Perhaps they just need 'pkg-config' as an >> input? I might try that next. > > That would be surprising. Perhaps the Audacity developers were using a > distro that adds .pc files for these two libs? Apparently Debian indeed adds .pc files. I added patches to them to do the same. >> - Audacity apparently uses PortAudio version 19, but the in-tree one has >> a function which the upstream one doesn't. It would be strange if >> they had an API change without changing the version, so no idea what's >> going on there. > > Could you try to find out what the story of this function is? It would > be best to avoid using the bundled PortAudio. Apparently it's from a patch that has been waiting forever to be merged into PortAudio and it's questionable whether it ever will. I applied it to our PortAudio package. >> - Dynamic loading of FFmpeg fails and I couldn't figure out why (it >> didn't print any errors when I ran Audacity and normally it's pretty >> verbose) so I just passed --disable-dynamic-loading and it was fine. > > OK. By the way this came out to be a known problem among Audacity folks. >> - The test suite fails due to some missing portaudio.h file. I didn't >> come far trying to figure out why this happens so I just disabled the >> test suite. > > Perhaps that problem would magically vanish when using system=E2=80=99s > PortAudio because headers would be in $CPATH. Indeed. Sadly the test suite seems to have other issues, and I've been told it isn't "well exercised" so I disabled it for now. (FWIW it also fails in the upcoming Audacity 2.1.0 which is now entering RC2 phase and will be released soon.) > The rest of the patch looks good to me; just the PortAudio issue needs > to be resolved. Updated patches below. Note also it's in audacity.scm now and not audio.scm, because it depends on ffmpeg, which is in video.scm, which now imports audio.scm, so audio.scm cannot import video.scm. We might want to just wait for 2.1.0 to be released by the way, since it should be out in a couple days. The FFmpeg dynamic loading and test suite issues aren't resolved, so the only difference will be the version; feel free to review this patch as if it were for 2.1.0. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-mp3-Add-.pc-files-to-libmad-and-libid3tag.patch Content-Description: patch1 >From 3853b807f69fbd4b0cfe8116cc0d934c941df6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sun, 1 Mar 2015 21:52:23 +0100 Subject: [PATCH 1/3] gnu: mp3: Add .pc files to libmad and libid3tag. * gnu/packages/mp3.scm (libmad, libid3tag): Add .pc files to installations. * gnu/packages/patches/libid3tag-add-pc-file.patch: New file. * gnu/packages/patches/libmad-add-pc-file.patch: New file. * gnu-system.am (dist_patch_DATA): Add them. --- gnu-system.am | 2 ++ gnu/packages/mp3.scm | 25 +++++++++++++++++++++--- gnu/packages/patches/libid3tag-add-pc-file.patch | 16 +++++++++++++++ gnu/packages/patches/libmad-add-pc-file.patch | 16 +++++++++++++++ 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/libid3tag-add-pc-file.patch create mode 100644 gnu/packages/patches/libmad-add-pc-file.patch diff --git a/gnu-system.am b/gnu-system.am index da19b9b..7e9d06a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -450,6 +450,8 @@ dist_patch_DATA = \ gnu/packages/patches/libcanberra-sound-theme-freedesktop.patch \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/liboop-mips64-deplibs-fix.patch \ + gnu/packages/patches/libid3tag-add-pc-file.patch \ + gnu/packages/patches/libmad-add-pc-file.patch \ gnu/packages/patches/libmad-mips-newgcc.patch \ gnu/packages/patches/librep-rules.mk.patch \ gnu/packages/patches/libtheora-config-guess.patch \ diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index 55ab4b4..229edc5 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -50,7 +50,8 @@ (sha256 (base32 "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv")) - (patches (list (search-patch "libmad-mips-newgcc.patch"))))) + (patches (list (search-patch "libmad-mips-newgcc.patch") + (search-patch "libmad-add-pc-file.patch"))))) (build-system gnu-build-system) (arguments `(#:phases @@ -59,7 +60,14 @@ (lambda _ ;; remove option that is not supported by gcc any more (substitute* "configure" ((" -fforce-mem") ""))) - %standard-phases))) + (alist-cons-after + 'install 'install-pc-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pc-dir (string-append out "/lib/pkgconfig"))) + (mkdir-p pc-dir) + (copy-file "mad.pc" (string-append pc-dir "/mad.pc")))) + %standard-phases)))) (synopsis "MPEG audio decoder") (description "MAD (MPEG Audio Decoder) supports MPEG-1 and the MPEG-2 extension to @@ -82,9 +90,20 @@ This package contains the library.") version ".tar.gz")) (sha256 (base32 - "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3")))) + "0lb1w883dc46dajbdvnia5870brl5lvnlk7g7y58y9wpg5p4znk3")) + (patches (list (search-patch "libid3tag-add-pc-file.patch"))))) (build-system gnu-build-system) (inputs `(("zlib" ,zlib))) + (arguments + '(#:phases + (alist-cons-after + 'install 'install-pc-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (pc-dir (string-append out "/lib/pkgconfig"))) + (mkdir-p pc-dir) + (copy-file "id3tag.pc" (string-append pc-dir "/id3tag.pc")))) + %standard-phases))) (synopsis "Library for reading ID3 tags") (description "Libid3tag is a library for reading ID3 tags, both ID3v1 and the various diff --git a/gnu/packages/patches/libid3tag-add-pc-file.patch b/gnu/packages/patches/libid3tag-add-pc-file.patch new file mode 100644 index 0000000..4d23ba1 --- /dev/null +++ b/gnu/packages/patches/libid3tag-add-pc-file.patch @@ -0,0 +1,16 @@ +Notably, Audacity's ./configure script locates this library via pkg-config(1). + +--- a/id3tag.pc ++++ b/id3tag.pc +@@ -0,0 +1,11 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: id3tag ++Description: ID3 tag reading library ++Requires: ++Version: 0.15.0b ++Libs: -L${libdir} -lid3tag -lz ++Cflags: -I${includedir} diff --git a/gnu/packages/patches/libmad-add-pc-file.patch b/gnu/packages/patches/libmad-add-pc-file.patch new file mode 100644 index 0000000..8a824f8 --- /dev/null +++ b/gnu/packages/patches/libmad-add-pc-file.patch @@ -0,0 +1,16 @@ +Notably, Audacity's ./configure script locates this library via pkg-config(1). + +--- a/mad.pc ++++ b/mad.pc +@@ -0,0 +1,11 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: mad ++Description: MPEG Audio Decoder ++Requires: ++Version: 0.15.0b ++Libs: -L${libdir} -lmad ++Cflags: -I${includedir} -- 2.2.1 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-gnu-portaudio-Patch-for-Audacity-compatibility.patch Content-Transfer-Encoding: 8bit Content-Description: patch2 >From fe095e3aebcaaa9e88587610832db3f65f7ec015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Mon, 2 Mar 2015 01:06:35 +0100 Subject: [PATCH 2/3] gnu: portaudio: Patch for Audacity compatibility. * gnu/packages/audio.scm (portaudio): Add a patch for Audacity compatibility. * gnu/packages/patches/portaudio-audacity-compat.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/audio.scm | 19 +- .../patches/portaudio-audacity-compat.patch | 322 +++++++++++++++++++++ 3 files changed, 339 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/portaudio-audacity-compat.patch diff --git a/gnu-system.am b/gnu-system.am index 7e9d06a..6008897 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -495,6 +495,7 @@ dist_patch_DATA = \ gnu/packages/patches/pingus-sdl-libs-config.patch \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ gnu/packages/patches/polkit-drop-test.patch \ + gnu/packages/patches/portaudio-audacity-compat.patch \ gnu/packages/patches/procps-make-3.82.patch \ gnu/packages/patches/pulseaudio-CVE-2014-3970.patch \ gnu/packages/patches/pulseaudio-fix-mult-test.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 5a23618..bda173e 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -1005,15 +1005,28 @@ portions of LAME.") (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version) ".tgz")) (sha256 - (base32 "0mwddk4qzybaf85wqfhxqlf0c5im9il8z03rd4n127k8y2jj9q4g")))) + (base32 "0mwddk4qzybaf85wqfhxqlf0c5im9il8z03rd4n127k8y2jj9q4g")) + (patches (list (search-patch "portaudio-audacity-compat.patch"))))) (build-system gnu-build-system) (inputs ;; TODO: Add ASIHPI. `(("alsa-lib" ,alsa-lib) ("jack" ,jack-2))) (native-inputs - `(("pkg-config" ,pkg-config))) - (arguments '(#:tests? #f)) ;no 'check' target + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (arguments + '(#:phases + ;; Autoreconf is necessary because the audacity-compat patch modifies + ;; .in files. + (alist-cons-after + 'unpack 'autoreconf + (lambda _ + (zero? (system* "autoreconf" "-vif"))) + %standard-phases) + #:tests? #f)) ;no 'check' target (home-page "http://www.portaudio.com/") (synopsis "Audio I/O library") (description diff --git a/gnu/packages/patches/portaudio-audacity-compat.patch b/gnu/packages/patches/portaudio-audacity-compat.patch new file mode 100644 index 0000000..d864b44 --- /dev/null +++ b/gnu/packages/patches/portaudio-audacity-compat.patch @@ -0,0 +1,322 @@ +Description: Add features needed to make portmixer work with audacity. +Author: Audacity Team +Last-Update: 2011-12-07 + +--- a/include/pa_win_ds.h ++++ b/include/pa_win_ds.h +@@ -89,6 +89,21 @@ + + }PaWinDirectSoundStreamInfo; + ++/** Retrieve the GUID of the input device. ++ ++ @param stream The stream to query. ++ ++ @return A pointer to the GUID, or NULL if none. ++*/ ++LPGUID PaWinDS_GetStreamInputGUID( PaStream* s ); ++ ++/** Retrieve the GUID of the output device. ++ ++ @param stream The stream to query. ++ ++ @return A pointer to the GUID, or NULL if none. ++*/ ++LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s ); + + + #ifdef __cplusplus +--- a/include/portaudio.h ++++ b/include/portaudio.h +@@ -1146,6 +1146,15 @@ + signed long Pa_GetStreamWriteAvailable( PaStream* stream ); + + ++/** Retrieve the host type handling an open stream. ++ ++ @return Returns a non-negative value representing the host API type ++ handling an open stream or, a PaErrorCode (which are always negative) ++ if PortAudio is not initialized or an error is encountered. ++*/ ++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ); ++ ++ + /* Miscellaneous utilities */ + + +--- /dev/null ++++ b/include/pa_unix_oss.h +@@ -0,0 +1,104 @@ ++#ifndef PA_UNIX_OSS_H ++#define PA_UNIX_OSS_H ++ ++/* ++ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $ ++ * PortAudio Portable Real-Time Audio Library ++ * OSS-specific extensions ++ * ++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files ++ * (the "Software"), to deal in the Software without restriction, ++ * including without limitation the rights to use, copy, modify, merge, ++ * publish, distribute, sublicense, and/or sell copies of the Software, ++ * and to permit persons to whom the Software is furnished to do so, ++ * subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * Any person wishing to distribute modifications to the Software is ++ * requested to send the modifications to the original developer so that ++ * they can be incorporated into the canonical version. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF ++ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++/** @file ++ * OSS-specific PortAudio API extension header file. ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++const char *PaOSS_GetStreamInputDevice( PaStream *s ); ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream *s ); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif ++#ifndef PA_UNIX_OSS_H ++#define PA_UNIX_OSS_H ++ ++/* ++ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $ ++ * PortAudio Portable Real-Time Audio Library ++ * OSS-specific extensions ++ * ++ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files ++ * (the "Software"), to deal in the Software without restriction, ++ * including without limitation the rights to use, copy, modify, merge, ++ * publish, distribute, sublicense, and/or sell copies of the Software, ++ * and to permit persons to whom the Software is furnished to do so, ++ * subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * Any person wishing to distribute modifications to the Software is ++ * requested to send the modifications to the original developer so that ++ * they can be incorporated into the canonical version. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ++ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF ++ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION ++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ * ++ */ ++ ++/** @file ++ * OSS-specific PortAudio API extension header file. ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++const char *PaOSS_GetStreamInputDevice( PaStream *s ); ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream *s ); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +--- a/src/common/pa_front.c ++++ b/src/common/pa_front.c +@@ -1216,8 +1216,10 @@ + hostApiInputParametersPtr, hostApiOutputParametersPtr, + sampleRate, framesPerBuffer, streamFlags, streamCallback, userData ); + +- if( result == paNoError ) ++ if( result == paNoError ) { + AddOpenStream( *stream ); ++ PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type; ++ } + + + PA_LOGAPI(("Pa_OpenStream returned:\n" )); +@@ -1729,6 +1731,32 @@ + return result; + } + ++PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream ) ++{ ++ PaError error = PaUtil_ValidateStreamPointer( stream ); ++ PaHostApiTypeId result; ++ ++#ifdef PA_LOG_API_CALLS ++ PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" ); ++ PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream ); ++#endif ++ ++ if( error == paNoError ) ++ { ++ result = PA_STREAM_REP(stream)->hostApiType; ++ } ++ else ++ { ++ result = (PaHostApiTypeId) error; ++ } ++ ++#ifdef PA_LOG_API_CALLS ++ PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" ); ++ PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) ); ++#endif ++ ++ return result; ++} + + PaError Pa_GetSampleSize( PaSampleFormat format ) + { +--- a/src/common/pa_stream.c ++++ b/src/common/pa_stream.c +@@ -93,6 +93,8 @@ + streamRepresentation->streamInfo.inputLatency = 0.; + streamRepresentation->streamInfo.outputLatency = 0.; + streamRepresentation->streamInfo.sampleRate = 0.; ++ ++ streamRepresentation->hostApiType = 0; + } + + +--- a/src/common/pa_stream.h ++++ b/src/common/pa_stream.h +@@ -152,6 +152,7 @@ + PaStreamFinishedCallback *streamFinishedCallback; + void *userData; + PaStreamInfo streamInfo; ++ PaHostApiTypeId hostApiType; + } PaUtilStreamRepresentation; + + +--- a/src/hostapi/coreaudio/pa_mac_core_blocking.c ++++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c +@@ -66,6 +66,9 @@ + #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS + # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) ) + # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) ) ++#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3 ++# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b ) ++# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b ) + #else + # include + #endif +--- a/src/hostapi/alsa/pa_linux_alsa.c ++++ b/src/hostapi/alsa/pa_linux_alsa.c +@@ -611,6 +611,7 @@ + StreamDirection streamDir; + + snd_pcm_channel_area_t *channelAreas; /* Needed for channel adaption */ ++ int card; + } PaAlsaStreamComponent; + + /* Implementation specific stream structure */ +@@ -1806,6 +1807,7 @@ + { + PaError result = paNoError; + PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError; ++ snd_pcm_info_t* pcmInfo; + assert( params->channelCount > 0 ); + + /* Make sure things have an initial value */ +@@ -1826,6 +1828,9 @@ + self->device = params->device; + + PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) ); ++ ++ snd_pcm_info_alloca( &pcmInfo ); ++ self->card = snd_pcm_info_get_card( pcmInfo ); + self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm ); + + PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) ); +@@ -4519,9 +4524,7 @@ + /* XXX: More descriptive error? */ + PA_UNLESS( stream->capture.pcm, paDeviceUnavailable ); + +- alsa_snd_pcm_info_alloca( &pcmInfo ); +- PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) ); +- *card = alsa_snd_pcm_info_get_card( pcmInfo ); ++ *card = stream->capture.card; + + error: + return result; +@@ -4537,9 +4540,7 @@ + /* XXX: More descriptive error? */ + PA_UNLESS( stream->playback.pcm, paDeviceUnavailable ); + +- alsa_snd_pcm_info_alloca( &pcmInfo ); +- PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) ); +- *card = alsa_snd_pcm_info_get_card( pcmInfo ); ++ *card = stream->playback.card; + + error: + return result; +--- a/src/hostapi/oss/pa_unix_oss.c ++++ b/src/hostapi/oss/pa_unix_oss.c +@@ -2028,3 +2028,26 @@ + #endif + } + ++const char *PaOSS_GetStreamInputDevice( PaStream* s ) ++{ ++ PaOssStream *stream = (PaOssStream*)s; ++ ++ if( stream->capture ) ++ { ++ return stream->capture->devName; ++ } ++ ++ return NULL; ++} ++ ++const char *PaOSS_GetStreamOutputDevice( PaStream* s ) ++{ ++ PaOssStream *stream = (PaOssStream*)s; ++ ++ if( stream->playback ) ++ { ++ return stream->playback->devName; ++ } ++ ++ return NULL; ++} +--- a/configure.in ++++ b/configure.in +@@ -365,6 +365,7 @@ + DLL_LIBS="$DLL_LIBS -lossaudio" + LIBS="$LIBS -lossaudio" + fi ++ INCLUDES="$INCLUDES pa_unix_oss.h" + AC_DEFINE(PA_USE_OSS,1) + fi + -- 2.2.1 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0003-gnu-Add-audacity.patch Content-Transfer-Encoding: quoted-printable Content-Description: patch3 >From b14e4eb8e276a2dd98c189c1edd18b7cc57dcb52 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Taylan=3D20Ulrich=3D20Bay=3DC4=3DB1rl=3DC4=3DB1/Kammer?=3D Date: Fri, 20 Feb 2015 21:52:21 +0100 Subject: [PATCH 3/3] gnu: Add audacity. * gnu/packages/audacity.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu/packages/patches/audacity-fix-ffmpeg-binding.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 2 + gnu/packages/audacity.scm | 92 ++++++++++++++++++= ++++ .../patches/audacity-fix-ffmpeg-binding.patch | 32 ++++++++ 3 files changed, 126 insertions(+) create mode 100644 gnu/packages/audacity.scm create mode 100644 gnu/packages/patches/audacity-fix-ffmpeg-binding.patch diff --git a/gnu-system.am b/gnu-system.am index 6008897..19e620c 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -38,6 +38,7 @@ GNU_SYSTEM_MODULES =3D \ gnu/packages/asciidoc.scm \ gnu/packages/aspell.scm \ gnu/packages/attr.scm \ + gnu/packages/audacity.scm \ gnu/packages/audio.scm \ gnu/packages/autogen.scm \ gnu/packages/autotools.scm \ @@ -357,6 +358,7 @@ dist_patch_DATA =3D \ gnu/packages/patches/ath9k-htc-firmware-binutils.patch \ gnu/packages/patches/ath9k-htc-firmware-gcc.patch \ gnu/packages/patches/ath9k-htc-firmware-objcopy.patch \ + gnu/packages/patches/audacity-fix-ffmpeg-binding.patch \ gnu/packages/patches/automake-skip-amhello-tests.patch \ gnu/packages/patches/avahi-localstatedir.patch \ gnu/packages/patches/avrdude-fix-libusb.patch \ diff --git a/gnu/packages/audacity.scm b/gnu/packages/audacity.scm new file mode 100644 index 0000000..ef62eb9 --- /dev/null +++ b/gnu/packages/audacity.scm @@ -0,0 +1,92 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2015 Taylan Ulrich Bay=C4=B1rl=C4=B1/Kammer +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages audacity) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages audio) + #:use-module (gnu packages gtk) + #:use-module (gnu packages linux) + #:use-module (gnu packages mp3) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages python) + #:use-module (gnu packages xiph) + #:use-module (gnu packages xml) + #:use-module (gnu packages video) + #:use-module (gnu packages which) + #:use-module (gnu packages wxwidgets)) + +(define-public audacity + (package + (name "audacity") + (version "2.0.6") + (source + (origin + (method url-fetch) + (uri + (string-append + "mirror://sourceforge/audacity/audacity-minsrc-" version ".tar.xz= ")) + (sha256 + (base32 "0yvxlfgjwdn7rvjrkr2wdg6xlwn5j3lwcdhsjs1ddq3qws8c301h")) + (patches (list (search-patch "audacity-fix-ffmpeg-binding.patch")))= )) + (build-system gnu-build-system) + (inputs + ;; TODO: Add portSMF and libwidgetextra once they're packaged. In-tr= ee + ;; versions shipping with Audacity are used for now. + `(("wxwidgets" ,wxwidgets-2) + ("gtk" ,gtk+-2) + ("alsa-lib" ,alsa-lib) + ("jack" ,jack-2) + ("expat" ,expat) + ("ffmpeg" ,ffmpeg) + ("lame" ,lame) + ("flac" ,flac) + ("libid3tag" ,libid3tag) + ("libmad" ,libmad) + ("libsbsms" ,libsbsms) + ("libsndfile" ,libsndfile) + ("soundtouch" ,soundtouch) + ("soxr" ,soxr) ;replaces libsamplerate + ("twolame" ,twolame) + ("vamp" ,vamp) + ("libvorbis" ,libvorbis) + ("lv2" ,lv2) + ("lilv" ,lilv) + ("portaudio" ,portaudio))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python-2) + ("which" ,which))) + (arguments + ;; Loading FFmpeg dynamically is problematic. + '(#:configure-flags '("--disable-dynamic-loading") + ;; The test suite is not "well exercised" according to the develope= rs, + ;; and fails with various errors. See + ;; . + #:tests? #f)) + (home-page "http://audacity.sourceforge.net/") + (synopsis "Software for recording and editing sounds") + (description + "Audacity is a multi-track audio editor designed for recording, playi= ng +and editing digital audio. It features digital effects and spectrum analy= sis +tools.") + (license license:gpl2+))) diff --git a/gnu/packages/patches/audacity-fix-ffmpeg-binding.patch b/gnu/p= ackages/patches/audacity-fix-ffmpeg-binding.patch new file mode 100644 index 0000000..d6d6533 --- /dev/null +++ b/gnu/packages/patches/audacity-fix-ffmpeg-binding.patch @@ -0,0 +1,32 @@ +This resolves some "declaration of C function conflicts with previous +declaration" errors during compilation. + +--- a/src/FFmpeg.h 2015-02-21 00:33:33.853857529 +0100 ++++ b/src/FFmpeg.h 2015-02-21 00:35:09.626497205 +0100 +@@ -688,7 +688,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + AVOutputFormat*, + av_oformat_next, +- (AVOutputFormat *f), ++ (const AVOutputFormat *f), + (f) + ); + FFMPEG_FUNCTION_WITH_RETURN( +@@ -755,7 +755,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + int, + av_fifo_size, +- (AVFifoBuffer *f), ++ (const AVFifoBuffer *f), + (f) + ); + FFMPEG_FUNCTION_WITH_RETURN( +@@ -801,7 +801,7 @@ + FFMPEG_FUNCTION_WITH_RETURN( + AVDictionaryEntry *, + av_dict_get, +- (AVDictionary *m, const char *key, const AVDictionaryEntry *prev, i= nt flags), ++ (const AVDictionary *m, const char *key, const AVDictionaryEntry *p= rev, int flags), + (m, key, prev, flags) + ); + FFMPEG_FUNCTION_WITH_RETURN( --=20 2.2.1 --=-=-=--