Date: Tue, 07 Apr 2026 13:08:59 +0000 From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 08397e80c892 - main - security/libssh: Fix build on FreeBSD 15+ with OpenSSL from base system Message-ID: <69d501eb.345b8.37f29980@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=08397e80c8929b63765d853dfc0286327ac8276d commit 08397e80c8929b63765d853dfc0286327ac8276d Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2026-04-07 13:08:56 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2026-04-07 13:08:56 +0000 security/libssh: Fix build on FreeBSD 15+ with OpenSSL from base system openssl/ml_kem.h is missing from the OpenSSL 3.5 in the base system. Add a workaround to disable MLKEM support on such systems temporarily. --- security/libssh/Makefile | 9 ++++++--- security/libssh/files/extra-patch-mlkem | 11 +++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/security/libssh/Makefile b/security/libssh/Makefile index 10ebb693d642..3da478bcaef1 100644 --- a/security/libssh/Makefile +++ b/security/libssh/Makefile @@ -13,9 +13,6 @@ WWW= https://www.libssh.org/ \ LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_FreeBSD_15= src/mlkem_crypto.c:31:10: fatal error: 'openssl/ml_kem.h' file not found -BROKEN_FreeBSD_16= src/mlkem_crypto.c:31:10: fatal error: 'openssl/ml_kem.h' file not found - TEST_DEPENDS= cmocka>=0:sysutils/cmocka USES= cmake:testing cpe tar:xz @@ -72,6 +69,12 @@ OPENSSL_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_OpenSSL OPENSSL_USES= ssl STATIC_CMAKE_BOOL= BUILD_STATIC_LIB +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MOPENSSL} && ${SSL_DEFAULT} == base && !exists(/usr/include/openssl/ml_kem.h) +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-mlkem +.endif + post-install-STATIC-on: ${INSTALL_DATA} ${INSTALL_WRKSRC}/src/libssh.a ${STAGEDIR}${PREFIX}/lib/ diff --git a/security/libssh/files/extra-patch-mlkem b/security/libssh/files/extra-patch-mlkem new file mode 100644 index 000000000000..cc530f2e900a --- /dev/null +++ b/security/libssh/files/extra-patch-mlkem @@ -0,0 +1,11 @@ +--- ConfigureChecks.cmake.orig 2026-02-10 09:36:24 UTC ++++ ConfigureChecks.cmake +@@ -106,8 +106,6 @@ if (OPENSSL_FOUND) + + # Check for ML-KEM availability (OpenSSL 3.5+) + if (OPENSSL_VERSION VERSION_GREATER_EQUAL "3.5.0") +- set(HAVE_OPENSSL_MLKEM 1) +- set(HAVE_MLKEM1024 1) + endif () + + unset(CMAKE_REQUIRED_INCLUDES)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69d501eb.345b8.37f29980>
