summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2022-01-02 10:37:35 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2022-01-19 20:47:04 +0100
commit03cdd729c61ab475a97aeaa55cf79cf8b8e527ce (patch)
tree62090c35391f2ab76dd169db21d1e7bab27f2e98 /gnu
parent4ff6b34026719e7cb6a6c47f38e1d1fc9e92fac5 (diff)
gnu: audacity: Update to 3.1.3
* gnu/packages/patches/audacity-add-include.patch: Delete file. * gnu/packages/patches/audacity-build-with-system-portaudio.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/audio (audacity): Update to 3.1.3 [inputs]: Use wxwidgets-3.1. Add linux-libre-headers, libjpeg-turbo, sqlite, portaudio. [#:configure-flags]: Update to disable conan during build, prefer system libraries, and disable features that phone home. [#:phases]: Add fix-cmake-rpath to ensure correct DT_RUNPATHs. Adjust comment-out-revision-indent and use-upstream-headers. [native-search-paths]: Add AUDACITY_MODULES_PATH and AUDACITY_PATH.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk2
-rw-r--r--gnu/packages/audio.scm66
-rw-r--r--gnu/packages/patches/audacity-add-include.patch15
-rw-r--r--gnu/packages/patches/audacity-build-with-system-portaudio.patch62
4 files changed, 41 insertions, 104 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index a928ef33118..3a954f8bf90 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -858,8 +858,6 @@ dist_patch_DATA = \
858 %D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \ 858 %D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \
859 %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ 859 %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
860 %D%/packages/patches/atlas-gfortran-compat.patch \ 860 %D%/packages/patches/atlas-gfortran-compat.patch \
861 %D%/packages/patches/audacity-build-with-system-portaudio.patch \
862 %D%/packages/patches/audacity-add-include.patch \
863 %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \ 861 %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \
864 %D%/packages/patches/audiofile-fix-sign-conversion.patch \ 862 %D%/packages/patches/audiofile-fix-sign-conversion.patch \
865 %D%/packages/patches/audiofile-CVE-2015-7747.patch \ 863 %D%/packages/patches/audiofile-CVE-2015-7747.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index eae0d1fe687..0fb476d92f8 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -725,7 +725,7 @@ engineers, musicians, soundtrack editors and composers.")
725(define-public audacity 725(define-public audacity
726 (package 726 (package
727 (name "audacity") 727 (name "audacity")
728 (version "2.4.2") 728 (version "3.1.3")
729 (source 729 (source
730 (origin 730 (origin
731 (method git-fetch) 731 (method git-fetch)
@@ -735,9 +735,7 @@ engineers, musicians, soundtrack editors and composers.")
735 (file-name (git-file-name name version)) 735 (file-name (git-file-name name version))
736 (sha256 736 (sha256
737 (base32 737 (base32
738 "0lklcvqkxrr2gkb9gh3422iadzl2rv9v0a8s76rwq43lj2im7546")) 738 "1689q9apbjf9nnda62shb8j7hm4hxd47mhk4l5h3c728mjjkilmi"))
739 (patches (search-patches "audacity-build-with-system-portaudio.patch"
740 "audacity-add-include.patch"))
741 (modules '((guix build utils))) 739 (modules '((guix build utils)))
742 (snippet 740 (snippet
743 ;; Remove bundled libraries. 741 ;; Remove bundled libraries.
@@ -745,13 +743,10 @@ engineers, musicians, soundtrack editors and composers.")
745 (for-each 743 (for-each
746 (lambda (dir) 744 (lambda (dir)
747 (delete-file-recursively (string-append "lib-src/" dir))) 745 (delete-file-recursively (string-append "lib-src/" dir)))
748 '("expat" "ffmpeg" "lame" "libflac" "libid3tag" "libmad" "libogg" 746 '("libsoxr" "libvamp" "lv2" "soundtouch" "sqlite" "twolame"
749 "libsndfile" "libsoxr" "libvamp" "libvorbis" "lv2"
750 "portmidi" "soundtouch" "twolame"
751 ;; FIXME: these libraries have not been packaged yet: 747 ;; FIXME: these libraries have not been packaged yet:
752 ;; "libnyquist" 748 ;; "libnyquist"
753 ;; "libscorealign" 749 ;; "libscorealign"
754 ;; "libwidgetextra"
755 ;; "portburn" 750 ;; "portburn"
756 ;; "portsmf" 751 ;; "portsmf"
757 ;; "portmixer" 752 ;; "portmixer"
@@ -763,26 +758,30 @@ engineers, musicians, soundtrack editors and composers.")
763 #t)))) 758 #t))))
764 (build-system cmake-build-system) 759 (build-system cmake-build-system)
765 (inputs 760 (inputs
766 (list wxwidgets 761 (list wxwidgets-3.1
767 gtk+ 762 gtk+
768 alsa-lib 763 alsa-lib
769 jack-1 764 jack-1
770 expat 765 expat
771 ffmpeg 766 ffmpeg
772 lame 767 lame
768 linux-libre-headers
773 flac 769 flac
774 libid3tag 770 libid3tag
771 libjpeg-turbo
775 libmad 772 libmad
776 ;;("libsbsms" ,libsbsms) ;bundled version is modified 773 ;;("libsbsms" ,libsbsms) ;bundled version is modified
777 libsndfile 774 libsndfile
778 soundtouch 775 soundtouch
779 soxr ;replaces libsamplerate 776 soxr ;replaces libsamplerate
777 sqlite
780 twolame 778 twolame
781 vamp 779 vamp
782 libvorbis 780 libvorbis
783 lv2 781 lv2
784 lilv ;for lv2 782 lilv ;for lv2
785 suil ;for lv2 783 suil ;for lv2
784 portaudio
786 portmidi)) 785 portmidi))
787 (native-inputs 786 (native-inputs
788 `(("autoconf" ,autoconf) 787 `(("autoconf" ,autoconf)
@@ -795,10 +794,12 @@ engineers, musicians, soundtrack editors and composers.")
795 (arguments 794 (arguments
796 `(#:configure-flags 795 `(#:configure-flags
797 (list 796 (list
798 ;; Loading FFmpeg dynamically is problematic. 797 "-Daudacity_conan_enabled=off"
799 "-Daudacity_use_ffmpeg=linked" 798 "-Daudacity_lib_preference=system"
800 "-Daudacity_use_lame=system" 799 ;; TODO: enable this flag once we've packaged all dependencies
801 "-Daudacity_use_portsmf=system") 800 ;; "-Daudacity_obey_system_dependencies=on"
801 ;; disable crash reports, updates, ..., anything that phones home
802 "-Daudacity_has_networking=off")
802 #:imported-modules ((guix build glib-or-gtk-build-system) 803 #:imported-modules ((guix build glib-or-gtk-build-system)
803 ,@%cmake-build-system-modules) 804 ,@%cmake-build-system-modules)
804 #:modules 805 #:modules
@@ -807,27 +808,42 @@ engineers, musicians, soundtrack editors and composers.")
807 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)) 808 ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:))
808 #:phases 809 #:phases
809 (modify-phases %standard-phases 810 (modify-phases %standard-phases
811 (add-after 'unpack 'fix-cmake-rpath
812 (lambda* (#:key outputs #:allow-other-keys)
813 (substitute* "CMakeLists.txt"
814 (("\\$ORIGIN/\\.\\./\\$\\{_PKGLIB\\}")
815 (string-append (assoc-ref outputs "out") "/lib/audacity"))
816 (("CMAKE_BUILD_WITH_INSTALL_RPATH [A-Z]*")
817 "CMAKE_BUILD_WITH_INSTALL_RPATH TRUE")
818 (("CMAKE_INSTALL_RPATH_USE_LINK_PATH [A-Z]*")
819 "CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE"))
820 (substitute* "src/CMakeLists.txt"
821 (("-Wl,--disable-new-dtags") "-Wl,--enable-new-dtags"))))
810 (add-after 'unpack 'comment-out-revision-ident 822 (add-after 'unpack 'comment-out-revision-ident
811 (lambda _ 823 (lambda _
824 (substitute* "src/CMakeLists.txt"
825 (("file\\( TOUCH \".*RevisionIdent\\.h\" \\)" directive)
826 (string-append "# " directive)))
812 (substitute* "src/AboutDialog.cpp" 827 (substitute* "src/AboutDialog.cpp"
813 (("(.*RevisionIdent\\.h.*)" include-line) 828 (("(.*RevisionIdent\\.h.*)" include-line)
814 (string-append "// " include-line))))) 829 (string-append "// " include-line)))))
815 (add-after 'unpack 'use-upstream-headers 830 (add-after 'unpack 'use-upstream-headers
816 (lambda* (#:key inputs #:allow-other-keys) 831 (lambda* (#:key inputs #:allow-other-keys)
817 (substitute* '("src/NoteTrack.cpp" 832 (substitute* '("libraries/lib-files/FileNames.cpp")
818 "src/AudioIO.cpp" 833 (("\"/usr/include/linux/magic.h\"") "<linux/magic.h>"))))
819 "src/AudioIO.h"
820 "src/AudioIOBase.cpp")
821 (("../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h")
822 (("../lib-src/portmidi/porttime/porttime.h") "porttime.h"))
823 (substitute* "src/prefs/MidiIOPrefs.cpp"
824 (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h"))))
825 (add-after 'wrap-program 'glib-or-gtk-wrap 834 (add-after 'wrap-program 'glib-or-gtk-wrap
826 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))) 835 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))
827 ;; The test suite is not "well exercised" according to the developers, 836 ;; The test suite is not "well exercised" according to the developers,
828 ;; and fails with various errors. See 837 ;; and fails with various errors. See
829 ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>. 838 ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>.
830 #:tests? #f)) 839 #:tests? #f))
840 (native-search-paths
841 (list (search-path-specification
842 (variable "AUDACITY_MODULES_PATH")
843 (files '("lib/audacity/modules")))
844 (search-path-specification
845 (variable "AUDACITY_PATH")
846 (files '("share/audacity")))))
831 (home-page "https://www.audacityteam.org/") 847 (home-page "https://www.audacityteam.org/")
832 (synopsis "Software for recording and editing sounds") 848 (synopsis "Software for recording and editing sounds")
833 (description 849 (description
diff --git a/gnu/packages/patches/audacity-add-include.patch b/gnu/packages/patches/audacity-add-include.patch
deleted file mode 100644
index a7f27918e75..00000000000
--- a/gnu/packages/patches/audacity-add-include.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1Without <sys/time.h>, gettimeofday is undefined.
2
3diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp
4index 0187e3962..e15d55f4c 100644
5--- a/src/AudioIO.cpp
6+++ b/src/AudioIO.cpp
7@@ -479,6 +479,8 @@ time warp info and AudioIOListener and whether the playback is looped.
8 #include "../lib-src/portmidi/porttime/porttime.h"
9 #include "../lib-src/header-substitutes/allegro.h"
10
11+#include <sys/time.h>
12+
13 #define MIDI_SLEEP 10 /* milliseconds */
14 // how long do we think the thread that fills MIDI buffers,
15 // if it is separate from the portaudio thread,
diff --git a/gnu/packages/patches/audacity-build-with-system-portaudio.patch b/gnu/packages/patches/audacity-build-with-system-portaudio.patch
deleted file mode 100644
index 05325a14937..00000000000
--- a/gnu/packages/patches/audacity-build-with-system-portaudio.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1Downloaded from here:
2https://sourceforge.net/p/audacity/mailman/message/36106562/
3
4Modified for use on later versions of audacity.
5
6>From 5f9482a191359f2c477763a36d2c865c5f186602 Mon Sep 17 00:00:00 2001
7From: Antonio Ospite <ao2@ao2.it>
8Date: Tue, 7 Nov 2017 13:06:33 +0100
9Subject: [PATCH] Fix building against the system portaudio library
10
11Building against the system portaudio results in this error:
12
13./src/AudioIO.cpp:983: undefined reference to `PaUtil_GetTime'
14audacity-AudioIO.o: In function `audacityAudioCallback(void const*, void*,
15unsigned long, PaStreamCallbackTimeInfo const*, unsigned long, void*)':
16./src/AudioIO.cpp:4630: undefined reference to `PaUtil_GetTime'
17collect2: error: ld returned 1 exit status
18Makefile:2349: recipe for target 'audacity' failed
19make[3]: *** [audacity] Error 1
20
21This is because PaUtil_GetTime is declared as a C symbol in pa_util.h
22but is resolved as a C++ symbol at link time.
23
24Audacity fixes this in the local tree with this change:
25https://github.com/audacity/audacity/commit/38fd97b8e26060332ab3e9e000a8882326a70ba7
26
27However this is not general enough for the portaudio debian package.
28
29Since PaUtil_GetTime() is the only function causing problems, just copy
30over the code where it's used.
31---
32 src/AudioIO.cpp | 17 ++++++++++++++++-
33 1 file changed, 16 insertions(+), 1 deletion(-)
34
35diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp
36index 48715869c..bb4bf472c 100644
37--- a/src/AudioIO.cpp
38+++ b/src/AudioIO.cpp
39@@ -480,9 +480,22 @@ time warp info and AudioIOListener and whether the playback is looped.
40 #define ROUND(x) (int) ((x)+0.5)
41 //#include <string.h>
42 // #include "../lib-src/portmidi/pm_common/portmidi.h"
43- #include "../lib-src/portaudio-v19/src/common/pa_util.h"
44 #include "NoteTrack.h"
45 #endif
46+PaTime PaUtil_GetTime( void )
47+{
48+#ifdef HAVE_MACH_ABSOLUTE_TIME
49+ return mach_absolute_time() * machSecondsConversionScaler_;
50+#elif defined(HAVE_CLOCK_GETTIME)
51+ struct timespec tp;
52+ clock_gettime(CLOCK_REALTIME, &tp);
53+ return (PaTime)(tp.tv_sec + tp.tv_nsec * 1e-9);
54+#else
55+ struct timeval tv;
56+ gettimeofday( &tv, NULL );
57+ return (PaTime) tv.tv_usec * 1e-6 + tv.tv_sec;
58+#endif
59+}
60
61 #ifdef EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT
62 #define LOWER_BOUND 0.0