zeromq: add C++ bindings
PATCH 1/1 zeromq: add C++ bindings
From: Simon Dawson <[email protected]>
Now that zeromq has been bumped to version 3.2.2, we need to provide the C++ bindings using separate packages. Two C++ bindings are provided by this patch:
* cppzmq is a very simple single-header binding
* zmqpp is a high-level binding, implemented in C++ as a separate library
When the new "C++ bindings" option for zeromq is selected, both of these C++ bindings are built and installed.
--- package/Config.in | 2 ++ package/cppzmq/Config.in | 2 ++ package/cppzmq/cppzmq.mk | 23 ++++++++++++++++++++++ package/zeromq/Config.in | 17 +++++++++++++--- package/zmqpp/Config.in | 2 ++ package/zmqpp/zmqpp.mk | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 package/cppzmq/Config.in create mode 100644 package/cppzmq/cppzmq.mk create mode 100644 package/zmqpp/Config.in create mode 100644 package/zmqpp/zmqpp.mk
package/Config.in +2 -0
@@ -495,6 +495,7 @@ source "package/mediastreamer/Config.in" endmenu menu "Networking" +source "package/cppzmq/Config.in" source "package/glib-networking/Config.in" source "package/libcgi/Config.in" source "package/libcgicc/Config.in"
@@ -535,6 +536,7 @@ source "package/ortp/Config.in" source "package/slirp/Config.in" source "package/usbredir/Config.in" source "package/zeromq/Config.in" +source "package/zmqpp/Config.in" endmenu menu "Other"
package/cppzmq/Config.in new file +2 -0
@@ -0,0 +1,2 @@ +config BR2_PACKAGE_CPPZMQ + bool
package/cppzmq/cppzmq.mk new file +23 -0
@@ -0,0 +1,23 @@ +############################################################# +# +# cppzmq +# +############################################################# + +CPPZMQ_VERSION = b232978 +CPPZMQ_SITE = git://github.com/zeromq/cppzmq.git +CPPZMQ_INSTALL_STAGING = YES +CPPZMQ_INSTALL_TARGET = NO +CPPZMQ_DEPENDENCIES = zeromq +CPPZMQ_LICENSE = MIT +CPPZMQ_LICENSE_FILES = zmq.hpp + +define CPPZMQ_INSTALL_STAGING_CMDS + $(INSTALL) -m 0644 -D $(@D)/zmq.hpp $(STAGING_DIR)/usr/include/zmq.hpp +endef + +define CPPZMQ_UNINSTALL_STAGING_CMDS + $(RM) $(STAGING_DIR)/usr/include/zmq.hpp +endef + +$(eval $(generic-package))
package/zeromq/Config.in +14 -3
@@ -1,9 +1,8 @@ -comment "zeromq requires a toolchain with C++, LARGEFILE + WCHAR support" - depends on !(BR2_INSTALL_LIBSTDCPP && BR2_LARGEFILE && BR2_USE_WCHAR) +comment "zeromq requires a toolchain with LARGEFILE and WCHAR support" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) config BR2_PACKAGE_ZEROMQ bool "zeromq" - depends on BR2_INSTALL_LIBSTDCPP depends on BR2_LARGEFILE # util-linux depends on BR2_USE_WCHAR # util-linux select BR2_PACKAGE_UTIL_LINUX
@@ -32,3 +31,15 @@ config BR2_PACKAGE_ZEROMQ_PGM Add support for Pragmatic General Multicast protocol (RFC 3208) implemented either over raw IP packets or UDP datagrams (encapsulated PGM). This requires OpenPGM library. + +comment "zeromq C++ bindings require a toolchain with C++ support" + depends on BR2_PACKAGE_ZEROMQ && !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_ZEROMQ_CPP + bool "C++ bindings" + depends on BR2_PACKAGE_ZEROMQ + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_CPPZMQ + select BR2_PACKAGE_ZMQPP + help + C++ bindings.
package/zmqpp/Config.in new file +2 -0
@@ -0,0 +1,2 @@ +config BR2_PACKAGE_ZMQPP + bool
package/zmqpp/zmqpp.mk new file +48 -0
48 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 1/1 zeromq: add C++ bindings
Hi Simon,
Quoted 14 lines · spdawson at gmail.com
From: Simon Dawson <[email protected]>
Now that zeromq has been bumped to version 3.2.2, we need to provide the C++ bindings using separate packages. Two C++ bindings are provided by this patch:
* cppzmq is a very simple single-header binding
* zmqpp is a high-level binding, implemented in C++ as a separate libraryWhen the new "C++ bindings" option for zeromq is selected, both of these C++ bindings are built and installed.
Signed-off-by Simon Dawson <[email protected]>---
[...]
package/zeromq/Config.in line 6
Quoted 11 lines
package/zeromq/Config.in +2
-3@@ -1,9 +1,8 @@ -comment "zeromq requires a toolchain with C++, LARGEFILE + WCHAR support" - depends on !(BR2_INSTALL_LIBSTDCPP && BR2_LARGEFILE && BR2_USE_WCHAR) +comment "zeromq requires a toolchain with LARGEFILE and WCHAR support" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR) config BR2_PACKAGE_ZEROMQ bool "zeromq" - depends on BR2_INSTALL_LIBSTDCPP
Although only the C binding is bundled with zeromq, the library itself seems to be implemented in C++, so this is not correct.
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/1 zeromq: add C++ bindings
Hi Baruch,
Quoted 6 lines · Baruch Siach
Quoted 3 lines
config
BR2_PACKAGE_ZEROMQ
bool "zeromq"
- depends onBR2_INSTALL_LIBSTDCPPAlthough only the C binding is bundled with zeromq, the library itself seems to be implemented in C++, so this is not correct.
Ah, yes. Thanks for pointing that out. Will fix in the next iteration.
Simon
PATCH 1/1 zeromq: add C++ bindings
In reply to spdawson at gmail.comSimon,
Quoted 13 lines · spdawson at gmail.com
package/Config.in +1
-0@@ -495,6 +495,7 @@ source "package/mediastreamer/Config.in" endmenu menu "Networking" +source "package/cppzmq/Config.in" source "package/glib-networking/Config.in" source "package/libcgi/Config.in" source "package/libcgicc/Config.in"
package/Config.in source "package/ortp/Config.in" · line 540
Quoted 5 lines
package/Config.in +1
-0@@ -535,6 +536,7 @@ source "package/ortp/Config.in" source "package/slirp/Config.in" source "package/usbredir/Config.in" source "package/zeromq/Config.in" +source "package/zmqpp/Config.in" endmenu
You should probably submit two separate patches for the two separate packages.
package/cppzmq/Config.in line 2
Quoted 9 lines
package/Config.in +0
-0menu "Other"package/cppzmq/Config.in new file +2
-0@@ -0,0 +1,2 @@ +config BR2_PACKAGE_CPPZMQ + bool
Why don't you make this a normal package?
Quoted 1 line
+CPPZMQ_INSTALL_TARGET = NO
Not needed.
package/cppzmq/Config.in
Quoted 8 lines
package/cppzmq/Config.in new file +8
-0+config BR2_PACKAGE_ZEROMQ_CPP + bool "C++ bindings" + depends on BR2_PACKAGE_ZEROMQ + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_CPPZMQ + select BR2_PACKAGE_ZMQPP + help + C++ bindings.
I really believe cppzmq and zmqpp should be normal separate packages, that select the zeromq package. I don't see why we would "invert" the traditional logic we use for all packages.
package/zmqpp/Config.in line 2
Quoted 7 lines
new file mode 100644
index 0000000..954cf29package/zmqpp/Config.in new file +2
-0@@ -0,0 +1,2 @@ +config BR2_PACKAGE_ZMQPP + bool
Same thing for zmqpp.
package/zmqpp/Config.in
Quoted 3 lines
package/zmqpp/Config.in new file +3
-0+define ZMQPP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(ZMQPP_MAKE_ENV) $(MAKE) $(ZMQPP_MAKE_OPT) -C $(@D) +endef
I'm surprised, you're not passing CC, CXX and al. ? Not needed?
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 zeromq: add C++ bindings
Hi Thomas,
Quoted 3 lines · Thomas Petazzoni
I really believe cppzmq and zmqpp should be normal separate packages, that select the zeromq package. I don't see why we would "invert" the traditional logic we use for all packages.
Okay; I'll make them separate packages then.
Quoted 5 lines
package/zmqpp/zmqpp.mk line 18
Quoted 3 lines
package/zmqpp/zmqpp.mk new file +3
-0+define ZMQPP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(ZMQPP_MAKE_ENV) $(MAKE) $(ZMQPP_MAKE_OPT) -C $(@D) +endefI'm surprised, you're not passing CC, CXX and al. ? Not needed?
Hmm. You're quite right --- this doesn't work at all. Will fix in the next iteration.
Thanks for the feedback.
Simon.
PATCH 1/1 zeromq: add C++ bindings
In reply to spdawson at gmail.comHi, Simon!
2013/3/18 <[email protected]>
package/zeromq/Config.in line 2
Quoted 7 lines
package/zeromq/Config.in +0
-2@@ -1,9 +1,8 @@ -comment "zeromq requires a toolchain with C++, LARGEFILE + WCHAR support" - depends on !(BR2_INSTALL_LIBSTDCPP && BR2_LARGEFILE &&
BR2_USE_WCHAR)
package/zeromq/Config.in line 2
Quoted 2 lines
package/zeromq/Config.in +2
-0+comment "zeromq requires a toolchain with LARGEFILE and WCHAR support" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
Doesn't zeromq 3.2.x also require BR2_INET_IPV6, like you posted earlier?
--
Best regards,
Alexander Lukichev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130319/d3ff5716/attachment.html>
PATCH 1/1 zeromq: add C++ bindings
Hi Alexander,
Quoted 4 lines · Alexander Lukichev
package/zeromq/Config.in line 2
Quoted 2 lines
package/zeromq/Config.in +2
-0+comment "zeromq requires a toolchain with LARGEFILE and WCHAR support" + depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)Doesn't zeromq 3.2.x also require
BR2_INET_IPV6, like you posted earlier?
Yes, you're quite right; but this patch has been superseded now.
Simon.