git: bbc7f225adae - main - databases/mysql80-server: Fix build

From: Jochen Neumeister <joneum_at_FreeBSD.org>
Date: Fri, 01 Dec 2023 05:45:39 UTC
The branch main has been updated by joneum:

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

commit bbc7f225adae1c20fa9a4d3e28e544eb51730075
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2023-12-01 05:42:15 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2023-12-01 05:45:32 +0000

    databases/mysql80-server: Fix build
    
    Fix aarch64 (1) and i386 (2) build
    
    Reported by:    fluffy (1)
    PR:     274918 (2) Martin Birgmeier <d8zNeCFG@aon.at>
    
    Sponsored by:   Netzkommune GmbH
---
 databases/mysql80-server/Makefile                    |  5 +++++
 ...st-boost_1_77_0-boost-move-detail-type_traits.hpp | 20 ++++++++++++++++++++
 .../files/patch-storage_innobase_include_ut0crc32.h  | 12 ++++++++++++
 3 files changed, 37 insertions(+)

diff --git a/databases/mysql80-server/Makefile b/databases/mysql80-server/Makefile
index 999ce104ac0a..4fddf2f98986 100644
--- a/databases/mysql80-server/Makefile
+++ b/databases/mysql80-server/Makefile
@@ -203,6 +203,11 @@ post-extract:
 EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-scripts_CMakeLists.txt
 .endif
 
+# XXX MBi alignment issue
+.if ${ARCH} == i386
+EXTRA_PATCHES+=	files/extra-patch-boost-boost_1_77_0-boost-move-detail-type_traits.hpp
+.endif
+
 .if !defined(CLIENT_ONLY)
 post-install:
 	${MKDIR} ${STAGEDIR}${ETCDIR}
diff --git a/databases/mysql80-server/files/extra-patch-boost-boost_1_77_0-boost-move-detail-type_traits.hpp b/databases/mysql80-server/files/extra-patch-boost-boost_1_77_0-boost-move-detail-type_traits.hpp
new file mode 100644
index 000000000000..6365179f2bc4
--- /dev/null
+++ b/databases/mysql80-server/files/extra-patch-boost-boost_1_77_0-boost-move-detail-type_traits.hpp
@@ -0,0 +1,20 @@
+--- ./boost/boost_1_77_0/boost/move/detail/type_traits.hpp.ORIG	2021-08-05 11:42:11.000000000 +0200
++++ ./boost/boost_1_77_0/boost/move/detail/type_traits.hpp	2023-11-04 13:09:44.198320000 +0100
+@@ -1104,7 +1104,7 @@
+ typedef int (alignment_dummy::*member_ptr);
+ typedef int (alignment_dummy::*member_function_ptr)();
+ struct alignment_struct
+-{  long double dummy[4];  };
++{  double XXXdummy[4];  };
+ 
+ /////////////////////////////
+ //    max_align_t
+@@ -1122,7 +1122,7 @@
+    float       float_;
+    double      double_;
+    void *      void_ptr_;
+-   long double long_double_[4];
++   double XXXlong_double_[4];
+    alignment_dummy *unknown_class_ptr_;
+    function_ptr function_ptr_;
+    member_function_ptr member_function_ptr_;
diff --git a/databases/mysql80-server/files/patch-storage_innobase_include_ut0crc32.h b/databases/mysql80-server/files/patch-storage_innobase_include_ut0crc32.h
new file mode 100644
index 000000000000..8ecb999b0221
--- /dev/null
+++ b/databases/mysql80-server/files/patch-storage_innobase_include_ut0crc32.h
@@ -0,0 +1,12 @@
+--- storage/innobase/include/ut0crc32.h.orig	2023-11-27 21:02:58.728994000 +0100
++++ storage/innobase/include/ut0crc32.h	2023-11-27 21:04:10.010362000 +0100
+@@ -132,7 +132,9 @@ CRC32_DEFAULT
+ #endif /* CRC32_ARM64 */
+ 
+ #ifdef CRC32_ARM64_DEFAULT
++#ifndef __FreeBSD__
+ #include <asm/hwcap.h>
++#endif /* __FreeBSD__ */
+ #include <sys/auxv.h>
+ #endif /* CRC32_ARM64_DEFAULT */
+