aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-01-12 17:26:44 -0800
committerRobert Schumacher <roschuma@microsoft.com>2017-01-12 17:26:44 -0800
commit9072f51d746b857dfda19844cc773181d6d42382 (patch)
tree4ffaf5281a1767fac78c55f617c600ff3ceb80be
parent1f655fc24d73dfa77471533791abe955c411daad (diff)
parent963cc56a8cec42a6ed185d78d6a5585272ba2d63 (diff)
downloadvcpkg-9072f51d746b857dfda19844cc773181d6d42382.tar.gz
vcpkg-9072f51d746b857dfda19844cc773181d6d42382.zip
Merge pull request #525 from stammen/libssh2-uwp
libssh2: added support for uwp builds
-rw-r--r--ports/libssh2/0001-Fix-UWP.patch48
-rw-r--r--ports/libssh2/CONTROL2
-rw-r--r--ports/libssh2/portfile.cmake4
3 files changed, 53 insertions, 1 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
index d66030b71..715ffa0bd 100644
--- a/ports/libssh2/CONTROL
+++ b/ports/libssh2/CONTROL
@@ -1,4 +1,4 @@
Source: libssh2
-Version: 1.8.0
+Version: 1.8.0-1
Build-Depends: zlib, openssl
Description: The SSH library \ No newline at end of file
diff --git a/ports/libssh2/portfile.cmake b/ports/libssh2/portfile.cmake
index 9b4cc77dd..2e3ee5009 100644
--- a/ports/libssh2/portfile.cmake
+++ b/ports/libssh2/portfile.cmake
@@ -7,6 +7,10 @@ vcpkg_download_distfile(ARCHIVE_FILE
)
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