mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-23 13:33:28 +08:00
package/dbus-cxx: new package
DBus-cxx provides an object-oriented interface to DBus Signed-off-by: Lang Daniel <d.lang@abatec.at> [Arnout: - reorder licenses; - select dbus instead of depends, + propagate dependency - make qt5 and libglib2 integration automatic ] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
9c8453734b
commit
a0fb3eed27
@ -622,6 +622,7 @@ N: Daniel J. Leach <dleach@belcan.com>
|
||||
F: package/dacapo/
|
||||
|
||||
N: Daniel Lang <d.lang@abatec.at>
|
||||
F: package/dbus-cxx/
|
||||
F: package/paho-mqtt-cpp/
|
||||
|
||||
N: Damien Lanson <damien@kal-host.com>
|
||||
|
@ -461,6 +461,7 @@ endmenu
|
||||
source "package/davinci-bootcount/Config.in"
|
||||
source "package/dbus/Config.in"
|
||||
source "package/dbus-cpp/Config.in"
|
||||
source "package/dbus-cxx/Config.in"
|
||||
source "package/dbus-glib/Config.in"
|
||||
source "package/dbus-python/Config.in"
|
||||
source "package/dbus-triggerd/Config.in"
|
||||
|
29
package/dbus-cxx/0001-gcc11-include-typeinfo.patch
Normal file
29
package/dbus-cxx/0001-gcc11-include-typeinfo.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 0a4c5db225d8d213916655593471e303ba71e0ea Mon Sep 17 00:00:00 2001
|
||||
From: Oleksandr Kravchuk <sashko@users.noreply.github.com>
|
||||
Date: Mon, 13 Dec 2021 03:42:44 +0100
|
||||
Subject: [PATCH] Include typeinfo for typeid() (#83)
|
||||
|
||||
Otherwise fails with:
|
||||
error: must '#include <typeinfo>' before using 'typeid'
|
||||
|
||||
Fetch from: https://github.com/dbus-cxx/dbus-cxx/pull/83
|
||||
Upstream-Status: Accepted
|
||||
Signed-off-by: Daniel Lang <d.lang@abatec.at>
|
||||
|
||||
---
|
||||
dbus-cxx/demangle.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dbus-cxx/demangle.h b/dbus-cxx/demangle.h
|
||||
index b71bcb9..9a4e99b 100644
|
||||
--- a/dbus-cxx/demangle.h
|
||||
+++ b/dbus-cxx/demangle.h
|
||||
@@ -21,6 +21,7 @@
|
||||
#define DBUSCXX_DEMANGLE_H
|
||||
|
||||
#include <string>
|
||||
+#include <typeinfo>
|
||||
#include <dbus-cxx/dbus-cxx-config.h>
|
||||
|
||||
#if DBUS_CXX_HAS_CXXABI_H
|
||||
|
91
package/dbus-cxx/0002-cmake-improve-include-paths.patch
Normal file
91
package/dbus-cxx/0002-cmake-improve-include-paths.patch
Normal file
@ -0,0 +1,91 @@
|
||||
From 5a0ebbf55515a928acf9926d3fcd789115e347d3 Mon Sep 17 00:00:00 2001
|
||||
From: Lang Daniel <d.lang@abatec.at>
|
||||
Date: Mon, 17 Jan 2022 13:57:55 +0100
|
||||
Subject: [PATCH] cmake: improve include paths
|
||||
|
||||
Adding the dbus-cxx subfolders as an include path might override system
|
||||
headers (signal.h for gcc 10).
|
||||
By removing the subfolders, includes can happen via #include "..." or
|
||||
via #include <dbus-cxx/...>.
|
||||
|
||||
Fetch from: https://github.com/dbus-cxx/dbus-cxx/pull/86
|
||||
Upstream-Status: Accepted
|
||||
Signed-off-by: Daniel Lang <d.lang@abatec.at>
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 +---
|
||||
dbus-cxx/matchrule.h | 2 +-
|
||||
dbus-cxx/sasl.h | 2 +-
|
||||
dbus-cxx/sendmsgtransport.cpp | 2 +-
|
||||
dbus-cxx/simpletransport.cpp | 2 +-
|
||||
5 files changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5b6d28c..e76cd61 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -207,9 +207,7 @@ set( DBUS_CXX_HEADERS
|
||||
|
||||
set( DBUS_CXX_INCLUDE_DIRECTORIES
|
||||
${PROJECT_SOURCE_DIR}
|
||||
- ${PROJECT_SOURCE_DIR}/dbus-cxx
|
||||
- ${PROJECT_BINARY_DIR}
|
||||
- ${PROJECT_BINARY_DIR}/dbus-cxx )
|
||||
+ ${PROJECT_BINARY_DIR} )
|
||||
include_directories( ${DBUS_CXX_INCLUDE_DIRECTORIES}
|
||||
${dbus_INCLUDE_DIRS}
|
||||
${sigc_INCLUDE_DIRS} )
|
||||
diff --git a/dbus-cxx/matchrule.h b/dbus-cxx/matchrule.h
|
||||
index 69fdab7..18c9e81 100644
|
||||
--- a/dbus-cxx/matchrule.h
|
||||
+++ b/dbus-cxx/matchrule.h
|
||||
@@ -20,7 +20,7 @@
|
||||
#define DBUSCXX_MATCH_RULE_H
|
||||
|
||||
#include <memory>
|
||||
-#include "dbus-cxx-config.h"
|
||||
+#include <dbus-cxx/dbus-cxx-config.h>
|
||||
|
||||
namespace DBus {
|
||||
|
||||
diff --git a/dbus-cxx/sasl.h b/dbus-cxx/sasl.h
|
||||
index d7429a3..44edd6e 100644
|
||||
--- a/dbus-cxx/sasl.h
|
||||
+++ b/dbus-cxx/sasl.h
|
||||
@@ -19,7 +19,7 @@
|
||||
#ifndef DBUSCXX_SASL_H
|
||||
#define DBUSCXX_SASL_H
|
||||
|
||||
-#include <dbus-cxx-config.h>
|
||||
+#include <dbus-cxx/dbus-cxx-config.h>
|
||||
|
||||
#include <memory>
|
||||
#include <stdint.h>
|
||||
diff --git a/dbus-cxx/sendmsgtransport.cpp b/dbus-cxx/sendmsgtransport.cpp
|
||||
index ae053ff..a10ae66 100644
|
||||
--- a/dbus-cxx/sendmsgtransport.cpp
|
||||
+++ b/dbus-cxx/sendmsgtransport.cpp
|
||||
@@ -21,8 +21,8 @@
|
||||
#include "dbus-cxx-private.h"
|
||||
#include "utility.h"
|
||||
#include "validator.h"
|
||||
+#include "message.h"
|
||||
|
||||
-#include <message.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
diff --git a/dbus-cxx/simpletransport.cpp b/dbus-cxx/simpletransport.cpp
|
||||
index f291d9f..fed4364 100644
|
||||
--- a/dbus-cxx/simpletransport.cpp
|
||||
+++ b/dbus-cxx/simpletransport.cpp
|
||||
@@ -18,7 +18,7 @@
|
||||
***************************************************************************/
|
||||
#include "simpletransport.h"
|
||||
|
||||
-#include <dbus-cxx-private.h>
|
||||
+#include "dbus-cxx-private.h"
|
||||
#include "demarshaling.h"
|
||||
#include "message.h"
|
||||
#include "utility.h"
|
||||
|
41
package/dbus-cxx/0003-sasl-use-uid_t.patch
Normal file
41
package/dbus-cxx/0003-sasl-use-uid_t.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 9db9673c0c2407e18e215844adadbd4a397e6f78 Mon Sep 17 00:00:00 2001
|
||||
From: Lang Daniel <d.lang@abatec.at>
|
||||
Date: Fri, 28 Jan 2022 07:53:13 +0100
|
||||
Subject: [PATCH] use uid_t instead of __uid_t
|
||||
|
||||
uclibc and glibc define getuid() as
|
||||
extern __uid_t getuid (void) __THROW;
|
||||
https://elixir.bootlin.com/glibc/glibc-2.34/source/posix/unistd.h#L698
|
||||
which is a typedef for unsigned int.
|
||||
|
||||
musl uses uid_t as return type
|
||||
uid_t getuid(void);
|
||||
https://elixir.bootlin.com/musl/v1.2.2/source/include/unistd.h#L108
|
||||
which is a typedef to unsigned.
|
||||
|
||||
glibc and uclibc include typedefs from __uid_t to uid_t,
|
||||
which means one should be able to use uid_t as a replacement
|
||||
for __uid_t and make compiling with all three c standard libraries
|
||||
possible.
|
||||
|
||||
Fetch from: https://github.com/dbus-cxx/dbus-cxx/pull/87
|
||||
Signed-off-by: Daniel Lang <d.lang@abatec.at>
|
||||
|
||||
---
|
||||
dbus-cxx/sasl.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dbus-cxx/sasl.cpp b/dbus-cxx/sasl.cpp
|
||||
index e8a6060..7a76af6 100644
|
||||
--- a/dbus-cxx/sasl.cpp
|
||||
+++ b/dbus-cxx/sasl.cpp
|
||||
@@ -70,7 +70,7 @@ std::tuple<bool, bool, std::vector<uint8_t>> SASL::authenticate() {
|
||||
bool success = false;
|
||||
bool negotiatedFD = false;
|
||||
std::vector<uint8_t> serverGUID;
|
||||
- __uid_t uid = getuid();
|
||||
+ uid_t uid = getuid();
|
||||
std::string line;
|
||||
std::smatch regex_match;
|
||||
|
||||
|
24
package/dbus-cxx/Config.in
Normal file
24
package/dbus-cxx/Config.in
Normal file
@ -0,0 +1,24 @@
|
||||
config BR2_PACKAGE_DBUS_CXX
|
||||
bool "dbus-cxx"
|
||||
depends on BR2_USE_MMU # dbus
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # libsigc
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
select BR2_PACKAGE_DBUS # runtime
|
||||
select BR2_PACKAGE_LIBSIGC
|
||||
help
|
||||
DBus-cxx is a C++ implementation for DBus. DBus is a
|
||||
Linux-specific RPC (remote procedure call) and
|
||||
IPC (inter-process communications) mechanism.
|
||||
DBus-cxx provides an object-oriented view of all programs
|
||||
on the DBus, and allows an object-oriented way of
|
||||
exporting methods onto the DBus.
|
||||
|
||||
https://dbus-cxx.github.io/
|
||||
|
||||
comment "dbus-cxx needs a toolchain w/ C++, threads, gcc >= 7 and dynamic library support"
|
||||
depends on BR2_USE_MMU # dbus
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_7
|
5
package/dbus-cxx/dbus-cxx.hash
Normal file
5
package/dbus-cxx/dbus-cxx.hash
Normal file
@ -0,0 +1,5 @@
|
||||
# Locally computed:
|
||||
sha256 05c4f4750261f09819564bb8ee93b5d7f56fd05bbcd755858860fa6697d09c2a dbus-cxx-2.1.0.tar.gz
|
||||
sha256 e85e018c8ee7d4f439b097289bf4371f6fcfec24e89f3e77c422944501bc383d COPYING
|
||||
sha256 c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566 cmake-modules/LICENSE_1_0.txt
|
||||
sha256 c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08 tools/libcppgenerate/LICENSE
|
28
package/dbus-cxx/dbus-cxx.mk
Normal file
28
package/dbus-cxx/dbus-cxx.mk
Normal file
@ -0,0 +1,28 @@
|
||||
################################################################################
|
||||
#
|
||||
# dbus-cxx
|
||||
#
|
||||
################################################################################
|
||||
|
||||
DBUS_CXX_VERSION = 2.1.0
|
||||
DBUS_CXX_SITE = $(call github,dbus-cxx,dbus-cxx,$(DBUS_CXX_VERSION))
|
||||
DBUS_CXX_LICENSE = GPL-3.0, Boost license (cmake-modules), Apache 2.0 (libcppgenerate)
|
||||
DBUS_CXX_LICENSE_FILES = COPYING cmake-modules/LICENSE_1_0.txt tools/libcppgenerate/LICENSE
|
||||
DBUS_CXX_INSTALL_STAGING = YES
|
||||
DBUS_CXX_DEPENDENCIES = libsigc
|
||||
|
||||
ifeq ($(BR2_PACKAGE_QT5BASE),y)
|
||||
DBUS_CXX_CONF_OPTS += -DENABLE_QT_SUPPORT=ON
|
||||
DBUS_CXX_DEPENDENCIES += qt5base
|
||||
else
|
||||
DBUS_CXX_CONF_OPTS += -DENABLE_QT_SUPPORT=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
|
||||
DBUS_CXX_CONF_OPTS += -DENABLE_GLIB_SUPPORT=ON
|
||||
DBUS_CXX_DEPENDENCIES += libglib2
|
||||
else
|
||||
DBUS_CXX_CONF_OPTS += -DENABLE_GLIB_SUPPORT=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
Loading…
Reference in New Issue
Block a user