Skip to content

Commit

Permalink
[openssl] install cmake config wrapper only at the end (#38398)
Browse files Browse the repository at this point in the history
Fixes #37987

- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [x] The "supports" clause reflects platforms that may be fixed by this
new version.
- [x] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.
- [x] Any patches that are no longer applied are deleted from the port's
directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.

i don't know why adding the config wrapper at the beginning results in a
missing file in the end, but at least in this way it works.

Could it be that including a portfile in a portfile triggers any cleanup
in the packages folder?
  • Loading branch information
cenit authored May 13, 2024
1 parent b50bbb6 commit ce2c1f0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
17 changes: 9 additions & 8 deletions ports/openssl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ if(VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
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)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO openssl/openssl
Expand Down Expand Up @@ -80,4 +72,13 @@ else()
endif()

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

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)

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
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.3.0",
"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 @@ -6526,7 +6526,7 @@
},
"openssl": {
"baseline": "3.3.0",
"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": "7407c8c4bb89f961d5e57afb101329454b4771ab",
"version": "3.3.0",
"port-version": 1
},
{
"git-tree": "033278114ce1aff68a03a777df0689c846760006",
"version": "3.3.0",
Expand Down

0 comments on commit ce2c1f0

Please sign in to comment.