From a6dfd14777a8a7b5470d8c2828d8b2bac57fd16e Mon Sep 17 00:00:00 2001
From: Gerardo Di Iorio <arete74@gmail.com>
Date: Sat, 12 Dec 2009 12:26:40 +0100
Subject: [PATCH 7/7] Add multilib support

Signed-off-by: Gerardo Di Iorio <arete74@gmail.com>
---
 package/audio/taglib/taglib-1.5rc1-multilib.patch |   20 ++++++++++++++
 package/audio/taglib/taglib-1.6.1-20091103.patch  |   30 +++++++++++++++++++++
 2 files changed, 50 insertions(+), 0 deletions(-)
 create mode 100644 package/audio/taglib/taglib-1.5rc1-multilib.patch
 create mode 100644 package/audio/taglib/taglib-1.6.1-20091103.patch

diff --git a/package/audio/taglib/taglib-1.5rc1-multilib.patch b/package/audio/taglib/taglib-1.5rc1-multilib.patch
new file mode 100644
index 0000000..4f0cb40
--- /dev/null
+++ b/package/audio/taglib/taglib-1.5rc1-multilib.patch
@@ -0,0 +1,20 @@
+diff -up taglib-1.5rc1/taglib-config.cmake.multilib-2 taglib-1.5rc1/taglib-config.cmake
+--- taglib-1.5rc1/taglib-config.cmake.multilib-2	2008-01-29 19:30:00.000000000 -0600
++++ taglib-1.5rc1/taglib-config.cmake	2008-02-13 06:41:11.000000000 -0600
+@@ -16,7 +16,6 @@ EOH
+ 
+ prefix=${CMAKE_INSTALL_PREFIX}
+ exec_prefix=${CMAKE_INSTALL_PREFIX}
+-libdir=${LIB_INSTALL_DIR}
+ includedir=${INCLUDE_INSTALL_DIR}
+ 
+ flags=""
+@@ -29,7 +28,7 @@ while test $# -gt 0
+ do
+   case $1 in
+     --libs)
+-	  flags="$flags -L$libdir -ltag"
++	  flags="$flags -ltag"
+ 	  ;;
+     --cflags)
+ 	  flags="$flags -I$includedir/taglib"
diff --git a/package/audio/taglib/taglib-1.6.1-20091103.patch b/package/audio/taglib/taglib-1.6.1-20091103.patch
new file mode 100644
index 0000000..9dcceb0
--- /dev/null
+++ b/package/audio/taglib/taglib-1.6.1-20091103.patch
@@ -0,0 +1,30 @@
+diff -Nur taglib-1.6.1-orig/taglib/fileref.cpp taglib-1.6.1/taglib/fileref.cpp
+--- taglib-1.6.1-orig/taglib/fileref.cpp	2009-10-24 14:45:58.000000000 +0200
++++ taglib-1.6.1/taglib/fileref.cpp	2009-11-06 13:16:51.055129147 +0100
+@@ -227,6 +227,7 @@
+       File *file = new Ogg::FLAC::File(fileName, readAudioProperties, audioPropertiesStyle);
+       if (file->isValid())
+         return file;
++      delete file;
+       return new Ogg::Vorbis::File(fileName, readAudioProperties, audioPropertiesStyle);
+     }
+     if(ext == "FLAC")
+diff -Nur taglib-1.6.1-orig/taglib/flac/flacfile.cpp taglib-1.6.1/taglib/flac/flacfile.cpp
+--- taglib-1.6.1-orig/taglib/flac/flacfile.cpp	2009-07-12 23:53:18.000000000 +0200
++++ taglib-1.6.1/taglib/flac/flacfile.cpp	2009-11-06 13:16:42.613128986 +0100
+@@ -416,8 +416,13 @@
+ 
+     // Found the vorbis-comment
+     if(blockType == VorbisComment) {
+-      d->xiphCommentData = readBlock(length);
+-      d->hasXiphComment = true;
++      if(!d->hasXiphComment) {
++        d->xiphCommentData = readBlock(length);
++        d->hasXiphComment = true;
++      }
++      else {
++        debug("FLAC::File::scan() -- multiple Vorbis Comment blocks found, using the first one");
++      }
+     }
+ 
+     nextBlockOffset += length + 4;
-- 
1.6.5.3

