summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-06-24 19:41:30 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-06-24 19:41:30 +0000
commita35c5355d16ed5b7a2d151d848c86f57a92950e7 (patch)
tree4f67d079f60d538bdcc0e7dc360f291d747f2080 /dev-python/pyao
parentAdded gmt mirros, #279262 (diff)
downloadgentoo-2-a35c5355d16ed5b7a2d151d848c86f57a92950e7.tar.gz
gentoo-2-a35c5355d16ed5b7a2d151d848c86f57a92950e7.tar.bz2
gentoo-2-a35c5355d16ed5b7a2d151d848c86f57a92950e7.zip
Fix building with libao >= 1.0.0 wrt #314627 by Juergen Rose.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/pyao')
-rw-r--r--dev-python/pyao/ChangeLog10
-rw-r--r--dev-python/pyao/files/pyao-0.82-new_api.patch71
-rw-r--r--dev-python/pyao/files/pyao-fix-deallocation.patch12
-rw-r--r--dev-python/pyao/pyao-0.81.ebuild22
-rw-r--r--dev-python/pyao/pyao-0.82-r2.ebuild (renamed from dev-python/pyao/pyao-0.82-r1.ebuild)23
5 files changed, 91 insertions, 47 deletions
diff --git a/dev-python/pyao/ChangeLog b/dev-python/pyao/ChangeLog
index 0921efc2ce7a..f03481ed51e2 100644
--- a/dev-python/pyao/ChangeLog
+++ b/dev-python/pyao/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/pyao
-# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyao/ChangeLog,v 1.14 2009/04/23 13:05:04 patrick Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyao/ChangeLog,v 1.15 2010/06/24 19:41:30 ssuominen Exp $
+
+*pyao-0.82-r2 (24 Jun 2010)
+
+ 24 Jun 2010; Samuli Suominen <ssuominen@gentoo.org> +pyao-0.82-r2.ebuild,
+ +files/pyao-0.82-new_api.patch:
+ Fix building with libao >= 1.0.0 wrt #314627 by Juergen Rose.
*pyao-0.82-r1 (23 Apr 2009)
diff --git a/dev-python/pyao/files/pyao-0.82-new_api.patch b/dev-python/pyao/files/pyao-0.82-new_api.patch
new file mode 100644
index 000000000000..7a77d0ab8a2e
--- /dev/null
+++ b/dev-python/pyao/files/pyao-0.82-new_api.patch
@@ -0,0 +1,71 @@
+http://bugs.gentoo.org/314627
+http://bugs.gentoo.org/257550
+
+--- src/aomodule.c
++++ src/aomodule.c
+@@ -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 @@
+
+ *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 @@
+ *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,
+@@ -141,8 +141,9 @@
+ 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 +151,7 @@
+ py_ao_dealloc(ao_Object *self)
+ {
+ ao_close(self->dev);
+- PyMem_DEL(self);
++ PyObject_Del(self);
+ }
+
+ static PyObject *
+@@ -184,7 +185,7 @@
+
+ /* 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 {
+
+--- src/aomodule.h
++++ src/aomodule.h
+@@ -9,6 +9,7 @@
+ typedef struct {
+ PyObject_HEAD
+ ao_device *dev;
++ uint32_t driver_id;
+ } ao_Object;
+
+ static PyObject *Py_aoError;
diff --git a/dev-python/pyao/files/pyao-fix-deallocation.patch b/dev-python/pyao/files/pyao-fix-deallocation.patch
deleted file mode 100644
index ae422272da82..000000000000
--- a/dev-python/pyao/files/pyao-fix-deallocation.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -ru pyao-0.82/src/aomodule.c pyao-0.82.ok/src/aomodule.c
---- pyao-0.82/src/aomodule.c 2003-07-24 08:52:59.000000000 +0200
-+++ pyao-0.82.ok/src/aomodule.c 2009-02-04 03:22:17.000000000 +0100
-@@ -150,7 +150,7 @@
- py_ao_dealloc(ao_Object *self)
- {
- ao_close(self->dev);
-- PyMem_DEL(self);
-+ PyObject_FREE(self);
- }
-
- static PyObject *
diff --git a/dev-python/pyao/pyao-0.81.ebuild b/dev-python/pyao/pyao-0.81.ebuild
deleted file mode 100644
index c36ea49b60c3..000000000000
--- a/dev-python/pyao/pyao-0.81.ebuild
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyao/pyao-0.81.ebuild,v 1.6 2007/07/11 06:19:47 mr_bones_ Exp $
-
-inherit distutils
-
-DESCRIPTION="Python bindings for the libao library"
-HOMEPAGE="http://www.andrewchatham.com/pyogg/"
-SRC_URI="http://www.andrewchatham.com/pyogg/download/${P}.tar.gz"
-
-IUSE=""
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="x86"
-
-DEPEND="virtual/python
- >=media-libs/libao-0.8.3"
-
-src_compile() {
- ./config_unix.py || die
- distutils_src_compile
-}
diff --git a/dev-python/pyao/pyao-0.82-r1.ebuild b/dev-python/pyao/pyao-0.82-r2.ebuild
index 5a3ef0beee97..690c950d29f9 100644
--- a/dev-python/pyao/pyao-0.82-r1.ebuild
+++ b/dev-python/pyao/pyao-0.82-r2.ebuild
@@ -1,6 +1,10 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyao/pyao-0.82-r1.ebuild,v 1.1 2009/04/23 13:05:04 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyao/pyao-0.82-r2.ebuild,v 1.1 2010/06/24 19:41:30 ssuominen Exp $
+
+EAPI=2
+
+PYTHON_DEPEND="2"
inherit eutils distutils
@@ -13,22 +17,19 @@ SLOT="0"
KEYWORDS="~amd64 ~ia64 ~ppc -sparc ~x86"
IUSE=""
-DEPEND="virtual/python
- >=media-libs/libao-0.8.3"
-RDEPEND="${DEPEND}"
+DEPEND=">=media-libs/libao-1.0.0"
-src_unpack() {
- unpack ${A}
- epatch "${FILESDIR}/pyao-fix-deallocation.patch" || die
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-new_api.patch
+ distutils_src_prepare
}
-src_compile() {
+src_configure() {
./config_unix.py || die
- distutils_src_compile
}
src_install() {
distutils_src_install
insinto /usr/share/doc/${PF}/examples
- doins test.py
+ doins test.py || die
}