* [Buildroot] [PATCH] zeromq: add C++ bindings
@ 2013-03-18 14:56 spdawson at gmail.com
2013-03-18 15:27 ` Baruch Siach
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: spdawson at gmail.com @ 2013-03-18 14:56 UTC (permalink / raw)
To: buildroot
From: Simon Dawson <spdawson@gmail.com>
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.
Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
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
diff --git a/package/Config.in b/package/Config.in
index 9853b06..9519852 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/cppzmq/Config.in b/package/cppzmq/Config.in
new file mode 100644
index 0000000..6ec168e
--- /dev/null
+++ b/package/cppzmq/Config.in
@@ -0,0 +1,2 @@
+config BR2_PACKAGE_CPPZMQ
+ bool
diff --git a/package/cppzmq/cppzmq.mk b/package/cppzmq/cppzmq.mk
new file mode 100644
index 0000000..b4540ca
--- /dev/null
+++ b/package/cppzmq/cppzmq.mk
@@ -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))
diff --git a/package/zeromq/Config.in b/package/zeromq/Config.in
index b7dc8a6..db2384e 100644
--- a/package/zeromq/Config.in
+++ b/package/zeromq/Config.in
@@ -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.
diff --git a/package/zmqpp/Config.in b/package/zmqpp/Config.in
new file mode 100644
index 0000000..954cf29
--- /dev/null
+++ b/package/zmqpp/Config.in
@@ -0,0 +1,2 @@
+config BR2_PACKAGE_ZMQPP
+ bool
diff --git a/package/zmqpp/zmqpp.mk b/package/zmqpp/zmqpp.mk
new file mode 100644
index 0000000..639ab2f
--- /dev/null
+++ b/package/zmqpp/zmqpp.mk
@@ -0,0 +1,48 @@
+#############################################################
+#
+# zmqpp
+#
+#############################################################
+
+ZMQPP_VERSION = 31220ca
+ZMQPP_SITE = git://github.com/benjamg/zmqpp.git
+ZMQPP_INSTALL_STAGING = YES
+ZMQPP_DEPENDENCIES = zeromq
+ZMQPP_LICENSE = MIT
+ZMQPP_LICENSE_FILES = LICENSE
+
+ZMQPP_MAKE_OPT = $(if $(BR2_PACKAGE_ZMQPP_CLIENT),all)
+
+define ZMQPP_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(ZMQPP_MAKE_ENV) $(MAKE) $(ZMQPP_MAKE_OPT) -C $(@D)
+endef
+
+define ZMQPP_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/include/zmqpp
+ $(TARGET_MAKE_ENV) $(ZMQPP_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) \
+ PREFIX=/usr install -C $(@D)
+endef
+
+define ZMQPP_UNINSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(ZMQPP_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) \
+ PREFIX=/usr uninstall -C $(@D)
+ $(RM) $(TARGET_DIR)/usr/include/zmqpp
+endef
+
+define ZMQPP_INSTALL_STAGING_CMDS
+ $(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/include/zmqpp
+ $(TARGET_MAKE_ENV) $(ZMQPP_MAKE_ENV) $(MAKE) DESTDIR=$(STAGING_DIR) \
+ PREFIX=/usr install -C $(@D)
+endef
+
+define ZMQPP_UNINSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(ZMQPP_MAKE_ENV) $(MAKE) DESTDIR=$(STAGING_DIR) \
+ PREFIX=/usr uninstall -C $(@D)
+ $(RM) $(STAGING_DIR)/usr/include/zmqpp
+endef
+
+define ZMQPP_CLEAN_CMDS
+ $(TARGET_MAKE_ENV) $(ZMQPP_MAKE_ENV) $(MAKE) clean -C $(@D)
+endef
+
+$(eval $(generic-package))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] zeromq: add C++ bindings
2013-03-18 14:56 [Buildroot] [PATCH] zeromq: add C++ bindings spdawson at gmail.com
@ 2013-03-18 15:27 ` Baruch Siach
2013-03-18 16:39 ` Simon Dawson
2013-03-18 16:06 ` Thomas Petazzoni
2013-03-19 5:42 ` Alexander Lukichev
2 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2013-03-18 15:27 UTC (permalink / raw)
To: buildroot
Hi Simon,
On Mon, Mar 18, 2013 at 02:56:57PM +0000, spdawson at gmail.com wrote:
> From: Simon Dawson <spdawson@gmail.com>
>
> 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.
>
> Signed-off-by: Simon Dawson <spdawson@gmail.com>
> ---
[...]
> --- a/package/zeromq/Config.in
> +++ b/package/zeromq/Config.in
> @@ -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
--
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 -
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] zeromq: add C++ bindings
2013-03-18 14:56 [Buildroot] [PATCH] zeromq: add C++ bindings spdawson at gmail.com
2013-03-18 15:27 ` Baruch Siach
@ 2013-03-18 16:06 ` Thomas Petazzoni
2013-03-18 16:41 ` Simon Dawson
2013-03-19 5:42 ` Alexander Lukichev
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2013-03-18 16:06 UTC (permalink / raw)
To: buildroot
Simon,
On Mon, 18 Mar 2013 14:56:57 +0000, spdawson at gmail.com wrote:
> diff --git a/package/Config.in b/package/Config.in
> index 9853b06..9519852 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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
You should probably submit two separate patches for the two separate
packages.
> menu "Other"
> diff --git a/package/cppzmq/Config.in b/package/cppzmq/Config.in
> new file mode 100644
> index 0000000..6ec168e
> --- /dev/null
> +++ b/package/cppzmq/Config.in
> @@ -0,0 +1,2 @@
> +config BR2_PACKAGE_CPPZMQ
> + bool
Why don't you make this a normal package?
> +CPPZMQ_INSTALL_TARGET = NO
Not needed.
> +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.
> new file mode 100644
> index 0000000..954cf29
> --- /dev/null
> +++ b/package/zmqpp/Config.in
> @@ -0,0 +1,2 @@
> +config BR2_PACKAGE_ZMQPP
> + bool
Same thing for zmqpp.
> +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
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] zeromq: add C++ bindings
2013-03-18 15:27 ` Baruch Siach
@ 2013-03-18 16:39 ` Simon Dawson
0 siblings, 0 replies; 7+ messages in thread
From: Simon Dawson @ 2013-03-18 16:39 UTC (permalink / raw)
To: buildroot
Hi Baruch,
On 18 March 2013 15:27, Baruch Siach <baruch@tkos.co.il> wrote:
>> 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.
Ah, yes. Thanks for pointing that out. Will fix in the next iteration.
Simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] zeromq: add C++ bindings
2013-03-18 16:06 ` Thomas Petazzoni
@ 2013-03-18 16:41 ` Simon Dawson
0 siblings, 0 replies; 7+ messages in thread
From: Simon Dawson @ 2013-03-18 16:41 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On 18 March 2013 16:06, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> 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.
>> +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?
Hmm. You're quite right --- this doesn't work at all. Will fix in the
next iteration.
Thanks for the feedback.
Simon.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] zeromq: add C++ bindings
2013-03-18 14:56 [Buildroot] [PATCH] zeromq: add C++ bindings spdawson at gmail.com
2013-03-18 15:27 ` Baruch Siach
2013-03-18 16:06 ` Thomas Petazzoni
@ 2013-03-19 5:42 ` Alexander Lukichev
2013-03-19 7:27 ` Simon Dawson
2 siblings, 1 reply; 7+ messages in thread
From: Alexander Lukichev @ 2013-03-19 5:42 UTC (permalink / raw)
To: buildroot
Hi, Simon!
2013/3/18 <spdawson@gmail.com>
> diff --git a/package/zeromq/Config.in b/package/zeromq/Config.in
> index b7dc8a6..db2384e 100644
> --- a/package/zeromq/Config.in
> +++ b/package/zeromq/Config.in
> @@ -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)
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH] zeromq: add C++ bindings
2013-03-19 5:42 ` Alexander Lukichev
@ 2013-03-19 7:27 ` Simon Dawson
0 siblings, 0 replies; 7+ messages in thread
From: Simon Dawson @ 2013-03-19 7:27 UTC (permalink / raw)
To: buildroot
Hi Alexander,
On 19 March 2013 05:42, Alexander Lukichev <alexander.lukichev@gmail.com> wrote:
>> +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.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-03-19 7:27 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-18 14:56 [Buildroot] [PATCH] zeromq: add C++ bindings spdawson at gmail.com
2013-03-18 15:27 ` Baruch Siach
2013-03-18 16:39 ` Simon Dawson
2013-03-18 16:06 ` Thomas Petazzoni
2013-03-18 16:41 ` Simon Dawson
2013-03-19 5:42 ` Alexander Lukichev
2013-03-19 7:27 ` Simon Dawson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox