package/zeromq: add websocket option
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Fri, 22 Jan 2021 22:37:23 +0000 (23:37 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 23 Jan 2021 17:05:39 +0000 (18:05 +0100)
websocket support is available since version 4.3.3 and
https://github.com/zeromq/libzmq/commit/9be833493877258af3bc6acdc65565db6674768d
It is enabled if --enable-drafts is passed by the user.

websocket can use libnss or gnutls instead of its builtin SHA1 since
https://github.com/zeromq/libzmq/commit/7296fb5b151920a4a8d272da69196df8ca155aa1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/zeromq/Config.in
package/zeromq/zeromq.mk

index aeedff17b8e4729531c28c48e4e4813da27da046..cf5c644c39bf6dd59901ee48c65e19a802c5af49 100644 (file)
@@ -59,4 +59,9 @@ config BR2_PACKAGE_ZEROMQ_DRAFTS
 
          https://pyzmq.readthedocs.io/en/latest/draft.html
 
+config BR2_PACKAGE_ZEROMQ_WEBSOCKET
+       bool "WebSocket support"
+       help
+         Enable WebSocket transport
+
 endif
index 4eb6931f1d7ecd8ee7fa0741a1eca64be3087512..fa72a41f239d5c35a41b9da141888fb5568e1527 100644 (file)
@@ -53,6 +53,19 @@ else
 ZEROMQ_CONF_OPTS += --disable-drafts
 endif
 
+ifeq ($(BR2_PACKAGE_ZEROMQ_WEBSOCKET),y)
+ZEROMQ_CONF_OPTS += --enable-ws
+else
+ZEROMQ_CONF_OPTS += --disable-ws
+endif
+
+ifeq ($(BR2_PACKAGE_GNUTLS),y)
+ZEROMQ_DEPENDENCIES += host-pkgconf gnutls
+ZEROMQ_CONF_OPTS += --with-tls
+else
+ZEROMQ_CONF_OPTS += --without-tls
+endif
+
 ifeq ($(BR2_PACKAGE_LIBBSD),y)
 ZEROMQ_DEPENDENCIES += host-pkgconf libbsd
 ZEROMQ_CONF_OPTS += --enable-libbsd
@@ -60,6 +73,13 @@ else
 ZEROMQ_CONF_OPTS += --disable-libbsd
 endif
 
+ifeq ($(BR2_PACKAGE_LIBNSS),y)
+ZEROMQ_DEPENDENCIES += host-pkgconf libnss
+ZEROMQ_CONF_OPTS += --with-nss
+else
+ZEROMQ_CONF_OPTS += --without-nss
+endif
+
 # ZeroMQ uses libsodium if it's available.
 ifeq ($(BR2_PACKAGE_LIBSODIUM),y)
 ZEROMQ_DEPENDENCIES += libsodium