summaryrefslogtreecommitdiff
path: root/dev-python/pyid3lib/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/pyid3lib/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/pyid3lib/files')
-rw-r--r--dev-python/pyid3lib/files/pyid3lib-0.5.1-gcc-4.4.patch20
-rw-r--r--dev-python/pyid3lib/files/pyid3lib-0.5.1-py25.patch57
2 files changed, 77 insertions, 0 deletions
diff --git a/dev-python/pyid3lib/files/pyid3lib-0.5.1-gcc-4.4.patch b/dev-python/pyid3lib/files/pyid3lib-0.5.1-gcc-4.4.patch
new file mode 100644
index 000000000000..04df9e0a6c98
--- /dev/null
+++ b/dev-python/pyid3lib/files/pyid3lib-0.5.1-gcc-4.4.patch
@@ -0,0 +1,20 @@
+--- pyid3lib.cc
++++ pyid3lib.cc
+@@ -920,7 +920,7 @@ enum frame_type
+
+ typedef struct
+ {
+- char* name;
++ const char* name;
+ ID3_FrameID fid;
+ frame_type type;
+ } magic_attribute;
+@@ -1030,7 +1030,7 @@ static PyObject* id3_getattr( ID3Object* self, char* attrname )
+ {
+ ID3_Frame* frame;
+ const char* str;
+- char* slash;
++ const char* slash;
+ ID3_Field* fld;
+ int i;
+
diff --git a/dev-python/pyid3lib/files/pyid3lib-0.5.1-py25.patch b/dev-python/pyid3lib/files/pyid3lib-0.5.1-py25.patch
new file mode 100644
index 000000000000..c24cfc97d5ac
--- /dev/null
+++ b/dev-python/pyid3lib/files/pyid3lib-0.5.1-py25.patch
@@ -0,0 +1,57 @@
+--- pyid3lib-0.5.1/pyid3lib.cc.orig 2007-08-08 23:53:08.000000000 +0300
++++ pyid3lib-0.5.1/pyid3lib.cc 2007-08-08 23:53:12.000000000 +0300
+@@ -10,13 +10,19 @@
+ #include <id3/id3lib_frame.h>
+ #include <id3/tag.h>
+
++#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
++typedef int Py_ssize_t;
++#define PY_SSIZE_T_MAX INT_MAX
++#define PY_SSIZE_T_MIN INT_MIN
++#endif
++
+ typedef struct
+ {
+ PyObject_HEAD
+
+ ID3_Tag* tag;
+ ID3_Frame** frames;
+- int size, alloc;
++ Py_ssize_t size, alloc;
+ } ID3Object;
+
+ typedef struct
+@@ -80,13 +86,24 @@
+
+
+ static PySequenceMethods tag_as_sequence = {
++#if PY_VERSION_HEX >= 0x02050000
++ (lenfunc)id3_length,
++#else
+ (inquiry)id3_length,
++#endif
+ NULL,
+ NULL,
++#if PY_VERSION_HEX >= 0x02050000
++ (ssizeargfunc)id3_item,
++ (ssizessizeargfunc)id3_slice,
++ (ssizeobjargproc)id3_ass_item,
++ (ssizessizeobjargproc)id3_ass_slice,
++#else
+ (intargfunc)id3_item,
+ (intintargfunc)id3_slice,
+ (intobjargproc)id3_ass_item,
+ (intintobjargproc)id3_ass_slice,
++#endif
+ (objobjproc)id3_contains,
+ NULL,
+ NULL,
+@@ -824,7 +841,7 @@
+ 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;