]> TLD Linux GIT Repositories - packages/apr-util.git/commitdiff
- fix building with MySQL 8.x master
authorMarcin Krol <hawk@tld-linux.org>
Mon, 1 Apr 2024 14:30:08 +0000 (16:30 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 1 Apr 2024 14:30:08 +0000 (16:30 +0200)
apr-util.spec
mysql8.patch [new file with mode: 0644]

index 9a4b8b4fac58ef5435a546990e1111ae4347c0f2..641e713302d72f50d07a029c407026855592ca8e 100644 (file)
@@ -19,7 +19,7 @@ Summary:      A companion library to Apache Portable Runtime
 Summary(pl.UTF-8):     Biblioteka towarzysząca Apache Portable Runtime
 Name:          apr-util
 Version:       1.6.3
 Summary(pl.UTF-8):     Biblioteka towarzysząca Apache Portable Runtime
 Name:          apr-util
 Version:       1.6.3
-Release:       1
+Release:       2
 Epoch:         1
 License:       Apache v2.0
 Group:         Libraries
 Epoch:         1
 License:       Apache v2.0
 Group:         Libraries
@@ -28,6 +28,7 @@ Source0:      http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
 Patch0:                %{name}-link.patch
 Patch1:                %{name}-config-noldap.patch
 Patch3:                %{name}-flags.patch
 Patch0:                %{name}-link.patch
 Patch1:                %{name}-config-noldap.patch
 Patch3:                %{name}-flags.patch
+Patch4:                mysql8.patch
 URL:           http://apr.apache.org/
 BuildRequires: apr-devel >= 1:1.6.0
 BuildRequires: autoconf >= 2.59
 URL:           http://apr.apache.org/
 BuildRequires: apr-devel >= 1:1.6.0
 BuildRequires: autoconf >= 2.59
@@ -35,7 +36,7 @@ BuildRequires:        db-devel >= 5.3
 BuildRequires: expat-devel
 %{?with_freetds:BuildRequires: freetds-devel}
 BuildRequires: libtool
 BuildRequires: expat-devel
 %{?with_freetds:BuildRequires: freetds-devel}
 BuildRequires: libtool
-%{?with_mysql:BuildRequires:   mysql-devel}
+%{?with_mysql:BuildRequires:   mysql-devel >= 8.0.35}
 %{?with_nss:BuildRequires:     nss-devel}
 %{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 %{?with_openssl:BuildRequires: openssl-devel}
 %{?with_nss:BuildRequires:     nss-devel}
 %{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 %{?with_openssl:BuildRequires: openssl-devel}
@@ -223,6 +224,7 @@ Statyczna biblioteka apr-util.
 %patch0 -p1
 %patch1 -p1
 %patch3 -p1
 %patch0 -p1
 %patch1 -p1
 %patch3 -p1
+%patch4 -p0
 
 echo '
 <Layout TLD>
 
 echo '
 <Layout TLD>
@@ -263,7 +265,7 @@ PYTHON=%{__python3} \
        %{?with_nss:--with-nss} \
        %{?with_openssl:--with-openssl} \
        %{!?with_freetds:--without-freetds} \
        %{?with_nss:--with-nss} \
        %{?with_openssl:--with-openssl} \
        %{!?with_freetds:--without-freetds} \
-       %{?with_mysql:--with-mysql=%{_prefix}} \
+       %{?with_mysql:--with-mysql} \
        %{!?with_odbc:--without-odbc} \
        %{?with_oracle:--with-oracle} \
        %{!?with_pgsql:--without-pgsql} \
        %{!?with_odbc:--without-odbc} \
        %{?with_oracle:--with-oracle} \
        %{!?with_pgsql:--without-pgsql} \
diff --git a/mysql8.patch b/mysql8.patch
new file mode 100644 (file)
index 0000000..d771e69
--- /dev/null
@@ -0,0 +1,27 @@
+https://bz.apache.org/bugzilla/show_bug.cgi?id=62631
+
+--- dbd/apr_dbd_mysql.c        2014-09-16 11:45:15.000000000 +0000
++++ dbd/apr_dbd_mysql.c        2018-08-11 20:25:13.202562000 +0000
+@@ -47,6 +47,13 @@ 
+ #include "apr_strings.h"
+ #include "apr_lib.h"
+ #include "apr_buckets.h"
++/* MySQL 8.0 replaces my_bool with C99 bool. Earlier versions of MySQL had
++* a typedef to char. Gem users reported failures on big endian systems when
++* using C99 bool types with older MySQLs due to mismatched behavior. */
++#ifndef HAVE_TYPE_MY_BOOL
++#include <stdbool.h>
++typedef bool my_bool;
++#endif
+ #include "apr_dbd_internal.h"
+@@ -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();