git: 416d29ce7d3a - main - games/retroarch: fix build on powerpc*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 12 Dec 2023 12:18:49 UTC
The branch main has been updated by pkubaj:

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

commit 416d29ce7d3abb52036d1808330dc5758081bf1c
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-12-12 02:58:55 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-12-12 12:12:36 +0000

    games/retroarch: fix build on powerpc*
    
    libretro-common/features/features_cpu.c:50:10: fatal error: 'ppu_intrinsics.h' file not found
             ^~~~~~~~~~~~~~~~~~
    1 error generated.
---
 .../patch-libretro-common_features_features__cpu.c   | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/games/retroarch/files/patch-libretro-common_features_features__cpu.c b/games/retroarch/files/patch-libretro-common_features_features__cpu.c
new file mode 100644
index 000000000000..c724722c8534
--- /dev/null
+++ b/games/retroarch/files/patch-libretro-common_features_features__cpu.c
@@ -0,0 +1,20 @@
+--- libretro-common/features/features_cpu.c.orig	2023-12-12 02:50:19.541552000 +0000
++++ libretro-common/features/features_cpu.c	2023-12-12 02:52:13.056521000 +0000
+@@ -45,7 +45,7 @@
+ 
+ #if defined(_XBOX360)
+ #include <PPCIntrinsics.h>
+-#elif !defined(__MACH__) && (defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) || defined(__PPC64__) || defined(__powerpc64__))
++#elif !defined(__MACH__) && !defined(__FreeBSD__) && (defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__) || defined(__PPC64__) || defined(__powerpc64__))
+ #ifndef _PPU_INTRINSICS_H
+ #include <ppu_intrinsics.h>
+ #endif
+@@ -181,7 +181,7 @@
+    time_ticks = (1000000 * tv_sec + tv_usec);
+ #elif defined(GEKKO)
+    time_ticks = gettime();
+-#elif !defined(__MACH__) && (defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__) || defined(__PSL1GHT__) || defined(__PPC64__) || defined(__powerpc64__))
++#elif !defined(__MACH__) && !defined(__FreeBSD__) && (defined(_XBOX360) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__) || defined(__PSL1GHT__) || defined(__PPC64__) || defined(__powerpc64__))
+    time_ticks = __mftb();
+ #elif (defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK > 0) || defined(__QNX__) || defined(ANDROID)
+    struct timespec tv;