Subject: [PATCH 7/8] gnu: jami: Update to 20250610.0.

From: Homo <[email-masked]>
Date: Sun, 15 Jun 2025 23:26:16 +0300

Fixes <https://issues.guix.gnu.org/76231>

* gnu/packages/patches/jami.scm (libjami): Update to 20250610.0.
[source]: Unregister libgit2 patch.
[inputs]: Delete guile-3.0.
[arguments] <#:configure-flags>: Delete --enable-agent.
(jami): Update to 20250610.0.
[native-inputs]: Add git.
[inputs]: Add hunspell and zxing-cpp.
[propagated-inputs]: Add qtwebengine.
* gnu/packages/patches/jami-qwindowkit.patch,
gnu/packages/patches/jami-unbundle-dependencies.patch: Update for jami 20250610.0.
* gnu/local.mk: Unregister patch.
* gnu/packages/patches/libjami-libgit2-compatibility.patch: Remove file.

Change-Id: I118454aa7c214271725358928b751f4d43cac2db
---
 gnu/local.mk                                  |  1 -
 gnu/packages/jami.scm                         | 26 ++++++++++++-------
 gnu/packages/patches/jami-qwindowkit.patch    |  2 +-
 .../patches/jami-unbundle-dependencies.patch  | 25 +++++++++++++++++-
 .../libjami-libgit2-compatibility.patch       | 23 ----------------
 5 files changed, 41 insertions(+), 36 deletions(-)
 delete mode 100644 gnu/packages/patches/libjami-libgit2-compatibility.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a3feb7bc72..68ba49fa3f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1748,7 +1748,6 @@ dist_patch_DATA =						\
   %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-libgit2-compatibility.patch	\
   %D%/packages/patches/libjxr-fix-function-signature.patch	\
   %D%/packages/patches/libjxr-fix-typos.patch			\
   %D%/packages/patches/libofa-ftbfs-1.diff		\
diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index db45c9973e..56f50ec37a 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -36,6 +36,7 @@ (define-module (gnu packages jami)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages hunspell)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages markup)
@@ -78,8 +79,8 @@ (define-module (gnu packages jami)
 ;;; 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 "20240524.0")
-(define %jami-daemon-commit "fd2f2815448ce4072dcbc3995950788573d63f3b")
+(define %jami-nightly-version "20250610.0")
+(define %jami-daemon-commit "3280fa373a186c8cd4926849ef94d41bcf97c129")
 
 (define webrtc-audio-processing/jami
   ;; libjami still requires an 0.x version of this package.  Remove it when
@@ -152,10 +153,9 @@ (define-public libjami
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1bw0laj93w4pvlxsr5abz59805ypbmg21z5393yzm82j4d35cfyr"))
+                "1sxrm0q4p9al6ar3svnni080cnclgf6yi9sy503n60srg47jvs87"))
               (patches (search-patches
-                        "libjami-ac-config-files.patch"
-                        "libjami-libgit2-compatibility.patch"))))
+                        "libjami-ac-config-files.patch"))))
     (outputs '("out" "bin" "debug"))    ;"bin' contains jamid
     (build-system gnu-build-system)
     (arguments
@@ -169,7 +169,9 @@ (define-public libjami
       ;; execution of test plans described in Scheme.  It may be useful in
       ;; user scripts too, until more general purpose Scheme bindings are made
       ;; available (see: test/agent/README.md).
-      #:configure-flags #~(list "--enable-agent" "--enable-debug")
+      ;; BROKEN: Doesn't compiler.
+      ;#:configure-flags #~(list "--enable-agent" "--enable-debug")
+      #:configure-flags #~(list "--enable-debug")
       #:make-flags #~(list"V=1")        ;build verbosely
       #:phases
       #~(modify-phases %standard-phases
@@ -203,7 +205,7 @@ (define-public libjami
            dhtnet
            eudev
            ffmpeg-jami
-           guile-3.0
+           ;guile-3.0
            jack-1
            jsoncpp
            libarchive
@@ -290,7 +292,7 @@ (define-public jami
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1wqi50n80khyngj48brc8wg3m6jq471h9gm62yxpj4f8z5j81ncd"))
+                "11hydcclfllvdsd08fdmsqxldgk957rr0xyjqgr9hdh7y0l95a9a"))
               (patches (search-patches
                         "jami-enable-testing.patch"
                         "jami-libjami-headers-search.patch"
@@ -360,7 +362,8 @@ (define-public jami
                   ;; "ctest" "-R" "Qml_Tests" ctest-args)
                   )))))))
     (native-inputs
-     (list googletest
+     (list git
+           googletest
            pkg-config
            python
            qthttpserver
@@ -370,6 +373,7 @@ (define-public jami
     (inputs
      (list ffmpeg-jami
            glib                         ;for integration with GNOME
+           hunspell
            libjami
            libnotify
            libxcb
@@ -385,7 +389,9 @@ (define-public jami
            qtsvg
            qwindowkit
            tidy-html                    ;used by src/app/htmlparser.h
-           vulkan-loader))
+           vulkan-loader
+           zxing-cpp))
+    (propagated-inputs (list qtwebengine)) ;bug
     (home-page "https://jami.net")
     (synopsis "Qt Jami client")
     (description "This package provides the Jami Qt client.  Jami is a secure
diff --git a/gnu/packages/patches/jami-qwindowkit.patch b/gnu/packages/patches/jami-qwindowkit.patch
index 65248a6940..3a341a4286 100644
--- a/gnu/packages/patches/jami-qwindowkit.patch
+++ b/gnu/packages/patches/jami-qwindowkit.patch
@@ -13,7 +13,7 @@ index 6d2dccfb..8dedff50 100644
 -  TARGET qwindowkit
 +  TARGET QWindowKit
    URL https://github.com/stdware/qwindowkit.git
-   BRANCH 79b1f3110754f9c21af2d7dacbd07b1a9dbaf6ef
+   BRANCH 758b00cb6c2d924be3a1ea137ec366dc33a5132d
    PATCHES ${QWINDOWKIT_PATCHES}
    OPTIONS ${QWINDOWKIT_OPTIONS}
  )
diff --git a/gnu/packages/patches/jami-unbundle-dependencies.patch b/gnu/packages/patches/jami-unbundle-dependencies.patch
index 2732087daf..074f8ef07e 100644
--- a/gnu/packages/patches/jami-unbundle-dependencies.patch
+++ b/gnu/packages/patches/jami-unbundle-dependencies.patch
@@ -1,5 +1,7 @@
 Forwarded here: https://lists.gnu.org/archive/html/jami/2024-01/msg00007.html
 
+ZXing-cpp addition to patch is not sent upstream.
+
 From a302dc0a0faf2778331745a1d01bc3071e182d4d Mon Sep 17 00:00:00 2001
 From: Maxim Cournoyer <[email-masked]>
 Date: Mon, 8 Jan 2024 16:07:05 -0500
@@ -19,7 +21,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
 index e802357f..6d2dccfb 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -600,20 +600,34 @@ add_subdirectory(3rdparty/SortFilterProxyModel)
+@@ -696,29 +696,50 @@ add_subdirectory(3rdparty/SortFilterProx
  set(SFPM_OBJECTS $<TARGET_OBJECTS:SortFilterProxyModel>)
  
  # md4c
@@ -62,6 +64,27 @@ index e802357f..6d2dccfb 100644
 +  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()
+ 
+ # ZXing-cpp configuration
+-set(BUILD_EXAMPLES OFF CACHE BOOL "")
+-set(BUILD_BLACKBOX_TESTS OFF CACHE BOOL "")
+-add_subdirectory(3rdparty/zxing-cpp EXCLUDE_FROM_ALL)
++pkg_check_modules(zxing IMPORTED_TARGET zxing)
++if(zxing_FOUND)
++  message(STATUS "Using system-provided ZXing-cpp")
++  list(APPEND CLIENT_INCLUDE_DIRS ${zxing_INCLUDE_DIRS})
++  list(APPEND CLIENT_LIBS PkgConfig::zxing)
++else()
++  set(BUILD_EXAMPLES OFF CACHE BOOL "")
++  set(BUILD_BLACKBOX_TESTS OFF CACHE BOOL "")
++  add_subdirectory(3rdparty/zxing-cpp EXCLUDE_FROM_ALL)
+ 
+ # Add ZXing-cpp to includes and libraries
+-list(APPEND CLIENT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/zxing-cpp/core/src)
+-list(APPEND CLIENT_LIBS ZXing)
++  list(APPEND CLIENT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/zxing-cpp/core/src)
++  list(APPEND CLIENT_LIBS ZXing)
 +endif()
  
  # common executable sources
diff --git a/gnu/packages/patches/libjami-libgit2-compatibility.patch b/gnu/packages/patches/libjami-libgit2-compatibility.patch
deleted file mode 100644
index 20896deac4..0000000000
--- a/gnu/packages/patches/libjami-libgit2-compatibility.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Libgit2 1.8.0 went for 'git_commit *const' but 1.8.4 reverted back to
-'const git_commit *'.
-
---- a/src/jamidht/conversationrepository.cpp
-+++ b/src/jamidht/conversationrepository.cpp
-@@ -783,7 +783,7 @@ ConversationRepository::Impl::createMergeCommit(git_index* index, const std::str
-     // Commit
-     git_buf to_sign = {};
-     // Check if the libgit2 library version is 1.8.0 or higher
--#if( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 )
-+#if( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 && LIBGIT2_VER_REVISION <= 3)
-     // For libgit2 version 1.8.0 and above
-     git_commit* const parents_ptr[2] {parents[0].get(), parents[1].get()};
- #else
-@@ -1870,7 +1870,7 @@ ConversationRepository::Impl::commit(const std::string& msg, bool verifyDevice)
- 
-     git_buf to_sign = {};
-     // Check if the libgit2 library version is 1.8.0 or higher
--#if( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 )
-+#if( LIBGIT2_VER_MAJOR > 1 ) || ( LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR >= 8 && LIBGIT2_VER_REVISION <= 3)
-     // For libgit2 version 1.8.0 and above
-     git_commit* const head_ref[1] = {head_commit.get()};
- #else
-- 
2.49.0