summaryrefslogtreecommitdiffstats
path: root/media-libs/id3lib
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/id3lib
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'media-libs/id3lib')
-rw-r--r--media-libs/id3lib/Manifest12
-rw-r--r--media-libs/id3lib/files/1.diff19
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-autoconf259.patch31
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-doxyinput.patch23
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-gcc-4.3.patch82
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-security.patch50
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-test_io.patch10
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-unicode16.patch39
-rw-r--r--media-libs/id3lib/files/id3lib-3.8.3-zlib.patch23
-rw-r--r--media-libs/id3lib/files/id3lib-ds-rcc.patch169
-rw-r--r--media-libs/id3lib/id3lib-3.8.3-r5.ebuild56
-rw-r--r--media-libs/id3lib/id3lib-3.8.3-r8.ebuild66
12 files changed, 580 insertions, 0 deletions
diff --git a/media-libs/id3lib/Manifest b/media-libs/id3lib/Manifest
new file mode 100644
index 0000000..615bfb9
--- /dev/null
+++ b/media-libs/id3lib/Manifest
@@ -0,0 +1,12 @@
+AUX 1.diff 717 RMD160 525c017d38a38a80feaed8ed37b84a8586ef0a81 SHA1 43e8e5a11c5890bf5dcfa1dcc983a9ada3ca3ee2 SHA256 9b90416204e0c83f9a919e3978239e58eceebe88ba22d5d365d32b0a8988cd27
+AUX id3lib-3.8.3-autoconf259.patch 1130 RMD160 bd5205973dfa31542935daa35ad04c6709c08b9d SHA1 6006f32d29461136ec029dda2ae7339fde6df1df SHA256 ffde572cb263cce4585292143a4396ebd12592ac34b398da19d1608f1c2374f9
+AUX id3lib-3.8.3-doxyinput.patch 977 RMD160 102b5cad0637776a26505d53d3722e549a7448d3 SHA1 b92df9fe9e7b0f124eba03d43a63b0da5b3718de SHA256 e7cd2eafe39229fee1195524872be3465d247590b7ead4a9cfa2178102a3d9ea
+AUX id3lib-3.8.3-gcc-4.3.patch 2971 RMD160 686fa49e1108684a652435afcc56fd062ed516a4 SHA1 d25b5e69e633e12f929e0d656b87f3f72b4b5849 SHA256 536f6bb5dddd48df3c7fc080c04f03a2053ab11429094f2f31d6e2d5f21a987e
+AUX id3lib-3.8.3-security.patch 1601 RMD160 165fcc3773343c36394207f833b9336859ec13f4 SHA1 e9a835fc14e8a83468206eba08ca4d5e0fc5e9c1 SHA256 aa5f4e12a0a625acd58199f3e2d8d6d39290480fea7767adbbc1f8379964e01c
+AUX id3lib-3.8.3-test_io.patch 281 RMD160 773e84752a84cd746def0ff4878f4b248d6611e6 SHA1 76f6bab888f1d47e75006f7bcb44df0205693d76 SHA256 cc124f8805bcb977a1673f0b04fff368dac1af70d78c21da6f0415ce067d7687
+AUX id3lib-3.8.3-unicode16.patch 1542 RMD160 1b60e40e5cb1f172e4020ba2b87a10b557521572 SHA1 f3644a7f637b65b46afdea04195c48cde03edcd7 SHA256 71c79002d9485965a3a93e87ecbd7fed8f89f64340433b7ccd263d21385ac969
+AUX id3lib-3.8.3-zlib.patch 833 RMD160 477f5e846ef7070bd3c10203bbaaa7eeaaedf6f2 SHA1 231721feb310f5ef6d820d1c1397e3605b5689cb SHA256 0b5531089422bda659deddcccf0562fcaa96529e74778065e35c848d6cf2a502
+AUX id3lib-ds-rcc.patch 4773 RMD160 b08e67f6d900e02a3de0e31ece6e6d15ace9c3e1 SHA1 67dfcfa4028d4ebd1a1f75c76b0861aa49db3296 SHA256 e9f54621938a9ea3657ca5a601141d4c7fb9adf4af23dea41eb61df9517ea3f8
+DIST id3lib-3.8.3.tar.gz 950726 RMD160 bfa2499ec649ed40815ad0a370c78eb1517952c4 SHA1 c92c880da41d1ec0b242745a901702ae87970838 SHA256 2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079
+EBUILD id3lib-3.8.3-r5.ebuild 1312 RMD160 d643251d7f9d319931cecb64539761f976e79c30 SHA1 8d31263ea96c57fe3b93dc3ebfedf79ad5f09910 SHA256 633fb7d85cf94052f71f9ebe7d9012a6b9a1264470c40dc619a7bbd7098e9d9f
+EBUILD id3lib-3.8.3-r8.ebuild 1485 RMD160 c018b53e9a81bb8aa9cf9037f163f033f5108c28 SHA1 5eb6cf089c99cdb92efa0a084b428e36ecf32983 SHA256 864341b5f608079a51af2cd51de07dad4a0870ec56bf5146e0cdcf932dfd9a89
diff --git a/media-libs/id3lib/files/1.diff b/media-libs/id3lib/files/1.diff
new file mode 100644
index 0000000..7617737
--- /dev/null
+++ b/media-libs/id3lib/files/1.diff
@@ -0,0 +1,19 @@
+--- old 2008-09-17 11:32:53.000000000 +0200
++++ id3lib-ds-rcc.patch 2008-09-17 11:27:54.000000000 +0200
+@@ -93,9 +93,9 @@
+
+ libid3_la_LDFLAGS = \
+ + @LIBRCC_LIBS@ \
+- -lz \
+ -version-info $(LT_VERSION) \
+ -release $(LT_RELEASE) \
++ -export-dynamic
+ diff -dPNur id3lib-3.8.3-orig/src/rccpatch.cpp id3lib-3.8.3-new/src/rccpatch.cpp
+ --- id3lib-3.8.3-orig/src/rccpatch.cpp 1970-01-01 01:00:00.000000000 +0100
+ +++ id3lib-3.8.3-new/src/rccpatch.cpp 2005-07-19 22:10:47.000000000 +0200
+@@ -166,4 +166,4 @@
+ @@ -0,0 +1,3 @@
+ +void rccPatchFree();
+ +void rccPatchInit();
+-+char *rccPatchRecode(const char *str, size_t size_t, size_t *size_t);
+++char *rccPatchRecode(const char *str, size_t len, size_t *rlen);
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-autoconf259.patch b/media-libs/id3lib/files/id3lib-3.8.3-autoconf259.patch
new file mode 100644
index 0000000..16921e1
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-autoconf259.patch
@@ -0,0 +1,31 @@
+Index: id3lib-3.8.3/configure.in
+===================================================================
+--- id3lib-3.8.3.orig/configure.in
++++ id3lib-3.8.3/configure.in
+@@ -168,7 +168,7 @@ if test $has_iconv = 1; then
+ iconv_oldstyle=1, iconv_oldstyle=0)
+ if test $iconv_oldstyle = 1; then
+ AC_MSG_RESULT(const char **)
+- AC_DEFINE(ID3LIB_ICONV_OLDSTYLE)
++ AC_DEFINE(ID3LIB_ICONV_OLDSTYLE, [], [Unknown])
+ #we'll check out the need of
+ #typecast in the call of iconv_open
+ AC_MSG_CHECKING(whether to typecast in iconv)
+@@ -184,7 +184,7 @@ if test $has_iconv = 1; then
+ iconv_cast=0, iconv_cast=1)
+ if test $iconv_cast = 1; then
+ AC_MSG_RESULT(yes)
+- AC_DEFINE(ID3LIB_ICONV_CAST_OK)
++ AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [Unknown])
+ else
+ AC_MSG_RESULT(no)
+ fi
+@@ -206,7 +206,7 @@ if test $has_iconv = 1; then
+ iconv_cast=0, iconv_cast=1)
+ if test $iconv_cast = 1; then
+ AC_MSG_RESULT(yes)
+- AC_DEFINE(ID3LIB_ICONV_CAST_OK)
++ AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [Unknown])
+ else
+ AC_MSG_RESULT(no)
+ fi
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-doxyinput.patch b/media-libs/id3lib/files/id3lib-3.8.3-doxyinput.patch
new file mode 100644
index 0000000..b118f48
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-doxyinput.patch
@@ -0,0 +1,23 @@
+Index: id3lib-3.8.3/doc/Doxyfile
+===================================================================
+--- id3lib-3.8.3.orig/doc/Doxyfile
++++ id3lib-3.8.3/doc/Doxyfile
+@@ -262,17 +262,7 @@ WARN_FORMAT = "$file:$line: $
+ # with spaces.
+
+ INPUT = ../src \
+- ../include/id3/field.h \
+- ../include/id3/frame.h \
+- ../include/id3/globals.h \
+- ../include/id3/misc_support.h \
+- ../include/id3/reader.h \
+- ../include/id3/readers.h \
+- ../include/id3/sized_types.h \
+- ../include/id3/tag.h \
+- ../include/id3/tag.h \
+- ../include/id3/writer.h \
+- ../include/id3/writers.h
++ ../include/id3 \
+
+
+ # If the value of the INPUT tag contains directories, you can use the
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-gcc-4.3.patch b/media-libs/id3lib/files/id3lib-3.8.3-gcc-4.3.patch
new file mode 100644
index 0000000..090dc0b
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-gcc-4.3.patch
@@ -0,0 +1,82 @@
+diff -Naur id3lib-3.8.3-orig/configure.in id3lib-3.8.3/configure.in
+--- id3lib-3.8.3-orig/configure.in 2008-03-05 18:03:25.000000000 -0600
++++ id3lib-3.8.3/configure.in 2008-03-05 18:15:42.000000000 -0600
+@@ -227,7 +227,6 @@
+ )
+ AC_CHECK_HEADERS( \
+ string \
+- iomanip.h \
+ ,,AC_MSG_ERROR([Missing a vital header file for id3lib])
+ )
+
+diff -Naur id3lib-3.8.3-orig/include/id3/id3lib_strings.h id3lib-3.8.3/include/id3/id3lib_strings.h
+--- id3lib-3.8.3-orig/include/id3/id3lib_strings.h 2008-03-05 18:19:46.000000000 -0600
++++ id3lib-3.8.3/include/id3/id3lib_strings.h 2008-03-05 18:19:38.000000000 -0600
+@@ -30,6 +30,7 @@
+ #define _ID3LIB_STRINGS_H_
+
+ #include <string>
++#include <cstring>
+
+ #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
+ namespace std
+diff -Naur id3lib-3.8.3-orig/include/id3/writers.h id3lib-3.8.3/include/id3/writers.h
+--- id3lib-3.8.3-orig/include/id3/writers.h 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/include/id3/writers.h 2008-03-05 18:23:05.000000000 -0600
+@@ -30,7 +30,7 @@
+
+ #include "id3/writer.h"
+ #include "id3/id3lib_streams.h"
+-//#include <string.h>
++#include <string.h>
+
+ class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
+ {
+diff -Naur id3lib-3.8.3-orig/examples/demo_convert.cpp id3lib-3.8.3/examples/demo_convert.cpp
+--- id3lib-3.8.3-orig/examples/demo_convert.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_convert.cpp 2008-03-05 18:26:50.000000000 -0600
+@@ -84,7 +84,7 @@
+ }
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ flags_t ulFlag = ID3TT_ALL;
+ gengetopt_args_info args;
+diff -Naur id3lib-3.8.3-orig/examples/demo_info.cpp id3lib-3.8.3/examples/demo_info.cpp
+--- id3lib-3.8.3-orig/examples/demo_info.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_info.cpp 2008-03-05 18:27:40.000000000 -0600
+@@ -309,7 +309,7 @@
+
+ #define DEBUG
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ ID3D_INIT_DOUT();
+
+diff -Naur id3lib-3.8.3-orig/examples/demo_tag.cpp id3lib-3.8.3/examples/demo_tag.cpp
+--- id3lib-3.8.3-orig/examples/demo_tag.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_tag.cpp 2008-03-05 18:31:20.000000000 -0600
+@@ -46,7 +46,7 @@
+ os << "v2";
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ int ulFlag = ID3TT_ID3;
+ ID3D_INIT_DOUT();
+diff -Naur id3lib-3.8.3-orig/examples/demo_copy.cpp id3lib-3.8.3/examples/demo_copy.cpp
+--- id3lib-3.8.3-orig/examples/demo_copy.cpp 2003-03-01 18:23:00.000000000 -0600
++++ id3lib-3.8.3/examples/demo_copy.cpp 2008-03-05 18:32:44.000000000 -0600
+@@ -81,7 +81,7 @@
+ }
+ }
+
+-int main( unsigned int argc, char * const argv[])
++int main( int argc, char * const argv[])
+ {
+ int ulFlag = ID3TT_ID3;
+ ID3D_INIT_DOUT();
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-security.patch b/media-libs/id3lib/files/id3lib-3.8.3-security.patch
new file mode 100644
index 0000000..e56d32c
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-security.patch
@@ -0,0 +1,50 @@
+diff -ur id3lib-3.8.3.orig/src/tag_file.cpp id3lib-3.8.3/src/tag_file.cpp
+--- id3lib-3.8.3.orig/src/tag_file.cpp 2003-03-02 02:23:00.000000000 +0200
++++ id3lib-3.8.3/src/tag_file.cpp 2007-08-20 19:40:16.000000000 +0300
+@@ -242,8 +242,8 @@
+ strcpy(sTempFile, filename.c_str());
+ strcat(sTempFile, sTmpSuffix.c_str());
+
+-#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
+- // This section is for Windows folk && gcc 3.x folk
++#if !defined(HAVE_MKSTEMP)
++ // This section is for Windows folk
+ fstream tmpOut;
+ createFile(sTempFile, tmpOut);
+
+@@ -257,7 +257,7 @@
+ tmpOut.write((char *)tmpBuffer, nBytes);
+ }
+
+-#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
++#else //!defined(HAVE_MKSTEMP)
+
+ // else we gotta make a temp file, copy the tag into it, copy the
+ // rest of the old file after the tag, delete the old file, rename
+@@ -270,7 +270,7 @@
+ //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
+ }
+
+- ofstream tmpOut(fd);
++ ofstream tmpOut(sTempFile);
+ if (!tmpOut)
+ {
+ tmpOut.close();
+@@ -285,14 +285,14 @@
+ uchar tmpBuffer[BUFSIZ];
+ while (file)
+ {
+- file.read(tmpBuffer, BUFSIZ);
++ file.read((char *)tmpBuffer, BUFSIZ);
+ size_t nBytes = file.gcount();
+- tmpOut.write(tmpBuffer, nBytes);
++ tmpOut.write((char *)tmpBuffer, nBytes);
+ }
+
+ close(fd); //closes the file
+
+-#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
++#endif ////!defined(HAVE_MKSTEMP)
+
+ tmpOut.close();
+ file.close();
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-test_io.patch b/media-libs/id3lib/files/id3lib-3.8.3-test_io.patch
new file mode 100644
index 0000000..b4a0d24
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-test_io.patch
@@ -0,0 +1,10 @@
+--- id3lib-3.8.3/examples/test_io.cpp.orig 2004-09-21 23:40:48.398826320 +0200
++++ id3lib-3.8.3/examples/test_io.cpp 2004-09-21 23:40:55.408760648 +0200
+@@ -16,6 +16,7 @@
+ using std::cerr;
+
+ using namespace dami;
++using namespace std;
+
+ int
+ main(size_t argc, const char** argv)
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-unicode16.patch b/media-libs/id3lib/files/id3lib-3.8.3-unicode16.patch
new file mode 100644
index 0000000..b05d2cf
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-unicode16.patch
@@ -0,0 +1,39 @@
+diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog
+--- id3lib-3.8.3.orig/ChangeLog 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/ChangeLog 2006-02-22 00:33:59.946214472 +0100
+@@ -1,3 +1,8 @@
++2006-02-17 Jerome Couderc
++
++ * Patch from Spoon to fix UTF-16 writing bug
++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++
+ 2003-03-02 Sunday 17:38 Thijmen Klok <thijmen@id3lib.org>
+
+ * THANKS (1.20): added more people
+diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp
+--- id3lib-3.8.3.orig/src/io_helpers.cpp 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3/src/io_helpers.cpp 2006-02-22 00:35:02.926639992 +0100
+@@ -363,11 +363,22 @@
+ // Write the BOM: 0xFEFF
+ unicode_t BOM = 0xFEFF;
+ writer.writeChars((const unsigned char*) &BOM, 2);
++ // Patch from Spoon : 2004-08-25 14:17
++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++ // Wrong code
++ //for (size_t i = 0; i < size; i += 2)
++ //{
++ // unicode_t ch = (data[i] << 8) | data[i+1];
++ // writer.writeChars((const unsigned char*) &ch, 2);
++ //}
++ // Right code
++ unsigned char *pdata = (unsigned char *) data.c_str();
+ for (size_t i = 0; i < size; i += 2)
+ {
+- unicode_t ch = (data[i] << 8) | data[i+1];
++ unicode_t ch = (pdata[i] << 8) | pdata[i+1];
+ writer.writeChars((const unsigned char*) &ch, 2);
+ }
++ // End patch
+ }
+ return writer.getCur() - beg;
+ }
diff --git a/media-libs/id3lib/files/id3lib-3.8.3-zlib.patch b/media-libs/id3lib/files/id3lib-3.8.3-zlib.patch
new file mode 100644
index 0000000..177320b
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-zlib.patch
@@ -0,0 +1,23 @@
+diff -Naur id3lib-3.8.3.orig/Makefile.am id3lib-3.8.3/Makefile.am
+--- id3lib-3.8.3.orig/Makefile.am 2003-03-01 16:23:00.000000000 -0800
++++ id3lib-3.8.3/Makefile.am 2004-09-12 19:05:39.564456828 -0700
+@@ -28,7 +28,7 @@
+ endif
+
+ SUBDIRS = . m4 $(zlib_subdir) doc include id3com src examples
+-DIST_SUBDIRS = . m4 zlib doc include id3com src examples prj libprj
++DIST_SUBDIRS = . m4 $(zlib_subdir) doc include id3com src examples prj libprj
+
+ INCLUDES = @ID3LIB_DEBUG_FLAGS@
+
+diff -Naur id3lib-3.8.3.orig/src/Makefile.am id3lib-3.8.3/src/Makefile.am
+--- id3lib-3.8.3.orig/src/Makefile.am 2003-03-01 16:23:00.000000000 -0800
++++ id3lib-3.8.3/src/Makefile.am 2004-09-12 19:08:30.814149521 -0700
+@@ -77,6 +77,7 @@
+ endif
+
+ libid3_la_LDFLAGS = \
++ -lz \
+ -version-info $(LT_VERSION) \
+ -release $(LT_RELEASE) \
+ -export-dynamic
diff --git a/media-libs/id3lib/files/id3lib-ds-rcc.patch b/media-libs/id3lib/files/id3lib-ds-rcc.patch
new file mode 100644
index 0000000..90f770d
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-ds-rcc.patch
@@ -0,0 +1,169 @@
+diff -dPNur id3lib-3.8.3-orig/configure.in id3lib-3.8.3-new/configure.in
+--- id3lib-3.8.3-orig/configure.in 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3-new/configure.in 2005-07-19 22:03:12.000000000 +0200
+@@ -217,6 +217,20 @@
+ LIBS="$LIBS $ICONV_LIB"
+ fi
+
++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 Check for c++ features
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+@@ -315,5 +329,5 @@
+ src/Makefile \
+ examples/Makefile \
+ prj/Makefile \
+- libprj/Makefile
++ libprj/Makefile
+ )
+diff -dPNur id3lib-3.8.3-orig/src/field_string_ascii.cpp id3lib-3.8.3-new/src/field_string_ascii.cpp
+--- id3lib-3.8.3-orig/src/field_string_ascii.cpp 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3-new/src/field_string_ascii.cpp 2005-07-19 21:34:12.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include "field_impl.h"
+ #include "id3/utils.h" // has <config.h> "id3/id3lib_streams.h" "id3/globals.h" "id3/id3lib_strings.h"
+ #include "io_helpers.h"
++#include "rccpatch.h"
+
+ using namespace dami;
+
+@@ -92,8 +93,15 @@
+ buffer != NULL && maxLength > 0)
+ {
+ String data = this->GetText();
++ char *recoded = rccPatchRecode(data.data(), (size_t)data.size(), (size_t*)&size);
++ if (recoded) {
++ size = dami::min(maxLength, size);
++ ::memcpy(buffer, recoded, size);
++ free(recoded);
++ } else {
+ size = dami::min(maxLength, data.size());
+ ::memcpy(buffer, data.data(), size);
++ }
+ if (size < maxLength)
+ {
+ buffer[size] = '\0';
+diff -dPNur id3lib-3.8.3-orig/src/Makefile.am id3lib-3.8.3-new/src/Makefile.am
+--- id3lib-3.8.3-orig/src/Makefile.am 2003-03-02 01:23:00.000000000 +0100
++++ id3lib-3.8.3-new/src/Makefile.am 2005-07-19 21:38:31.000000000 +0200
+@@ -17,7 +17,7 @@
+ zlib_include =
+ endif
+
+-INCLUDES = \
++INCLUDES = @LIBRCC_INCLUDES@ \
+ @ID3LIB_DEBUG_FLAGS@ -I$(top_srcdir)/include/id3 -I$(top_srcdir)/include $(zlib_include)
+
+ noinst_HEADERS = \
+@@ -31,7 +31,8 @@
+ header_tag.h \
+ mp3_header.h \
+ tag_impl.h \
+- spec.h
++ spec.h \
++ rccpatch.h
+
+ id3lib_sources = \
+ c_wrapper.cpp \
+@@ -66,7 +67,8 @@
+ tag_parse_v1.cpp \
+ tag_render.cpp \
+ utils.cpp \
+- writers.cpp
++ writers.cpp \
++ rccpatch.cpp
+
+ lib_LTLIBRARIES = libid3.la
+
+@@ -77,6 +79,7 @@
+ endif
+
+ libid3_la_LDFLAGS = \
++ @LIBRCC_LIBS@ \
+ -lz \
+ -version-info $(LT_VERSION) \
+ -release $(LT_RELEASE) \
+diff -dPNur id3lib-3.8.3-orig/src/rccpatch.cpp id3lib-3.8.3-new/src/rccpatch.cpp
+--- id3lib-3.8.3-orig/src/rccpatch.cpp 1970-01-01 01:00:00.000000000 +0100
++++ id3lib-3.8.3-new/src/rccpatch.cpp 2005-07-19 22:10:47.000000000 +0200
+@@ -0,0 +1,60 @@
++#include <stdlib.h>
++
++#include "../config.h"
++
++#ifdef HAVE_LIBRCC
++# include <librcc.h>
++#endif /* HAVE_LIBRCC */
++
++
++#ifdef HAVE_LIBRCC
++# define ID3_CLASS 0
++# define OUT_CLASS 1
++static rcc_class classes[] = {
++ { "id3", RCC_CLASS_STANDARD, NULL, NULL, "ID3 Encoding", 0 },
++ { "out", RCC_CLASS_STANDARD, NULL, NULL, "Output Encoding", 0 },
++ { NULL, RCC_CLASS_STANDARD, NULL, NULL, NULL, 0 }
++};
++
++static int rcc_initialized = 0;
++#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 */
++}
++
++static void rccPatchTryInit() {
++#ifdef HAVE_LIBRCC
++ if (!rcc_initialized) {
++ rccPatchInit();
++ if (rcc_initialized) atexit(rccPatchFree);
++ }
++#endif /* HAVE_LIBRCC */
++}
++
++char *rccPatchRecode(const char *str, size_t len, size_t *rlen) {
++#ifdef HAVE_LIBRCC
++ char *res;
++ rccPatchTryInit();
++ return rccSizedRecode(NULL, ID3_CLASS, OUT_CLASS, str, len, rlen);
++#else
++ return NULL;
++#endif /* HAVE_LIBRCC */
++}
+diff -dPNur id3lib-3.8.3-orig/src/rccpatch.h id3lib-3.8.3-new/src/rccpatch.h
+--- id3lib-3.8.3-orig/src/rccpatch.h 1970-01-01 01:00:00.000000000 +0100
++++ id3lib-3.8.3-new/src/rccpatch.h 2005-07-19 21:34:51.000000000 +0200
+@@ -0,0 +1,3 @@
++void rccPatchFree();
++void rccPatchInit();
++char *rccPatchRecode(const char *str, size_t len, size_t *rlen);
diff --git a/media-libs/id3lib/id3lib-3.8.3-r5.ebuild b/media-libs/id3lib/id3lib-3.8.3-r5.ebuild
new file mode 100644
index 0000000..8ea2a33
--- /dev/null
+++ b/media-libs/id3lib/id3lib-3.8.3-r5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+inherit eutils
+
+MY_P=${P/_/}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="Id3 library for C/C++"
+HOMEPAGE="http://id3lib.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="doc rcc"
+
+RDEPEND="sys-libs/zlib
+ rcc? ( app-i18n/librcc )"
+
+DEPEND="${RDEPEND}
+ sys-devel/autoconf
+ sys-devel/libtool"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch ${FILESDIR}/${P}-zlib.patch
+ epatch ${FILESDIR}/${P}-test_io.patch
+ use rcc && ( epatch ${FILESDIR}/id3lib-ds-rcc.patch || die )
+
+ export WANT_AUTOMAKE=1.6
+ export WANT_AUTOCONF=2.5
+
+ libtoolize --force --copy || die
+ aclocal || die
+ automake || die
+ autoconf || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Install failed"
+ dosym /usr/$(get_libdir)/libid3-3.8.so.3 /usr/$(get_libdir)/libid3-3.8.so.0.0.0
+ dosym /usr/$(get_libdir)/libid3-3.8.so.0.0.0 /usr/$(get_libdir)/libid3-3.8.so.0
+
+ dodoc AUTHORS ChangeLog HISTORY INSTALL README THANKS TODO
+
+ # some example programs to be placed in docs dir.
+ if use doc; then
+ cp -a examples ${D}/usr/share/doc/${PF}/examples
+ cd ${D}/usr/share/doc/${PF}/examples
+ make distclean
+ fi
+}
diff --git a/media-libs/id3lib/id3lib-3.8.3-r8.ebuild b/media-libs/id3lib/id3lib-3.8.3-r8.ebuild
new file mode 100644
index 0000000..ff6998a
--- /dev/null
+++ b/media-libs/id3lib/id3lib-3.8.3-r8.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/id3lib/id3lib-3.8.3-r7.ebuild,v 1.1 2008/07/29 15:04:05 yngwin Exp $
+
+WANT_AUTOCONF="latest"
+WANT_AUTOMAKE="latest"
+
+inherit eutils autotools
+
+MY_P=${P/_/}
+S="${WORKDIR}"/${MY_P}
+
+DESCRIPTION="Id3 library for C/C++"
+HOMEPAGE="http://id3lib.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd"
+IUSE="doc rcc"
+
+RESTRICT="test"
+
+RDEPEND="sys-libs/zlib
+ rcc? ( app-i18n/librcc )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-zlib.patch
+ epatch "${FILESDIR}"/${P}-test_io.patch
+ epatch "${FILESDIR}"/${P}-autoconf259.patch
+ epatch "${FILESDIR}"/${P}-doxyinput.patch
+ epatch "${FILESDIR}"/${P}-unicode16.patch
+ epatch "${FILESDIR}"/${P}-gcc-4.3.patch
+
+ # Security fix for bug 189610.
+ epatch "${FILESDIR}"/${P}-security.patch
+
+ use rcc && ( epatch "${FILESDIR}"/id3lib-ds-rcc.patch || die )
+
+ AT_M4DIR="${S}/m4" eautoreconf
+}
+
+src_compile() {
+ econf || die "econf failed."
+ emake || die "emake failed."
+
+ if use doc; then
+ cd doc/
+ doxygen Doxyfile || die "doxygen failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed"
+ dodoc AUTHORS ChangeLog HISTORY README THANKS TODO
+
+ if use doc; then
+ dohtml -r doc
+ fi
+}