diff options
author | clsung <clsung@FreeBSD.org> | 2007-04-02 15:18:13 +0800 |
---|---|---|
committer | clsung <clsung@FreeBSD.org> | 2007-04-02 15:18:13 +0800 |
commit | b238a9c75298d460c021fabbe05d17c19bf6d457 (patch) | |
tree | 6daa37d869cdee6648e0290707a879b2bf62def3 /audio/py-speex | |
parent | 3015ffa9b3e150cf2513d1c70d96ba107a82b34a (diff) | |
download | freebsd-ports-gnome-b238a9c75298d460c021fabbe05d17c19bf6d457.tar.gz freebsd-ports-gnome-b238a9c75298d460c021fabbe05d17c19bf6d457.tar.zst freebsd-ports-gnome-b238a9c75298d460c021fabbe05d17c19bf6d457.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>
Diffstat (limited to 'audio/py-speex')
-rw-r--r-- | audio/py-speex/Makefile | 30 | ||||
-rw-r--r-- | audio/py-speex/distinfo | 3 | ||||
-rw-r--r-- | audio/py-speex/files/patch-setup.py | 14 | ||||
-rw-r--r-- | audio/py-speex/files/patch-speex.pyx | 20 | ||||
-rw-r--r-- | audio/py-speex/pkg-descr | 4 |
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/ |