aboutsummaryrefslogtreecommitdiff
path: root/audio/py-pyaudio
diff options
context:
space:
mode:
authorMarcus von Appen <mva@FreeBSD.org>2012-12-22 10:11:42 +0000
committerMarcus von Appen <mva@FreeBSD.org>2012-12-22 10:11:42 +0000
commitd498d3028a1394ba288f42dbddf8055136b9c516 (patch)
tree22b15c11845df0a18ada2caaa3ed035649e20360 /audio/py-pyaudio
parent3ae4b73e8f1f978b7b6e23c1fcb94d31a5e8e957 (diff)
downloadports-d498d3028a1394ba288f42dbddf8055136b9c516.tar.gz
ports-d498d3028a1394ba288f42dbddf8055136b9c516.zip
PyAudio provides Python bindings for PortAudio, the cross-platform
audio I/O library. With PyAudio, you can easily use Python to play and record audio on a variety of platforms. WWW: http://people.csail.mit.edu/hubert/pyaudio/ PR: ports/173708 Submitted by: Jaap Akkerhuis <jaap@NLnetLabs.nl>
Notes
Notes: svn path=/head/; revision=309383
Diffstat (limited to 'audio/py-pyaudio')
-rw-r--r--audio/py-pyaudio/Makefile38
-rw-r--r--audio/py-pyaudio/distinfo2
-rw-r--r--audio/py-pyaudio/files/patch-setup.py29
-rw-r--r--audio/py-pyaudio/pkg-descr5
-rw-r--r--audio/py-pyaudio/pkg-plist35
5 files changed, 109 insertions, 0 deletions
diff --git a/audio/py-pyaudio/Makefile b/audio/py-pyaudio/Makefile
new file mode 100644
index 000000000000..5ae6247c1924
--- /dev/null
+++ b/audio/py-pyaudio/Makefile
@@ -0,0 +1,38 @@
+# Created by: Jaap Akkerhuis <jaap@NLnetLabs.nl>
+# $FreeBSD$
+
+PORTNAME= pyaudio
+PORTVERSION= 0.2.7
+CATEGORIES= audio python
+MASTER_SITES= http://people.csail.mit.edu/hubert/pyaudio/packages/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= jaap@NLnetLabs.nl
+COMMENT= Portaudio toolkit bindings for Python
+
+LIB_DEPENDS= portaudio.2:${PORTSDIR}/audio/portaudio2
+
+USE_PYTHON= yes
+USE_PYDISTUTILS= yes
+PYDISTUTILS_PKGNAME= PyAudio
+
+WRKSRC= ${WRKDIR}/PyAudio-${PORTVERSION}
+
+OPTIONS_DEFINE= DOCS
+
+.include <bsd.port.options.mk>
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/setup.py
+
+post-install:
+.if ${PORT_OPTIONS:MDOCS}
+ @${MKDIR} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/docs/*.html ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/docs/*.js ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/docs/*.inv ${DOCSDIR}
+ @cd ${WRKSRC}/docs && ${COPYTREE_SHARE} _static ${DOCSDIR}/
+ @cd ${WRKSRC}/docs && ${COPYTREE_SHARE} _sources ${DOCSDIR}/
+.endif
+
+.include <bsd.port.mk>
diff --git a/audio/py-pyaudio/distinfo b/audio/py-pyaudio/distinfo
new file mode 100644
index 000000000000..508a69ab5126
--- /dev/null
+++ b/audio/py-pyaudio/distinfo
@@ -0,0 +1,2 @@
+SHA256 (pyaudio-0.2.7.tar.gz) = 7807cf937df3652f64b014b9f579c308cf87057d32ed4250a6b28844e2b56287
+SIZE (pyaudio-0.2.7.tar.gz) = 182396
diff --git a/audio/py-pyaudio/files/patch-setup.py b/audio/py-pyaudio/files/patch-setup.py
new file mode 100644
index 000000000000..185b0d035571
--- /dev/null
+++ b/audio/py-pyaudio/files/patch-setup.py
@@ -0,0 +1,29 @@
+--- ./setup.py.orig 2012-11-07 00:17:06.624869638 +0100
++++ ./setup.py 2012-11-07 00:37:17.129040078 +0100
+@@ -57,7 +57,7 @@
+
+ pyaudio_module_sources = ['src/_portaudiomodule.c']
+
+-include_dirs = []
++include_dirs = ['%%PREFIX%%/include/portaudio2']
+ external_libraries = []
+ extra_compile_args = ['-fno-strict-aliasing']
+ extra_link_args = []
+@@ -74,6 +74,9 @@
+ external_libraries = ['portaudio']
+ extra_link_args = []
+
++if sys.platform.startswith('freebsd'):
++ extra_link_args = ['-L%%PREFIX%%/lib/portaudio2']
++
+ if sys.platform == 'darwin':
+ defines += [('MACOSX', '1')]
+
+@@ -83,7 +86,6 @@
+
+ if STATIC_LINKING:
+
+- # platform specific configuration
+ if sys.platform == 'darwin':
+ extra_link_args += ['-framework', 'CoreAudio',
+ '-framework', 'AudioToolbox',
diff --git a/audio/py-pyaudio/pkg-descr b/audio/py-pyaudio/pkg-descr
new file mode 100644
index 000000000000..953b6c2d0f76
--- /dev/null
+++ b/audio/py-pyaudio/pkg-descr
@@ -0,0 +1,5 @@
+PyAudio provides Python bindings for PortAudio, the cross-platform
+audio I/O library. With PyAudio, you can easily use Python to play
+and record audio on a variety of platforms.
+
+WWW: http://people.csail.mit.edu/hubert/pyaudio/
diff --git a/audio/py-pyaudio/pkg-plist b/audio/py-pyaudio/pkg-plist
new file mode 100644
index 000000000000..c5a8d6b830d0
--- /dev/null
+++ b/audio/py-pyaudio/pkg-plist
@@ -0,0 +1,35 @@
+%%PYTHON_SITELIBDIR%%/pyaudio.py
+%%PYTHON_SITELIBDIR%%/pyaudio.pyc
+%%PYTHON_SITELIBDIR%%/pyaudio.pyo
+%%PYTHON_SITELIBDIR%%/_portaudio.so
+%%PORTDOCS%%%%DOCSDIR%%/_sources/examples.txt
+%%PORTDOCS%%%%DOCSDIR%%/_sources/index.txt
+%%PORTDOCS%%%%DOCSDIR%%/_static/ajax-loader.gif
+%%PORTDOCS%%%%DOCSDIR%%/_static/basic.css
+%%PORTDOCS%%%%DOCSDIR%%/_static/comment-bright.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/comment-close.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/comment.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/doctools.js
+%%PORTDOCS%%%%DOCSDIR%%/_static/down-pressed.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/down.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/file.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/jquery.js
+%%PORTDOCS%%%%DOCSDIR%%/_static/minus.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/nature.css
+%%PORTDOCS%%%%DOCSDIR%%/_static/plus.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/pygments.css
+%%PORTDOCS%%%%DOCSDIR%%/_static/searchtools.js
+%%PORTDOCS%%%%DOCSDIR%%/_static/underscore.js
+%%PORTDOCS%%%%DOCSDIR%%/_static/up-pressed.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/up.png
+%%PORTDOCS%%%%DOCSDIR%%/_static/websupport.js
+%%PORTDOCS%%%%DOCSDIR%%/examples.html
+%%PORTDOCS%%%%DOCSDIR%%/genindex.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/objects.inv
+%%PORTDOCS%%%%DOCSDIR%%/py-modindex.html
+%%PORTDOCS%%%%DOCSDIR%%/search.html
+%%PORTDOCS%%%%DOCSDIR%%/searchindex.js
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/_sources
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/_static
+%%PORTDOCS%%@dirrm %%DOCSDIR%%