azmq: Add new package
authorRJ Ascani <rj.ascani@gmail.com>
Fri, 28 Jul 2017 18:04:59 +0000 (11:04 -0700)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thu, 3 Aug 2017 07:12:13 +0000 (09:12 +0200)
The azmq library provides Boost Asio style bindings for ZeroMQ. This
library is built on top of ZeroMQ's standard C interface and is intended
to work well with C++ applications which use the Boost libraries in
general, and Asio in particular.

Signed-off-by: RJ Ascani <rj.ascani@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
DEVELOPERS
package/Config.in
package/azmq/0001-Conditionally-disable-test-and-doc-builds.patch [new file with mode: 0644]
package/azmq/Config.in [new file with mode: 0644]
package/azmq/azmq.hash [new file with mode: 0644]
package/azmq/azmq.mk [new file with mode: 0644]

index ee2c9a05550c5e2c4a2ededaf620c6a00053f8fb..474999b5b7e81c778991d160207e7feb30f53489 100644 (file)
@@ -1426,6 +1426,9 @@ N:        Rico Bachmann <bachmann@tofwerk.com>
 F:     package/apr-util/
 F:     package/subversion/
 
+N:     RJ Ascani <rj.ascani@gmail.com>
+F:     package/azmq/
+
 N:     Rodrigo Rebello <rprebello@gmail.com>
 F:     package/chocolate-doom/
 F:     package/irssi/
index b5170b044c7747827841ef20324edd873f6eab33..85416afdf4976e1e42af34270437a1f65d6624c6 100644 (file)
@@ -1284,6 +1284,7 @@ menu "Networking"
        source "package/alljoyn-base/Config.in"
        source "package/alljoyn-tcl/Config.in"
        source "package/alljoyn-tcl-base/Config.in"
+       source "package/azmq/Config.in"
        source "package/azure-iot-sdk-c/Config.in"
        source "package/batman-adv/Config.in"
        source "package/c-ares/Config.in"
diff --git a/package/azmq/0001-Conditionally-disable-test-and-doc-builds.patch b/package/azmq/0001-Conditionally-disable-test-and-doc-builds.patch
new file mode 100644 (file)
index 0000000..98975d2
--- /dev/null
@@ -0,0 +1,43 @@
+From d960f93fb52e373f76cfedbee5f4fb0c5276856a Mon Sep 17 00:00:00 2001
+From: RJ Ascani <rj.ascani@gmail.com>
+Date: Thu, 20 Jul 2017 15:53:40 -0700
+Subject: [PATCH] Conditionally disable test and doc builds
+
+Signed-off-by: RJ Ascani <rj.ascani@gmail.com>
+---
+ CMakeLists.txt | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5b5b9cc..97006a4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,7 +49,9 @@ include_directories(${Boost_INCLUDE_DIRS}
+                     ${ZeroMQ_INCLUDE_DIRS}
+                     ${PROJECT_SOURCE_DIR})
+
+-enable_testing()
++if (BUILD_TESTING)
++    enable_testing()
++endif()
+
+ macro(add_catch_test name)
+     if (TEST_REPORT_FORMAT)
+@@ -59,8 +61,12 @@ macro(add_catch_test name)
+     endif()
+ endmacro()
+
+-add_subdirectory(test)
+-add_subdirectory(doc)
++if (BUILD_TESTING)
++    add_subdirectory(test)
++endif()
++if (BUILD_DOC)
++    add_subdirectory(doc)
++endif()
+
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/azmq
+         DESTINATION include)
+--
+2.13.3
+
diff --git a/package/azmq/Config.in b/package/azmq/Config.in
new file mode 100644 (file)
index 0000000..422a058
--- /dev/null
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_AZMQ
+       bool "azmq"
+       depends on BR2_INSTALL_LIBSTDCPP
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC
+       depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq
+       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+       depends on BR2_USE_WCHAR # boost
+       depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
+       select BR2_PACKAGE_ZEROMQ
+       select BR2_PACKAGE_BOOST
+       select BR2_PACKAGE_BOOST_CHRONO
+       select BR2_PACKAGE_BOOST_DATE_TIME
+       select BR2_PACKAGE_BOOST_LOG
+       select BR2_PACKAGE_BOOST_RANDOM
+       select BR2_PACKAGE_BOOST_REGEX
+       select BR2_PACKAGE_BOOST_SYSTEM
+       select BR2_PACKAGE_BOOST_THREAD
+       help
+         This library provides Boost Asio style bindings for ZeroMQ.
+
+         https://github.com/zeromq/azmq
+
+comment "azmq needs a toolchain w/ C++11, wchar and threads"
+       depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
+               && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS)
+
+comment "azmq needs exception_ptr"
+       depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
diff --git a/package/azmq/azmq.hash b/package/azmq/azmq.hash
new file mode 100644 (file)
index 0000000..d3993f4
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally calculated
+# https://github.com/zeromq/azmq/archive/v1.0.tar.gz
+sha256 c204c731bcb7810ca3a2c5515e88974ef2ff8d0589e60a897dc238b369180e7b  azmq-v1.0.tar.gz
diff --git a/package/azmq/azmq.mk b/package/azmq/azmq.mk
new file mode 100644 (file)
index 0000000..427ad0f
--- /dev/null
@@ -0,0 +1,18 @@
+################################################################################
+#
+# azmq
+#
+################################################################################
+
+AZMQ_VERSION = v1.0
+AZMQ_SITE = $(call github,zeromq,azmq,$(AZMQ_VERSION))
+AZMQ_DEPENDENCIES = boost zeromq
+AZMQ_LICENSE = BSL-1.0
+AZMQ_LICENSE_FILES = LICENSE-BOOST_1_0
+
+# AZMQ is a header only library, so it does not need to be installed on the
+# target.
+AZMQ_INSTALL_STAGING = YES
+AZMQ_INSTALL_TARGET = NO
+
+$(eval $(cmake-package))