Subject: Re: [bug#74256] [PATCH V2 2/2] gnu: Add sdbus-c++-1.4.0.

From: John Kehayias <[email-masked]>
Date: Thu, 02 Jan 2025 05:55:51 +0000

Followup patch to add older sdbus-c++ for libjami.

Note: my first email with my v2 of the original patch bounced on trying
to reach the original author: "Host found but no data record of
requested type" error. Will still include in the CC here though.
From e1a3c490d2f54779b6c48ff626b895f381c90cd0 Mon Sep 17 00:00:00 2001
Message-ID: <e1a3c[email-masked]>
In-Reply-To: <63e20[email-masked]>
References: <63e20[email-masked]>
From: John Kehayias <[email-masked]>
Date: Wed, 1 Jan 2025 18:04:05 -0500
Subject: [PATCH 2/2] gnu: Add sdbus-c++-1.4.0.

* gnu/packages/glib.scm (sdbus-c++-1.4.0): New variable.
* gnu/packages/jami.scm (libjami)[inputs]: Replace sdbus-c++ with
sdbus-c++-1.4.0.

Change-Id: Idb189f80212351cef6b5c8722982880bf5b51fe9
---
 gnu/packages/glib.scm | 34 ++++++++++++++++++++++++++++++++++
 gnu/packages/jami.scm |  2 +-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 71e1fde36d..e3ab6d7641 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1339,6 +1339,40 @@ (define-public sdbus-c++
 of abstraction on top of @code{sd-bus}, the C D-Bus implementation by systemd.")
     (license license:lgpl2.1+)))
 
+;; TODO: Remove once libjami can use newer sdbus-c++.
+(define-public sdbus-c++-1.4.0
+  (package
+    (inherit sdbus-c++)
+    (name "sdbus-c++")
+    (version "1.4.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/Kistler-Group/sdbus-cpp")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "111l2rl0pg9r5cdrhqpac4v22cnq41skxxfk3cng81l0n05v1sh0"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments sdbus-c++)
+       ((#:configure-flags flags ''())
+        #~(list "-DBUILD_CODE_GEN=ON"
+                "-DBUILD_TESTS=ON"
+                ;; Do not install tests.
+                "-DTESTS_INSTALL_PATH=/tmp"
+                "-DCMAKE_VERBOSE_MAKEFILE=ON"))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'fix-elogind-requirement
+              (lambda _
+                ;; sdbus-c++.pc requires 'elogind', but it should
+                ;; require 'libelogind'. Fixed after 1.4.0 with
+                ;; fb9e4ae37152648a67814458d3ff673b1d3ca089
+                (substitute* "pkgconfig/sdbus-c++.pc.in"
+                  (("@LIBSYSTEMD@")
+                   "libelogind"))))))))))
+
 (define-public appstream-glib
   (package
     (name "appstream-glib")
diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index 25510b9df5..db45c9973e 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -215,7 +215,7 @@ (define-public libjami
            openssl
            pjproject-jami
            pulseaudio
-           sdbus-c++
+           sdbus-c++-1.4.0
            speex
            speexdsp
            webrtc-audio-processing/jami
-- 
2.47.1