diff options
Diffstat (limited to 'media-sound/audacity/files')
-rw-r--r-- | media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch | 71 | ||||
-rw-r--r-- | media-sound/audacity/files/audacity-2.3.2-fix_building_against_system_portaudio.patch | 56 |
2 files changed, 127 insertions, 0 deletions
diff --git a/media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch b/media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch new file mode 100644 index 000000000000..d4ec1a7320f6 --- /dev/null +++ b/media-sound/audacity/files/audacity-2.3.2-Fix-building-without-midi.patch @@ -0,0 +1,71 @@ +diff -urpN a/src/Track.h b/src/Track.h +--- a/src/Track.h 2019-05-04 13:38:57.000000000 +0300 ++++ b/src/Track.h 2019-08-27 19:32:36.937551831 +0300 +@@ -53,10 +53,6 @@ using WaveTrackConstArray = std::vector + + using NoteTrackConstArray = std::vector < std::shared_ptr< const NoteTrack > >; + +-#if defined(USE_MIDI) +-class NoteTrack; +-#endif +- + class TrackList; + + using ListOfTracks = std::list< std::shared_ptr< Track > >; +@@ -74,9 +70,7 @@ enum class TrackKind + { + None, + Wave, +-#if defined(USE_MIDI) + Note, +-#endif + Label, + Time, + Audio, +diff -urpN a/src/menus/FileMenus.cpp b/src/menus/FileMenus.cpp +--- a/src/menus/FileMenus.cpp 2019-05-04 13:38:57.000000000 +0300 ++++ b/src/menus/FileMenus.cpp 2019-08-27 19:32:36.939551720 +0300 +@@ -141,8 +141,6 @@ AudacityProject *DoImportMIDI( + } + #endif + +-#ifdef USE_MIDI +- + // Menu handler functions + + struct Handler : CommandHandlerObject { +@@ -480,6 +478,7 @@ void OnImportLabels(const CommandContext + } + } + ++#ifdef USE_MIDI + void OnImportMIDI(const CommandContext &context) + { + auto &project = context.project; +@@ -496,7 +495,7 @@ void OnImportMIDI(const CommandContext & + if (!fileName.empty()) + DoImportMIDI(&project, fileName); + } +-#endif ++#endif // USE_MIDI + + void OnImportRaw(const CommandContext &context) + { +diff -urpN a/src/tracks/ui/TimeShiftHandle.cpp b/src/tracks/ui/TimeShiftHandle.cpp +--- a/src/tracks/ui/TimeShiftHandle.cpp 2019-05-04 13:38:57.000000000 +0300 ++++ b/src/tracks/ui/TimeShiftHandle.cpp 2019-08-27 19:32:36.940551665 +0300 +@@ -393,12 +393,12 @@ UIHandle::Result TimeShiftHandle::Click + ok = false; + else + captureClips = true; +- }, + #ifdef USE_MIDI ++ }, + [&](NoteTrack *) { + captureClips = true; +- } + #endif ++ } + ); + + if ( ! ok ) diff --git a/media-sound/audacity/files/audacity-2.3.2-fix_building_against_system_portaudio.patch b/media-sound/audacity/files/audacity-2.3.2-fix_building_against_system_portaudio.patch new file mode 100644 index 000000000000..fa785fdd6c5e --- /dev/null +++ b/media-sound/audacity/files/audacity-2.3.2-fix_building_against_system_portaudio.patch @@ -0,0 +1,56 @@ +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(-) + +--- a/src/AudioIO.cpp ++++ b/src/AudioIO.cpp +@@ -465,8 +465,23 @@ TimeTrack and AudioIOListener and whethe + #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 |