From a7beca55cb90ee76f7958c1000d7d490a74ba620 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 11 Apr 2026 08:38:05 +0900 Subject: [PATCH] [libssh] update to 0.12.0 (#50023) Co-authored-by: Kai Pastor --- ports/libssh/0001-export-pkgconfig-file.patch | 44 +++++++++---------- ports/libssh/portfile.cmake | 4 +- ports/libssh/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libssh.json | 5 +++ 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/ports/libssh/0001-export-pkgconfig-file.patch b/ports/libssh/0001-export-pkgconfig-file.patch index 3c5d1469ea..6c06437968 100644 --- a/ports/libssh/0001-export-pkgconfig-file.patch +++ b/ports/libssh/0001-export-pkgconfig-file.patch @@ -1,28 +1,30 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9877cd7..5177904 100644 +index 474437f..1e5adfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -42,8 +42,11 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil +@@ -41,11 +41,13 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil + # Copy library files to a lib sub-directory set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") ++set(LIBSSH_PC_LIBS_PRIVATE "") + set(LIBSSSH_PC_REQUIRES_PRIVATE "") + # search for libraries -+set(PC_LIBS_PRIVATE "") -+set(PC_REQUIRES_PRIVATE "") if (WITH_ZLIB) find_package(ZLIB REQUIRED) -+ string(APPEND PC_REQUIRES_PRIVATE "zlib") ++ string(APPEND LIBSSH_PC_REQUIRES_PRIVATE "zlib") endif (WITH_ZLIB) if (WITH_GCRYPT) -@@ -53,6 +56,7 @@ elseif(WITH_MBEDTLS) +@@ -55,6 +57,7 @@ elseif(WITH_MBEDTLS) find_package(MbedTLS REQUIRED) else() find_package(OpenSSL 1.1.1 REQUIRED) -+ string(APPEND PC_REQUIRES_PRIVATE " libcrypto") ++ string(APPEND LIBSSH_PC_REQUIRES_PRIVATE " libcrypto") endif() if (UNIT_TESTING) -@@ -96,7 +100,7 @@ add_subdirectory(include) +@@ -109,7 +112,7 @@ add_subdirectory(include) add_subdirectory(src) # pkg-config file @@ -31,7 +33,7 @@ index 9877cd7..5177904 100644 configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY) install( FILES -@@ -106,7 +110,7 @@ install( +@@ -119,7 +122,7 @@ install( COMPONENT pkgconfig ) @@ -41,35 +43,33 @@ index 9877cd7..5177904 100644 # CMake config files include(CMakePackageConfigHelpers) diff --git a/libssh.pc.cmake b/libssh.pc.cmake -index f288b94..759525c 100644 +index 970db5e..df65d5d 100644 --- a/libssh.pc.cmake +++ b/libssh.pc.cmake -@@ -7,4 +7,6 @@ Name: @PROJECT_NAME@ - Description: The SSH Library - Version: @PROJECT_VERSION@ +@@ -9,3 +9,4 @@ Version: @PROJECT_VERSION@ Libs: -L${libdir} -lssh -+Libs.private: @PC_LIBS_PRIVATE@ -+Requires.private: @PC_REQUIRES_PRIVATE@ Cflags: -I${includedir} + Requires.private: @LIBSSH_PC_REQUIRES_PRIVATE@ ++Libs.private: @LIBSSH_PC_LIBS_PRIVATE@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e0243bb..b17d9e2 100644 +index a46f585..691df37 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -54,6 +54,8 @@ if (MINGW AND Threads_FOUND) ${LIBSSH_LINK_LIBRARIES} Threads::Threads ) -+ string(APPEND PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}") -+ set(PC_LIBS_PRIVATE "${PC_LIBS_PRIVATE}" PARENT_SCOPE) ++ string(APPEND LIBSSH_PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}") ++ set(LIBSSH_PC_LIBS_PRIVATE "${LIBSSH_PC_LIBS_PRIVATE}" PARENT_SCOPE) endif() - # The ws2_32 needs to be last for mingw to build -@@ -64,6 +66,8 @@ if (WIN32) + if (HAVE_LIBFIDO2) +@@ -76,6 +78,8 @@ if (WIN32) iphlpapi ws2_32 ) -+ string(APPEND PC_LIBS_PRIVATE " -liphlpapi -lws2_32 -lshell32 -ladvapi32") -+ set(PC_LIBS_PRIVATE "${PC_LIBS_PRIVATE}" PARENT_SCOPE) ++ string(APPEND LIBSSH_PC_LIBS_PRIVATE " -liphlpapi -lws2_32 -lshell32 -ladvapi32") ++ set(LIBSSH_PC_LIBS_PRIVATE "${LIBSSH_PC_LIBS_PRIVATE}" PARENT_SCOPE) endif (WIN32) if (BUILD_STATIC_LIB) diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 8c4c4a970d..258c83e713 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_download_distfile(distfile - URLS https://www.libssh.org/files/0.11/libssh-${VERSION}.tar.xz + URLS https://www.libssh.org/files/0.12/libssh-${VERSION}.tar.xz FILENAME libssh-${VERSION}.tar.xz - SHA512 0670bee29a7cf5507dba7dd82b82cd8a926b83a43cee441fa8a698be2523b16aacb392433f9e63887bd72e6eb817667f6ef986f292f335d1856759af4ede40c4 + SHA512 dd28483f391e36c9da0f0b8c469bc9e19f75dc1016d04e35930b1a28e0711fa02a1eae9ddeb95b9e48cb1fd3f2bc456789457bc092cf53d00d55b20257f082a2 ) vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${distfile}" diff --git a/ports/libssh/vcpkg.json b/ports/libssh/vcpkg.json index 410165d6b2..f9296ffb23 100644 --- a/ports/libssh/vcpkg.json +++ b/ports/libssh/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libssh", - "version": "0.11.3", + "version": "0.12.0", "description": "libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side", "homepage": "https://www.libssh.org/", "license": "LGPL-2.1-only", diff --git a/versions/baseline.json b/versions/baseline.json index 77122d5f94..88de354846 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5637,7 +5637,7 @@ "port-version": 0 }, "libssh": { - "baseline": "0.11.3", + "baseline": "0.12.0", "port-version": 0 }, "libssh2": { diff --git a/versions/l-/libssh.json b/versions/l-/libssh.json index c3c45e55c1..0fed904054 100644 --- a/versions/l-/libssh.json +++ b/versions/l-/libssh.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "75969e771d358d115ea5defc228c9249c44a99dd", + "version": "0.12.0", + "port-version": 0 + }, { "git-tree": "40d93eee441f0a4e52d06ceb9965809ffd30a52a", "version": "0.11.3",