git: 5b25c2024bc4 - main - audio/py-simpleaudio: New port: Simple, asynchronous audio playback for Python 3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 21 Jan 2023 09:41:28 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=5b25c2024bc491476fbba7c445223a63c18a60b7 commit 5b25c2024bc491476fbba7c445223a63c18a60b7 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-01-21 09:15:10 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-01-21 09:15:10 +0000 audio/py-simpleaudio: New port: Simple, asynchronous audio playback for Python 3 --- audio/Makefile | 1 + audio/py-simpleaudio/Makefile | 31 +++++++++++++++++++++++++++++++ audio/py-simpleaudio/distinfo | 3 +++ audio/py-simpleaudio/files/patch-setup.py | 12 ++++++++++++ audio/py-simpleaudio/pkg-descr | 2 ++ 5 files changed, 49 insertions(+) diff --git a/audio/Makefile b/audio/Makefile index be8a3139df09..ac226ac22841 100644 --- a/audio/Makefile +++ b/audio/Makefile @@ -669,6 +669,7 @@ SUBDIR += py-pysndfile SUBDIR += py-python-mpd2 SUBDIR += py-resampy + SUBDIR += py-simpleaudio SUBDIR += py-soundcloud SUBDIR += py-sounddevice SUBDIR += py-soundscrape diff --git a/audio/py-simpleaudio/Makefile b/audio/py-simpleaudio/Makefile new file mode 100644 index 000000000000..dda78285ed0d --- /dev/null +++ b/audio/py-simpleaudio/Makefile @@ -0,0 +1,31 @@ +PORTNAME= simpleaudio +DISTVERSION= 1.0.4 +CATEGORIES= audio +#MASTER_SITES= PYPI # no tests +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Simple, asynchronous audio playback for Python 3 +WWW= https://github.com/hamiltron/py-simple-audio + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +LIB_DEPENDS= libasound.so:audio/alsa-lib +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyaudio>0:audio/py-pyaudio@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR} + +USES= localbase python:3.3+ +USE_PYTHON= distutils autoplist pytest + +USE_GITHUB= yes +GH_ACCOUNT= hamiltron +GH_PROJECT= py-simple-audio + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} +TEST_WRKSRC= ${WRKSRC}/tests + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/simpleaudio/_simpleaudio${PYTHON_EXT_SUFFIX}.so + +.include <bsd.port.mk> diff --git a/audio/py-simpleaudio/distinfo b/audio/py-simpleaudio/distinfo new file mode 100644 index 000000000000..19d66908d08b --- /dev/null +++ b/audio/py-simpleaudio/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1674291511 +SHA256 (hamiltron-py-simple-audio-1.0.4_GH0.tar.gz) = 843f208fd9c2f644cfd5c2c6f795259c53846681fb4df662ab3e5cf2ec8aba28 +SIZE (hamiltron-py-simple-audio-1.0.4_GH0.tar.gz) = 10243850 diff --git a/audio/py-simpleaudio/files/patch-setup.py b/audio/py-simpleaudio/files/patch-setup.py new file mode 100644 index 000000000000..c5c2748f7746 --- /dev/null +++ b/audio/py-simpleaudio/files/patch-setup.py @@ -0,0 +1,12 @@ +--- setup.py.orig 2019-11-29 03:48:07 UTC ++++ setup.py +@@ -18,6 +18,9 @@ if sys.platform == 'darwin': + elif sys.platform.startswith("linux"): + platform_sources = ['c_src/simpleaudio_alsa.c', 'c_src/posix_mutex.c'] + platform_libs = ['asound'] ++elif sys.platform.startswith("freebsd"): ++ platform_sources = ['c_src/simpleaudio_alsa.c', 'c_src/posix_mutex.c'] # it doesn't appear to be any other choice than ALSA ++ platform_libs = ['asound'] + elif sys.platform == 'win32': + platform_sources = ['c_src/simpleaudio_win.c', 'c_src/windows_mutex.c'] + platform_libs = ['Winmm', 'User32'] diff --git a/audio/py-simpleaudio/pkg-descr b/audio/py-simpleaudio/pkg-descr new file mode 100644 index 000000000000..2c0ee85bfaeb --- /dev/null +++ b/audio/py-simpleaudio/pkg-descr @@ -0,0 +1,2 @@ +simpleaudio is a simple audio playback Python extension - cross-platform, +asynchronous, dependency-free.