[openssl] Fix building in Release only mode (#24004)

* [openssl] Fix building in Release only mode

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>

* Update ports/openssl/windows/portfile.cmake

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>

* Merging from FrankXie05/dev/Frank/23889

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
This commit is contained in:
Vitalii Koshura 2022-04-07 16:48:06 +02:00 committed by GitHub
parent bfba976514
commit 1b3a783ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 5 deletions

View File

@ -3,7 +3,16 @@ if(EXISTS "${CURRENT_INSTALLED_DIR}/share/libressl/copyright"
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()
if (VCPKG_TARGET_IS_LINUX)
message(WARNING
[[openssl currently requires the following library from the system package manager:
linux-headers
It can be installed on alpine systems via apk add linux-headers.]]
)
endif()
set(OPENSSL_VERSION 3.0.2)
vcpkg_download_distfile(
ARCHIVE
URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"

View File

@ -1,9 +1,10 @@
{
"name": "openssl",
"version": "3.0.2",
"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.",
"homepage": "https://www.openssl.org",
"license": "OpenSSL",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",

View File

@ -122,9 +122,9 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
COMMAND "${JOM}" -j 1 -f "${OPENSSL_MAKEFILE}" install_sw install_ssldirs
WORKING_DIRECTORY ${SOURCE_PATH_DEBUG}
LOGNAME build-${TARGET_TRIPLET}-dbg-1)
message(STATUS "Build ${TARGET_TRIPLET}-dbg done")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/legacy.pdb" "${CURRENT_PACKAGES_DIR}/debug/bin/legacy.pdb")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/ossl-modules/legacy.pdb" "${CURRENT_PACKAGES_DIR}/bin/legacy.pdb")
endif()
@ -139,8 +139,11 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/engines-3")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/private")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/legacy.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/legacy.dll")
if(NOT VCPKG_BUILD_TYPE)
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/legacy.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/legacy.dll")
endif()
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/ossl-modules/legacy.dll" "${CURRENT_PACKAGES_DIR}/bin/legacy.dll")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/ossl-modules")

View File

@ -5142,7 +5142,7 @@
},
"openssl": {
"baseline": "3.0.2",
"port-version": 0
"port-version": 1
},
"openssl-unix": {
"baseline": "1.1.1h",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3505d3717ae864160fdb273eb2ec9d614eb6711e",
"version": "3.0.2",
"port-version": 1
},
{
"git-tree": "2ba2e59ee4f32c11e30aeccc0ecabc09b69c5d22",
"version": "3.0.2",