summaryrefslogtreecommitdiff
path: root/community/pyvorbis
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/pyvorbis
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
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..6e5de6442
--- /dev/null
+++ b/community/pyvorbis/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 64987 2012-02-19 11:27:59Z jelle $
+# Contributor: Jason Chu <jason@archlinux.org>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=pyvorbis
+pkgver=1.4
+pkgrel=6
+pkgdesc="Python vorbis wrapper library"
+url="http://ekyo.nerim.net/software/pyogg/index.html"
+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 *