Re: [fixes/updates] net/usockets www/uwebsockets to 18.15.0 www/purritobin to 0.3.2
On 12/11/20 5:39 PM, Stuart Henderson wrote: > I've committed usockets/uwebsockets, but purritobin build fails: > > ===> Building for purritobin-0.3.2 > c++ -O2 -pipe -std=c++2a `pkg-config --cflags libusockets` -DUWS_NO_ZLIB > src/main.cc -o purrito `pkg-config --libs l > ibusockets` > src/main.cc:270:40: error: no viable conversion from 'struct > us_socket_context_options_t' to > 'uWS::SocketContextOptions' > purrito.addServerName(server_name, ssl_options); >^~~ > /usr/local/include/uWebSockets/App.h:33:12: note: candidate constructor (the > implicit copy constructor) not viable: no > known conversion from 'struct us_socket_context_options_t' to 'const > uWS::SocketContextOptions &' for 1st > argument > struct SocketContextOptions { >^ > /usr/local/include/uWebSockets/App.h:33:12: note: candidate constructor (the > implicit move constructor) not viable: no > known conversion from 'struct us_socket_context_options_t' to > 'uWS::SocketContextOptions &&' for 1st argument > /usr/local/include/uWebSockets/App.h:61:85: note: passing argument to > parameter 'options' here > TemplatedApp &(std::string hostname_pattern, > SocketContextOptions options = {}) { > > ^ > 1 error generated. > Dang, I was very careless in my testing. (that variable type was renamed...) Sorry about that. Had to do a small release to update it, attached :) Thanks a bunch for the catch! Aisha diff --git a/www/purritobin/Makefile b/www/purritobin/Makefile index 1e86eec45c7..86bfd3a6d8a 100644 --- a/www/purritobin/Makefile +++ b/www/purritobin/Makefile @@ -6,7 +6,7 @@ CATEGORIES =www net GH_ACCOUNT = PurritoBin GH_PROJECT = PurritoBin -GH_TAGNAME = 0.2.4 +GH_TAGNAME = 0.3.3 HOMEPAGE = https://bsd.ac/ MAINTAINER = Aisha Tammy @@ -15,7 +15,7 @@ MAINTAINER = Aisha Tammy PERMIT_PACKAGE = Yes # uses pledge() -WANTLIB += ${COMPILER_LIBCXX} c crypto m ssl usockets +WANTLIB += ${COMPILER_LIBCXX} c m usockets # C++2a COMPILER = base-clang ports-gcc @@ -33,4 +33,6 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/clients/POSIX_shell_client.sh \ ${PREFIX}/share/purritobin +FAKE_FLAGS = PREFIX=${TRUEPREFIX} + .include diff --git a/www/purritobin/distinfo b/www/purritobin/distinfo index 33c301930ff..71fc842ca7f 100644 --- a/www/purritobin/distinfo +++ b/www/purritobin/distinfo @@ -1,2 +1,2 @@ -SHA256 (PurritoBin-0.2.4.tar.gz) = 5G3GYiaoE5MzhSZ8jrncitBY1lw0FH8aCNAkahKZfbs= -SIZE (PurritoBin-0.2.4.tar.gz) = 11356 +SHA256 (PurritoBin-0.3.3.tar.gz) = lmjTCXskzvTd8eCKxlGfClbEfk6COuqh90nqHSeQ1wc= +SIZE (PurritoBin-0.3.3.tar.gz) = 13155 diff --git a/www/purritobin/pkg/PLIST b/www/purritobin/pkg/PLIST index 9dab363c5bb..e1515bd51c3 100644 --- a/www/purritobin/pkg/PLIST +++ b/www/purritobin/pkg/PLIST @@ -3,6 +3,7 @@ @newuser _purritobin:858:858:daemon:PurritoBin Daemon:/nonexistent:/sbin/nologin @rcscript ${RCDIR}/purritobin @bin bin/purrito +@man man/man1/purrito.1 share/doc/pkg-readmes/${PKGSTEM} @owner _purritobin @group _purritobin
Re: [fixes/updates] net/usockets www/uwebsockets to 18.15.0 www/purritobin to 0.3.2
Sorry, forgot to update-plist for uwebsockets. Aisha diff --git a/net/usockets/Makefile b/net/usockets/Makefile index b39937b6fe5..24297b98f34 100644 --- a/net/usockets/Makefile +++ b/net/usockets/Makefile @@ -1,14 +1,22 @@ # $OpenBSD: Makefile,v 1.3 2020/09/17 01:38:30 bcallah Exp $ COMMENT= eventing, networking & crypto for async applications -PKGNAME = ${DISTNAME:L} CATEGORIES = net +VERSION = 0.6.0 +REVISION = 0 + +DISTNAME = usockets-${VERSION} +PKGNAME = ${DISTNAME:L} + SHARED_LIBS = usockets 1.0 GH_ACCOUNT = uNetworking GH_PROJECT = uSockets -GH_TAGNAME = v0.6.0 +#GH_TAGNAME = v0.6.0 +# cstdlib include error +GH_COMMIT =7683672d87067cd75b854f4e36b9820f4809a4be + MAINTAINER = Aisha Tammy @@ -23,12 +31,9 @@ COMPILER = base-clang ports-gcc LIB_DEPENDS = devel/libuv USE_GMAKE =Yes -ALL_TARGET = default -MAKE_FLAGS = CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ - LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \ - CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - LIBusockets_VERSION="${LIBusockets_VERSION}" \ - WITH_OPENSSL=1 WITH_LIBUV=1 +MAKE_FLAGS = CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + CC="${CC}" CXX="${CXX}" \ + LIBusockets_VERSION="${LIBusockets_VERSION}" NO_TEST = Yes diff --git a/net/usockets/distinfo b/net/usockets/distinfo index 8058bc795ab..964ba508e9e 100644 --- a/net/usockets/distinfo +++ b/net/usockets/distinfo @@ -1,2 +1,2 @@ -SHA256 (uSockets-0.6.0.tar.gz) = mZOH02U7K8Zjw0qn6XM1isTEiX3M1kRVOlyquEOpeKE= -SIZE (uSockets-0.6.0.tar.gz) = 57590 +SHA256 (usockets-0.6.0-7683672d.tar.gz) = 0OooGCHD8ezNIcaB1zDPK6RQLGGYGZJb24Vemjlat7c= +SIZE (usockets-0.6.0-7683672d.tar.gz) = 57634 diff --git a/net/usockets/patches/patch-Makefile b/net/usockets/patches/patch-Makefile index e68fbee5c06..56473a2f03b 100644 --- a/net/usockets/patches/patch-Makefile +++ b/net/usockets/patches/patch-Makefile @@ -1,68 +1,98 @@ $OpenBSD: patch-Makefile,v 1.2 2020/09/17 01:38:30 bcallah Exp $ -add shared + static lib + default targets +add shared + static lib + pkg-config file remove -flto -O3 Index: Makefile --- Makefile.orig +++ Makefile -@@ -1,3 +1,13 @@ +@@ -1,60 +1,40 @@ +-# WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL +-# For now we need to link with C++ for OpenSSL support, but should be removed with time +-ifeq ($(WITH_OPENSSL),1) +- override CFLAGS += -DLIBUS_USE_OPENSSL +- # With problems on macOS, make sure to pass needed LDFLAGS required to find these +- override LDFLAGS += -lssl -lcrypto -lstdc++ +-else +- # WITH_WOLFSSL=1 enables WolfSSL 4.2.0 support (mutually exclusive with OpenSSL) +- ifeq ($(WITH_WOLFSSL),1) +- # todo: change these +- override CFLAGS += -DLIBUS_USE_WOLFSSL -I/usr/local/include +- override LDFLAGS += -L/usr/local/lib -lwolfssl +- else +- override CFLAGS += -DLIBUS_NO_SSL +- endif +-endif +DESTDIR ?= -+ -+prefix ?= "/usr/local" -+exec_prefix ?= "$(prefix)" -+libdir ?= "$(exec_prefix)/lib" -+includedir?="$(exec_prefix)/include/uSockets" -+ + +-# WITH_LIBUV=1 builds with libuv as event-loop +-ifeq ($(WITH_LIBUV),1) +- override CFLAGS += -DLIBUS_USE_LIBUV +- override LDFLAGS += -luv +-endif ++PREFIX ?= "/usr/local" ++LIBDIR ?= "$(PREFIX)/lib" ++INCLUDEDIR ?= "$(PREFIX)/include" + +-# WITH_GCD=1 builds with libdispatch as event-loop +-ifeq ($(WITH_GCD),1) +- override CFLAGS += -DLIBUS_USE_GCD +- override LDFLAGS += -framework CoreFoundation +-endif +# OpenBSD specific library version -+LIBTARGET = libusockets.so.$(LIBusockets_VERSION) -+ - # WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL - # For now we need to link with C++ for OpenSSL support, but should be removed with time - ifeq ($(WITH_OPENSSL),1) -@@ -34,18 +44,32 @@ ifeq ($(WITH_ASAN),1) - endif ++LIBTARGET ?= libusockets.so.$(LIBusockets_VERSION) + +-# WITH_ASAN builds with sanitizers +-ifeq ($(WITH_ASAN),1) +- override CFLAGS += -fsanitize=address -g +- override LDFLAGS += -lasan +-endif ++PKG_CONFIG ?= pkg-config - override CFLAGS += -std=c11 -Isrc +-override CFLAGS += -std=c11 -Isrc -override LDFLAGS += uSockets.a ++override LDFLAGS += -lstdc++ -lcrypto -lssl `$(PKG_CONFIG) --libs libuv` -# By default we build the uSockets.a static library -+ - default: - rm -f *.o +-default: +- rm -f *.o - $(CC) $(CFLAGS) -flto -O3 -c src/*.c src/eventing/*.c src/crypto/*.c -# For now we do rely on C++17 for OpenSSL support but we will be porting this work to C11 -+ $(CC) -fPIC -c src/*.c src/eventing/*.c src/crypto/*.c $(CFLAGS) - ifeq ($(WITH_OPENSSL),1) +-ifeq ($(WITH_OPENSSL),1) - $(CXX) $(CXXFLAGS) -std=c++17 -flto -O3 -c src/crypto/*.cpp -+ $(CXX) $(CXXFLAGS) -std=c++17 -fPIC -c src/crypto/*.cpp - endif +-endif - $(AR) rvs uSockets.a *.o
Re: [fixes/updates] net/usockets www/uwebsockets to 18.15.0 www/purritobin to 0.3.2
I've committed usockets/uwebsockets, but purritobin build fails: ===> Building for purritobin-0.3.2 c++ -O2 -pipe -std=c++2a `pkg-config --cflags libusockets` -DUWS_NO_ZLIB src/main.cc -o purrito `pkg-config --libs l ibusockets` src/main.cc:270:40: error: no viable conversion from 'struct us_socket_context_options_t' to 'uWS::SocketContextOptions' purrito.addServerName(server_name, ssl_options); ^~~ /usr/local/include/uWebSockets/App.h:33:12: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'struct us_socket_context_options_t' to 'const uWS::SocketContextOptions &' for 1st argument struct SocketContextOptions { ^ /usr/local/include/uWebSockets/App.h:33:12: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'struct us_socket_context_options_t' to 'uWS::SocketContextOptions &&' for 1st argument /usr/local/include/uWebSockets/App.h:61:85: note: passing argument to parameter 'options' here TemplatedApp &(std::string hostname_pattern, SocketContextOptions options = {}) { ^ 1 error generated.
Re: [fixes/updates] net/usockets www/uwebsockets to 18.15.0 www/purritobin to 0.3.2
On 11/26/20 6:50 PM, Aisha Tammy wrote: > On 11/26/20 4:21 AM, Stuart Henderson wrote: >> On 2020/11/25 17:51, Aisha Tammy wrote: >>> ++Name: uSockets >>> ++Version: @VERSION@ >>> ++Description: eventing, networking and crypto for async applications. >>> ++URL: https://github.com/uNetworking/uSockets >>> ++ >>> ++Cflags: -I${includedir} >>> ++Libs: -L${libdir} -lusockets >>> ++Libs.private: -lstdc++ -lcrypto -lssl >> on base-clang archs the C++ standard library is libc++, on ports-gcc >> archs as far as ports are concerned it is libestdc++ (differing C++ >> std libs can't be safely mixed). >> >> in both cases linking would normally be handled by using the C++ >> compiler to link (c++ for base-clang, eg++ for ports-gcc), which would >> pick the correct C++ std lib itself. >> > > Sorry about that. > Updated diff with it removed. > Bump, Aisha
Re: [fixes/updates] net/usockets www/uwebsockets to 18.15.0 www/purritobin to 0.3.2
On 12/7/20 2:45 PM, Aisha Tammy wrote: > On 11/26/20 6:50 PM, Aisha Tammy wrote: >> On 11/26/20 4:21 AM, Stuart Henderson wrote: >>> On 2020/11/25 17:51, Aisha Tammy wrote: ++Name: uSockets ++Version: @VERSION@ ++Description: eventing, networking and crypto for async applications. ++URL: https://github.com/uNetworking/uSockets ++ ++Cflags: -I${includedir} ++Libs: -L${libdir} -lusockets ++Libs.private: -lstdc++ -lcrypto -lssl >>> on base-clang archs the C++ standard library is libc++, on ports-gcc >>> archs as far as ports are concerned it is libestdc++ (differing C++ >>> std libs can't be safely mixed). >>> >>> in both cases linking would normally be handled by using the C++ >>> compiler to link (c++ for base-clang, eg++ for ports-gcc), which would >>> pick the correct C++ std lib itself. >>> >> Sorry about that. >> Updated diff with it removed. >> > Bump, > Aisha > Bump with reattaching patch, uwebsockets updated to 18.17.0, Aisha diff --git a/net/usockets/Makefile b/net/usockets/Makefile index b39937b6fe5..24297b98f34 100644 --- a/net/usockets/Makefile +++ b/net/usockets/Makefile @@ -1,14 +1,22 @@ # $OpenBSD: Makefile,v 1.3 2020/09/17 01:38:30 bcallah Exp $ COMMENT= eventing, networking & crypto for async applications -PKGNAME = ${DISTNAME:L} CATEGORIES = net +VERSION = 0.6.0 +REVISION = 0 + +DISTNAME = usockets-${VERSION} +PKGNAME = ${DISTNAME:L} + SHARED_LIBS = usockets 1.0 GH_ACCOUNT = uNetworking GH_PROJECT = uSockets -GH_TAGNAME = v0.6.0 +#GH_TAGNAME = v0.6.0 +# cstdlib include error +GH_COMMIT =7683672d87067cd75b854f4e36b9820f4809a4be + MAINTAINER = Aisha Tammy @@ -23,12 +31,9 @@ COMPILER = base-clang ports-gcc LIB_DEPENDS = devel/libuv USE_GMAKE =Yes -ALL_TARGET = default -MAKE_FLAGS = CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ - LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \ - CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - LIBusockets_VERSION="${LIBusockets_VERSION}" \ - WITH_OPENSSL=1 WITH_LIBUV=1 +MAKE_FLAGS = CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + CC="${CC}" CXX="${CXX}" \ + LIBusockets_VERSION="${LIBusockets_VERSION}" NO_TEST = Yes diff --git a/net/usockets/distinfo b/net/usockets/distinfo index 8058bc795ab..964ba508e9e 100644 --- a/net/usockets/distinfo +++ b/net/usockets/distinfo @@ -1,2 +1,2 @@ -SHA256 (uSockets-0.6.0.tar.gz) = mZOH02U7K8Zjw0qn6XM1isTEiX3M1kRVOlyquEOpeKE= -SIZE (uSockets-0.6.0.tar.gz) = 57590 +SHA256 (usockets-0.6.0-7683672d.tar.gz) = 0OooGCHD8ezNIcaB1zDPK6RQLGGYGZJb24Vemjlat7c= +SIZE (usockets-0.6.0-7683672d.tar.gz) = 57634 diff --git a/net/usockets/patches/patch-Makefile b/net/usockets/patches/patch-Makefile index e68fbee5c06..56473a2f03b 100644 --- a/net/usockets/patches/patch-Makefile +++ b/net/usockets/patches/patch-Makefile @@ -1,68 +1,98 @@ $OpenBSD: patch-Makefile,v 1.2 2020/09/17 01:38:30 bcallah Exp $ -add shared + static lib + default targets +add shared + static lib + pkg-config file remove -flto -O3 Index: Makefile --- Makefile.orig +++ Makefile -@@ -1,3 +1,13 @@ +@@ -1,60 +1,40 @@ +-# WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL +-# For now we need to link with C++ for OpenSSL support, but should be removed with time +-ifeq ($(WITH_OPENSSL),1) +- override CFLAGS += -DLIBUS_USE_OPENSSL +- # With problems on macOS, make sure to pass needed LDFLAGS required to find these +- override LDFLAGS += -lssl -lcrypto -lstdc++ +-else +- # WITH_WOLFSSL=1 enables WolfSSL 4.2.0 support (mutually exclusive with OpenSSL) +- ifeq ($(WITH_WOLFSSL),1) +- # todo: change these +- override CFLAGS += -DLIBUS_USE_WOLFSSL -I/usr/local/include +- override LDFLAGS += -L/usr/local/lib -lwolfssl +- else +- override CFLAGS += -DLIBUS_NO_SSL +- endif +-endif +DESTDIR ?= -+ -+prefix ?= "/usr/local" -+exec_prefix ?= "$(prefix)" -+libdir ?= "$(exec_prefix)/lib" -+includedir?="$(exec_prefix)/include/uSockets" -+ + +-# WITH_LIBUV=1 builds with libuv as event-loop +-ifeq ($(WITH_LIBUV),1) +- override CFLAGS += -DLIBUS_USE_LIBUV +- override LDFLAGS += -luv +-endif ++PREFIX ?= "/usr/local" ++LIBDIR ?= "$(PREFIX)/lib" ++INCLUDEDIR ?= "$(PREFIX)/include" + +-# WITH_GCD=1 builds with libdispatch as event-loop +-ifeq ($(WITH_GCD),1) +- override CFLAGS += -DLIBUS_USE_GCD +- override LDFLAGS += -framework CoreFoundation +-endif +# OpenBSD specific library version -+LIBTARGET = libusockets.so.$(LIBusockets_VERSION) -+ - # WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL - # For now we need to link with C++ for OpenSSL support, but should be removed with time - ifeq ($(WITH_OPENSSL),1) -@@ -34,18 +44,32 @@ ifeq ($(WITH_ASAN),1) - endif ++LIBTARGET ?= libusockets.so.$(LIBusockets_VERSION) + +-# WITH_ASAN builds with
Re: [fixes/updates] net/usockets www/uwebsockets to 18.15.0 www/purritobin to 0.3.2
On 11/26/20 4:21 AM, Stuart Henderson wrote: > On 2020/11/25 17:51, Aisha Tammy wrote: >> ++Name: uSockets >> ++Version: @VERSION@ >> ++Description: eventing, networking and crypto for async applications. >> ++URL: https://github.com/uNetworking/uSockets >> ++ >> ++Cflags: -I${includedir} >> ++Libs: -L${libdir} -lusockets >> ++Libs.private: -lstdc++ -lcrypto -lssl > on base-clang archs the C++ standard library is libc++, on ports-gcc > archs as far as ports are concerned it is libestdc++ (differing C++ > std libs can't be safely mixed). > > in both cases linking would normally be handled by using the C++ > compiler to link (c++ for base-clang, eg++ for ports-gcc), which would > pick the correct C++ std lib itself. > Sorry about that. Updated diff with it removed. diff --git a/net/usockets/Makefile b/net/usockets/Makefile index b39937b6fe5..24297b98f34 100644 --- a/net/usockets/Makefile +++ b/net/usockets/Makefile @@ -1,14 +1,22 @@ # $OpenBSD: Makefile,v 1.3 2020/09/17 01:38:30 bcallah Exp $ COMMENT= eventing, networking & crypto for async applications -PKGNAME = ${DISTNAME:L} CATEGORIES = net +VERSION = 0.6.0 +REVISION = 0 + +DISTNAME = usockets-${VERSION} +PKGNAME = ${DISTNAME:L} + SHARED_LIBS = usockets 1.0 GH_ACCOUNT = uNetworking GH_PROJECT = uSockets -GH_TAGNAME = v0.6.0 +#GH_TAGNAME = v0.6.0 +# cstdlib include error +GH_COMMIT =7683672d87067cd75b854f4e36b9820f4809a4be + MAINTAINER = Aisha Tammy @@ -23,12 +31,9 @@ COMPILER = base-clang ports-gcc LIB_DEPENDS = devel/libuv USE_GMAKE =Yes -ALL_TARGET = default -MAKE_FLAGS = CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ - LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \ - CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - LIBusockets_VERSION="${LIBusockets_VERSION}" \ - WITH_OPENSSL=1 WITH_LIBUV=1 +MAKE_FLAGS = CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + CC="${CC}" CXX="${CXX}" \ + LIBusockets_VERSION="${LIBusockets_VERSION}" NO_TEST = Yes diff --git a/net/usockets/distinfo b/net/usockets/distinfo index 8058bc795ab..964ba508e9e 100644 --- a/net/usockets/distinfo +++ b/net/usockets/distinfo @@ -1,2 +1,2 @@ -SHA256 (uSockets-0.6.0.tar.gz) = mZOH02U7K8Zjw0qn6XM1isTEiX3M1kRVOlyquEOpeKE= -SIZE (uSockets-0.6.0.tar.gz) = 57590 +SHA256 (usockets-0.6.0-7683672d.tar.gz) = 0OooGCHD8ezNIcaB1zDPK6RQLGGYGZJb24Vemjlat7c= +SIZE (usockets-0.6.0-7683672d.tar.gz) = 57634 diff --git a/net/usockets/patches/patch-Makefile b/net/usockets/patches/patch-Makefile index e68fbee5c06..56473a2f03b 100644 --- a/net/usockets/patches/patch-Makefile +++ b/net/usockets/patches/patch-Makefile @@ -1,68 +1,98 @@ $OpenBSD: patch-Makefile,v 1.2 2020/09/17 01:38:30 bcallah Exp $ -add shared + static lib + default targets +add shared + static lib + pkg-config file remove -flto -O3 Index: Makefile --- Makefile.orig +++ Makefile -@@ -1,3 +1,13 @@ +@@ -1,60 +1,40 @@ +-# WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL +-# For now we need to link with C++ for OpenSSL support, but should be removed with time +-ifeq ($(WITH_OPENSSL),1) +- override CFLAGS += -DLIBUS_USE_OPENSSL +- # With problems on macOS, make sure to pass needed LDFLAGS required to find these +- override LDFLAGS += -lssl -lcrypto -lstdc++ +-else +- # WITH_WOLFSSL=1 enables WolfSSL 4.2.0 support (mutually exclusive with OpenSSL) +- ifeq ($(WITH_WOLFSSL),1) +- # todo: change these +- override CFLAGS += -DLIBUS_USE_WOLFSSL -I/usr/local/include +- override LDFLAGS += -L/usr/local/lib -lwolfssl +- else +- override CFLAGS += -DLIBUS_NO_SSL +- endif +-endif +DESTDIR ?= -+ -+prefix ?= "/usr/local" -+exec_prefix ?= "$(prefix)" -+libdir ?= "$(exec_prefix)/lib" -+includedir?="$(exec_prefix)/include/uSockets" -+ + +-# WITH_LIBUV=1 builds with libuv as event-loop +-ifeq ($(WITH_LIBUV),1) +- override CFLAGS += -DLIBUS_USE_LIBUV +- override LDFLAGS += -luv +-endif ++PREFIX ?= "/usr/local" ++LIBDIR ?= "$(PREFIX)/lib" ++INCLUDEDIR ?= "$(PREFIX)/include" + +-# WITH_GCD=1 builds with libdispatch as event-loop +-ifeq ($(WITH_GCD),1) +- override CFLAGS += -DLIBUS_USE_GCD +- override LDFLAGS += -framework CoreFoundation +-endif +# OpenBSD specific library version -+LIBTARGET = libusockets.so.$(LIBusockets_VERSION) -+ - # WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL - # For now we need to link with C++ for OpenSSL support, but should be removed with time - ifeq ($(WITH_OPENSSL),1) -@@ -34,18 +44,32 @@ ifeq ($(WITH_ASAN),1) - endif ++LIBTARGET ?= libusockets.so.$(LIBusockets_VERSION) + +-# WITH_ASAN builds with sanitizers +-ifeq ($(WITH_ASAN),1) +- override CFLAGS += -fsanitize=address -g +- override LDFLAGS += -lasan +-endif ++PKG_CONFIG ?= pkg-config - override CFLAGS += -std=c11 -Isrc +-override CFLAGS +=
Re: [fixes/updates] net/usockets www/uwebsockets to 18.15.0 www/purritobin to 0.3.2
On 2020/11/25 17:51, Aisha Tammy wrote: > ++Name: uSockets > ++Version: @VERSION@ > ++Description: eventing, networking and crypto for async applications. > ++URL: https://github.com/uNetworking/uSockets > ++ > ++Cflags: -I${includedir} > ++Libs: -L${libdir} -lusockets > ++Libs.private: -lstdc++ -lcrypto -lssl on base-clang archs the C++ standard library is libc++, on ports-gcc archs as far as ports are concerned it is libestdc++ (differing C++ std libs can't be safely mixed). in both cases linking would normally be handled by using the C++ compiler to link (c++ for base-clang, eg++ for ports-gcc), which would pick the correct C++ std lib itself.
[fixes/updates] net/usockets www/uwebsockets to 18.15.0 www/purritobin to 0.3.2
Hi, Attached updates for net/usockets www/{uwebsockets,purritobin} I am unsure what the protocol is for submitting multiple port updates but at least usockets and uwebsockets are closely tied enough that they would need to be updated together. I can decouple purritobin, if it makes it easier to review. Changes/fixes: net/usockets: - revision bump to 0 - fixes a cstdlib include error from upstream - adds a pkg-config file for easy use by other programs - removes internal header installation - fixes header install path to match FreeBSD (deprecates a patch in uWebSockets) www/uwebsockets: - update to 18.15.0 - removes unneeded patch www/purritobin: - update to 0.3.2 - adds SSL capabilities - adds support for ipv6 - adds listening on multiple interfaces and ports - adds a man page (was fun to learn mandoc, damn cool) - adds logging to syslog Thanks a lot to tb@ for noticing me being dumb with unveil :P Cheers, Aisha diff --git a/net/usockets/Makefile b/net/usockets/Makefile index b39937b6fe5..24297b98f34 100644 --- a/net/usockets/Makefile +++ b/net/usockets/Makefile @@ -1,14 +1,22 @@ # $OpenBSD: Makefile,v 1.3 2020/09/17 01:38:30 bcallah Exp $ COMMENT= eventing, networking & crypto for async applications -PKGNAME = ${DISTNAME:L} CATEGORIES = net +VERSION = 0.6.0 +REVISION = 0 + +DISTNAME = usockets-${VERSION} +PKGNAME = ${DISTNAME:L} + SHARED_LIBS = usockets 1.0 GH_ACCOUNT = uNetworking GH_PROJECT = uSockets -GH_TAGNAME = v0.6.0 +#GH_TAGNAME = v0.6.0 +# cstdlib include error +GH_COMMIT =7683672d87067cd75b854f4e36b9820f4809a4be + MAINTAINER = Aisha Tammy @@ -23,12 +31,9 @@ COMPILER = base-clang ports-gcc LIB_DEPENDS = devel/libuv USE_GMAKE =Yes -ALL_TARGET = default -MAKE_FLAGS = CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \ - LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \ - CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \ - LIBusockets_VERSION="${LIBusockets_VERSION}" \ - WITH_OPENSSL=1 WITH_LIBUV=1 +MAKE_FLAGS = CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + CC="${CC}" CXX="${CXX}" \ + LIBusockets_VERSION="${LIBusockets_VERSION}" NO_TEST = Yes diff --git a/net/usockets/distinfo b/net/usockets/distinfo index 8058bc795ab..964ba508e9e 100644 --- a/net/usockets/distinfo +++ b/net/usockets/distinfo @@ -1,2 +1,2 @@ -SHA256 (uSockets-0.6.0.tar.gz) = mZOH02U7K8Zjw0qn6XM1isTEiX3M1kRVOlyquEOpeKE= -SIZE (uSockets-0.6.0.tar.gz) = 57590 +SHA256 (usockets-0.6.0-7683672d.tar.gz) = 0OooGCHD8ezNIcaB1zDPK6RQLGGYGZJb24Vemjlat7c= +SIZE (usockets-0.6.0-7683672d.tar.gz) = 57634 diff --git a/net/usockets/patches/patch-Makefile b/net/usockets/patches/patch-Makefile index e68fbee5c06..56473a2f03b 100644 --- a/net/usockets/patches/patch-Makefile +++ b/net/usockets/patches/patch-Makefile @@ -1,68 +1,98 @@ $OpenBSD: patch-Makefile,v 1.2 2020/09/17 01:38:30 bcallah Exp $ -add shared + static lib + default targets +add shared + static lib + pkg-config file remove -flto -O3 Index: Makefile --- Makefile.orig +++ Makefile -@@ -1,3 +1,13 @@ +@@ -1,60 +1,40 @@ +-# WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL +-# For now we need to link with C++ for OpenSSL support, but should be removed with time +-ifeq ($(WITH_OPENSSL),1) +- override CFLAGS += -DLIBUS_USE_OPENSSL +- # With problems on macOS, make sure to pass needed LDFLAGS required to find these +- override LDFLAGS += -lssl -lcrypto -lstdc++ +-else +- # WITH_WOLFSSL=1 enables WolfSSL 4.2.0 support (mutually exclusive with OpenSSL) +- ifeq ($(WITH_WOLFSSL),1) +- # todo: change these +- override CFLAGS += -DLIBUS_USE_WOLFSSL -I/usr/local/include +- override LDFLAGS += -L/usr/local/lib -lwolfssl +- else +- override CFLAGS += -DLIBUS_NO_SSL +- endif +-endif +DESTDIR ?= -+ -+prefix ?= "/usr/local" -+exec_prefix ?= "$(prefix)" -+libdir ?= "$(exec_prefix)/lib" -+includedir?="$(exec_prefix)/include/uSockets" -+ + +-# WITH_LIBUV=1 builds with libuv as event-loop +-ifeq ($(WITH_LIBUV),1) +- override CFLAGS += -DLIBUS_USE_LIBUV +- override LDFLAGS += -luv +-endif ++PREFIX ?= "/usr/local" ++LIBDIR ?= "$(PREFIX)/lib" ++INCLUDEDIR ?= "$(PREFIX)/include" + +-# WITH_GCD=1 builds with libdispatch as event-loop +-ifeq ($(WITH_GCD),1) +- override CFLAGS += -DLIBUS_USE_GCD +- override LDFLAGS += -framework CoreFoundation +-endif +# OpenBSD specific library version -+LIBTARGET = libusockets.so.$(LIBusockets_VERSION) -+ - # WITH_OPENSSL=1 enables OpenSSL 1.1+ support or BoringSSL - # For now we need to link with C++ for OpenSSL support, but should be removed with time - ifeq ($(WITH_OPENSSL),1) -@@ -34,18 +44,32 @@ ifeq ($(WITH_ASAN),1) - endif ++LIBTARGET ?= libusockets.so.$(LIBusockets_VERSION) + +-# WITH_ASAN builds with sanitizers +-ifeq ($(WITH_ASAN),1) +- override