Skip to content
Snippets Groups Projects
Commit 70688a06 authored by Guillaume Roguez's avatar Guillaume Roguez Committed by Olivier SOLDANO
Browse files

contrib: add dbus-c++ package on gnu/linux


Add dbus-cpp into contrib system to force patches for all gnu/linux
platforms that use this library.
The problem with this library, it is not longer active and lacks of
support on recent changes as the compatibility break with gcc-7.

Credits: patches provided by this commit come from Fedora dbug-c++
package sources.

Change-Id: Ib06a3ee750f9715cfedd6289405828e662e7da94
Reviewed-by: default avatarOlivier Soldano <olivier.soldano@savoirfairelinux.com>
parent 1267dce4
Branches
No related tags found
No related merge requests found
7acebbb4254b2886cc0f05c5ddeeeac0b5863c5552d32249463b89380b0b95b8225c80bd98b8c7fcaada42ab770b5eff41b15390cd0d78bf1ee322ac6c2de319 libdbus-c++-0.9.0.tar.gz
diff --git a/include/dbus-c++/eventloop-integration.h b/include/dbus-c++/eventloop-integration.h
index 1b0302e..3e44304 100644
--- a/include/dbus-c++/eventloop-integration.h
+++ b/include/dbus-c++/eventloop-integration.h
@@ -26,6 +26,7 @@
#define __DBUSXX_EVENTLOOP_INTEGRATION_H
#include <errno.h>
+#include <unistd.h>
#include "api.h"
#include "dispatcher.h"
#include "util.h"
--- libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h.threading 2017-02-15 13:40:53.796004263 +0000
+++ libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h 2017-02-15 13:40:46.907000493 +0000
@@ -188,6 +188,7 @@
/* classes for multithreading support
*/
+#if 0
class DXXAPI Mutex
{
public:
@@ -243,9 +244,11 @@
typedef bool (*CondVarWaitTimeoutFn)(CondVar *cv, Mutex *mx, int timeout);
typedef void (*CondVarWakeOneFn)(CondVar *cv);
typedef void (*CondVarWakeAllFn)(CondVar *cv);
+#endif
void DXXAPI _init_threading();
+#if 0
void DXXAPI _init_threading(
MutexNewFn, MutexFreeFn, MutexLockFn, MutexUnlockFn,
CondVarNewFn, CondVarFreeFn, CondVarWaitFn, CondVarWaitTimeoutFn, CondVarWakeOneFn, CondVarWakeAllFn
@@ -312,6 +315,7 @@
cv->wake_all();
}
};
+#endif
} /* namespace DBus */
--- libdbus-c++-0.9.0/src/dispatcher.cpp.threading 2017-02-15 13:48:22.627249868 +0000
+++ libdbus-c++-0.9.0/src/dispatcher.cpp 2017-02-15 13:48:29.164253445 +0000
@@ -253,6 +253,7 @@
#endif//DBUS_HAS_THREADS_INIT_DEFAULT
}
+#if 0
void DBus::_init_threading(
MutexNewFn m1,
MutexFreeFn m2,
@@ -318,3 +319,4 @@
#endif//DBUS_HAS_RECURSIVE_MUTEX
dbus_threads_init(&functions);
}
+#endif
--- libdbus-c++-0.9.0/src/pipe.cpp.writechar 2017-02-16 11:07:13.591950169 +0000
+++ libdbus-c++-0.9.0/src/pipe.cpp 2017-02-16 11:04:17.158796092 +0000
@@ -83,5 +83,5 @@
void Pipe::signal()
{
// TODO: ignoring return of read/write generates warning; maybe relevant for eventloop work...
- ::write(_fd_write, '\0', 1);
+ ::write(_fd_write, "", 1);
}
# DBus-C++
DBUS_CPP_VERSION := 0.9.0
DBUS_CPP_URL := ${SF}/dbus-cplusplus/files/dbus-c%2B%2B/${DBUS_CPP_VERSION}/libdbus-c%2B%2B-${DBUS_CPP_VERSION}.tar.gz/download
ifdef HAVE_LINUX
ifndef HAVE_ANDROID
PKGS += dbus-cpp
endif
endif
# Package forced as bugged on GCC7
#ifeq ($(call need_pkg,"dbus-c++-1 >= 0.9.0"),)
#PKGS_FOUND += dbus-cpp
#endif
$(TARBALLS)/libdbus-c++-${DBUS_CPP_VERSION}.tar.gz:
$(call download,$(DBUS_CPP_URL))
.sum-dbus-cpp: $(TARBALLS)/libdbus-c++-${DBUS_CPP_VERSION}.tar.gz
dbus-cpp: $(TARBALLS)/libdbus-c++-${DBUS_CPP_VERSION}.tar.gz .sum-dbus-cpp
$(UNPACK)
$(APPLY) $(SRC)/dbus-cpp/dbus-c++-threading.patch
$(APPLY) $(SRC)/dbus-cpp/dbus-c++-writechar.patch
$(APPLY) $(SRC)/dbus-cpp/dbus-c++-gcc4.7.patch
$(UPDATE_AUTOCONFIG)
$(MOVE)
.dbus-cpp: dbus-cpp
cd $< && $(HOSTVARS) ./configure $(HOSTCONF) --disable-ecore --disable-glib --disable-tests --disable-examples
cd $< && $(MAKE) install
touch $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment