summaryrefslogtreecommitdiffstats
path: root/package/zmqpp
diff options
context:
space:
mode:
Diffstat (limited to 'package/zmqpp')
-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
3 files changed, 132 insertions, 0 deletions
diff --git a/package/zmqpp/Config.in b/package/zmqpp/Config.in
new file mode 100644
index 000000000..7a124621e
--- /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 000000000..a873de9d5
--- /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 000000000..c64b25612
--- /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))