diff options
-rw-r--r-- | audio/flac/Makefile | 3 | ||||
-rw-r--r-- | audio/flac/files/patch-src_libFLAC_cpu.c | 24 |
2 files changed, 26 insertions, 1 deletions
diff --git a/audio/flac/Makefile b/audio/flac/Makefile index db524ea83391..11fa1b8561c2 100644 --- a/audio/flac/Makefile +++ b/audio/flac/Makefile @@ -25,7 +25,8 @@ CONFIGURE_ARGS= --enable-static \ --with-ogg="${LOCALBASE}" \ --disable-doxygen-docs \ --disable-thorough-tests \ - --disable-xmms-plugin + --disable-xmms-plugin \ + --disable-vsx INSTALL_TARGET= install-strip TEST_TARGET= check diff --git a/audio/flac/files/patch-src_libFLAC_cpu.c b/audio/flac/files/patch-src_libFLAC_cpu.c new file mode 100644 index 000000000000..91898d9c2dd0 --- /dev/null +++ b/audio/flac/files/patch-src_libFLAC_cpu.c @@ -0,0 +1,24 @@ +--- src/libFLAC/cpu.c.orig 2019-08-15 00:05:19 UTC ++++ src/libFLAC/cpu.c +@@ -245,11 +245,21 @@ ppc_cpu_info (FLAC__CPUInfo *info) + #define PPC_FEATURE2_ARCH_2_07 0x80000000 + #endif + ++#ifdef __linux__ + if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_3_00) { + info->ppc.arch_3_00 = true; + } else if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07) { + info->ppc.arch_2_07 = true; + } ++#elif defined(__FreeBSD__) ++ long hwcaps; ++ elf_aux_info(AT_HWCAP2, &hwcaps, sizeof(hwcaps)); ++ if (hwcaps & PPC_FEATURE2_ARCH_3_00) { ++ info->ppc.arch_3_00 = true; ++ } else if (hwcaps & PPC_FEATURE2_ARCH_2_07) { ++ info->ppc.arch_2_07 = true; ++ } ++#endif + #else + info->ppc.arch_2_07 = false; + info->ppc.arch_3_00 = false; |