Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openssl] Add no-module configure option for static build #24598

Merged
merged 13 commits into from
May 19, 2022
2 changes: 1 addition & 1 deletion ports/openssl/unix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ if(BUILD_SHARED_LIBS)
list(APPEND BIN_EXTS ${BIN_EXT})
list(APPEND LIB_EXTS ${LIB_EXT})
else()
set(SHARED no-shared)
set(SHARED no-shared no-module)
set(LIB_EXTS a)
endif()
set(INSTALL_PKG_CONFIGS "${BUILDDIR}/openssl.pc")
Expand Down
2 changes: 1 addition & 1 deletion ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openssl",
"version": "3.0.3",
"port-version": 1,
"port-version": 2,
"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": "Apache-2.0",
Expand Down
17 changes: 11 additions & 6 deletions ports/openssl/windows/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}")

vcpkg_find_acquire_program(JOM)

set(OPENSSL_SHARED no-shared)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(OPENSSL_SHARED shared)
else()
set(OPENSSL_SHARED no-shared no-module)
endif()

vcpkg_cmake_get_vars(cmake_vars_file)
Expand Down Expand Up @@ -148,8 +149,10 @@ if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")

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")
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
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()
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/certs")
Expand All @@ -162,10 +165,12 @@ 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")

if(NOT VCPKG_BUILD_TYPE)
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/ossl-modules/legacy.dll" "${CURRENT_PACKAGES_DIR}/debug/bin/legacy.dll")
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
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")
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 @@ -5178,7 +5178,7 @@
},
"openssl": {
"baseline": "3.0.3",
"port-version": 1
"port-version": 2
},
"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": "cdd8b7c5c9ebba05598bc90a58f224f13cf0b611",
"version": "3.0.3",
"port-version": 2
},
{
"git-tree": "1ac5c972c2c6c9af050334b2f7a41de1253c6a5e",
"version": "3.0.3",
Expand Down