summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-11-02 12:32:20 +0000
committernia <nia@pkgsrc.org>2020-11-02 12:32:20 +0000
commit73536e6fc9fba3ce61ca9fdfd9d7906a66d7bd9a (patch)
tree342649485b5c7f8e44b557a1f6fff0916bea0dd2
parent08820593b114be9cb11825aa6b18594928f3417f (diff)
downloadpkgsrc-73536e6fc9fba3ce61ca9fdfd9d7906a66d7bd9a.tar.gz
www: add libwebsockets
Libwebsockets (LWS) is a flexible, lightweight pure C library for implementing modern network protocols easily with a tiny footprint, using a nonblocking event loop. It has been developed continuously since 2010 and is used in tens of millions of devices and by thousands of developers around the world.
-rw-r--r--www/Makefile3
-rw-r--r--www/libwebsockets/DESCR4
-rw-r--r--www/libwebsockets/Makefile36
-rw-r--r--www/libwebsockets/PLIST91
-rw-r--r--www/libwebsockets/buildlink3.mk14
-rw-r--r--www/libwebsockets/distinfo7
-rw-r--r--www/libwebsockets/patches/patch-lib_core_context.c15
7 files changed, 169 insertions, 1 deletions
diff --git a/www/Makefile b/www/Makefile
index 797c3b6b26a..9400c3677c8 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1492 2020/10/08 22:36:54 leot Exp $
+# $NetBSD: Makefile,v 1.1493 2020/11/02 12:32:20 nia Exp $
#
COMMENT= Packages related to the World Wide Web
@@ -189,6 +189,7 @@ SUBDIR+= libproxy
SUBDIR+= libpsl
SUBDIR+= librest07
SUBDIR+= libsass
+SUBDIR+= libwebsockets
SUBDIR+= libwww
SUBDIR+= liferea
SUBDIR+= lighttpd
diff --git a/www/libwebsockets/DESCR b/www/libwebsockets/DESCR
new file mode 100644
index 00000000000..d798f420e57
--- /dev/null
+++ b/www/libwebsockets/DESCR
@@ -0,0 +1,4 @@
+Libwebsockets (LWS) is a flexible, lightweight pure C library for implementing
+modern network protocols easily with a tiny footprint, using a nonblocking
+event loop. It has been developed continuously since 2010 and is used in
+tens of millions of devices and by thousands of developers around the world.
diff --git a/www/libwebsockets/Makefile b/www/libwebsockets/Makefile
new file mode 100644
index 00000000000..5f3b38948ad
--- /dev/null
+++ b/www/libwebsockets/Makefile
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1 2020/11/02 12:32:20 nia Exp $
+
+DISTNAME= libwebsockets-4.1.4
+CATEGORIES= www
+MASTER_SITES= ${MASTER_SITE_GITHUB:=warmcat/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://libwebsockets.org/
+COMMENT= Lightweight C library for websocket clients and servers
+LICENSE= mit
+
+USE_CMAKE= yes
+USE_TOOLS+= pkg-config
+
+CMAKE_ARGS+= -DLWS_WITH_LIBUV=ON
+
+# Not building from a git checkout, so this is broken.
+CMAKE_ARGS+= -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE
+
+CMAKE_ARGS+= -DLWS_WITHOUT_TESTAPPS=ON
+# Attempts to modify /etc during configure
+CMAKE_ARGS+= -DLWS_WITHOUT_TEST_SERVER=ON
+CMAKE_ARGS+= -DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON
+CMAKE_ARGS+= -DLWS_WITHOUT_TEST_PING=ON
+CMAKE_ARGS+= -DLWS_WITHOUT_TEST_CLIENT=ON
+
+PKGCONFIG_OVERRIDE_STAGE= pre-install
+PKGCONFIG_OVERRIDE+= libwebsockets.pc
+PKGCONFIG_OVERRIDE+= libwebsockets_static.pc
+
+.include "../../devel/libuv/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q}
+.include "../../mk/bsd.pkg.mk"
diff --git a/www/libwebsockets/PLIST b/www/libwebsockets/PLIST
new file mode 100644
index 00000000000..385d952800a
--- /dev/null
+++ b/www/libwebsockets/PLIST
@@ -0,0 +1,91 @@
+@comment $NetBSD: PLIST,v 1.1 2020/11/02 12:32:20 nia Exp $
+include/libwebsockets.h
+include/libwebsockets/abstract/abstract.h
+include/libwebsockets/abstract/protocols.h
+include/libwebsockets/abstract/protocols/smtp.h
+include/libwebsockets/abstract/transports.h
+include/libwebsockets/abstract/transports/raw-skt.h
+include/libwebsockets/abstract/transports/unit-test.h
+include/libwebsockets/lws-adopt.h
+include/libwebsockets/lws-async-dns.h
+include/libwebsockets/lws-bb-i2c.h
+include/libwebsockets/lws-bb-spi.h
+include/libwebsockets/lws-button.h
+include/libwebsockets/lws-callbacks.h
+include/libwebsockets/lws-cgi.h
+include/libwebsockets/lws-client.h
+include/libwebsockets/lws-context-vhost.h
+include/libwebsockets/lws-dbus.h
+include/libwebsockets/lws-detailed-latency.h
+include/libwebsockets/lws-diskcache.h
+include/libwebsockets/lws-display.h
+include/libwebsockets/lws-dll2.h
+include/libwebsockets/lws-dsh.h
+include/libwebsockets/lws-eventlib-exports.h
+include/libwebsockets/lws-freertos.h
+include/libwebsockets/lws-fts.h
+include/libwebsockets/lws-genaes.h
+include/libwebsockets/lws-gencrypto.h
+include/libwebsockets/lws-genec.h
+include/libwebsockets/lws-genhash.h
+include/libwebsockets/lws-genrsa.h
+include/libwebsockets/lws-gpio.h
+include/libwebsockets/lws-http.h
+include/libwebsockets/lws-i2c.h
+include/libwebsockets/lws-ili9341-spi.h
+include/libwebsockets/lws-jose.h
+include/libwebsockets/lws-jwe.h
+include/libwebsockets/lws-jwk.h
+include/libwebsockets/lws-jws.h
+include/libwebsockets/lws-led.h
+include/libwebsockets/lws-lejp.h
+include/libwebsockets/lws-logs.h
+include/libwebsockets/lws-lwsac.h
+include/libwebsockets/lws-misc.h
+include/libwebsockets/lws-mqtt.h
+include/libwebsockets/lws-netdev.h
+include/libwebsockets/lws-network-helper.h
+include/libwebsockets/lws-optee.h
+include/libwebsockets/lws-protocols-plugins.h
+include/libwebsockets/lws-purify.h
+include/libwebsockets/lws-pwm.h
+include/libwebsockets/lws-retry.h
+include/libwebsockets/lws-ring.h
+include/libwebsockets/lws-secure-streams-client.h
+include/libwebsockets/lws-secure-streams-policy.h
+include/libwebsockets/lws-secure-streams.h
+include/libwebsockets/lws-sequencer.h
+include/libwebsockets/lws-service.h
+include/libwebsockets/lws-settings.h
+include/libwebsockets/lws-sha1-base64.h
+include/libwebsockets/lws-smd.h
+include/libwebsockets/lws-spa.h
+include/libwebsockets/lws-spi.h
+include/libwebsockets/lws-ssd1306-i2c.h
+include/libwebsockets/lws-state.h
+include/libwebsockets/lws-stats.h
+include/libwebsockets/lws-struct.h
+include/libwebsockets/lws-system.h
+include/libwebsockets/lws-test-sequencer.h
+include/libwebsockets/lws-threadpool.h
+include/libwebsockets/lws-timeout-timer.h
+include/libwebsockets/lws-tokenize.h
+include/libwebsockets/lws-vfs.h
+include/libwebsockets/lws-write.h
+include/libwebsockets/lws-writeable.h
+include/libwebsockets/lws-ws-close.h
+include/libwebsockets/lws-ws-ext.h
+include/libwebsockets/lws-ws-state.h
+include/libwebsockets/lws-x509.h
+include/lws_config.h
+lib/cmake/libwebsockets/LibwebsocketsTargets-noconfig.cmake
+lib/cmake/libwebsockets/LibwebsocketsTargets.cmake
+lib/cmake/libwebsockets/LwsCheckRequirements.cmake
+lib/cmake/libwebsockets/libwebsockets-config-version.cmake
+lib/cmake/libwebsockets/libwebsockets-config.cmake
+lib/libwebsockets-evlib_uv.so
+lib/libwebsockets.a
+lib/libwebsockets.so
+lib/libwebsockets.so.17
+lib/pkgconfig/libwebsockets.pc
+lib/pkgconfig/libwebsockets_static.pc
diff --git a/www/libwebsockets/buildlink3.mk b/www/libwebsockets/buildlink3.mk
new file mode 100644
index 00000000000..9606c392922
--- /dev/null
+++ b/www/libwebsockets/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/11/02 12:32:20 nia Exp $
+
+BUILDLINK_TREE+= libwebsockets
+
+.if !defined(LIBWEBSOCKETS_BUILDLINK3_MK)
+LIBWEBSOCKETS_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libwebsockets+= libwebsockets>=1.7.2
+BUILDLINK_PKGSRCDIR.libwebsockets?= ../../www/libwebsockets
+
+.include "../../security/openssl/buildlink3.mk"
+.endif # LIBWEBSOCKETS_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -libwebsockets
diff --git a/www/libwebsockets/distinfo b/www/libwebsockets/distinfo
new file mode 100644
index 00000000000..2ff61e9889f
--- /dev/null
+++ b/www/libwebsockets/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2020/11/02 12:32:20 nia Exp $
+
+SHA1 (libwebsockets-4.1.4.tar.gz) = 8b9d05000b99a258d457516252d76010d1d14c07
+RMD160 (libwebsockets-4.1.4.tar.gz) = acdda72d912639c77d38032dd6074ceb3c603e32
+SHA512 (libwebsockets-4.1.4.tar.gz) = 4da84f612ad427465c4eea0bdd0db59c21c9e42bb21eb46b904f544dc4078af2c9a957e61430f3569b87cfc96b3addee50ac7a7c77777dcf16350fe441dd8854
+Size (libwebsockets-4.1.4.tar.gz) = 12698800 bytes
+SHA1 (patch-lib_core_context.c) = a0f7067a0ffa65b19a13945bfc1fe0cece5d2869
diff --git a/www/libwebsockets/patches/patch-lib_core_context.c b/www/libwebsockets/patches/patch-lib_core_context.c
new file mode 100644
index 00000000000..06cc7fe6517
--- /dev/null
+++ b/www/libwebsockets/patches/patch-lib_core_context.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-lib_core_context.c,v 1.1 2020/11/02 12:32:20 nia Exp $
+
+Add more stuff to the ifdef mess.
+
+--- lib/core/context.c.orig 2020-10-26 11:31:31.000000000 +0000
++++ lib/core/context.c
+@@ -30,7 +30,7 @@
+
+ static const char *library_version = LWS_LIBRARY_VERSION;
+
+-#if defined(__linux__) || defined(__FreeBSD__) || defined(__illumos__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__illumos__)
+ /* for setrlimit */
+ #include <sys/resource.h>
+ #endif