Skip to content
Closed
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
67 changes: 50 additions & 17 deletions ports/libssh/0001-export-pkgconfig-file.patch
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a64b770..716bb34 100644
index 9877cd7..ce74d73 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 ()
@@ -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)
Expand All @@ -33,22 +32,38 @@ index a64b770..716bb34 100644

if (WITH_GSSAPI)
find_package(GSSAPI)
@@ -122,7 +130,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
@@ -132,7 +139,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}")
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
Expand All @@ -60,11 +75,28 @@ 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 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
)
Expand All @@ -73,3 +105,4 @@ index 807313b..72ef059 100644
endif (WIN32)

if (BUILD_STATIC_LIB)

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
5 changes: 3 additions & 2 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 @@ -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}"
)

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": "c5154e5ea657c31074f3389af121688c31e4f786",
"version": "0.11.2",
"port-version": 0
},
{
"git-tree": "179b87db359bda2e015e67cb5eecd462502beae6",
"version": "0.10.6",
Expand Down