Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Apr 2020 21:01:39 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r531147 - in head/net: . usockets usockets/files
Message-ID:  <202004082101.038L1dCF094577@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Wed Apr  8 21:01:39 2020
New Revision: 531147
URL: https://svnweb.freebsd.org/changeset/ports/531147

Log:
  New port: net/usockets: Miniscule eventing, networking & crypto for async applications

Added:
  head/net/usockets/
  head/net/usockets/Makefile   (contents, props changed)
  head/net/usockets/distinfo   (contents, props changed)
  head/net/usockets/files/
  head/net/usockets/files/patch-Makefile   (contents, props changed)
  head/net/usockets/files/patch-src_libusockets.h   (contents, props changed)
  head/net/usockets/pkg-descr   (contents, props changed)
Modified:
  head/net/Makefile

Modified: head/net/Makefile
==============================================================================
--- head/net/Makefile	Wed Apr  8 20:45:08 2020	(r531146)
+++ head/net/Makefile	Wed Apr  8 21:01:39 2020	(r531147)
@@ -1506,6 +1506,7 @@
     SUBDIR += uriparser
     SUBDIR += urlendec
     SUBDIR += usbredir
+    SUBDIR += usockets
     SUBDIR += utftpd
     SUBDIR += v2ray
     SUBDIR += vblade

Added: head/net/usockets/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/usockets/Makefile	Wed Apr  8 21:01:39 2020	(r531147)
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+PORTNAME=	usockets
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.3.5
+CATEGORIES=	net devel
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Miniscule eventing, networking & crypto for async applications
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		compiler:c11 gmake
+USE_GITHUB=	yes
+GH_ACCOUNT=	uNetworking
+GH_PROJECT=	uSockets
+USE_LDCONFIG=	yes
+
+ALL_TARGET=	default
+
+PLIST_FILES=	include/libusockets.h \
+		lib/libusockets.so
+
+do-install:
+	${INSTALL_DATA} ${WRKSRC}/src/libusockets.h ${STAGEDIR}${PREFIX}/include
+	${INSTALL_LIB} ${WRKSRC}/libusockets.so ${STAGEDIR}${PREFIX}/lib
+
+.include <bsd.port.mk>

Added: head/net/usockets/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/usockets/distinfo	Wed Apr  8 21:01:39 2020	(r531147)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1586376975
+SHA256 (uNetworking-uSockets-v0.3.5_GH0.tar.gz) = 16ee4d264cf2266ee25dfc12996b1af4a709ae9bce70a5b167e8a36250fb9109
+SIZE (uNetworking-uSockets-v0.3.5_GH0.tar.gz) = 47939

Added: head/net/usockets/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/usockets/files/patch-Makefile	Wed Apr  8 21:01:39 2020	(r531147)
@@ -0,0 +1,13 @@
+--- Makefile.orig	2019-12-26 21:03:09 UTC
++++ Makefile
+@@ -38,8 +38,8 @@ override LDFLAGS += uSockets.a
+ # By default we build the uSockets.a static library
+ default:
+ 	rm -f *.o
+-	$(CC) $(CFLAGS) -flto -O3 -c src/*.c src/eventing/*.c src/crypto/*.c
+-	$(AR) rvs uSockets.a *.o
++	$(CC) $(CFLAGS) -fPIC -flto -c src/*.c src/eventing/*.c src/crypto/*.c
++	$(CC) -shared -o libusockets.so *.o
+ 
+ # Builds all examples
+ .PHONY: examples

Added: head/net/usockets/files/patch-src_libusockets.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/usockets/files/patch-src_libusockets.h	Wed Apr  8 21:01:39 2020	(r531147)
@@ -0,0 +1,11 @@
+--- src/libusockets.h.orig	2020-04-08 20:24:31 UTC
++++ src/libusockets.h
+@@ -230,7 +230,7 @@ WIN32_EXPORT void us_socket_remote_address(int ssl, st
+ #if !defined(LIBUS_USE_EPOLL) && !defined(LIBUS_USE_LIBUV) && !defined(LIBUS_USE_GCD) && !defined(LIBUS_USE_KQUEUE)
+ #if defined(_WIN32)
+ #define LIBUS_USE_LIBUV
+-#elif defined(__APPLE__)
++#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ #define LIBUS_USE_KQUEUE
+ #else
+ #define LIBUS_USE_EPOLL

Added: head/net/usockets/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/usockets/pkg-descr	Wed Apr  8 21:01:39 2020	(r531147)
@@ -0,0 +1,19 @@
+uSockets is the cross-platform async networking and eventing foundation library.
+
+Features:
+* Built-in (optionally available) TLS support exposed with identical interface
+  as for TCP.
+* Acknowledges and integrates with any event-loop via a layered hierarchical
+  design of plugins.
+* Extremely pedantic about user space memory footprint and designed to perform
+  as good as can be.
+* Designed from scratch to map well to user space TCP stacks or other
+  experimental platforms.
+* Low resolution timer system ideal for performant tracking of networking
+  timeouts.
+* Minimal yet truly cross-platform, will not emit a billion different platform
+  specific error codes.
+* Fully opaque library, inclusion will not completely pollute your global
+  namespace.
+
+WWW: https://github.com/uNetworking/uSockets



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004082101.038L1dCF094577>