summaryrefslogtreecommitdiff
path: root/audio/py-soxr
diff options
context:
space:
mode:
Diffstat (limited to 'audio/py-soxr')
-rw-r--r--audio/py-soxr/Makefile1
-rw-r--r--audio/py-soxr/files/patch-libsoxr_src_soxr.c33
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)