Skip to content

Commit 28354c1

Browse files
dg0ytTim Sheerman-ChaseBillyONeal
authored
[libssh] Update to 0.11.2 (#46794)
Co-authored-by: Tim Sheerman-Chase <[email protected]> Co-authored-by: Billy Robert O'Neal III <[email protected]>
1 parent 4fea4b5 commit 28354c1

File tree

7 files changed

+55
-43
lines changed

7 files changed

+55
-43
lines changed

ports/libssh/0001-export-pkgconfig-file.patch

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,42 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index a64b770..716bb34 100644
2+
index 9877cd7..5177904 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -43,8 +43,12 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil
5+
@@ -42,8 +42,11 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil
66
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
77

88
# search for libraries
99
+set(PC_LIBS_PRIVATE "")
1010
+set(PC_REQUIRES_PRIVATE "")
11-
+
1211
if (WITH_ZLIB)
1312
find_package(ZLIB REQUIRED)
1413
+ string(APPEND PC_REQUIRES_PRIVATE "zlib")
1514
endif (WITH_ZLIB)
1615

1716
if (WITH_GCRYPT)
18-
@@ -60,6 +64,7 @@ elseif(WITH_MBEDTLS)
19-
else (WITH_GCRYPT)
20-
find_package(OpenSSL 1.0.1)
21-
if (OPENSSL_FOUND)
22-
+ string(APPEND PC_REQUIRES_PRIVATE " libcrypto")
23-
# On CMake < 3.16, OPENSSL_CRYPTO_LIBRARIES is usually a synonym for OPENSSL_CRYPTO_LIBRARY, but is not defined
24-
# when building on Windows outside of Cygwin. We provide the synonym here, if FindOpenSSL didn't define it already.
25-
if (NOT DEFINED OPENSSL_CRYPTO_LIBRARIES)
26-
@@ -84,6 +89,9 @@ endif ()
27-
set(CMAKE_THREAD_PREFER_PTHREADS ON)
28-
set(THREADS_PREFER_PTHREAD_FLAG ON)
29-
find_package(Threads)
30-
+if(Threads_FOUND)
31-
+ string(APPEND PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}")
32-
+endif()
17+
@@ -53,6 +56,7 @@ elseif(WITH_MBEDTLS)
18+
find_package(MbedTLS REQUIRED)
19+
else()
20+
find_package(OpenSSL 1.1.1 REQUIRED)
21+
+ string(APPEND PC_REQUIRES_PRIVATE " libcrypto")
22+
endif()
3323

34-
if (WITH_GSSAPI)
35-
find_package(GSSAPI)
36-
@@ -122,7 +130,6 @@ add_subdirectory(include)
24+
if (UNIT_TESTING)
25+
@@ -96,7 +100,7 @@ add_subdirectory(include)
3726
add_subdirectory(src)
3827

3928
# pkg-config file
4029
-if (UNIX OR MINGW)
30+
+if (1)
4131
configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc @ONLY)
4232
install(
4333
FILES
44-
@@ -132,7 +139,6 @@ install(
34+
@@ -106,7 +110,7 @@ install(
4535
COMPONENT
4636
pkgconfig
4737
)
4838
-endif (UNIX OR MINGW)
39+
+endif (1)
4940

5041
# CMake config files
5142
include(CMakePackageConfigHelpers)
@@ -61,10 +52,19 @@ index f288b94..759525c 100644
6152
+Requires.private: @PC_REQUIRES_PRIVATE@
6253
Cflags: -I${includedir}
6354
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
64-
index 807313b..72ef059 100644
55+
index e0243bb..b17d9e2 100644
6556
--- a/src/CMakeLists.txt
6657
+++ b/src/CMakeLists.txt
67-
@@ -94,6 +94,8 @@ if (WIN32)
58+
@@ -54,6 +54,8 @@ if (MINGW AND Threads_FOUND)
59+
${LIBSSH_LINK_LIBRARIES}
60+
Threads::Threads
61+
)
62+
+ string(APPEND PC_LIBS_PRIVATE " ${CMAKE_THREAD_LIBS_INIT}")
63+
+ set(PC_LIBS_PRIVATE "${PC_LIBS_PRIVATE}" PARENT_SCOPE)
64+
endif()
65+
66+
# The ws2_32 needs to be last for mingw to build
67+
@@ -64,6 +66,8 @@ if (WIN32)
6868
iphlpapi
6969
ws2_32
7070
)

ports/libssh/0003-no-source-write.patch

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index d066cde..d2a11cb 100644
2+
index e97c900..0b676dc 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -224,9 +224,6 @@ endif (WITH_SYMBOL_VERSIONING AND ABIMAP_FOUND)
6-
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_SYMBOL_TARGET} VERBATIM)
7-
8-
# Link compile database for clangd
9-
-execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
10-
- "${CMAKE_BINARY_DIR}/compile_commands.json"
11-
- "${CMAKE_SOURCE_DIR}/compile_commands.json")
5+
@@ -213,9 +213,7 @@ add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source DEPENDS ${_S
6+
get_directory_property(hasParent PARENT_DIRECTORY)
7+
if(NOT(hasParent))
8+
# Link compile database for clangd if we are the master project
9+
- execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
10+
- "${CMAKE_BINARY_DIR}/compile_commands.json"
11+
- "${CMAKE_SOURCE_DIR}/compile_commands.json")
12+
+
13+
endif()
1214

1315
message(STATUS "********************************************")
14-
message(STATUS "********** ${PROJECT_NAME} build options : **********")

ports/libssh/0004-file-permissions-constants.patch

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
diff --git a/src/misc.c b/src/misc.c
2-
--- a/src/misc.c (revision 9941e89f307e73352d887cac14e4e26b481a0a82)
3-
+++ b/src/misc.c (date 1675868320486)
2+
index 774211f..33d37b4 100644
3+
--- a/src/misc.c
4+
+++ b/src/misc.c
45
@@ -24,6 +24,11 @@
56

67
#include "config.h"

ports/libssh/portfile.cmake

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
vcpkg_download_distfile(distfile
2-
URLS https://www.libssh.org/files/0.10/libssh-${VERSION}.tar.xz
2+
URLS https://www.libssh.org/files/0.11/libssh-${VERSION}.tar.xz
33
FILENAME libssh-${VERSION}.tar.xz
4-
SHA512 40c62d63c44e882999b71552c237d73fc7364313bd00b15a211a34aeff1b73693da441d2c8d4e40108d00fb7480ec7c5b6d472f9c0784b2359a179632ab0d6c1
4+
SHA512 15d56c3f82ee81c3ab4af2b17eba054626bb53c3337ef45f829479f8b64c552f6e7cbf307e41c9792bcb3438f282d2690acbe994150bd03a8b6c21ba8b1cfe50
55
)
66
vcpkg_extract_source_archive(SOURCE_PATH
77
ARCHIVE "${distfile}"
@@ -46,8 +46,14 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/libssh)
4646
file(READ "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" cmake_config)
4747
file(WRITE "${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake" "
4848
include(CMakeFindDependencyMacro)
49-
set(THREADS_PREFER_PTHREAD_FLAG ON)
50-
find_dependency(Threads)
49+
if(MINGW32)
50+
set(THREADS_PREFER_PTHREAD_FLAG ON)
51+
find_dependency(Threads)
52+
endif()
53+
find_dependency(OpenSSL)
54+
if(\"${WITH_ZLIB}\")
55+
find_dependency(ZLIB)
56+
endif()
5157
${cmake_config}"
5258
)
5359

ports/libssh/vcpkg.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "libssh",
3-
"version": "0.10.6",
4-
"port-version": 1,
3+
"version": "0.11.2",
54
"description": "libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side",
65
"homepage": "https://www.libssh.org/",
76
"license": "LGPL-2.1-only",

versions/baseline.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5433,8 +5433,8 @@
54335433
"port-version": 1
54345434
},
54355435
"libssh": {
5436-
"baseline": "0.10.6",
5437-
"port-version": 1
5436+
"baseline": "0.11.2",
5437+
"port-version": 0
54385438
},
54395439
"libssh2": {
54405440
"baseline": "1.11.1",

versions/l-/libssh.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"versions": [
3+
{
4+
"git-tree": "4bd19f9713b8f41125f895de6138b20c1afa83b5",
5+
"version": "0.11.2",
6+
"port-version": 0
7+
},
38
{
49
"git-tree": "179b87db359bda2e015e67cb5eecd462502beae6",
510
"version": "0.10.6",

0 commit comments

Comments
 (0)