From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yDYPLgy232Rx5AAASxT56A (envelope-from ) for ; Fri, 18 Aug 2023 20:18:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8APKLQy232SKWAAA9RJhRA (envelope-from ) for ; Fri, 18 Aug 2023 20:18:52 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 37A3051EF9 for ; Fri, 18 Aug 2023 20:18:52 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=lqZZ8OfF; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692382732; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=HJPH7Ram9yeMh7JqKQ+YPobXECYmATH2tFwZ7FzTY7U=; b=d81CkiwsyjGex8PnO9ym2CcrrTJg1MZLMtceSGBVtgaLg6Tjcmhovo1EQosz0793LHYVDj KXzrx+1DQe43jRJ+n8KfIxluYO0xlJXwumy0iRFVzYMkM17aSnUu4GdP3rR/ZFk0w1EWpL TzhSC84RpXxz9yIp+0O5zh6+w1HV6I+KBwgeWm3gea7qZEwKWX34P1fgX7MYEHpMz0hrkc mwanvVVFvc+f3ROBaFhwN+Xqbin0b55z90XbiDRRimZFTn3xIQ8e8kjfO6Dz+MV+UnMPKU mHpu8vmO3Mmyb0pDyM97Nee7+FalgsyrEq2c/YOtCZdhwc4xEmIt5HKo1VO5yA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692382732; a=rsa-sha256; cv=none; b=aCpEayf6HoD9/9RjHfiVN20ydhPK/mQCHiDpcNmMfX2390kt4zRBJIchD9nia9Z11cKAfr jwV3tjQiqsDbNWyi4Lr5RGNIWSF8pIil6oVVJf2bMChb2hcJKhcQwzMfh09+bo9iWi7Vsj ru7G3sSsNEqnintCyscmLSymbIovMA3A4mKW6hHVMlQGXBXnCbal7gDXk4ObUDqNrrB+zo fwQGrDbeOD1TsUnqj9SAhq/hZDEEO3hGv94F2PSwt2SXKDuZnRTGQkDuRCSJuzCvDSa+FW Kt7EIqKQrSN4nsFII3aNaYOala2DYoPNLWFlsTm/ao4EjX/amcB7iH9rWLtiBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=lqZZ8OfF; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX42z-0006m6-2k; Fri, 18 Aug 2023 14:18:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qX42v-0006jp-7k for guix-patches@gnu.org; Fri, 18 Aug 2023 14:18:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX42u-0000Kt-Ve for guix-patches@gnu.org; Fri, 18 Aug 2023 14:18:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qX42u-0003FI-3S; Fri, 18 Aug 2023 14:18:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65371] [PATCH telephony-team 06/10] gnu: Add sdbus-cpp. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, rg@raghavgururajan.name, guix-patches@gnu.org Resent-Date: Fri, 18 Aug 2023 18:18:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65371@debbugs.gnu.org Cc: Maxim Cournoyer , Liliana Marie Prikler , Maxim Cournoyer , Raghav Gururajan X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Raghav Gururajan Received: via spool by 65371-submit@debbugs.gnu.org id=B65371.169238264112346 (code B ref 65371); Fri, 18 Aug 2023 18:18:04 +0000 Received: (at 65371) by debbugs.gnu.org; 18 Aug 2023 18:17:21 +0000 Received: from localhost ([127.0.0.1]:48723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qX42C-0003Cy-Sb for submit@debbugs.gnu.org; Fri, 18 Aug 2023 14:17:21 -0400 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]:56469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qX429-0003C2-Sr for 65371@debbugs.gnu.org; Fri, 18 Aug 2023 14:17:18 -0400 Received: by mail-qt1-x82c.google.com with SMTP id d75a77b69052e-40ffbc3488eso7830941cf.0 for <65371@debbugs.gnu.org>; Fri, 18 Aug 2023 11:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692382631; x=1692987431; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HJPH7Ram9yeMh7JqKQ+YPobXECYmATH2tFwZ7FzTY7U=; b=lqZZ8OfFLTI8kWZSMvrGrzS+s0pVtqSi/guo6S7187io1MHvJQoHogtKnls8Eqbtar mTnY2E5C50IcRIjt4rHLKBjIkpnwYDg1Ti1KmwQPH1jumg/3TGUo0We7KwQVCxGrZuSw liNAVPfn343WeaYap79wX04erCnhUZyo1xkFtOettuKzBq3xExPrhRT7wuZJF/czQMn6 gBr9kG/VhWJWVOkMFpbzQvqRDMyF9rXUZs2Lyjvnb0PBBpa3i8naEBl3sCbcw/m4R5f+ HitIn4O6oHmVTYw0/NVRgJJSBJT1zvp+TuK/bj+xCEpBdlt2CugUkUEPj9sGcIU/19iL A0RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692382631; x=1692987431; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HJPH7Ram9yeMh7JqKQ+YPobXECYmATH2tFwZ7FzTY7U=; b=f2R9GKykAkIDPRrZMxhJBmm0Xwp1h57w4sIjhvl0yiPRLtWDnwixjS8V5LsOCKhbiX y8lakkbeaBbPZxMA4Ov2uS5pGVvt509eE3wSsRwNDoay4nrjmpDhz/NodqO0zAvkXfsR 1lbG6BfbR4oajE32qdKGHcDNdEOEAybSiVWKJ/dv1/ey5VtSp3Bhh4Sc2bOqebRFIzDW 5hwGAoqoXA6Ri0zglI07ONi3ApwODGZyZOJ2FAESRvMjp49GJuf73kjUhT8DI6HAHS4F KrffXFbX8QQpq95PJSg+JKYGanX0ma4vrRkZO9+zyckqzPMX8kCBxwUOK/Bt6alDHm+B 06cw== X-Gm-Message-State: AOJu0YyEyeX/gvHWjDfEtzxVx5KHw+0ztRikfnktHjWXNvHyiT5TQO14 07VpC3YmDv0cAWlBjTgXyzmGR+E4+V/q0Q== X-Google-Smtp-Source: AGHT+IEqiPHbC8tsu+fOvo+h+1FL50TEnm4WpUj3HN9hhilGcNsr4L41ecxFk7NCeO+nJ4QpJkxHtw== X-Received: by 2002:ac8:5a8b:0:b0:40f:c5ac:8e1d with SMTP id c11-20020ac85a8b000000b0040fc5ac8e1dmr3579123qtc.55.1692382631394; Fri, 18 Aug 2023 11:17:11 -0700 (PDT) Received: from localhost.localdomain (dsl-205-233-124-239.b2b2c.ca. [205.233.124.239]) by smtp.gmail.com with ESMTPSA id z5-20020ac84305000000b00403e80cad67sm687678qtm.41.2023.08.18.11.17.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 11:17:10 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 18 Aug 2023 14:12:57 -0400 Message-ID: <7cd1d20fbbb1cf9c620748e22bdfef7feb83ff72.1692382380.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.10 X-Spam-Score: -3.10 X-Migadu-Queue-Id: 37A3051EF9 X-Migadu-Scanner: mx1.migadu.com X-TUID: eNYi33OzYlv5 * gnu/packages/glib.scm (sdbus-cpp): New variable. * gnu/packages/patches/sdbus-c++-elogind.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/glib.scm | 43 +++++++++++++ gnu/packages/patches/sdbus-c++-elogind.patch | 63 ++++++++++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 gnu/packages/patches/sdbus-c++-elogind.patch diff --git a/gnu/local.mk b/gnu/local.mk index abe8964f4d..de669c1177 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1938,6 +1938,7 @@ dist_patch_DATA = \ %D%/packages/patches/scons-test-environment.patch \ %D%/packages/patches/screen-hurd-path-max.patch \ %D%/packages/patches/scsh-nonstring-search-path.patch \ + %D%/packages/patches/sdbus-c++-elogind.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seed-webkit.patch \ %D%/packages/patches/sendgmail-accept-ignored-gsuite-flag.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index a0b85b15d1..588133e93f 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -1290,6 +1290,49 @@ (define-public dbus-cxx (home-page "https://dbus-cxx.github.io/") (license license:gpl3))) +(define-public sdbus-c++ + ;; Use the latest commit, which includes unreleased fixes to the pkg-config + ;; file. + (let ((commit "3e84b254e9603935cb5fc180c4d2214d7024ccbb") + (revision "0")) + (package + (name "sdbus-c++") + (version (git-version "1.2.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Kistler-Group/sdbus-cpp") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0xrcp49almi3kwzmwcwv8sayqjxx8m55s5grxarw2hl9jmghwlc3")) + (patches (search-patches "sdbus-c++-elogind.patch")))) + (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"))))))) + (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+)))) + (define-public appstream-glib (package (name "appstream-glib") diff --git a/gnu/packages/patches/sdbus-c++-elogind.patch b/gnu/packages/patches/sdbus-c++-elogind.patch new file mode 100644 index 0000000000..d01838edbc --- /dev/null +++ b/gnu/packages/patches/sdbus-c++-elogind.patch @@ -0,0 +1,63 @@ +Submitted upstream: https://github.com/Kistler-Group/sdbus-cpp/pull/352 + +From 8423c44b6c24ebd59db06ad33704265aa81a1c7a Mon Sep 17 00:00:00 2001 +From: Sven Eden +Date: Thu, 17 Aug 2023 23:16:19 -0400 +Subject: [PATCH] build: Add support for elogind. + +* CMakeLists.txt: Fallback to elogind when libsystemd could not be +found. Set LIBSYSTEMD variable. +* pkgconfig/sdbus-c++.pc.in (Description): Parameterize with above +LIBSYSTEMD variable. + +Signed-off-by: Maxim Cournoyer +--- + CMakeLists.txt | 11 +++++++++++ + pkgconfig/sdbus-c++.pc.in | 2 +- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 94f71c7..40c15f8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,11 +12,22 @@ include(GNUInstallDirs) # Installation directories for `install` command and pkg + # PERFORMING CHECKS & PREPARING THE DEPENDENCIES + #------------------------------- + ++set(LIBSYSTEMD "libsystemd") ++ + option(BUILD_LIBSYSTEMD "Build libsystemd static library and incorporate it into libsdbus-c++" OFF) + + if(NOT BUILD_LIBSYSTEMD) + find_package(PkgConfig REQUIRED) + pkg_check_modules(Systemd IMPORTED_TARGET GLOBAL libsystemd>=236) ++ if(NOT TARGET PkgConfig::Systemd) ++ message(WARNING "libsystemd not found, checking for libelogind instead") ++ pkg_check_modules(Systemd IMPORTED_TARGET GLOBAL libelogind>=236) ++ if(TARGET PkgConfig::Systemd) ++ set(LIBSYSTEMD "libelogind") ++ string(REPLACE "." ";" VERSION_LIST ${Systemd_VERSION}) ++ list(GET VERSION_LIST 0 Systemd_VERSION) ++ endif() ++ endif() + if(NOT TARGET PkgConfig::Systemd) + message(FATAL_ERROR "libsystemd of version at least 236 is required, but was not found " + "(if you have systemd in your OS, you may want to install package containing pkgconfig " +diff --git a/pkgconfig/sdbus-c++.pc.in b/pkgconfig/sdbus-c++.pc.in +index 6ad010a..0703476 100644 +--- a/pkgconfig/sdbus-c++.pc.in ++++ b/pkgconfig/sdbus-c++.pc.in +@@ -5,7 +5,7 @@ includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + + Name: @PROJECT_NAME@ + Description: C++ library on top of sd-bus, a systemd D-Bus library +-Requires@PKGCONFIG_REQS@: libsystemd ++Requires@PKGCONFIG_REQS@: @LIBSYSTEMD@ + Version: @SDBUSCPP_VERSION@ + Libs: -L${libdir} -l@PROJECT_NAME@ + Cflags: -I${includedir} + +base-commit: 3e84b254e9603935cb5fc180c4d2214d7024ccbb +-- +2.41.0 + -- 2.41.0