pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/mysql57-client mysql57-client: Support OpenS...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3bd44abc6277
branches:  trunk
changeset: 769258:3bd44abc6277
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Nov 10 11:03:52 2021 +0000

description:
mysql57-client: Support OpenSSL 3.

diffstat:

 databases/mysql57-client/distinfo                      |   4 +-
 databases/mysql57-client/patches/patch-cmake_ssl.cmake |  52 ++++++++++++++++-
 2 files changed, 51 insertions(+), 5 deletions(-)

diffs (91 lines):

diff -r 19902e4f7b8e -r 3bd44abc6277 databases/mysql57-client/distinfo
--- a/databases/mysql57-client/distinfo Wed Nov 10 10:56:27 2021 +0000
+++ b/databases/mysql57-client/distinfo Wed Nov 10 11:03:52 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.46 2021/10/26 10:09:25 nia Exp $
+$NetBSD: distinfo,v 1.47 2021/11/10 11:03:52 jperkin Exp $
 
 BLAKE2s (mysql-5.7.36.tar.gz) = 74c80608c6e00d5f24cfc1d864520a4e01d476d94a90b9c44d1e8a4aeb5d3c54
 SHA512 (mysql-5.7.36.tar.gz) = 34badfff21c774a5a05cca5b505725eda440ad3d7aca4de593ec58c13a552fe4c5465e1f17b0493a21971321185ffcfa031267df13188e33503f003bfa8a14b6
@@ -15,7 +15,7 @@
 SHA1 (patch-cmake_os_SunOS.cmake) = b71c3e1fafb48ebbba77c19bb1c31556ebe1ad2a
 SHA1 (patch-cmake_plugin.cmake) = 4480438969e297f67890b1974a86fb88a23d28ed
 SHA1 (patch-cmake_readline.cmake) = 96ee989be126c939a4c9ef80f8cbb27e0c0719a5
-SHA1 (patch-cmake_ssl.cmake) = 85ccd0f27fdd6950368ae10fe4b8a013d2e66dfa
+SHA1 (patch-cmake_ssl.cmake) = dd5bb94818d480a42ab5f971f08b3b4cdbb24034
 SHA1 (patch-include_CMakeLists.txt) = 944991702f046ea7a5e2b6ea4dc390f17426e55a
 SHA1 (patch-include_my__compare.h) = f45bac4b488332a668b0005751856279b67401f5
 SHA1 (patch-include_my__global.h) = 3870266cb1dd2cd0d58417dfe21bab19b62100e2
diff -r 19902e4f7b8e -r 3bd44abc6277 databases/mysql57-client/patches/patch-cmake_ssl.cmake
--- a/databases/mysql57-client/patches/patch-cmake_ssl.cmake    Wed Nov 10 10:56:27 2021 +0000
+++ b/databases/mysql57-client/patches/patch-cmake_ssl.cmake    Wed Nov 10 11:03:52 2021 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-cmake_ssl.cmake,v 1.4 2020/05/07 05:31:53 adam Exp $
+$NetBSD: patch-cmake_ssl.cmake,v 1.5 2021/11/10 11:03:52 jperkin Exp $
 
 Do not prefer static libraries (or linking will fail).
 
---- cmake/ssl.cmake.orig       2020-03-23 17:35:17.000000000 +0000
+--- cmake/ssl.cmake.orig       2021-09-07 05:26:47.000000000 +0000
 +++ cmake/ssl.cmake
 @@ -153,7 +153,6 @@ MACRO (MYSQL_CHECK_SSL)
      # On mac this list is <.dylib;.so;.a>
@@ -22,7 +22,45 @@
  
      IF(OPENSSL_INCLUDE_DIR)
        # Verify version number. Version information looks like:
-@@ -196,7 +192,7 @@ MACRO (MYSQL_CHECK_SSL)
+@@ -175,6 +171,29 @@ MACRO (MYSQL_CHECK_SSL)
+         OPENSSL_VERSION_NUMBER
+         REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+         )
++      IF (NOT OPENSSL_VERSION_NUMBER)
++        FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
++          OPENSSL_VERSION_NUMBER
++          REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_MAJOR[\t ]+[0-9].*$"
++        )
++        STRING(REGEX REPLACE "^.*MAJOR[\t ]+([0-9]).*$" "\\1"
++          OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
++        )
++        FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
++          OPENSSL_VERSION_NUMBER
++          REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_MINOR[\t ]+[0-9].*"
++        )
++        STRING(REGEX REPLACE "^.*MINOR[\t ]+([0-9]).*$" "\\1"
++          OPENSSL_MINOR_VERSION "${OPENSSL_VERSION_NUMBER}"
++        )
++        FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
++          OPENSSL_VERSION_NUMBER
++          REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_PATCH[\t ]+[0-9].*"
++        )
++        STRING(REGEX REPLACE "^.*PATCH[\t ]+([0-9]).*$" "\\1"
++          OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
++        )
++      ELSE()
+       STRING(REGEX REPLACE
+         "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
+         OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
+@@ -187,6 +206,7 @@ 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()
+     SET(OPENSSL_VERSION
+       "${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}"
+@@ -196,14 +216,14 @@ MACRO (MYSQL_CHECK_SSL)
      IF("${OPENSSL_VERSION}" VERSION_GREATER "1.1.0")
         ADD_DEFINITIONS(-DHAVE_TLSv13)
         SET(HAVE_TLSv13 1)
@@ -31,3 +69,11 @@
           SET(FORCE_SSL_SOLARIS "-Wl,--undefined,address_of_sk_new_null")
         ENDIF()
      ENDIF()
+     IF(OPENSSL_INCLUDE_DIR AND
+        OPENSSL_LIBRARY   AND
+        CRYPTO_LIBRARY      AND
+-       OPENSSL_MAJOR_VERSION STREQUAL "1"
++       (OPENSSL_MAJOR_VERSION STREQUAL "1" OR OPENSSL_MAJOR_VERSION STREQUAL "3")
+       )
+       SET(OPENSSL_FOUND TRUE)
+     ELSE()



Home | Main Index | Thread Index | Old Index