aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2020-02-05 18:19:25 -0800
committerGitHub <noreply@github.com>2020-02-05 18:19:25 -0800
commit53b4fba4440ca8ea3c1bc1a6f0fc3551f9c8221c (patch)
tree302c612767e3f9a4d7e13b2527ad0e000ee7d79f
parent0ba50612fbbfb9d64f9c60825847c12f956666c6 (diff)
parentfff8a64f41b021d2da9bf2ae476635c1ec5fb598 (diff)
downloadvcpkg-53b4fba4440ca8ea3c1bc1a6f0fc3551f9c8221c.tar.gz
vcpkg-53b4fba4440ca8ea3c1bc1a6f0fc3551f9c8221c.zip
Merge pull request #4983 from cryptomilk/master-libssh
[libssh] Update libssh to version 0.9.3
-rw-r--r--ports/libssh/CONTROL18
-rw-r--r--ports/libssh/build-one-flavor.patch62
-rw-r--r--ports/libssh/install-config.patch35
-rw-r--r--ports/libssh/portfile.cmake49
-rw-r--r--ports/libssh/usage3
5 files changed, 31 insertions, 136 deletions
diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL
index 443940653..9b7a16004 100644
--- a/ports/libssh/CONTROL
+++ b/ports/libssh/CONTROL
@@ -1,10 +1,22 @@
Source: libssh
-Version: 0.9.0
+Version: 0.9.3
Homepage: https://www.libssh.org/
-Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side
-Build-Depends: openssl
+Description: libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side
+Default-Features: crypto
Supports: !uwp
+Feature: crypto
+Build-Depends: libssh[mbedtls]
+Description: Default crypto backend
+
+Feature: mbedtls
+Build-Depends: mbedtls
+Description: Crypto support (mbedTLS)
+
+Feature: openssl
+Build-Depends: openssl
+Description: Crypto support (OpenSSL)
+
Feature: zlib
Description: libssh with zlib
Build-Depends: zlib
diff --git a/ports/libssh/build-one-flavor.patch b/ports/libssh/build-one-flavor.patch
deleted file mode 100644
index 64e2c58a7..000000000
--- a/ports/libssh/build-one-flavor.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 1012ddf..612f0ba 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -313,6 +313,7 @@ if (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND)
- )
- endif (WITH_SYMBOL_VERSIONING AND HAVE_LD_VERSION_SCRIPT AND ABIMAP_FOUND)
-
-+if (NOT WITH_STATIC_LIB)
- add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS})
- target_compile_options(${LIBSSH_SHARED_LIBRARY}
- PRIVATE
-@@ -362,7 +363,7 @@ install(
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
- COMPONENT libraries
- )
--
-+endif()
- if (BUILD_STATIC_LIB)
- add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS})
- target_compile_options(${LIBSSH_STATIC_LIBRARY}
-@@ -370,11 +371,7 @@ if (BUILD_STATIC_LIB)
- ${DEFAULT_C_COMPILE_FLAGS}
- -D_GNU_SOURCE)
-
-- if (MSVC)
-- set(OUTPUT_SUFFIX static)
-- else (MSVC)
-- set(OUTPUT_SUFFIX )
-- endif (MSVC)
-+
- set_target_properties(
- ${LIBSSH_STATIC_LIBRARY}
- PROPERTIES
-@@ -385,23 +382,18 @@ if (BUILD_STATIC_LIB)
- OUTPUT_NAME
- ssh
- ARCHIVE_OUTPUT_DIRECTORY
-- ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_SUFFIX}
-+ ${CMAKE_CURRENT_BINARY_DIR}
- )
-
- if (WIN32)
-- set_target_properties(
-- ${LIBSSH_STATIC_LIBRARY}
-- PROPERTIES
-- COMPILE_FLAGS
-- "-DLIBSSH_STATIC"
-- )
-+ target_compile_definitions(${LIBSSH_STATIC_LIBRARY} PUBLIC LIBSSH_STATIC)
- endif (WIN32)
-
- if (WITH_STATIC_LIB)
- install(TARGETS
- ${LIBSSH_STATIC_LIBRARY}
- DESTINATION
-- ${LIB_INSTALL_DIR}/${OUTPUT_SUFFIX}
-+ ${LIB_INSTALL_DIR}
- COMPONENT
- libraries)
- endif (WITH_STATIC_LIB)
-
diff --git a/ports/libssh/install-config.patch b/ports/libssh/install-config.patch
deleted file mode 100644
index 4943765d5..000000000
--- a/ports/libssh/install-config.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b9f6ef485..c910d37eb 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -145,8 +145,6 @@ install(
- ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
- DESTINATION
- ${CMAKE_INSTALL_DIR}/${PROJECT_NAME}
-- COMPONENT
-- devel
- )
-
- if (WITH_EXAMPLES)
-diff --git a/0.9.0-daf25b6f84 - Kopie/libssh-config.cmake.in b/0.9.0-daf25b6f84/libssh-config.cmake.in
-index 11388f009..2f826a9b4 100644
---- a/libssh-config.cmake.in
-+++ b/libssh-config.cmake.in
-@@ -6,7 +6,16 @@ if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/CMakeCache.txt")
- set_and_check(LIBSSH_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/@LIBSSH_LIBRARY_NAME@")
- else()
-+ # Compute the installation prefix relative to this file.
-+get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-+get_filename_component(PACKAGE_PREFIX_DIR "${PACKAGE_PREFIX_DIR}" PATH)
-+get_filename_component(PACKAGE_PREFIX_DIR "${PACKAGE_PREFIX_DIR}" PATH)
-+if(PACKAGE_PREFIX_DIR STREQUAL "/")
-+ set(PACKAGE_PREFIX_DIR "")
-+endif()
- set_and_check(LIBSSH_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
-- set_and_check(LIBSSH_LIBRARIES "@PACKAGE_LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@")
-+ set_and_check(LIBSSH_LIBRARIES_RELEASE "@PACKAGE_LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@")
-+ set_and_check(LIBSSH_LIBRARIES_DEBUG "@PACKAGE_LIB_INSTALL_DIR@/../debug/lib/@LIBSSH_LIBRARY_NAME@")
-+ set_and_check(LIBSSH_LIBRARIES "optimized;${LIBSSH_LIBRARIES_RELEASE};debug;${LIBSSH_LIBRARIES_DEBUG}")
- endif()
-
- # For backward compatibility
diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake
index 5a87be14b..d9a8f7c6b 100644
--- a/ports/libssh/portfile.cmake
+++ b/ports/libssh/portfile.cmake
@@ -1,53 +1,37 @@
-include(vcpkg_common_functions)
+vcpkg_fail_port_install(ON_TARGET "UWP")
-if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
- message(FATAL_ERROR "WindowsStore not supported")
-endif()
-
-set(VERSION 0.9.0)
+set(VERSION 0.9.3)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.libssh.org/files/0.9/libssh-${VERSION}.tar.xz"
FILENAME "libssh-${VERSION}.tar.xz"
- SHA512 8c91b31e49652d93c295ca62c2ff1ae30f26c263195a8bc2390e44f6e688959507f609125d342ee8180fc03cec2d73258ac72f864696281b53ba9ad244060865
+ SHA512 6e59718565daeca6d224426cc1095a112deff9af8e0b021917e04f08bb7409263c35724de95f591f38e26f0fb3bbbbc69b679b6775edc21dec158d241b076c6f
)
-#vcpkg_download_distfile(WINPATCH
-# URLS "https://bugs.libssh.org/rLIBSSHf81ca6161223e3566ce78a427571235fb6848fe9?diff=1"
-# FILENAME "libssh-f81ca616.patch"
-# SHA512 f3f6088f8f1bf8fe6226c1aa7b355d877be7f2aa9482c5e3de74b6a35fc5b28d8f89221d3afa5a5d3a5900519a86e5906516667ed22ad98f058616a8120999cd
-#)
-
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${VERSION}
- PATCHES
- build-one-flavor.patch
- install-config.patch
)
-string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB)
-
-if(zlib IN_LIST FEATURES)
- set(WITH_ZLIB ON)
-else()
- set(WITH_ZLIB OFF)
-endif()
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ mbedtls WITH_MBEDTLS
+ zlib WITH_ZLIB
+)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
- -DWITH_STATIC_LIB=${WITH_STATIC_LIB}
+ ${FEATURE_OPTIONS}
-DWITH_EXAMPLES=OFF
- -DWITH_TESTING=OFF
- -DWITH_NACL=OFF
- -DWITH_GSSAPI=OFF
- -DWITH_ZLIB=${WITH_ZLIB}
- "-DCMAKE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share"
-)
+ -DUNIT_TESTING=OFF
+ -DCLIENT_TESTING=OFF
+ -DSERVER_TESTING=OFF
+ -DWITH_NACL=OFF)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
@@ -65,8 +49,5 @@ if(VCPKG_TARGET_IS_WINDOWS)
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-# The installed cmake config files are nonfunctional (0.7.5)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright)
-file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh) \ No newline at end of file
+file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh)
diff --git a/ports/libssh/usage b/ports/libssh/usage
index acb7e822c..39cb551c3 100644
--- a/ports/libssh/usage
+++ b/ports/libssh/usage
@@ -1,5 +1,4 @@
The package libssh is compatible with built-in CMake targets:
find_package(libssh CONFIG REQUIRED)
- target_link_libraries(main PRIVATE ${LIBSSH_LIBRARIES})
- target_include_directories(main PRIVATE ${LIBSSH_INCLUDE_DIR})
+ target_link_libraries(main PRIVATE ssh)