<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/e7bc28279d9f5d7b0fa8e5abbcdd1d432e63c9a5">https://github.com/macports/macports-ports/commit/e7bc28279d9f5d7b0fa8e5abbcdd1d432e63c9a5</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit e7bc28279d9f5d7b0fa8e5abbcdd1d432e63c9a5
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Thu May 23 08:39:03 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> mariadb: fix build on powerpc
</span>---
databases/mariadb/Portfile | 10 ++-
databases/mariadb/files/patch-powerpc.diff | 97 ++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/databases/mariadb/Portfile b/databases/mariadb/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index d5f2c2dc772..0cf61ee10f5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/databases/mariadb/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/databases/mariadb/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -12,7 +12,6 @@ set version_branch [join [lrange [split ${version} .] 0 1] .]
</span> set revision_client 0
set revision_server 0
categories databases
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platforms darwin
</span> license GPL-2
maintainers {michaelld @michaelld} openmaintainer
homepage https://mariadb.org/
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -46,7 +45,8 @@ if {$subport eq $name} {
</span> patch.pre_args-replace -p0 -p1
patchfiles patch-cmake-install_layout.cmake.diff \
patch-CMakeLists.txt.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-mariadb-Ventura-and-arm64.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-mariadb-Ventura-and-arm64.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-powerpc.diff
</span>
checksums rmd160 c1df56d5c9ae118693e721aefb18fb19277bf5c0 \
sha256 23ff96db2215d3d2eb8697488719153c83ac4d131f504ae397f43c14c6d91ba3 \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -83,6 +83,12 @@ if {$subport eq $name} {
</span> ${worksrcpath}/cmake/libutils.cmake
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Consider installing them to enable more features from this software.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # C++11 enabled compiler <http://www.open-std.org/jtc1/sc22/wg21/>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # REQUIRED: You need a more modern compiler in order to build the Activity Manager daemon
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Moreover, a newer GCC is needed for atomics support.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler.cxx_standard 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> configure.args-delete \
-DCMAKE_INSTALL_NAME_DIR=${prefix}/lib
configure.args-append \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/databases/mariadb/files/patch-powerpc.diff b/databases/mariadb/files/patch-powerpc.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e2203a42e68
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/databases/mariadb/files/patch-powerpc.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,97 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/include/my_cpu.h 2020-05-06 18:54:21.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/include/my_cpu.h 2024-05-24 14:50:49.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,6 +34,19 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define HMT_medium_high() asm volatile("or 5,5,5")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* High priority */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define HMT_high() asm volatile("or 3,3,3")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__POWERPC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Very low priority */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HMT_very_low() asm volatile("or r31,r31,r31")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Low priority */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HMT_low() asm volatile("or r1,r1,r1")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Medium low priority */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HMT_medium_low() asm volatile("or r6,r6,r6")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Medium priority */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HMT_medium() asm volatile("or r2,r2,r2")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Medium high priority */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HMT_medium_high() asm volatile("or r5,r5,r5")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* High priority */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HMT_high() asm volatile("or r3,r3,r3")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define HMT_very_low()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define HMT_low()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/packaging/rpm-oel/my_config.h 2020-05-06 18:54:22.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/packaging/rpm-oel/my_config.h 2024-05-24 14:53:59.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -11,9 +11,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "my_config_i386.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__ia64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "my_config_ia64.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#elif defined(__powerpc__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__powerpc__) || defined(__ppc__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "my_config_ppc.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#elif defined(__powerpc64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__powerpc64__) || defined(__ppc64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "my_config_ppc64.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__s390x__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "my_config_s390x.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/storage/innobase/os/os0sync.c 2020-05-06 18:54:22.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/storage/innobase/os/os0sync.c 2024-05-24 14:56:58.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -900,7 +900,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LeaveCriticalSection(fast_mutex);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pthread_mutex_unlock(fast_mutex);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __powerpc__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__powerpc__) || defined(__POWERPC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_mb;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/storage/innobase/sync/sync0sync.c 2020-05-06 18:54:22.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/storage/innobase/sync/sync0sync.c 2024-05-24 14:57:41.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -594,7 +594,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mutex_set_waiters(mutex, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Make sure waiters store won't pass over mutex_test_and_set */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __powerpc__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__powerpc__) || defined(__POWERPC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_mb;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/storage/xtradb/include/os0sync.h 2020-05-06 18:54:23.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/storage/xtradb/include/os0sync.h 2024-05-24 14:58:17.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -345,7 +345,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /**********************************************************//**
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Returns the old value of *ptr, atomically sets *ptr to new_val */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if defined(__powerpc__) || defined(__aarch64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__powerpc__) || defined(__POWERPC__) || defined(__aarch64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_atomic_test_and_set_byte_release() should imply a release barrier before
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ setting, and a full barrier after. But __sync_lock_test_and_set() is only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/storage/xtradb/os/os0sync.c 2020-05-06 18:54:23.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/storage/xtradb/os/os0sync.c 2024-05-24 14:59:35.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -882,7 +882,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LeaveCriticalSection(fast_mutex);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pthread_mutex_unlock(fast_mutex);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __powerpc__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__powerpc__) || defined(__POWERPC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_mb;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/storage/xtradb/sync/sync0sync.c 2020-05-06 18:54:23.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/storage/xtradb/sync/sync0sync.c 2024-05-24 15:00:05.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -589,7 +589,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ mutex_set_waiters(mutex, 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Make sure waiters store won't pass over mutex_test_and_set */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __powerpc__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__powerpc__) || defined(__POWERPC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os_mb;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>