diff options
| author | Robert Clausecker <fuz@FreeBSD.org> | 2025-09-25 11:58:19 +0200 |
|---|---|---|
| committer | Robert Clausecker <fuz@FreeBSD.org> | 2025-09-28 11:32:13 +0200 |
| commit | aa6b4d2a1ffeed6c833ca660bf302817bd9218c6 (patch) | |
| tree | 524f49aac989dd99536dfc8004d822f9dc9a82b0 | |
| parent | bcbf0f51da59f6c2d65232fdc4d2ac056d726392 (diff) | |
audio/py-soxr: fix build on armv7
Add getauxval() polyfill.
Approved by: portmgr (build fix blanket)
MFH: 2025Q3
Event: EuroBSDcon Devsummit 2025
(cherry picked from commit 714047459cb9c5f699ee77e3fae6bf0f855f59ae)
| -rw-r--r-- | audio/py-soxr/Makefile | 1 | ||||
| -rw-r--r-- | audio/py-soxr/files/patch-libsoxr_src_soxr.c | 33 |
2 files changed, 33 insertions, 1 deletions
diff --git a/audio/py-soxr/Makefile b/audio/py-soxr/Makefile index a971e5b8f9da..1c3230ff9163 100644 --- a/audio/py-soxr/Makefile +++ b/audio/py-soxr/Makefile @@ -11,7 +11,6 @@ WWW= https://github.com/dofuuz/python-soxr LICENSE= LGPL21 BSD3CLAUSE LICENSE_COMB= multi -BROKEN_armv7= compilation fails: soxr.c:17:12: fatal error: 'asm/hwcap.h' file not found BROKEN_i386= fails to compile: ...requires target feature 'sse', but would be inlined into function 'h8' that is compiled without support for 'sse' BUILD_DEPENDS= ${PY_SETUPTOOLS} \ diff --git a/audio/py-soxr/files/patch-libsoxr_src_soxr.c b/audio/py-soxr/files/patch-libsoxr_src_soxr.c new file mode 100644 index 000000000000..30c2a0eedede --- /dev/null +++ b/audio/py-soxr/files/patch-libsoxr_src_soxr.c @@ -0,0 +1,33 @@ +--- libsoxr/src/soxr.c.orig 2022-11-09 12:37:21 UTC ++++ libsoxr/src/soxr.c +@@ -12,10 +12,12 @@ + + #if AVUTIL_FOUND + #include <libavutil/cpu.h> +-#elif HAVE_GETAUXVAL && defined(__arm__) ++#elif HAVE_GETAUXVAL + #include <sys/auxv.h> ++#ifdef __linux__ + #include <asm/hwcap.h> + #endif ++#endif + + + +@@ -243,7 +245,16 @@ soxr_io_spec_t soxr_io_spec( + #endif + #endif + ++#ifdef __FreeBSD__ ++ static unsigned long getauxval(int aux) ++ { ++ unsigned long val = 0; + ++ elf_aux_info(aux, &val, sizeof val); ++ ++ return val; ++ } ++#endif + + #if WITH_CR32S && WITH_CR32 + static bool cpu_has_simd32(void) |
