From nobody Mon Nov 22 19:54:08 2021 X-Original-To: dev-commits-ports-main@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 1236E188D3BE; Mon, 22 Nov 2021 19:54:09 +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 4HydJJ6qQ2z4fcP; Mon, 22 Nov 2021 19:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 CA0F3C1C; Mon, 22 Nov 2021 19:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AMJs84Q032991; Mon, 22 Nov 2021 19:54:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AMJs8L5032990; Mon, 22 Nov 2021 19:54:08 GMT (envelope-from git) Date: Mon, 22 Nov 2021 19:54:08 GMT Message-Id: <202111221954.1AMJs8L5032990@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: d05e8a33332c - main - devel/sdbus-cpp: add new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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/main X-Git-Reftype: branch X-Git-Commit: d05e8a33332c2a3e4519178d69ee7c91dfe51eb7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=d05e8a33332c2a3e4519178d69ee7c91dfe51eb7 commit d05e8a33332c2a3e4519178d69ee7c91dfe51eb7 Author: Jan Beich AuthorDate: 2021-10-25 07:02:37 +0000 Commit: Jan Beich CommitDate: 2021-11-22 19:53:24 +0000 devel/sdbus-cpp: add new port sdbus-c++ is a high-level C++ D-Bus library for Linux designed to provide expressive, easy-to-use API in modern C++. It adds another layer of abstraction on top of sd-bus, a nice, fresh C D-Bus implementation by systemd. sdbus-c++ has been written primarily as a replacement of dbus-c++, which currently suffers from a number of (unresolved) bugs, concurrency issues and inherent design complexities and limitations. sdbus-c++ has learned from dbus-c++ and has chosen a different path, a path of simple yet powerful design that is intuitive and friendly to the user and inherently free of those bugs. Even though sdbus-c++ uses sd-bus library, it is not necessarily constrained to systemd and can perfectly be used in non-systemd environments as well. https://github.com/Kistler-Group/sdbus-cpp --- devel/Makefile | 1 + devel/sdbus-cpp/Makefile | 32 ++++++ devel/sdbus-cpp/distinfo | 3 + devel/sdbus-cpp/files/patch-basu | 214 +++++++++++++++++++++++++++++++++++++++ devel/sdbus-cpp/pkg-descr | 17 ++++ devel/sdbus-cpp/pkg-plist | 29 ++++++ 6 files changed, 296 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 2865db59f806..09095e62564a 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -6974,6 +6974,7 @@ SUBDIR += schilybase SUBDIR += scons SUBDIR += sd-mux-ctrl + SUBDIR += sdbus-cpp SUBDIR += sdl12 SUBDIR += sdl12-compat SUBDIR += sdl20 diff --git a/devel/sdbus-cpp/Makefile b/devel/sdbus-cpp/Makefile new file mode 100644 index 000000000000..ddeba68570af --- /dev/null +++ b/devel/sdbus-cpp/Makefile @@ -0,0 +1,32 @@ +PORTNAME= sdbus-cpp +DISTVERSIONPREFIX= v +DISTVERSION= 1.0.0 +CATEGORIES= devel + +MAINTAINER= jbeich@FreeBSD.org +COMMENT= High-level C++ D-Bus library + +LICENSE= LGPL21+ +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= libbasu.so:devel/basu \ + libexpat.so:textproc/expat2 +TEST_DEPENDS= googletest>0:devel/googletest + +USES= cmake:testing compiler:c++17-lang pkgconfig +USE_GITHUB= yes +USE_LDCONFIG= yes +GH_ACCOUNT= Kistler-Group +CMAKE_ON= BUILD_CODE_GEN +CMAKE_OFF= BUILD_DOC +CMAKE_TESTING_ON= BUILD_TESTS + +.include + +.if ${OPSYS} != FreeBSD || ${OSVERSION} < 1300134 +LIB_DEPENDS+= libepoll-shim.so:devel/libepoll-shim +CFLAGS+= `pkg-config --cflags epoll-shim` +LDFLAGS+= `pkg-config --libs epoll-shim` +.endif + +.include diff --git a/devel/sdbus-cpp/distinfo b/devel/sdbus-cpp/distinfo new file mode 100644 index 000000000000..9e0e6fe34089 --- /dev/null +++ b/devel/sdbus-cpp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1635145357 +SHA256 (Kistler-Group-sdbus-cpp-v1.0.0_GH0.tar.gz) = 3db82112c0d8a171a4115d761e3a592b62091fa7600988736652595178ae4e94 +SIZE (Kistler-Group-sdbus-cpp-v1.0.0_GH0.tar.gz) = 202061 diff --git a/devel/sdbus-cpp/files/patch-basu b/devel/sdbus-cpp/files/patch-basu new file mode 100644 index 000000000000..aae455b3c498 --- /dev/null +++ b/devel/sdbus-cpp/files/patch-basu @@ -0,0 +1,214 @@ +libsystemd is Linux-only, so replace with basu + +--- CMakeLists.txt.orig 2021-10-25 07:02:37 UTC ++++ CMakeLists.txt +@@ -16,15 +16,14 @@ 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 " + "(you may turn BUILD_LIBSYSTEMD on for sdbus-c++ to try downloading " + "and building libsystemd in as part of sdbus-c++ during configuration)") + 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 +--- src/Connection.cpp.orig 2021-10-25 07:02:37 UTC ++++ src/Connection.cpp +@@ -30,7 +30,7 @@ + #include + #include + #include "ScopeGuard.h" +-#include ++#include + #include + #include + #include +--- src/Connection.h.orig 2021-10-25 07:02:37 UTC ++++ src/Connection.h +@@ -32,7 +32,7 @@ + #include "IConnection.h" + #include "ScopeGuard.h" + #include "ISdBus.h" +-#include ++#include + #include + #include + #include +--- src/Error.cpp.orig 2021-10-25 07:02:37 UTC ++++ src/Error.cpp +@@ -25,7 +25,7 @@ + */ + + #include +-#include ++#include + #include "ScopeGuard.h" + + namespace sdbus +--- src/Flags.cpp.orig 2021-10-25 07:02:37 UTC ++++ src/Flags.cpp +@@ -25,7 +25,7 @@ + */ + + #include +-#include ++#include + + namespace sdbus + { +--- src/IConnection.h.orig 2021-10-25 07:02:37 UTC ++++ src/IConnection.h +@@ -27,7 +27,7 @@ + #ifndef SDBUS_CXX_INTERNAL_ICONNECTION_H_ + #define SDBUS_CXX_INTERNAL_ICONNECTION_H_ + +-#include ++#include + #include + #include + #include +--- src/ISdBus.h.orig 2021-10-25 07:02:37 UTC ++++ src/ISdBus.h +@@ -28,7 +28,7 @@ + #ifndef SDBUS_CXX_ISDBUS_H + #define SDBUS_CXX_ISDBUS_H + +-#include ++#include + + namespace sdbus::internal { + +--- src/Message.cpp.orig 2021-10-25 07:02:37 UTC ++++ src/Message.cpp +@@ -31,7 +31,7 @@ + #include "ISdBus.h" + #include "IConnection.h" + #include "ScopeGuard.h" +-#include ++#include + #include + + namespace sdbus { +--- src/Object.cpp.orig 2021-10-25 07:02:37 UTC ++++ src/Object.cpp +@@ -34,7 +34,7 @@ + #include "ScopeGuard.h" + #include "IConnection.h" + #include "VTableUtils.h" +-#include ++#include + #include + #include + +--- src/Object.h.orig 2021-10-25 07:02:37 UTC ++++ src/Object.h +@@ -29,7 +29,7 @@ + + #include + #include "IConnection.h" +-#include ++#include + #include + #include + #include +--- src/Proxy.cpp.orig 2021-10-25 07:02:37 UTC ++++ src/Proxy.cpp +@@ -31,7 +31,7 @@ + #include "sdbus-c++/IConnection.h" + #include "sdbus-c++/Error.h" + #include "ScopeGuard.h" +-#include ++#include + #include + #include + #include +--- src/Proxy.h.orig 2021-10-25 07:02:37 UTC ++++ src/Proxy.h +@@ -29,7 +29,7 @@ + + #include + #include "IConnection.h" +-#include ++#include + #include + #include + #include +--- src/SdBus.cpp.orig 2021-10-25 07:02:37 UTC ++++ src/SdBus.cpp +@@ -178,7 +178,8 @@ int SdBus::sd_bus_open_system(sd_bus **ret) + + int SdBus::sd_bus_open_system_remote(sd_bus **ret, const char *host) + { +- return ::sd_bus_open_system_remote(ret, host); ++ // Removed in https://git.sr.ht/~emersion/basu/commit/01d33b244eb6 ++ return -EOPNOTSUPP; + } + + 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 +@@ -27,7 +27,7 @@ + #include + #include + #include "MessageUtils.h" +-#include ++#include + #include + + namespace sdbus { +--- src/VTableUtils.c.orig 2021-10-25 07:02:37 UTC ++++ src/VTableUtils.c +@@ -25,7 +25,7 @@ + */ + + #include "VTableUtils.h" +-#include ++#include + + sd_bus_vtable createVTableStartItem(uint64_t flags) + { +--- src/VTableUtils.h.orig 2021-10-25 07:02:37 UTC ++++ src/VTableUtils.h +@@ -27,7 +27,7 @@ + #ifndef SDBUS_CXX_INTERNAL_VTABLEUTILS_H_ + #define SDBUS_CXX_INTERNAL_VTABLEUTILS_H_ + +-#include ++#include + #include + + #ifdef __cplusplus +--- tests/integrationtests/AdaptorAndProxy_test.cpp.orig 2021-10-25 07:02:37 UTC ++++ tests/integrationtests/AdaptorAndProxy_test.cpp +@@ -510,8 +510,8 @@ 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"; + + ASSERT_NO_THROW(m_proxy->GetMachineId()); + } +--- tests/integrationtests/DBusStandardInterfacesTests.cpp.orig 2021-10-25 07:02:37 UTC ++++ tests/integrationtests/DBusStandardInterfacesTests.cpp +@@ -65,8 +65,8 @@ 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"; + + ASSERT_NO_THROW(m_proxy->GetMachineId()); + } diff --git a/devel/sdbus-cpp/pkg-descr b/devel/sdbus-cpp/pkg-descr new file mode 100644 index 000000000000..fb42c05bdab8 --- /dev/null +++ b/devel/sdbus-cpp/pkg-descr @@ -0,0 +1,17 @@ +sdbus-c++ is a high-level C++ D-Bus library for Linux designed to +provide expressive, easy-to-use API in modern C++. It adds another +layer of abstraction on top of sd-bus, a nice, fresh C D-Bus +implementation by systemd. + +sdbus-c++ has been written primarily as a replacement of dbus-c++, +which currently suffers from a number of (unresolved) bugs, +concurrency issues and inherent design complexities and +limitations. sdbus-c++ has learned from dbus-c++ and has chosen a +different path, a path of simple yet powerful design that is intuitive +and friendly to the user and inherently free of those bugs. + +Even though sdbus-c++ uses sd-bus library, it is not necessarily +constrained to systemd and can perfectly be used in non-systemd +environments as well. + +WWW: https://github.com/Kistler-Group/sdbus-cpp diff --git a/devel/sdbus-cpp/pkg-plist b/devel/sdbus-cpp/pkg-plist new file mode 100644 index 000000000000..4fafa806f51a --- /dev/null +++ b/devel/sdbus-cpp/pkg-plist @@ -0,0 +1,29 @@ +bin/sdbus-c++-xml2cpp +include/sdbus-c++/AdaptorInterfaces.h +include/sdbus-c++/ConvenienceApiClasses.h +include/sdbus-c++/ConvenienceApiClasses.inl +include/sdbus-c++/Error.h +include/sdbus-c++/Flags.h +include/sdbus-c++/IConnection.h +include/sdbus-c++/IObject.h +include/sdbus-c++/IProxy.h +include/sdbus-c++/Message.h +include/sdbus-c++/MethodResult.h +include/sdbus-c++/ProxyInterfaces.h +include/sdbus-c++/StandardInterfaces.h +include/sdbus-c++/TypeTraits.h +include/sdbus-c++/Types.h +include/sdbus-c++/sdbus-c++.h +lib/cmake/sdbus-c++-tools/sdbus-c++-tools-config-version.cmake +lib/cmake/sdbus-c++-tools/sdbus-c++-tools-config.cmake +lib/cmake/sdbus-c++-tools/sdbus-c++-tools-targets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/sdbus-c++-tools/sdbus-c++-tools-targets.cmake +lib/cmake/sdbus-c++/sdbus-c++-config-version.cmake +lib/cmake/sdbus-c++/sdbus-c++-config.cmake +lib/cmake/sdbus-c++/sdbus-c++-targets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/sdbus-c++/sdbus-c++-targets.cmake +lib/libsdbus-c++.so +lib/libsdbus-c++.so.1 +lib/libsdbus-c++.so.1.0.0 +libdata/pkgconfig/sdbus-c++-tools.pc +libdata/pkgconfig/sdbus-c++.pc