diff --git a/package/libwebsockets/0002-lib-tls-CMakeLists.txt-fix-build-with-pkg-config.patch b/package/libwebsockets/0002-lib-tls-CMakeLists.txt-fix-build-with-pkg-config.patch new file mode 100644 index 0000000000..94d643e132 --- /dev/null +++ b/package/libwebsockets/0002-lib-tls-CMakeLists.txt-fix-build-with-pkg-config.patch @@ -0,0 +1,47 @@ +From 786ec9231e402cd4e7621483be6f1837de724e3c Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 26 Dec 2023 22:38:18 +0100 +Subject: [PATCH] lib/tls/CMakeLists.txt: fix build with pkg-config + +Fix the following wolfssl build failure raised since +https://github.com/warmcat/libwebsockets/commit/079726c4b252e795b208209752077c1ae4504b5b: + +-- Checking for one of the modules 'wolfssl' +CMake Error at lib/tls/CMakeLists.txt:79 (message): + You must set LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS when + LWS_WITH_WOLFSSL is turned on. + +Fixes: + - http://autobuild.buildroot.org/results/fe062b9f0b330e71309334d7605d64ea73761b59 + +Upstream: https://github.com/warmcat/libwebsockets/commit/f18fc2316f9743624ced9ba934595f7b9ba8cd05 +Signed-off-by: Fabrice Fontaine +--- + lib/tls/CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/tls/CMakeLists.txt b/lib/tls/CMakeLists.txt +index 80b46203..230b0d29 100644 +--- a/lib/tls/CMakeLists.txt ++++ b/lib/tls/CMakeLists.txt +@@ -72,12 +72,16 @@ if (LWS_WITH_SSL AND LWS_WITH_WOLFSSL) + include (FindPkgConfig) + PKG_SEARCH_MODULE(LWS_WOLFSSL wolfssl) + +- if (NOT WOLFSSL_FOUND) ++ if (NOT LWS_WOLFSSL_FOUND) + if (LWS_WITH_CYASSL) + message(FATAL_ERROR "You must set LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS when LWS_WITH_CYASSL is turned on.") + else() + message(FATAL_ERROR "You must set LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS when LWS_WITH_WOLFSSL is turned on.") + endif() ++ else() ++ set(WOLFSSL_LIBRARIES ${LWS_WOLFSSL_LIBRARIES}) ++ set(WOLFSSL_INCLUDE_DIRS ${LWS_WOLFSSL_INCLUDE_DIRS}) ++ set(WOLFSSL_FOUND 1) + endif() + else() + set(WOLFSSL_LIBRARIES ${LWS_WOLFSSL_LIBRARIES}) +-- +2.43.0 + diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk index 86756ca612..daf481b3bc 100644 --- a/package/libwebsockets/libwebsockets.mk +++ b/package/libwebsockets/libwebsockets.mk @@ -42,7 +42,7 @@ LIBWEBSOCKETS_CONF_OPTS += \ -DLWS_WITH_SSL=ON \ -DLWS_WITH_MBEDTLS=ON \ -DLWS_WITH_WOLFSSL=OFF -else ifeq ($(BR2_PACKAGE_WOLFSSL),y) +else ifeq ($(BR2_PACKAGE_WOLFSSL_ALL),y) LIBWEBSOCKETS_DEPENDENCIES += host-pkgconf wolfssl LIBWEBSOCKETS_CONF_OPTS += \ -DLWS_WITH_SSL=ON \