diff options
| author | Andreas Schneider <asn@cryptomilk.org> | 2018-12-16 12:53:26 +0100 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2020-01-14 10:11:21 +0100 |
| commit | d502f061bb3ee0258d6453acbf258b9e5d93d564 (patch) | |
| tree | 874a21e2272adf384d9d4f89ca33e3e481d021f9 | |
| parent | 28eee51adb36f2165be846e77ef7b3ee5b3f8789 (diff) | |
| download | vcpkg-d502f061bb3ee0258d6453acbf258b9e5d93d564.tar.gz vcpkg-d502f061bb3ee0258d6453acbf258b9e5d93d564.zip | |
[libssh] Update libssh to version 0.9.3
| -rw-r--r-- | ports/libssh/CONTROL | 16 | ||||
| -rw-r--r-- | ports/libssh/build-one-flavor.patch | 62 | ||||
| -rw-r--r-- | ports/libssh/portfile.cmake | 45 | ||||
| -rw-r--r-- | ports/libssh/usage | 3 |
4 files changed, 30 insertions, 96 deletions
diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index c12fb8f8f..ecb028b1d 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,8 +1,20 @@ 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 +Description: libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side +Default-Features: crypto + +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 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/portfile.cmake b/ports/libssh/portfile.cmake index 5a87be14b..f96267f63 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -1,53 +1,41 @@ -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 +53,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)
|
