commit ad9296114cc0ff91ce47354566db1d4e00964c88
Author: Andrea Musuruane <musuruan(a)gmail.com>
Date: Tue Jun 21 09:29:31 2022 +0200
Fixed building on ppc64le
Fixed building on aarch64
desmume-0.9.13-aarch64.patch | 240 +++++++++++++++++++++++++++++++++++++++++++
desmume-0.9.13-arm.patch | 61 +++++++++++
desmume-0.9.13-ppc64le.patch | 26 +++++
desmume.spec | 13 ++-
4 files changed, 339 insertions(+), 1 deletion(-)
---
diff --git a/desmume-0.9.13-aarch64.patch b/desmume-0.9.13-aarch64.patch
new file mode 100644
index 0000000..4f736fc
--- /dev/null
+++ b/desmume-0.9.13-aarch64.patch
@@ -0,0 +1,240 @@
+From 24eb5ed95c6cbdaba8b3c63a99e95e899e8a5061 Mon Sep 17 00:00:00 2001
+From: rogerman <rogerman(a)users.noreply.github.com>
+Date: Sat, 18 Jun 2022 21:56:25 -0700
+Subject: [PATCH] Fix compiling on GCC for AArch64. Fixes #548.
+
+---
+ desmume/src/render3D.cpp | 2 +-
+ desmume/src/texcache.cpp | 16 +++---
+ .../colorspacehandler_NEON.cpp | 56 +++++++++----------
+ 3 files changed, 37 insertions(+), 37 deletions(-)
+
+diff --git a/desmume/src/render3D.cpp b/desmume/src/render3D.cpp
+index abc3b9243..26d5ca94d 100644
+--- a/desmume/src/render3D.cpp
++++ b/desmume/src/render3D.cpp
+@@ -899,7 +899,7 @@ void Render3D_NEON::_ClearImageBaseLoop(const u16 *__restrict
inColor16, const u
+ vst1q_u32_x4(outDepth24 + i, calcDepth);
+
+ // Write the fog flags to the fog flag buffer.
+- vst1q_u8( outFog + i, vuzp1q_u16(vshrq_n_u16(clearDepth.val[0], 15),
vshrq_n_u16(clearDepth.val[1], 15)) );
++ vst1q_u8( outFog + i, vreinterpretq_u8_u16( vuzp1q_u16(vshrq_n_u16(clearDepth.val[0],
15), vshrq_n_u16(clearDepth.val[1], 15)) ) );
+ }
+ }
+
+diff --git a/desmume/src/texcache.cpp b/desmume/src/texcache.cpp
+index 58ce81735..6d2b50757 100644
+--- a/desmume/src/texcache.cpp
++++ b/desmume/src/texcache.cpp
+@@ -1429,8 +1429,8 @@ void __NDSTextureUnpackA3I5_NEON(const size_t texelCount, const u8
*__restrict s
+ const v128u16 palColor1 = vreinterpretq_u16_u8( vqtbl4q_u8(pal16_LUT, idx1) );
+
+ const v128u8 alpha = vqtbl1q_u8( alpha_LUT, vshrq_n_u8(bits, 5) );
+- const v128u16 alphaLo = vzip1q_u8(vdupq_n_u8(0), alpha);
+- const v128u16 alphaHi = vzip2q_u8(vdupq_n_u8(0), alpha);
++ const v128u16 alphaLo = vreinterpretq_u16_u8( vzip1q_u8(vdupq_n_u8(0), alpha) );
++ const v128u16 alphaHi = vreinterpretq_u16_u8( vzip2q_u8(vdupq_n_u8(0), alpha) );
+
+ if (TEXCACHEFORMAT == TexFormat_15bpp)
+ {
+@@ -1658,8 +1658,8 @@ void __NDSTextureUnpackA5I3_NEON(const size_t texelCount, const u8
*__restrict s
+ if (TEXCACHEFORMAT == TexFormat_15bpp)
+ {
+ const v128u8 alpha = vshrq_n_u8(bits, 3);
+- const v128u16 alphaLo = vzip1q_u8(vdupq_n_u8(0), alpha);
+- const v128u16 alphaHi = vzip2q_u8(vdupq_n_u8(0), alpha);
++ const v128u16 alphaLo = vreinterpretq_u16_u8( vzip1q_u8(vdupq_n_u8(0), alpha) );
++ const v128u16 alphaHi = vreinterpretq_u16_u8( vzip2q_u8(vdupq_n_u8(0), alpha) );
+
+ ColorspaceConvert555To6665_NEON<false>(palColor0, alphaLo,
convertedColor.val[0], convertedColor.val[1]);
+ ColorspaceConvert555To6665_NEON<false>(palColor1, alphaHi,
convertedColor.val[2], convertedColor.val[3]);
+@@ -1667,8 +1667,8 @@ void __NDSTextureUnpackA5I3_NEON(const size_t texelCount, const u8
*__restrict s
+ else
+ {
+ const v128u8 alpha = vqtbl2q_u8( alpha8_LUT, vshrq_n_u8(bits, 3) );
+- const v128u16 alphaLo = vzip1q_u8(vdupq_n_u8(0), alpha);
+- const v128u16 alphaHi = vzip2q_u8(vdupq_n_u8(0), alpha);
++ const v128u16 alphaLo = vreinterpretq_u16_u8( vzip1q_u8(vdupq_n_u8(0), alpha) );
++ const v128u16 alphaHi = vreinterpretq_u16_u8( vzip2q_u8(vdupq_n_u8(0), alpha) );
+
+ ColorspaceConvert555To8888_NEON<false>(palColor0, alphaLo,
convertedColor.val[0], convertedColor.val[1]);
+ ColorspaceConvert555To8888_NEON<false>(palColor1, alphaHi,
convertedColor.val[2], convertedColor.val[3]);
+@@ -1967,8 +1967,8 @@ void __NDSTextureUnpackDirect16Bit_NEON(const size_t texelCount,
const u16 *__re
+ }
+
+ const v128u16 alpha = vceqq_u16(vshrq_n_u16(c,15), vdupq_n_u16(1));
+- convertedColor.val[0] = vandq_u16( convertedColor.val[0], vzip1q_u16(alpha, alpha) );
+- convertedColor.val[1] = vandq_u16( convertedColor.val[1], vzip2q_u16(alpha, alpha) );
++ convertedColor.val[0] = vandq_u32( convertedColor.val[0],
vreinterpretq_u32_u16(vzip1q_u16(alpha, alpha)) );
++ convertedColor.val[1] = vandq_u32( convertedColor.val[1],
vreinterpretq_u32_u16(vzip2q_u16(alpha, alpha)) );
+
+ vst1q_u32_x2(dstBuffer, convertedColor);
+ }
+diff --git a/desmume/src/utils/colorspacehandler/colorspacehandler_NEON.cpp
b/desmume/src/utils/colorspacehandler/colorspacehandler_NEON.cpp
+index b6b95edb4..81ad657ab 100644
+--- a/desmume/src/utils/colorspacehandler/colorspacehandler_NEON.cpp
++++ b/desmume/src/utils/colorspacehandler/colorspacehandler_NEON.cpp
+@@ -25,7 +25,7 @@
+
+ #define COLOR16_SWAPRB_NEON(src) vorrq_u16(
vshlq_n_u16(vandq_u16(src,vdupq_n_u16(0x001F)),10), vorrq_u16(
vandq_u16(src,vdupq_n_u16(0x03E0)),
vorrq_u16(vshrq_n_u16(vandq_u16(src,vdupq_n_u16(0x7C00)),10),
vandq_u16(src,vdupq_n_u16(0x8000))) ) )
+
+-#define COLOR32_SWAPRB_NEON(src) vqtbl1q_u8( (src), ((v128u8){2,1,0,3, 6,5,4,7,
10,9,8,11, 14,13,12,15}) )
++#define COLOR32_SWAPRB_NEON(src) vreinterpretq_u32_u8(
vqtbl1q_u8(vreinterpretq_u8_u32(src), ((v128u8){2,1,0,3, 6,5,4,7, 10,9,8,11,
14,13,12,15})) )
+
+ template <bool SWAP_RB>
+ FORCEINLINE void ColorspaceConvert555To8888_NEON(const v128u16 &srcColor, const
v128u16 &srcAlphaBits, v128u32 &dstLo, v128u32 &dstHi)
+@@ -42,8 +42,8 @@ FORCEINLINE void ColorspaceConvert555To8888_NEON(const v128u16
&srcColor, const
+ ga = vorrq_u16(ga, vshrq_n_u16(ga, 5));
+ ga = vorrq_u16(ga, srcAlphaBits);
+
+- dstLo = vzip1q_u8(rb, ga);
+- dstHi = vzip2q_u8(rb, ga);
++ dstLo = vreinterpretq_u32_u8( vzip1q_u8(vreinterpretq_u8_u16(rb),
vreinterpretq_u8_u16(ga)) );
++ dstHi = vreinterpretq_u32_u8( vzip2q_u8(vreinterpretq_u8_u16(rb),
vreinterpretq_u8_u16(ga)) );
+ }
+ else
+ {
+@@ -54,8 +54,8 @@ FORCEINLINE void ColorspaceConvert555To8888_NEON(const v128u16
&srcColor, const
+ ba = vorrq_u16( ba, vreinterpretq_u16_u8(vshrq_n_u8(vreinterpretq_u8_u16(ba), 5)) );
+ ba = vorrq_u16( ba, srcAlphaBits );
+
+- dstLo = vzip1q_u16(rg, ba);
+- dstHi = vzip2q_u16(rg, ba);
++ dstLo = vreinterpretq_u32_u16( vzip1q_u16(rg, ba) );
++ dstHi = vreinterpretq_u32_u16( vzip2q_u16(rg, ba) );
+ }
+ }
+
+@@ -73,8 +73,8 @@ FORCEINLINE void ColorspaceConvert555XTo888X_NEON(const v128u16
&srcColor, v128u
+ v128u16 g = vandq_u16(vshrq_n_u16(srcColor, 2), vdupq_n_u16(0x00F8) );
+ g = vorrq_u16(g, vshrq_n_u16(g, 5));
+
+- dstLo = vzip1q_u8(rb, g);
+- dstHi = vzip2q_u8(rb, g);
++ dstLo = vreinterpretq_u32_u8( vzip1q_u8(vreinterpretq_u8_u16(rb),
vreinterpretq_u8_u16(g)) );
++ dstHi = vreinterpretq_u32_u8( vzip2q_u8(vreinterpretq_u8_u16(rb),
vreinterpretq_u8_u16(g)) );
+ }
+ else
+ {
+@@ -84,8 +84,8 @@ FORCEINLINE void ColorspaceConvert555XTo888X_NEON(const v128u16
&srcColor, v128u
+ rg = vorrq_u16( rg, vreinterpretq_u16_u8(vshrq_n_u8(vreinterpretq_u8_u16(rg), 5)) );
+ b = vorrq_u16( b, vreinterpretq_u16_u8(vshrq_n_u8(vreinterpretq_u8_u16( b), 5)) );
+
+- dstLo = vzip1q_u16(rg, b);
+- dstHi = vzip2q_u16(rg, b);
++ dstLo = vreinterpretq_u32_u16( vzip1q_u16(rg, b) );
++ dstHi = vreinterpretq_u32_u16( vzip2q_u16(rg, b) );
+ }
+ }
+
+@@ -104,8 +104,8 @@ FORCEINLINE void ColorspaceConvert555To6665_NEON(const v128u16
&srcColor, const
+ ga = vorrq_u16(ga, vshrq_n_u16(ga, 5));
+ ga = vorrq_u16(ga, srcAlphaBits);
+
+- dstLo = vzip1q_u8(rb, ga);
+- dstHi = vzip2q_u8(rb, ga);
++ dstLo = vreinterpretq_u32_u8( vzip1q_u8(vreinterpretq_u8_u16(rb),
vreinterpretq_u8_u16(ga)) );
++ dstHi = vreinterpretq_u32_u8( vzip2q_u8(vreinterpretq_u8_u16(rb),
vreinterpretq_u8_u16(ga)) );
+ }
+ else
+ {
+@@ -116,8 +116,8 @@ FORCEINLINE void ColorspaceConvert555To6665_NEON(const v128u16
&srcColor, const
+ ba = vorrq_u16( ba, vreinterpretq_u16_u8(vshrq_n_u8(vreinterpretq_u8_u16(ba), 5)) );
+ ba = vorrq_u16( ba, srcAlphaBits );
+
+- dstLo = vzip1q_u16(rg, ba);
+- dstHi = vzip2q_u16(rg, ba);
++ dstLo = vreinterpretq_u32_u16( vzip1q_u16(rg, ba) );
++ dstHi = vreinterpretq_u32_u16( vzip2q_u16(rg, ba) );
+ }
+ }
+
+@@ -135,8 +135,8 @@ FORCEINLINE void ColorspaceConvert555XTo666X_NEON(const v128u16
&srcColor, v128u
+ v128u16 g = vandq_u16(vshrq_n_u16(srcColor, 4), vdupq_n_u16(0x003E) );
+ g = vorrq_u16(g, vshrq_n_u16(g, 5));
+
+- dstLo = vzip1q_u8(rb, g);
+- dstHi = vzip2q_u8(rb, g);
++ dstLo = vreinterpretq_u32_u8( vzip1q_u8(vreinterpretq_u8_u16(rb),
vreinterpretq_u8_u16(g)) );
++ dstHi = vreinterpretq_u32_u8( vzip2q_u8(vreinterpretq_u8_u16(rb),
vreinterpretq_u8_u16(g)) );
+ }
+ else
+ {
+@@ -146,8 +146,8 @@ FORCEINLINE void ColorspaceConvert555XTo666X_NEON(const v128u16
&srcColor, v128u
+ rg = vorrq_u16( rg, vreinterpretq_u16_u8(vshrq_n_u8(vreinterpretq_u8_u16(rg), 5)) );
+ b = vorrq_u16( b, vreinterpretq_u16_u8(vshrq_n_u8(vreinterpretq_u8_u16( b), 5)) );
+
+- dstLo = vzip1q_u16(rg, b);
+- dstHi = vzip2q_u16(rg, b);
++ dstLo = vreinterpretq_u32_u16( vzip1q_u16(rg, b) );
++ dstHi = vreinterpretq_u32_u16( vzip2q_u16(rg, b) );
+ }
+ }
+
+@@ -171,14 +171,14 @@ FORCEINLINE v128u32 ColorspaceConvert8888To6665_NEON(const v128u32
&src)
+ // Conversion algorithm:
+ // RGB 8-bit to 6-bit formula: dstRGB6 = (srcRGB8 >> 2)
+ // Alpha 8-bit to 6-bit formula: dstA5 = (srcA8 >> 3)
+- v128u8 rgba = vshlq_u8(vreinterpretq_u8_u32(src), ((v128s8){-2,-2,-2,-3, -2,-2,-2,-3,
-2,-2,-2,-3, -2,-2,-2,-3}));
++ v128u32 rgba = vreinterpretq_u32_u8( vshlq_u8(vreinterpretq_u8_u32(src),
((v128s8){-2,-2,-2,-3, -2,-2,-2,-3, -2,-2,-2,-3, -2,-2,-2,-3})) );
+
+ if (SWAP_RB)
+ {
+- rgba = COLOR32_SWAPRB_NEON(rgba);
++ return COLOR32_SWAPRB_NEON(rgba);
+ }
+
+- return vreinterpretq_u32_u8(rgba);
++ return rgba;
+ }
+
+ template <bool SWAP_RB>
+@@ -187,14 +187,14 @@ FORCEINLINE v128u32 ColorspaceConvert6665To8888_NEON(const v128u32
&src)
+ // Conversion algorithm:
+ // RGB 6-bit to 8-bit formula: dstRGB8 = (srcRGB6 << 2) | ((srcRGB6 >>
4) & 0x03)
+ // Alpha 5-bit to 8-bit formula: dstA8 = (srcA5 << 3) | ((srcA5 >>
2) & 0x07)
+- v128u8 rgba = vorrq_u8( vshlq_u8(vreinterpretq_u8_u32(src), ((v128s8){2,2,2,3,
2,2,2,3, 2,2,2,3, 2,2,2,3})), vshlq_u8(vreinterpretq_u8_u32(src), ((v128s8){-4,-4,-4,-2,
-4,-4,-4,-2, -4,-4,-4,-2, -4,-4,-4,-2})) );
++ v128u32 rgba = vreinterpretq_u32_u8( vorrq_u8( vshlq_u8(vreinterpretq_u8_u32(src),
((v128s8){2,2,2,3, 2,2,2,3, 2,2,2,3, 2,2,2,3})), vshlq_u8(vreinterpretq_u8_u32(src),
((v128s8){-4,-4,-4,-2, -4,-4,-4,-2, -4,-4,-4,-2, -4,-4,-4,-2})) ) );
+
+ if (SWAP_RB)
+ {
+- rgba = COLOR32_SWAPRB_NEON(rgba);
++ return COLOR32_SWAPRB_NEON(rgba);
+ }
+
+- return vreinterpretq_u32_u8(rgba);
++ return rgba;
+ }
+
+ template <NDSColorFormat COLORFORMAT, bool SWAP_RB>
+@@ -202,7 +202,7 @@ FORCEINLINE v128u16 _ConvertColorBaseTo5551_NEON(const v128u32
&srcLo, const v12
+ {
+ if (COLORFORMAT == NDSColorFormat_BGR555_Rev)
+ {
+- return srcLo;
++ return vreinterpretq_u16_u32(srcLo);
+ }
+
+ v128u32 rgbLo;
+@@ -518,9 +518,9 @@ size_t ColorspaceConvertBuffer555XTo888_NEON(const u16 *__restrict
src, u8 *__re
+
+ dstVec.val[1] = vandq_u8( vuzp1q_u8( vreinterpretq_u8_u16(vshrq_n_u16(srcVec.val[0],
2)), vreinterpretq_u8_u16(vshrq_n_u16(srcVec.val[1], 2)) ), vdupq_n_u8(0xF8) );
+
+- dstVec.val[0] = vorrq_u8(dstVec.val[0], vshrq_n_u32(dstVec.val[0], 5));
+- dstVec.val[1] = vorrq_u8(dstVec.val[1], vshrq_n_u32(dstVec.val[1], 5));
+- dstVec.val[2] = vorrq_u8(dstVec.val[2], vshrq_n_u32(dstVec.val[2], 5));
++ dstVec.val[0] = vorrq_u8(dstVec.val[0], vshrq_n_u8(dstVec.val[0], 5));
++ dstVec.val[1] = vorrq_u8(dstVec.val[1], vshrq_n_u8(dstVec.val[1], 5));
++ dstVec.val[2] = vorrq_u8(dstVec.val[2], vshrq_n_u8(dstVec.val[2], 5));
+
+ vst3q_u8(dst+(i*3), dstVec);
+ }
+@@ -646,7 +646,7 @@ size_t ColorspaceApplyIntensityToBuffer16_NEON(u16 *dst, size_t
pixCountVec128,
+ g = vshlq_n_u16( vuzp2q_u16( vreinterpretq_u16_u32(vmull_u16(vget_low_u16(g),
intensityVec)), vreinterpretq_u16_u32(vmull_u16(vget_high_u16(g), intensityVec)) ), 5 );
+ b = vshlq_n_u16( vuzp2q_u16( vreinterpretq_u16_u32(vmull_u16(vget_low_u16(b),
intensityVec)), vreinterpretq_u16_u32(vmull_u16(vget_high_u16(b), intensityVec)) ), 10 );
+
+- tempDst = vorrq_u32( vorrq_u32( vorrq_u32(r, g), b), a);
++ tempDst = vorrq_u16( vorrq_u16( vorrq_u16(r, g), b), a);
+
+ vst1q_u16(dst+i, tempDst);
+ }
diff --git a/desmume-0.9.13-arm.patch b/desmume-0.9.13-arm.patch
new file mode 100644
index 0000000..5f8f521
--- /dev/null
+++ b/desmume-0.9.13-arm.patch
@@ -0,0 +1,61 @@
+From d4afd4977ce8b7ba6293946c74914afe79536059 Mon Sep 17 00:00:00 2001
+From: rogerman <rogerman(a)users.noreply.github.com>
+Date: Mon, 20 Jun 2022 11:22:26 -0700
+Subject: [PATCH] libretro-common: Compiling tune-up for ARM architectures. -
+ Fixes a mismatched register warning in arm_enable_runfast_mode() when
+ compiling for AArch64. - Fix compiling check_arm_cpu_feature() on non-ARM
+ architectures by being super explicit and pedantic about checking for
+ __ARM_ARCH; none of this compiler-assumes-a-macro-equals-zero-if-undefined
+ stuff.
+
+---
+ desmume/src/libretro-common/features/features_cpu.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/desmume/src/libretro-common/features/features_cpu.c
b/desmume/src/libretro-common/features/features_cpu.c
+index 0980821f9..2c41d5732 100644
+--- a/desmume/src/libretro-common/features/features_cpu.c
++++ b/desmume/src/libretro-common/features/features_cpu.c
+@@ -300,10 +300,17 @@ static void arm_enable_runfast_mode(void)
+ static const unsigned y = 0x03000000;
+ int r;
+ __asm__ volatile(
++#if defined(__aarch64__) || defined(_M_ARM64)
++ "fmrx %w0, fpscr \n\t" /* w0 = FPSCR */
++ "and %w0, %w0, %w1 \n\t" /* w0 = w0 & 0x04086060 */
++ "orr %w0, %w0, %w2 \n\t" /* w0 = w0 | 0x03000000 */
++ "fmxr fpscr, %w0 \n\t" /* FPSCR = w0 */
++#else
+ "fmrx %0, fpscr \n\t" /* r0 = FPSCR */
+ "and %0, %0, %1 \n\t" /* r0 = r0 & 0x04086060 */
+ "orr %0, %0, %2 \n\t" /* r0 = r0 | 0x03000000 */
+ "fmxr fpscr, %0 \n\t" /* FPSCR = r0 */
++#endif
+ : "=r"(r)
+ : "r"(x), "r"(y)
+ );
+@@ -311,13 +318,13 @@ static void arm_enable_runfast_mode(void)
+ #endif
+
+ #if defined(__linux__) && !defined(CPU_X86)
+-#if __ARM_ARCH
++#if defined(__ARM_ARCH) && (__ARM_ARCH > 0)
+ #include <sys/auxv.h>
+ #endif
+
+ static unsigned char check_arm_cpu_feature(const char* feature)
+ {
+-#if __ARM_ARCH < 8
++#if defined(__ARM_ARCH) && (__ARM_ARCH < 8)
+ uint64_t hwcap = getauxval(AT_HWCAP);
+ if (!strcmp(feature, "neon"))
+ return (hwcap & HWCAP_ARM_NEON) != 0;
+@@ -326,7 +333,7 @@ static unsigned char check_arm_cpu_feature(const char* feature)
+ if (!strcmp(feature, "vfpv4"))
+ return (hwcap & HWCAP_ARM_VFPv4) != 0;
+ return 0;
+-#elif __ARM_ARCH == 8
++#elif defined(__ARM_ARCH) && (__ARM_ARCH == 8)
+ uint64_t hwcap = getauxval(AT_HWCAP);
+ if (!strcmp(feature, "asimd"))
+ return (hwcap & HWCAP_ASIMD) != 0;
diff --git a/desmume-0.9.13-ppc64le.patch b/desmume-0.9.13-ppc64le.patch
new file mode 100644
index 0000000..7d507b7
--- /dev/null
+++ b/desmume-0.9.13-ppc64le.patch
@@ -0,0 +1,26 @@
+From a95e4c57c61b791fdcb17922735f8681af201b03 Mon Sep 17 00:00:00 2001
+From: rogerman <rogerman(a)users.noreply.github.com>
+Date: Sun, 19 Jun 2022 20:36:50 -0700
+Subject: [PATCH] Remove AltiVec compiling for ppcle and ppc64le architectures,
+ since our AltiVec code only works on big-endian systems anyways. Fixes #550.
+
+---
+ desmume/src/types.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/desmume/src/types.h b/desmume/src/types.h
+index 0fe31b347..5d5ac50af 100644
+--- a/desmume/src/types.h
++++ b/desmume/src/types.h
+@@ -53,7 +53,10 @@
+ #endif
+
+ #ifdef __GNUC__
+- #ifdef __ALTIVEC__
++// Our AltiVec code assumes that its being run on a big-endian system. While
++// the ppcle and ppc64le architectures do exist, our AltiVec code does not
++// support little-endian right now.
++ #if defined(__ALTIVEC__) && defined(MSB_FIRST) && (MSB_FIRST > 0)
+ #define ENABLE_ALTIVEC
+ #endif
+
diff --git a/desmume.spec b/desmume.spec
index 6e62519..595bb51 100644
--- a/desmume.spec
+++ b/desmume.spec
@@ -2,7 +2,7 @@
Name: desmume
Version: 0.9.13
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A Nintendo DS emulator
License: GPLv2+
@@ -12,6 +12,13 @@ Source0:
https://github.com/TASEmulators/desmume/archive/release_%{pkgversion}/%
Patch0: %{name}-0.9.13-formatstring.patch
# Use system tinyxml instead of the embedded copy
Patch1: %{name}-0.9.13-tinyxml.patch
+# Fix building on aarch64
+#
https://github.com/TASEmulators/desmume/issues/551
+Patch2: %{name}-0.9.13-aarch64.patch
+#Fix building on ppc64le
+#
https://github.com/TASEmulators/desmume/issues/550
+Patch3: %{name}-0.9.13-ppc64le.patch
+Patch4: %{name}-0.9.13-arm.patch
BuildRequires: gcc-c++
BuildRequires: meson
@@ -111,6 +118,10 @@ appstream-util validate-relax --nonet \
%changelog
+* Mon Jun 20 2022 Andrea Musuruane <musuruan(a)gmail.com> - 0.9.13-2
+- Fixed building on ppc64le
+- Fixed building on aarch64
+
* Sat Jun 18 2022 Andrea Musuruane <musuruan(a)gmail.com> - 0.9.13-1
- Updated to upstream version 0.9.13
- Spec file clean up