<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/b125cdeddd8aff6982bca2670fa06f85e64f0084">https://github.com/macports/macports-ports/commit/b125cdeddd8aff6982bca2670fa06f85e64f0084</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit b125cdeddd8aff6982bca2670fa06f85e64f0084
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Thu May 18 18:25:50 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> R-s2: new port
</span>---
R/R-s2/Portfile | 38 +++++++
R/R-s2/files/0001-Misc-PPC-additions.patch | 123 +++++++++++++++++++++
.../0002-examine_stack.cc-fix-ppc-for-macOS.patch | 29 +++++
R/R-s2/files/0003-Some-PPC-fix-ups.patch | 61 ++++++++++
R/R-s2/files/0004-patch-fix-bool-error.diff | 18 +++
R/R-s2/files/0005-patch-libatomic.diff | 9 ++
6 files changed, 278 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-s2/Portfile b/R/R-s2/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..24453b5eeb7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-s2/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,38 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup openssl 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup R 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Revert to GitHub once updated there.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+R.setup cran r-spatial s2 1.1.4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories-append math
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license Apache-2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Spherical geometry operators using the S2 geometry library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description {*}${description}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://r-spatial.github.io/s2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 259f9a63a30264b177406580c8e33a078883904d \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 be0b4925eaade52cf85b1cb6e851430bd4fe6ca30722dffcc3f9107e7a4e404c \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 2375830
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib-append port:R-Rcpp \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:R-wk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patch.pre_args -p1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles 0001-Misc-PPC-additions.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0002-examine_stack.cc-fix-ppc-for-macOS.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0003-Some-PPC-fix-ups.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0004-patch-fix-bool-error.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[string match *gcc* ${configure.compiler}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 0005-patch-libatomic.diff
</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;'>+depends_test-append port:R-bit64 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:R-testthat \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:R-vctrs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.run yes
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-s2/files/0001-Misc-PPC-additions.patch b/R/R-s2/files/0001-Misc-PPC-additions.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..41563038ed5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-s2/files/0001-Misc-PPC-additions.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,123 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 4e52fcf87574e53998451a3ead1be5d5a385192f Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Thu, 27 Apr 2023 22:13:13 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 1/3] Misc PPC additions
</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;'>+ src/absl/base/internal/direct_mmap.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/absl/base/internal/unscaledcycleclock.cc | 10 ++++++----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/absl/base/internal/unscaledcycleclock.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/absl/debugging/internal/stack_consumption.cc | 4 ++--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/absl/debugging/internal/stack_consumption.h | 7 ++++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/absl/debugging/internal/stacktrace_config.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 6 files changed, 15 insertions(+), 12 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/base/internal/direct_mmap.h b/src/absl/base/internal/direct_mmap.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e492bb0..2244240 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/base/internal/direct_mmap.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/base/internal/direct_mmap.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -77,7 +77,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ defined(__m68k__) || defined(__sh__) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defined(__hppa__) && !defined(__LP64__)) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (defined(__PPC__) && !defined(__PPC64__)) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defined(__PPC__) && !defined(__PPC64__)) || defined(__ppc__) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defined(__riscv) && __riscv_xlen == 32) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defined(__s390__) && !defined(__s390x__)) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (defined(__sparc__) && !defined(__arch64__))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/base/internal/unscaledcycleclock.cc b/src/absl/base/internal/unscaledcycleclock.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b1c396c..db408c9 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/base/internal/unscaledcycleclock.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/base/internal/unscaledcycleclock.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -20,9 +20,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <intrin.h>
</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;'>+-#if defined(__powerpc__) || defined(__ppc__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __GLIBC__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <sys/platform/ppc.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <sys/platform/ppc.h> // There is no such a header in macOS. Do we need another?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__FreeBSD__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // clang-format off
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // This order does actually matter =(.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -58,13 +60,13 @@ double UnscaledCycleClock::Frequency() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return base_internal::NominalCPUFrequency();
</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;'>+-#elif defined(__powerpc__) || defined(__ppc__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int64_t UnscaledCycleClock::Now() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __GLIBC__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return __ppc_get_timebase();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __powerpc64__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __powerpc64__ || defined(__ppc64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int64_t tbr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ asm volatile("mfspr %0, 268" : "=r"(tbr));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return tbr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/base/internal/unscaledcycleclock.h b/src/absl/base/internal/unscaledcycleclock.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 2cbeae3..59ec151 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/base/internal/unscaledcycleclock.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/base/internal/unscaledcycleclock.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -46,7 +46,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // The following platforms have an implementation of a hardware counter.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || defined(__riscv) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/debugging/internal/stack_consumption.cc b/src/absl/debugging/internal/stack_consumption.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5134864..f8c3638 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/debugging/internal/stack_consumption.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/debugging/internal/stack_consumption.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -42,8 +42,8 @@ namespace {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // one of them is null, the results of p<q, p>q, p<=q, and p>=q are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // unspecified. Therefore, instead we hardcode the direction of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // stack on platforms we know about.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- defined(__aarch64__) || defined(__riscv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ defined(__ppc__) || defined(__ppc64__) || defined(__riscv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ constexpr bool kStackGrowsDown = true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #error Need to define kStackGrowsDown
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/debugging/internal/stack_consumption.h b/src/absl/debugging/internal/stack_consumption.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f41b64c..0f9d27b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/debugging/internal/stack_consumption.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/debugging/internal/stack_consumption.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -24,9 +24,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Use this feature test macro to detect its availability.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #error ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION cannot be set directly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#elif !defined(__APPLE__) && !defined(_WIN32) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- defined(__aarch64__) || defined(__riscv))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// Presumably macOS PPC should be excluded as well; no RISC V on Apple or Windows.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif (!defined(__APPLE__) && !defined(_WIN32) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defined(__i386__) || defined(__x86_64__) || defined(__aarch64__))) || \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (defined(__riscv) || defined(__ppc__) || defined(__ppc64__))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ namespace absl {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/debugging/internal/stacktrace_config.h b/src/absl/debugging/internal/stacktrace_config.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 3929b1b..606d5ff 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/debugging/internal/stacktrace_config.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/debugging/internal/stacktrace_config.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -60,7 +60,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__i386__) || defined(__x86_64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ABSL_STACKTRACE_INL_HEADER \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "absl/debugging/internal/stacktrace_x86-inl.inc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#elif defined(__ppc__) || defined(__PPC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__ppc__) || defined(__PPC__) || defined(__ppc64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ABSL_STACKTRACE_INL_HEADER \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "absl/debugging/internal/stacktrace_powerpc-inl.inc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__aarch64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.40.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-s2/files/0002-examine_stack.cc-fix-ppc-for-macOS.patch b/R/R-s2/files/0002-examine_stack.cc-fix-ppc-for-macOS.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..2305512d283
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-s2/files/0002-examine_stack.cc-fix-ppc-for-macOS.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,29 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 8a3d27e81dcc40c203a38fa3011e34d305c570c3 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Thu, 27 Apr 2023 22:15:02 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 2/3] examine_stack.cc: fix ppc for macOS
</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;'>+ src/absl/debugging/internal/examine_stack.cc | 6 ++++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 6 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/debugging/internal/examine_stack.cc b/src/absl/debugging/internal/examine_stack.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5bdd341..0ce7b2f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/debugging/internal/examine_stack.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/debugging/internal/examine_stack.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -223,6 +223,12 @@ void* GetProgramCounter(void* const vuc) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return reinterpret_cast<void*>(signal_ucontext->uc_mcontext->ss.rip);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__POWERPC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if __DARWIN_UNIX03
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return reinterpret_cast<void*>(signal_ucontext->uc_mcontext->__ss.__srr0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return reinterpret_cast<void*>(signal_ucontext->uc_mcontext->ss.srr0);
</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;'>+ #elif defined(__akaros__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+2.40.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-s2/files/0003-Some-PPC-fix-ups.patch b/R/R-s2/files/0003-Some-PPC-fix-ups.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..e1868320cd7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-s2/files/0003-Some-PPC-fix-ups.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,61 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 74c0653b4170d94ae52ff1eb69846b3c02a8d507 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Sergey Fedorov <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Thu, 27 Apr 2023 23:49:00 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH 3/3] Some PPC fix-ups
</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;'>+ src/absl/base/internal/unscaledcycleclock.cc | 5 ++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/absl/base/optimization.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/absl/debugging/internal/vdso_support.h | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/s2/util/bits/bits.h | 12 +++++++-----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 4 files changed, 11 insertions(+), 10 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/base/internal/unscaledcycleclock.cc b/src/absl/base/internal/unscaledcycleclock.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index db408c9..48a602f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/base/internal/unscaledcycleclock.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/base/internal/unscaledcycleclock.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -22,9 +22,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __GLIBC__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifndef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#include <sys/platform/ppc.h> // There is no such a header in macOS. Do we need another?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <sys/platform/ppc.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__FreeBSD__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // clang-format off
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // This order does actually matter =(.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -33,6 +31,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // clang-format on
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "absl/base/call_once.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// What about macOS?
</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;'>+diff --git a/src/absl/base/optimization.h b/src/absl/base/optimization.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index db5cc09..543383d 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/base/optimization.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/base/optimization.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -74,7 +74,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Cache line alignment
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(__i386__) || defined(__x86_64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ABSL_CACHELINE_SIZE 64
</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;'>+ #define ABSL_CACHELINE_SIZE 128
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__aarch64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // We would need to read special register ctr_el0 to find out L1 dcache size.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/src/absl/debugging/internal/vdso_support.h b/src/absl/debugging/internal/vdso_support.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 6562c6c..e112722 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/absl/debugging/internal/vdso_support.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/absl/debugging/internal/vdso_support.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -69,7 +69,7 @@ class VDSOSupport {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // depending on how the kernel is built. The kernel is normally built with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // STT_NOTYPE type VDSO symbols. Let's make things simpler first by using a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // compile-time constant.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __powerpc64__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__powerpc64__) || defined(__ppc64__) // Is this correct? How about ppc32?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ enum { kVDSOSymbolType = STT_NOTYPE };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ enum { kVDSOSymbolType = STT_FUNC };
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-s2/files/0004-patch-fix-bool-error.diff b/R/R-s2/files/0004-patch-fix-bool-error.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..edbd6b73d74
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-s2/files/0004-patch-fix-bool-error.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/s2/util/endian/endian.h.orig 2023-05-14 04:29:12.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/s2/util/endian/endian.h 2023-05-18 14:18:31.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -768,6 +768,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Load/Store for bool. Sanitizes bool on the way in for safety.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if !(defined(__MACH__) && defined(__ppc__))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ template<>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ inline bool LittleEndian::Load<bool>(const char* p) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static_assert(sizeof(bool) == 1, "Unexpected sizeof(bool)");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -791,6 +792,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static_assert(sizeof(bool) == 1, "Unexpected sizeof(bool)");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *p = value ? 1 : 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</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;'>+ // Load/Store for float.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/R/R-s2/files/0005-patch-libatomic.diff b/R/R-s2/files/0005-patch-libatomic.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..6d80ad3b7b0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/R/R-s2/files/0005-patch-libatomic.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/src/Makevars.in 2023-05-14 04:29:12.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/src/Makevars.in 2023-05-18 15:23:10.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,5 +1,5 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PKG_CPPFLAGS = -I../src -DSTRICT_R_HEADERS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-PKG_LIBS = @libs@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++PKG_LIBS = @libs@ -latomic
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PKG_CXXFLAGS = @cflags@ -pthread
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CXX_STD = CXX11
</span></pre><pre style='margin:0'>
</pre>