aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-11-18 14:49:29 +0100
committerRicardo Wurmus <rekado@elephly.net>2017-11-18 16:07:57 +0100
commit3182a1d2f1f63bcc0840bf0c98e54a7037281163 (patch)
treee96e84bd2ce7d5cbf7290a83b57753032c38a9d9 /gnu/packages/patches
parent218d1ddef8f50ef07c20b2e992c06ebe44fc9331 (diff)
downloadguix-3182a1d2f1f63bcc0840bf0c98e54a7037281163.tar
guix-3182a1d2f1f63bcc0840bf0c98e54a7037281163.tar.gz
gnu: audacity: Update to 2.2.0.
* gnu/packages/patches/audacity-build-with-system-portaudio.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/audio.scm (audacity): Update to 2.2.0. [source]: Add patch to build with system portaudio; add snippet to remove most bundled libraries. [inputs]: Replace "gtk+-2" with "gtk+", replace "wxwidgets-gtk2" with "wxwidgets"; remove "libsbsms"; add "suil" and "portmidi". [arguments]: Adjust configure flags to avoid using bundled libraries; remove phase "autoreconf"; add phases "fix-sbsms-check" and "use-upstream-headers".
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/audacity-build-with-system-portaudio.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/gnu/packages/patches/audacity-build-with-system-portaudio.patch b/gnu/packages/patches/audacity-build-with-system-portaudio.patch
new file mode 100644
index 0000000000..3b73a6c930
--- /dev/null
+++ b/gnu/packages/patches/audacity-build-with-system-portaudio.patch
@@ -0,0 +1,64 @@
+Downloaded from here:
+https://sourceforge.net/p/audacity/mailman/message/36106562/
+
+>From 5f9482a191359f2c477763a36d2c865c5f186602 Mon Sep 17 00:00:00 2001
+From: Antonio Ospite <ao2@ao2.it>
+Date: Tue, 7 Nov 2017 13:06:33 +0100
+Subject: [PATCH] Fix building against the system portaudio library
+
+Building against the system portaudio results in this error:
+
+./src/AudioIO.cpp:983: undefined reference to `PaUtil_GetTime'
+audacity-AudioIO.o: In function `audacityAudioCallback(void const*, void*,
+unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*)':
+./src/AudioIO.cpp:4630: undefined reference to `PaUtil_GetTime'
+collect2: error: ld returned 1 exit status
+Makefile:2349: recipe for target 'audacity' failed
+make[3]: *** [audacity] Error 1
+
+This is because PaUtil_GetTime is declared as a C symbol in pa_util.h
+but is resolved as a C++ symbol at link time.
+
+Audacity fixes this in the local tree with this change:
+https://github.com/audacity/audacity/commit/38fd97b8e26060332ab3e9e000a8882326a70ba7
+
+However this is not general enough for the portaudio debian package.
+
+Since PaUtil_GetTime() is the only function causing problems, just copy
+over the code where it's used.
+---
+ src/AudioIO.cpp | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp
+index a78bd1cab..d5481838d 100644
+--- a/src/AudioIO.cpp
++++ b/src/AudioIO.cpp
+@@ -452,8 +452,23 @@ writing audio.
+ #define ROUND(x) (int) ((x)+0.5)
+ //#include <string.h>
+ #include "../lib-src/portmidi/pm_common/portmidi.h"
+- #include "../lib-src/portaudio-v19/src/common/pa_util.h"
+ #include "NoteTrack.h"
++
++PaTime PaUtil_GetTime( void )
++{
++#ifdef HAVE_MACH_ABSOLUTE_TIME
++ return mach_absolute_time() * machSecondsConversionScaler_;
++#elif defined(HAVE_CLOCK_GETTIME)
++ struct timespec tp;
++ clock_gettime(CLOCK_REALTIME, &tp);
++ return (PaTime)(tp.tv_sec + tp.tv_nsec * 1e-9);
++#else
++ struct timeval tv;
++ gettimeofday( &tv, NULL );
++ return (PaTime) tv.tv_usec * 1e-6 + tv.tv_sec;
++#endif
++}
++
+ #endif
+
+ #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
+--
+2.15.0
+