diff options
| author | Jan HrubĂ˝ <jhruby.web@gmail.com> | 2017-03-13 08:56:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-13 08:56:05 +0100 |
| commit | 665f4118f603c5858217ed7a2f2f824b18ff4fc5 (patch) | |
| tree | f0167041edf71e90f2331b5025f603392a8de67a /ports/libssh2 | |
| parent | 1bec0fcb73073b5b1719f454c368a63f1bff625e (diff) | |
| parent | 1c9873a0daf625f67474aaf3e163c592c27ecb65 (diff) | |
| download | vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.tar.gz vcpkg-665f4118f603c5858217ed7a2f2f824b18ff4fc5.zip | |
Merge pull request #1 from Microsoft/master
pull
Diffstat (limited to 'ports/libssh2')
| -rw-r--r-- | ports/libssh2/0001-Fix-UWP.patch | 48 | ||||
| -rw-r--r-- | ports/libssh2/CONTROL | 4 | ||||
| -rw-r--r-- | ports/libssh2/LICENSE | 41 | ||||
| -rw-r--r-- | ports/libssh2/portfile.cmake | 36 |
4 files changed, 129 insertions, 0 deletions
diff --git a/ports/libssh2/0001-Fix-UWP.patch b/ports/libssh2/0001-Fix-UWP.patch new file mode 100644 index 000000000..270dd7b90 --- /dev/null +++ b/ports/libssh2/0001-Fix-UWP.patch @@ -0,0 +1,48 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6401acf..64de3e9 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -349,7 +349,7 @@ target_include_directories(libssh2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + # Check for the OS. + # Daniel's note: this should not be necessary and we need to work to + # get this removed. +-if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") ++if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows" OR ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") + target_compile_definitions(libssh2 PRIVATE LIBSSH2_WIN32) + elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + target_compile_definitions(libssh2 PRIVATE LIBSSH2_DARWIN) +diff --git a/src/agent.c b/src/agent.c +index c2ba422..f1799f8 100644 +--- a/src/agent.c ++++ b/src/agent.c +@@ -51,6 +51,10 @@ + #include "userauth.h" + #include "session.h" + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#define IS_UWP 1 ++#endif /* #if defined(WINAPI_FAMILY) */ ++ + /* Requests from client to agent for protocol 1 key operations */ + #define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1 + #define SSH_AGENTC_RSA_CHALLENGE 3 +@@ -254,7 +258,7 @@ struct agent_ops agent_ops_unix = { + }; + #endif /* PF_UNIX */ + +-#ifdef WIN32 ++#if defined(WIN32) && !defined(IS_UWP) + /* Code to talk to Pageant was taken from PuTTY. + * + * Portions copyright Robert de Bath, Joris van Rantwijk, Delian +@@ -362,8 +366,8 @@ static struct { + const char *name; + struct agent_ops *ops; + } supported_backends[] = { +-#ifdef WIN32 +- {"Pageant", &agent_ops_pageant}, ++#if defined(WIN32) && !defined(IS_UWP) ++ {"Pageant", &agent_ops_pageant}, + #endif /* WIN32 */ + #ifdef PF_UNIX + {"Unix", &agent_ops_unix}, diff --git a/ports/libssh2/CONTROL b/ports/libssh2/CONTROL new file mode 100644 index 000000000..715ffa0bd --- /dev/null +++ b/ports/libssh2/CONTROL @@ -0,0 +1,4 @@ +Source: libssh2 +Version: 1.8.0-1 +Build-Depends: zlib, openssl +Description: The SSH library
\ No newline at end of file diff --git a/ports/libssh2/LICENSE b/ports/libssh2/LICENSE new file mode 100644 index 000000000..d629fbd3f --- /dev/null +++ b/ports/libssh2/LICENSE @@ -0,0 +1,41 @@ +/* Copyright (c) 2004-2007 Sara Golemon <sarag@libssh2.org> + * Copyright (c) 2005,2006 Mikhail Gusarov <dottedmag@dottedmag.net> + * Copyright (c) 2006-2007 The Written Word, Inc. + * Copyright (c) 2007 Eli Fant <elifantu@mail.ru> + * Copyright (c) 2009-2014 Daniel Stenberg + * Copyright (C) 2008, 2009 Simon Josefsson + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */
\ No newline at end of file diff --git a/ports/libssh2/portfile.cmake b/ports/libssh2/portfile.cmake new file mode 100644 index 000000000..2e3ee5009 --- /dev/null +++ b/ports/libssh2/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh2-1.8.0) +vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://www.libssh2.org/download/libssh2-1.8.0.tar.gz" + FILENAME "libssh2-1.8.0.tar.gz" + SHA512 289aa45c4f99653bebf5f99565fe9c519abc204feb2084b47b7cc3badc8bf4ecdedd49ea6acdce8eb902b3c00995d5f92a3ca77b2508b92f04ae0e7de7287558 +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DENABLE_ZLIB_COMPRESSION=ON + OPTIONS_DEBUG + -DENABLE_DEBUG_LOGGING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh2 RENAME copyright) + +vcpkg_copy_pdbs()
\ No newline at end of file |
