[packages/dbus-c++] - added macros patch (add DBus_ prefix to interface.h macros to avoid global names pollution, confli

qboosh qboosh at pld-linux.org
Tue Feb 16 21:29:28 CET 2016


commit fd047d0da7a32ee995178098bd5a1255d9f89f85
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Feb 16 21:32:20 2016 +0100

    - added macros patch (add DBus_ prefix to interface.h macros to avoid global names pollution, conflicting with recent glibmm)
    - release 4

 dbus-c++-macros.patch | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++
 dbus-c++.spec         |   7 ++-
 2 files changed, 133 insertions(+), 2 deletions(-)
---
diff --git a/dbus-c++.spec b/dbus-c++.spec
index 8347478..a75338c 100644
--- a/dbus-c++.spec
+++ b/dbus-c++.spec
@@ -6,11 +6,12 @@ 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:	3
+Release:	4
 License:	LGPL v2.1+
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/dbus-cplusplus/lib%{name}-%{version}.tar.gz
 # Source0-md5:	e752116f523fa88ef041e63d3dee4de2
+Patch0:		%{name}-macros.patch
 Patch1:		%{name}-gcc4.7.patch
 Patch2:		%{name}-linkfix.patch
 URL:		http://sourceforge.net/projects/dbus-cplusplus/
@@ -22,7 +23,7 @@ BuildRequires:	doxygen
 BuildRequires:	expat-devel >= 1.95
 BuildRequires:	glib2-devel >= 2.0
 BuildRequires:	gtkmm-devel >= 2.4
-BuildRequires:	libstdc++-devel
+BuildRequires:	libstdc++-devel >= 6:4.3
 BuildRequires:	libtool >= 2:1.5
 BuildRequires:	pkgconfig
 Requires:	dbus-libs >= 1.0.0
@@ -140,6 +141,7 @@ Statyczna biblioteka dbus-c++-ecore.
 
 %prep
 %setup -q -n lib%{name}-%{version}
+%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 
@@ -149,6 +151,7 @@ Statyczna biblioteka dbus-c++-ecore.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
+CXXFLAGS="%{rpmcxxflags} -std=c++0x"
 %configure \
 	%{!?with_ecore:--disable-ecore}
 
diff --git a/dbus-c++-macros.patch b/dbus-c++-macros.patch
new file mode 100644
index 0000000..246dba2
--- /dev/null
+++ b/dbus-c++-macros.patch
@@ -0,0 +1,128 @@
+--- libdbus-c++-0.9.0/include/dbus-c++/interface.h.orig	2011-11-28 16:03:19.000000000 +0100
++++ libdbus-c++-0.9.0/include/dbus-c++/interface.h	2016-02-16 21:11:10.523884413 +0100
+@@ -177,17 +177,17 @@
+   SignalTable	_signals;
+ };
+ 
+-# define register_method(interface, method, callback) \
++# define DBus_register_method(interface, method, callback) \
+ 	InterfaceAdaptor::_methods[ #method ] = \
+ 		new ::DBus::Callback< interface, ::DBus::Message, const ::DBus::CallMessage &>(this, & interface :: callback);
+ 
+-# define bind_property(variable, type, can_read, can_write) \
++# define DBus_bind_property(variable, type, can_read, can_write) \
+ 	InterfaceAdaptor::_properties[ #variable ].read = can_read; \
+ 	InterfaceAdaptor::_properties[ #variable ].write = can_write; \
+ 	InterfaceAdaptor::_properties[ #variable ].sig = type; \
+ 	variable.bind(InterfaceAdaptor::_properties[ #variable ]);
+ 
+-# define connect_signal(interface, signal, callback) \
++# define DBus_connect_signal(interface, signal, callback) \
+ 	InterfaceProxy::_signals[ #signal ] = \
+ 		new ::DBus::Callback< interface, void, const ::DBus::SignalMessage &>(this, & interface :: callback);
+ 
+--- libdbus-c++-0.9.0/examples/hal/hal-listen.cpp.orig	2011-11-28 16:03:19.000000000 +0100
++++ libdbus-c++-0.9.0/examples/hal/hal-listen.cpp	2016-02-16 21:23:04.877690640 +0100
+@@ -11,8 +11,8 @@ HalManagerProxy::HalManagerProxy(DBus::C
+   : DBus::InterfaceProxy("org.freedesktop.Hal.Manager"),
+     DBus::ObjectProxy(connection, "/org/freedesktop/Hal/Manager", "org.freedesktop.Hal")
+ {
+-  connect_signal(HalManagerProxy, DeviceAdded, DeviceAddedCb);
+-  connect_signal(HalManagerProxy, DeviceRemoved, DeviceRemovedCb);
++  DBus_connect_signal(HalManagerProxy, DeviceAdded, DeviceAddedCb);
++  DBus_connect_signal(HalManagerProxy, DeviceRemoved, DeviceRemovedCb);
+ 
+   std::vector< std::string > devices = GetAllDevices();
+ 
+@@ -70,8 +70,8 @@ HalDeviceProxy::HalDeviceProxy(DBus::Con
+   : DBus::InterfaceProxy("org.freedesktop.Hal.Device"),
+     DBus::ObjectProxy(connection, udi, "org.freedesktop.Hal")
+ {
+-  connect_signal(HalDeviceProxy, PropertyModified, PropertyModifiedCb);
+-  connect_signal(HalDeviceProxy, Condition, ConditionCb);
++  DBus_connect_signal(HalDeviceProxy, PropertyModified, PropertyModifiedCb);
++  DBus_connect_signal(HalDeviceProxy, Condition, ConditionCb);
+ }
+ 
+ void HalDeviceProxy::PropertyModifiedCb(const DBus::SignalMessage &sig)
+--- libdbus-c++-0.9.0/src/introspection.cpp.orig	2011-11-28 16:03:19.000000000 +0100
++++ libdbus-c++-0.9.0/src/introspection.cpp	2016-02-16 21:12:54.849303200 +0100
+@@ -40,7 +40,7 @@ static const char *introspectable_name =
+ IntrospectableAdaptor::IntrospectableAdaptor()
+   : InterfaceAdaptor(introspectable_name)
+ {
+-  register_method(IntrospectableAdaptor, Introspect, Introspect);
++  DBus_register_method(IntrospectableAdaptor, Introspect, Introspect);
+ }
+ 
+ Message IntrospectableAdaptor::Introspect(const CallMessage &call)
+--- libdbus-c++-0.9.0/src/property.cpp.orig	2011-11-28 16:03:19.000000000 +0100
++++ libdbus-c++-0.9.0/src/property.cpp	2016-02-16 21:13:35.914769521 +0100
+@@ -37,8 +37,8 @@ static const char *properties_name = "or
+ PropertiesAdaptor::PropertiesAdaptor()
+   : InterfaceAdaptor(properties_name)
+ {
+-  register_method(PropertiesAdaptor, Get, Get);
+-  register_method(PropertiesAdaptor, Set, Set);
++  DBus_register_method(PropertiesAdaptor, Get, Get);
++  DBus_register_method(PropertiesAdaptor, Set, Set);
+ }
+ 
+ Message PropertiesAdaptor::Get(const CallMessage &call)
+--- libdbus-c++-0.9.0/test/functional/Test1/TestAppIntroPrivate.h.orig	2011-11-30 10:23:40.000000000 +0100
++++ libdbus-c++-0.9.0/test/functional/Test1/TestAppIntroPrivate.h	2016-02-16 21:24:30.505478325 +0100
+@@ -21,8 +21,8 @@ public:
+     Intro_proxy()
+     : ::DBus::InterfaceProxy("DBusCpp.Test.Com.Intro")
+     {
+-        connect_signal(Intro_proxy, test1Result, _test1Result_stub);
+-        connect_signal(Intro_proxy, testByteResult, _testByteResult_stub);
++        DBus_connect_signal(Intro_proxy, test1Result, _test1Result_stub);
++        DBus_connect_signal(Intro_proxy, testByteResult, _testByteResult_stub);
+     }
+ 
+ public:
+--- libdbus-c++-0.9.0/test/functional/Test1/TestAppIntroProviderPrivate.h.orig	2011-11-30 10:23:40.000000000 +0100
++++ libdbus-c++-0.9.0/test/functional/Test1/TestAppIntroProviderPrivate.h	2016-02-16 21:24:10.574441511 +0100
+@@ -21,8 +21,8 @@ public:
+     Intro_adaptor()
+     : ::DBus::InterfaceAdaptor("DBusCpp.Test.Com.Intro")
+     {
+-        register_method(Intro_adaptor, test1, _test1_stub);
+-        register_method(Intro_adaptor, testByte, _testByte_stub);
++        DBus_register_method(Intro_adaptor, test1, _test1_stub);
++        DBus_register_method(Intro_adaptor, testByte, _testByte_stub);
+     }
+ 
+     ::DBus::IntrospectedInterface *introspect() const 
+--- libdbus-c++-0.9.0/tools/generate_adaptor.cpp.orig	2011-11-28 16:03:19.000000000 +0100
++++ libdbus-c++-0.9.0/tools/generate_adaptor.cpp	2016-02-16 21:16:59.725362107 +0100
+@@ -119,7 +119,7 @@ void generate_adaptor(Xml::Document &doc
+     {
+       Xml::Node &property = **pi;
+ 
+-      body << tab << tab << "bind_property("
++      body << tab << tab << "DBus_bind_property("
+            << property.get("name") << ", "
+            << "\"" << property.get("type") << "\", "
+            << (property.get("access").find("read") != string::npos
+@@ -137,7 +137,7 @@ void generate_adaptor(Xml::Document &doc
+     {
+       Xml::Node &method = **mi;
+ 
+-      body << tab << tab << "register_method("
++      body << tab << tab << "DBus_register_method("
+            << ifaceclass << ", " << method.get("name") << ", " << stub_name(method.get("name"))
+            << ");" << endl;
+     }
+--- libdbus-c++-0.9.0/tools/generate_proxy.cpp.orig	2011-11-28 16:03:19.000000000 +0100
++++ libdbus-c++-0.9.0/tools/generate_proxy.cpp	2016-02-16 21:21:39.493248947 +0100
+@@ -121,7 +121,7 @@ void generate_proxy(Xml::Document &doc,
+ 
+       string marshname = "_" + signal.get("name") + "_stub";
+ 
+-      body << tab << tab << "connect_signal("
++      body << tab << tab << "DBus_connect_signal("
+            << ifaceclass << ", " << signal.get("name") << ", " << stub_name(signal.get("name"))
+            << ");" << endl;
+     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dbus-c++.git/commitdiff/fd047d0da7a32ee995178098bd5a1255d9f89f85



More information about the pld-cvs-commit mailing list