diff mbox series

[meta-swupdate] Addition of nng library to meta-swupdate.

Message ID 20190401141838.15156-1-Wojciech.Michna@assaabloy.com
State Changes Requested
Headers show
Series [meta-swupdate] Addition of nng library to meta-swupdate. | expand

Commit Message

Wojciech Michna April 1, 2019, 2:18 p.m. UTC
From: "Michna, Wojciech" <Wojciech.Michna@assaabloy.com>

This patch adds nanomsg-next-generation (https://github.com/nanomsg/nng) library to meta-swupdate.

Signed-off-by: Wojciech Michna <Wojciech.Michna@assaabloy.com>
---
 recipes-connectivity/nng/nng_1.1.1.bb | 33 +++++++++++++++++++++++++++
 recipes-support/swupdate/swupdate.inc |  4 ++++
 2 files changed, 37 insertions(+)
 create mode 100644 recipes-connectivity/nng/nng_1.1.1.bb
diff mbox series

Patch

diff --git a/recipes-connectivity/nng/nng_1.1.1.bb b/recipes-connectivity/nng/nng_1.1.1.bb
new file mode 100644
index 0000000..6105c0f
--- /dev/null
+++ b/recipes-connectivity/nng/nng_1.1.1.bb
@@ -0,0 +1,33 @@ 
+SUMMARY = "nanomsg-next-gen"
+DESCRIPTION = "NNG, like its predecessors nanomsg (and to some extent ZeroMQ), \
+is a lightweight, broker-less library, offering a simple API to solve common \
+recurring messaging problems, such as publish/subscribe, RPC-style request/reply, \
+or service discovery. The API frees the programmer from worrying about details \
+like connection management, retries, and other common considerations, \
+so that they can focus on the application instead of the plumbing."
+HOMEPAGE = "https://nanomsg.github.io/nng/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a19b15be6e844b39a54de2ef665bd6de"
+
+SECTION = "libs/networking"
+
+SRC_URI = "git://github.com/nanomsg/nng.git;protocol=https"
+SRCREV = "8a9fd805d96201c780610b765f9e6dd9f2eda642"
+
+S = "${WORKDIR}/git"
+
+inherit cmake pkgconfig
+
+# nanomsg documentation generation requires asciidoctor,
+# not asciidoc, and currently there's no asciidoctor-native
+# recipe anywhere in openembedded-core or meta-openembedded
+EXTRA_OECMAKE = " -DNN_ENABLE_DOC=OFF "
+
+OECMAKE_GENERATOR = "Unix Makefiles"
+EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS:BOOL=ON "
+
+# we don't want nanomsg-tools to be renamed to libnanomsg-tools
+DEBIAN_NOAUTONAME_${PN}-tools = "1"
+
+PACKAGES =+ "${PN}-tools"
+FILES_${PN}-tools = "${bindir}/*"
diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc
index 6c675c1..90c0f4c 100644
--- a/recipes-support/swupdate/swupdate.inc
+++ b/recipes-support/swupdate/swupdate.inc
@@ -66,6 +66,10 @@  python () {
         depends = d.getVar('DEPENDS', False)
         d.setVar('DEPENDS', depends + ' libarchive')
 
+    if 'CONFIG_NNG_HANDLER=y\n' in features:
+        depends = d.getVar('DEPENDS', False)
+        d.setVar('DEPENDS', depends + ' nng')
+
     if 'CONFIG_LUA=y\n' in features:
         depends = d.getVar('DEPENDS', False)
         d.setVar('DEPENDS', depends + ' lua')