summaryrefslogtreecommitdiffstats
path: root/media-libs/libid3tag
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /media-libs/libid3tag
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'media-libs/libid3tag')
-rw-r--r--media-libs/libid3tag/Manifest14
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-64bit-long.patch24
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch35
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-compat.patch13
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-file-write.patch52
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-fix_overflow.patch11
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-tag.patch17
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch27
-rw-r--r--media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch22
-rw-r--r--media-libs/libid3tag/files/id3tag.pc11
-rw-r--r--media-libs/libid3tag/files/libid3tag-0.15.1b-ds-rcc.patch300
-rw-r--r--media-libs/libid3tag/libid3tag-0.15.1b-r1.ebuild47
-rw-r--r--media-libs/libid3tag/libid3tag-0.15.1b-r3.ebuild55
-rw-r--r--media-libs/libid3tag/libid3tag-0.15.1b-r4.ebuild56
14 files changed, 684 insertions, 0 deletions
diff --git a/media-libs/libid3tag/Manifest b/media-libs/libid3tag/Manifest
new file mode 100644
index 0000000..43abd1b
--- /dev/null
+++ b/media-libs/libid3tag/Manifest
@@ -0,0 +1,14 @@
+AUX 0.15.1b/libid3tag-0.15.1b-64bit-long.patch 567 RMD160 b045933419998fb569f5be661b03e7bc5d862003 SHA1 f9778590811a050384b9bf8827345b61999f0da3 SHA256 5f8b3d3419addf90977832b0a6e563acc2c8e243bb826ebb6d0ec573ec122e1b
+AUX 0.15.1b/libid3tag-0.15.1b-a_capella.patch 1365 RMD160 cc588ded6d7a1d69d91ca714854e29232954baaa SHA1 d2bd03350f13198a36a189cd1e9042aeed41a4e9 SHA256 07bb9a3fa3e0e7e74987725dc8eb29924e5177048d8d09e43bbd19b0e4ad09b8
+AUX 0.15.1b/libid3tag-0.15.1b-compat.patch 452 RMD160 e8a422004935e18c2217c9ac623d4895c17ad471 SHA1 8c179b10bf49385e4334aab141e4cf270cb02182 SHA256 88f486c3d263a4dd5bb556232dcfe2fba175b5124bcdd72aa6c30f562fc87d53
+AUX 0.15.1b/libid3tag-0.15.1b-file-write.patch 1344 RMD160 4f3179f4164559a64339ceaa522b6643d999332d SHA1 b7baae1c87f90aac64a4d17725b2eaad521e42af SHA256 eff855cabd8a51866a29246a1b257da64f46aab72d4b8e163e2a4c0d15165bf1
+AUX 0.15.1b/libid3tag-0.15.1b-fix_overflow.patch 324 RMD160 d6ecbbb97a76872791447102da61748b1ccdca7a SHA1 ed80bc74bd81caa225952f72a1a28d54300e43e3 SHA256 43ea3e0b324fb25802dae6410564c947ce1982243c781ef54b023f060c3b0ac4
+AUX 0.15.1b/libid3tag-0.15.1b-tag.patch 527 RMD160 5ec862828df4fe66e47047f135d2b52aba285a29 SHA1 b7ef9a41a31a37b8bb6d8e064b0c0ba618d3fa03 SHA256 ca7262ddad158ab0be804429d705f8c6a1bb120371dec593323fa4876c1b277f
+AUX 0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch 879 RMD160 c4b4ac0a7d013fe06075ae7ebb7b7a9f93805159 SHA1 093def535edb3d2f5be6b173eedf0f93a1c0314c SHA256 8b695c9c05e3885655b2e798326b804011615bc6c831cd55cdbacc456a6b9494
+AUX 0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch 753 RMD160 337a896343f79e83737048bd0e7f56bb5154eced SHA1 dcc01e31d5131c9be5a4dd7efe72b4fad46df9a5 SHA256 8d28c8cc163caebb4a7f927f2d80f317dfd6d8927e3235d19c006b3881f9447e
+AUX id3tag.pc 222 RMD160 f2ef95aaed166edc84d837854086ddbd45a7ff76 SHA1 db4be8657dc22311fa2ef63355261df26449a126 SHA256 46465c31b4e7e873f10f6e7ca3e642b55cb48a398a04dd3b0605d4fdd58d3c05
+AUX libid3tag-0.15.1b-ds-rcc.patch 7724 RMD160 0a0d3e46800c2f1652237290330adfae1e3d6d74 SHA1 6a72832d58579125f406857169f33bff1184241f SHA256 d975f85e5c5ebe52b272739f3b942738b4cc193ac2467aef054abc913bbbaee6
+DIST libid3tag-0.15.1b.tar.gz 338143 RMD160 31a69b8ad7684aefdb675acc8ebf89bd6f432095 SHA1 4d867e8a8436e73cd7762fe0e85958e35f1e4306 SHA256 63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151
+EBUILD libid3tag-0.15.1b-r1.ebuild 1183 RMD160 281f90e28bbdcae932665b366e6be97ec8d44376 SHA1 cbb985b15036c40ce78cb17918d28d0a02c2cbbd SHA256 fafa7c2f99b3adfecfb6440dccb536807f30b02c5a0ae3666b978365543ff80b
+EBUILD libid3tag-0.15.1b-r3.ebuild 1320 RMD160 d3d52658a2659f7c08346a9c8feb85e3fe403921 SHA1 0a9f460b27c9f70803ad105b2515a484e19547f8 SHA256 7d31b906c7dc9e0ce03dedb72a6ca106b8587dbd732e5c3f33d551f726472c13
+EBUILD libid3tag-0.15.1b-r4.ebuild 1354 RMD160 0e78b26192098715978c8d9bfbc7494d752f7acd SHA1 98617f2bb90fafc8353a77ae4ff5b024d5bf1070 SHA256 3ccf661153e1658f3188bd9e04baeed6d4e01ad01365476e39a4342a63e8510e
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-64bit-long.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-64bit-long.patch
new file mode 100644
index 0000000..852d9ef
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-64bit-long.patch
@@ -0,0 +1,24 @@
+--- id3tag.h.orig 2004-01-23 18:22:46.000000000 -0500
++++ id3tag.h 2008-05-04 19:46:33.000000000 -0400
+@@ -25,6 +25,8 @@
+ # ifndef LIBID3TAG_ID3TAG_H
+ # define LIBID3TAG_ID3TAG_H
+
++#include <stdint.h>
++
+ # ifdef __cplusplus
+ extern "C" {
+ # endif
+@@ -36,10 +38,10 @@
+ typedef unsigned char id3_byte_t;
+ typedef unsigned long id3_length_t;
+
+-typedef unsigned long id3_ucs4_t;
++typedef uint32_t id3_ucs4_t;
+
+ typedef unsigned char id3_latin1_t;
+-typedef unsigned short id3_utf16_t;
++typedef uint16_t id3_utf16_t;
+ typedef signed char id3_utf8_t;
+
+ struct id3_tag {
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch
new file mode 100644
index 0000000..a453080
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-a_capella.patch
@@ -0,0 +1,35 @@
+diff -urNad /home/debian/mad/libid3tag-0.15.1b/libid3tag-0.15.1b/genre.dat libid3tag-0.15.1b/genre.dat
+--- /home/debian/mad/libid3tag-0.15.1b/libid3tag-0.15.1b/genre.dat 2004-02-16 21:34:39.000000000 -0500
++++ libid3tag-0.15.1b/genre.dat 2004-09-06 09:50:33.000000000 -0400
+@@ -277,8 +277,8 @@
+ { 'P', 'u', 'n', 'k', ' ', 'R', 'o', 'c', 'k', 0 };
+ static id3_ucs4_t const genre_DRUM_SOLO[] =
+ { 'D', 'r', 'u', 'm', ' ', 'S', 'o', 'l', 'o', 0 };
+-static id3_ucs4_t const genre_A_CAPPELLA[] =
+- { 'A', ' ', 'C', 'a', 'p', 'p', 'e', 'l', 'l', 'a', 0 };
++static id3_ucs4_t const genre_A_CAPELLA[] =
++ { 'A', ' ', 'C', 'a', 'p', 'e', 'l', 'l', 'a', 0 };
+ static id3_ucs4_t const genre_EURO_HOUSE[] =
+ { 'E', 'u', 'r', 'o', '-', 'H', 'o', 'u', 's', 'e', 0 };
+ static id3_ucs4_t const genre_DANCE_HALL[] =
+@@ -452,7 +452,7 @@
+ genre_DUET,
+ genre_PUNK_ROCK,
+ genre_DRUM_SOLO,
+- genre_A_CAPPELLA,
++ genre_A_CAPELLA,
+ genre_EURO_HOUSE,
+ genre_DANCE_HALL,
+ genre_GOA,
+diff -urNad /home/debian/mad/libid3tag-0.15.1b/libid3tag-0.15.1b/genre.dat.in libid3tag-0.15.1b/genre.dat.in
+--- /home/debian/mad/libid3tag-0.15.1b/libid3tag-0.15.1b/genre.dat.in 2004-01-23 04:41:32.000000000 -0500
++++ libid3tag-0.15.1b/genre.dat.in 2004-09-06 09:50:33.000000000 -0400
+@@ -153,7 +153,7 @@
+ Duet
+ Punk Rock
+ Drum Solo
+-A Cappella
++A Capella
+ Euro-House
+ Dance Hall
+ Goa
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-compat.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-compat.patch
new file mode 100644
index 0000000..6ef1a22
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-compat.patch
@@ -0,0 +1,13 @@
+diff -ur libid3tag-0.15.1b/compat.gperf libid3tag-0.15.1b.fixed/compat.gperf
+--- libid3tag-0.15.1b/compat.gperf Fri Jan 23 01:41:32 2004
++++ libid3tag-0.15.1b.fixed/compat.gperf Thu Oct 19 12:21:10 2006
+@@ -237,6 +237,9 @@
+ encoding = id3_parse_uint(&data, 1);
+ string = id3_parse_string(&data, end - data, encoding, 0);
+
++ if (string == 0)
++ continue;
++
+ if (id3_ucs4_length(string) < 4) {
+ free(string);
+ continue;
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-file-write.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-file-write.patch
new file mode 100644
index 0000000..aa61d09
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-file-write.patch
@@ -0,0 +1,52 @@
+diff -ur -x '*.lo' -x '*.o' -x config.h -x config.log libid3tag-0.15.1b/file.c libid3tag-0.15.1b-fixed/file.c
+--- libid3tag-0.15.1b/file.c 2004-01-23 12:41:32.000000000 +0300
++++ libid3tag-0.15.1b-fixed/file.c 2005-05-24 23:34:08.000000000 +0400
+@@ -37,6 +37,10 @@
+ # include <assert.h>
+ # endif
+
++# ifdef HAVE_SYS_STAT_H
++# include <sys/stat.h>
++# endif
++
+ # include "id3tag.h"
+ # include "file.h"
+ # include "tag.h"
+@@ -575,6 +579,10 @@
+ int v2_write(struct id3_file *file,
+ id3_byte_t const *data, id3_length_t length)
+ {
++ struct stat st;
++ char *buffer;
++ id3_length_t datalen, offset;
++
+ assert(!data || length > 0);
+
+ if (data &&
+@@ -592,9 +600,25 @@
+ }
+
+ /* hard general case: rewrite entire file */
++ if (stat(file->path, &st) == -1)
++ return -1;
+
+- /* ... */
++ offset = file->tags ? file->tags[0].length : 0;
++ datalen = st.st_size - offset;
++ if ((buffer = (char *) malloc(datalen)) == NULL)
++ return -1;
+
++ if (fseek(file->iofile, offset, SEEK_SET) == -1 ||
++ fread(buffer, datalen, 1, file->iofile) != 1 ||
++ fseek(file->iofile, 0, SEEK_SET) == -1 ||
++ fwrite(data, length, 1, file->iofile) != 1 ||
++ fwrite(buffer, datalen, 1, file->iofile) != 1 ||
++ fflush(file->iofile) == EOF) {
++ free(buffer);
++ return -1;
++ }
++ free(buffer);
++
+ done:
+ return 0;
+ }
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-fix_overflow.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-fix_overflow.patch
new file mode 100644
index 0000000..26c54c5
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-fix_overflow.patch
@@ -0,0 +1,11 @@
+--- field.c.orig 2008-05-05 09:49:15.000000000 -0400
++++ field.c 2008-05-05 09:49:25.000000000 -0400
+@@ -291,7 +291,7 @@
+
+ end = *ptr + length;
+
+- while (end - *ptr > 0) {
++ while (end - *ptr > 0 && **ptr != '\0') {
+ ucs4 = id3_parse_string(ptr, end - *ptr, *encoding, 0);
+ if (ucs4 == 0)
+ goto fail;
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-tag.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-tag.patch
new file mode 100644
index 0000000..2badfb3
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-tag.patch
@@ -0,0 +1,17 @@
+--- tag.c.orig Fri Apr 18 18:14:33 2003
++++ tag.c Mon Sep 26 22:29:24 2005
+@@ -714,9 +714,12 @@
+
+ frame = id3_tag_findframe(tag, ID3_FRAME_TRACK, 0);
+ if (frame) {
+- unsigned int track;
++ id3_ucs4_t const *string;
++ unsigned int track = 0;
+
+- track = id3_ucs4_getnumber(id3_field_getstrings(&frame->fields[1], 0));
++ string = id3_field_getstrings(&frame->fields[1], 0);
++ if (string)
++ track = id3_ucs4_getnumber(string);
+ if (track > 0 && track <= 0xff) {
+ ptr[-2] = 0;
+ ptr[-1] = track;
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch
new file mode 100644
index 0000000..7c70d00
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-unknown-encoding.patch
@@ -0,0 +1,27 @@
+diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf
+--- libid3tag-0.15.1b~/compat.gperf 2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000
+@@ -236,6 +236,10 @@
+
+ encoding = id3_parse_uint(&data, 1);
+ string = id3_parse_string(&data, end - data, encoding, 0);
++ if (!string)
++ {
++ continue;
++ }
+
+ if (id3_ucs4_length(string) < 4) {
+ free(string);
+diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c
+--- libid3tag-0.15.1b~/parse.c 2004-01-23 09:41:32.000000000 +0000
++++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000
+@@ -165,6 +165,9 @@
+ case ID3_FIELD_TEXTENCODING_UTF_8:
+ ucs4 = id3_utf8_deserialize(ptr, length);
+ break;
++ default:
++ /* FIXME: Unknown encoding! Print warning? */
++ return NULL;
+ }
+
+ if (ucs4 && !full) {
diff --git a/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch
new file mode 100644
index 0000000..72ed118
--- /dev/null
+++ b/media-libs/libid3tag/files/0.15.1b/libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch
@@ -0,0 +1,22 @@
+diff -urNad libid3tag-0.15.1b/utf16.c /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c
+--- libid3tag-0.15.1b/utf16.c 2006-01-13 15:26:29.000000000 +0100
++++ /tmp/dpep.tKvO7a/libid3tag-0.15.1b/utf16.c 2006-01-13 15:27:19.000000000 +0100
+@@ -282,5 +282,18 @@
+
+ free(utf16);
+
++ if (end == *ptr && length % 2 != 0)
++ {
++ /* We were called with a bogus length. It should always
++ * be an even number. We can deal with this in a few ways:
++ * - Always give an error.
++ * - Try and parse as much as we can and
++ * - return an error if we're called again when we
++ * already tried to parse everything we can.
++ * - tell that we parsed it, which is what we do here.
++ */
++ (*ptr)++;
++ }
++
+ return ucs4;
+ }
diff --git a/media-libs/libid3tag/files/id3tag.pc b/media-libs/libid3tag/files/id3tag.pc
new file mode 100644
index 0000000..01678db
--- /dev/null
+++ b/media-libs/libid3tag/files/id3tag.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: id3tag
+Description: ID3 tag reading library
+Requires:
+Version: 0.15.0b
+Libs: -L${libdir} -lid3tag -lz
+Cflags: -L${includedir}
diff --git a/media-libs/libid3tag/files/libid3tag-0.15.1b-ds-rcc.patch b/media-libs/libid3tag/files/libid3tag-0.15.1b-ds-rcc.patch
new file mode 100644
index 0000000..4641f3d
--- /dev/null
+++ b/media-libs/libid3tag/files/libid3tag-0.15.1b-ds-rcc.patch
@@ -0,0 +1,300 @@
+diff -dPNur libid3tag-0.15.1b/configure.ac libid3tag-0.15.1b-ds/configure.ac
+--- libid3tag-0.15.1b/configure.ac 2004-01-24 00:22:46.000000000 +0100
++++ libid3tag-0.15.1b-ds/configure.ac 2008-04-12 21:36:35.000000000 +0200
+@@ -145,6 +145,22 @@
+ *** environment variable to specify its installed location, e.g. -L<dir>.])
+ ])
+
++
++AC_CHECK_LIB(rcc, rccInit,[
++ AC_CHECK_HEADERS(librcc.h,[
++ LIBRCC_LIBS="-lrcc"
++ LIBRCC_INCLUDES="-DHAVE_LIBRCC"
++ ],[
++ LIBRCC_LIBS=""
++ LIBRCC_INCLUDES=""
++])],[
++ LIBRCC_LIBS=""
++ LIBRCC_INCLUDES=""
++])
++AC_SUBST(LIBRCC_LIBS)
++AC_SUBST(LIBRCC_INCLUDES)
++
++
+ dnl handle --enable and --disable options
+
+ AC_CACHE_SAVE
+diff -dPNur libid3tag-0.15.1b/latin1.c libid3tag-0.15.1b-ds/latin1.c
+--- libid3tag-0.15.1b/latin1.c 2004-01-23 10:41:32.000000000 +0100
++++ libid3tag-0.15.1b-ds/latin1.c 2008-04-12 21:36:35.000000000 +0200
+@@ -31,6 +31,9 @@
+ # include "latin1.h"
+ # include "ucs4.h"
+
++# include "utf8.h"
++# include "rccpatch.h"
++
+ /*
+ * NAME: latin1->length()
+ * DESCRIPTION: return the number of ucs4 chars represented by a latin1 string
+@@ -172,6 +175,11 @@
+ id3_length_t size = 0;
+ id3_latin1_t latin1[1], *out;
+
++/*
++ Theoretically, we should add here a code for converting ucs4 to
++ recoded latin1 string. However, using non-standard latin1 tags
++ in ID3v.2 tags is completely idiotic. So, I'll not do that.
++*/
+ while (*ucs4) {
+ switch (id3_latin1_encodechar(out = latin1, *ucs4++)) {
+ case 1: size += id3_latin1_put(ptr, *out++);
+@@ -193,6 +201,7 @@
+ {
+ id3_byte_t const *end;
+ id3_latin1_t *latin1ptr, *latin1;
++ id3_utf8_t *utf8;
+ id3_ucs4_t *ucs4;
+
+ end = *ptr + length;
+@@ -207,6 +216,19 @@
+
+ *latin1ptr = 0;
+
++
++ utf8 = rccPatchLatin2UTF(latin1);
++ if (utf8) {
++ ucs4 = malloc((id3_utf8_length(utf8) + 1) * sizeof(*ucs4));
++ if (ucs4)
++ id3_utf8_decode(utf8, ucs4);
++ free(utf8);
++ free(latin1);
++
++
++ return ucs4;
++ }
++
+ ucs4 = malloc((id3_latin1_length(latin1) + 1) * sizeof(*ucs4));
+ if (ucs4)
+ id3_latin1_decode(latin1, ucs4);
+diff -dPNur libid3tag-0.15.1b/Makefile.am libid3tag-0.15.1b-ds/Makefile.am
+--- libid3tag-0.15.1b/Makefile.am 2004-02-17 03:11:28.000000000 +0100
++++ libid3tag-0.15.1b-ds/Makefile.am 2008-04-12 21:36:35.000000000 +0200
+@@ -81,6 +81,7 @@
+ libid3tag_la_SOURCES = version.c ucs4.c latin1.c utf16.c utf8.c \
+ parse.c render.c field.c frametype.c compat.c \
+ genre.c frame.c crc.c util.c tag.c file.c \
++ rccpatch.c rccpatch.h \
+ version.h ucs4.h latin1.h utf16.h utf8.h \
+ parse.h render.h field.h frametype.h compat.h \
+ genre.h frame.h crc.h util.h tag.h file.h \
+@@ -90,7 +91,8 @@
+ frametype.gperf compat.gperf genre.dat.in \
+ debug.c debug.h
+
+-libid3tag_la_LDFLAGS = -version-info $(version_info)
++INCLUDES = @LIBRCC_INCLUDES@
++libid3tag_la_LDFLAGS = -version-info $(version_info) @LIBRCC_LIBS@
+
+ BUILT_SOURCES = frametype.c compat.c genre.dat
+
+diff -dPNur libid3tag-0.15.1b/rccpatch.c libid3tag-0.15.1b-ds/rccpatch.c
+--- libid3tag-0.15.1b/rccpatch.c 1970-01-01 01:00:00.000000000 +0100
++++ libid3tag-0.15.1b-ds/rccpatch.c 2008-04-12 21:36:35.000000000 +0200
+@@ -0,0 +1,96 @@
++#include <stdlib.h>
++#include "rccpatch.h"
++
++#ifdef HAVE_LIBRCC
++# include <librcc.h>
++#endif /* HAVE_LIBRCC */
++
++
++#ifdef HAVE_LIBRCC
++# define ID3_CLASS 0
++# define ID3V2_CLASS 1
++# define UTF_CLASS 2
++# define OUT_CLASS 3
++static rcc_class classes[] = {
++ { "id3", RCC_CLASS_STANDARD, NULL, NULL, "ID3 Encoding", 0 },
++ { "id3v2", RCC_CLASS_STANDARD, "id3", NULL, "ID3 v.2 Encoding", 0 },
++ { "utf", RCC_CLASS_KNOWN, "UTF-8", NULL, "Unicode Encoding", 0},
++ { "out", RCC_CLASS_TRANSLATE_LOCALE, "LC_CTYPE", NULL, "Output Encoding", 0 },
++ { NULL, RCC_CLASS_STANDARD, NULL, NULL, NULL, 0 }
++};
++
++static int rcc_initialized = 0;
++
++static rcc_context ctx = NULL;
++#endif /* HAVE_LIBRCC */
++
++
++void rccPatchFree() {
++#ifdef HAVE_LIBRCC
++ if (rcc_initialized) {
++ rccFree();
++ rcc_initialized = 0;
++ }
++#endif /* HAVE_LIBRCC */
++}
++
++void rccPatchInit() {
++#ifdef HAVE_LIBRCC
++ if (rcc_initialized) return;
++ rccInit();
++ rccInitDefaultContext(NULL, 0, 0, classes, 0);
++ rccLoad(NULL, "xmms");
++ rccInitDb4(NULL, NULL, 0);
++ rcc_initialized = 1;
++#endif /* HAVE_LIBRCC */
++}
++
++void rccPatchSetContext(void *newctx) {
++#ifdef HAVE_LIBRCC
++ if (newctx) {
++ ctx = (rcc_context)newctx;
++ rcc_initialized = 1;
++ }
++#endif /* HAVE_LIBRCC */
++}
++
++static void rccPatchTryInit() {
++#ifdef HAVE_LIBRCC
++ if (!rcc_initialized) {
++ rccPatchInit();
++ if (rcc_initialized) atexit(rccPatchFree);
++ }
++#endif /* HAVE_LIBRCC */
++}
++
++
++id3_utf8_t *rccPatchLatin2UTF(id3_latin1_t *str) {
++#ifdef HAVE_LIBRCC
++ rccPatchTryInit();
++
++ return rccRecode(ctx, ID3_CLASS, UTF_CLASS, str);
++#else
++ return NULL;
++#endif /* HAVE_LIBRCC */
++}
++
++id3_latin1_t *rccPatchUTF2Latin(id3_utf8_t *str) {
++#ifdef HAVE_LIBRCC
++ rccPatchTryInit();
++
++ return rccRecode(ctx, UTF_CLASS, ID3_CLASS, str);
++#else
++ return NULL;
++#endif /* HAVE_LIBRCC */
++}
++
++id3_latin1_t *rccPatchUTF2Out(id3_utf8_t *str) {
++#ifdef HAVE_LIBRCC
++ rccPatchTryInit();
++
++ return rccRecode(ctx, UTF_CLASS, OUT_CLASS, str);
++#else
++ return NULL;
++#endif /* HAVE_LIBRCC */
++}
++
+diff -dPNur libid3tag-0.15.1b/rccpatch.h libid3tag-0.15.1b-ds/rccpatch.h
+--- libid3tag-0.15.1b/rccpatch.h 1970-01-01 01:00:00.000000000 +0100
++++ libid3tag-0.15.1b-ds/rccpatch.h 2008-04-12 21:36:35.000000000 +0200
+@@ -0,0 +1,15 @@
++#ifndef _RCC_PATCH_H
++#define _RCC_PATCH_H
++
++#include "id3tag.h"
++
++void rccPatchFree();
++void rccPatchInit();
++void rccPatchSetContext(void *newctx);
++
++id3_utf8_t *rccPatchLatin2UTF(id3_latin1_t *str);
++id3_latin1_t *rccPatchUTF2Latin(id3_utf8_t *str);
++id3_latin1_t *rccPatchUTF2Out(id3_utf8_t *str);
++
++
++#endif /* _RCC_PATCH_H */
+diff -dPNur libid3tag-0.15.1b/tag.c libid3tag-0.15.1b-ds/tag.c
+--- libid3tag-0.15.1b/tag.c 2004-02-17 03:04:10.000000000 +0100
++++ libid3tag-0.15.1b-ds/tag.c 2008-04-12 21:37:12.000000000 +0200
+@@ -45,6 +45,9 @@
+ # include "field.h"
+ # include "util.h"
+
++# include "utf8.h"
++# include "rccpatch.h"
++
+ /*
+ * NAME: tag->new()
+ * DESCRIPTION: allocate and return a new, empty tag
+@@ -335,6 +338,8 @@
+ {
+ struct id3_frame *frame;
+ id3_ucs4_t ucs4[31];
++
++ id3_utf8_t *utf8;
+
+ if (text) {
+ trim(text);
+@@ -350,9 +355,15 @@
+ ID3_FIELD_TEXTENCODING_ISO_8859_1) == -1)
+ goto fail;
+
+- if (text)
++ if (text) {
++ utf8 = rccPatchLatin2UTF(text);
++ if (utf8) {
++ if (strlen(utf8) > 30) utf8[30] = 0;
++ id3_utf8_decode(utf8, ucs4);
++ free(utf8);
++ } else
+ id3_latin1_decode(text, ucs4);
+- else
++ } else
+ id3_ucs4_putnumber(ucs4, number);
+
+ if (strcmp(id, ID3_FRAME_COMMENT) == 0) {
+diff -dPNur libid3tag-0.15.1b/ucs4.c libid3tag-0.15.1b-ds/ucs4.c
+--- libid3tag-0.15.1b/ucs4.c 2004-01-23 10:41:32.000000000 +0100
++++ libid3tag-0.15.1b-ds/ucs4.c 2008-04-12 21:36:35.000000000 +0200
+@@ -33,6 +33,9 @@
+ # include "utf16.h"
+ # include "utf8.h"
+
++# include <string.h>
++# include "rccpatch.h"
++
+ id3_ucs4_t const id3_ucs4_empty[] = { 0 };
+
+ /*
+@@ -125,6 +128,27 @@
+ {
+ id3_latin1_t *latin1;
+
++
++ id3_latin1_t *ltmp;
++ id3_utf8_t *utf8;
++
++ utf8 = malloc(id3_ucs4_utf8size(ucs4) * sizeof(*utf8));
++ if (utf8) {
++ id3_utf8_encode(utf8, ucs4);
++ ltmp = rccPatchUTF2Out(utf8);
++ free(utf8);
++
++ if (ltmp) {
++ latin1 = malloc((1+strlen(ltmp))*sizeof(char));
++ if (latin1) {
++ memcpy(latin1, ltmp, (1+strlen(ltmp)));
++ free(ltmp);
++ return release(latin1);
++ }
++ free(ltmp);
++ }
++ }
++
+ latin1 = malloc(id3_ucs4_latin1size(ucs4) * sizeof(*latin1));
+ if (latin1)
+ id3_latin1_encode(latin1, ucs4);
diff --git a/media-libs/libid3tag/libid3tag-0.15.1b-r1.ebuild b/media-libs/libid3tag/libid3tag-0.15.1b-r1.ebuild
new file mode 100644
index 0000000..ef16925
--- /dev/null
+++ b/media-libs/libid3tag/libid3tag-0.15.1b-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libid3tag/libid3tag-0.15.1b.ebuild,v 1.24 2006/10/04 17:34:19 grobian Exp $
+
+inherit eutils multilib
+
+DESCRIPTION="The MAD id3tag library"
+HOMEPAGE="http://www.underbit.com/products/mad/"
+SRC_URI="mirror://sourceforge/mad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sh sparc x86 ~x86-fbsd"
+IUSE="debug"
+
+DEPEND=">=sys-libs/zlib-1.1.3"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epunt_cxx #74489
+
+#SDS
+ epatch "${FILESDIR}"/libid3tag-0.15.1b-ds-rcc.patch
+ libtoolize --copy --force
+ aclocal
+ automake
+ autoconf
+#EDS
+}
+
+src_compile() {
+ econf $(use_enable debug debugging) || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die "make install failed"
+
+ dodoc CHANGES CREDITS README TODO VERSION
+
+ # This file must be updated with every version update
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${FILESDIR}/id3tag.pc
+ sed -i -e "s:libdir=\${exec_prefix}/lib:libdir=/usr/$(get_libdir):" \
+ ${D}/usr/$(get_libdir)/pkgconfig/id3tag.pc
+}
diff --git a/media-libs/libid3tag/libid3tag-0.15.1b-r3.ebuild b/media-libs/libid3tag/libid3tag-0.15.1b-r3.ebuild
new file mode 100644
index 0000000..87a041b
--- /dev/null
+++ b/media-libs/libid3tag/libid3tag-0.15.1b-r3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libid3tag/libid3tag-0.15.1b-r2.ebuild,v 1.6 2008/05/07 18:46:14 corsair Exp $
+
+inherit eutils multilib
+
+DESCRIPTION="The MAD id3tag library"
+HOMEPAGE="http://www.underbit.com/products/mad/"
+SRC_URI="mirror://sourceforge/mad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd"
+IUSE="debug"
+
+DEPEND="dev-util/gperf
+ sys-devel/libtool"
+
+RDEPEND="${DEPEND}
+ >=sys-libs/zlib-1.1.3"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epunt_cxx #74489
+
+ epatch "${FILESDIR}/${PV}"/*.patch
+
+#SDS
+ epatch "${FILESDIR}"/libid3tag-0.15.1b-ds-rcc.patch || die
+ libtoolize --copy --force
+ aclocal
+ automake
+ autoconf
+#EDS
+
+}
+
+src_compile() {
+ econf $(use_enable debug debugging) || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die "make install failed"
+
+ dodoc CHANGES CREDITS README TODO VERSION
+
+ # This file must be updated with every version update
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${FILESDIR}/id3tag.pc"
+ sed -i -e "s:libdir=\${exec_prefix}/lib:libdir=/usr/$(get_libdir):" \
+ -e "s:0.15.0b:${PV}:" \
+ "${D}/usr/$(get_libdir)/pkgconfig/id3tag.pc"
+}
diff --git a/media-libs/libid3tag/libid3tag-0.15.1b-r4.ebuild b/media-libs/libid3tag/libid3tag-0.15.1b-r4.ebuild
new file mode 100644
index 0000000..7a1dfa9
--- /dev/null
+++ b/media-libs/libid3tag/libid3tag-0.15.1b-r4.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libid3tag/libid3tag-0.15.1b-r2.ebuild,v 1.6 2008/05/07 18:46:14 corsair Exp $
+
+inherit eutils multilib autotools
+
+DESCRIPTION="The MAD id3tag library"
+HOMEPAGE="http://www.underbit.com/products/mad/"
+SRC_URI="mirror://sourceforge/mad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd"
+IUSE="debug"
+
+DEPEND="dev-util/gperf
+ sys-devel/libtool"
+
+RDEPEND="${DEPEND}
+ >=sys-libs/zlib-1.1.3"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epunt_cxx #74489
+
+ epatch "${FILESDIR}/${PV}"/*.patch
+
+#SDS
+ epatch "${FILESDIR}"/libid3tag-0.15.1b-ds-rcc.patch || die
+ eautoreconf || die
+# libtoolize --copy --force
+# aclocal
+# automake
+# autoconf
+#EDS
+
+}
+
+src_compile() {
+ econf $(use_enable debug debugging) || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ make install DESTDIR="${D}" || die "make install failed"
+
+ dodoc CHANGES CREDITS README TODO VERSION
+
+ # This file must be updated with every version update
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${FILESDIR}/id3tag.pc"
+ sed -i -e "s:libdir=\${exec_prefix}/lib:libdir=/usr/$(get_libdir):" \
+ -e "s:0.15.0b:${PV}:" \
+ "${D}/usr/$(get_libdir)/pkgconfig/id3tag.pc"
+}