From b80e4a374020da30c567ed84918767f02f835109 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 8 Sep 2023 21:57:26 +0200 Subject: [PATCH] devel/sdbus-cpp: switch to upstreamable patches --- devel/sdbus-cpp/Makefile | 5 + devel/sdbus-cpp/distinfo | 6 + devel/sdbus-cpp/files/patch-basu | 288 ------------------------------- 3 files changed, 11 insertions(+), 288 deletions(-) delete mode 100644 devel/sdbus-cpp/files/patch-basu diff --git a/devel/sdbus-cpp/Makefile b/devel/sdbus-cpp/Makefile index cb594b5ae4659..2ae17ff5550cb 100644 --- a/devel/sdbus-cpp/Makefile +++ b/devel/sdbus-cpp/Makefile @@ -4,6 +4,11 @@ DISTVERSION= 1.3.0 PORTREVISION= 2 CATEGORIES= devel +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= 33bc728d3a67.patch:-p1 # https://github.com/Kistler-Group/sdbus-cpp/pull/358 +PATCHFILES+= 600d3f2e5d8a.patch:-p1 # https://github.com/Kistler-Group/sdbus-cpp/pull/358 +PATCHFILES+= 4a89f970e6be.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 diff --git a/devel/sdbus-cpp/distinfo b/devel/sdbus-cpp/distinfo index 5d09bebdfaf89..2ffa218d0ecb9 100644 --- a/devel/sdbus-cpp/distinfo +++ b/devel/sdbus-cpp/distinfo @@ -1,3 +1,9 @@ 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 (33bc728d3a67.patch) = cd2bee5d93375711d7fd42138abd1f6dfcae46e471dec26253c49047c257841c +SIZE (33bc728d3a67.patch) = 8296 +SHA256 (600d3f2e5d8a.patch) = 2819b5b9020e6ce819d225d1a59f7774120bfb37b3d46bfc6a75da9ae8d5fc22 +SIZE (600d3f2e5d8a.patch) = 1967 +SHA256 (4a89f970e6be.patch) = eacc1fb7f884a95ce481f442af0d8ea194d0485d0dae40e6e01d61e5945acaf7 +SIZE (4a89f970e6be.patch) = 1652 diff --git a/devel/sdbus-cpp/files/patch-basu b/devel/sdbus-cpp/files/patch-basu deleted file mode 100644 index 79391ccc797b2..0000000000000 --- 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()); - }