early-access version 2853
This commit is contained in:
43
externals/vcpkg/ports/libssh/0001-export-pkgconfig-file.patch
vendored
Executable file
43
externals/vcpkg/ports/libssh/0001-export-pkgconfig-file.patch
vendored
Executable file
@@ -0,0 +1,43 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1f5b0bf5..c51fb0d3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -111,8 +111,28 @@ add_subdirectory(include)
|
||||
add_subdirectory(src)
|
||||
|
||||
# pkg-config file
|
||||
-if (UNIX)
|
||||
configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
|
||||
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "Requires:")
|
||||
+ if (WITH_ZLIB)
|
||||
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " zlib")
|
||||
+ endif ()
|
||||
+ if (WITH_GCRYPT)
|
||||
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -lgcrypt")
|
||||
+ elseif (WITH_MBEDTLS)
|
||||
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -lmbedcrypto -lpthread")
|
||||
+ else ()
|
||||
+ if (WIN32)
|
||||
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc "\nLibs.private: -llibcrypto -lUser32 -lCrypt32")
|
||||
+ else ()
|
||||
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " libcrypto\nLibs.private:")
|
||||
+ endif ()
|
||||
+ endif ()
|
||||
+ if (CMAKE_USE_PTHREADS_INIT)
|
||||
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " -lpthread")
|
||||
+ endif ()
|
||||
+ if (WIN32)
|
||||
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc " -lws2_32 -lShell32 -lAdvapi32")
|
||||
+ endif ()
|
||||
install(
|
||||
FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
|
||||
@@ -121,7 +141,6 @@ install(
|
||||
COMPONENT
|
||||
pkgconfig
|
||||
)
|
||||
-endif (UNIX)
|
||||
|
||||
# CMake config files
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
13
externals/vcpkg/ports/libssh/0002-mingw_for_Android.patch
vendored
Executable file
13
externals/vcpkg/ports/libssh/0002-mingw_for_Android.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index a576cf7..1f6a048 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -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)
|
||||
target_link_libraries(ssh PRIVATE "-Wl,--enable-stdcall-fixup")
|
||||
target_compile_definitions(ssh PRIVATE "_POSIX_SOURCE")
|
||||
endif ()
|
17
externals/vcpkg/ports/libssh/0003-create_symlink_unix_only.patch
vendored
Executable file
17
externals/vcpkg/ports/libssh/0003-create_symlink_unix_only.patch
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 53e6bd5..51d76c5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -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_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 : **********")
|
||||
|
67
externals/vcpkg/ports/libssh/portfile.cmake
vendored
Executable file
67
externals/vcpkg/ports/libssh/portfile.cmake
vendored
Executable file
@@ -0,0 +1,67 @@
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
URL https://git.libssh.org/projects/libssh.git
|
||||
REF 47fd6e56c1058dca54afee1638c11fb6ec41911d # REFERENCE VERSION 0.9.6
|
||||
PATCHES
|
||||
0001-export-pkgconfig-file.patch
|
||||
0002-mingw_for_Android.patch
|
||||
0003-create_symlink_unix_only.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
mbedtls WITH_MBEDTLS
|
||||
zlib WITH_ZLIB
|
||||
)
|
||||
|
||||
if (VCPKG_TARGET_IS_ANDROID)
|
||||
set(EXTRA_ARGS "-DWITH_SERVER=FALSE"
|
||||
"-DWITH_PCAP=FALSE"
|
||||
)
|
||||
endif ()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${EXTRA_ARGS}
|
||||
${FEATURE_OPTIONS}
|
||||
-DWITH_EXAMPLES=OFF
|
||||
-DUNIT_TESTING=OFF
|
||||
-DCLIENT_TESTING=OFF
|
||||
-DSERVER_TESTING=OFF
|
||||
-DWITH_NACL=OFF
|
||||
-DWITH_GSSAPI=OFF
|
||||
-DWITH_SYMBOL_VERSIONING=OFF)
|
||||
|
||||
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)
|
||||
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libssh.pc" "-lpthread" "-lpthreadVC3d")
|
||||
endif()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libssh.pc" "-lpthread" "-lpthreadVC3")
|
||||
endif()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
vcpkg_replace_string(
|
||||
"${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"
|
||||
".dll"
|
||||
".lib"
|
||||
)
|
||||
endif()
|
||||
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}")
|
4
externals/vcpkg/ports/libssh/usage
vendored
Executable file
4
externals/vcpkg/ports/libssh/usage
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
The package libssh is compatible with built-in CMake targets:
|
||||
|
||||
find_package(libssh CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE ssh)
|
70
externals/vcpkg/ports/libssh/vcpkg.json
vendored
Executable file
70
externals/vcpkg/ports/libssh/vcpkg.json
vendored
Executable file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "libssh",
|
||||
"version": "0.9.6",
|
||||
"port-version": 2,
|
||||
"description": "libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side",
|
||||
"homepage": "https://www.libssh.org/",
|
||||
"supports": "!(uwp | arm)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "libssh",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"mbedtls"
|
||||
],
|
||||
"platform": "android"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"crypto"
|
||||
],
|
||||
"features": {
|
||||
"crypto": {
|
||||
"description": "Default crypto backend",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "libssh",
|
||||
"features": [
|
||||
"mbedtls"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"mbedtls": {
|
||||
"description": "Crypto support (mbedTLS)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "mbedtls",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "mbedtls",
|
||||
"features": [
|
||||
"pthreads"
|
||||
],
|
||||
"platform": "!android"
|
||||
}
|
||||
]
|
||||
},
|
||||
"openssl": {
|
||||
"description": "Crypto support (OpenSSL)",
|
||||
"dependencies": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"zlib": {
|
||||
"description": "libssh with zlib",
|
||||
"dependencies": [
|
||||
"zlib"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user