From a82b2f348abbea31dac31b4fbb3f910014bc296b Mon Sep 17 00:00:00 2001 From: Tim Sheerman-Chase Date: Sun, 3 Aug 2025 20:30:15 +0100 Subject: [PATCH 1/9] Update libssh to v0.11.2 --- ports/libssh/0001-export-pkgconfig-file.patch | 35 +++++++++---------- ports/libssh/0003-no-source-write.patch | 19 +++++----- .../0004-file-permissions-constants.patch | 5 +-- ports/libssh/portfile.cmake | 4 +-- ports/libssh/vcpkg.json | 2 +- 5 files changed, 33 insertions(+), 32 deletions(-) diff --git a/ports/libssh/0001-export-pkgconfig-file.patch b/ports/libssh/0001-export-pkgconfig-file.patch index bd4e4c03d59b25..947fb63a8e57df 100644 --- a/ports/libssh/0001-export-pkgconfig-file.patch +++ b/ports/libssh/0001-export-pkgconfig-file.patch @@ -1,39 +1,38 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index a64b770..716bb34 100644 +index 9877cd7..e97c900 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -43,8 +43,12 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil +@@ -42,8 +42,11 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") # 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 PC_REQUIRES_PRIVATE "zlib") endif (WITH_ZLIB) if (WITH_GCRYPT) -@@ -60,6 +64,7 @@ elseif(WITH_MBEDTLS) - else (WITH_GCRYPT) - find_package(OpenSSL 1.0.1) - if (OPENSSL_FOUND) -+ string(APPEND PC_REQUIRES_PRIVATE " libcrypto") - # On CMake < 3.16, OPENSSL_CRYPTO_LIBRARIES is usually a synonym for OPENSSL_CRYPTO_LIBRARY, but is not defined - # when building on Windows outside of Cygwin. We provide the synonym here, if FindOpenSSL didn't define it already. - if (NOT DEFINED OPENSSL_CRYPTO_LIBRARIES) -@@ -84,6 +89,9 @@ endif () +@@ -53,6 +56,7 @@ elseif(WITH_MBEDTLS) + find_package(MbedTLS REQUIRED) + else() + find_package(OpenSSL 1.1.1 REQUIRED) ++ string(APPEND PC_REQUIRES_PRIVATE " libcrypto") + endif() + + if (UNIT_TESTING) +@@ -63,6 +67,9 @@ endif () set(CMAKE_THREAD_PREFER_PTHREADS ON) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads) +if(Threads_FOUND) -+ string(APPEND PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}") ++ string(APPEND PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}") +endif() if (WITH_GSSAPI) find_package(GSSAPI) -@@ -122,7 +130,6 @@ add_subdirectory(include) +@@ -96,7 +103,6 @@ add_subdirectory(include) add_subdirectory(src) # pkg-config file @@ -41,7 +40,7 @@ index a64b770..716bb34 100644 configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY) install( FILES -@@ -132,7 +139,6 @@ install( +@@ -106,7 +112,6 @@ install( COMPONENT pkgconfig ) @@ -61,10 +60,10 @@ index f288b94..759525c 100644 +Requires.private: @PC_REQUIRES_PRIVATE@ Cflags: -I${includedir} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 807313b..72ef059 100644 +index e0243bb..1dd9951 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -94,6 +94,8 @@ if (WIN32) +@@ -64,6 +64,8 @@ if (WIN32) iphlpapi ws2_32 ) diff --git a/ports/libssh/0003-no-source-write.patch b/ports/libssh/0003-no-source-write.patch index 865fd0d2b7e6f3..55db9b0836e46e 100644 --- a/ports/libssh/0003-no-source-write.patch +++ b/ports/libssh/0003-no-source-write.patch @@ -1,14 +1,15 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index d066cde..d2a11cb 100644 +index e97c900..0b676dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -224,9 +224,6 @@ endif (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND) - add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_SYMBOL_TARGET} VERBATIM) - - # Link compile database for clangd --execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink -- "${CMAKE_BINARY_DIR}/compile_commands.json" -- "${CMAKE_SOURCE_DIR}/compile_commands.json") +@@ -213,9 +213,7 @@ add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_S + get_directory_property(hasParent PARENT_DIRECTORY) + if(NOT(hasParent)) + # Link compile database for clangd if we are the master project +- execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink +- "${CMAKE_BINARY_DIR}/compile_commands.json" +- "${CMAKE_SOURCE_DIR}/compile_commands.json") ++ + endif() message(STATUS "********************************************") - message(STATUS "********** ${PROJECT_NAME} build options : **********") diff --git a/ports/libssh/0004-file-permissions-constants.patch b/ports/libssh/0004-file-permissions-constants.patch index 1040f9b7444e5b..017783817d5775 100644 --- a/ports/libssh/0004-file-permissions-constants.patch +++ b/ports/libssh/0004-file-permissions-constants.patch @@ -1,6 +1,7 @@ diff --git a/src/misc.c b/src/misc.c ---- a/src/misc.c (revision 9941e89f307e73352d887cac14e4e26b481a0a82) -+++ b/src/misc.c (date 1675868320486) +index 774211f..33d37b4 100644 +--- a/src/misc.c ++++ b/src/misc.c @@ -24,6 +24,11 @@ #include "config.h" diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 687a15ef0b1906..c46130697791c5 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.10/libssh-${VERSION}.tar.xz + URLS https://www.libssh.org/files/0.11/libssh-${VERSION}.tar.xz FILENAME libssh-${VERSION}.tar.xz - SHA512 40c62d63c44e882999b71552c237d73fc7364313bd00b15a211a34aeff1b73693da441d2c8d4e40108d00fb7480ec7c5b6d472f9c0784b2359a179632ab0d6c1 + SHA512 15d56c3f82ee81c3ab4af2b17eba054626bb53c3337ef45f829479f8b64c552f6e7cbf307e41c9792bcb3438f282d2690acbe994150bd03a8b6c21ba8b1cfe50 ) vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${distfile}" diff --git a/ports/libssh/vcpkg.json b/ports/libssh/vcpkg.json index 4f9dbfed16436d..f9f5c8987aa0de 100644 --- a/ports/libssh/vcpkg.json +++ b/ports/libssh/vcpkg.json @@ -1,6 +1,6 @@ { "name": "libssh", - "version": "0.10.6", + "version": "0.11.2", "port-version": 1, "description": "libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side", "homepage": "https://www.libssh.org/", From aca79bbf5c183d55b308f9bf2cccf65096235738 Mon Sep 17 00:00:00 2001 From: Tim Sheerman-Chase Date: Sun, 3 Aug 2025 20:39:43 +0100 Subject: [PATCH 2/9] Run vcpkg x-add-version --all --- ports/libssh/vcpkg.json | 1 - versions/baseline.json | 4 ++-- versions/l-/libssh.json | 5 +++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ports/libssh/vcpkg.json b/ports/libssh/vcpkg.json index f9f5c8987aa0de..7489c092dbae26 100644 --- a/ports/libssh/vcpkg.json +++ b/ports/libssh/vcpkg.json @@ -1,7 +1,6 @@ { "name": "libssh", "version": "0.11.2", - "port-version": 1, "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 9cf2f2f963f190..60802b29b4bf39 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5429,8 +5429,8 @@ "port-version": 1 }, "libssh": { - "baseline": "0.10.6", - "port-version": 1 + "baseline": "0.11.2", + "port-version": 0 }, "libssh2": { "baseline": "1.11.1", diff --git a/versions/l-/libssh.json b/versions/l-/libssh.json index 11be513b1b6fb0..828c6dce750da0 100644 --- a/versions/l-/libssh.json +++ b/versions/l-/libssh.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "10d0e95813636ce43f708150eb3d5204140c7b75", + "version": "0.11.2", + "port-version": 0 + }, { "git-tree": "179b87db359bda2e015e67cb5eecd462502beae6", "version": "0.10.6", From 844a04ea17ab2b1ff99cb283e35d26ebbb5ecc7b Mon Sep 17 00:00:00 2001 From: Tim Sheerman-Chase Date: Tue, 5 Aug 2025 02:55:16 +0100 Subject: [PATCH 3/9] Fix libssh dependencies by adding find_dependency --- ports/libssh/0001-export-pkgconfig-file.patch | 33 ++++++++++++++++++- ports/libssh/portfile.cmake | 12 +++---- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/ports/libssh/0001-export-pkgconfig-file.patch b/ports/libssh/0001-export-pkgconfig-file.patch index 947fb63a8e57df..b42ec87d9ca68d 100644 --- a/ports/libssh/0001-export-pkgconfig-file.patch +++ b/ports/libssh/0001-export-pkgconfig-file.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9877cd7..e97c900 100644 +index 9877cd7..ce74d73 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 @@ -48,6 +48,20 @@ index 9877cd7..e97c900 100644 # CMake config files include(CMakePackageConfigHelpers) +@@ -255,3 +260,13 @@ message(STATUS "Global bind config: ${GLOBAL_BIND_CONFIG}") + endif() + message(STATUS "********************************************") + ++configure_file( ++ ${CMAKE_CURRENT_SOURCE_DIR}/libssh.pc.in ++ ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc ++ @ONLY ++) ++ ++install(FILES ++ ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig ++) diff --git a/libssh.pc.cmake b/libssh.pc.cmake index f288b94..759525c 100644 --- a/libssh.pc.cmake @@ -59,6 +73,23 @@ index f288b94..759525c 100644 +Libs.private: @PC_LIBS_PRIVATE@ +Requires.private: @PC_REQUIRES_PRIVATE@ Cflags: -I${includedir} +diff --git a/libssh.pc.in b/libssh.pc.in +new file mode 100644 +index 0000000..8958fd7 +--- /dev/null ++++ b/libssh.pc.in +@@ -0,0 +1,10 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ ++ ++Name: libssh ++Description: The SSH library ++Version: @PROJECT_VERSION@ ++Libs: -L${libdir} -lssh ++Cflags: -I${includedir} +\ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e0243bb..1dd9951 100644 --- a/src/CMakeLists.txt diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index c46130697791c5..a5977dddcc3c7d 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -3,6 +3,7 @@ vcpkg_download_distfile(distfile FILENAME libssh-${VERSION}.tar.xz SHA512 15d56c3f82ee81c3ab4af2b17eba054626bb53c3337ef45f829479f8b64c552f6e7cbf307e41c9792bcb3438f282d2690acbe994150bd03a8b6c21ba8b1cfe50 ) + vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${distfile}" PATCHES @@ -41,16 +42,11 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") ) endif() +# This picks up lib/cmake/libssh and moves the config files to share/libssh vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libssh) -file(READ "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" cmake_config) -file(WRITE "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" " -include(CMakeFindDependencyMacro) -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_dependency(Threads) -${cmake_config}" -) - +# Remove debug include files (clean install) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +# Install license vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") From f0c2932e0f88b0dfddb3d6c44b42f4bf6e39b9d3 Mon Sep 17 00:00:00 2001 From: Tim Sheerman-Chase Date: Tue, 5 Aug 2025 04:55:39 +0100 Subject: [PATCH 4/9] Update port version hash of libssh --- versions/l-/libssh.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libssh.json b/versions/l-/libssh.json index 828c6dce750da0..6279fd2e727c27 100644 --- a/versions/l-/libssh.json +++ b/versions/l-/libssh.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "10d0e95813636ce43f708150eb3d5204140c7b75", + "git-tree": "baf9fc107b5ec3c5c36d871fd073484cdcffed33", "version": "0.11.2", "port-version": 0 }, From 1d03c09390b7fbe9432016e7149159bd02d9323e Mon Sep 17 00:00:00 2001 From: Tim Sheerman-Chase Date: Tue, 5 Aug 2025 05:23:33 +0100 Subject: [PATCH 5/9] Update libssh based on review comments --- ports/libssh/0001-export-pkgconfig-file.patch | 6 +++--- versions/l-/libssh.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/libssh/0001-export-pkgconfig-file.patch b/ports/libssh/0001-export-pkgconfig-file.patch index b42ec87d9ca68d..910d7daa51934f 100644 --- a/ports/libssh/0001-export-pkgconfig-file.patch +++ b/ports/libssh/0001-export-pkgconfig-file.patch @@ -10,7 +10,7 @@ index 9877cd7..ce74d73 100644 +set(PC_REQUIRES_PRIVATE "") if (WITH_ZLIB) find_package(ZLIB REQUIRED) -+ string(APPEND PC_REQUIRES_PRIVATE "zlib") ++ string(APPEND PC_REQUIRES_PRIVATE "zlib") endif (WITH_ZLIB) if (WITH_GCRYPT) @@ -27,7 +27,7 @@ index 9877cd7..ce74d73 100644 set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads) +if(Threads_FOUND) -+ string(APPEND PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}") ++ string(APPEND PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}") +endif() if (WITH_GSSAPI) @@ -53,7 +53,7 @@ index 9877cd7..ce74d73 100644 message(STATUS "********************************************") +configure_file( -+ ${CMAKE_CURRENT_SOURCE_DIR}/libssh.pc.in ++ ${CMAKE_CURRENT_SOURCE_DIR}/libssh.pc.cmake + ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc + @ONLY +) diff --git a/versions/l-/libssh.json b/versions/l-/libssh.json index 6279fd2e727c27..bc85de61c8c0fd 100644 --- a/versions/l-/libssh.json +++ b/versions/l-/libssh.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "baf9fc107b5ec3c5c36d871fd073484cdcffed33", + "git-tree": "fb069e6ba78b05718cf88d4d5be019794893799e", "version": "0.11.2", "port-version": 0 }, From d69ea438203d8b75a5592c64b6cb0614b1f240ab Mon Sep 17 00:00:00 2001 From: Tim Sheerman-Chase Date: Tue, 5 Aug 2025 11:58:05 +0100 Subject: [PATCH 6/9] Update libssh port based on comments --- ports/libssh/0001-export-pkgconfig-file.patch | 9 ++++++--- ports/libssh/portfile.cmake | 12 ++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ports/libssh/0001-export-pkgconfig-file.patch b/ports/libssh/0001-export-pkgconfig-file.patch index 910d7daa51934f..38d79cb02a22c1 100644 --- a/ports/libssh/0001-export-pkgconfig-file.patch +++ b/ports/libssh/0001-export-pkgconfig-file.patch @@ -32,20 +32,22 @@ index 9877cd7..ce74d73 100644 if (WITH_GSSAPI) find_package(GSSAPI) -@@ -96,7 +103,6 @@ add_subdirectory(include) +@@ -96,7 +103,7 @@ add_subdirectory(include) add_subdirectory(src) # pkg-config file -if (UNIX OR MINGW) ++if (1) configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY) install( FILES -@@ -106,7 +112,6 @@ install( +@@ -106,7 +113,7 @@ install( COMPONENT pkgconfig ) -endif (UNIX OR MINGW) - ++endif (1) + # CMake config files include(CMakePackageConfigHelpers) @@ -255,3 +260,13 @@ message(STATUS "Global bind config: ${GLOBAL_BIND_CONFIG}") @@ -103,3 +105,4 @@ index e0243bb..1dd9951 100644 endif (WIN32) if (BUILD_STATIC_LIB) + diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index a5977dddcc3c7d..c46130697791c5 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -3,7 +3,6 @@ vcpkg_download_distfile(distfile FILENAME libssh-${VERSION}.tar.xz SHA512 15d56c3f82ee81c3ab4af2b17eba054626bb53c3337ef45f829479f8b64c552f6e7cbf307e41c9792bcb3438f282d2690acbe994150bd03a8b6c21ba8b1cfe50 ) - vcpkg_extract_source_archive(SOURCE_PATH ARCHIVE "${distfile}" PATCHES @@ -42,11 +41,16 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") ) endif() -# This picks up lib/cmake/libssh and moves the config files to share/libssh vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libssh) -# Remove debug include files (clean install) +file(READ "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" cmake_config) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" " +include(CMakeFindDependencyMacro) +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_dependency(Threads) +${cmake_config}" +) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Install license vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") From 15249ec98d116fed7bfd106e91ba23deb31bff37 Mon Sep 17 00:00:00 2001 From: Tim Sheerman-Chase Date: Tue, 5 Aug 2025 11:45:00 +0100 Subject: [PATCH 7/9] Update libssh port hash --- versions/l-/libssh.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libssh.json b/versions/l-/libssh.json index bc85de61c8c0fd..a633559f57fd1e 100644 --- a/versions/l-/libssh.json +++ b/versions/l-/libssh.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "fb069e6ba78b05718cf88d4d5be019794893799e", + "git-tree": "dfbd5ab7e4557cdcdfaaf345311b7dfb36182754", "version": "0.11.2", "port-version": 0 }, From 5f66a746d33c3ff1aa547ca3d167eb34f8b77285 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal III Date: Wed, 6 Aug 2025 13:43:26 -0700 Subject: [PATCH 8/9] Add find_dependency(OpenSSL) --- ports/libssh/portfile.cmake | 1 + versions/l-/libssh.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index c46130697791c5..dc94e327e4d33b 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -48,6 +48,7 @@ file(WRITE "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" " include(CMakeFindDependencyMacro) set(THREADS_PREFER_PTHREAD_FLAG ON) find_dependency(Threads) +find_dependency(OpenSSL) ${cmake_config}" ) diff --git a/versions/l-/libssh.json b/versions/l-/libssh.json index a633559f57fd1e..4db983588ac6d2 100644 --- a/versions/l-/libssh.json +++ b/versions/l-/libssh.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "dfbd5ab7e4557cdcdfaaf345311b7dfb36182754", + "git-tree": "c5154e5ea657c31074f3389af121688c31e4f786", "version": "0.11.2", "port-version": 0 }, From 5f07c5f9dc65e0e8df155b0001a66890bddfe124 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Wed, 6 Aug 2025 23:10:48 +0200 Subject: [PATCH 9/9] Fixup --- ports/libssh/0001-export-pkgconfig-file.patch | 63 +++++-------------- ports/libssh/portfile.cmake | 9 ++- versions/l-/libssh.json | 2 +- 3 files changed, 23 insertions(+), 51 deletions(-) diff --git a/ports/libssh/0001-export-pkgconfig-file.patch b/ports/libssh/0001-export-pkgconfig-file.patch index 38d79cb02a22c1..3c5d1469eac728 100644 --- a/ports/libssh/0001-export-pkgconfig-file.patch +++ b/ports/libssh/0001-export-pkgconfig-file.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9877cd7..ce74d73 100644 +index 9877cd7..5177904 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 @@ -22,17 +22,7 @@ index 9877cd7..ce74d73 100644 endif() if (UNIT_TESTING) -@@ -63,6 +67,9 @@ endif () - set(CMAKE_THREAD_PREFER_PTHREADS ON) - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads) -+if(Threads_FOUND) -+ string(APPEND PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}") -+endif() - - if (WITH_GSSAPI) - find_package(GSSAPI) -@@ -96,7 +103,7 @@ add_subdirectory(include) +@@ -96,7 +100,7 @@ add_subdirectory(include) add_subdirectory(src) # pkg-config file @@ -41,29 +31,15 @@ index 9877cd7..ce74d73 100644 configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY) install( FILES -@@ -106,7 +113,7 @@ install( +@@ -106,7 +110,7 @@ install( COMPONENT pkgconfig ) -endif (UNIX OR MINGW) +endif (1) - + # CMake config files include(CMakePackageConfigHelpers) -@@ -255,3 +260,13 @@ message(STATUS "Global bind config: ${GLOBAL_BIND_CONFIG}") - endif() - message(STATUS "********************************************") - -+configure_file( -+ ${CMAKE_CURRENT_SOURCE_DIR}/libssh.pc.cmake -+ ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc -+ @ONLY -+) -+ -+install(FILES -+ ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig -+) diff --git a/libssh.pc.cmake b/libssh.pc.cmake index f288b94..759525c 100644 --- a/libssh.pc.cmake @@ -75,28 +51,20 @@ index f288b94..759525c 100644 +Libs.private: @PC_LIBS_PRIVATE@ +Requires.private: @PC_REQUIRES_PRIVATE@ Cflags: -I${includedir} -diff --git a/libssh.pc.in b/libssh.pc.in -new file mode 100644 -index 0000000..8958fd7 ---- /dev/null -+++ b/libssh.pc.in -@@ -0,0 +1,10 @@ -+prefix=@CMAKE_INSTALL_PREFIX@ -+exec_prefix=${prefix} -+libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ -+ -+Name: libssh -+Description: The SSH library -+Version: @PROJECT_VERSION@ -+Libs: -L${libdir} -lssh -+Cflags: -I${includedir} -\ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e0243bb..1dd9951 100644 +index e0243bb..b17d9e2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -64,6 +64,8 @@ if (WIN32) +@@ -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) + endif() + + # The ws2_32 needs to be last for mingw to build +@@ -64,6 +66,8 @@ if (WIN32) iphlpapi ws2_32 ) @@ -105,4 +73,3 @@ index e0243bb..1dd9951 100644 endif (WIN32) if (BUILD_STATIC_LIB) - diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index dc94e327e4d33b..b911a3d83558f4 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -46,9 +46,14 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libssh) file(READ "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" cmake_config) file(WRITE "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" " include(CMakeFindDependencyMacro) -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_dependency(Threads) +if(MINGW32) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_dependency(Threads) +endif() find_dependency(OpenSSL) +if(\"${WITH_ZLIB}\") + find_dependency(ZLIB) +endif() ${cmake_config}" ) diff --git a/versions/l-/libssh.json b/versions/l-/libssh.json index 4db983588ac6d2..a8f3bdebb39687 100644 --- a/versions/l-/libssh.json +++ b/versions/l-/libssh.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c5154e5ea657c31074f3389af121688c31e4f786", + "git-tree": "4bd19f9713b8f41125f895de6138b20c1afa83b5", "version": "0.11.2", "port-version": 0 },