aboutsummaryrefslogtreecommitdiff
path: root/ports/openssl-uwp
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2020-01-14 00:43:36 +0100
committerVictor Romero <romerosanchezv@gmail.com>2020-01-13 15:43:36 -0800
commitbdae0904c41a0ee2c5204d6449038d3b5d551726 (patch)
treeea710e1a326e02ed34a28afef72407d8855bb7bf /ports/openssl-uwp
parent5c0b7b55771fe4b40d3f4b7a8069b1c71022490e (diff)
downloadvcpkg-bdae0904c41a0ee2c5204d6449038d3b5d551726.tar.gz
vcpkg-bdae0904c41a0ee2c5204d6449038d3b5d551726.zip
[libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d (#8566)
* [ports] Update openssl-unix to 1.1.1c * [ports] Update openssl-unix to 1.1.1d * [ports] openssl-unix platform 'AMD64' is called 'x86_64' on Linux * [ports] fix openssl platform * [ports] openssl-windows update openssl to 1.1.1d * [ports] Fix openssl post build * [ports] openssl add EnableUWPSupport.patch Reference: https://github.com/openssl/openssl/pull/8917 https://github.com/openssl/openssl/pull/9440 * [ports] openssl-uwp update openssl to 1.1.1d * Updated support for OpenSSL v1.1 With OpenSSL v1.1 we need an additional flag for ACE * update to 12.0 and change to vcpkg_configure_make * remove msys line * remove custom cmakelists * use --without-readline on linux * Update CONTROL Fix version * fix portfile * add all possible libpq features * create vcpkg_get_build_depends * create vcpkg_read_dependent_port_info * add vcpkg_write_port_info * fix a few bugs * libpq first succesful x86 build with core features. (files still must be moved) * always write the variable * Fix separate make and install execution error issue. * trigger CI system. * add openssl and win_bison win_flex patch * add configuration dependent patches * add bonjour as a dependency on macosx * apply patches and configure features * more patches to fix the windows build * more install fixes * remove unnecessary code * bit of code cleanup * remove unrelated files * remove unrelated function call. function was removed with last commit * removed hardcoded platform * fix patch * build only the interface libraries and nothing more * forgot to remove tool ecpg from install * seperate minimal install patch from normal install patch and introduce client feature * fix x86 Platform variable being x86 and not Win32 as required by the generated project * make linux build work * make more linux work * openssl return version number directly without calling openssl (should probably be done differently) * fix some more path and platform identification * comments to reduce install. currently libpq installs static and shared libraries and some tools on linux * patch arm * fix platform detection logic * make libpq osx buildable * Rename debug import library after build. (So that we don't affect external CMake users.) * revert debug naming and install a wrapper instead. * fix gdal regression due to name change * fix cutelyst regression due to qt5-base wrapper (why was it not using the target in the first place?) * correct wrapper install path * correct the arm patch. * trying to fix static gdal build * gdal still needs more work * update version of openssl in libpq openssl patch * nmap fix openssl * qt5 fix openssl * gdal fix openssl * librtmp migrate to openssl 1.1.1 * fail in patch since what is intended is not going to work in openssl 1.1.1 * fix static yara build * freedtds deactivate openssl feature until freetds decides to upgrade to 1.1 * fix libwebsockets cmakelists * fix the patch so that the generated targets also include crypt32 * xmlsec add threads dependency * bump control since I am unable to reproduce the regression * add pthread to openssl detection logic * fix freetds linkage missing crypt32 and fix the cmake checks. * fix the openssl wrapper to add the threads library * fix libmysql regression * add threads to openssl libraries. * upgrade libssh to 0.9 * fix nmap regression * fix mosquitto regression * fix openssl wrapper to make libarchive work * fix quickfix * changed patch a bit * improve freetds patch * fix case in librtmp * update control * bump control * fix case * make jasper a dependency of qt5-imageformats to fix flaky CI build. * add jasper libraries explicitly * jasper depends on freeglut so add it as a dependency. turbo_jpeg is also a dependency but that should already be handled in qt5-base * more glut names * bump control for macosx ci retry * fix slikenet regression * fix linebreak in qt5-base * update baseline * Update ci.baseline.txt those ports are not supported on UWP * [libevent] add dependency on libevent[threads] to openssl feature * [pdal,freerdp] Update CI baseline to fail * fix static pdal build * fix freerdp on linux * trying to revert some changes * revert changes in build make * revert x264 version bump Co-authored-by: Force Charlie <6904176+fcharlie@users.noreply.github.com> Co-authored-by: Johnny Willemsen <jwillemsen@remedy.nl> Co-authored-by: Lennart Trunk <lennart.trunk@outlook.de> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
Diffstat (limited to 'ports/openssl-uwp')
-rw-r--r--ports/openssl-uwp/CONTROL2
-rw-r--r--ports/openssl-uwp/EnableUWPSupport.patch175
-rw-r--r--ports/openssl-uwp/portfile.cmake199
3 files changed, 327 insertions, 49 deletions
diff --git a/ports/openssl-uwp/CONTROL b/ports/openssl-uwp/CONTROL
index c11c10124..7327b57b1 100644
--- a/ports/openssl-uwp/CONTROL
+++ b/ports/openssl-uwp/CONTROL
@@ -1,3 +1,3 @@
Source: openssl-uwp
-Version: 1.0.2r-1
+Version: 1.1.1d
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-uwp/EnableUWPSupport.patch b/ports/openssl-uwp/EnableUWPSupport.patch
new file mode 100644
index 000000000..8ec26a6de
--- /dev/null
+++ b/ports/openssl-uwp/EnableUWPSupport.patch
@@ -0,0 +1,175 @@
+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" } ],
+ CFLAGS => add("/WX"),
+ AS => sub { vc_win32_info()->{AS} },
+ ASFLAGS => sub { vc_win32_info()->{ASFLAGS} },
+@@ -1375,7 +1375,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 = `powershell -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-2019 The OpenSSL Project Authors. All Rights Reserved.
+ #
+@@ -407,6 +408,7 @@ my @disablables = (
+ "ubsan",
+ "ui-console",
+ "unit-test",
++ "uplink",
+ "whirlpool",
+ "weak-ssl-ciphers",
+ "zlib",
+@@ -479,7 +481,7 @@ my @disable_cascades = (
+
+ # Without position independent code, there can be no shared libraries or DSOs
+ "pic" => [ "shared" ],
+- "shared" => [ "dynamic-engine" ],
++ "shared" => [ "dynamic-engine", "uplink" ],
+ "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/portfile.cmake b/ports/openssl-uwp/portfile.cmake
index 0a80bc326..c11763ee6 100644
--- a/ports/openssl-uwp/portfile.cmake
+++ b/ports/openssl-uwp/portfile.cmake
@@ -30,63 +30,166 @@ get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY)
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}")
-vcpkg_from_github(
- OUT_SOURCE_PATH SOURCE_PATH
- REPO Microsoft/openssl
- REF OpenSSL_1_0_2r_WinRT
- SHA512 3045693fca4b042b69675f6164d8cc82106582cf31081d65a0adbd528f04e77fa48b3761f3be7bdf8ab962a093b28fec0ae6d7da02058f2b049f79b784c39c2e
- HEAD_REF master
- PATCHES
- fix-uwp-configure-unicode.patch
-)
+set(OPENSSL_VERSION 1.1.1d)
-file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll)
-file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll)
-file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll)
+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 2bc9f528c27fe644308eb7603c992bac8740e9f0c3601a130af30c9ffebbf7e0f5c28b76a00bbb478bad40fbe89b4223a58d604001e1713da71ff4b7fe6a08a7
+)
-file(
- COPY ${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat
- DESTINATION ${SOURCE_PATH}
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ PATCHES
+ EnableUWPSupport.patch
)
-message(STATUS "Build ${TARGET_TRIPLET}")
-vcpkg_execute_required_process(
- COMMAND ${SOURCE_PATH}/make-openssl.bat ${UWP_PLATFORM}
- WORKING_DIRECTORY ${SOURCE_PATH}
- LOGNAME make-openssl-${TARGET_TRIPLET}
+vcpkg_find_acquire_program(NASM)
+get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY)
+set(ENV{PATH} "${NASM_EXE_PATH};$ENV{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
+ -utf-8
+ shared
)
-message(STATUS "Build ${TARGET_TRIPLET} done")
-file(
- COPY ${SOURCE_PATH}/inc32/openssl
- DESTINATION ${CURRENT_PACKAGES_DIR}/include
+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}-${CMAKE_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}-${CMAKE_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(INSTALL
- ${SOURCE_PATH}/out32dll/libeay32.dll
- ${SOURCE_PATH}/out32dll/libeay32.pdb
- ${SOURCE_PATH}/out32dll/ssleay32.dll
- ${SOURCE_PATH}/out32dll/ssleay32.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
-
-file(INSTALL
- ${SOURCE_PATH}/out32dll/libeay32.lib
- ${SOURCE_PATH}/out32dll/ssleay32.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
-
-file(INSTALL
- ${SOURCE_PATH}/out32dll/libeay32.dll
- ${SOURCE_PATH}/out32dll/libeay32.pdb
- ${SOURCE_PATH}/out32dll/ssleay32.dll
- ${SOURCE_PATH}/out32dll/ssleay32.pdb
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
-
-file(INSTALL
- ${SOURCE_PATH}/out32dll/libeay32.lib
- ${SOURCE_PATH}/out32dll/ssleay32.lib
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+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)
vcpkg_test_cmake(PACKAGE_NAME OpenSSL MODULE)