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 @@ -1,36 +1,35 @@ PORTNAME= soxr DISTVERSION= 0.5.0 CATEGORIES= audio python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= High quality, one-dimensional sample-rate conversion library 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} \ cmake:devel/cmake-core \ ${PYTHON_PKGNAMEPREFIX}nanobind>0:devel/py-nanobind@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}scikit-build-core>=0.9.0:devel/py-scikit-build-core@${PY_FLAVOR} \ ${PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} RUN_DEPENDS= ${PYNUMPY} USES= python USE_PYTHON= pep517 autoplist pytest TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} xpost-install: # strip binary @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/soxr/cysoxr${PYTHON_TAG}.so # correct version as a workaround for https://github.com/dofuuz/python-soxr/issues/21 @${REINPLACE_CMD} -i '' -e 's|^version |__version__ |' ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/soxr/_version.py .include 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 +-#elif HAVE_GETAUXVAL && defined(__arm__) ++#elif HAVE_GETAUXVAL + #include ++#ifdef __linux__ + #include + #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)