From 3c20057d0cbbbed453a692d4dd4589d865808024 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler 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 . Bugs-added-by: Marius Bakke 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(fullName); + + if (library->IsLoaded()) + return library; + } +#endif + return {}; } }; ='/guix/log/configure.ac?id=a27e4eed2d045cfe42bea37f2f88ab026332b82d'>configure.ac
AgeCommit message (Expand)Author
2023-10-22teams: Adjust shebang to use 'guix repl'....This ensures the correct Guix dependencies are always available for the script. * etc/teams.scm.in: Rename to... * etc/teams.scm: ... this. Adjust shebang. * .gitignore: No longer ignore it. * configure.ac: Do not process it with AC_CONFIG_FILES. Reported-by: Clément Lassieur <clement@lassieur.org> Fixes: https://issues.guix.gnu.org/66605 Change-Id: I7a01750c6c5f0696b6c36b1e6caa9389d9e6822c Maxim Cournoyer
2023-09-26build: Add dependency on Git....* configure.ac: Check for ‘git’ and substitute ‘GIT’. * guix/config.scm.in (%git): New variable. * guix/self.scm (compiled-guix): Define ‘git’ and pass it to ‘make-config.scm’. (make-config.scm): Add #:git; emit a ‘%git’ variable. * doc/guix.texi (Requirements): Add it. Ludovic Courtès
2022-07-03etc: Add teams.scm....* etc/teams.scm.in: New file. * configure.ac: Generate executable. * .gitignore: Ignore generated file. Ricardo Wurmus
2022-01-25build: Require Guile >= 3.0.3....Fixes <https://issues.guix.gnu.org/53157>. Reported by Efraim Flashner <efraim@flashner.co.il>. * configure.ac: Require Guile >= 3.0.3. * doc/guix.texi (Requirements): Update accordingly. Ludovic Courtès
2021-11-23maint: "make dist" builds tarballs in 'ustar' format....This allows us to have file names longer than 99 characters. * configure.ac: Pass 'tar-ustar' to 'AM_INIT_AUTOMAKE'. Ludovic Courtès