git: 83d646c6994d - main - databases/mysql90-{server|client}: add new Ports

From: Jochen Neumeister <joneum_at_FreeBSD.org>
Date: Sun, 01 Sep 2024 01:01:06 UTC
The branch main has been updated by joneum:

URL: https://cgit.FreeBSD.org/ports/commit/?id=83d646c6994d09544f67e6a1b414d5fc5b0437fc

commit 83d646c6994d09544f67e6a1b414d5fc5b0437fc
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2024-09-01 00:59:16 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2024-09-01 01:00:55 +0000

    databases/mysql90-{server|client}: add new Ports
    
    Welcome MySQL 8.4
    
    What is new in MySQL8.4 since MySQL 9.0:
    https://dev.mysql.com/doc/refman/9.0/en/mysql-nutshell.html
    
    HINT: MySQL8.4+ supports only 64-bit platforms!!!
    
    Sponsored by:   Netzkommune GmbH
---
 Mk/Uses/mysql.mk                                   |   1 +
 Mk/bsd.default-versions.mk                         |   2 +-
 databases/Makefile                                 |   2 +
 databases/mysql90-client/Makefile                  |  51 ++++
 databases/mysql90-client/pkg-message               |   8 +
 databases/mysql90-client/pkg-plist                 |  39 +++
 databases/mysql90-server/Makefile                  | 182 ++++++++++++++
 databases/mysql90-server/distinfo                  |   3 +
 databases/mysql90-server/files/my.cnf.sample.in    |  57 +++++
 databases/mysql90-server/files/mysql-server.in     |  78 ++++++
 .../mysql90-server/files/patch-CMakeLists.txt      |  80 ++++++
 .../files/patch-client_CMakeLists.txt              |  60 +++++
 .../files/patch-cmake_install__layout.cmake        |  95 +++++++
 .../files/patch-cmake_libutils.cmake               |  22 ++
 .../files/patch-cmake_os_DragonFly.cmake           |  27 ++
 .../mysql90-server/files/patch-cmake_plugin.cmake  |  27 ++
 .../mysql90-server/files/patch-cmake_ssl.cmake     |  25 ++
 ...sl_time_internal_cctz_src_time__zone__format.cc |  20 ++
 .../files/patch-include_my__compare.h              |  11 +
 .../files/patch-include_my__stacktrace.h           |  11 +
 .../files/patch-include_my__thread__os__id.h       |  15 ++
 .../mysql90-server/files/patch-include_myisam.h    |  11 +
 .../files/patch-libmysql_CMakeLists.txt            |  64 +++++
 .../files/patch-libs_mysql_serialization_archive.h |  19 ++
 ...sql_serialization_serializer__default__impl.hpp |  42 ++++
 ...h-libs_mysql_serialization_serializer__impl.hpp |  22 ++
 .../files/patch-libservices_CMakeLists.txt         |  12 +
 .../mysql90-server/files/patch-man_CMakeLists.txt  |  71 ++++++
 .../files/patch-mysys_my__default.cc               |  62 +++++
 .../mysql90-server/files/patch-mysys_my__kdf.cc    |  20 ++
 ...ugin_password__validation_validate__password.cc |  11 +
 .../files/patch-plugin_x_CMakeLists.txt            |  11 +
 ...t_authentication_sha256__scramble__generator.cc |  11 +
 .../files/patch-plugin_x_configure.cmake           |  15 ++
 ...ysql_harness_net__ts_impl_kqueue__io__service.h |  13 +
 ...arness_include_mysql_harness_net__ts_internet.h |  10 +
 ...-router_src_harness_src_tls__client__context.cc |  11 +
 .../patch-router_src_harness_src_tls__context.cc   |  44 ++++
 .../files/patch-scripts_CMakeLists.txt             |  52 ++++
 .../files/patch-scripts_mysqld__safe.sh            |  19 ++
 .../files/patch-sql_auth_sha2__password__common.cc |  11 +
 .../files/patch-sql_auth_sql__authorization.cc     |  13 +
 .../files/patch-sql_binlog__ostream.cc             |  11 +
 .../patch-sql_conn__handler_socket__connection.cc  |  32 +++
 .../files/patch-sql_mdl__context__backup.cc        |  36 +++
 .../files/patch-sql_mdl__context__backup.h         |  11 +
 databases/mysql90-server/files/patch-sql_mysqld.cc |  11 +
 ...ql_range__optimizer_index__range__scan__plan.cc |  39 +++
 .../files/patch-sql_rpl__log__encryption.cc        | 134 ++++++++++
 .../files/patch-sql_ssl__init__callback.cc         |  36 +++
 .../files/patch-sql_stream__cipher.cc              |  11 +
 .../files/patch-sql_stream__cipher.h               |  19 ++
 .../mysql90-server/files/patch-sql_sys__vars.cc    |  29 +++
 .../files/patch-storage_innobase_include_srv0mon.h |  13 +
 .../patch-storage_innobase_include_ut0crc32.h      |  12 +
 .../files/patch-storage_innobase_ut_crc32.cc       | 104 ++++++++
 .../files/patch-storage_myisam_mi__dynrec.cc       |  22 ++
 .../files/patch-support-files_CMakeLists.txt       |  39 +++
 ...unit_binlogevents_transaction__compression-t.cc |  11 +
 .../files/patch-unittest_gunit_stream__cipher-t.cc |  15 ++
 .../files/patch-utilities_CMakeLists.txt           |  68 ++++++
 databases/mysql90-server/files/patch-vio_viossl.cc |  30 +++
 .../files/patch-vio_viosslfactories.cc             |  46 ++++
 databases/mysql90-server/files/pkg-message.in      |  21 ++
 databases/mysql90-server/pkg-descr                 |   4 +
 databases/mysql90-server/pkg-plist                 | 272 +++++++++++++++++++++
 66 files changed, 2385 insertions(+), 1 deletion(-)

diff --git a/Mk/Uses/mysql.mk b/Mk/Uses/mysql.mk
index 866906ff5d1e..d022a7709b3e 100644
--- a/Mk/Uses/mysql.mk
+++ b/Mk/Uses/mysql.mk
@@ -62,6 +62,7 @@ DEFAULT_MYSQL_VER?=	${MYSQL_DEFAULT:S/.//}
 MYSQL80_LIBVER=		21
 MYSQL81_LIBVER=		22
 MYSQL84_LIBVER=		24
+MYSQL90_LIBVER=		24
 
 .  for v in 105 106 1011 114
 MYSQL${v}m_LIBVER=	3
diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk
index f6aeb2db9dff..52afdc222280 100644
--- a/Mk/bsd.default-versions.mk
+++ b/Mk/bsd.default-versions.mk
@@ -101,7 +101,7 @@ LUAJIT_DEFAULT?=	luajit-devel
 .  endif
 # Possible values: 5.10, 5.20, 6.8
 MONO_DEFAULT?=		5.20
-# Possible values: 8.0, 8.1, 8.4, 10.5m, 10.6m, 10.11m, 11.4m
+# Possible values: 8.0, 8.1, 8.4, 9.0, 10.5m, 10.6m, 10.11m, 11.4m
 MYSQL_DEFAULT?=		8.0
 # Possible values: ninja, samurai
 NINJA_DEFAULT?=		ninja
diff --git a/databases/Makefile b/databases/Makefile
index baa8715e7431..d10a92f75560 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -210,6 +210,8 @@
     SUBDIR += mysql81-server
     SUBDIR += mysql84-client
     SUBDIR += mysql84-server
+    SUBDIR += mysql90-client
+    SUBDIR += mysql90-server
     SUBDIR += mysqlbackup
     SUBDIR += mysqldump-secure
     SUBDIR += mysqlreport
diff --git a/databases/mysql90-client/Makefile b/databases/mysql90-client/Makefile
new file mode 100644
index 000000000000..c3df62430812
--- /dev/null
+++ b/databases/mysql90-client/Makefile
@@ -0,0 +1,51 @@
+PORTNAME=	mysql
+PORTREVISION=	0
+PKGNAMESUFFIX=	90-client
+
+COMMENT=	Multithreaded SQL database (client)
+
+LICENSE+=	LGPL21
+
+# MySQL8.2+ supports only 64-bit platforms
+# Review list after 13.x EoL
+NOT_FOR_ARCHS= armv6 armv7 i386 powerpc
+
+MASTERDIR=	${.CURDIR}/../mysql90-server
+
+PKGMESSAGE=	${.CURDIR}/pkg-message
+PATCHDIR=	${MASTERDIR}/files
+PLIST=		${.CURDIR}/pkg-plist
+
+CONFLICTS_INSTALL=	mysql8[1-9]-client \
+			mysql[0-79][0-9]-client \
+			mariadb[0-9][0-9]-client \
+			percona[0-9][0-9]-client
+
+CMAKE_ARGS+=	-DWITHOUT_SERVER=1 -DINSTALL_SUPPORTFILESDIR=0
+
+USE_LDCONFIG+=	${PREFIX}/lib/mysql
+
+MMAN1=		comp_err.1 lz4_decompress.1 mysql.1 mysql_config.1 mysql_config_editor.1 \
+		mysqladmin.1 mysqlbinlog.1 mysqlcheck.1 mysqldump.1 mysqlimport.1 mysqlman.1 \
+		mysqlpump.1 mysqlshow.1 mysqlslap.1 perror.1 zlib_decompress.1
+
+CLIENT_ONLY=	yes
+
+OPTIONS_GROUP+=	PLUGINS
+PLUGINS_DESC=	Default Client Plugins
+OPTIONS_GROUP_PLUGINS=	SASLCLIENT
+SASLCLIENT_DESC=	SASL client plugin module
+SASLCLIENT_CMAKE_BOOL=	WITH_AUTHENTICATION_LDAP
+SASLCLIENT_LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
+SASLCLIENT_USES=		ldap
+
+OPTIONS_DEFAULT+=	SASLCLIENT
+OPTIONS_SUB=	yes
+
+post-install:
+	@${RM} -r ${STAGEDIR}${PREFIX}/lib/mysql/private
+	@${LN} -s libmysqlclient.a ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.a
+	@${LN} -s libmysqlclient.so ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.so
+	@${LN} -s libmysqlclient.so.24 ${STAGEDIR}${PREFIX}/lib/mysql/libmysqlclient_r.so.24
+
+.include "${MASTERDIR}/Makefile"
diff --git a/databases/mysql90-client/pkg-message b/databases/mysql90-client/pkg-message
new file mode 100644
index 000000000000..06b3b2d0774a
--- /dev/null
+++ b/databases/mysql90-client/pkg-message
@@ -0,0 +1,8 @@
+[
+{ type: install
+  message: <<EOM
+This is the mysql CLIENT without the server.
+for complete server and client, please install databases/mysql84-server
+EOM
+}
+]
diff --git a/databases/mysql90-client/pkg-plist b/databases/mysql90-client/pkg-plist
new file mode 100644
index 000000000000..e38f0131ba73
--- /dev/null
+++ b/databases/mysql90-client/pkg-plist
@@ -0,0 +1,39 @@
+bin/comp_err
+bin/my_print_defaults
+bin/mysql
+bin/mysql_config
+bin/mysql_config_editor
+bin/mysql_migrate_keyring
+bin/mysqladmin
+bin/mysqlbinlog
+bin/mysqlcheck
+bin/mysqldump
+bin/mysqlimport
+bin/mysqlshow
+bin/mysqlslap
+bin/perror
+include/mysql/errmsg.h
+include/mysql/field_types.h
+include/mysql/my_command.h
+include/mysql/my_compress.h
+include/mysql/my_list.h
+include/mysql/mysql.h
+include/mysql/mysql/client_plugin.h
+include/mysql/mysql/plugin_auth_common.h
+include/mysql/mysql/udf_registration_types.h
+include/mysql/mysql_com.h
+include/mysql/mysql_time.h
+include/mysql/mysql_version.h
+include/mysql/mysqld_error.h
+lib/mysql/libmysqlclient.a
+lib/mysql/libmysqlclient.so
+lib/mysql/libmysqlclient.so.24
+lib/mysql/libmysqlclient_r.a
+lib/mysql/libmysqlclient_r.so
+lib/mysql/libmysqlclient_r.so.24
+lib/mysql/plugin/mysql_native_password.so
+%%SASLCLIENT%%lib/mysql/plugin/authentication_ldap_sasl_client.so
+%%SASLCLIENT%%lib/mysql/plugin/authentication_oci_client.so
+%%SASLCLIENT%%lib/mysql/plugin/authentication_webauthn_client.so
+libdata/pkgconfig/mysqlclient.pc
+share/aclocal/mysql.m4
diff --git a/databases/mysql90-server/Makefile b/databases/mysql90-server/Makefile
new file mode 100644
index 000000000000..89655d44221f
--- /dev/null
+++ b/databases/mysql90-server/Makefile
@@ -0,0 +1,182 @@
+PORTNAME?=		mysql
+PORTVERSION=		9.0.1
+PORTREVISION?=		0
+CATEGORIES=		databases
+MASTER_SITES=		MYSQL/MySQL-9.0
+PKGNAMESUFFIX?=		90-server
+
+MAINTAINER=		joneum@FreeBSD.org
+COMMENT?=		Multithreaded SQL database (server)
+WWW=		https://www.mysql.com/
+
+LICENSE=		GPLv2
+
+# MySQL8.2+ supports only 64-bit platforms
+# Review list after 13.x EoL
+NOT_FOR_ARCHS= armv6 armv7 i386 powerpc
+
+USES=		bison:build cmake:noninja cpe groff:run libedit localbase \
+		ncurses perl5 pkgconfig shebangfix ssl compiler:c++20-lang
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}${DISTVERSIONSUFFIX}
+
+SLAVEDIRS=	databases/mysql84-client
+
+CPE_VENDOR=	oracle
+
+USE_CXXSTD=	c++20
+USE_PERL5=	run
+
+MY_DBDIR=	/var/db/mysql
+MY_SECDIR=	/var/db/mysql_secure
+MY_TMPDIR=	/var/db/mysql_tmpdir
+
+LIB_DEPENDS+=	libcurl.so:ftp/curl \
+		libicutu.so:devel/icu \
+		liblz4.so:archivers/liblz4 \
+		libhidapi.so:comms/hidapi \
+		libfido2.so:security/libfido2 \
+		${LIB_DEPENDS_${ARCH}}
+LIB_DEPENDS_aarch64=	libunwind.so:devel/libunwind
+LIB_DEPENDS_amd64=	libunwind.so:devel/libunwind
+LIB_DEPENDS_powerpc64=		libunwind.so:devel/libunwind
+LIB_DEPENDS_powerpc64le=	libunwind.so:devel/libunwind
+
+BUILD_DEPENDS=	liblz4>0:archivers/liblz4 \
+		${BUILD_DEPENDS_${ARCH}}
+BUILD_DEPENDS_aarch64=	libunwind>0:devel/libunwind
+BUILD_DEPENDS_amd64=	libunwind>0:devel/libunwind
+BUILD_DEPENDS_powerpc64=	libunwind>0:devel/libunwind
+BUILD_DEPENDS_powerpc64le=	libunwind>0:devel/libunwind
+
+CMAKE_BUILD_TYPE=	Release
+CFLAGS+=		-fPIC
+CFLAGS_aarch64?=	-march=armv8-a+crc+crypto
+
+CMAKE_ARGS+=	-DINSTALL_LAYOUT=FREEBSD \
+		-DINSTALL_LDCONFIGDIR="${LOCALBASE}/libdata/ldconfig" \
+		-DINSTALL_PKGCONFIGDIR="${LOCALBASE}/libdata/pkgconfig" \
+		-DINSTALL_DOCDIR="share/doc/mysql" \
+		-DINSTALL_DOCREADMEDIR="share/doc/mysql" \
+		-DINSTALL_INCLUDEDIR="include/mysql" \
+		-DINSTALL_INFODIR="${INFO_PATH}" \
+		-DINSTALL_LIBDIR="lib/mysql" \
+		-DINSTALL_PRIV_LIBDIR="lib/mysql/private" \
+		-DINSTALL_MANDIR="share/man" \
+		-DINSTALL_MYSQLDATADIR="${MY_DBDIR}" \
+		-DINSTALL_MYSQLKEYRINGDIR="etc/mysql/keyring" \
+		-DINSTALL_MYSQLSHAREDIR="share/mysql" \
+		-DINSTALL_MYSQLTESTDIR="" \
+		-DINSTALL_PLUGINDIR="lib/mysql/plugin" \
+		-DINSTALL_SBINDIR="libexec" \
+		-DINSTALL_SCRIPTDIR="bin" \
+		-DINSTALL_SECURE_FILE_PRIVDIR="${MY_SECDIR}" \
+		-DINSTALL_SHAREDIR="share" \
+		-DINSTALL_SUPPORTFILESDIR="share/mysql" \
+		-DWITH_BOOST="${WRKSRC}/boost" \
+		-DWITH_SYSTEM_LIBS=1 \
+		-DWITH_EDITLINE=system \
+		-DWITH_LZ4=system \
+		-DWITH_ICU=system \
+		-DWITH_CURL=system \
+		-DWITH_ZSTD=bundled \
+		-DWITH_PROTOBUF=bundled \
+		-DWITH_SSL=system \
+		-DWITH_ZLIB=system \
+		-DWITH_LZ4=system
+
+SHEBANG_FILES=	scripts/*.pl* scripts/*.sh
+
+.ifdef USE_MYSQL
+IGNORE=		you have `USE_MYSQL' variable defined either in environment or in make(1) arguments, please undefine and try again
+.endif
+
+SUB_LIST=	MY_DBDIR=${MY_DBDIR} \
+		MY_SECDIR=${MY_SECDIR} \
+		MY_TMPDIR=${MY_TMPDIR}
+
+PLIST_SUB=	MY_DBDIR=${MY_DBDIR} \
+		MY_SECDIR=${MY_SECDIR} \
+		MY_TMPDIR=${MY_TMPDIR}
+
+# MySQL-Server part
+.if !defined(CLIENT_ONLY)
+USES+=		mysql:90
+
+CONFLICTS_INSTALL=	mysql*-server \
+			mysqlwsrep*-server \
+			mariadb*-server \
+			percona*-server
+
+USE_RC_SUBR=	mysql-server
+
+SUB_FILES=	my.cnf.sample pkg-message
+
+USERS=		mysql
+GROUPS=		mysql
+
+USE_LDCONFIG+=	${PREFIX}/lib/mysql/plugin
+
+MMAN1=		ibd2sdi.1 innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1 \
+		myisamlog.1 myisampack.1 mysql_secure_installation.1 mysql_ssl_rsa_setup.1 \
+		mysql_tzinfo_to_sql.1 mysql_upgrade.1 mysql.server.1 mysqldumpslow.1 mysqld_multi.1 \
+		mysqld_safe.1 mysqlrouter_passwd.1 mysqlrouter_plugin_info.1 mysqlrouter.1
+MMAN8=		mysqld.8
+
+CMAKE_ARGS+=	-DWITHOUT_CLIENTLIBS="ON"
+# Disable unit tests, it fails on !amd64 and <13.0 due to c++17 rules
+CMAKE_ARGS+=	-DWITH_UNIT_TESTS="OFF"
+
+OPTIONS_GROUP=		STORAGE
+OPTIONS_GROUP_STORAGE=	ARCHIVE BLACKHOLE EXAMPLE FEDERATED INNOBASE PARTITION PERFSCHEMA
+OPTIONS_SUB=		YES
+STORAGE_DESC=		Permissible "Storage Engines" (to compile statically into the server)
+ARCHIVE_DESC=		Compile "Archive Storage" statically in server
+BLACKHOLE_DESC=		Compile "Blackhole Storage" statically in server
+EXAMPLE_DESC=		Compile "Example Storage" statically in server
+FEDERATED_DESC=		Compile "Federated Storage" statically in server
+INNOBASE_DESC=		Compile "InnoDB Storage" statically in server
+PARTITION_DESC=		Compile "Partitioning support Storage" statically in server
+PERFSCHEMA_DESC=	Compile "Performance Schema Storage" statically in server
+
+ARCHIVE_CMAKE_ON=	-DWITH_ARCHIVE_STORAGE_ENGINE=1
+BLACKHOLE_CMAKE_ON=	-DWITH_BLACKHOLE_STORAGE_ENGINE=1
+EXAMPLE_CMAKE_ON=	-DWITH_EXAMPLE_STORAGE_ENGINE=1
+FEDERATED_CMAKE_ON=	-DWITH_FEDERATED_STORAGE_ENGINE=1
+INNOBASE_CMAKE_ON=	-DWITH_INNOBASE_STORAGE_ENGINE=1
+PARTITION_CMAKE_ON=	-DWITH_PARTITION_STORAGE_ENGINE=1
+PERFSCHEMA_CMAKE_ON=	-DWITH_PERFSCHEMA_STORAGE_ENGINE=1
+
+OPTIONS_GROUP+=		FEATURES
+OPTIONS_GROUP_FEATURES=	PERFSCHM
+FEATURES_DESC=		Default features knobs
+PERFSCHM_DESC=		Enable "Performance Schema" by default (High RAM usage)
+OPTIONS_DEFAULT+=	PERFSCHM
+
+PERFSCHM_SUB_LIST+=		PERFSCHEMRC=""
+# todo, likely broken, see
+# https://dev.mysql.com/doc/refman/8.4/en/source-configuration-options.html
+PERFSCHM_SUB_LIST_OFF+=		PERFSCHEMRC="--skip-performance-schema"
+FEDERATED_SUB_LIST+=		FEDER="--federated"
+FEDERATED_SUB_LIST_OFF+=	FEDER=""
+.endif
+
+.include <bsd.port.options.mk>
+
+CXXFLAGS+=	-malign-double
+
+.include <bsd.port.pre.mk>
+
+post-extract:
+	@${RM} -rv ${WRKSRC}/sql/sql_hints.yy.cc ${WRKSRC}/sql/sql_hints.yy.h
+
+.if !defined(CLIENT_ONLY)
+post-install:
+	${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${WRKDIR}/my.cnf.sample ${STAGEDIR}${ETCDIR}/my.cnf.sample
+	${MKDIR} ${STAGEDIR}${ETCDIR}/keyring
+	${MKDIR} ${STAGEDIR}${MY_SECDIR}
+	${MKDIR} ${STAGEDIR}${MY_TMPDIR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/databases/mysql90-server/distinfo b/databases/mysql90-server/distinfo
new file mode 100644
index 000000000000..03f04049bf35
--- /dev/null
+++ b/databases/mysql90-server/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1725120254
+SHA256 (mysql-9.0.1.tar.gz) = 18fa65f1ea6aea71e418fe0548552d9a28de68e2b8bc3ba9536599eb459a6606
+SIZE (mysql-9.0.1.tar.gz) = 428335150
diff --git a/databases/mysql90-server/files/my.cnf.sample.in b/databases/mysql90-server/files/my.cnf.sample.in
new file mode 100644
index 000000000000..3d1264c1bd61
--- /dev/null
+++ b/databases/mysql90-server/files/my.cnf.sample.in
@@ -0,0 +1,57 @@
+[client]
+port                            = 3306
+socket                          = /tmp/mysql.sock
+
+[mysql]
+prompt                          = \u@\h [\d]>\_
+no_auto_rehash
+
+[mysqld]
+user                            = mysql
+port                            = 3306
+socket                          = /tmp/mysql.sock
+bind-address                    = 127.0.0.1
+basedir                         = %%PREFIX%%
+datadir                         = %%MY_DBDIR%%
+tmpdir                          = %%MY_TMPDIR%%
+replica-load-tmpdir             = %%MY_TMPDIR%%
+secure-file-priv                = %%MY_SECDIR%%
+log-bin                         = mysql-bin
+log-output                      = TABLE
+relay-log-recovery              = 1
+slow-query-log                  = 1
+server-id                       = 1
+sync_binlog                     = 1
+sync_relay_log                  = 1
+binlog_cache_size               = 16M
+binlog_expire_logs_seconds      = 2592000
+default_password_lifetime       = 0
+enforce-gtid-consistency        = 1
+gtid-mode                       = ON
+safe-user-create                = 1
+lower_case_table_names          = 1
+explicit-defaults-for-timestamp = 1
+myisam-recover-options          = BACKUP,FORCE
+open_files_limit                = 32768
+table_open_cache                = 16384
+table_definition_cache          = 8192
+net_retry_count                 = 16384
+key_buffer_size                 = 256M
+max_allowed_packet              = 64M
+long_query_time                 = 0.5
+innodb_buffer_pool_size         = 1G
+innodb_data_home_dir            = %%MY_DBDIR%%
+innodb_log_group_home_dir       = %%MY_DBDIR%%
+innodb_data_file_path           = ibdata1:128M:autoextend
+innodb_temp_data_file_path      = ibtmp1:128M:autoextend
+innodb_flush_method             = O_DIRECT
+innodb_redo_log_capacity        = 512M
+innodb_log_buffer_size          = 16M
+innodb_write_io_threads         = 8
+innodb_read_io_threads          = 8
+innodb_autoinc_lock_mode        = 2
+
+[mysqldump]
+max_allowed_packet              = 256M
+quote_names
+quick
diff --git a/databases/mysql90-server/files/mysql-server.in b/databases/mysql90-server/files/mysql-server.in
new file mode 100644
index 000000000000..c79874df9f2c
--- /dev/null
+++ b/databases/mysql90-server/files/mysql-server.in
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# PROVIDE: mysql
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable mysql:
+# mysql_enable (bool):	Set to "NO" by default.
+#			Set it to "YES" to enable MySQL.
+# mysql_dbdir (str):	Default to "%%MY_DBDIR%%"
+#			Base database directory.
+# mysql_confdir (str):	Default to "%%ETCDIR%%"
+#			Base configuration directory.
+# mysql_optfile (str):	Server-specific option file.
+#			Set it in the rc.conf or default behaviour of
+#			`mysqld_safe` itself, will be picking
+#			${mysql_confdir}/my.cnf if it exists.
+# mysql_pidfile (str):	Custom PID file path and name.
+#			Default to "${mysql_dbdir}/${hostname}.pid".
+# mysql_args (str):	Custom additional arguments to be passed
+#			to mysqld_safe (default empty).
+#
+
+. /etc/rc.subr
+
+name="mysql"
+rcvar=mysql_enable
+
+load_rc_config $name
+
+: ${mysql_enable="NO"}
+: ${mysql_dbdir="%%MY_DBDIR%%"}
+: ${mysql_confdir="%%ETCDIR%%"}
+if [ -f "${mysql_confdir}/my.cnf" ]; then
+: ${mysql_optfile="${mysql_confdir}/my.cnf"}
+elif [ -f "${mysql_dbdir}/my.cnf" ]; then
+: ${mysql_optfile="${mysql_dbdir}/my.cnf"}
+fi
+if [ ! -z "${mysql_optfile}" ]; then
+mysql_extra="--defaults-extra-file=${mysql_optfile}"
+fi
+
+mysql_user="mysql"
+: ${hostname:=`/bin/hostname`}
+pidfile=${mysql_pidfile:-"${mysql_dbdir}/${hostname}.pid"}
+command="/usr/sbin/daemon"
+command_args="-c -f %%PREFIX%%/bin/mysqld_safe ${mysql_extra} --basedir=%%PREFIX%% --datadir=${mysql_dbdir} --pid-file=${pidfile} --user=${mysql_user} ${mysql_args} %%FEDER%% %%PERFSCHEMRC%%"
+procname="%%PREFIX%%/libexec/mysqld"
+start_precmd="${name}_prestart"
+start_postcmd="${name}_poststart"
+mysqld_init="${procname}"
+mysqld_init_args="${mysql_extra} --initialize-insecure --basedir=%%PREFIX%% --datadir=${mysql_dbdir} --user=${mysql_user}"
+
+mysql_create_auth_tables()
+{
+	eval $mysqld_init $mysqld_init_args >/dev/null 2>/dev/null
+}
+
+mysql_prestart()
+{
+	if [ ! -d "${mysql_dbdir}/mysql/." ]; then
+		mysql_create_auth_tables || return 1
+	fi
+	return 0
+}
+
+mysql_poststart()
+{
+	local timeout=15
+	while [ ! -f "${pidfile}" -a ${timeout} -gt 0 ]; do
+		timeout=$(( timeout - 1 ))
+		sleep 1
+	done
+	return 0
+}
+
+run_rc_command "$1"
diff --git a/databases/mysql90-server/files/patch-CMakeLists.txt b/databases/mysql90-server/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..8994243f163f
--- /dev/null
+++ b/databases/mysql90-server/files/patch-CMakeLists.txt
@@ -0,0 +1,80 @@
+--- CMakeLists.txt.orig	2024-06-03 11:39:00 UTC
++++ CMakeLists.txt
+@@ -1845,7 +1845,7 @@ IF(WITH_AUTHENTICATION_LDAP)
+ ENDIF()
+ 
+ IF(WITH_AUTHENTICATION_LDAP)
+-  IF(LINUX AND KNOWN_CUSTOM_LIBRARIES)
++  IF(LINUX OR FREEBSD AND KNOWN_CUSTOM_LIBRARIES)
+     # LDAP / SASL / KERBEROS / SSL must all be "system" or "custom", not a mix.
+     IF(WITH_LDAP STREQUAL "system" OR
+         WITH_SASL STREQUAL "system" OR
+@@ -1896,6 +1896,7 @@ ENDIF()
+   ENDIF()
+ ENDIF()
+ 
++IF(NOT WITHOUT_TOOLS)
+ # Add system/bundled editline.
+ MYSQL_CHECK_EDITLINE()
+ SET(EDITLINE_WARN_GIVEN)
+@@ -1906,6 +1907,7 @@ ENDIF()
+     "You can use -DWITH_EDITLINE=bundled instead."
+     )
+ ENDIF()
++ENDIF(NOT WITHOUT_TOOLS)
+ 
+ # Add lz4 library
+ MYSQL_CHECK_LZ4()
+@@ -2189,7 +2191,9 @@ ADD_DEPENDENCIES(clang_tidy_prerequisites GenError)
+ ADD_DEPENDENCIES(clang_tidy_prerequisites protobuf_generated_all)
+ ADD_DEPENDENCIES(clang_tidy_prerequisites GenError)
+ 
+-ADD_SUBDIRECTORY(include)
++IF(NOT WITHOUT_CLIENTLIBS)
++  ADD_SUBDIRECTORY(include)
++ENDIF(NOT WITHOUT_CLIENTLIBS)
+ ADD_SUBDIRECTORY(strings)
+ ADD_SUBDIRECTORY(vio)
+ ADD_SUBDIRECTORY(mysys)
+@@ -2239,12 +2243,15 @@ ENDIF()
+   ADD_SUBDIRECTORY(unittest/mytap/t)
+ ENDIF()
+ 
+-ADD_SUBDIRECTORY(client)
++IF(NOT WITHOUT_TOOLS)
++  ADD_SUBDIRECTORY(client)
++ENDIF(NOT WITHOUT_TOOLS)
++
+ ADD_SUBDIRECTORY(utilities)
+-ADD_SUBDIRECTORY(share)
+ ADD_SUBDIRECTORY(libservices)
+ 
+ IF(NOT WITHOUT_SERVER)
++  ADD_SUBDIRECTORY(share)
+   ADD_SUBDIRECTORY(testclients)
+   ADD_SUBDIRECTORY(sql)
+ ENDIF()
+@@ -2322,11 +2329,11 @@ ADD_SUBDIRECTORY(scripts)
+ # scripts/mysql_config depends on client and server targets loaded above.
+ # It is referenced by some of the directories below, so we insert it here.
+ ADD_SUBDIRECTORY(scripts)
++ADD_SUBDIRECTORY(support-files)
+ 
+ IF(NOT WITHOUT_SERVER)
+   ADD_SUBDIRECTORY(mysql-test)
+   ADD_SUBDIRECTORY(mysql-test/lib/My/SafeProcess)
+-  ADD_SUBDIRECTORY(support-files)
+   IF(WITH_INTERNAL)
+     ADD_SUBDIRECTORY(internal)
+   ENDIF()
+@@ -2354,8 +2361,10 @@ ENDIF()
+   INCLUDE(fastcov)
+ ENDIF()
+ 
++IF(FALSE)
+ IF(UNIX)
+   ADD_SUBDIRECTORY(man)
++ENDIF()
+ ENDIF()
+ 
+ IF(LINUX AND NOT WITHOUT_SERVER)
diff --git a/databases/mysql90-server/files/patch-client_CMakeLists.txt b/databases/mysql90-server/files/patch-client_CMakeLists.txt
new file mode 100644
index 000000000000..780490a1b465
--- /dev/null
+++ b/databases/mysql90-server/files/patch-client_CMakeLists.txt
@@ -0,0 +1,60 @@
+--- client/CMakeLists.txt.orig	2024-04-10 06:26:28 UTC
++++ client/CMakeLists.txt
+@@ -26,9 +26,12 @@ DISABLE_MISSING_PROFILE_WARNING()
+ # We are not interesting in profiling clients.
+ DISABLE_MISSING_PROFILE_WARNING()
+ 
++IF(WITHOUT_SERVER)
+ ## Subdirectory for mysql_migrate_keyring code.
+ ADD_SUBDIRECTORY(migrate_keyring)
++ENDIF()
+ 
++IF(WITHOUT_SERVER)
+ MYSQL_ADD_EXECUTABLE(mysql
+   ${CMAKE_SOURCE_DIR}/sql-common/net_ns.cc
+   completion_hash.cc
+@@ -42,7 +45,9 @@ MYSQL_ADD_EXECUTABLE(mysql
+   ${CMAKE_SOURCE_DIR}/sql-common/sql_string.cc
+   LINK_LIBRARIES mysqlclient ${EDITLINE_LIBRARY}
+   )
++ENDIF()
+ 
++IF(NOT WITHOUT_SERVER)
+ MYSQL_ADD_EXECUTABLE(mysqltest
+   mysqltest.cc
+   mysqltest/error_names.cc
+@@ -59,6 +64,9 @@ MYSQL_ADD_EXECUTABLE(mysqltest
+   ENABLE_EXPORTS
+   LINK_LIBRARIES mysqlclient
+   )
++ENDIF()
++
++IF(WITHOUT_SERVER)
+ MYSQL_ADD_EXECUTABLE(mysqlcheck
+   check/mysqlcheck.cc
+   check/mysqlcheck_core.cc
+@@ -274,7 +282,9 @@ TARGET_INCLUDE_DIRECTORIES(mysqlbinlog PRIVATE ${CMAKE
+ 
+ TARGET_COMPILE_DEFINITIONS(mysqlbinlog PRIVATE DISABLE_PSI_MUTEX)
+ TARGET_INCLUDE_DIRECTORIES(mysqlbinlog PRIVATE ${CMAKE_SOURCE_DIR}/sql)
++ENDIF()
+ 
++IF(WITHOUT_SERVER)
+ MYSQL_ADD_EXECUTABLE(mysqladmin
+   mysqladmin.cc
+   multi_factor_passwordopt-vars.cc
+@@ -289,10 +299,14 @@ MYSQL_ADD_EXECUTABLE(mysql_config_editor
+   mysql_config_editor.cc
+   LINK_LIBRARIES mysqlclient
+   )
++ENDIF()
++
++IF(NOT WITHOUT_SERVER)
+ MYSQL_ADD_EXECUTABLE(mysql_secure_installation
+   mysql_secure_installation.cc
+   LINK_LIBRARIES mysqlclient
+   )
++ENDIF()
+ 
+ # "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/".
+ IF(WIN32)
diff --git a/databases/mysql90-server/files/patch-cmake_install__layout.cmake b/databases/mysql90-server/files/patch-cmake_install__layout.cmake
new file mode 100644
index 000000000000..c7da17769e5e
--- /dev/null
+++ b/databases/mysql90-server/files/patch-cmake_install__layout.cmake
@@ -0,0 +1,95 @@
+--- cmake/install_layout.cmake.orig	2024-04-10 06:26:28 UTC
++++ cmake/install_layout.cmake
+@@ -42,6 +42,10 @@
+ #    Build with prefix=/usr/local/mysql, create tarball with install prefix="."
+ #    and relative links.
+ #
++#  FREEBSD
++#    Build with prefix=/usr/local, create tarball with install prefix="."
++#    and relative links.
++#
+ # To force a directory layout, use -DINSTALL_LAYOUT=<layout>.
+ #
+ # The default is STANDALONE.
+@@ -81,7 +85,7 @@ SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
+ ENDIF()
+ 
+ SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
+-  CACHE STRING "Installation directory layout. Options are: TARGZ (as in tar.gz installer), STANDALONE, RPM, DEB, SVR4"
++  CACHE STRING "Installation directory layout. Options are: TARGZ (as in tar.gz installer), STANDALONE, FREEBSD, RPM, DEB, SVR4"
+   )
+ 
+ IF(UNIX)
+@@ -99,7 +103,7 @@ IF(UNIX)
+       CACHE PATH "install prefix" FORCE)
+   ENDIF()
+   SET(VALID_INSTALL_LAYOUTS
+-    "RPM" "DEB" "SVR4" "TARGZ" "STANDALONE")
++    "RPM" "DEB" "SVR4" "TARGZ" "FREEBSD" "STANDALONE")
+   LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
+   IF(ind EQUAL -1)
+     MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
+@@ -168,6 +172,32 @@ SET(INSTALL_SECURE_FILE_PRIVDIR_STANDALONE ${secure_fi
+ SET(INSTALL_SECURE_FILE_PRIVDIR_STANDALONE ${secure_file_priv_path})
+ 
+ #
++# FREEBSD layout
++#
++SET(INSTALL_BINDIR_FREEBSD           "bin")
++SET(INSTALL_SBINDIR_FREEBSD          "bin")
++#
++SET(INSTALL_LIBDIR_FREEBSD           "lib")
++SET(INSTALL_PRIV_LIBDIR_FREEBSD      "lib/private")
++SET(INSTALL_PLUGINDIR_FREEBSD        "lib/plugin")
++#
++SET(INSTALL_INCLUDEDIR_FREEBSD       "include")
++#
++SET(INSTALL_DOCDIR_FREEBSD           "docs")
++SET(INSTALL_DOCREADMEDIR_FREEBSD     ".")
++SET(INSTALL_MANDIR_FREEBSD           "man")
++SET(INSTALL_INFODIR_FREEBSD          "docs")
++#
++SET(INSTALL_SHAREDIR_FREEBSD         "share")
++SET(INSTALL_MYSQLSHAREDIR_FREEBSD    "share")
++SET(INSTALL_MYSQLTESTDIR_FREEBSD     "mysql-test")
++SET(INSTALL_SUPPORTFILESDIR_FREEBSD  "support-files")
++#
++SET(INSTALL_MYSQLDATADIR_FREEBSD     "data")
++SET(INSTALL_MYSQLKEYRINGDIR_FREEBSD  "keyring")
++SET(INSTALL_SECURE_FILE_PRIVDIR_FREEBSD ${secure_file_priv_path})
++
++#
+ # TARGZ layout
+ #
+ SET(INSTALL_BINDIR_TARGZ           "bin")
+@@ -362,7 +392,7 @@ SET(ROUTER_INSTALL_LAYOUT "${DEFAULT_ROUTER_INSTALL_LA
+ SET(ROUTER_INSTALL_LAYOUT "${DEFAULT_ROUTER_INSTALL_LAYOUT}"
+   CACHE
+   STRING
+-  "Installation directory layout. Options are: STANDALONE RPM DEB SVR4 TARGZ")
++  "Installation directory layout. Options are: STANDALONE FREEBSD RPM DEB SVR4 TARGZ")
+ 
+ # If we are shared STANDALONE with the the server, we shouldn't write
+ # into the server's data/ as that would create a "schemadir" in
+@@ -406,6 +436,21 @@ ENDFOREACH()
+     )
+   SET(ROUTER_INSTALL_${var}DIR_TARGZ ${ROUTER_INSTALL_${var}DIR_STANDALONE})
+ ENDFOREACH()
++
++#
++# FreeBSD layout
++#
++SET(ROUTER_INSTALL_CONFIGDIR_FREEBSD  "/usr/local/etc/mysqlrouter")
++SET(ROUTER_INSTALL_DATADIR_FREEBSD    "/var/db/mysqlrouter")
++SET(ROUTER_INSTALL_LOGDIR_FREEBSD     "/var/log/mysqlrouter")
++SET(ROUTER_INSTALL_RUNTIMEDIR_FREEBSD "/var/run/mysqlrouter")
++
++SET(ROUTER_INSTALL_BINDIR_FREEBSD     "bin")
++SET(ROUTER_INSTALL_LIBDIR_FREEBSD     "lib/mysql")
++SET(ROUTER_INSTALL_PLUGINDIR_FREEBSD  "lib/mysql/mysqlrouter")
++SET(ROUTER_INSTALL_LOGROTATEDIR_FREEBSD "etc/logrotate.d")
++SET(ROUTER_INSTALL_LOGROTATEFILE_FREEBSD "mysqlrouter")
++SET(ROUTER_INSTALL_DOCDIR_FREEBSD     "share/mysqlrouter/docs")
+ 
+ FOREACH(var
+     LOGROTATE
diff --git a/databases/mysql90-server/files/patch-cmake_libutils.cmake b/databases/mysql90-server/files/patch-cmake_libutils.cmake
new file mode 100644
index 000000000000..a96fa8f41fb3
--- /dev/null
+++ b/databases/mysql90-server/files/patch-cmake_libutils.cmake
@@ -0,0 +1,22 @@
+--- cmake/libutils.cmake.orig	2024-06-03 11:39:00 UTC
++++ cmake/libutils.cmake
+@@ -384,9 +384,6 @@ MACRO(MERGE_LIBRARIES_SHARED TARGET_ARG)
+     ELSE()
+       SET(DESTINATION "${INSTALL_LIBDIR}")
+     ENDIF()
+-    IF(ARG_NAMELINK_SKIP)
+-      SET(INSTALL_ARGS NAMELINK_SKIP)
+-    ENDIF()
+     MYSQL_INSTALL_TARGET(${TARGET} DESTINATION "${DESTINATION}" ${COMP}
+       ${INSTALL_ARGS})
+   ENDIF()
+@@ -642,9 +639,6 @@ FUNCTION(ADD_SHARED_LIBRARY TARGET_ARG)
+       SET(COMP COMPONENT ${ARG_COMPONENT})
+     ELSE()
+       SET(COMP COMPONENT SharedLibraries)
+-    ENDIF()
+-    IF(ARG_NAMELINK_SKIP)
+-      SET(INSTALL_ARGS NAMELINK_SKIP)
+     ENDIF()
+     MYSQL_INSTALL_TARGET(${TARGET} DESTINATION "${DESTINATION}" ${COMP}
+       ${INSTALL_ARGS})
diff --git a/databases/mysql90-server/files/patch-cmake_os_DragonFly.cmake b/databases/mysql90-server/files/patch-cmake_os_DragonFly.cmake
new file mode 100644
index 000000000000..83c154ee3bcf
--- /dev/null
+++ b/databases/mysql90-server/files/patch-cmake_os_DragonFly.cmake
@@ -0,0 +1,27 @@
+--- cmake/os/DragonFly.cmake.orig	2016-04-14 10:16:17 UTC
++++ cmake/os/DragonFly.cmake
+@@ -0,0 +1,24 @@
++INCLUDE(CheckCSourceRuns)
++
++# We require at least GCC 4.4 or Clang 3.3.
++IF(NOT FORCE_UNSUPPORTED_COMPILER)
++  IF(CMAKE_COMPILER_IS_GNUCC)
++    EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
++                    OUTPUT_VARIABLE GCC_VERSION)
++    IF(GCC_VERSION VERSION_LESS 4.4)
++      MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!")
++    ENDIF()
++  ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Clang")
++    CHECK_C_SOURCE_RUNS("
++      int main()
++      {
++        return (__clang_major__ < 3) ||
++               (__clang_major__ == 3 && __clang_minor__ < 3);
++      }" HAVE_SUPPORTED_CLANG_VERSION)
++    IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
++      MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!")
++    ENDIF()
++  ELSE()
++    MESSAGE(FATAL_ERROR "Unsupported compiler!")
++  ENDIF()
++ENDIF()
diff --git a/databases/mysql90-server/files/patch-cmake_plugin.cmake b/databases/mysql90-server/files/patch-cmake_plugin.cmake
new file mode 100644
index 000000000000..19c48f038d4a
--- /dev/null
+++ b/databases/mysql90-server/files/patch-cmake_plugin.cmake
@@ -0,0 +1,27 @@
+--- cmake/plugin.cmake.orig	2024-04-10 06:26:28 UTC
++++ cmake/plugin.cmake
+@@ -274,15 +274,15 @@ MACRO(MYSQL_ADD_PLUGIN plugin_arg)
+ 
+       # For testing purposes, we need
+       # <...>/lib/plugin/debug/authentication_ldap_sasl_client.so
+-      IF(ARG_CLIENT_ONLY)
+-        INSTALL_DEBUG_TARGET(${target}
+-          DESTINATION ${INSTALL_PLUGINDIR}/debug
+-          COMPONENT Test)
+-      ELSE()
+-        INSTALL_DEBUG_TARGET(${target}
+-          DESTINATION ${INSTALL_PLUGINDIR}/debug
+-          COMPONENT ${INSTALL_COMPONENT})
+-      ENDIF()
++#      IF(ARG_CLIENT_ONLY)
++#        INSTALL_DEBUG_TARGET(${target}
++#          DESTINATION ${INSTALL_PLUGINDIR}/debug
++#          COMPONENT Test)
++#      ELSE()
++#        INSTALL_DEBUG_TARGET(${target}
++#          DESTINATION ${INSTALL_PLUGINDIR}/debug
++#          COMPONENT ${INSTALL_COMPONENT})
++#      ENDIF()
+     ENDIF()
+   ELSE()
+     IF(WITHOUT_${plugin})
diff --git a/databases/mysql90-server/files/patch-cmake_ssl.cmake b/databases/mysql90-server/files/patch-cmake_ssl.cmake
new file mode 100644
index 000000000000..41c725984ec3
--- /dev/null
+++ b/databases/mysql90-server/files/patch-cmake_ssl.cmake
@@ -0,0 +1,25 @@
+--- cmake/ssl.cmake.orig	2024-04-10 06:26:28 UTC
++++ cmake/ssl.cmake
+@@ -156,7 +156,7 @@ MACRO(FIND_OPENSSL_VERSION)
+     # Encoded as MNNFFPPS: major minor fix patch status
+     FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
+       OPENSSL_VERSION_NUMBER
+-      REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
++      REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
+       )
+     STRING(REGEX REPLACE
+       "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
+@@ -566,9 +566,10 @@ FUNCTION(MYSQL_CHECK_SSL)
+   ENDIF()
+ 
+   # TODO(tdidriks): move to config.h.cmake / my_config.h
+-  IF("${OPENSSL_MAJOR_MINOR_FIX_VERSION}" VERSION_GREATER "1.1.0")
+-    ADD_DEFINITIONS(-DHAVE_TLSv13)
+-  ENDIF()
++    CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
++    IF(HAVE_TLS1_3_VERSION)  
++       #ADD_DEFINITIONS(-DHAVE_TLSv13)
++    ENDIF()
+ 
+   GET_TARGET_PROPERTY(foo OpenSSL::SSL INTERFACE_INCLUDE_DIRECTORIES)
+   MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${foo}")
diff --git a/databases/mysql90-server/files/patch-extra_abseil_abseil-cpp-20230802.1_absl_time_internal_cctz_src_time__zone__format.cc b/databases/mysql90-server/files/patch-extra_abseil_abseil-cpp-20230802.1_absl_time_internal_cctz_src_time__zone__format.cc
new file mode 100644
index 000000000000..0f46d1309196
--- /dev/null
+++ b/databases/mysql90-server/files/patch-extra_abseil_abseil-cpp-20230802.1_absl_time_internal_cctz_src_time__zone__format.cc
@@ -0,0 +1,20 @@
+--- extra/abseil/abseil-cpp-20230802.1/absl/time/internal/cctz/src/time_zone_format.cc.orig	2024-05-09 19:37:37 UTC
++++ extra/abseil/abseil-cpp-20230802.1/absl/time/internal/cctz/src/time_zone_format.cc
+@@ -13,7 +13,7 @@
+ //   limitations under the License.
+ 
+ #if !defined(HAS_STRPTIME)
+-#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__VXWORKS__)
++#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__VXWORKS__) && !defined(__FreeBSD__)
+ #define HAS_STRPTIME 1  // Assume everyone else has strptime().
+ #endif
+ #endif
+@@ -648,7 +648,7 @@ const char* ParseTM(const char* dp, const char* fmt, s
+ // Parses a string into a std::tm using strptime(3).
+ const char* ParseTM(const char* dp, const char* fmt, std::tm* tm) {
+   if (dp != nullptr) {
*** 1900 LINES SKIPPED ***