git: 1ba5f925f5b1 - main - devel/apr1: Unbreak with MySQL > 8.0.2 < 10.0.0

From: Juraj Lutter <otis_at_FreeBSD.org>
Date: Wed, 17 Sep 2025 09:34:08 UTC
The branch main has been updated by otis:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1ba5f925f5b1839f3e2b36742ec62cd246ccf764

commit 1ba5f925f5b1839f3e2b36742ec62cd246ccf764
Author:     Nick Hilliard <nick@foobar.org>
AuthorDate: 2025-09-17 09:30:09 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2025-09-17 09:33:49 +0000

    devel/apr1: Unbreak with MySQL > 8.0.2 < 10.0.0
    
    my_init() was removed from mysql 8.0.2, but dbd/apr_dbd_mysql.c calls
    my_init() if MYSQL_VERSION_ID < 100000. This patch fixes this problem,
    allowing Apache mod_authn_dbd.so to work properly on mysql >= 8.0.2.
    
    There is an open bug upstream, but it has not been patched yet.
    
    Upstream PR: https://bz.apache.org/bugzilla/show_bug.cgi?id=62631
    
    PR:             274134
    Approved by:    brnrd (with apache hat)
---
 devel/apr1/Makefile            |  2 +-
 devel/apr1/files/patch-my_init | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/devel/apr1/Makefile b/devel/apr1/Makefile
index 5650baee07a1..2a42b0e29404 100644
--- a/devel/apr1/Makefile
+++ b/devel/apr1/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	apr
 PORTVERSION=	${APR_VERSION}.${APU_VERSION}
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	devel
 MASTER_SITES=	APACHE/apr
 DISTFILES=	apr-${APR_VERSION}.tar.gz \
diff --git a/devel/apr1/files/patch-my_init b/devel/apr1/files/patch-my_init
new file mode 100644
index 000000000000..563b6ff21ca9
--- /dev/null
+++ b/devel/apr1/files/patch-my_init
@@ -0,0 +1,11 @@
+--- apr-util-1.6.3/dbd/apr_dbd_mysql.c	2023-01-27 13:32:52.000000000 +0000
++++ apr-util-1.6.3/dbd/apr_dbd_mysql.c	2023-07-09 00:09:40.664437000 +0100
+@@ -1262,7 +1262,7 @@
+ 
+ static void dbd_mysql_init(apr_pool_t *pool)
+ {
+-#if MYSQL_VERSION_ID < 100000
++#if MYSQL_VERSION_ID < 80002
+     my_init();
+ #endif
+     mysql_thread_init();