Tue Feb 7 09:04:56 2012 UTC ()
change the last fix to safe way.


(obache)
diff -r1.5 -r1.6 pkgsrc/audio/py-id3lib/distinfo
diff -r1.4 -r1.5 pkgsrc/audio/py-id3lib/patches/patch-aa

cvs diff -r1.5 -r1.6 pkgsrc/audio/py-id3lib/distinfo (expand / switch to unified diff)

--- pkgsrc/audio/py-id3lib/distinfo 2012/02/05 22:27:09 1.5
+++ pkgsrc/audio/py-id3lib/distinfo 2012/02/07 09:04:56 1.6
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
1$NetBSD: distinfo,v 1.5 2012/02/05 22:27:09 sbd Exp $ 1$NetBSD: distinfo,v 1.6 2012/02/07 09:04:56 obache Exp $
2 2
3SHA1 (pyid3lib-0.5.1.tar.bz2) = 5026f9aa7f868a081a7caecc54cbdbc0cdaea27b 3SHA1 (pyid3lib-0.5.1.tar.bz2) = 5026f9aa7f868a081a7caecc54cbdbc0cdaea27b
4RMD160 (pyid3lib-0.5.1.tar.bz2) = cec0607aab0eeaaa953428a4d06c7b7a19232616 4RMD160 (pyid3lib-0.5.1.tar.bz2) = cec0607aab0eeaaa953428a4d06c7b7a19232616
5Size (pyid3lib-0.5.1.tar.bz2) = 21207 bytes 5Size (pyid3lib-0.5.1.tar.bz2) = 21207 bytes
6SHA1 (patch-aa) = f5df1b2756fdcc1f6f37a2670400187db732836e 6SHA1 (patch-aa) = 5d25f1d1d3547445ffd09769a6a6c0b1980526a8

cvs diff -r1.4 -r1.5 pkgsrc/audio/py-id3lib/patches/patch-aa (expand / switch to unified diff)

--- pkgsrc/audio/py-id3lib/patches/patch-aa 2012/02/05 22:27:09 1.4
+++ pkgsrc/audio/py-id3lib/patches/patch-aa 2012/02/07 09:04:56 1.5
@@ -1,16 +1,17 @@ @@ -1,16 +1,17 @@
1$NetBSD: patch-aa,v 1.4 2012/02/05 22:27:09 sbd Exp $ 1$NetBSD: patch-aa,v 1.5 2012/02/07 09:04:56 obache Exp $
2 2
3Fix for LP64 on python > 2.4. 3* Fix for LP64 on python > 2.4.
 4* `strchr' for `const char*' may return `const char*'.
4 5
5--- pyid3lib.cc.orig 2003-02-16 23:50:20.000000000 +0000 6--- pyid3lib.cc.orig 2003-02-16 23:50:20.000000000 +0000
6+++ pyid3lib.cc 7+++ pyid3lib.cc
7@@ -10,6 +10,17 @@ 8@@ -10,6 +10,17 @@
8 #include <id3/id3lib_frame.h> 9 #include <id3/id3lib_frame.h>
9 #include <id3/tag.h> 10 #include <id3/tag.h>
10  11
11+#if defined(PY_MAJOR_VERSION) && PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5 12+#if defined(PY_MAJOR_VERSION) && PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5
12+typedef int Py_ssize_t; 13+typedef int Py_ssize_t;
13+typedef intargfunc ssizeargfunc; 14+typedef intargfunc ssizeargfunc;
14+typedef intintargfunc ssizessizeargfunc; 15+typedef intintargfunc ssizessizeargfunc;
15+typedef intobjargproc ssizeobjargproc; 16+typedef intobjargproc ssizeobjargproc;
16+typedef intintobjargproc ssizessizeobjargproc; 17+typedef intintobjargproc ssizessizeobjargproc;
@@ -81,40 +82,40 @@ Fix for LP64 on python > 2.4. @@ -81,40 +82,40 @@ Fix for LP64 on python > 2.4.
81+static PyObject* id3_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end ) 82+static PyObject* id3_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end )
82 { 83 {
83 PyObject* result; 84 PyObject* result;
84 int i; 85 int i;
85@@ -284,7 +295,7 @@ static PyObject* id3_slice( ID3Object* s 86@@ -284,7 +295,7 @@ static PyObject* id3_slice( ID3Object* s
86 } 87 }
87  88
88  89
89-static int id3_ass_item( ID3Object* self, int index, PyObject* dict ) 90-static int id3_ass_item( ID3Object* self, int index, PyObject* dict )
90+static int id3_ass_item( ID3Object* self, Py_ssize_t index, PyObject* dict ) 91+static int id3_ass_item( ID3Object* self, Py_ssize_t index, PyObject* dict )
91 { 92 {
92 ID3_Frame* newframe; 93 ID3_Frame* newframe;
93  94
94@@ -382,7 +393,7 @@ static ID3_Frame** frames_from_dictseq( 95@@ -382,7 +393,7 @@ static ID3_Frame** frames_from_dictseq(
95 return NULL; 96 return NULL;
96 } 97 }
97  98
98-static int id3_ass_slice( ID3Object* self, int start, int end, PyObject* dictseq ) 99-static int id3_ass_slice( ID3Object* self, int start, int end, PyObject* dictseq )
99+static int id3_ass_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end, PyObject* dictseq ) 100+static int id3_ass_slice( ID3Object* self, Py_ssize_t start, Py_ssize_t end, PyObject* dictseq )
100 { 101 {
101 int i, n; 102 int i, n;
102 int newsize; 103 int newsize;
103@@ -824,7 +835,7 @@ static ID3_Frame* frame_from_dict( PyObj 104@@ -824,7 +835,7 @@ static ID3_Frame* frame_from_dict( PyObj
104 static ID3_Frame* frame_from_dict( ID3_FrameID fid, PyObject* dict ) 105 static ID3_Frame* frame_from_dict( ID3_FrameID fid, PyObject* dict )
105 { 106 {
106 char* data; 107 char* data;
107- int size; 108- int size;
108+ Py_ssize_t size; 109+ Py_ssize_t size;
109  110
110 ID3_Field* field; 111 ID3_Field* field;
111 ID3_FieldID flid; 112 ID3_FieldID flid;
112@@ -1054,7 +1065,7 @@ static PyObject* id3_getattr( ID3Object* 113@@ -1013,7 +1024,7 @@ static PyObject* id3_getattr( ID3Object*
113 fld = frame->GetField( ID3FN_TEXT ); 114 {
114 str = fld->GetRawText(); 115 ID3_Frame* frame;
115  116 const char* str;
116- if ( (slash = strchr( str, '/' )) != NULL ) 117- char* slash;
117+ if ( (slash = (char *)strchr( str, '/' )) != NULL ) 118+ const char* slash;
118 result = Py_BuildValue( "ii", atoi( str ), atoi( slash+1 ) ); 119 ID3_Field* fld;
119 else 120 int i;
120 result = Py_BuildValue( "(i)", atoi( str ) ); 121