~ruther/guix-local

3aedf8dac348aad67d0e19c91d2484e5163d613f — kestrel 5 months ago a0e6027
gnu: Update jami to 20251003.0.

* gnu/packages/jami.scm (libjami): Update to 20251003.0  Remove obsolete
patches.
(jami): Update version to 20251003.0.
[source]: Update patches.
[#:configure-flags]: Add -DJAMICORE_AS_SUBDIR=OFF.
(jami-docs): Update to 0.0.0-4.d7930e5.
* gnu/packages/patches/jami-find-package-avutil.patch: New file.
* gnu/packages/patches/jami-enable-testing.patch: Remove file.
* gnu/packages/patches/jami-qwindowkit.patch: Remove file.
* gnu/packages/patches/jami-unbundle-dependencies.patch: Remove file.
* gnu/packages/patches/jami-unittests-fix-build.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Update registered patches.

Change-Id: I8420045d97aac93fdc7f33ec64a0f6f06d3763f0
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
10 files changed, 83 insertions(+), 292 deletions(-)

M gnu/local.mk
M gnu/packages/jami.scm
D gnu/packages/patches/jami-disable-webengine.patch
D gnu/packages/patches/jami-enable-testing.patch
A gnu/packages/patches/jami-find-package-avutil.patch
M gnu/packages/patches/jami-libjami-headers-search.patch
M gnu/packages/patches/jami-qwindowkit.patch
D gnu/packages/patches/jami-tests-qtwebengine-ifdef-to-if.patch
M gnu/packages/patches/jami-unbundle-dependencies.patch
D gnu/packages/patches/jami-unittests-fix-build.patch
M gnu/local.mk => gnu/local.mk +1 -6
@@ 1620,14 1620,11 @@ dist_patch_DATA =						\
  %D%/packages/patches/isl-0.11.1-aarch64-support.patch		\
  %D%/packages/patches/ispell-for-linphone-cmake.patch		\
  %D%/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch\
  %D%/packages/patches/jami-disable-webengine.patch		\
  %D%/packages/patches/jami-enable-testing.patch		\
  %D%/packages/patches/jami-find-package-avutil.patch		\
  %D%/packages/patches/jami-libjami-headers-search.patch	\
  %D%/packages/patches/jami-qwindowkit.patch			\
  %D%/packages/patches/jami-skip-tests-requiring-internet.patch	\
  %D%/packages/patches/jami-tests-qtwebengine-ifdef-to-if.patch	\
  %D%/packages/patches/jami-unbundle-dependencies.patch		\
  %D%/packages/patches/jami-unittests-fix-build.patch		\
  %D%/packages/patches/jamvm-1.5.1-aarch64-support.patch	\
  %D%/packages/patches/jamvm-1.5.1-armv7-support.patch	\
  %D%/packages/patches/jamvm-2.0.0-aarch64-support.patch	\


@@ 1749,8 1746,6 @@ dist_patch_DATA =						\
  %D%/packages/patches/libgnome-encoding.patch			\
  %D%/packages/patches/libgnomeui-utf8.patch			\
  %D%/packages/patches/libgrss-CVE-2016-2001.patch		\
  %D%/packages/patches/libjami-ac-config-files.patch		\
  %D%/packages/patches/libjami-sdbus-cpp-v2.patch		\
  %D%/packages/patches/libjxr-fix-function-signature.patch	\
  %D%/packages/patches/libjxr-fix-typos.patch			\
  %D%/packages/patches/libofa-ftbfs-1.diff		\

M gnu/packages/jami.scm => gnu/packages/jami.scm +11 -15
@@ 79,8 79,8 @@
;;; When updating Jami, make sure that the patches used for ffmpeg-jami are up
;;; to date with those listed in
;;; <https://review.jami.net/plugins/gitiles/jami-daemon/+/refs/heads/master/contrib/src/ffmpeg/rules.mak>.
(define %jami-nightly-version "20250613.0")
(define %jami-daemon-commit "41384122a8b61548aae90c9893d065aca216ce85")
(define %jami-nightly-version "20251003.0")
(define %jami-daemon-commit "afe2446133eb3c9279e42b0d1dcfdd9a3c76a35f")

(define-public libjami
  (package


@@ 94,10 94,7 @@
              (file-name (git-file-name name version))
              (sha256
               (base32
                "136hiippjfbyp4h3pf68kh3cyw6r2idjgq7vj1h9sdipc87a1a2r"))
              (patches (search-patches
                        "libjami-ac-config-files.patch"
                        "libjami-sdbus-cpp-v2.patch"))))
                "05vjykg3nzf91bwzrhh95c6mndiz5n6gz204y2nrfrszx161irh9"))))
    (outputs '("out" "bin" "debug"))    ;"bin' contains jamid
    (build-system gnu-build-system)
    (arguments


@@ 234,16 231,13 @@ QSortFilterProxyModel conveniently exposed for QML.")
              (file-name (git-file-name name version))
              (sha256
               (base32
                "1kb564njmxzyn6lpry58dj14hcwfjhz9kqyi419glbdp98kipd4m"))
                "1ivgs7ckc5wcjlg1p2v7nsw4skcr2hfgv7yk9kx1hd4pbiknr6hk"))
              (patches (search-patches
                        "jami-disable-webengine.patch"
                        "jami-enable-testing.patch"
                        "jami-unbundle-dependencies.patch"
                        "jami-libjami-headers-search.patch"
                        "jami-qwindowkit.patch"
                        "jami-skip-tests-requiring-internet.patch"
                        "jami-tests-qtwebengine-ifdef-to-if.patch"
                        "jami-unbundle-dependencies.patch"
                        "jami-unittests-fix-build.patch"))))
                        "jami-find-package-avutil.patch"))))
    (build-system qt-build-system)
    (outputs '("out" "debug"))
    (arguments


@@ 252,6 246,8 @@ QSortFilterProxyModel conveniently exposed for QML.")
      #:configure-flags
      #~(list "-DWITH_DAEMON_SUBMODULE=OFF"
              (string-append "-DBUILD_VERSION=" #$version)
              ;; We ship 'libjami' as a separate package.
              "-DJAMICORE_AS_SUBDIR=OFF"
              ;; Disable the webengine since it grows the closure size by
              ;; about 450 MiB and requires more resources.
              "-DWITH_WEBENGINE=OFF"


@@ 338,8 334,8 @@ P2P-DHT.")

(define-public jami-docs
  ;; There aren't any tags, so use the latest commit.
  (let ((revision "3")
        (commit "4764cc83ccac2a64d7d9051ad915bbf762c6a624"))
  (let ((revision "4")
        (commit "d7930e51a50a8a5f1cec0fe186dbc3e5b9143294"))
    (package
      (name "jami-docs")
      (version (git-version "0.0.0" revision commit))


@@ 351,7 347,7 @@ P2P-DHT.")
                (file-name (git-file-name name version))
                (sha256
                 (base32
                  "1aj63ba6v0vnvn3si97xf1zk5b4y2hpk7g6mx75jbb2q9qybzn0i"))))
                  "12g17yl78vhkjn97x62dlxjijhkhbrzvxk4g1jm5s1cxrrqg2bg2"))))
      (build-system copy-build-system)
      (arguments
       (list

D gnu/packages/patches/jami-disable-webengine.patch => gnu/packages/patches/jami-disable-webengine.patch +0 -43
@@ 1,43 0,0 @@
Upstream-status: https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/2072

--- a/src/app/LayoutManager.qml	2025-06-18 02:28:42.298627257 +0300
+++ b/src/app/LayoutManager.qml	2025-06-18 02:34:07.528403540 +0300
@@ -17,7 +17,6 @@
 
 import QtQuick
 import QtQuick.Controls
-import QtWebEngine
 
 import net.jami.Adapters 1.1
 import net.jami.Enums 1.1
@@ -41,9 +40,6 @@ QtObject {
     // Used to store if a CallStackView component is fullscreened.
     property bool isCallFullscreen: false
 
-    // Used to store if a WebEngineView component is fullscreened.
-    property bool isWebFullscreen: false
-
     // QWK: Provide spacing for widgets that may be occluded by the system buttons.
     property QtObject qwkSystemButtonSpacing: QtObject {
         id: qwkSystemButtonSpacing
@@ -253,9 +249,6 @@ QtObject {
             isCallFullscreen = fullScreenItems
                 .filter(o => o.item.objectName === "callViewLoader")
                 .length
-            isWebFullscreen = fullScreenItems
-                .filter(o => o.item instanceof WebEngineView)
-                .length
         }
 
         // Listen for a hangup combined with a fullscreen call state and
--- a/src/app/mainview/components/CallStackView.qml	2025-06-18 02:36:58.863782993 +0300
+++ b/src/app/mainview/components/CallStackView.qml	2025-06-18 02:38:00.994456741 +0300
@@ -43,7 +43,7 @@ Item {
     Shortcut {
         sequence: "F11"
         context: Qt.ApplicationShortcut
-        enabled: CurrentConversation.hasCall && !layoutManager.isWebFullscreen
+        enabled: CurrentConversation.hasCall
         onActivated: toggleFullScreen();
     }
 

D gnu/packages/patches/jami-enable-testing.patch => gnu/packages/patches/jami-enable-testing.patch +0 -26
@@ 1,26 0,0 @@
Fix an issue where ctest wouldn't find the qml test files.
Upstream status: forwarded to jami@gnu.org

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e802357f..75cffda2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -884,5 +884,6 @@ qt_finalize_executable(${PROJECT_NAME})
 # tests
 if(BUILD_TESTING)
   message("Add Jami tests")
+  enable_testing()
   add_subdirectory(${TESTS_DIR})
 endif()
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 37796e52..06008ccf 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.16)
 
-enable_testing(true)
+enable_testing()
 
 set(QT_TESTING_MODULES
     ${QT_MODULES}

A gnu/packages/patches/jami-find-package-avutil.patch => gnu/packages/patches/jami-find-package-avutil.patch +54 -0
@@ 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

M gnu/packages/patches/jami-libjami-headers-search.patch => gnu/packages/patches/jami-libjami-headers-search.patch +11 -81
@@ 3,89 3,19 @@ It was applied, then reverted (by mistake?) in 4d2c55348bc014.
It's been resubmitted here:
https://lists.gnu.org/archive/html/jami/2024-01/msg00005.html

The remaining hunk was reverted by 22be4be8.
Submitted:
https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/2112

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d71b84b..36729698 100644
index 29bfde9a..3b4c7a92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,7 +136,7 @@ set(CMAKE_MODULE_PATH
   ${CMAKE_MODULE_PATH} "${EXTRAS_DIR}/build/cmake/modules")
 find_package(LibJami REQUIRED)
 if(LIBJAMI_FOUND)
-  include_directories(${LIBJAMI_INCLUDE_DIRS})
+  include_directories(${LIBJAMI_INCLUDE_DIR})
 endif()
 
 include(FindPython3)
diff --git a/extras/build/cmake/modules/FindLibJami.cmake b/extras/build/cmake/modules/FindLibJami.cmake
index 5cce45fc..11746cd8 100644
--- a/extras/build/cmake/modules/FindLibJami.cmake
+++ b/extras/build/cmake/modules/FindLibJami.cmake
@@ -20,30 +20,19 @@
 
 # Once done, this find module will set:
 #
-#   LIBJAMI_INCLUDE_DIRS - libjami include directories
+#   LIBJAMI_INCLUDE_DIR - libjami include directory
 #   LIBJAMI_FOUND - whether it was able to find the include directories
 #   LIBJAMI_LIB - path to libjami or libring library
 
 set(LIBJAMI_FOUND true)
 
 if(WITH_DAEMON_SUBMODULE)
-  set(LIBJAMI_INCLUDE_DIRS ${DAEMON_DIR}/src/jami)
+  set(LIBJAMI_INCLUDE_DIR ${DAEMON_DIR}/src/jami)
 else()
-  if(EXISTS ${LIBJAMI_INCLUDE_DIR}/jami.h)
-    set(LIBJAMI_INCLUDE_DIRS ${LIBJAMI_INCLUDE_DIR})
-  elseif(EXISTS ${LIBJAMI_BUILD_DIR}/jami/jami.h)
-    set(LIBJAMI_INCLUDE_DIRS ${LIBJAMI_BUILD_DIR}/jami)
-  elseif(EXISTS ${RING_INCLUDE_DIR}/jami.h)
-    set(LIBJAMI_INCLUDE_DIRS ${RING_INCLUDE_DIR})
-  elseif(EXISTS ${RING_BUILD_DIR}/jami/jami.h)
-    set(LIBJAMI_INCLUDE_DIRS ${RING_BUILD_DIR}/jami)
-  elseif(EXISTS ${CMAKE_INSTALL_PREFIX}/include/jami/jami.h)
-    set(LIBJAMI_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include/jami)
-  elseif(EXISTS ${CMAKE_INSTALL_PREFIX}/daemon/include/jami/jami.h)
-    set(LIBJAMI_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/daemon/include/jami)
-  else()
+  find_path(LIBJAMI_INCLUDE_DIR jami.h PATH_SUFFIXES jami)
+  if(NOT LIBJAMI_INCLUDE_DIR)
     message(STATUS "Jami daemon headers not found!
-Set -DLIBJAMI_BUILD_DIR or -DCMAKE_INSTALL_PREFIX")
+To build using the daemon git submodule, set -DWITH_DAEMON_SUBMODULE")
     set(LIBJAMI_FOUND false)
@@ -237,6 +237,6 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/extras/build/cmake/modules)
 if (NOT JAMICORE_AS_SUBDIR)
   find_package(LibJami REQUIRED)
   if(LIBJAMI_FOUND)
-    include_directories(${LIBJAMI_INCLUDE_DIRS})
+    include_directories(${LIBJAMI_INCLUDE_DIR})
   endif()
 endif()
@@ -115,5 +104,5 @@ endif()
 # Restore the original value of CMAKE_FIND_LIBRARY_SUFFIXES.
 set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_orig})
 
-message(STATUS "Jami daemon headers are in " ${LIBJAMI_INCLUDE_DIRS})
+message(STATUS "Jami daemon headers are in " ${LIBJAMI_INCLUDE_DIR})
 message(STATUS "Jami daemon library is at " ${LIBJAMI_LIB})
diff --git a/src/libclient/CMakeLists.txt b/src/libclient/CMakeLists.txt
index 144efaf5..cb87fc2a 100644
--- a/src/libclient/CMakeLists.txt
+++ b/src/libclient/CMakeLists.txt
@@ -62,7 +62,7 @@ set(CMAKE_MODULE_PATH
   ${CMAKE_MODULE_PATH} "${EXTRAS_DIR}/build/cmake/modules")
 find_package(LibJami REQUIRED)
 if(LIBJAMI_FOUND)
-  include_directories(${LIBJAMI_INCLUDE_DIRS})
+  include_directories(${LIBJAMI_INCLUDE_DIR})
 endif()
 
 string(SUBSTRING ${CMAKE_GENERATOR} 0 14 CMAKE_GENERATOR_SHORT)
diff --git a/src/libclient/qtwrapper/CMakeLists.txt b/src/libclient/qtwrapper/CMakeLists.txt
index 46887051..a20658ad 100644
--- a/src/libclient/qtwrapper/CMakeLists.txt
+++ b/src/libclient/qtwrapper/CMakeLists.txt
@@ -46,7 +46,7 @@ else()
 endif()
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${LIBJAMI_INCLUDE_DIRS})
+include_directories(${LIBJAMI_INCLUDE_DIR})
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../dbus)
 

M gnu/packages/patches/jami-qwindowkit.patch => gnu/packages/patches/jami-qwindowkit.patch +5 -5
@@ 3,10 3,10 @@ Upstream-status: https://lists.gnu.org/archive/html/jami/2024-03/msg00008.html
This makes it possible to use the system-provided qwindowkit library.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d2dccfb..8dedff50 100644
index 29bfde9a..3b4c7a92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,13 +100,13 @@ endif()
@@ -101,13 +101,13 @@ endif()
 
 # qwindowkit (frameless window)
 add_fetch_content(


@@ 21,12 21,12 @@ index 6d2dccfb..8dedff50 100644
+
 list(APPEND CLIENT_LIBS QWindowKit::Quick)
 
 set(CMAKE_AUTOMOC ON)
 # If ENABLE_CRASHREPORTS is enabled, we will use crashpad_cmake for now.
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index b2730b71..4960899e 100644
index c5228ccf..816f97a7 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -48,7 +48,7 @@ target_include_directories(test_common_obj PRIVATE
@@ -61,7 +61,7 @@ target_include_directories(test_common_obj PRIVATE
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_SOURCE_DIR}/src)
 target_link_directories(test_common_obj PRIVATE ${CLIENT_LINK_DIRS})

D gnu/packages/patches/jami-tests-qtwebengine-ifdef-to-if.patch => gnu/packages/patches/jami-tests-qtwebengine-ifdef-to-if.patch +0 -26
@@ 1,26 0,0 @@
Upstream-status: https://lists.gnu.org/archive/html/jami/2024-03/msg00005.html

Fix macro value checking.

diff --git a/tests/qml/main.cpp b/tests/qml/main.cpp
index 2fbecebe..8cb3de69 100644
--- a/tests/qml/main.cpp
+++ b/tests/qml/main.cpp
@@ -35,7 +35,7 @@
 #include <QtQuickTest/quicktest.h>
 #include <QSignalSpy>
 
-#ifdef WITH_WEBENGINE
+#if WITH_WEBENGINE
 #include <QtWebEngineCore>
 #include <QtWebEngineQuick>
 #endif
@@ -192,7 +192,7 @@ main(int argc, char** argv)
     // Allow the user to enable fatal warnings for certain tests.
     Utils::remove_argument(argv, argc, "--failonwarn", [&]() { qputenv("QT_FATAL_WARNINGS", "1"); });
 
-#ifdef WITH_WEBENGINE
+#if WITH_WEBENGINE
     QtWebEngineQuick::initialize();
 #endif
     QTEST_SET_MAIN_SOURCE_PATH

M gnu/packages/patches/jami-unbundle-dependencies.patch => gnu/packages/patches/jami-unbundle-dependencies.patch +1 -44
@@ 5,50 5,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index e802357f..6d2dccfb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -696,29 +696,50 @@ add_subdirectory(3rdparty/SortFilterProx
 set(SFPM_OBJECTS $<TARGET_OBJECTS:SortFilterProxyModel>)
 
 # md4c
-set(BUILD_MD2HTML_EXECUTABLE OFF CACHE BOOL "Don't build md2html executable" FORCE)
-set(BUILD_SHARED_LIBS OFF CACHE BOOL "Don't build shared md4c library" FORCE)
-add_subdirectory(3rdparty/md4c EXCLUDE_FROM_ALL)
-list(APPEND CLIENT_LINK_DIRS ${MD4C_BINARY_DIR}/src)
-list(APPEND CLIENT_INCLUDE_DIRS ${MD4C_SOURCE_DIR}/src)
-list(APPEND CLIENT_LIBS md4c-html)
+find_package(md4c)
+if(md4c_FOUND)
+  message(STATUS "Using system-provided md4c-html")
+  list(APPEND CLIENT_LIBS md4c::md4c-html)
+else()
+  message("Using bundled md4c-html library")
+  set(BUILD_MD2HTML_EXECUTABLE OFF CACHE BOOL "Don't build md2html executable" FORCE)
+  set(BUILD_SHARED_LIBS OFF CACHE BOOL "Don't build shared md4c library" FORCE)
+  add_subdirectory(3rdparty/md4c EXCLUDE_FROM_ALL)
+  list(APPEND CLIENT_LINK_DIRS ${MD4C_BINARY_DIR}/src)
+  list(APPEND CLIENT_INCLUDE_DIRS ${MD4C_SOURCE_DIR}/src)
+  list(APPEND CLIENT_LIBS md4c-html)
+endif()
 
 # tidy-html5
-set(BUILD_SHARED_LIB OFF CACHE BOOL "Don't build shared tidy library" FORCE)
-set(SUPPORT_CONSOLE_APP OFF CACHE BOOL "Don't build tidy console app" FORCE)
-add_subdirectory(3rdparty/tidy-html5 EXCLUDE_FROM_ALL)
-list(APPEND CLIENT_LINK_DIRS ${tidy_BINARY_DIR}/Release)
-list(APPEND CLIENT_INCLUDE_DIRS ${tidy_SOURCE_DIR}/include)
-list(APPEND CLIENT_LIBS tidy-static)
+pkg_check_modules(tidy IMPORTED_TARGET tidy)
+if(tidy_FOUND)
+  message(STATUS "Using system-provided tidy")
+  list(APPEND CLIENT_LIBS PkgConfig::tidy)
+else()
+  message("Using bundled tidy library")
+  set(BUILD_SHARED_LIB OFF CACHE BOOL "Don't build shared tidy library" FORCE)
+  set(SUPPORT_CONSOLE_APP OFF CACHE BOOL "Don't build tidy console app" FORCE)
+  add_subdirectory(3rdparty/tidy-html5 EXCLUDE_FROM_ALL)
+  list(APPEND CLIENT_LINK_DIRS ${tidy_BINARY_DIR}/Release)
+  list(APPEND CLIENT_INCLUDE_DIRS ${tidy_SOURCE_DIR}/include)
+  list(APPEND CLIENT_LIBS tidy-static)
+endif()
@@ -696,12 +696,19 @@ add_subdirectory(3rdparty/SortFilterProx
 
 # ZXing-cpp configuration
-set(BUILD_EXAMPLES OFF CACHE BOOL "")

D gnu/packages/patches/jami-unittests-fix-build.patch => gnu/packages/patches/jami-unittests-fix-build.patch +0 -46
@@ 1,46 0,0 @@
Upstream-status: https://review.jami.net/c/jami-client-qt/+/31508

diff --git a/tests/unittests/previewengine_unittest.cpp b/tests/unittests/previewengine_unittest.cpp
index f5c103cf..810e621b 100644
--- a/tests/unittests/previewengine_unittest.cpp
+++ b/tests/unittests/previewengine_unittest.cpp
@@ -17,7 +17,8 @@
 
 #include "globaltestenvironment.h"
 
-#include <QtHttpServer/QHttpServer>
+#include <QtHttpServer>
+#include <QTcpServer>
 
 class PreviewEngineFixture : public ::testing::Test
 {
@@ -27,19 +28,27 @@ public:
     void SetUp() override
     {
         server = new QHttpServer();
-        // Setup a server that can return an HTML body.
-        server->listen(QHostAddress::LocalHost, 8000);
+        tcpserver = new QTcpServer();
+
+        // Setup a server that can return an HTML body, which listens
+        // on 127.0.0.1 (localhost) and port 8000.
+        if (!tcpserver->listen(QHostAddress::LocalHost, 8000)
+            || !server->bind(tcpserver)) {
+            qFatal() << "failed to listen:" << tcpserver->errorString();
+        }
     }
 
     // Close unit test context. Called
     // after each unit test ending
     void TearDown() override
     {
+        delete tcpserver;
         delete server;
     }
 
     // An instance of QHttpServer used to create a server.
     QHttpServer* server;
+    QTcpServer* tcpserver;
 };
 
 /*!