From nobody Sat Sep 23 01:16:45 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rsrnp0WKvz4tm2b; Sat, 23 Sep 2023 01:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rsrnp03Vzz3KP2; Sat, 23 Sep 2023 01:16:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695431806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3/lKeSvUBqniEsZ/ED2j9rfyhWypO34FqG1a/UWM/g=; b=c3VOPXuVJqsNUPFrxW6NyMLDnau3N80tDytiINMBwWGslOKjNY2AcvQ4hqS4i5MlywXYpf vfG/2dmKpjIRAxp4uet08Fcl1oJf31tDq4OEftxMHXlwni3eioiqsR+0rXjXYWtxfMn9pg ibB+yvIzaLFF1eDMh85K1eYObMkL+ON1U0capup0YW/PwtFcbyTE4M/M+jhwTQqT+UOSVh 26Zez/log6Z5qAQtvNcV9PAjgAZk3WPt0YARUNTycbp2PMy285qwsaXZU0cTuI4Rq3UPId uJtOhH9GKTWFXpshV9PmZYsdcEhAbELhzzkzG8HSs6cAc2sPVG64Qj1rpVxl6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695431806; a=rsa-sha256; cv=none; b=RDgjMVICQcYrpDzcxdqA5MYkW0dUt6yWI//UgdkO2w9XiONc3QjfjXUIu/+doX7OvYnByA 3GmCQj/sZbeDdwAK7vsILS74TJThVDPht6STOHu8bf3noBNSSEbg9ppaCojRGErKnWZnVZ 1Dzs42iy0b6ZND0Wd2aBLFEvfclA6eWQKtfzoLVYz06GRDoQDRD+0QIqD93bnvrATPYjot Gq3YWZ+0oiRXvgnjC5gPAVEs4OqzNIP4AbJHLWJjJUjns5/f7QoKq+MLLnhOPqo2Ce5vM6 lha3P6NMk3LFcNNFJ+dI9Kyi7o9+HbjuqcK09Cy/xykuUOBgWDXmso5pvHh2Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695431806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3/lKeSvUBqniEsZ/ED2j9rfyhWypO34FqG1a/UWM/g=; b=DRBQ2/qdRORx30JBsamiGvmG3fd+ePIYBX6Zd+rzh5I9Op06dAG96ZItcU0PBqBvZA8qkY MDpu3Lm9+opAFexySqoT+mWNh6hcGobUH1/VUypbwt3v/CJjpzz6we+iFQI6nfeKNd5oMZ PPQ4xhmyStVkURZV7+5pgNtEEU/4zKCNGUYibCChTyKwEUhbBuKjnuTypSz0yfk/kls38N 1Wu3JCrz4SHsbo7QNnhdbG8eQF2cXkyZTXrQvECMTt/0y16aKURAj97IYohudbz22jWdeN kMBCkEArdtsVUMjwpQRkVdAjq48ugIT3VWbZqsg3nmZw2eHdPNAmxedrwb1ctw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rsrnn631Bzl1g; Sat, 23 Sep 2023 01:16:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38N1GjR8092219; Sat, 23 Sep 2023 01:16:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38N1GjnG092216; Sat, 23 Sep 2023 01:16:45 GMT (envelope-from git) Date: Sat, 23 Sep 2023 01:16:45 GMT Message-Id: <202309230116.38N1GjnG092216@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Jan Beich Subject: git: 27e43ce40d2d - 2023Q3 - devel/sdbus-cpp: improve basu support List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/2023Q3 X-Git-Reftype: branch X-Git-Commit: 27e43ce40d2d77a623219eff26f02f5384ebe1eb Auto-Submitted: auto-generated The branch 2023Q3 has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=27e43ce40d2d77a623219eff26f02f5384ebe1eb commit 27e43ce40d2d77a623219eff26f02f5384ebe1eb Author: Jan Beich AuthorDate: 2023-09-05 08:30:03 +0000 Commit: Jan Beich CommitDate: 2023-09-23 01:14:55 +0000 devel/sdbus-cpp: improve basu support - Enable LIBSYSTEMD_VERSION>=240 code - Avoid breaking libsystemd support (cherry picked from commit 24ffa701a8b0a7896202c33e6419af161b823434) --- devel/sdbus-cpp/Makefile | 1 + devel/sdbus-cpp/files/patch-basu | 234 +++++++++++++++++++++++++-------------- 2 files changed, 150 insertions(+), 85 deletions(-) diff --git a/devel/sdbus-cpp/Makefile b/devel/sdbus-cpp/Makefile index 84e2c4ba2054..b80a4ce59a77 100644 --- a/devel/sdbus-cpp/Makefile +++ b/devel/sdbus-cpp/Makefile @@ -1,6 +1,7 @@ PORTNAME= sdbus-cpp DISTVERSIONPREFIX= v DISTVERSION= 1.3.0 +PORTREVISION= 2 CATEGORIES= devel MAINTAINER= jbeich@FreeBSD.org diff --git a/devel/sdbus-cpp/files/patch-basu b/devel/sdbus-cpp/files/patch-basu index 6688ad309939..79391ccc797b 100644 --- a/devel/sdbus-cpp/files/patch-basu +++ b/devel/sdbus-cpp/files/patch-basu @@ -1,224 +1,288 @@ libsystemd is Linux-only, so replace with basu ---- CMakeLists.txt.orig 2021-12-22 12:17:31 UTC +--- CMakeLists.txt.orig 2023-08-20 09:45:44 UTC +++ CMakeLists.txt -@@ -16,7 +16,7 @@ option(BUILD_LIBSYSTEMD "Build libsystemd static libra - - if(NOT BUILD_LIBSYSTEMD) - find_package(PkgConfig REQUIRED) -- pkg_check_modules(Systemd IMPORTED_TARGET GLOBAL libsystemd>=236) -+ pkg_check_modules(Systemd IMPORTED_TARGET GLOBAL basu) - 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 " -@@ -25,8 +25,7 @@ if(NOT BUILD_LIBSYSTEMD) - "and incorporate libsystemd as embedded library within sdbus-c++)") +@@ -26,6 +26,11 @@ if(NOT BUILD_LIBSYSTEMD) + set(LIBSYSTEMD "libelogind") + string(REPLACE "." ";" VERSION_LIST ${Systemd_VERSION}) + list(GET VERSION_LIST 0 Systemd_VERSION) ++ else() ++ pkg_check_modules(Systemd IMPORTED_TARGET GLOBAL basu) ++ set(LIBSYSTEMD "basu") ++ # https://git.sr.ht/~emersion/basu/commit/d4d185d29a26 ++ set(Systemd_VERSION "240") + endif() endif() - add_library(Systemd::Libsystemd ALIAS PkgConfig::Systemd) -- string(REGEX MATCHALL "([0-9]+)" SYSTEMD_VERSION_LIST "${Systemd_VERSION}") -- list(GET SYSTEMD_VERSION_LIST 0 LIBSYSTEMD_VERSION) -+ set(LIBSYSTEMD_VERSION "239") - message(STATUS "Building with libsystemd v${LIBSYSTEMD_VERSION}") - else() - # Build static libsystemd library as an external project ---- pkgconfig/sdbus-c++.pc.in.orig 2021-10-25 07:02:37 UTC -+++ pkgconfig/sdbus-c++.pc.in -@@ -5,7 +5,7 @@ Description: C++ library on top of sd-bus, a systemd D - - Name: @PROJECT_NAME@ - Description: C++ library on top of sd-bus, a systemd D-Bus library --Requires: libsystemd -+Requires: basu - Version: @SDBUSCPP_VERSION@ - Libs: -L${libdir} -l@PROJECT_NAME@ - Cflags: -I${includedir} ---- src/Connection.cpp.orig 2021-10-25 07:02:37 UTC + if(NOT TARGET PkgConfig::Systemd) +--- src/Connection.cpp.orig 2023-08-20 09:45:44 UTC +++ src/Connection.cpp -@@ -30,7 +30,7 @@ +@@ -31,7 +31,13 @@ #include #include #include "ScopeGuard.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include #include #include ---- src/Connection.h.orig 2021-10-25 07:02:37 UTC +--- src/Connection.h.orig 2023-08-20 09:45:44 UTC +++ src/Connection.h -@@ -32,7 +32,7 @@ +@@ -32,7 +32,13 @@ #include "IConnection.h" #include "ScopeGuard.h" #include "ISdBus.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include #include #include ---- src/Error.cpp.orig 2021-10-25 07:02:37 UTC +--- src/Error.cpp.orig 2023-08-20 09:45:44 UTC +++ src/Error.cpp -@@ -25,7 +25,7 @@ +@@ -25,7 +25,13 @@ */ #include --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include "ScopeGuard.h" namespace sdbus ---- src/Flags.cpp.orig 2021-10-25 07:02:37 UTC +--- src/Flags.cpp.orig 2023-08-20 09:45:44 UTC +++ src/Flags.cpp -@@ -25,7 +25,7 @@ +@@ -25,7 +25,13 @@ */ #include --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif namespace sdbus { ---- src/IConnection.h.orig 2022-08-09 07:50:33 UTC +--- src/IConnection.h.orig 2023-08-20 09:45:44 UTC +++ src/IConnection.h -@@ -28,7 +28,7 @@ +@@ -28,7 +28,13 @@ #define SDBUS_CXX_INTERNAL_ICONNECTION_H_ #include --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include #include #include ---- src/ISdBus.h.orig 2021-10-25 07:02:37 UTC +--- src/ISdBus.h.orig 2023-08-20 09:45:44 UTC +++ src/ISdBus.h -@@ -28,7 +28,7 @@ +@@ -28,7 +28,13 @@ #ifndef SDBUS_CXX_ISDBUS_H #define SDBUS_CXX_ISDBUS_H --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif namespace sdbus::internal { ---- src/Message.cpp.orig 2021-10-25 07:02:37 UTC +--- src/Message.cpp.orig 2023-08-20 09:45:44 UTC +++ src/Message.cpp -@@ -31,7 +31,7 @@ +@@ -31,7 +31,13 @@ #include "ISdBus.h" #include "IConnection.h" #include "ScopeGuard.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include namespace sdbus { ---- src/Object.cpp.orig 2021-10-25 07:02:37 UTC +--- src/Object.cpp.orig 2023-08-20 09:45:44 UTC +++ src/Object.cpp -@@ -34,7 +34,7 @@ - #include "ScopeGuard.h" +@@ -35,7 +35,13 @@ #include "IConnection.h" + #include "Utils.h" #include "VTableUtils.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include #include ---- src/Object.h.orig 2021-10-25 07:02:37 UTC +--- src/Object.h.orig 2023-08-20 09:45:44 UTC +++ src/Object.h -@@ -29,7 +29,7 @@ +@@ -29,7 +29,13 @@ #include #include "IConnection.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include #include #include ---- src/Proxy.cpp.orig 2021-10-25 07:02:37 UTC +--- src/Proxy.cpp.orig 2023-08-20 09:45:44 UTC +++ src/Proxy.cpp -@@ -31,7 +31,7 @@ +@@ -32,7 +32,13 @@ #include "sdbus-c++/IConnection.h" #include "sdbus-c++/Error.h" #include "ScopeGuard.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include #include #include ---- src/Proxy.h.orig 2021-10-25 07:02:37 UTC +--- src/Proxy.h.orig 2023-08-20 09:45:44 UTC +++ src/Proxy.h -@@ -29,7 +29,7 @@ +@@ -29,7 +29,13 @@ #include #include "IConnection.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include #include #include ---- src/SdBus.cpp.orig 2021-10-25 07:02:37 UTC +--- src/SdBus.cpp.orig 2023-08-20 09:45:44 UTC +++ src/SdBus.cpp -@@ -178,7 +178,8 @@ int SdBus::sd_bus_open_system(sd_bus **ret) +@@ -224,7 +224,12 @@ int SdBus::sd_bus_open_system_remote(sd_bus **ret, con int SdBus::sd_bus_open_system_remote(sd_bus **ret, const char *host) { -- return ::sd_bus_open_system_remote(ret, host); ++#if __has_include() || __has_include() + return ::sd_bus_open_system_remote(ret, host); ++#else + // Removed in https://git.sr.ht/~emersion/basu/commit/01d33b244eb6 + return -EOPNOTSUPP; ++#endif } int SdBus::sd_bus_request_name(sd_bus *bus, const char *name, uint64_t flags) ---- src/Types.cpp.orig 2021-10-25 07:02:37 UTC +--- src/Types.cpp.orig 2023-08-20 09:45:44 UTC +++ src/Types.cpp -@@ -27,7 +27,7 @@ +@@ -27,7 +27,13 @@ #include #include #include "MessageUtils.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include namespace sdbus { ---- src/Utils.h.orig 2022-08-09 07:50:33 UTC +--- src/Utils.h.orig 2023-08-20 09:45:44 UTC +++ src/Utils.h -@@ -28,7 +28,7 @@ +@@ -28,7 +28,13 @@ #define SDBUS_CXX_INTERNAL_UTILS_H_ #include --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #if LIBSYSTEMD_VERSION>=246 #define SDBUS_CHECK_OBJECT_PATH(_PATH) \ ---- src/VTableUtils.c.orig 2021-10-25 07:02:37 UTC +--- src/VTableUtils.c.orig 2023-08-20 09:45:44 UTC +++ src/VTableUtils.c -@@ -25,7 +25,7 @@ +@@ -25,7 +25,13 @@ */ #include "VTableUtils.h" --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif sd_bus_vtable createVTableStartItem(uint64_t flags) { ---- src/VTableUtils.h.orig 2021-10-25 07:02:37 UTC +--- src/VTableUtils.h.orig 2023-08-20 09:45:44 UTC +++ src/VTableUtils.h -@@ -27,7 +27,7 @@ +@@ -27,7 +27,13 @@ #ifndef SDBUS_CXX_INTERNAL_VTABLEUTILS_H_ #define SDBUS_CXX_INTERNAL_VTABLEUTILS_H_ --#include ++#if __has_include() + #include ++#elif __has_include() ++#include ++#else +#include ++#endif #include #ifdef __cplusplus ---- tests/integrationtests/DBusStandardInterfacesTests.cpp.orig 2021-10-25 07:02:37 UTC +--- tests/integrationtests/DBusStandardInterfacesTests.cpp.orig 2023-08-20 09:45:44 UTC +++ tests/integrationtests/DBusStandardInterfacesTests.cpp -@@ -65,8 +65,8 @@ TEST_F(SdbusTestObject, AnswersMachineUuidViaPeerInter +@@ -65,8 +65,14 @@ TEST_F(SdbusTestObject, AnswersMachineUuidViaPeerInter // a non-systemd Linux), org.freedesktop.DBus.Peer.GetMachineId() will not work. To solve // this, you can create /etc/machine-id yourself as symlink to /var/lib/dbus/machine-id, // and then org.freedesktop.DBus.Peer.GetMachineId() will start to work. -- if (::access("/etc/machine-id", F_OK) == -1) -- GTEST_SKIP() << "/etc/machine-id file does not exist, GetMachineId() will not work"; -+ if (::access("/var/lib/dbus/machine-id", F_OK) == -1) -+ GTEST_SKIP() << "/var/lib/dbus/machine-id file does not exist, GetMachineId() will not work"; ++#if __has_include() + if (::access("/etc/machine-id", F_OK) == -1) + GTEST_SKIP() << "/etc/machine-id file does not exist, GetMachineId() will not work"; ++#else ++ if (::access("/etc/machine-id", F_OK) == -1 && ++ ::access("/var/lib/dbus/machine-id", F_OK) == -1) ++ GTEST_SKIP() << "/etc/machine-id and /var/lib/dbus/machine-id file do not exist, GetMachineId() will not work"; ++#endif ASSERT_NO_THROW(m_proxy->GetMachineId()); }