diff options
Diffstat (limited to 'audio/mac/files')
| -rw-r--r-- | audio/mac/files/patch-CMakeLists.txt | 2 | ||||
| -rw-r--r-- | audio/mac/files/patch-Shared_All.h | 14 | ||||
| -rw-r--r-- | audio/mac/files/patch-Source_Console_Console.cpp | 6 | ||||
| -rw-r--r-- | audio/mac/files/patch-Source_Shared_All.h | 27 | ||||
| -rw-r--r-- | audio/mac/files/patch-Source_Shared_CPUFeatures.cpp | 26 |
5 files changed, 70 insertions, 5 deletions
diff --git a/audio/mac/files/patch-CMakeLists.txt b/audio/mac/files/patch-CMakeLists.txt index 405846035bfc..66e6a2e3e99d 100644 --- a/audio/mac/files/patch-CMakeLists.txt +++ b/audio/mac/files/patch-CMakeLists.txt @@ -1,7 +1,7 @@ Version 11.00 added multi-threading support, but we need to link to -lpthread to resolve symbols. ---- CMakeLists.txt.orig 2025-04-25 04:13:46 UTC +--- CMakeLists.txt.orig 2025-09-05 10:46:54 UTC +++ CMakeLists.txt @@ -6,6 +6,8 @@ option(BUILD_UTIL "Build the mac command line tool" ON option(BUILD_SHARED "Build libMAC as a shared library" ON) diff --git a/audio/mac/files/patch-Shared_All.h b/audio/mac/files/patch-Shared_All.h index 03e25dc1defc..10b574e7d180 100644 --- a/audio/mac/files/patch-Shared_All.h +++ b/audio/mac/files/patch-Shared_All.h @@ -1,6 +1,9 @@ We need to define PLATFORM_LINUX as the default if consumers don't do so. ---- Shared/All.h.orig 2025-02-07 08:39:49 UTC +Fix runtime for little endian archs. At least on amd64, _BIG_ENDIAN is defined +somewhere in the toolchain, causing the byte order to be reversed. + +--- Shared/All.h.orig 2025-10-15 08:20:58 UTC +++ Shared/All.h @@ -10,8 +10,8 @@ PLATFORM_ANDROID PLATFORM_ANDROID @@ -13,3 +16,12 @@ We need to define PLATFORM_LINUX as the default if consumers don't do so. #endif #ifdef PLATFORM_ANDROID +@@ -311,7 +311,7 @@ Byte order + #define APE_LITTLE_ENDIAN 1234 + #define APE_BIG_ENDIAN 4321 + +-#if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) ++#if defined(__BIG_ENDIAN__) || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) + #define APE_BYTE_ORDER APE_BIG_ENDIAN + #else + #define APE_BYTE_ORDER APE_LITTLE_ENDIAN diff --git a/audio/mac/files/patch-Source_Console_Console.cpp b/audio/mac/files/patch-Source_Console_Console.cpp index 72ce55e11dc4..0033ecb30d5a 100644 --- a/audio/mac/files/patch-Source_Console_Console.cpp +++ b/audio/mac/files/patch-Source_Console_Console.cpp @@ -1,8 +1,8 @@ Unixify built-in help. ---- Source/Console/Console.cpp.orig 2025-05-07 22:12:54 UTC +--- Source/Console/Console.cpp.orig 2025-08-15 06:11:17 UTC +++ Source/Console/Console.cpp -@@ -136,7 +136,7 @@ static void DisplayProperUsage(FILE * pFile) +@@ -135,7 +135,7 @@ static void DisplayProperUsage(FILE * pFile) **************************************************************************************************/ static void DisplayProperUsage(FILE * pFile) { @@ -11,7 +11,7 @@ Unixify built-in help. fwprintf(pFile, L"Modes:\n"); fwprintf(pFile, L" Compress (fast): '-c1000'\n"); -@@ -156,18 +156,18 @@ static void DisplayProperUsage(FILE * pFile) +@@ -155,18 +155,18 @@ static void DisplayProperUsage(FILE * pFile) fwprintf(pFile, L" Set the number of threads when compressing or decompressing: -threads=#'\n\n"); fwprintf(pFile, L"Examples:\n"); diff --git a/audio/mac/files/patch-Source_Shared_All.h b/audio/mac/files/patch-Source_Shared_All.h new file mode 100644 index 000000000000..d7748cd159f8 --- /dev/null +++ b/audio/mac/files/patch-Source_Shared_All.h @@ -0,0 +1,27 @@ +We need to define PLATFORM_LINUX as the default if consumers don't do so. + +Fix runtime for little endian archs. At least on amd64, _BIG_ENDIAN is defined +somewhere in the toolchain, causing the byte order to be reversed. + +--- Source/Shared/All.h.orig 2025-10-15 08:20:58 UTC ++++ Source/Shared/All.h +@@ -10,8 +10,8 @@ PLATFORM_ANDROID + PLATFORM_ANDROID + **************************************************************************************************/ + #if !defined(PLATFORM_WINDOWS) && !defined(PLATFORM_APPLE) && !defined(PLATFORM_LINUX) && !defined(PLATFORM_ANDROID) +- #pragma message("No platform set for MACLib, defaulting to Windows") +- #define PLATFORM_WINDOWS ++ #pragma message("No platform set for MACLib, defaulting to Linux") ++ #define PLATFORM_LINUX + #endif + + #ifdef PLATFORM_ANDROID +@@ -311,7 +311,7 @@ Byte order + #define APE_LITTLE_ENDIAN 1234 + #define APE_BIG_ENDIAN 4321 + +-#if defined(_BIG_ENDIAN) || defined(__BIG_ENDIAN__) || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) ++#if defined(__BIG_ENDIAN__) || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)) + #define APE_BYTE_ORDER APE_BIG_ENDIAN + #else + #define APE_BYTE_ORDER APE_LITTLE_ENDIAN diff --git a/audio/mac/files/patch-Source_Shared_CPUFeatures.cpp b/audio/mac/files/patch-Source_Shared_CPUFeatures.cpp new file mode 100644 index 000000000000..4c89888d95e9 --- /dev/null +++ b/audio/mac/files/patch-Source_Shared_CPUFeatures.cpp @@ -0,0 +1,26 @@ +--- Source/Shared/CPUFeatures.cpp.orig 2025-08-04 20:52:19 UTC ++++ Source/Shared/CPUFeatures.cpp +@@ -4,7 +4,7 @@ + #if defined(PLATFORM_LINUX) + #include <sys/auxv.h> + +- #if defined(__arm__) ++ #if defined(__arm__) && defined(__linux__) + #include <asm/hwcap.h> + + #ifndef HWCAP_NEON +@@ -187,7 +187,14 @@ bool GetNeonSupported() + #if defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) + return true; + #elif defined(__arm__) && defined(PLATFORM_LINUX) ++#ifdef __linux__ + return getauxval(AT_HWCAP) & HWCAP_NEON; ++#elif defined(__FreeBSD__) ++ long hwcap = 0; ++ ++ elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap); ++ return (hwcap & HWCAP_NEON); ++#endif + #else + return false; + #endif |
