diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2020-11-04 07:59:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-03 22:59:02 -0800 |
| commit | 63dccf771d0bf84f8a1e111c8b53a4057d4c0a18 (patch) | |
| tree | f0e840ea56fc2959d27dced9df9dda4202ef1c99 /ports/openssl-uwp | |
| parent | c4c020828aa1b743707876ffaeb0dccf091e96f5 (diff) | |
| download | vcpkg-63dccf771d0bf84f8a1e111c8b53a4057d4c0a18.tar.gz vcpkg-63dccf771d0bf84f8a1e111c8b53a4057d4c0a18.zip | |
[OpenSSL] refactor openssl ports. (#14308)
Diffstat (limited to 'ports/openssl-uwp')
| -rw-r--r-- | ports/openssl-uwp/CONTROL | 3 | ||||
| -rw-r--r-- | ports/openssl-uwp/EnableUWPSupport.patch | 176 | ||||
| -rw-r--r-- | ports/openssl-uwp/fix-uwp-configure-unicode.patch | 19 | ||||
| -rw-r--r-- | ports/openssl-uwp/make-openssl.bat | 16 | ||||
| -rw-r--r-- | ports/openssl-uwp/portfile.cmake | 178 | ||||
| -rw-r--r-- | ports/openssl-uwp/usage | 4 |
6 files changed, 2 insertions, 394 deletions
diff --git a/ports/openssl-uwp/CONTROL b/ports/openssl-uwp/CONTROL index cdf818e33..5ff042b34 100644 --- a/ports/openssl-uwp/CONTROL +++ b/ports/openssl-uwp/CONTROL @@ -1,5 +1,4 @@ Source: openssl-uwp Version: 1.1.1h -Port-Version: 1 -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. +Description: Deprecated OpenSSL port Supports: uwp diff --git a/ports/openssl-uwp/EnableUWPSupport.patch b/ports/openssl-uwp/EnableUWPSupport.patch deleted file mode 100644 index 4313220f1..000000000 --- a/ports/openssl-uwp/EnableUWPSupport.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf -index 3c4299d264..99fcb1f713 100644 ---- a/Configurations/10-main.conf -+++ b/Configurations/10-main.conf -@@ -1287,7 +1287,7 @@ my %targets = ( - }, - "VC-WIN64I" => { - inherit_from => [ "VC-WIN64-common", asm("ia64_asm"), -- sub { $disabled{shared} ? () : "ia64_uplink" } ], -+ sub { $disabled{uplink} ? () : "ia64_uplink" } ], - AS => "ias", - ASFLAGS => "-d debug", - asoutflag => "-o ", -@@ -1299,7 +1299,7 @@ my %targets = ( - }, - "VC-WIN64A" => { - inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), -- sub { $disabled{shared} ? () : "x86_64_uplink" } ], -+ sub { $disabled{uplink} ? () : "x86_64_uplink" } ], - AS => sub { vc_win64a_info()->{AS} }, - ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} }, - asoutflag => sub { vc_win64a_info()->{asoutflag} }, -@@ -1312,7 +1312,7 @@ my %targets = ( - }, - "VC-WIN32" => { - inherit_from => [ "VC-noCE-common", asm("x86_asm"), -- sub { $disabled{shared} ? () : "uplink_common" } ], -+ sub { $disabled{uplink} ? () : "uplink_common" } ], - AS => sub { vc_win32_info()->{AS} }, - ASFLAGS => sub { vc_win32_info()->{ASFLAGS} }, - asoutflag => sub { vc_win32_info()->{asoutflag} }, -@@ -1374,7 +1374,7 @@ my %targets = ( - #### MinGW - "mingw" => { - inherit_from => [ "BASE_unix", asm("x86_asm"), -- sub { $disabled{shared} ? () : "x86_uplink" } ], -+ sub { $disabled{uplink} ? () : "x86_uplink" } ], - CC => "gcc", - CFLAGS => picker(default => "-Wall", - debug => "-g -O0", -diff --git a/Configurations/50-win-onecore.conf b/Configurations/50-win-onecore.conf -index d478f42b0f..e0fb70daca 100644 ---- a/Configurations/50-win-onecore.conf -+++ b/Configurations/50-win-onecore.conf -@@ -1,3 +1,4 @@ -+## -*- mode: perl; -*- - # Windows OneCore targets. - # - # OneCore is new API stability "contract" that transcends Desktop, IoT and -@@ -10,6 +11,25 @@ - # TODO: extend error handling to use ETW based eventing - # (Or rework whole error messaging) - -+my $UWP_info = {}; -+sub UWP_info { -+ unless (%$UWP_info) { -+ my $SDKver = `pwsh.exe -Command \"& {\$(Get-Item \\\"hklm:\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\\").GetValue(\\\"CurrentVersion\\\")}\"`; -+ $SDKver =~ s|\R$||; -+ my @SDKver_split = split(/\./, $SDKver); -+ # SDK version older than 10.0.17763 don't support our ASM builds -+ if ($SDKver_split[0] < 10 -+ || ($SDKver_split[0] == 10 -+ && $SDKver_split[1] == 0 -+ && $SDKver_split[2] < 17763)) { -+ $UWP_info->{disable} = [ 'asm' ]; -+ } else { -+ $UWP_info->{disable} = [ ]; -+ } -+ } -+ return $UWP_info; -+} -+ - my %targets = ( - "VC-WIN32-ONECORE" => { - inherit_from => [ "VC-WIN32" ], -@@ -61,4 +81,57 @@ my %targets = ( - ex_libs => "onecore.lib", - multilib => "-arm64", - }, -+ -+ # Universal Windows Platform (UWP) App Support -+ -+ # TODO -+ # -+ # The 'disable' attribute should have 'uplink'. -+ # however, these are checked in some 'inherit_from', which is processed -+ # very early, before the 'disable' attributes are seen. -+ # This is a problem that needs to be resolved in Configure first. -+ # -+ # But if you want to build library with Windows 10 Version 1809 SDK or -+ # earlier, the 'disable' attribute should also have 'asm'. -+ -+ "VC-WIN32-UWP" => { -+ inherit_from => [ "VC-WIN32-ONECORE" ], -+ lflags => add("/APPCONTAINER"), -+ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", -+ "_WIN32_WINNT=0x0A00"), -+ dso_scheme => "", -+ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', -+ @{ UWP_info()->{disable} } ] }, -+ ex_libs => "WindowsApp.lib", -+ }, -+ "VC-WIN64A-UWP" => { -+ inherit_from => [ "VC-WIN64A-ONECORE" ], -+ lflags => add("/APPCONTAINER"), -+ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", -+ "_WIN32_WINNT=0x0A00"), -+ dso_scheme => "", -+ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', -+ @{ UWP_info()->{disable} } ] }, -+ ex_libs => "WindowsApp.lib", -+ }, -+ "VC-WIN32-ARM-UWP" => { -+ inherit_from => [ "VC-WIN32-ARM" ], -+ lflags => add("/APPCONTAINER"), -+ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", -+ "_WIN32_WINNT=0x0A00"), -+ dso_scheme => "", -+ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', -+ @{ UWP_info()->{disable} } ] }, -+ ex_libs => "WindowsApp.lib", -+ }, -+ "VC-WIN64-ARM-UWP" => { -+ inherit_from => [ "VC-WIN64-ARM" ], -+ lflags => add("/APPCONTAINER"), -+ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", -+ "_WIN32_WINNT=0x0A00"), -+ dso_scheme => "", -+ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', -+ @{ UWP_info()->{disable} } ] }, -+ ex_libs => "WindowsApp.lib", -+ }, - ); -diff --git a/Configure b/Configure -index 5a699836f3..de45f1e299 100755 ---- a/Configure -+++ b/Configure -@@ -1,4 +1,5 @@ - #! /usr/bin/env perl -+#! /usr/bin/env perl - # -*- mode: perl; -*- - # Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. - # -@@ -407,6 +408,7 @@ my @disablables = ( - "ubsan", - "ui-console", - "unit-test", -+ "uplink", - "whirlpool", - "weak-ssl-ciphers", - "zlib", -@@ -491,8 +493,8 @@ my @disable_cascades = ( - - # Without position independent code, there can be no shared libraries or DSOs - "pic" => [ "shared" ], -- "shared" => [ "dynamic-engine" ], -+ "shared" => [ "dynamic-engine", "uplink" ], - "dso" => [ "dynamic-engine" ], - "engine" => [ "afalgeng", "devcryptoeng" ], - - # no-autoalginit is only useful when building non-shared -diff --git a/INSTALL b/INSTALL -index 2119cbae9e..ee54e8c215 100644 ---- a/INSTALL -+++ b/INSTALL -@@ -560,6 +560,10 @@ - likely to complement configuration command line with - suitable compiler-specific option. - -+ no-uplink -+ Don't build support for UPLINK interface. -+ -+ - no-<prot> - Don't build support for negotiating the specified SSL/TLS - protocol (one of ssl, ssl3, tls, tls1, tls1_1, tls1_2, diff --git a/ports/openssl-uwp/fix-uwp-configure-unicode.patch b/ports/openssl-uwp/fix-uwp-configure-unicode.patch deleted file mode 100644 index a3b645ad1..000000000 --- a/ports/openssl-uwp/fix-uwp-configure-unicode.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/Configure b/Configure -index 67df080..57a15d8 100644 ---- a/Configure -+++ b/Configure -@@ -598,12 +598,12 @@ my %table=( - # 'perl Configure VC-WINSTORE - "VC-WINSTORE","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - # 'perf Configure VC-WINUNIVERSAL --"VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", -+"VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - - "debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - "debug-VC-WINPHONE","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINAPP -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - "debug-VC-WINSTORE","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", --"debug-VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINUCRT -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", -+"debug-VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINUCRT -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", - - # Unified CE target - "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", diff --git a/ports/openssl-uwp/make-openssl.bat b/ports/openssl-uwp/make-openssl.bat deleted file mode 100644 index 6f6166a24..000000000 --- a/ports/openssl-uwp/make-openssl.bat +++ /dev/null @@ -1,16 +0,0 @@ -set build=%1 - -perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h - -for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ -for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ -for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ -for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ - -call ms\do_winuniversal.bat - -mkdir inc32\openssl - -jom -j %NUMBER_OF_PROCESSORS% -k -f ms\ntdll.mak -REM due to a race condition in the build, we need to have a second single-threaded pass. -nmake -f ms\ntdll.mak diff --git a/ports/openssl-uwp/portfile.cmake b/ports/openssl-uwp/portfile.cmake index 6c84553c9..0015715fb 100644 --- a/ports/openssl-uwp/portfile.cmake +++ b/ports/openssl-uwp/portfile.cmake @@ -1,177 +1 @@ -vcpkg_fail_port_install(MESSAGE "${PORT} is only for Windows Universal Platform" ON_TARGET "Linux" "OSX") - -if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") - message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.") -endif() - -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) - -vcpkg_find_acquire_program(PERL) -vcpkg_find_acquire_program(JOM) -get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) -get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -vcpkg_add_to_path("${PERL_EXE_PATH}") -vcpkg_add_to_path("${JOM_EXE_PATH}") - -set(OPENSSL_VERSION 1.1.1h) - -vcpkg_download_distfile(ARCHIVE - URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" - FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" - SHA512 da50fd99325841ed7a4367d9251c771ce505a443a73b327d8a46b2c6a7d2ea99e43551a164efc86f8743b22c2bdb0020bf24a9cbd445e9d68868b2dc1d34033a -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - PATCHES - EnableUWPSupport.patch -) - -vcpkg_find_acquire_program(NASM) -get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}") - -vcpkg_find_acquire_program(JOM) - -set(CONFIGURE_COMMAND ${PERL} Configure - enable-static-engine - enable-capieng - no-unit-test - no-ssl2 - no-asm - no-uplink - no-tests - -utf-8 - shared -) - -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(OPENSSL_ARCH VC-WIN32-UWP) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(OPENSSL_ARCH VC-WIN64A-UWP) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - set(OPENSSL_ARCH VC-WIN32-ARM-UWP) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - set(OPENSSL_ARCH VC-WIN64-ARM-UWP) -else() - message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() - -set(OPENSSL_MAKEFILE "makefile") - -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) - - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - - # Copy openssl sources. - message(STATUS "Copying openssl release source files...") - file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) - foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) - file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - endforeach() - message(STATUS "Copying openssl release source files... done") - set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") - - set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) - - message(STATUS "Configure ${TARGET_TRIPLET}-rel") - vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-rel - ) - message(STATUS "Configure ${TARGET_TRIPLET}-rel done") - - message(STATUS "Build ${TARGET_TRIPLET}-rel") - # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. - # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. - make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) - execute_process( - COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} build_libs - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log - ) - vcpkg_execute_required_process( - COMMAND nmake -f ${OPENSSL_MAKEFILE} install_dev - WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} - LOGNAME build-${TARGET_TRIPLET}-rel-1) - - message(STATUS "Build ${TARGET_TRIPLET}-rel done") -endif() - - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - # Copy openssl sources. - message(STATUS "Copying openssl debug source files...") - file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) - foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) - file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - endforeach() - message(STATUS "Copying openssl debug source files... done") - set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") - - set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) - - message(STATUS "Configure ${TARGET_TRIPLET}-dbg") - vcpkg_execute_required_process( - COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-dbg - ) - message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") - - message(STATUS "Build ${TARGET_TRIPLET}-dbg") - make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) - execute_process( - COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} build_libs - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log - ) - vcpkg_execute_required_process( - COMMAND nmake -f ${OPENSSL_MAKEFILE} install_dev - WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} - LOGNAME build-${TARGET_TRIPLET}-dbg-1) - - message(STATUS "Build ${TARGET_TRIPLET}-dbg done") -endif() - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/certs) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/private) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/engines-1_1) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/certs) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/private) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - - - -file(REMOVE - ${CURRENT_PACKAGES_DIR}/bin/openssl.exe - ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe - ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf - ${CURRENT_PACKAGES_DIR}/openssl.cnf - ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf - ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist - ${CURRENT_PACKAGES_DIR}/openssl.cnf.dist - ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf - ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist - ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist -) - - -file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) -string(REPLACE "<winsock.h>" "<winsock2.h>" _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") - -file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents) -string(REPLACE "# include <windows.h>" "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include <windows.h>" _contents "${_contents}") -file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}") - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
\ No newline at end of file diff --git a/ports/openssl-uwp/usage b/ports/openssl-uwp/usage deleted file mode 100644 index f535cb6a4..000000000 --- a/ports/openssl-uwp/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package openssl is compatible with built-in CMake targets:
-
- find_package(OpenSSL REQUIRED)
- target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
