From 33fa8fd0d0b2291a28d7967c4e214378ae1401e8 Mon Sep 17 00:00:00 2001 From: Sisiutl Date: Fri, 8 Nov 2024 13:30:43 +0100 Subject: [PATCH] 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). * 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 Signed-off-by: John Kehayias Co-authored-by: John Kehayias --- gnu/packages/glib.scm | 93 +++++++++++++++++++++++++++---------------- gnu/packages/jami.scm | 2 +- 2 files changed, 60 insertions(+), 35 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 0effc87f45..e04eedb7ba 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -22,6 +22,7 @@ ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Remco van 't Veer ;;; Copyright © 2024 dan +;;; Copyright © 2025 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -1301,9 +1302,48 @@ Some codes examples can be find at: (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 "2.0.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 + "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 "-DSDBUSCPP_BUILD_CODEGEN=ON" + "-DSDBUSCPP_BUILD_TESTS=ON" + ;; Do not install tests. + "-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"))))))) + (native-inputs (list googletest pkg-config)) + (inputs (list expat)) + (propagated-inputs (list elogind)) ;required by sdbus-c++.pc + (home-page "https://github.com/Kistler-Group/sdbus-cpp") + (synopsis "High-level C++ D-Bus library") + (description "@code{sdbus-c++} is a high-level C++ D-Bus library designed +to provide easy-to-use yet powerful API in modern C++. It adds another layer +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 @@ -1315,39 +1355,24 @@ Some codes examples can be find at: (sha256 (base32 "111l2rl0pg9r5cdrhqpac4v22cnq41skxxfk3cng81l0n05v1sh0")))) - (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" - ;; Do not install tests. - "-DTESTS_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"))))))) - (native-inputs (list googletest pkg-config)) - (inputs (list expat)) - (propagated-inputs (list elogind)) ;required by sdbus-c++.pc - (home-page "https://github.com/Kistler-Group/sdbus-cpp") - (synopsis "High-level C++ D-Bus library") - (description "@code{sdbus-c++} is a high-level C++ D-Bus library designed -to provide easy-to-use yet powerful API in modern C++. It adds another layer -of abstraction on top of @code{sd-bus}, the C D-Bus implementation by systemd.") - (license license:lgpl2.1+))) + (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 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 @@ openssl pjproject-jami pulseaudio - sdbus-c++ + sdbus-c++-1.4.0 speex speexdsp webrtc-audio-processing/jami