gnu: audacity: update to 3.5.1.

* gnu/packages/audio.scm (audacity): Update to 3.5.1.
[inputs]: Add opusfile and rapidjson.
* gnu/packages/patches/audacity-ffmpeg-fallback.patch: Delete file.
* gnu/local.mk (dist_patch_DATA): Unregister it.

Change-Id: I4245ba1fa21bb54c6b647b001ae9b5cea846c774
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Andy Tai 2024-05-01 02:16:30 -07:00 committed by Liliana Marie Prikler
parent 73818c254b
commit cf5f7a8bf9
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87
3 changed files with 4 additions and 65 deletions

View file

@ -955,7 +955,6 @@ dist_patch_DATA = \
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \ %D%/packages/patches/ath9k-htc-firmware-gcc.patch \
%D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \ %D%/packages/patches/ath9k-htc-firmware-gcc-compat.patch \
%D%/packages/patches/atlas-gfortran-compat.patch \ %D%/packages/patches/atlas-gfortran-compat.patch \
%D%/packages/patches/audacity-ffmpeg-fallback.patch \
%D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \ %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \
%D%/packages/patches/audiofile-fix-sign-conversion.patch \ %D%/packages/patches/audiofile-fix-sign-conversion.patch \
%D%/packages/patches/audiofile-CVE-2015-7747.patch \ %D%/packages/patches/audiofile-CVE-2015-7747.patch \

View file

@ -924,7 +924,7 @@ (define-public ardour
(define-public audacity (define-public audacity
(package (package
(name "audacity") (name "audacity")
(version "3.3.3") ;for ffmpeg 6 support (version "3.5.1") ;for ffmpeg 6 support
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -933,8 +933,7 @@ (define-public audacity
(commit (string-append "Audacity-" version)))) (commit (string-append "Audacity-" version))))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "07jbql4jl2198z0rsa1nsf4p045iv4gz6ym75a60yyznvg0h0zwv")) (base32 "11sjyz6hxsr5dnndkkkiq7arjxvjl1sycl151xq3a3ggakgql3y1"))
(patches (search-patches "audacity-ffmpeg-fallback.patch"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
;; Remove bundled libraries. ;; Remove bundled libraries.
@ -969,6 +968,8 @@ (define-public audacity
;;("libsbsms" ,libsbsms) ;bundled version is modified ;;("libsbsms" ,libsbsms) ;bundled version is modified
libsndfile libsndfile
mpg123 mpg123
opusfile
rapidjson
soundtouch soundtouch
soxr ;replaces libsamplerate soxr ;replaces libsamplerate
sqlite sqlite

View file

@ -1,61 +0,0 @@
From 3c20057d0cbbbed453a692d4dd4589d865808024 Mon Sep 17 00:00:00 2001
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
Date: Sat, 29 Jan 2022 10:44:44 +0100
Subject: [PATCH] Add pkg-config fallback for locating ffmpeg.
Audacity >=3.1.0 no longer links against ffmpeg, but instead dynamically loads
it. This dynamic loading mechanism fails to properly locate libraries outside
of LD_LIBRARY_PATH.
See <https://issues.guix.gnu.org/53591>.
Bugs-added-by: Marius Bakke <marius@gnu.org>
diff --git a/libraries/lib-ffmpeg-support/CMakeLists.txt b/libraries/lib-ffmpeg-support/CMakeLists.txt
index b8803a1f5..f86559cca 100644
--- a/libraries/lib-ffmpeg-support/CMakeLists.txt
+++ b/libraries/lib-ffmpeg-support/CMakeLists.txt
@@ -1,5 +1,7 @@
if (${_OPT}use_ffmpeg)
+ pkg_check_modules(FFMPEG libavcodec libavformat libavutil)
+
set( SOURCES
FFmpegTypes.h
@@ -107,6 +109,12 @@ if (${_OPT}use_ffmpeg)
list(APPEND DEFINITIONS PRIVATE _DARWIN_C_SOURCE )
endif()
+ if (FFMPEG_FOUND)
+ pkg_get_variable(LIBAVCODEC_LIBDIR libavcodec libdir)
+ list(APPEND DEFINITIONS PRIVATE
+ "-DFFMPEG_PC_LIBDIR=\"${LIBAVCODEC_LIBDIR}\"")
+ endif()
+
audacity_library( lib-ffmpeg-support "${SOURCES}" "${LIBRARIES}"
"${DEFINITIONS}" ""
)
diff --git a/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp b/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp
index 55d6f676b..46640ef83 100644
--- a/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp
+++ b/libraries/lib-ffmpeg-support/FFmpegFunctions.cpp
@@ -246,6 +246,18 @@ struct FFmpegFunctions::Private final
if (library->IsLoaded())
return library;
+#if defined(FFMPEG_PC_LIBDIR)
+ {
+ static const wxString libdir{FFMPEG_PC_LIBDIR};
+ const wxString fullName = wxFileName(libdir, libraryName).GetFullPath();
+
+ auto library = std::make_shared<wxDynamicLibrary>(fullName);
+
+ if (library->IsLoaded())
+ return library;
+ }
+#endif
+
return {};
}
};