From nobody Fri May 19 21:19:25 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QNKV52t8Mz4CP62; Fri, 19 May 2023 21:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QNKV529Qvz3j5N; Fri, 19 May 2023 21:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684531165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OgzVrzhJxwm2OEKQosmZBdmjS6opXibskJsLc6rTtC4=; b=r8Qi4Mp9WrlmRDCesI91NZJONumMXuK6ZBht2JO6AR0r5lTwQxKUVJIb3IR94bnq3yUi/v RLkKI7W29C5APaluyg99J/1lY/QiBXaucYGTq+6q+GF3n3uoQBt0LodeiwQ5c5Kt+Cn3G0 CUnVzx3ph+1gKvC4MZRBw2T7Hx2BpgJYiCSsJDPJaegBz7tkxmW6eGYZBeuNFijDeM6QLY kTUxk96NWAPb0l9I8h7GP3PHHVRa5BaNWfbuWL0HNGmcfBm3N2TQh51edUVI4w+BKQEOaf ExcdUy27Vjw2lvtbGr7hwOdPlsaRoP4/A488kK4iTfefs5dKoVdJomSTWHN46Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684531165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OgzVrzhJxwm2OEKQosmZBdmjS6opXibskJsLc6rTtC4=; b=dXyF41pzTRpocMVQoikmlufqbyOo5YJ+0PQ2RuQ2e/aBcOq+qgejxhrOWeXDqIcmAuJrwm rv3CLRObg7R0foXjR2k1Udi1/hS7kHp+PrE2BmbkC1T3CUXMdyWVDHK7FUFErjeRmvSQpM RsiikY4VcF78eBTjRv/bkGcSBwpqRzfECyxty+a2uwsUtZ9wP3QGey9ZwS+SkEf8E0RxFW OEpGa5OOL8iFlourtmNZeDgyEEfX6xWPLyi7Vc+H2lyO+qGOInjFunjSK5pGqyO7rk4n+K akJgUa+QIwzXrYNS5QmS+klKdAazyMDD356fsIcIAvPUbmsqfYHLhvKhk4aRXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684531165; a=rsa-sha256; cv=none; b=Y2nY7RYuBHbNM1LfbXk/gvGzK1fqb/Lmz2RUrMrlEE4jaBTvcTulvytDCCuMbdhnc4CjgU OIvGxvdazGmT/J10ArFNykGd/dMSSX3sPMn6/8u4BsIcOAQ24yrnvle0DaPqa+oBemy7ct 5qUgVjUdf1Tw6DXPtzAjVME3OanPxqJzXdPyRdMImInY+MlQZhagHh5xBKaPtaDzUgPThY eLk7kz3W+2ofeW/LcAelP2SVyc3frIdtWwyhUFxRPqcO8Sn//kkovSqCPbzR7M47p8zX/I z7Ip07duUZcRksb4EInkPNexQ6Z2oxUDFhfzsPDW6MMR8349Udbrr4nJkrsJkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QNKV517pqzjQw; Fri, 19 May 2023 21:19:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34JLJP7Y001536; Fri, 19 May 2023 21:19:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34JLJPWK001535; Fri, 19 May 2023 21:19:25 GMT (envelope-from git) Date: Fri, 19 May 2023 21:19:25 GMT Message-Id: <202305192119.34JLJPWK001535@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Felix Palmen Subject: git: 986cbcf341d6 - main - net/libwebsockets: Fix build with LibreSSL List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zirias X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 986cbcf341d665b3c0ca454f76fb98e6c5a690cb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zirias: URL: https://cgit.FreeBSD.org/ports/commit/?id=986cbcf341d665b3c0ca454f76fb98e6c5a690cb commit 986cbcf341d665b3c0ca454f76fb98e6c5a690cb Author: Felix Palmen AuthorDate: 2023-05-19 07:06:06 +0000 Commit: Felix Palmen CommitDate: 2023-05-19 21:19:02 +0000 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 didn't provide a pkg-config file until recently, 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. PR: 271495 Approved by: tcberner (mentor, implicit) --- net/libwebsockets/Makefile | 8 +------- net/libwebsockets/files/patch-lib_tls_CMakeLists.txt | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) 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 - -# 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 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}")