Skip to contentSkip to conversation

dbus-cpp: new package

PATCH New Gustavo Zacarias 3 participants 4 messages Dec 26, 2013 – Jan 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dbus-cpp: new package

D-Bus C++ bindings, closes bug #65.

---
 package/Config.in                           |  1 +
 package/dbus-cpp/Config.in                  | 18 +++++++++++++++
 package/dbus-cpp/dbus-cpp-0001-gcc4.7.patch | 17 ++++++++++++++
 package/dbus-cpp/dbus-cpp.mk                | 36 +++++++++++++++++++++++++++++
 4 files changed, 72 insertions(+)
 create mode 100644 package/dbus-cpp/Config.in
 create mode 100644 package/dbus-cpp/dbus-cpp-0001-gcc4.7.patch
 create mode 100644 package/dbus-cpp/dbus-cpp.mk
package/Config.in +1 -0
index 9bffb02..d1769f4 100644
@@ -262,6 +262,7 @@ source "package/acpid/Config.in"
 source "package/cdrkit/Config.in"
 source "package/cryptsetup/Config.in"
 source "package/dbus/Config.in"
+source "package/dbus-cpp/Config.in"
 source "package/dbus-glib/Config.in"
 source "package/dbus-python/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
package/dbus-cpp/Config.in new file +18 -0
new file mode 100644
index 0000000..f631ece
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_DBUS_CPP
+	bool "dbus-c++"
+	depends on BR2_PACKAGE_DBUS
+	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
+	depends on BR2_USE_MMU # dbus
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_EXPAT
+	help
+	  dbus-c++ attempts to provide a C++ API for D-BUS.
+	  The library has a glib/gtk and an Ecore mainloop integration.
+	  It also offers an optional own main loop.
+
+	  http://sourceforge.net/projects/dbus-cplusplus/
+
+comment "dbus-c++ needs a toolchain w/ C++, threads"
+	depends on BR2_USE_MMU
+	depends on BR2_PACKAGE_DBUS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/dbus-cpp/dbus-cpp-0001-gcc4.7.patch new file +17 -0
new file mode 100644
index 0000000..ad3046c
@@ -0,0 +1,17 @@
+Fix build failure with gcc 4.7+
+From bugtracker: http://sourceforge.net/p/dbus-cplusplus/patches/13/
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+
+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"
package/dbus-cpp/dbus-cpp.mk new file +36 -0
new file mode 100644
index 0000000..7936abd
@@ -0,0 +1,36 @@
+################################################################################
+#
+# dbus-c++
+#
+################################################################################
+
+DBUS_CPP_VERSION = 0.9.0
+DBUS_CPP_SITE = http://downloads.sourceforge.net/project/dbus-cplusplus/dbus-c++/$(DBUS_CPP_VERSION)
+DBUS_CPP_SOURCE = libdbus-c++-$(DBUS_CPP_VERSION).tar.gz
+DBUS_CPP_INSTALL_STAGING = YES
+# expat is required for the tools irrespective of dbus xml backend
+DBUS_CPP_DEPENDENCIES = host-dbus-cpp host-pkgconf dbus expat
+HOST_DBUS_CPP_DEPENDENCIES = host-pkgconf host-dbus host-expat
+DBUS_CPP_CONF_OPT = --disable-examples --disable-tests --disable-doxygen-docs \
+	--with-build-libdbus-cxx=$(HOST_DBUS_CPP_BUILDDIR)
+HOST_DBUS_CPP_CONF_OPT = --disable-examples --disable-tests \
+	--disable-doxygen-docs --disable-ecore --disable-glib
+DBUS_CPP_LICENSE = LGPLv2.1+
+DBUS_CPP_LICENSE_FILES = COPYING
+
+ifeq ($(BR2_PACKAGE_LIBECORE),y)
+	DBUS_CPP_CONF_OPT += --enable-ecore
+	DBUS_CPP_DEPENDENCIES += libecore
+else
+	DBUS_CPP_CONF_OPT += --disable-ecore
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+	DBUS_CPP_CONF_OPT += --enable-glib
+	DBUS_CPP_DEPENDENCIES += libglib2
+else
+	DBUS_CPP_CONF_OPT += --disable-glib
+endif
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/1 dbus-cpp: new package

Dear Gustavo Zacarias,

Quoted 1 line · Gustavo Zacarias

D-Bus C++ bindings, closes bug #65.

Wow, impressive, you even go to improvement bugs, and fix them!

Quoted 58 lines
package/dbus-cpp/Config.in new file +18 -0
new file mode 100644
index 0000000..f631ece
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_DBUS_CPP
+	bool "dbus-c++"
+	depends on BR2_PACKAGE_DBUS
+	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
+	depends on BR2_USE_MMU # dbus
+	depends on BR2_INSTALL_LIBSTDCPP
+	select BR2_PACKAGE_EXPAT
+	help
+	  dbus-c++ attempts to provide a C++ API for D-BUS.
+	  The library has a glib/gtk and an Ecore mainloop integration.
+	  It also offers an optional own main loop.
+
+	  http://sourceforge.net/projects/dbus-cplusplus/
+
+comment "dbus-c++ needs a toolchain w/ C++, threads"
+	depends on BR2_USE_MMU
+	depends on BR2_PACKAGE_DBUS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/dbus-cpp/dbus-cpp-0001-gcc4.7.patch new file +17 -0
new file mode 100644
index 0000000..ad3046c
@@ -0,0 +1,17 @@
+Fix build failure with gcc 4.7+
+From bugtracker: http://sourceforge.net/p/dbus-cplusplus/patches/13/
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+
+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"
package/dbus-cpp/dbus-cpp.mk new file +5 -0
new file mode 100644
index 0000000..7936abd
@@ -0,0 +1,36 @@
+################################################################################
+#
+# dbus-c++
+#
+################################################################################

package/dbus-cpp/dbus-cpp.mk line 15

Quoted 10 lines
package/dbus-cpp/dbus-cpp.mk new file +10 -0
+
+DBUS_CPP_VERSION = 0.9.0
+DBUS_CPP_SITE = http://downloads.sourceforge.net/project/dbus-cplusplus/dbus-c++/$(DBUS_CPP_VERSION)
+DBUS_CPP_SOURCE = libdbus-c++-$(DBUS_CPP_VERSION).tar.gz
+DBUS_CPP_INSTALL_STAGING = YES
+# expat is required for the tools irrespective of dbus xml backend
+DBUS_CPP_DEPENDENCIES = host-dbus-cpp host-pkgconf dbus expat
+HOST_DBUS_CPP_DEPENDENCIES = host-pkgconf host-dbus host-expat
+DBUS_CPP_CONF_OPT = --disable-examples --disable-tests --disable-doxygen-docs \
+	--with-build-libdbus-cxx=$(HOST_DBUS_CPP_BUILDDIR)

I'm not a big fan when building one package requires poking into the source/build tree of another package (even if it's the host variant of the same package). Installing the host dbus-cpp into $(HOST_DIR) isn't sufficient to build the target dbus-cpp?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 dbus-cpp: new package

Quoted 6 lines · Thomas Petazzoni

Dear Gustavo Zacarias,

Quoted 1 line · Gustavo Zacarias

D-Bus C++ bindings, closes bug #65.

Wow, impressive, you even go to improvement bugs, and fix them!

Yeah, that number was nagging me, a 2-digit when we are on 4-digit bugs :P Some people want to lower the patchwork patch count, i also look at bugs ;)

Quoted 4 lines

I'm not a big fan when building one package requires poking into the source/build tree of another package (even if it's the host variant of the same package). Installing the host dbus-cpp into $(HOST_DIR) isn't sufficient to build the target dbus-cpp?

Me neither, the problem is patching it (bin/lib separately, ditching the src/.libs & other references) won't be upstreamable since the option is right there now and i don't think upstream will want a variation on the subject.
It's doable but not upstreamable i think, what do we prefer? Regards.

#3 lore raw

PATCH 1/1 dbus-cpp: new package

Quoted 5 lines · Gustavo Zacarias

Me neither, the problem is patching it (bin/lib separately, ditching the src/.libs & other references) won't be upstreamable since the option is right there now and i don't think upstream will want a variation on the subject.
It's doable but not upstreamable i think, what do we prefer?

I think it is ok like this - Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard