FreeBSD Bugzilla – Attachment 242268 Details for
Bug 271495
net/libwebsockets: Fix include directory in for cmake files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Disable pkg-config to find OpenSSL
0001-net-libwebsockets-Fix-build-with-LibreSSL.patch (text/plain), 2.84 KB, created by
Felix Palmen
on 2023-05-19 09:33:33 UTC
(
hide
)
Description:
Disable pkg-config to find OpenSSL
Filename:
MIME Type:
Creator:
Felix Palmen
Created:
2023-05-19 09:33:33 UTC
Size:
2.84 KB
patch
obsolete
>From b93a61478cc2fa7fb5372be54050f8045eb8bb10 Mon Sep 17 00:00:00 2001 >From: Felix Palmen <zirias@FreeBSD.org> >Date: Fri, 19 May 2023 09:06:06 +0200 >Subject: [PATCH] net/libwebsockets: Fix build with LibreSSL > >The build system uses both cmake and pkg-config to find OpenSSL and just >combines the results. Our base OpenSSL doesn't provide a pkg-config >file, but the LibreSSL port does. From the cmake detection, we get >absolute library paths, from pkg-config just library names (-lssl). The >latter are found in base during linking. The result is linking both >OpenSSL and LibreSSL. > >Therefore add a patch that just skips pkg-config for OpenSSL and remove >the broken workaround from the port Makefile. >--- > net/libwebsockets/Makefile | 8 +------- > .../files/patch-lib_tls_CMakeLists.txt | 19 +++++++++++++++++++ > 2 files changed, 20 insertions(+), 7 deletions(-) > create mode 100644 net/libwebsockets/files/patch-lib_tls_CMakeLists.txt > >diff --git a/net/libwebsockets/Makefile b/net/libwebsockets/Makefile >index 639b07bfdeaf..77d3ff45b19e 100644 >--- a/net/libwebsockets/Makefile >+++ b/net/libwebsockets/Makefile >@@ -1,6 +1,7 @@ > PORTNAME= libwebsockets > DISTVERSIONPREFIX= v > DISTVERSION= 4.3.2 >+PORTREVISION= 1 > CATEGORIES= net devel > MASTER_SITES= https://libwebsockets.org/git/libwebsockets/snapshot/ > >@@ -80,11 +81,4 @@ LIBEVENT_CMAKE_BOOL= LWS_WITH_LIBEVENT > LIBUV_LIB_DEPENDS= libuv.so:devel/libuv > LIBUV_CMAKE_BOOL= LWS_WITH_LIBUV > >-.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 >-.endif >- > .include <bsd.port.mk> >diff --git a/net/libwebsockets/files/patch-lib_tls_CMakeLists.txt b/net/libwebsockets/files/patch-lib_tls_CMakeLists.txt >new file mode 100644 >index 000000000000..ac872cf1aee1 >--- /dev/null >+++ b/net/libwebsockets/files/patch-lib_tls_CMakeLists.txt >@@ -0,0 +1,19 @@ >+Disable usage of pkg-config for OpenSSL to avoid linking two different versions. >+See PRs: 258345, 271495 >+ >+--- lib/tls/CMakeLists.txt.orig 2023-05-19 06:48:43 UTC >++++ lib/tls/CMakeLists.txt >+@@ -264,10 +264,10 @@ if (LWS_WITH_SSL) >+ if (NOT OPENSSL_FOUND AND NOT LWS_WITH_BORINGSSL) >+ # TODO: Add support for STATIC also. >+ if (NOT LWS_PLAT_FREERTOS) >+- find_package(PkgConfig QUIET) >+- pkg_check_modules(PC_OPENSSL openssl QUIET) >++ #find_package(PkgConfig QUIET) >++ #pkg_check_modules(PC_OPENSSL openssl QUIET) >+ find_package(OpenSSL REQUIRED) >+- list(APPEND OPENSSL_LIBRARIES ${PC_OPENSSL_LIBRARIES}) >++ #list(APPEND OPENSSL_LIBRARIES ${PC_OPENSSL_LIBRARIES}) >+ set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} PARENT_SCOPE) >+ endif() >+ set(OPENSSL_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}") >-- >2.40.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 271495
:
242257
| 242268