aboutsummaryrefslogtreecommitdiff
path: root/audio/py-speex
diff options
context:
space:
mode:
authorCheng-Lung Sung <clsung@FreeBSD.org>2007-04-02 07:18:13 +0000
committerCheng-Lung Sung <clsung@FreeBSD.org>2007-04-02 07:18:13 +0000
commit891f50bfc01b3a53162e096a4c1d9240e3f7450d (patch)
tree87d6116f5f5e4ba8a03e3403611f3ecae527c52c /audio/py-speex
parentf17757b2387f8ab94f92a9f5de831f5bcb738043 (diff)
downloadports-891f50bfc01b3a53162e096a4c1d9240e3f7450d.tar.gz
ports-891f50bfc01b3a53162e096a4c1d9240e3f7450d.zip
Add py-speex 0.2, python bindings for the Speex compressor/decompressor
audio codec. PR: ports/111032 Submitted by: Carl Johan Gustavsson <cjg at bsdmail.org>
Notes
Notes: svn path=/head/; revision=188982
Diffstat (limited to 'audio/py-speex')
-rw-r--r--audio/py-speex/Makefile30
-rw-r--r--audio/py-speex/distinfo3
-rw-r--r--audio/py-speex/files/patch-setup.py14
-rw-r--r--audio/py-speex/files/patch-speex.pyx20
-rw-r--r--audio/py-speex/pkg-descr4
5 files changed, 71 insertions, 0 deletions
diff --git a/audio/py-speex/Makefile b/audio/py-speex/Makefile
new file mode 100644
index 000000000000..54ed2e24c8e2
--- /dev/null
+++ b/audio/py-speex/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: py-speex
+# Date created: 3 March 2007
+# Whom: Carl Johan Gustavsson <cjg@bsdmail.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= speex
+PORTVERSION= 0.2
+CATEGORIES= audio python
+MASTER_SITES= http://www.freenet.org.nz/python/pySpeex/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= pySpeex-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
+DIST_SUBDIR= python
+
+MAINTAINER= cjg@bsdmail.org
+COMMENT= Python bindings for the Speex compressor/decompressor audio codec
+
+BUILD_DEPENDS= pyrexc:${PORTSDIR}/devel/pyrex
+LIB_DEPENDS= speex.1:${PORTSDIR}/audio/speex
+
+PLIST_FILES= lib/%%PYTHON_VERSION%%/site-packages/speex.so
+USE_PYTHON= yes
+USE_PYDISTUTILS=yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/setup.py
+
+.include <bsd.port.mk>
diff --git a/audio/py-speex/distinfo b/audio/py-speex/distinfo
new file mode 100644
index 000000000000..dff39c99cda4
--- /dev/null
+++ b/audio/py-speex/distinfo
@@ -0,0 +1,3 @@
+MD5 (python/pySpeex-0.2.tar.gz) = 5f6837cd74568fb58bb15d43fe2406ea
+SHA256 (python/pySpeex-0.2.tar.gz) = aca41ca9650765b58de0e1c0a6676658564a8009dd544aeec08087f6c3dc6bd6
+SIZE (python/pySpeex-0.2.tar.gz) = 17665
diff --git a/audio/py-speex/files/patch-setup.py b/audio/py-speex/files/patch-setup.py
new file mode 100644
index 000000000000..7c0ccbd89982
--- /dev/null
+++ b/audio/py-speex/files/patch-setup.py
@@ -0,0 +1,14 @@
+--- setup.py.orig Sun Oct 30 13:10:14 2005
++++ setup.py Sat Mar 3 00:40:44 2007
+@@ -5,9 +5,9 @@
+ from distutils.core import setup, Extension
+ from Pyrex.Distutils import build_ext
+
+-incDirs = ['../libspeex', '/usr/include/speex', '/usr/local/include/speex']
++incDirs = ['%%LOCALBASE%%/include', '%%LOCALBASE%%/include/speex']
+ libs = []
+-libDirs = []
++libDirs = ['%%LOCALBASE%%/lib']
+ runtimeLibDirs = []
+ cMacros = []
+ #extraLinkArgs = ['-g', '/usr/lib/libspeex.a'] # static
diff --git a/audio/py-speex/files/patch-speex.pyx b/audio/py-speex/files/patch-speex.pyx
new file mode 100644
index 000000000000..98d8385197e4
--- /dev/null
+++ b/audio/py-speex/files/patch-speex.pyx
@@ -0,0 +1,20 @@
+--- speex.pyx.orig Sat Mar 3 00:32:39 2007
++++ speex.pyx Sat Mar 3 00:33:01 2007
+@@ -365,7 +365,7 @@
+ bufOut[bufOutSiz] = nBytes % 256
+ bufOut[bufOutSiz+1] = nBytes / 256
+ bufOutSiz = bufOutSiz + 2
+- memcpy(bufOut+bufOutSiz, cbits, nBytes)
++ memcpy(bufOut+bufOutSiz, <void *> cbits, nBytes)
+ # printf("ok5\n")
+ bufOutSiz = bufOutSiz + nBytes
+ # printf("ok6\n")
+@@ -522,7 +522,7 @@
+
+ # Copy from float to short (16 bits) for output
+ for i from 0 <= i < self.encFramesPerBlock:
+- decShorts1[i] = decFloats1[i]
++ decShorts1[i] = <short> decFloats1[i]
+
+ self.decPhase = 0 # back to awaiting LSB of count header
+ self.decNumBytes = 0
diff --git a/audio/py-speex/pkg-descr b/audio/py-speex/pkg-descr
new file mode 100644
index 000000000000..2e57d95014c4
--- /dev/null
+++ b/audio/py-speex/pkg-descr
@@ -0,0 +1,4 @@
+py-speex is a Python module that provides bindings for the Speex audio
+compressor/decompressor codec.
+
+WWW: http://www.freenet.org.nz/python/pySpeex/