[openssl] Add cmake wrapper to handle OPENSSL_ROOT_DIR (#18042)

* [openssl] Add cmake wrapper to handle OPENSSL_ROOT_DIR

* Get the abs path

* update version record

* apply suggestion.

* Clean up openssl related code, move to openssl wrapper.

* update version record

* [kf5holidays] Disable parallel configure

* update version record

* update version record

* bump version

* Update versions/o-/openssl.json

* update baseline

* Update ports/openssl/vcpkg-cmake-wrapper.cmake

* Update ports/openssl/vcpkg-cmake-wrapper.cmake

* Update versions/o-/openssl.json

* Update ports/openssl/vcpkg.json

* Update versions/o-/openssl.json

* Update ports/openssl/vcpkg.json

* Update versions/o-/openssl.json

* update version record
This commit is contained in:
Jack·Boos·Yu 2021-06-11 23:45:08 +08:00 committed by GitHub
parent 7d472dd258
commit 02fa0eb4c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 51 additions and 31 deletions

View File

@ -9,6 +9,7 @@ vcpkg_from_github(
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DBUILD_HTML_DOCS=OFF
-DBUILD_MAN_DOCS=OFF

View File

@ -1,6 +1,7 @@
{
"name": "kf5holidays",
"version": "5.81.0",
"port-version": 1,
"description": "Holiday calculation library",
"dependencies": [
"ecm",

View File

@ -21,5 +21,5 @@ else()
include("${CMAKE_CURRENT_LIST_DIR}/unix/portfile.cmake")
endif()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

View File

@ -0,0 +1,35 @@
set(OPENSSL_ROOT_DIR_BAK ${OPENSSL_ROOT_DIR})
get_filename_component(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR}" PATH)
get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR}" PATH)
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" Z_VCPKG_PROGRAMFILES)
set(Z_VCPKG_PROGRAMFILESX86_NAME "PROGRAMFILES(x86)")
file(TO_CMAKE_PATH "$ENV{${Z_VCPKG_PROGRAMFILESX86_NAME}}" Z_VCPKG_PROGRAMFILESX86)
set(CMAKE_SYSTEM_IGNORE_PATH
"${Z_VCPKG_PROGRAMFILES}/OpenSSL"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32/lib/VC"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64/lib/VC"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32/lib/VC/static"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64/lib/VC/static"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32/lib/VC"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64/lib/VC"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32/lib/VC/static"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64/lib/VC/static"
"C:/OpenSSL/"
"C:/OpenSSL-Win32/"
"C:/OpenSSL-Win64/"
"C:/OpenSSL-Win32/lib/VC"
"C:/OpenSSL-Win64/lib/VC"
"C:/OpenSSL-Win32/lib/VC/static"
"C:/OpenSSL-Win64/lib/VC/static"
)
_find_package(${ARGS})
set(OPENSSL_ROOT_DIR ${OPENSSL_ROOT_DIR_BAK})

View File

@ -1,7 +1,7 @@
{
"name": "openssl",
"version-string": "1.1.1k",
"port-version": 4,
"port-version": 5,
"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"
}

View File

@ -419,33 +419,6 @@ endif()
set(VCPKG_CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}")
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" Z_VCPKG_PROGRAMFILES)
set(Z_VCPKG_PROGRAMFILESX86_NAME "PROGRAMFILES(x86)")
file(TO_CMAKE_PATH "$ENV{${Z_VCPKG_PROGRAMFILESX86_NAME}}" Z_VCPKG_PROGRAMFILESX86)
set(CMAKE_SYSTEM_IGNORE_PATH
"${Z_VCPKG_PROGRAMFILES}/OpenSSL"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32/lib/VC"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64/lib/VC"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win32/lib/VC/static"
"${Z_VCPKG_PROGRAMFILES}/OpenSSL-Win64/lib/VC/static"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32/lib/VC"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64/lib/VC"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win32/lib/VC/static"
"${Z_VCPKG_PROGRAMFILESX86}/OpenSSL-Win64/lib/VC/static"
"C:/OpenSSL/"
"C:/OpenSSL-Win32/"
"C:/OpenSSL-Win64/"
"C:/OpenSSL-Win32/lib/VC"
"C:/OpenSSL-Win64/lib/VC"
"C:/OpenSSL-Win32/lib/VC/static"
"C:/OpenSSL-Win64/lib/VC/static"
)
# CMAKE_EXECUTABLE_SUFFIX is not yet defined
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(Z_VCPKG_EXECUTABLE "${Z_VCPKG_ROOT_DIR}/vcpkg.exe")

View File

@ -2866,7 +2866,7 @@
},
"kf5holidays": {
"baseline": "5.81.0",
"port-version": 0
"port-version": 1
},
"kf5i18n": {
"baseline": "5.81.0",
@ -4594,7 +4594,7 @@
},
"openssl": {
"baseline": "1.1.1k",
"port-version": 4
"port-version": 5
},
"openssl-unix": {
"baseline": "1.1.1h",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "624f5c592ba2ea64dda5f8962d423165e470be7d",
"version": "5.81.0",
"port-version": 1
},
{
"git-tree": "748a3353b679c76468e85e01c3b5fa4e21351566",
"version": "5.81.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9cbfcf1a35e62330f5ebddca9d0f1ea493172ef7",
"version-string": "1.1.1k",
"port-version": 5
},
{
"git-tree": "029caa3289fc2b99107efaf987c23fd65f5eac97",
"version-string": "1.1.1k",