aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2023-06-13 06:26:00 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2023-06-13 06:26:00 +0000
commitf8301140055f9b0fac6e3c23458e48c7cff2ef05 (patch)
tree3248797e7e78c12ff76bf4f2e583831d7f60203b
parentf928f005fc11e2cf03ef3f3b3656639d5b8406d3 (diff)
downloadports-f8301140055f9b0fac6e3c23458e48c7cff2ef05.tar.gz
ports-f8301140055f9b0fac6e3c23458e48c7cff2ef05.zip
databases/mysql56-client: be ready for OpenSSL 3.0 in base
Use same approach as in f89fd0980a5cbcc54597578015f660643cdccf0f for mysql57-client. PORTREVISION not bumped intentionally. PR: 271656
-rw-r--r--databases/mysql56-client/files/patch-cmake_ssl.cmake34
1 files changed, 31 insertions, 3 deletions
diff --git a/databases/mysql56-client/files/patch-cmake_ssl.cmake b/databases/mysql56-client/files/patch-cmake_ssl.cmake
index 52db9e37d987..ea7b6a9be138 100644
--- a/databases/mysql56-client/files/patch-cmake_ssl.cmake
+++ b/databases/mysql56-client/files/patch-cmake_ssl.cmake
@@ -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)