pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/py-id3lib Fix this to build on LP64 with python ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/8f2904ed33c1
branches: trunk
changeset: 567960:8f2904ed33c1
user: dholland <dholland%pkgsrc.org@localhost>
date: Sun Nov 29 23:04:15 2009 +0000
description:
Fix this to build on LP64 with python 2.5+. I added hacks so it should
still build on python 2.4, but I haven't tested them.
diffstat:
audio/py-id3lib/Makefile | 3 +-
audio/py-id3lib/distinfo | 3 +-
audio/py-id3lib/patches/patch-aa | 108 +++++++++++++++++++++++++++++++++++++++
3 files changed, 112 insertions(+), 2 deletions(-)
diffs (137 lines):
diff -r 7145436f23d4 -r 8f2904ed33c1 audio/py-id3lib/Makefile
--- a/audio/py-id3lib/Makefile Sun Nov 29 22:27:54 2009 +0000
+++ b/audio/py-id3lib/Makefile Sun Nov 29 23:04:15 2009 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2009/07/08 15:54:33 drochner Exp $
+# $NetBSD: Makefile,v 1.3 2009/11/29 23:04:15 dholland Exp $
#
DISTNAME= pyid3lib-0.5.1
PKGNAME= ${PYPKGPREFIX}-id3lib-0.5.1
+PKGREVISION= 1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pyid3lib/}
EXTRACT_SUFX= .tar.bz2
diff -r 7145436f23d4 -r 8f2904ed33c1 audio/py-id3lib/distinfo
--- a/audio/py-id3lib/distinfo Sun Nov 29 22:27:54 2009 +0000
+++ b/audio/py-id3lib/distinfo Sun Nov 29 23:04:15 2009 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2009/07/07 19:15:01 drochner Exp $
+$NetBSD: distinfo,v 1.2 2009/11/29 23:04:15 dholland Exp $
SHA1 (pyid3lib-0.5.1.tar.bz2) = 5026f9aa7f868a081a7caecc54cbdbc0cdaea27b
RMD160 (pyid3lib-0.5.1.tar.bz2) = cec0607aab0eeaaa953428a4d06c7b7a19232616
Size (pyid3lib-0.5.1.tar.bz2) = 21207 bytes
+SHA1 (patch-aa) = cd7858485c80394e544133846630f7df8a7b5690
diff -r 7145436f23d4 -r 8f2904ed33c1 audio/py-id3lib/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/py-id3lib/patches/patch-aa Sun Nov 29 23:04:15 2009 +0000
@@ -0,0 +1,108 @@
+$NetBSD: patch-aa,v 1.1 2009/11/29 23:04:15 dholland Exp $
+
+Fix for LP64 on python > 2.4.
+
+--- pyid3lib.cc.orig 2003-02-16 18:50:20.000000000 -0500
++++ pyid3lib.cc 2009-11-29 18:02:46.000000000 -0500
+@@ -10,6 +10,14 @@
+ #include <id3/id3lib_frame.h>
+ #include <id3/tag.h>
+
++#if defined(PY_MAJOR_VERSION) && PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
++typedef int Py_ssize_t;
++typedef intargfunc ssizeargfunc;
++typedef intintargfunc ssizessizeargfunc;
++typedef intobjargproc ssizeobjargproc;
++typedef intintobjargproc ssizessizeobjargproc;
++#endif
++
+ typedef struct
+ {
+ PyObject_HEAD
+@@ -61,11 +69,11 @@ static PyObject* dict_from_frame( ID3_Fr
+ static ID3_Frame* frame_from_dict( PyObject* dict );
+ static ID3_Frame* frame_from_dict( ID3_FrameID fid, PyObject* dict );
+
+-static int id3_length( ID3Object* self );
+-static PyObject* id3_item( ID3Object* self, int index );
+-static PyObject* id3_slice( ID3Object* self, int start, int end );
+-static int id3_ass_item( ID3Object* self, int index, PyObject* dict );
+-static int id3_ass_slice( ID3Object* self, int start, int end, PyObject* dict );
++static Py_ssize_t id3_length( ID3Object* self );
++static PyObject* id3_item( ID3Object* self, Py_ssize_t index );
++static PyObject* id3_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end );
++static int id3_ass_item( ID3Object* self, Py_ssize_t index, PyObject* dict );
++static int id3_ass_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end, PyObject* dict );
+ static int id3_contains( ID3Object* self, PyObject* other );
+
+ static PyObject* id3_append( ID3Object* self, PyObject* args );
+@@ -80,13 +88,13 @@ static PyObject* frameid_lookup = NULL;
+
+
+ static PySequenceMethods tag_as_sequence = {
+- (inquiry)id3_length,
++ (lenfunc)id3_length,
+ NULL,
+ NULL,
+- (intargfunc)id3_item,
+- (intintargfunc)id3_slice,
+- (intobjargproc)id3_ass_item,
+- (intintobjargproc)id3_ass_slice,
++ (ssizeargfunc)id3_item,
++ (ssizessizeargfunc)id3_slice,
++ (ssizeobjargproc)id3_ass_item,
++ (ssizessizeobjargproc)id3_ass_slice,
+ (objobjproc)id3_contains,
+ NULL,
+ NULL,
+@@ -236,12 +244,12 @@ static PyObject* id3iter_iternext( ID3It
+ //
+ /////////////////
+
+-static int id3_length( ID3Object* self )
++static Py_ssize_t id3_length( ID3Object* self )
+ {
+ return self->size;
+ }
+
+-static PyObject* id3_item( ID3Object* self, int index )
++static PyObject* id3_item( ID3Object* self, Py_ssize_t index )
+ {
+ if ( index < 0 )
+ index += self->size;
+@@ -255,7 +263,7 @@ static PyObject* id3_item( ID3Object* se
+ return dict_from_frame( self->frames[index] );
+ }
+
+-static PyObject* id3_slice( ID3Object* self, int start, int end )
++static PyObject* id3_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end )
+ {
+ PyObject* result;
+ int i;
+@@ -284,7 +292,7 @@ static PyObject* id3_slice( ID3Object* s
+ }
+
+
+-static int id3_ass_item( ID3Object* self, int index, PyObject* dict )
++static int id3_ass_item( ID3Object* self, Py_ssize_t index, PyObject* dict )
+ {
+ ID3_Frame* newframe;
+
+@@ -382,7 +390,7 @@ static ID3_Frame** frames_from_dictseq(
+ return NULL;
+ }
+
+-static int id3_ass_slice( ID3Object* self, int start, int end, PyObject* dictseq )
++static int id3_ass_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end, PyObject* dictseq )
+ {
+ int i, n;
+ int newsize;
+@@ -824,7 +832,7 @@ static ID3_Frame* frame_from_dict( PyObj
+ static ID3_Frame* frame_from_dict( ID3_FrameID fid, PyObject* dict )
+ {
+ char* data;
+- int size;
++ Py_ssize_t size;
+
+ ID3_Field* field;
+ ID3_FieldID flid;
Home |
Main Index |
Thread Index |
Old Index