[packages/dbus-c++] - added threading patch (fix dispatch.h issues due to using configure define without config.h; assum
qboosh
qboosh at pld-linux.org
Mon Apr 23 20:48:41 CEST 2018
commit b1145df10f0341cb81abb40c804c3607cddaec2a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Apr 23 20:48:59 2018 +0200
- added threading patch (fix dispatch.h issues due to using configure define without config.h; assume dbus >= 1.0)
- release 5
dbus-c++-threading.patch | 56 ++++++++++++++++++++++++++++++++++++++++++++++++
dbus-c++.spec | 4 +++-
2 files changed, 59 insertions(+), 1 deletion(-)
---
diff --git a/dbus-c++.spec b/dbus-c++.spec
index a75338c..33d8e70 100644
--- a/dbus-c++.spec
+++ b/dbus-c++.spec
@@ -6,7 +6,7 @@ Summary: Native C++ bindings for D-Bus
Summary(pl.UTF-8): Natywne wiązania C++ do usługi D-Bus
Name: dbus-c++
Version: 0.9.0
-Release: 4
+Release: 5
License: LGPL v2.1+
Group: Libraries
Source0: http://downloads.sourceforge.net/dbus-cplusplus/lib%{name}-%{version}.tar.gz
@@ -14,6 +14,7 @@ Source0: http://downloads.sourceforge.net/dbus-cplusplus/lib%{name}-%{version}.t
Patch0: %{name}-macros.patch
Patch1: %{name}-gcc4.7.patch
Patch2: %{name}-linkfix.patch
+Patch3: %{name}-threading.patch
URL: http://sourceforge.net/projects/dbus-cplusplus/
BuildRequires: autoconf >= 2.59
BuildRequires: automake
@@ -144,6 +145,7 @@ Statyczna biblioteka dbus-c++-ecore.
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{__libtoolize}
diff --git a/dbus-c++-threading.patch b/dbus-c++-threading.patch
new file mode 100644
index 0000000..713e55a
--- /dev/null
+++ b/dbus-c++-threading.patch
@@ -0,0 +1,56 @@
+--- libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h.orig 2011-11-28 16:03:19.000000000 +0100
++++ libdbus-c++-0.9.0/include/dbus-c++/dispatcher.h 2018-04-23 20:38:19.311394855 +0200
+@@ -29,6 +29,8 @@
+ #include "connection.h"
+ #include "eventloop.h"
+
++#define DBUSXX_DBUS_HAS_RECURSIVE_MUTEX /* assume dbus >= 0.95 */
++
+ namespace DBus
+ {
+
+@@ -227,14 +229,14 @@
+ };
+
+ typedef Mutex *(*MutexNewFn)();
+-typedef void (*MutexUnlockFn)(Mutex *mx);
++typedef void (*MutexFreeFn)(Mutex *mx);
+
+-#ifndef DBUS_HAS_RECURSIVE_MUTEX
+-typedef bool (*MutexFreeFn)(Mutex *mx);
++#ifndef DBUSXX_DBUS_HAS_RECURSIVE_MUTEX
+ typedef bool (*MutexLockFn)(Mutex *mx);
++typedef bool (*MutexUnlockFn)(Mutex *mx);
+ #else
+-typedef void (*MutexFreeFn)(Mutex *mx);
+ typedef void (*MutexLockFn)(Mutex *mx);
++typedef void (*MutexUnlockFn)(Mutex *mx);
+ #endif//DBUS_HAS_RECURSIVE_MUTEX
+
+ typedef CondVar *(*CondVarNewFn)();
+@@ -272,6 +274,17 @@
+ delete mx;
+ }
+
++#ifndef DBUSXX_DBUS_HAS_RECURSIVE_MUTEX
++ static bool mutex_lock(Mutex *mx)
++ {
++ return mx->lock();
++ }
++
++ static bool mutex_unlock(Mutex *mx)
++ {
++ return mx->unlock();
++ }
++#else
+ static void mutex_lock(Mutex *mx)
+ {
+ mx->lock();
+@@ -281,6 +294,7 @@
+ {
+ mx->unlock();
+ }
++#endif
+
+ static CondVar *condvar_new()
+ {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dbus-c++.git/commitdiff/b1145df10f0341cb81abb40c804c3607cddaec2a
More information about the pld-cvs-commit
mailing list