guix_mirror_bot pushed a commit to branch master
in repository guix.

commit ca15e63490188996496d83aebc2b1a566c412c03
Author: Maxim Cournoyer <ma...@guixotic.coop>
AuthorDate: Mon Jul 21 22:47:10 2025 +0900

    gnu: jami: Fix build.
    
    The unittests were now failing to build with GCC 14 (see:
    <https://git.jami.net/savoirfairelinux/jami-daemon/-/issues/1144>).
    
    * gnu/packages/patches/jami-unittests-fix-build.patch: New patch.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/jami.scm (jami) [source]: Apply it.
    
    Change-Id: I11eb97663bb28a4153b2459ea886658cf08b6129
---
 gnu/local.mk                                       |  1 +
 gnu/packages/jami.scm                              |  3 +-
 .../patches/jami-unittests-fix-build.patch         | 46 ++++++++++++++++++++++
 3 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index e1b2003842..c383ffa7d8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1646,6 +1646,7 @@ dist_patch_DATA =                                         
\
   %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       \
diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index e5a0798991..34e95ceff4 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -242,7 +242,8 @@ QSortFilterProxyModel conveniently exposed for QML.")
                         "jami-qwindowkit.patch"
                         "jami-skip-tests-requiring-internet.patch"
                         "jami-tests-qtwebengine-ifdef-to-if.patch"
-                        "jami-unbundle-dependencies.patch"))))
+                        "jami-unbundle-dependencies.patch"
+                        "jami-unittests-fix-build.patch"))))
     (build-system qt-build-system)
     (outputs '("out" "debug"))
     (arguments
diff --git a/gnu/packages/patches/jami-unittests-fix-build.patch 
b/gnu/packages/patches/jami-unittests-fix-build.patch
new file mode 100644
index 0000000000..c39be41c2b
--- /dev/null
+++ b/gnu/packages/patches/jami-unittests-fix-build.patch
@@ -0,0 +1,46 @@
+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;
+ };
+ 
+ /*!

Reply via email to