Skip to content

Commit

Permalink
[libssh/libressl] update to the latest version (#20067)
Browse files Browse the repository at this point in the history
* [libssh/libssh2/libssh2] update to the latest version

* update version

* update patches formating

* update version

* update hash512

* update version'

* fix CI build error

* update version

* update vcpkg.json and portifile.cmake

* update version

* delete hash

* update version

* revert libssh2

* update version

* revert libssh2

* update portfile.cmake

* update version
  • Loading branch information
JonLiu1993 authored Sep 28, 2021
1 parent d49854f commit ee0584f
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 47 deletions.
19 changes: 6 additions & 13 deletions ports/libressl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ endif()

vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")

set(LIBRESSL_VERSION 3.3.3)
set(LIBRESSL_HASH 2d0b5f4cfe37d573bc64d5967abb77f536dbe581fbad9637d925332bcdfd185fe6810335b2af80a89f92d7e6edaa8ea3ba2492c60a117e47ea1b2d6aacf01f0f)
set(LIBRESSL_VERSION 3.3.4)
set(LIBRESSL_HASH 11defdde8169d3653c24e149e698ffc5a8ead5ac0808111d1986cb11ef72e9912c463d4891d4635877021e73a8a045dbdbe5e83ec785a59150f170d2ca2031de)

vcpkg_download_distfile(
LIBRESSL_SOURCE_ARCHIVE
Expand All @@ -30,26 +30,19 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"tools" LIBRESSL_APPS
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DLIBRESSL_TESTS=OFF
OPTIONS_DEBUG
-DLIBRESSL_APPS=OFF
)

vcpkg_install_cmake()
vcpkg_cmake_install()

if("tools" IN_LIST FEATURES)
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
set(EXECUTABLE_SUFFIX .exe)
endif()
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/openssl${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl${EXECUTABLE_SUFFIX}")
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/ocspcheck${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/ocspcheck${EXECUTABLE_SUFFIX}")
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl")
vcpkg_copy_tools(TOOL_NAMES ocspcheck openssl DESTINATION "${CURRENT_PACKAGES_DIR}/tools/openssl" AUTO_CLEAN)
endif()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
Expand Down
12 changes: 11 additions & 1 deletion ports/libressl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"name": "libressl",
"version": "3.3.3",
"version": "3.3.4",
"description": "LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes.",
"supports": "!(uwp | arm)",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"tools": {
"description": "Build openssl and ocspcheck executables"
Expand Down
13 changes: 5 additions & 8 deletions ports/libssh/0002-mingw_for_Android.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ccf5a33..8e88494 100644
index a576cf7..1f6a048 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -361,9 +361,9 @@ if (WITH_VISIBILITY_HIDDEN)
set_target_properties(ssh PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
@@ -359,7 +359,7 @@ if (WITH_VISIBILITY_HIDDEN)
set_target_properties(ssh PROPERTIES C_VISIBILITY_PRESET hidden)
endif (WITH_VISIBILITY_HIDDEN)

-if (MINGW)
+if (MINGW AND NOT ANDROID)
set_target_properties(ssh PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup")
- set_target_properties(ssh PROPERTIES COMPILE_FLAGS "-D_POSIX_SOURCE")
+ set_property(TARGET ssh APPEND PROPERTY COMPILE_FLAGS "-D_POSIX_SOURCE")
target_link_libraries(ssh PRIVATE "-Wl,--enable-stdcall-fixup")
target_compile_definitions(ssh PRIVATE "_POSIX_SOURCE")
endif ()


11 changes: 6 additions & 5 deletions ports/libssh/0003-create_symlink_unix_only.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f5b0bf..6559468 100644
index 53e6bd5..51d76c5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -206,9 +206,11 @@ endif (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND)
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_SYMBOL_TARGET})
@@ -231,10 +231,11 @@ 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
+if(UNIX)
execute_process(COMMAND cmake -E create_symlink
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 : **********")

28 changes: 13 additions & 15 deletions ports/libssh/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ vcpkg_fail_port_install(ON_TARGET "UWP")
vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH
URL https://git.libssh.org/projects/libssh.git
REF 9c4af47965d284b2de26407bcd80473aba4ee4c9 # REFERENCE VERSION 0.9.5
SHA512 64e692a0bfa7f73585ea7b7b8b1d4c9a7f9be59565bfd4de32ca8cd9db121f87e7ad51f5c80269fbd99545af34dcf1894374ed8a6d6c1ac5f8601c026572ac18
REF 47fd6e56c1058dca54afee1638c11fb6ec41911d # REFERENCE VERSION 0.9.6
PATCHES
0001-export-pkgconfig-file.patch
0002-mingw_for_Android.patch
Expand All @@ -13,8 +12,8 @@ vcpkg_from_git(

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
mbedtls WITH_MBEDTLS
zlib WITH_ZLIB
mbedtls WITH_MBEDTLS
zlib WITH_ZLIB
)

if (VCPKG_TARGET_IS_ANDROID)
Expand All @@ -23,9 +22,8 @@ if (VCPKG_TARGET_IS_ANDROID)
)
endif ()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${EXTRA_ARGS}
${FEATURE_OPTIONS}
Expand All @@ -36,8 +34,8 @@ vcpkg_configure_cmake(
-DWITH_NACL=OFF
-DWITH_GSSAPI=OFF)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
vcpkg_copy_pdbs()
#Fixup pthread naming
if(NOT VCPKG_TARGET_IS_MINGW AND VCPKG_TARGET_IS_WINDOWS)
Expand All @@ -49,22 +47,22 @@ endif()
vcpkg_fixup_pkgconfig()

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
vcpkg_replace_string(
${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h
"${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h"
"#ifdef LIBSSH_STATIC"
"#if 1"
)
endif()

if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string(
${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake
"${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake"
".dll"
".lib"
)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
11 changes: 9 additions & 2 deletions ports/libssh/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "libssh",
"version-string": "0.9.5",
"port-version": 6,
"version": "0.9.6",
"description": "libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side",
"homepage": "https://www.libssh.org/",
"supports": "!(uwp | arm)",
Expand All @@ -13,6 +12,14 @@
"mbedtls"
],
"platform": "android"
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
Expand Down
6 changes: 3 additions & 3 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3713,7 +3713,7 @@
"port-version": 1
},
"libressl": {
"baseline": "3.3.3",
"baseline": "3.3.4",
"port-version": 0
},
"librsvg": {
Expand Down Expand Up @@ -3801,8 +3801,8 @@
"port-version": 1
},
"libssh": {
"baseline": "0.9.5",
"port-version": 6
"baseline": "0.9.6",
"port-version": 0
},
"libssh2": {
"baseline": "1.9.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libressl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2dcc81c2e764c5f32d9c35280ab9ae06fda622c3",
"version": "3.3.4",
"port-version": 0
},
{
"git-tree": "24a18d6ed79f2b8c4c01c5201998981b2d831a1a",
"version": "3.3.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libssh.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "02a95a0ab1a26e3395173bc59e9f041f23b7f5c9",
"version": "0.9.6",
"port-version": 0
},
{
"git-tree": "0eb17d68736a224ca8ce341b1b84bbae2f2f43a5",
"version-string": "0.9.5",
Expand Down

0 comments on commit ee0584f

Please sign in to comment.