4f0eba1efd
EXT_SUFFIX, according to PEP 3149, refers to the full tag and extension for compiled extension module objects, eg .cpython-311.so, .cpython-313t.so, etc. We do not use the correct semantic meaning, and this usage becomes ambiguous and confusing when tags do not match between bytecode and compiled extension module objects. Rename our PYTHON_EXT_SUFFIX to PYTHON_TAG to align with PEP 3147's specification of a magic tag, which consists of implementation name and shorthand version only. This is meant for bytecode and other files containing this tag in their filename that do not depend on a specific Python ABI for the same version. Chase all existing consumers. Introduce PYTHON_SOABI to align with PEP 3149's specification of a tag, which consists of implementation name, shorthand version and any ABI flags present (this and PYTHON_TAG are identical without ABI flags). This is meant for compiled extension module objects and other files that depend on a specific Python ABI for the same version. Add documentation for these variables that our PYTHON_EXT_SUFFIX never had. PR: 274671 Event: Kitchener-Waterloo Hackathon 202506
37 lines
1.3 KiB
Makefile
37 lines
1.3 KiB
Makefile
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 <bsd.port.mk>
|