aboutsummaryrefslogtreecommitdiff
path: root/audio/py-ao
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2010-06-06 20:39:21 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2010-06-06 20:39:21 +0000
commitf613ac049d40272c3b27a76dbab7f6723f2a2ba2 (patch)
treee62b67c39f729f55f17b68f6438f9f1beeadd10c /audio/py-ao
parent2f2aafd9bf4a01f681da4598e18663001e4a9406 (diff)
Notes
Diffstat (limited to 'audio/py-ao')
-rw-r--r--audio/py-ao/Makefile3
-rw-r--r--audio/py-ao/files/patch-src_aomodule.c66
-rw-r--r--audio/py-ao/files/patch-src_aomodule.h10
3 files changed, 78 insertions, 1 deletions
diff --git a/audio/py-ao/Makefile b/audio/py-ao/Makefile
index 4af96eaf1d4a..c02794b6f544 100644
--- a/audio/py-ao/Makefile
+++ b/audio/py-ao/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ao
PORTVERSION= 0.82
+PORTREVISION= 1
CATEGORIES= audio python
MASTER_SITES= http://ekyo.nerim.net/software/pyogg/ \
http://www.sourcefiles.org/Programming/Development/Modules/Python/
@@ -16,7 +17,7 @@ DISTNAME= pyao-${PORTVERSION}
MAINTAINER= xride@FreeBSD.org
COMMENT= A python wrapper for ao, an audio device abstraction library
-LIB_DEPENDS= ao.3:${PORTSDIR}/audio/libao
+LIB_DEPENDS= ao.4:${PORTSDIR}/audio/libao
PLIST_FILES= lib/%%PYTHON_VERSION%%/site-packages/aomodule.so
USE_PYTHON= yes
diff --git a/audio/py-ao/files/patch-src_aomodule.c b/audio/py-ao/files/patch-src_aomodule.c
new file mode 100644
index 000000000000..b4d686943e39
--- /dev/null
+++ b/audio/py-ao/files/patch-src_aomodule.c
@@ -0,0 +1,66 @@
+--- src/aomodule.c.orig 2010-06-06 18:41:04.000000000 +0200
++++ src/aomodule.c 2010-06-06 18:45:01.000000000 +0200
+@@ -4,7 +4,7 @@
+ static ao_option *
+ dict_to_options(PyObject *dict)
+ {
+- int pos = 0;
++ Py_ssize_t pos = 0;
+ PyObject *key, *val;
+ ao_option *head = NULL;
+ int ret;
+@@ -71,7 +71,7 @@ parse_args(PyObject *args, PyObject *kwa
+
+ *overwrite = 0;
+
+- if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|llllO!sl",
++ if(PyArg_ParseTupleAndKeywords(args, kwargs, "s|iiiiO!si",
+ (char **) driver_name_kwlist,
+ &driver_name,
+ &format->bits,
+@@ -84,7 +84,7 @@ parse_args(PyObject *args, PyObject *kwa
+ *driver_id = ao_driver_id(driver_name);
+ } else {
+ PyErr_Clear();
+- if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|llllO!sl",
++ if(!(PyArg_ParseTupleAndKeywords(args, kwargs, "i|iiiiO!si",
+ (char **) driver_id_kwlist,
+ driver_id,
+ &format->bits,
+@@ -114,6 +114,7 @@ py_ao_new(PyObject *self, PyObject *args
+ ao_sample_format sample_format;
+ ao_Object *retobj;
+
++ memset(&sample_format, 0, sizeof(sample_format));
+ if (!parse_args(args, kwargs,
+ &sample_format, &py_options,
+ &filename, &driver_id, &overwrite))
+@@ -141,8 +142,9 @@ py_ao_new(PyObject *self, PyObject *args
+ return NULL;
+ }
+
+- retobj = (ao_Object *) PyObject_NEW(ao_Object, &ao_Type);
++ retobj = (ao_Object *) PyObject_New(ao_Object, &ao_Type);
+ retobj->dev = dev;
++ retobj->driver_id = driver_id;
+ return (PyObject *) retobj;
+ }
+
+@@ -150,7 +152,7 @@ static void
+ py_ao_dealloc(ao_Object *self)
+ {
+ ao_close(self->dev);
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject *
+@@ -184,7 +186,7 @@ py_ao_driver_info(PyObject *self, PyObje
+
+ /* It's a method */
+ ao_Object *ao_self = (ao_Object *) self;
+- info = ao_driver_info(ao_self->dev->driver_id);
++ info = ao_driver_info(ao_self->driver_id);
+
+ } else {
+
diff --git a/audio/py-ao/files/patch-src_aomodule.h b/audio/py-ao/files/patch-src_aomodule.h
new file mode 100644
index 000000000000..1309f423d2e8
--- /dev/null
+++ b/audio/py-ao/files/patch-src_aomodule.h
@@ -0,0 +1,10 @@
+--- src/aomodule.h.orig 2010-06-06 18:45:10.000000000 +0200
++++ src/aomodule.h 2010-06-06 18:45:25.000000000 +0200
+@@ -9,6 +9,7 @@
+ typedef struct {
+ PyObject_HEAD
+ ao_device *dev;
++ uint32_t driver_id;
+ } ao_Object;
+
+ static PyObject *Py_aoError;