aboutsummaryrefslogtreecommitdiff
path: root/ports/openssl
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-07-17 16:07:52 -0700
committerRobert Schumacher <roschuma@microsoft.com>2018-07-17 16:09:12 -0700
commitb4422a1b7ec3c0728108972c07f4daeaa2c9b2a8 (patch)
treee65ae338893770d97bf6fb2c8230cd47c3cf2cd1 /ports/openssl
parentc2f96eb79ac11be000b7b26134ff89946bfa6458 (diff)
downloadvcpkg-b4422a1b7ec3c0728108972c07f4daeaa2c9b2a8.tar.gz
vcpkg-b4422a1b7ec3c0728108972c07f4daeaa2c9b2a8.zip
[openssl] Split openssl into multiple ports per platform
Diffstat (limited to 'ports/openssl')
-rw-r--r--ports/openssl/CMakeLists.txt130
-rw-r--r--ports/openssl/CONTROL3
-rw-r--r--ports/openssl/ConfigureIncludeQuotesFix.patch13
-rw-r--r--ports/openssl/EmbedSymbolsInStaticLibsZ7.patch25
-rw-r--r--ports/openssl/LICENSE127
-rw-r--r--ports/openssl/STRINGIFYPatch.patch23
-rw-r--r--ports/openssl/fix-uwp-rs4.patch26
-rw-r--r--ports/openssl/make-openssl.bat16
-rw-r--r--ports/openssl/portfile-nonwindows.cmake37
-rw-r--r--ports/openssl/portfile-uwp.cmake99
-rw-r--r--ports/openssl/portfile.cmake165
-rw-r--r--ports/openssl/remove-deps.cmake7
-rw-r--r--ports/openssl/usage4
-rw-r--r--ports/openssl/vcpkg-cmake-wrapper.cmake10
14 files changed, 3 insertions, 682 deletions
diff --git a/ports/openssl/CMakeLists.txt b/ports/openssl/CMakeLists.txt
deleted file mode 100644
index a2d863452..000000000
--- a/ports/openssl/CMakeLists.txt
+++ /dev/null
@@ -1,130 +0,0 @@
-cmake_minimum_required(VERSION 3.9)
-project(openssl C)
-
-if(NOT SOURCE_PATH)
- message(FATAL_ERROR "Requires SOURCE_PATH")
-endif()
-
-if(CMAKE_SYSTEM_NAME STREQUAL "Android")
- set(PLATFORM android)
-elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
- set(PLATFORM linux-generic64)
- else()
- set(PLATFORM linux-generic32)
- endif()
-elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- set(PLATFORM darwin64-x86_64-cc)
-elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
- set(PLATFORM BSD-generic64)
-else()
- message(FATAL_ERROR "Unknown platform")
-endif()
-
-get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY)
-
-message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
-message("COMPILER_ROOT=${COMPILER_ROOT}")
-message("CMAKE_SYSROOT=${CMAKE_SYSROOT}")
-message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}")
-message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}")
-message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}")
-message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}")
-
-set(CFLAGS "${CMAKE_C_FLAGS}")
-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}")
-endif()
-if(CMAKE_C_COMPILER_TARGET)
- set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET} ${CMAKE_C_COMPILER_TARGET}")
-endif()
-if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
- set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}")
-endif()
-if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
- set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
-endif()
-
-file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}")
-set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr")
-set(ENV{CC} "${CMAKE_C_COMPILER}")
-
-message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}")
-
-get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME)
-set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}")
-
-if(NOT EXISTS "${BUILDDIR}")
- file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-endif()
-
-get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY)
-
-
-file(READ "${BUILDDIR}/Configure" _contents)
-string(REPLACE "-mandroid" "" _contents "${_contents}")
-file(WRITE "${BUILDDIR}/Configure" "${_contents}")
-
-if(BUILD_SHARED_LIBS)
- set(SHARED shared)
-else()
- set(SHARED no-shared)
-endif()
-
-if(CMAKE_HOST_WIN32)
- set(ENV_COMMAND set)
- set(PATH_VAR ";%PATH%")
-else()
- set(ENV_COMMAND export)
- set(PATH_VAR ":$ENV{PATH}")
-endif()
-
-add_custom_command(
- OUTPUT "${BUILDDIR}/Makefile"
- COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER}
- COMMAND ${ENV_COMMAND} AR=${CMAKE_AR}
- COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER}
- COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB}
- COMMAND ${ENV_COMMAND} MAKE=${MAKE}
- COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER}
- COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
- COMMAND "${PERL}" Configure
- ${SHARED}
- enable-static-engine
- no-ssl2
- no-krb5
- no-idea
- no-bf
- no-cast
- no-seed
- no-md2
- ${PLATFORM}
- "--prefix=${CMAKE_INSTALL_PREFIX}"
- "--openssldir=${CMAKE_INSTALL_PREFIX}"
- ${CFLAGS}
- COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
- VERBATIM
- WORKING_DIRECTORY "${BUILDDIR}"
-)
-
-add_custom_target(depend
- COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
- COMMAND "${MAKE}" links # depend MAKEDEPPROG=${CMAKE_C_COMPILER}
- VERBATIM
- WORKING_DIRECTORY "${BUILDDIR}"
- DEPENDS "${BUILDDIR}/Makefile"
-)
-add_custom_target(build_libs ALL
- COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
- COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h"
- COMMAND "${MAKE}" build_libs
- VERBATIM
- WORKING_DIRECTORY "${BUILDDIR}"
- DEPENDS depend
- BYPRODUCTS "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
-)
-
-install(
- FILES "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
- DESTINATION lib
-)
diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL
index ed9ccf48b..4d81a1962 100644
--- a/ports/openssl/CONTROL
+++ b/ports/openssl/CONTROL
@@ -1,3 +1,4 @@
Source: openssl
-Version: 1.0.2o-3
+Version: 0
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.
+Build-Depends: openssl-windows (windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows)
diff --git a/ports/openssl/ConfigureIncludeQuotesFix.patch b/ports/openssl/ConfigureIncludeQuotesFix.patch
deleted file mode 100644
index 09494f565..000000000
--- a/ports/openssl/ConfigureIncludeQuotesFix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/Configure b/Configure
-index c98107a..77ad9d3 100644
---- a/Configure
-+++ b/Configure
-@@ -972,7 +972,7 @@ PROCESS_ARGS:
- }
- elsif (/^--with-zlib-include=(.*)$/)
- {
-- $withargs{"zlib-include"}="-I$1";
-+ $withargs{"zlib-include"}="-I\"$1\"";
- }
- elsif (/^--with-fipsdir=(.*)$/)
- {
diff --git a/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch b/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch
deleted file mode 100644
index 1a8de2c4b..000000000
--- a/ports/openssl/EmbedSymbolsInStaticLibsZ7.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl
-index dba96cb..5722f6e 100644
---- a/util/pl/VC-32.pl
-+++ b/util/pl/VC-32.pl
-@@ -154,9 +154,17 @@ else
- $cflags=$opt_cflags.$base_cflags;
- }
-
--# generate symbols.pdb unconditionally
--$app_cflag.=" /Zi /Fd\$(TMP_D)/app";
--$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib";
-+# generate symbols.pdb when building dlls and embed symbols when building static libs
-+if ($shlib)
-+ {
-+ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb";
-+ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb";
-+ }
-+else
-+ {
-+ $app_cflag.=" /Z7";
-+ $lib_cflag.=" /Z7";
-+ }
- $lflags.=" /debug";
-
- $obj='.obj';
diff --git a/ports/openssl/LICENSE b/ports/openssl/LICENSE
deleted file mode 100644
index e47d101f1..000000000
--- a/ports/openssl/LICENSE
+++ /dev/null
@@ -1,127 +0,0 @@
-
- LICENSE ISSUES
- ==============
-
- The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
- the OpenSSL License and the original SSLeay license apply to the toolkit.
- See below for the actual license texts. Actually both licenses are BSD-style
- Open Source licenses. In case of any license issues related to OpenSSL
- please contact openssl-core@openssl.org.
-
- OpenSSL License
- ---------------
-
-/* ====================================================================
- * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. 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.
- *
- * 3. All advertising materials mentioning features or use of this
- * software must display the following acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
- *
- * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * openssl-core@openssl.org.
- *
- * 5. Products derived from this software may not be called "OpenSSL"
- * nor may "OpenSSL" appear in their names without prior written
- * permission of the OpenSSL Project.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- * "This product includes software developed by the OpenSSL Project
- * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
- *
- * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
- * EXPRESSED 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 OpenSSL PROJECT OR
- * ITS 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.
- * ====================================================================
- *
- * This product includes cryptographic software written by Eric Young
- * (eay@cryptsoft.com). This product includes software written by Tim
- * Hudson (tjh@cryptsoft.com).
- *
- */
-
- Original SSLeay License
- -----------------------
-
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 AUTHOR 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.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
diff --git a/ports/openssl/STRINGIFYPatch.patch b/ports/openssl/STRINGIFYPatch.patch
deleted file mode 100644
index dd8f9c297..000000000
--- a/ports/openssl/STRINGIFYPatch.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/crypto/cversion.c b/crypto/cversion.c
-index bfff699..17b7912 100644
---- a/crypto/cversion.c
-+++ b/crypto/cversion.c
-@@ -56,6 +56,9 @@
- * [including the GNU Public Licence.]
- */
-
-+#define STRINGIFY2(x) #x
-+#define STRINGIFY(x) STRINGIFY2(x)
-+
- #include "cryptlib.h"
-
- #ifndef NO_WINDOWS_BRAINDEATH
-@@ -79,7 +82,7 @@ const char *SSLeay_version(int t)
- }
- if (t == SSLEAY_CFLAGS) {
- #ifdef CFLAGS
-- return (CFLAGS);
-+ return STRINGIFY(CFLAGS);
- #else
- return ("compiler: information not available");
- #endif
diff --git a/ports/openssl/fix-uwp-rs4.patch b/ports/openssl/fix-uwp-rs4.patch
deleted file mode 100644
index d5a33909e..000000000
--- a/ports/openssl/fix-uwp-rs4.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/ms/winrtdef.h b/ms/winrtdef.h
-index b1a7598..6ba2e1d 100644
---- a/ms/winrtdef.h
-+++ b/ms/winrtdef.h
-@@ -6,9 +6,11 @@
- #if defined(OPENSSL_WINAPP)
- //Include stdio.h to replace fprintf
- # include<stdio.h>
-+#if !defined(NTDDI_VERSION) || (NTDDI_VERSION < NTDDI_WIN10_RS4)
- # ifdef getenv
- # undef getenv
- # endif
-+#endif
- # ifdef setenv
- # undef setenv
- # endif
-@@ -32,7 +34,9 @@
- # undef GetModuleHandle
- # define GetModuleHandle winrt_GetModuleHandle
- # endif
-+#if !defined(NTDDI_WIN10_RS4) || (NTDDI_VERSION < NTDDI_WIN10_RS4)
- # define getenv winrt_getenv
-+#endif
- # define setenv winrt_getenv
-
- int winrt_GetTickCount(void);
diff --git a/ports/openssl/make-openssl.bat b/ports/openssl/make-openssl.bat
deleted file mode 100644
index 6f6166a24..000000000
--- a/ports/openssl/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/portfile-nonwindows.cmake b/ports/openssl/portfile-nonwindows.cmake
deleted file mode 100644
index c324b132a..000000000
--- a/ports/openssl/portfile-nonwindows.cmake
+++ /dev/null
@@ -1,37 +0,0 @@
-if(CMAKE_HOST_WIN32)
- vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
- set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
- set(MAKE ${MSYS_ROOT}/usr/bin/make.exe)
-else()
- find_program(MAKE make)
- if(NOT MAKE)
- message(FATAL_ERROR "Could not find make. Please install it through your package manager.")
- endif()
-endif()
-
-vcpkg_configure_cmake(
- SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
- PREFER_NINJA
- OPTIONS
- -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH}
- -DPERL=${PERL}
- -DMAKE=${MAKE}
- OPTIONS_RELEASE
- -DINSTALL_HEADERS=ON
-)
-
-vcpkg_install_cmake()
-
-file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h)
-set(RESOLVED_HEADERS)
-foreach(HEADER ${HEADERS})
- get_filename_component(X "${HEADER}" REALPATH)
- list(APPEND RESOLVED_HEADERS "${X}")
-endforeach()
-
-file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl)
-file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
- file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl)
-endif()
diff --git a/ports/openssl/portfile-uwp.cmake b/ports/openssl/portfile-uwp.cmake
deleted file mode 100644
index 6aef52695..000000000
--- a/ports/openssl/portfile-uwp.cmake
+++ /dev/null
@@ -1,99 +0,0 @@
-# Common Ambient Variables:
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# TARGET_TRIPLET is the current triplet (x86-windows, etc)
-# PORT is the current port name (zlib, etc)
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-#
-
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- set(VCPKG_LIBRARY_LINKAGE dynamic)
- message("Static building not supported yet")
-endif()
-
-if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- message(FATAL_ERROR "This portfile only supports UWP")
-endif()
-
-if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
- set(UWP_PLATFORM "arm")
-elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
- set(UWP_PLATFORM "x64")
-elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
- set(UWP_PLATFORM "Win32")
-else ()
- message(FATAL_ERROR "Unsupported architecture")
-endif()
-
-include(vcpkg_common_functions)
-
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-OpenSSL_1_0_2l_WinRT)
-
-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)
-set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH};${JOM_EXE_PATH}")
-
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/Microsoft/openssl/archive/OpenSSL_1_0_2l_WinRT.zip"
- FILENAME "openssl-microsoft-1.0.2l_WinRT.zip"
- SHA512 238b3daad7f1a2486e09d47e6d1bd4b0aa8e8a896358c6dfe11a77c2654da1b29d3c7612f9d200d5be5a020f33d96fe39cd75b99aa35aa4129feb756f7f98ee8
-)
-
-vcpkg_extract_source_archive(${ARCHIVE})
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-uwp-rs4.patch
-)
-
-file(REMOVE_RECURSE ${SOURCE_PATH}/tmp32dll)
-file(REMOVE_RECURSE ${SOURCE_PATH}/out32dll)
-file(REMOVE_RECURSE ${SOURCE_PATH}/inc32dll)
-
-file(
- COPY ${CMAKE_CURRENT_LIST_DIR}/make-openssl.bat
- DESTINATION ${SOURCE_PATH}
-)
-
-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}
-)
-message(STATUS "Build ${TARGET_TRIPLET} done")
-
-file(
- COPY ${SOURCE_PATH}/inc32/openssl
- DESTINATION ${CURRENT_PACKAGES_DIR}/include
-)
-
-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/openssl RENAME copyright)
-
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake
index a6e5fd110..065116c27 100644
--- a/ports/openssl/portfile.cmake
+++ b/ports/openssl/portfile.cmake
@@ -1,164 +1 @@
-if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
- include(${CMAKE_CURRENT_LIST_DIR}/portfile-uwp.cmake)
- return()
-endif()
-
-include(vcpkg_common_functions)
-set(OPENSSL_VERSION 1.0.2o)
-set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION})
-
-vcpkg_find_acquire_program(PERL)
-
-get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
-set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}")
-
-vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE
- URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz"
- FILENAME "openssl-${OPENSSL_VERSION}.tar.gz"
- SHA512 8a2c93657c85143e76785bb32ee836908c31a6f5f8db993fa9777acba6079e630cdddd03edbad65d1587199fc13a1507789eacf038b56eb99139c2091d9df7fd
-)
-
-vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE})
-vcpkg_apply_patches(
- SOURCE_PATH ${MASTER_COPY_SOURCE_PATH}
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch
- ${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch
- ${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch
-)
-
-if(VCPKG_CMAKE_SYSTEM_NAME)
- include(${CMAKE_CURRENT_LIST_DIR}/portfile-nonwindows.cmake)
- return()
-endif()
-
-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-ssl2
- -utf-8
-)
-
-if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
- set(OPENSSL_ARCH VC-WIN32)
- set(OPENSSL_DO "ms\\do_nasm.bat")
-elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
- set(OPENSSL_ARCH VC-WIN64A)
- set(OPENSSL_DO "ms\\do_win64a.bat")
-else()
- message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
-endif()
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- set(OPENSSL_MAKEFILE "ms\\ntdll.mak")
-else()
- set(OPENSSL_MAKEFILE "ms\\nt.mak")
-endif()
-
-file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
-
-
-file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
-set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/openssl-${OPENSSL_VERSION})
-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
-)
-vcpkg_execute_required_process(
- COMMAND ${OPENSSL_DO}
- WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
- LOGNAME configure-do-${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}
- 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
- WORKING_DIRECTORY ${SOURCE_PATH_RELEASE}
- LOGNAME build-${TARGET_TRIPLET}-rel-1)
-
-message(STATUS "Build ${TARGET_TRIPLET}-rel done")
-
-
-message(STATUS "Configure ${TARGET_TRIPLET}-dbg")
-file(COPY ${MASTER_COPY_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
-set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/openssl-${OPENSSL_VERSION})
-set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug)
-
-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
-)
-vcpkg_execute_required_process(
- COMMAND ${OPENSSL_DO}
- WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
- LOGNAME configure-do-${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}
- 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
- WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
- LOGNAME build-${TARGET_TRIPLET}-dbg-1)
-
-message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
-
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE
- ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe
- ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf
- ${CURRENT_PACKAGES_DIR}/openssl.cnf
-)
-
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/)
-file(RENAME ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/openssl.exe)
-
-vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
-
-file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
- # They should be empty, only the exes deleted above were in these directories
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/)
-endif()
-
-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})
+set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
diff --git a/ports/openssl/remove-deps.cmake b/ports/openssl/remove-deps.cmake
deleted file mode 100644
index a57c70fe9..000000000
--- a/ports/openssl/remove-deps.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-file(GLOB_RECURSE MAKEFILES ${DIR}/*/Makefile)
-foreach(MAKEFILE ${MAKEFILES})
- message("removing deps from ${MAKEFILE}")
- file(READ "${MAKEFILE}" _contents)
- string(REGEX REPLACE "\n# DO NOT DELETE THIS LINE.*" "" _contents "${_contents}")
- file(WRITE "${MAKEFILE}" "${_contents}")
-endforeach()
diff --git a/ports/openssl/usage b/ports/openssl/usage
deleted file mode 100644
index f535cb6a4..000000000
--- a/ports/openssl/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)
diff --git a/ports/openssl/vcpkg-cmake-wrapper.cmake b/ports/openssl/vcpkg-cmake-wrapper.cmake
deleted file mode 100644
index 82313bdab..000000000
--- a/ports/openssl/vcpkg-cmake-wrapper.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
-_find_package(${ARGS})
-if(OPENSSL_FOUND)
- find_library(OPENSSL_DL_LIBRARY NAMES dl)
- if(OPENSSL_DL_LIBRARY)
- list(APPEND OPENSSL_LIBRARIES "dl")
- if(TARGET OpenSSL::Crypto)
- set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl")
- endif()
- endif()
-endif()