Subject: Re: [bug#74256] [PATCH V2 1/2] gnu: sdbus-c++: Update to 2.0.0.

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

Hello,

On Sun, Dec 29, 2024 at 11:57 PM, Ludovic Courtès wrote:

> Hi,
>
> Sisiutl <[email-masked]> skribis:
>
>> * gnu/packages/glib.scm (sdbus-c++): Update to 2.0.0.
>>
>> Change-Id: I7f2fb86e72fc536fe2fb92672fc38d2444b1bbb5
>

I was just looking to update this package as well (to add hypridle, an
idle helper for the Hyprland compositor system). I tried to go to the
latest version but I think it needs a newer googletest (there is a
pending patch for it) which will require a branch for rebuilding.

> Sorry for the logn delay.
>
> Building fails with:
>
> starting phase `check'
> make: *** No rule to make target 'sdbus-c++-unit-tests'.  Stop.
>
> Test suite failed, dumping logs.
> error: in phase 'check': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("sdbus-c++-unit-tests" "-j" "4") exit-status: 2 term-signal: #f stop-signal: #f>
> phase `check' failed after 0.0 seconds
> command "make" "sdbus-c++-unit-tests" "-j" "4" failed with status 2
> build process 6 exited with status 256
>
> Could you take a look?
>

The problem is the configure flags changed and now have a prefix of
"SDBUSCPP_" (note the extra underscores in the original patch here).
Also, the underscore was removed in "CODE_GEN".

I fixed this in the v2 patch (attached) and would have just pushed it,
but found out that libjami fails to build with this update (the other
dependent xdg-desktop-portal-hyprland also fails but is fixed with a
trivial version update).

I didn't see an easier way than just adding back the older sdbus-c++
version for use by libjami, in a followup patch in the next email. Since
this is a less trivial change I send it for review here.

> Thanks,
> Ludo’.

Thanks both!
John
From 63e209d7f6d0faf41852a8c889d23d7bcc8459e7 Mon Sep 17 00:00:00 2001
Message-ID: <63e20[email-masked]>
From: Sisiutl <[email-masked]>
Date: Fri, 8 Nov 2024 13:30:43 +0100
Subject: [PATCH 1/2] gnu: sdbus-c++: Update to 2.0.0.

* gnu/packages/glib.scm (sdbus-c++): Update to 2.0.0.
[arguments]<#:configure-flags>: Update to upstream names, prefixing with
"SDBUSCPP_" and changing "CODE_GEN" to "CODEGEN".
<#:phases>: Remove fix-elogind-requirement phase (no longer needed).

Change-Id: I7f2fb86e72fc536fe2fb92672fc38d2444b1bbb5
Signed-off-by: John Kehayias <[email-masked]>
Co-authored-by: John Kehayias <[email-masked]>
---
 gnu/packages/glib.scm | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 0effc87f45..71e1fde36d 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1301,11 +1301,9 @@ (define-public dbus-cxx
     (license (list license:lgpl3+ license:bsd-3)))) ;dual licensed
 
 (define-public sdbus-c++
-  ;; Use the latest commit, which includes unreleased fixes to the pkg-config
-  ;; file.
   (package
     (name "sdbus-c++")
-    (version "1.4.0")
+    (version "2.0.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1314,31 +1312,23 @@ (define-public sdbus-c++
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "111l2rl0pg9r5cdrhqpac4v22cnq41skxxfk3cng81l0n05v1sh0"))))
+                "1s6vhzln0rvac2r3v8nq08hsjhyz3y46fsy18i23ppjm30apkiav"))))
     (build-system cmake-build-system)
     (arguments
      (list
       ;; Avoid the integration test, which requires a system bus.
       #:test-target "sdbus-c++-unit-tests"
-      #:configure-flags #~(list "-DBUILD_CODE_GEN=ON"
-                                "-DBUILD_TESTS=ON"
+      #:configure-flags #~(list "-DSDBUSCPP_BUILD_CODEGEN=ON"
+                                "-DSDBUSCPP_BUILD_TESTS=ON"
                                 ;; Do not install tests.
-                                "-DTESTS_INSTALL_PATH=/tmp"
+                                "-DSDBUSCPP_TESTS_INSTALL_PATH=/tmp"
                                 "-DCMAKE_VERBOSE_MAKEFILE=ON")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'do-not-install-tests
             (lambda _
               (substitute* "tests/CMakeLists.txt"
-                (("/etc/dbus-1/system.d") "/tmp"))))
-          (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")))))))
+                (("/etc/dbus-1/system.d") "/tmp")))))))
     (native-inputs (list googletest pkg-config))
     (inputs (list expat))
     (propagated-inputs (list elogind)) ;required by sdbus-c++.pc

base-commit: ce44a0922979d2ade902638afb9b0d28b160def0
-- 
2.47.1