summaryrefslogtreecommitdiff
path: root/community/pyvorbis
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/pyvorbis
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/pyvorbis')
-rw-r--r--community/pyvorbis/PKGBUILD30
-rw-r--r--community/pyvorbis/pyogg-ticket2-fix.patch27
-rw-r--r--community/pyvorbis/pyvorbis-1.4-python2.5.patch60
3 files changed, 117 insertions, 0 deletions
diff --git a/community/pyvorbis/PKGBUILD b/community/pyvorbis/PKGBUILD
new file mode 100644
index 000000000..83ce3a8eb
--- /dev/null
+++ b/community/pyvorbis/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 89168 2010-08-29 17:00:16Z remy $
+# Contributor: Jason Chu <jason@archlinux.org>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=pyvorbis
+pkgver=1.4
+pkgrel=5
+pkgdesc="Python vorbis wrapper library"
+url="http://www.andrewchatham.com/pyogg/"
+arch=('i686' 'x86_64')
+license=('LGPL')
+depends=('python2' 'libvorbis' 'pyogg>=1.3-3')
+source=(http://ekyo.nerim.net/software/pyogg/${pkgname}-${pkgver}.tar.gz
+ pyvorbis-1.4-python2.5.patch
+ pyogg-ticket2-fix.patch)
+md5sums=('b4921e792c0a74f75b9d3057df10ee7c'
+ 'f971a6f0ebb6cb7fe00dfc1f778b2d0d'
+ '3547bba78916ef9030bff6fe67194714')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -Np0 -i ${srcdir}/pyvorbis-1.4-python2.5.patch || return 1
+ patch -Np0 -i ${srcdir}/pyogg-ticket2-fix.patch || return 1
+ python2 ./config_unix.py --prefix=/usr
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ python2 setup.py install --root=${pkgdir}
+}
diff --git a/community/pyvorbis/pyogg-ticket2-fix.patch b/community/pyvorbis/pyogg-ticket2-fix.patch
new file mode 100644
index 000000000..b518b3638
--- /dev/null
+++ b/community/pyvorbis/pyogg-ticket2-fix.patch
@@ -0,0 +1,27 @@
+--- src/pyvorbisfile.c 2007-05-14 22:41:05.000000000 +0400
++++ src/pyvorbisfile.c.new 2007-05-14 22:45:20.000000000 +0400
+@@ -173,9 +173,7 @@
+ if (ret == NULL) {
+ PyObject_Del(newobj);
+ return NULL;
+- } else
+- Py_DECREF(ret);
+-
++ }
+ return (PyObject *) newobj;
+ }
+
+@@ -191,10 +189,10 @@
+ close */
+ Py_DECREF(py_self->py_file);
+ } else {
+- /* Otherwise, we opened the file and should close it. */
+- fclose(py_self->c_file);
++ /* Do NOT close the file -- ov_open() takes ownership of the FILE*,
++ and ov_close() is responsible for closing it. */
+ }
+-
++ free(py_self->ovf);
+ PyObject_Del(self);
+ }
+
diff --git a/community/pyvorbis/pyvorbis-1.4-python2.5.patch b/community/pyvorbis/pyvorbis-1.4-python2.5.patch
new file mode 100644
index 000000000..41386d23e
--- /dev/null
+++ b/community/pyvorbis/pyvorbis-1.4-python2.5.patch
@@ -0,0 +1,60 @@
+--- src/pyvorbisinfo.c 2007-03-13 01:23:23.000000000 +0200
++++ src/pyvorbisinfo.c.new 2007-03-13 01:29:36.000000000 +0200
+@@ -134,7 +134,7 @@
+ static void
+ py_ov_info_dealloc(PyObject *self)
+ {
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ #define CMP_RET(x) \
+@@ -418,7 +418,7 @@
+ free(ovc_self->vc);
+ }
+
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+
+--- src/pyvorbiscodec.c 2003-05-13 11:17:13.000000000 +0300
++++ src/pyvorbiscodec.c.new 2007-03-13 01:31:38.000000000 +0200
+@@ -118,7 +118,7 @@
+ {
+ vorbis_dsp_clear(PY_DSP(self));
+ Py_XDECREF(((py_dsp *)self)->parent);
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject*
+@@ -447,7 +447,7 @@
+ {
+ vorbis_block_clear(PY_BLOCK(self));
+ Py_XDECREF(((py_block *)self)->parent);
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject*
+--- src/pyvorbisfile.c 2003-12-19 09:11:02.000000000 +0200
++++ src/pyvorbisfile.c.new 2007-03-13 01:31:19.000000000 +0200
+@@ -171,7 +171,7 @@
+
+ ret = py_ov_open(newobj, args);
+ if (ret == NULL) {
+- PyMem_DEL(newobj);
++ PyObject_Del(newobj);
+ return NULL;
+ } else
+ Py_DECREF(ret);
+@@ -195,7 +195,7 @@
+ fclose(py_self->c_file);
+ }
+
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject *