Skip to content

Commit

Permalink
[openssl] Fix building in Release only mode (#24004)
Browse files Browse the repository at this point in the history
* [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>
  • Loading branch information
AenBleidd and Neumann-A authored Apr 7, 2022
1 parent bfba976 commit 1b3a783
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
9 changes: 9 additions & 0 deletions ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 6 additions & 3 deletions ports/openssl/windows/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5142,7 +5142,7 @@
},
"openssl": {
"baseline": "3.0.2",
"port-version": 0
"port-version": 1
},
"openssl-unix": {
"baseline": "1.1.1h",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openssl.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3505d3717ae864160fdb273eb2ec9d614eb6711e",
"version": "3.0.2",
"port-version": 1
},
{
"git-tree": "2ba2e59ee4f32c11e30aeccc0ecabc09b69c5d22",
"version": "3.0.2",
Expand Down

0 comments on commit 1b3a783

Please sign in to comment.