1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

databases/mysql56-client: be ready for OpenSSL 3.0 in base

Use same approach as in f89fd0980a
for mysql57-client. PORTREVISION not bumped intentionally.

PR:		271656
This commit is contained in:
Eugene Grosbein 2023-06-13 13:26:00 +07:00
parent f928f005fc
commit f830114005
No known key found for this signature in database
GPG Key ID: C8960FF146564C9A

View File

@ -1,8 +1,36 @@
--- cmake/ssl.cmake.orig 2019-11-26 16:53:45 UTC
+++ cmake/ssl.cmake
@@ -189,13 +189,20 @@ MACRO (MYSQL_CHECK_SSL)
--- cmake/ssl.cmake.orig 2021-01-05 17:19:59.000000000 +0700
+++ cmake/ssl.cmake 2023-06-13 13:07:00.168639000 +0700
@@ -169,6 +169,25 @@ MACRO (MYSQL_CHECK_SSL)
ENDIF()
IF(OPENSSL_INCLUDE_DIR)
+ FOREACH(version_part
+ OPENSSL_VERSION_MAJOR
+ OPENSSL_VERSION_MINOR
+ OPENSSL_VERSION_PATCH
+ )
+ FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" ${version_part}
+ REGEX "^#[\t ]*define[\t ]+${version_part}[\t ]+([0-9]+).*")
+ STRING(REGEX REPLACE
+ "^.*${version_part}[\t ]+([0-9]+).*" "\\1"
+ ${version_part} "${${version_part}}")
+ ENDFOREACH()
+
+ IF(OPENSSL_VERSION_MAJOR VERSION_EQUAL 3)
+ # OpenSSL 3
+ SET(OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_MAJOR}")
+ SET(OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_MINOR}")
+ SET(OPENSSL_FIX_VERSION "${OPENSSL_VERSION_PATCH}")
+ SET(OPENSSL_FOUND TRUE)
+ ELSE()
# Verify version number. Version information looks like:
# #define OPENSSL_VERSION_NUMBER 0x1000103fL
# Encoded as MNNFFPPS: major minor fix patch status
@@ -188,14 +207,22 @@ MACRO (MYSQL_CHECK_SSL)
"^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
)
+ ENDIF()
ENDIF()
- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
- ADD_DEFINITIONS(-DHAVE_TLSv13)