Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions ports/libssh/0001-export-pkgconfig-file.patch
Original file line number Diff line number Diff line change
@@ -1,51 +1,42 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a64b770..716bb34 100644
index 9877cd7..5177904 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")
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 ()
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()
@@ -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 (WITH_GSSAPI)
find_package(GSSAPI)
@@ -122,7 +130,6 @@ add_subdirectory(include)
if (UNIT_TESTING)
@@ -96,7 +100,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
@@ -132,7 +139,6 @@ install(
@@ -106,7 +110,7 @@ install(
COMPONENT
pkgconfig
)
-endif (UNIX OR MINGW)
+endif (1)

# CMake config files
include(CMakePackageConfigHelpers)
Expand All @@ -61,10 +52,19 @@ 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..b17d9e2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -94,6 +94,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
)
Expand Down
19 changes: 10 additions & 9 deletions ports/libssh/0003-no-source-write.patch
Original file line number Diff line number Diff line change
@@ -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 : **********")
5 changes: 3 additions & 2 deletions ports/libssh/0004-file-permissions-constants.patch
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
14 changes: 10 additions & 4 deletions ports/libssh/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down Expand Up @@ -46,8 +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}"
)

Expand Down
3 changes: 1 addition & 2 deletions ports/libssh/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "libssh",
"version": "0.10.6",
"port-version": 1,
"version": "0.11.2",
"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",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5433,8 +5433,8 @@
"port-version": 1
},
"libssh": {
"baseline": "0.10.6",
"port-version": 1
"baseline": "0.11.2",
"port-version": 0
},
"libssh2": {
"baseline": "1.11.1",
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": "4bd19f9713b8f41125f895de6138b20c1afa83b5",
"version": "0.11.2",
"port-version": 0
},
{
"git-tree": "179b87db359bda2e015e67cb5eecd462502beae6",
"version": "0.10.6",
Expand Down