diff options
Diffstat (limited to 'gnu/packages/patches/jami-find-package-avutil.patch')
-rw-r--r-- | gnu/packages/patches/jami-find-package-avutil.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/patches/jami-find-package-avutil.patch b/gnu/packages/patches/jami-find-package-avutil.patch new file mode 100644 index 0000000000..2462e6da10 --- /dev/null +++ b/gnu/packages/patches/jami-find-package-avutil.patch @@ -0,0 +1,54 @@ +kestrelwx: The upstream CMake recipe does not link ffmpeg's libavutil, +resulting in a build failure. INCLUDE_DIRS from pkg-config here are actually +empty inside the build enviornment, but don't seem to affect the build. +Relevant upstream issue: +https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/2110 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 29bfde9a..db46776e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -453,12 +453,6 @@ endif() + + # For libavutil/avframe. + set(LIBJAMI_CONTRIB_DIR "${DAEMON_DIR}/contrib") +-find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h +- PATHS +- ${LIBJAMI_CONTRIB_DIR}/native/ffmpeg +- ${LIBJAMI_CONTRIB_DIR}/${CONTRIB_DARWIN_FOLDER}/include/ +- ${LIBJAMI_CONTRIB_DIR}/build/ffmpeg/Build/win32/x64/include) +-include_directories(${AVUTIL_INCLUDE_DIR}) + + find_package(Vulkan) + if(Vulkan_FOUND) +@@ -479,6 +473,11 @@ endif() + + find_package(PkgConfig REQUIRED) + ++# avutil ++pkg_search_module(avutil IMPORTED_TARGET libavutil) ++list(APPEND CLIENT_LIBS PkgConfig::avutil) ++include_directories(${avutil_INCLUDE_DIRS}) ++ + # hunspell + pkg_search_module(hunspell IMPORTED_TARGET hunspell) + if(hunspell_FOUND) +diff --git a/src/libclient/CMakeLists.txt b/src/libclient/CMakeLists.txt +index 01405038..b56a621b 100644 +--- a/src/libclient/CMakeLists.txt ++++ b/src/libclient/CMakeLists.txt +@@ -318,11 +318,9 @@ if(APPLE) + endif() + endif() + +-find_path(AVUTIL_INCLUDE_DIR libavutil/avutil.h +- PATHS +- ${LIBJAMI_CONTRIB_DIR}/native/ffmpeg +- ${LIBJAMI_CONTRIB_DIR}/${CONTRIB_DARWIN_FOLDER}/include/ +- ${LIBJAMI_CONTRIB_DIR}/build/ffmpeg/Build/win32/x64/include) ++pkg_search_module(AVUTIL libavutil) ++set(AVUTIL_INCLUDE_DIR ${AVUTIL_INCLUDE_DIRS}) ++set(AVUTIL_LIBRARY ${AVUTIL_LIBRARIES}) + include_directories(${AVUTIL_INCLUDE_DIR}) + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine |