From 9336ae3df6d818d9d74152d21b7dcb00a3097b72 Mon Sep 17 00:00:00 2001 From: Long Nguyen Date: Tue, 10 Nov 2020 06:21:03 +0700 Subject: [PATCH] [szip, openssl] Fix problems with mingw (#14460) * [openssl] Use the unix portfile when building with mingw * [mingw triplets] Add architecture check exceptions for szip --- ports/openssl/CONTROL | 2 +- ports/openssl/portfile.cmake | 2 +- triplets/community/arm-mingw-dynamic.cmake | 3 +++ triplets/community/arm64-mingw-dynamic.cmake | 3 +++ triplets/community/x64-mingw-dynamic.cmake | 3 +++ triplets/community/x86-mingw-dynamic.cmake | 3 +++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index 469f8305a0..9efc2f76c6 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,5 +1,5 @@ Source: openssl Version: 1.1.1h -Port-Version: 1 +Port-Version: 2 Homepage: https://www.openssl.org Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 2d2622e6f0..e4619e3543 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -15,7 +15,7 @@ vcpkg_add_to_path("${PERL_EXE_PATH}") if(VCPKG_TARGET_IS_UWP) include("${CMAKE_CURRENT_LIST_DIR}/uwp/portfile.cmake") -elseif(VCPKG_TARGET_IS_WINDOWS) +elseif(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) include("${CMAKE_CURRENT_LIST_DIR}/windows/portfile.cmake") else() include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake") diff --git a/triplets/community/arm-mingw-dynamic.cmake b/triplets/community/arm-mingw-dynamic.cmake index b23870c11a..f38a7cfc0d 100644 --- a/triplets/community/arm-mingw-dynamic.cmake +++ b/triplets/community/arm-mingw-dynamic.cmake @@ -5,3 +5,6 @@ set(VCPKG_ENV_PASSTHROUGH PATH) set(VCPKG_CMAKE_SYSTEM_NAME MinGW) set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) +if(PORT STREQUAL "szip") + set(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled) +endif() diff --git a/triplets/community/arm64-mingw-dynamic.cmake b/triplets/community/arm64-mingw-dynamic.cmake index 30ed204ed7..a90b4f2415 100644 --- a/triplets/community/arm64-mingw-dynamic.cmake +++ b/triplets/community/arm64-mingw-dynamic.cmake @@ -5,3 +5,6 @@ set(VCPKG_ENV_PASSTHROUGH PATH) set(VCPKG_CMAKE_SYSTEM_NAME MinGW) set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) +if(PORT STREQUAL "szip") + set(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled) +endif() diff --git a/triplets/community/x64-mingw-dynamic.cmake b/triplets/community/x64-mingw-dynamic.cmake index 1f132cfe15..ff4845c33b 100644 --- a/triplets/community/x64-mingw-dynamic.cmake +++ b/triplets/community/x64-mingw-dynamic.cmake @@ -5,3 +5,6 @@ set(VCPKG_ENV_PASSTHROUGH PATH) set(VCPKG_CMAKE_SYSTEM_NAME MinGW) set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) +if(PORT STREQUAL "szip") + set(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled) +endif() diff --git a/triplets/community/x86-mingw-dynamic.cmake b/triplets/community/x86-mingw-dynamic.cmake index 000b36d960..b273971874 100644 --- a/triplets/community/x86-mingw-dynamic.cmake +++ b/triplets/community/x86-mingw-dynamic.cmake @@ -5,3 +5,6 @@ set(VCPKG_ENV_PASSTHROUGH PATH) set(VCPKG_CMAKE_SYSTEM_NAME MinGW) set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) +if(PORT STREQUAL "szip") + set(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled) +endif()