Fix building with libao >= 1.0.0 wrt #314627 by Juergen Rose.
authorSamuli Suominen <ssuominen@gentoo.org>
Thu, 24 Jun 2010 19:41:30 +0000 (19:41 +0000)
committerSamuli Suominen <ssuominen@gentoo.org>
Thu, 24 Jun 2010 19:41:30 +0000 (19:41 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

dev-python/pyao/ChangeLog
dev-python/pyao/Manifest
dev-python/pyao/files/pyao-0.82-new_api.patch [new file with mode: 0644]
dev-python/pyao/files/pyao-fix-deallocation.patch [deleted file]
dev-python/pyao/pyao-0.81.ebuild [deleted file]
dev-python/pyao/pyao-0.82-r2.ebuild [moved from dev-python/pyao/pyao-0.82-r1.ebuild with 55% similarity]

index 0921efc2ce7a0e522261eedd198c250a0988bfca..f03481ed51e2dae5b2bdf18b396f45117a89bf9f 100644 (file)
@@ -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)
 
index 30b7656dbc50b78795d0e267dc379f6a78d81d4b..271b8213fd4748bf249cce01582d72791e60ad09 100644 (file)
@@ -1,8 +1,6 @@
-AUX pyao-fix-deallocation.patch 342 RMD160 e67f4488444805c3af2d806af43d41960a066c1d SHA1 c84d8b50fa6de35305bd752d1911fafc61c4178e SHA256 45ec10a444652fcfff73f314891018aaea165ad79c1bf5753a939ab3341b12fc
-DIST pyao-0.81.tar.gz 16066 RMD160 348a1c026d5a08128cbe0a0f7e93a23aa1877a2d SHA1 7761e64c430b18fd98cbf59e5b027ad9b9c07f84 SHA256 5e197597781de615ddf9f1c9201010bc3ccec08dbebecf9f9aef5dc99ea07d1a
+AUX pyao-0.82-new_api.patch 1626 RMD160 7e07165117b8da4d4214539b6a3c10576177da67 SHA1 31a43aec79ef6b305ca550eebe88c87763c02580 SHA256 06f99b0a677d1575f3bd95e0ff8d195d64b4464f47ff652c0ff83c244b842a37
 DIST pyao-0.82.tar.gz 15399 RMD160 6d602ef060ddc22b4cff841741c90fa88af45fed SHA1 9b213da96030648a5fa589d5eab7e1791374e269 SHA256 9a444518252f6d747e76a219e5efbc05b4e1742260a7419da9ddf93a519b30c5
-EBUILD pyao-0.81.ebuild 569 RMD160 2ab48722d1dea2b5b21a0fc8f66a6400dea76d4a SHA1 8c083cdac43fde805f2e5b4b610b481003df659e SHA256 1f342e77c95d9beb134fc89601ffdeb429c051f2f28c6db6f0850eee554665b4
-EBUILD pyao-0.82-r1.ebuild 807 RMD160 aff364e3a8f80be0257ef929f50068f6f9d53db8 SHA1 996f461f4e6ab3ca2d121149a364d94833a237f9 SHA256 19613723125f571544feee7e9b50585dd6ac1a83a1e884f3c8fcd38d07ae4ba4
+EBUILD pyao-0.82-r2.ebuild 781 RMD160 15546b35801e193674df729175656b4b214f2453 SHA1 99da18ba488fb253270a6a81ace3c68b398d9894 SHA256 2e9a8ed264d8e42800f7313f0476aa03df9be44997a5b957725af25ac81b4d3b
 EBUILD pyao-0.82.ebuild 685 RMD160 de86b270a5036cbabb996dc45e7780dad4994175 SHA1 a200bbd0d07ba7d0c43d68c532568640faa34ebb SHA256 dcf4a609d97a0241a0c336386fe8910ec74678429945d10b453c9f937fdcd9f6
-MISC ChangeLog 1697 RMD160 df133df3aa60a9fe8f8bfbb3bb832226fde47da8 SHA1 47049f19c34336e7a3fda9184806fe8256548cc0 SHA256 e8bf206e5ad8cd0877d274f4e8469133f206da65c6bb85b33600fa4e2d9bcc30
+MISC ChangeLog 1903 RMD160 c896f3d9389c2519de8afeefb136fd075e8b13e5 SHA1 ccf2bb26fc1ffcffd86bd146fc5245c419b756ca SHA256 03695fda933c07b98f9b737d5eecf5ca8180cdf3bd5216f0adb1f5ebd06726f7
 MISC metadata.xml 159 RMD160 900a8c55d7a7d2f6312594769aaf941bf9e99c7f SHA1 c8e604d56dae898258b5254d78cfeac0b981e288 SHA256 9f01104d3484792496faff4805eed0ecea2352a897151f3397d49a13800037b4
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 (file)
index 0000000..7a77d0a
--- /dev/null
@@ -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 (file)
index ae42227..0000000
+++ /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 (file)
index c36ea49..0000000
+++ /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
-}
similarity index 55%
rename from dev-python/pyao/pyao-0.82-r1.ebuild
rename to dev-python/pyao/pyao-0.82-r2.ebuild
index 5a3ef0beee97c7b55879d365ab0094244b973c5f..690c950d29f93dc4ceb91ea6e384ff5e3f148c71 100644 (file)
@@ -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
 }