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] Generate OPENSSL_VERSION_MAJOR/MINOR/FIX #27618

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openssl/openssl
REF openssl-${VERSION}
REF "openssl-${VERSION}"
SHA512 27dd3ef0c1827a74ec880d20232acb818c7d05e004ad7389c355e200a01e899f1b1ba5c34dcce44ecf7c8767c5e1bfbb2c795e3fa5461346087e7e3b95c8a51f
PATCHES ${OPENSSL_PATCHES}
)
Expand All @@ -38,5 +38,11 @@ else()
include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake")
endif()

if (NOT "${VERSION}" MATCHES [[^([0-9]+)\.([0-9]+)\.([0-9]+)$]])
message(FATAL_ERROR "Version regex did not match.")
endif()
set(OPENSSL_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(OPENSSL_VERSION_MINOR "${CMAKE_MATCH_2}")
set(OPENSSL_VERSION_FIX "${CMAKE_MATCH_3}")
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
6 changes: 3 additions & 3 deletions ports/openssl/vcpkg-cmake-wrapper.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ cmake_policy(SET CMP0012 NEW)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0057 NEW)

set(OPENSSL_VERSION_MAJOR 3)
set(OPENSSL_VERSION_MINOR 0)
set(OPENSSL_VERSION_FIX 5)
set(OPENSSL_VERSION_MAJOR @OPENSSL_VERSION_MAJOR@)
set(OPENSSL_VERSION_MINOR @OPENSSL_VERSION_MINOR@)
set(OPENSSL_VERSION_FIX @OPENSSL_VERSION_FIX@)

if(OPENSSL_USE_STATIC_LIBS)
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "dynamic")
Expand Down
1 change: 1 addition & 0 deletions ports/openssl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "openssl",
"version": "3.0.7",
"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": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5506,7 +5506,7 @@
},
"openssl": {
"baseline": "3.0.7",
"port-version": 0
"port-version": 1
},
"openssl-unix": {
"baseline": "deprecated",
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": "5a5bee3e62226101e0af83bce7873b9b6c9a2132",
"version": "3.0.7",
"port-version": 1
},
{
"git-tree": "09701bf7506bd0d161bf671eff1c7f5b3d73e3a9",
"version": "3.0.7",
Expand Down