From d7cc563783989584950e72ed1776dd2645de99b6 Mon Sep 17 00:00:00 2001 From: chausner <15180557+chausner@users.noreply.github.com> Date: Mon, 11 Oct 2021 19:26:07 +0200 Subject: [PATCH] [libssh2] Update to 1.10.0 (#20364) * Update libssh2 to 1.10.0 * Update CI baseline * Fix patch * Change version-string to version * Update git-tree hash * Switch to new CMake portfile commands * Fix UWP build * Format vcpkg.json * Update git-tree hash * Switch back to legacy CMake commands to fix build validation issues * Update git-tree hash * Fix IS_UWP define in patch * Update git-tree hash Co-authored-by: chausner Co-authored-by: Billy Robert O'Neal III --- ports/libssh2/0001-Fix-UWP.patch | 26 +++++++++++++++++++++----- ports/libssh2/portfile.cmake | 18 +++++++++--------- ports/libssh2/vcpkg.json | 5 ++--- versions/baseline.json | 4 ++-- versions/l-/libssh2.json | 5 +++++ 5 files changed, 39 insertions(+), 19 deletions(-) diff --git a/ports/libssh2/0001-Fix-UWP.patch b/ports/libssh2/0001-Fix-UWP.patch index 270dd7b903..8a7190f898 100644 --- a/ports/libssh2/0001-Fix-UWP.patch +++ b/ports/libssh2/0001-Fix-UWP.patch @@ -15,9 +15,9 @@ diff --git a/src/agent.c b/src/agent.c index c2ba422..f1799f8 100644 --- a/src/agent.c +++ b/src/agent.c -@@ -51,6 +51,10 @@ - #include "userauth.h" - #include "session.h" +@@ -55,6 +55,10 @@ + #include + #endif +#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) +#define IS_UWP 1 @@ -42,7 +42,23 @@ index c2ba422..f1799f8 100644 -#ifdef WIN32 - {"Pageant", &agent_ops_pageant}, +#if defined(WIN32) && !defined(IS_UWP) -+ {"Pageant", &agent_ops_pageant}, ++ {"Pageant", &agent_ops_pageant}, + {"OpenSSH", &agent_ops_openssh}, #endif /* WIN32 */ #ifdef PF_UNIX - {"Unix", &agent_ops_unix}, +diff --git a/src/agent_win.c b/src/agent_win.c +--- a/src/agent_win.c ++++ b/src/agent_win.c +@@ -55,7 +55,11 @@ + #include + #endif + +-#ifdef WIN32 ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#define IS_UWP 1 ++#endif /* #if defined(WINAPI_FAMILY) */ ++ ++#if defined(WIN32) && !defined(IS_UWP) + /* Code to talk to OpenSSH was taken and modified from the Win32 port of + * Portable OpenSSH by the PowerShell team. Commit + * 8ab565c53f3619d6a1f5ac229e212cad8a52852c of diff --git a/ports/libssh2/portfile.cmake b/ports/libssh2/portfile.cmake index 0922bb7c8b..7949dc64e6 100644 --- a/ports/libssh2/portfile.cmake +++ b/ports/libssh2/portfile.cmake @@ -1,14 +1,14 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libssh2/libssh2 - REF 42d37aa63129a1b2644bf6495198923534322d64 - SHA512 e86c0787e2aa7be5e9f19356e543493e53c7d1b51b585c46facfb05f769e6491209f820b207bf594348f4760c492c32dda3fcc94fc0af93cb09c736492a8e231 + REF libssh2-1.10.0 + SHA512 615E28880695911F5700CC7AC3DDA6B894384C0B1D8B02B53C2EB58F1839F47211934A292F490AD7DDEF7E63F332E0EBF44F8E6334F64BE8D143C72032356C1F HEAD_REF master PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch" ) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF @@ -19,14 +19,14 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share") vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libssh2) -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh2 RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libssh2" RENAME copyright) vcpkg_copy_pdbs() diff --git a/ports/libssh2/vcpkg.json b/ports/libssh2/vcpkg.json index c5692d4646..9dc048318f 100644 --- a/ports/libssh2/vcpkg.json +++ b/ports/libssh2/vcpkg.json @@ -1,8 +1,7 @@ { "name": "libssh2", - "version-string": "1.9.0", - "port-version": 1, - "description": "The SSH library", + "version": "1.10.0", + "description": "libssh2 is a client-side C library implementing the SSH2 protocol.", "homepage": "https://www.libssh2.org", "dependencies": [ "openssl", diff --git a/versions/baseline.json b/versions/baseline.json index 1564611385..8b00998084 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3825,8 +3825,8 @@ "port-version": 0 }, "libssh2": { - "baseline": "1.9.0", - "port-version": 1 + "baseline": "1.10.0", + "port-version": 0 }, "libstemmer": { "baseline": "2017-9", diff --git a/versions/l-/libssh2.json b/versions/l-/libssh2.json index 3dca2e5859..0d3fbfbeb8 100644 --- a/versions/l-/libssh2.json +++ b/versions/l-/libssh2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "996df01b95684f41e8870b9154aeea3bffc63840", + "version": "1.10.0", + "port-version": 0 + }, { "git-tree": "d448a6d5c97053355abbfa84171fcc7624dcd509", "version-string": "1.9.0",