diff --git a/audio/py-samplerate/Makefile b/audio/py-samplerate/Makefile index e9a917859212..a9f4a7e1d895 100644 --- a/audio/py-samplerate/Makefile +++ b/audio/py-samplerate/Makefile @@ -1,34 +1,35 @@ PORTNAME= samplerate -DISTVERSION= 0.2.1 -PORTREVISION= 2 +DISTVERSION= 0.2.4 CATEGORIES= audio MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= yuri@FreeBSD.org COMMENT= Python wrapper for libsamplerate based on pybind11 and NumPy WWW= https://github.com/tuxu/python-samplerate LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE.rst BUILD_DEPENDS= ${PY_SETUPTOOLS} \ ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=6.2:devel/py-setuptools-scm@${PY_FLAVOR} \ pybind11>0:devel/pybind11 \ cmake:devel/cmake-core LIB_DEPENDS= libsamplerate.so:audio/libsamplerate RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16:math/py-numpy@${PY_FLAVOR} USES= cmake compiler:c++14-lang pkgconfig python USE_PYTHON= flavors pytest TEST_WRKSRC= ${WRKSRC}/tests TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} PLIST_FILES= ${PYTHON_SITELIBDIR}/samplerate${PYTHON_TAG}.so do-install: ${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${INSTALL_LIB} ${BUILD_WRKSRC}/samplerate${PYTHON_TAG}.so ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} +# tests as of 0.2.4: 134 passed + .include diff --git a/audio/py-samplerate/distinfo b/audio/py-samplerate/distinfo index a0725985f378..5e5ff57ed681 100644 --- a/audio/py-samplerate/distinfo +++ b/audio/py-samplerate/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1714760637 -SHA256 (samplerate-0.2.1.tar.gz) = 464d3574412024184fb7428ecbaa1b2e207bddf5fbc10a5d9ddc3fc1c7b7ab1e -SIZE (samplerate-0.2.1.tar.gz) = 21494 +TIMESTAMP = 1780422893 +SHA256 (samplerate-0.2.4.tar.gz) = c44dcb6fe680246f8f36588ba1f0fc7a0c5fbce710ad5e9b3812d88e8c39ac7d +SIZE (samplerate-0.2.4.tar.gz) = 22066 diff --git a/audio/py-samplerate/files/patch-CMakeLists.txt b/audio/py-samplerate/files/patch-CMakeLists.txt index 7f822e90d3d4..bcb8bd13c1f0 100644 --- a/audio/py-samplerate/files/patch-CMakeLists.txt +++ b/audio/py-samplerate/files/patch-CMakeLists.txt @@ -1,33 +1,33 @@ ---- CMakeLists.txt.orig 2024-01-23 23:51:19 UTC +--- CMakeLists.txt.orig 2026-03-22 18:12:56 UTC +++ CMakeLists.txt -@@ -11,7 +11,9 @@ cmake_policy(SET CMP0094 NEW) - cmake_policy(SET CMP0094 NEW) +@@ -9,7 +9,9 @@ set(PYBIND11_FINDPYTHON ON) + set(PYBIND11_FINDPYTHON ON) # adds the external dependencies -add_subdirectory(external) +find_package(PkgConfig REQUIRED) +find_package(pybind11 CONFIG REQUIRED) +pkg_check_modules(SAMPLERATE REQUIRED IMPORTED_TARGET samplerate) pybind11_add_module(python-samplerate src/samplerate.cpp) -@@ -25,7 +27,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR +@@ -23,7 +25,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT WIN32)) -- target_compile_options(python-samplerate PRIVATE -std=c++14 -O3 -Wall -Wextra) -+ target_compile_options(python-samplerate PRIVATE -std=c++14 -Wall -Wextra) +- target_compile_options(python-samplerate PRIVATE -std=c++14 -O3 -Wall -Wextra -fPIC) ++ target_compile_options(python-samplerate PRIVATE -std=c++14 -Wall -Wextra -fPIC) endif() ### stick the package and libsamplerate version into the module -@@ -43,4 +45,9 @@ set_target_properties( +@@ -41,4 +43,9 @@ set_target_properties( LINKER_LANGUAGE C ) -target_link_libraries(python-samplerate PUBLIC samplerate) +target_compile_options(python-samplerate PRIVATE + ${SAMPLERATE_CFLAGS} +) +target_link_options(python-samplerate PRIVATE + ${SAMPLERATE_LDFLAGS} +)