diff --git a/devel/sdbus-cpp/Makefile b/devel/sdbus-cpp/Makefile index b80a4ce59a77..8df207770fdf 100644 --- a/devel/sdbus-cpp/Makefile +++ b/devel/sdbus-cpp/Makefile @@ -1,34 +1,37 @@ PORTNAME= sdbus-cpp DISTVERSIONPREFIX= v DISTVERSION= 1.3.0 PORTREVISION= 2 CATEGORIES= devel +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= 1e2d13a04a98.patch:-p1 # https://github.com/Kistler-Group/sdbus-cpp/pull/358 + MAINTAINER= jbeich@FreeBSD.org COMMENT= High-level C++ D-Bus library WWW= https://github.com/Kistler-Group/sdbus-cpp 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 index 5d09bebdfaf8..c0c426a64d10 100644 --- a/devel/sdbus-cpp/distinfo +++ b/devel/sdbus-cpp/distinfo @@ -1,3 +1,5 @@ TIMESTAMP = 1692524744 SHA256 (Kistler-Group-sdbus-cpp-v1.3.0_GH0.tar.gz) = d44f59abdd64d8f1ca3af7db58bc6518cb081fc9ff16285c3d75a68f5c073d10 SIZE (Kistler-Group-sdbus-cpp-v1.3.0_GH0.tar.gz) = 217150 +SHA256 (1e2d13a04a98.patch) = 374616d5a000a536d2947d3462a6b9ccf00777e2770a5a0bb3f87448f7b8786a +SIZE (1e2d13a04a98.patch) = 17236 diff --git a/devel/sdbus-cpp/files/patch-basu b/devel/sdbus-cpp/files/patch-basu deleted file mode 100644 index 79391ccc797b..000000000000 --- a/devel/sdbus-cpp/files/patch-basu +++ /dev/null @@ -1,288 +0,0 @@ -libsystemd is Linux-only, so replace with basu - ---- CMakeLists.txt.orig 2023-08-20 09:45:44 UTC -+++ CMakeLists.txt -@@ -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() - if(NOT TARGET PkgConfig::Systemd) ---- src/Connection.cpp.orig 2023-08-20 09:45:44 UTC -+++ src/Connection.cpp -@@ -31,7 +31,13 @@ - #include - #include - #include "ScopeGuard.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - #include - #include ---- src/Connection.h.orig 2023-08-20 09:45:44 UTC -+++ src/Connection.h -@@ -32,7 +32,13 @@ - #include "IConnection.h" - #include "ScopeGuard.h" - #include "ISdBus.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - #include - #include ---- src/Error.cpp.orig 2023-08-20 09:45:44 UTC -+++ src/Error.cpp -@@ -25,7 +25,13 @@ - */ - - #include -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include "ScopeGuard.h" - - namespace sdbus ---- src/Flags.cpp.orig 2023-08-20 09:45:44 UTC -+++ src/Flags.cpp -@@ -25,7 +25,13 @@ - */ - - #include -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - - namespace sdbus - { ---- src/IConnection.h.orig 2023-08-20 09:45:44 UTC -+++ src/IConnection.h -@@ -28,7 +28,13 @@ - #define SDBUS_CXX_INTERNAL_ICONNECTION_H_ - - #include -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - #include - #include ---- src/ISdBus.h.orig 2023-08-20 09:45:44 UTC -+++ src/ISdBus.h -@@ -28,7 +28,13 @@ - #ifndef SDBUS_CXX_ISDBUS_H - #define SDBUS_CXX_ISDBUS_H - -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - - namespace sdbus::internal { - ---- src/Message.cpp.orig 2023-08-20 09:45:44 UTC -+++ src/Message.cpp -@@ -31,7 +31,13 @@ - #include "ISdBus.h" - #include "IConnection.h" - #include "ScopeGuard.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - - namespace sdbus { ---- src/Object.cpp.orig 2023-08-20 09:45:44 UTC -+++ src/Object.cpp -@@ -35,7 +35,13 @@ - #include "IConnection.h" - #include "Utils.h" - #include "VTableUtils.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - #include - ---- src/Object.h.orig 2023-08-20 09:45:44 UTC -+++ src/Object.h -@@ -29,7 +29,13 @@ - - #include - #include "IConnection.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - #include - #include ---- src/Proxy.cpp.orig 2023-08-20 09:45:44 UTC -+++ src/Proxy.cpp -@@ -32,7 +32,13 @@ - #include "sdbus-c++/IConnection.h" - #include "sdbus-c++/Error.h" - #include "ScopeGuard.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - #include - #include ---- src/Proxy.h.orig 2023-08-20 09:45:44 UTC -+++ src/Proxy.h -@@ -29,7 +29,13 @@ - - #include - #include "IConnection.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - #include - #include ---- src/SdBus.cpp.orig 2023-08-20 09:45:44 UTC -+++ src/SdBus.cpp -@@ -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) - { -+#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 2023-08-20 09:45:44 UTC -+++ src/Types.cpp -@@ -27,7 +27,13 @@ - #include - #include - #include "MessageUtils.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - - namespace sdbus { ---- src/Utils.h.orig 2023-08-20 09:45:44 UTC -+++ src/Utils.h -@@ -28,7 +28,13 @@ - #define SDBUS_CXX_INTERNAL_UTILS_H_ - - #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 2023-08-20 09:45:44 UTC -+++ src/VTableUtils.c -@@ -25,7 +25,13 @@ - */ - - #include "VTableUtils.h" -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - - sd_bus_vtable createVTableStartItem(uint64_t flags) - { ---- src/VTableUtils.h.orig 2023-08-20 09:45:44 UTC -+++ src/VTableUtils.h -@@ -27,7 +27,13 @@ - #ifndef SDBUS_CXX_INTERNAL_VTABLEUTILS_H_ - #define SDBUS_CXX_INTERNAL_VTABLEUTILS_H_ - -+#if __has_include() - #include -+#elif __has_include() -+#include -+#else -+#include -+#endif - #include - - #ifdef __cplusplus ---- tests/integrationtests/DBusStandardInterfacesTests.cpp.orig 2023-08-20 09:45:44 UTC -+++ tests/integrationtests/DBusStandardInterfacesTests.cpp -@@ -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 __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()); - }