net/libwebsockets: Update to 4.3.2
Adjust configuration options to closer match other distributions and also upstream's recommendations. Mosquitto also requires LWS_WITH_EXTERNAL_POLL to be enabled when linked with this library. Enable following options: LWS_WITH_DISKCACHE, LWS_WITH_FTS, LWS_WITH_RANGES, LWS_WITH_THREADPOOL and (LWS_WITH_EXTERNAL_POLL via MQTT option). Use SHA1 via OpenSSL (LWS_WITHOUT_BUILTIN_SHA1) While at also adjust .cmake and .pc files to properly report version Changelog: https://github.com/warmcat/libwebsockets/blob/v4.3.0/changelog https://github.com/warmcat/libwebsockets/compare/v4.3.0...v4.3.2 PR: 262552 Reported by: Leo Schneider <ttkdroid@gmail.com> Tested by: Rod Morgan <rmorgan@portmorgan.com>
This commit is contained in:
parent
6f54d065a9
commit
7a57329645
5 changed files with 62 additions and 11 deletions
|
@ -1,7 +1,6 @@
|
|||
PORTNAME= libwebsockets
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 4.2.2
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 4.3.2
|
||||
CATEGORIES= net devel
|
||||
MASTER_SITES= https://libwebsockets.org/git/libwebsockets/snapshot/
|
||||
|
||||
|
@ -15,9 +14,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
|
|||
USES= cmake localbase pkgconfig tar:xz
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
BUILDINFO= ${HOSTARCH}-portbld-${OPSYS:tl}-${OSREL:R}
|
||||
|
||||
CMAKE_ARGS= -DLWS_BUILD_HASH:STRING="${BUILDINFO}"
|
||||
CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Git \
|
||||
LWS_IPV6 LWS_WITH_SSL LWS_WITH_ZLIB \
|
||||
LWS_WITH_DISKCACHE LWS_WITH_FTS LWS_IPV6 LWS_WITH_RANGES \
|
||||
LWS_WITH_SSL LWS_WITH_THREADPOOL LWS_WITH_ZLIB \
|
||||
LWS_WITHOUT_BUILTIN_SHA1 \
|
||||
LWS_WITHOUT_TESTAPPS LWS_WITHOUT_TEST_SERVER \
|
||||
LWS_WITHOUT_TEST_SERVER_EXTPOLL \
|
||||
LWS_WITHOUT_TEST_PING LWS_WITHOUT_TEST_CLIENT
|
||||
|
@ -45,7 +48,7 @@ LIBUV_DESC= Asynchronous I/O support via libuv
|
|||
|
||||
HTTP_PROXY_CMAKE_BOOL= LWS_WITH_HTTP_PROXY
|
||||
HTTP2_CMAKE_BOOL= LWS_WITH_HTTP2
|
||||
MQTT_CMAKE_BOOL= LWS_ROLE_MQTT
|
||||
MQTT_CMAKE_BOOL= LWS_ROLE_MQTT LWS_WITH_EXTERNAL_POLL
|
||||
PEERLIMITS_CMAKE_BOOL= LWS_WITH_PEER_LIMITS
|
||||
PLUGINS_CMAKE_BOOL= LWS_WITH_PLUGINS \
|
||||
LWS_WITH_PLUGINS_API
|
||||
|
@ -77,13 +80,11 @@ LIBEVENT_CMAKE_BOOL= LWS_WITH_LIBEVENT
|
|||
LIBUV_LIB_DEPENDS= libuv.so:devel/libuv
|
||||
LIBUV_CMAKE_BOOL= LWS_WITH_LIBUV
|
||||
|
||||
BUILDINFO= ${HOSTARCH}-portbld-${OPSYS:tl}-${OSREL:R}
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
# Allow usage of LibreSSL via OPENSSL option
|
||||
.if ${PORT_OPTIONS:MOPENSSL} && ${SSL_DEFAULT} == libressl
|
||||
CMAKE_ARGS+= -DLWS_OPENSSL_LIBRARIES='${OPENSSLLIB}/libtls.so;${OPENSSLLIB}/libssl.so;${OPENSSLLIB}/libcrypto.so' -DLWS_OPENSSL_INCLUDE_DIRS=${OPENSSLINC}/ssl
|
||||
CMAKE_ARGS+= -DLWS_OPENSSL_LIBRARIES='${OPENSSLLIB}/libtls.so;${OPENSSLLIB}/libssl.so;${OPENSSLLIB}/libcrypto.so' -DLWS_OPENSSL_INCLUDE_DIRS=${OPENSSLINC}/ssl
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1633420177
|
||||
SHA256 (libwebsockets-v4.2.2.tar.xz) = 0d8cf2abeea4a6ad24935c60a26120ed864fb263dd95b6abf7d19356b7095410
|
||||
SIZE (libwebsockets-v4.2.2.tar.xz) = 12769280
|
||||
TIMESTAMP = 1676237078
|
||||
SHA256 (libwebsockets-v4.3.2.tar.xz) = 287ad6f63344323c4e2404d2ab3a8a0803932d554c724aaffbb1e8fe2e5e9243
|
||||
SIZE (libwebsockets-v4.3.2.tar.xz) = 13598720
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
--- cmake/libwebsockets-config-version.cmake.in.orig 1970-01-01 00:00:00 UTC
|
||||
+++ cmake/libwebsockets-config-version.cmake.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-set(PACKAGE_VERSION "@CPACK_PACKAGE_VERSION@")
|
||||
+set(PACKAGE_VERSION "@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH_NUMBER@")
|
||||
|
||||
# Check whether the requested PACKAGE_FIND_VERSION is compatible
|
||||
if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
|
38
net/libwebsockets/files/patch-lib_CMakeLists.txt
Normal file
38
net/libwebsockets/files/patch-lib_CMakeLists.txt
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- lib/CMakeLists.txt.orig 2023-02-14 23:28:15 UTC
|
||||
+++ lib/CMakeLists.txt
|
||||
@@ -316,7 +316,7 @@ includedir=\${prefix}/include
|
||||
|
||||
Name: libwebsockets
|
||||
Description: Websockets server and client library
|
||||
-Version: ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
||||
+Version: ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH_NUMBER}
|
||||
|
||||
Libs: -L\${libdir} -lwebsockets
|
||||
Cflags: -I\${includedir}
|
||||
@@ -328,7 +328,7 @@ endif()
|
||||
|
||||
|
||||
install(FILES "${PROJECT_BINARY_DIR}/libwebsockets.pc"
|
||||
- DESTINATION lib${LIB_SUFFIX}/pkgconfig)
|
||||
+ DESTINATION libdata/pkgconfig)
|
||||
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/libwebsockets_static.pc"
|
||||
"prefix=\"${CMAKE_INSTALL_PREFIX}\"
|
||||
@@ -338,7 +338,7 @@ includedir=\${prefix}/include
|
||||
|
||||
Name: libwebsockets_static
|
||||
Description: Websockets server and client static library
|
||||
-Version: ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}
|
||||
+Version: ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH_NUMBER}
|
||||
|
||||
Libs: -L\${libdir} -l:libwebsockets${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||
Libs.private:
|
||||
@@ -352,7 +352,7 @@ endif()
|
||||
|
||||
|
||||
install(FILES "${PROJECT_BINARY_DIR}/libwebsockets_static.pc"
|
||||
- DESTINATION lib${LIB_SUFFIX}/pkgconfig)
|
||||
+ DESTINATION libdata/pkgconfig)
|
||||
|
||||
endif(UNIX OR MINGW)
|
||||
|
|
@ -11,11 +11,13 @@ 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-cache-ttl.h
|
||||
include/libwebsockets/lws-callbacks.h
|
||||
include/libwebsockets/lws-cgi.h
|
||||
include/libwebsockets/lws-client.h
|
||||
include/libwebsockets/lws-conmon.h
|
||||
include/libwebsockets/lws-context-vhost.h
|
||||
include/libwebsockets/lws-cose.h
|
||||
include/libwebsockets/lws-dbus.h
|
||||
include/libwebsockets/lws-diskcache.h
|
||||
include/libwebsockets/lws-display.h
|
||||
|
@ -38,10 +40,12 @@ include/libwebsockets/lws-jose.h
|
|||
include/libwebsockets/lws-jwe.h
|
||||
include/libwebsockets/lws-jwk.h
|
||||
include/libwebsockets/lws-jws.h
|
||||
include/libwebsockets/lws-lecp.h
|
||||
include/libwebsockets/lws-led.h
|
||||
include/libwebsockets/lws-lejp.h
|
||||
include/libwebsockets/lws-logs.h
|
||||
include/libwebsockets/lws-lwsac.h
|
||||
include/libwebsockets/lws-map.h
|
||||
include/libwebsockets/lws-metrics.h
|
||||
include/libwebsockets/lws-misc.h
|
||||
include/libwebsockets/lws-mqtt.h
|
||||
|
@ -91,7 +95,7 @@ lib/cmake/libwebsockets/libwebsockets-config.cmake
|
|||
%%LIBUV%%lib/libwebsockets-evlib_uv.so
|
||||
lib/libwebsockets.a
|
||||
lib/libwebsockets.so
|
||||
lib/libwebsockets.so.18
|
||||
lib/libwebsockets.so.19
|
||||
libdata/pkgconfig/libwebsockets.pc
|
||||
libdata/pkgconfig/libwebsockets_static.pc
|
||||
%%PLUGINS%%%%DATADIR%%-test-server/deaddrop/deaddrop.css
|
||||
|
|
Loading…
Reference in a new issue