summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Dawson <spdawson@gmail.com>2013-03-25 13:28:03 (GMT)
committer Peter Korsgaard <jacmet@sunsite.dk>2013-03-27 08:54:27 (GMT)
commita427c0e62182979f982961c5fed4909a0ccf28be (patch)
tree7b2171565a452f51acffcf1330f27cc582a205f7
parent5514b7a520dea993e05d6fcddc40e4d55f467b7c (diff)
downloadbuildroot-a427c0e62182979f982961c5fed4909a0ccf28be.tar.gz
buildroot-a427c0e62182979f982961c5fed4909a0ccf28be.tar.bz2
zmqpp: new package
Now that zeromq has been bumped to version 3.2.2, we need to provide the C++ binding using a separate package. The zmqpp package provides a high-level C++ wrapper library around the zeromq C API. Signed-off-by: Simon Dawson <spdawson@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
-rw-r--r--package/Config.in1
-rw-r--r--package/zmqpp/Config.in32
-rw-r--r--package/zmqpp/zmqpp-fix-typos-in-code.patch46
-rw-r--r--package/zmqpp/zmqpp.mk54
4 files changed, 133 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index 23c9bb3..77dc0d3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -538,6 +538,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/zmqpp/Config.in b/package/zmqpp/Config.in
new file mode 100644
index 0000000..7a12462
--- /dev/null
+++ b/package/zmqpp/Config.in
@@ -0,0 +1,32 @@
+config BR2_PACKAGE_ZMQPP
+ bool "zmqpp"
+ depends on !BR2_avr32 # compiler needs c++0x support
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_INET_IPV6 # zeromq
+ depends on BR2_LARGEFILE # util-linux
+ depends on BR2_USE_WCHAR # util-linux
+ select BR2_PACKAGE_ZEROMQ
+ help
+ C++ binding for zeromq (ZeroMQ, 0MQ, zmq).
+
+ This C++ binding is a 'high-level' library that hides most of the
+ C-style interface core zeromq provides.
+
+ http://github.com/benjamg/zmqpp
+
+comment "zmqpp requires a toolchain with C++, IPV6, LARGEFILE and WCHAR support"
+ depends on !(BR2_INSTALL_LIBSTDCPP && BR2_INET_IPV6 && BR2_LARGEFILE \
+ && BR2_USE_WCHAR)
+
+config BR2_PACKAGE_ZMQPP_CLIENT
+ bool "zmqpp client"
+ depends on BR2_PACKAGE_ZMQPP
+ depends on BR2_TOOLCHAIN_HAS_THREADS # boost
+ select BR2_PACKAGE_BOOST
+ select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+ help
+ Build and install the zmqpp client, a command line tool that can be
+ used to listen or send to zeromq sockets.
+
+comment "zmqpp client requires a toolchain with thread support"
+ depends on BR2_PACKAGE_ZMQPP && !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/zmqpp/zmqpp-fix-typos-in-code.patch b/package/zmqpp/zmqpp-fix-typos-in-code.patch
new file mode 100644
index 0000000..a873de9
--- /dev/null
+++ b/package/zmqpp/zmqpp-fix-typos-in-code.patch
@@ -0,0 +1,46 @@
+Fix a couple of typos in the zmqpp source code.
+
+Signed-off-by: Simon Dawson <spdawson@gmail.com>
+
+diff -Nurp a/src/zmqpp/socket.cpp b/src/zmqpp/socket.cpp
+--- a/src/zmqpp/socket.cpp 2012-12-11 11:06:23.000000000 +0000
++++ b/src/zmqpp/socket.cpp 2013-03-18 17:32:01.464761776 +0000
+@@ -587,7 +587,7 @@ void socket::get(socket_option const& op
+ }
+ }
+
+-socket::socket(socket&& source) noexcept
++socket::socket(socket& source) noexcept
+ : _socket(source._socket)
+ , _type(source._type)
+ , _recv_buffer()
+@@ -601,7 +601,7 @@ socket::socket(socket&& source) noexcept
+ source._socket = nullptr;
+ }
+
+-socket& socket::operator=(socket&& source) noexcept
++socket& socket::operator=(socket& source) noexcept
+ {
+ _socket = source._socket;
+ source._socket = nullptr;
+diff -Nurp a/src/zmqpp/socket.hpp b/src/zmqpp/socket.hpp
+--- a/src/zmqpp/socket.hpp 2012-12-11 11:06:23.000000000 +0000
++++ b/src/zmqpp/socket.hpp 2013-03-18 17:31:53.556790457 +0000
+@@ -400,7 +400,7 @@ public:
+ *
+ * \param source target socket to steal internals from
+ */
+- socket(socket&& source) noexcept;
++ socket(socket& source) noexcept;
+
+ /*!
+ * Move operator
+@@ -413,7 +413,7 @@ public:
+ * \param source target socket to steal internals from
+ * \return socket reference to this
+ */
+- socket& operator=(socket&& source) noexcept;
++ socket& operator=(socket& source) noexcept;
+
+ /*!
+ * Check the socket is still valid
diff --git a/package/zmqpp/zmqpp.mk b/package/zmqpp/zmqpp.mk
new file mode 100644
index 0000000..c64b256
--- /dev/null
+++ b/package/zmqpp/zmqpp.mk
@@ -0,0 +1,54 @@
+#############################################################
+#
+# 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 = LD="$(TARGET_CXX)" BUILD_PATH=./build PREFIX=/usr
+
+ifeq ($(BR2_PACKAGE_ZMQPP_CLIENT),y)
+ZMQPP_DEPENDENCIES += boost
+endif
+
+define ZMQPP_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ $(ZMQPP_MAKE_OPT) $(if $(BR2_PACKAGE_ZMQPP_CLIENT),all) -C $(@D)
+endef
+
+define ZMQPP_INSTALL_TARGET_CMDS
+ $(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/include/zmqpp
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ $(ZMQPP_MAKE_OPT) DESTDIR=$(TARGET_DIR) install -C $(@D)
+endef
+
+define ZMQPP_UNINSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ $(ZMQPP_MAKE_OPT) DESTDIR=$(TARGET_DIR) 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) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ $(ZMQPP_MAKE_OPT) DESTDIR=$(STAGING_DIR) install -C $(@D)
+endef
+
+define ZMQPP_UNINSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+ $(ZMQPP_MAKE_OPT) DESTDIR=$(STAGING_DIR) uninstall -C $(@D)
+ $(RM) $(STAGING_DIR)/usr/include/zmqpp
+endef
+
+define ZMQPP_CLEAN_CMDS
+ $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) $(ZMQPP_MAKE_OPT) \
+ clean -C $(@D)
+endef
+
+$(eval $(generic-package))