package/libuwsc: new package
authorJianhui Zhao <zhaojh329@gmail.com>
Sat, 14 Sep 2019 16:23:02 +0000 (00:23 +0800)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 29 Mar 2020 21:18:26 +0000 (23:18 +0200)
Signed-off-by: Jianhui zhao <zhaojh329@gmail.com>
[Thomas:
 - add entry in DEVELOPERS file
 - be more explicit with SSL options
 - drop logic around luainterpreter since luajit is not properly
   detected]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/libuwsc/Config.in [new file with mode: 0644]
package/libuwsc/libuwsc.hash [new file with mode: 0644]
package/libuwsc/libuwsc.mk [new file with mode: 0644]

index 6d4718a1ef3016e05a26bbac9e1f1c6f4923779e..f1bf5c263cb85a09d2c0c6c1eb3c7a6059521198 100644 (file)
@@ -1273,6 +1273,7 @@ F:        package/x11r7/xdriver_xf86-video-imx/
 F:     package/x11r7/xdriver_xf86-video-imx-viv/
 
 N:     Jianhui Zhao <zhaojh329@gmail.com>
+F:     package/libuwsc/
 F:     package/rtty/
 
 N:     Joao Pinto <jpinto@synopsys.com>
index b81952b5e1bb4104d6c7c3bbafc2ff275389dc00..4aaf2d93f8729d7c86fec8b26093d82c54d51a2a 100644 (file)
@@ -1717,6 +1717,7 @@ menu "Networking"
        source "package/libupnp18/Config.in"
        source "package/libupnpp/Config.in"
        source "package/liburiparser/Config.in"
+       source "package/libuwsc/Config.in"
        source "package/libvncserver/Config.in"
        source "package/libwebsock/Config.in"
        source "package/libwebsockets/Config.in"
diff --git a/package/libuwsc/Config.in b/package/libuwsc/Config.in
new file mode 100644 (file)
index 0000000..ae99b6d
--- /dev/null
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBUWSC
+       bool "libuwsc"
+       select BR2_PACKAGE_LIBEV
+       help
+         A Lightweight and fully asynchronous WebSocket client
+         library based on libev.
+
+         https://github.com/zhaojh329/libuwsc
diff --git a/package/libuwsc/libuwsc.hash b/package/libuwsc/libuwsc.hash
new file mode 100644 (file)
index 0000000..f137b36
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 bae2cd13eda86876ebcf99a38a069f5e8c01717713d2fec25031051b9c47624b  libuwsc-3.3.2.tar.gz
+sha256 e557975decde6439395e72dce7690d974d1a493722a7be5228794ec944f0c5db  LICENSE
diff --git a/package/libuwsc/libuwsc.mk b/package/libuwsc/libuwsc.mk
new file mode 100644 (file)
index 0000000..213b1d5
--- /dev/null
@@ -0,0 +1,46 @@
+################################################################################
+#
+# libuwsc
+#
+################################################################################
+
+LIBUWSC_VERSION = 3.3.2
+LIBUWSC_SITE = https://github.com/zhaojh329/libuwsc/releases/download/v$(LIBUWSC_VERSION)
+LIBUWSC_LICENSE = MIT
+LIBUWSC_LICENSE_FILES = LICENSE
+LIBUWSC_INSTALL_STAGING = YES
+LIBUWSC_DEPENDENCIES = libev
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+LIBUWSC_DEPENDENCIES += openssl
+LIBUWSC_CONF_OPTS += \
+       -DUWSC_SSL_SUPPORT=ON \
+       -DUWSC_USE_MBEDTLS=OFF \
+       -DUWSC_USE_OPENSSL=ON \
+       -DUWSC_USE_WOLFSSL=OFF
+else ifeq ($(BR2_PACKAGE_WOLFSSL),y)
+LIBUWSC_DEPENDENCIES += wolfssl
+LIBUWSC_CONF_OPTS += \
+       -DUWSC_SSL_SUPPORT=ON \
+       -DUWSC_USE_MBEDTLS=OFF \
+       -DUWSC_USE_OPENSSL=OFF \
+       -DUWSC_USE_WOLFSSL=ON
+else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
+LIBUWSC_DEPENDENCIES += mbedtls
+LIBUWSC_CONF_OPTS += \
+       -DUWSC_SSL_SUPPORT=ON \
+       -DUWSC_USE_MBEDTLS=ON \
+       -DUWSC_USE_OPENSSL=OFF \
+       -DUWSC_USE_WOLFSSL=OFF
+else
+LIBUWSC_CONF_OPTS += -DUWSC_SSL_SUPPORT=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LUA),y)
+LIBUWSC_DEPENDENCIES += lua
+LIBUWSC_CONF_OPTS += -DUWSC_LUA_SUPPORT=ON
+else
+LIBUWSC_CONF_OPTS += -DUWSC_LUA_SUPPORT=OFF
+endif
+
+$(eval $(cmake-package))