git: 714047459cb9 - main - audio/py-soxr: fix build on armv7
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 28 Sep 2025 09:31:03 UTC
The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=714047459cb9c5f699ee77e3fae6bf0f855f59ae commit 714047459cb9c5f699ee77e3fae6bf0f855f59ae Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2025-09-25 09:58:19 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2025-09-28 09:29:33 +0000 audio/py-soxr: fix build on armv7 Add getauxval() polyfill. Approved by: portmgr (build fix blanket) MFH: 2025Q3 Event: EuroBSDcon Devsummit 2025 --- audio/py-soxr/Makefile | 1 - audio/py-soxr/files/patch-libsoxr_src_soxr.c | 33 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) 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)