Hello community,

here is the log from the commit of package taglib.1296 for openSUSE:12.2:Update 
checked in at 2013-02-11 14:56:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.2:Update/taglib.1296 (Old)
 and      /work/SRC/openSUSE:12.2:Update/.taglib.1296.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "taglib.1296", Maintainer is ""

Changes:
--------
New Changes file:

--- /dev/null   2013-02-09 11:18:20.872010756 +0100
+++ /work/SRC/openSUSE:12.2:Update/.taglib.1296.new/taglib.changes      
2013-02-11 14:56:12.000000000 +0100
@@ -0,0 +1,370 @@
+-------------------------------------------------------------------
+Tue Jan 29 16:27:24 UTC 2013 - [email protected]
+
+- Update rusxmms patch to version taglib-1.7-ds-rusxmms-r2 in order to fix 
bnc#780256
+
+-------------------------------------------------------------------
+Fri May 11 10:22:59 UTC 2012 - [email protected]
+
+-Update to 1.7.2:
+ * Fixed division by zero while parsing corrupted MP4 files (CVE-2012-2396).
+ * Fixed compilation on Haiku.
+ * Improved parsing of corrupted WMA, RIFF and OGG files.
+ * Fixed a memory leak in the WMA parser.
+ * Fixed a memory leak in the FLAC parser.
+ * Fixed a possible division by zero in the APE parser.
+ * Added detection of TTA2 files.
+ * Fixed saving of multiple identically named tags to Vorbis Comments.
+-Fixed a build failure related to doxygen.
+
+-------------------------------------------------------------------
+Thu May 10 01:51:54 UTC 2012 - [email protected]
+
+- Also, define GNU_SOURCE 
+
+-------------------------------------------------------------------
+Thu May 10 01:11:38 UTC 2012 - [email protected]
+
+- No dont use -ansi gcc flag. 
+
+-------------------------------------------------------------------
+Thu Mar  8 01:01:13 YEKT 2012 - [email protected]
+
+- Add rusxmms patch to be fixed https://features.opensuse.org/313273
+
+-------------------------------------------------------------------
+Sat May 28 07:03:00 UTC 2011 - [email protected]
+
+- Made taglib become a package again to satisfy the depencies of
+  packages that still require it.
+
+-------------------------------------------------------------------
+Sat May 28 04:31:40 UTC 2011 - [email protected]
+
+- Conflict the last version of taglib that contained the libraries
+  from the library subpackages.
+- Make sure the devel package obsoletes the last version of
+  taglib-devel where the main package contained the libraries.
+- taglib is the name of the srcrpm, moved docs to devel subpackage.
+
+-------------------------------------------------------------------
+Wed May 25 14:19:41 UTC 2011 - [email protected]
+
+- obsolete the right version of taglib
+
+-------------------------------------------------------------------
+Sun May 22 22:29:07 UTC 2011 - [email protected]
+
+- make taglib become a package again, that has only one duty, to require
+  libtag1 and libtag_c0 for packages that still require taglib instead of
+  the new package names libtag1 and libtag_c0
+
+-------------------------------------------------------------------
+Tue May 17 20:55:51 UTC 2011 - [email protected]
+
+- Update to version 1.7:
+  * Fixed memory leaks in the FLAC file format parser.
+  * Fixed bitrate calculation for WAV files.
+  From 1.7 RC1
+  * Support for reading/writing tags from Monkey's Audio files. (BUG:210404)
+  * Support for reading/writing embedded pictures from WMA files.
+  * Support for reading/writing embedded pictures from FLAC files (BUG:218696).
+  * Implemented APE::Tag::isEmpty() to check for all APE tags, not just the
+    basic ones.
+  * Added reading of WAV audio length. (BUG:116033)
+  * Exposed FLAC MD5 signature of the uncompressed audio stream via
+    FLAC::Properties::signature(). (BUG:160172)
+  * Added function ByteVector::toHex() for hex-encoding of byte vectors.
+  * WavPack reader now tries to get the audio length by finding the final
+    block, if the header doesn't have the information. (BUG:258016)
+  * Fixed a memory leak in the ID3v2.2 PIC frame parser. (BUG:257007)
+  * Fixed writing of RIFF files with even chunk sizes. (BUG:243954)
+  * Fixed compilation on MSVC 2010.
+  * Removed support for building using autoconf/automake.
+  * API docs can be now built using "make docs".
+- Spec file updates:
+  * Changes based on openSUSE shared library packaging policy (added libtag1,
+    libtag_c0 and libtag-devel packages, removed taglib and taglib-devel
+    packages).
+  * Changes based on spec-cleaner run.
+  * Changed License: to LGPLv2.1+ ; MPLv1.1 ..
+  * Updates in Group, Summary and %description entries.
+  * Added libcppunit-devel and pkg-config in BuildRequires.
+  * Minor other updates.
+- Updated taglib.desktop for susehelp to point to libtag-devel.
+
+-------------------------------------------------------------------
+Sat Feb 26 14:24:48 UTC 2011 - [email protected]
+
+- update to version 1.6.3
+  * Fixed definitions of the TAGLIB_WITH_MP4 and TAGLIB_WITH_ASF macros.
+  * Fixed upgrading of ID3v2.3 genre frame with ID3v1 code 0 (Blues).
+  * New method `int String::toInt(bool *ok)` which can return whether the 
conversion to a number was successful.
+  * Fixed parsing of incorrectly written lengths in ID3v2 (affects mainly 
compressed frames).
+
+
+-------------------------------------------------------------------
+Sun Apr 11 17:07:36 UTC 2010 - [email protected]
+
+- update to version 1.6.2
+  * Read Vorbis Comments from the first FLAC metadata block, 
+    if there are multipe ones.
+  * Fixed a memory leak in FileRef's OGA format detection.
+  * Fixed compilation with the Sun Studio compiler.
+  * Handle WM/TrackNumber attributes with DWORD content in WMA files.
+  * More strict check if something is a valid MP4 file.
+  * Correctly save MP4 int-pair atoms with flags set to 0.
+  * Fixed compilation of the test runner on Windows.
+  * Store ASF attributes larger than 64k in the metadata library object.
+  * Ignore trailing non-data atoms when parsing MP4 covr atoms.
+  * Don't upgrade ID3v2.2 frame TDA to TDRC.
+
+-------------------------------------------------------------------
+Mon Feb  1 12:33:03 UTC 2010 - [email protected]
+
+- Package baselibs.conf
+
+-------------------------------------------------------------------
+Tue Nov  3 23:21:25 UTC 2009 - [email protected]
+
+- Update to version 1.6.1
+ * Better detection of the audio codec of .oga files in FileRef.
+ * Fixed saving of Vorbis comments to Ogg FLAC files. TagLib tried to
+   include the Vorbis framing bit, which is only correct for Ogg Vorbis.
+ * Public symbols now have explicitly set visibility to "default" on GCC.
+ * Added missing exports for static ID3v1 functions.
+ * Fixed a typo in taglib_c.pc
+ * Fixed a failing test on ppc64.
+ * Support for binary 'covr' atom in MP4 files. TagLib 1.6 treated them
+   as text atoms, which corrupted them in some cases.
+ * Fixed ID3v1-style genre to string conversion in MP4 files.
+
+-------------------------------------------------------------------
+Tue Sep 22 19:14:46 UTC 2009 - [email protected]
+
+- Update to version 1.6
+  * New CMake option to build a static version - ENABLE_STATIC.
+  * Added support for disabling dllimport/dllexport on Windows 
+    using the TAGLIB_STATIC macro.
+  * Support for parsing the obsolete 'gnre' MP4 atom.
+  * New cpp macros TAGLIB_WITH_MP4 and TAGLIB_WITH_ASF to determine 
+    if TagLib was built with MP4/ASF support.
+  * Split Ogg packets larger than 64k into multiple pages.
+  * TagLib can now use FLAC padding block.
+  * ID3v2.2 frames are now not incorrectly saved.
+  * Support for ID3v2.2 PIC frames.
+  * Fixed a bug in ByteVectorList::split().
+  * XiphComment::year() now falls back to YEAR if DATE doesn't exist 
+    and XiphComment::year() falls back to TRACKNUM if TRACKNUMBER 
+    doesn't exist.
+  * Improved ID3v2.3 genre parsing.
+  * Better checking of corrupted ID3v2 APIC data.
+  * Bitrate calculating using the Xing header now uses floating
+    point numbers.
+  * New TagLib::String method rfind().
+  * Added support for MP4 file format with iTunes-style metadata
+  * Added support for ASF (WMA) file format.
+  * Fixed crash when saving a Locator APEv2 tag.
+  * Fixed a possible crash in the non-const version of String::operator[]
+    and in String::operator+=.
+  * Added support for PRIV ID3v2 frames.
+  * Empty ID3v2 genres are no longer treated as numeric ID3v1 genres.
+  * Added support for the POPM (rating/playcount) ID3v2 frame.
+  * Generic RIFF file format support:
+    * Support for AIFF files with ID3v2 tags.
+    * Support for WAV files with ID3v2 tags.
+  * Fixed crash on handling unsupported ID3v2 frames, e.g. on encrypted 
+    frames.
+  * Fixed overflow while calculating bitrate of FLAC files with a very
+    high bitrate
+
+-------------------------------------------------------------------
+Tue Mar 10 15:03:09 CET 2009 - [email protected]
+
+- fix build with new cmake
+
+-------------------------------------------------------------------
+Wed Jan  7 12:34:56 CET 2009 - [email protected]
+
+- obsolete old -XXbit packages (bnc#437293)
+
+-------------------------------------------------------------------
+Thu Apr 10 14:58:25 CEST 2008 - [email protected]
+
+- fix build for older distros
+
+-------------------------------------------------------------------
+Thu Apr 10 12:54:45 CEST 2008 - [email protected]
++++ 173 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.2:Update/.taglib.1296.new/taglib.changes

New:
----
  baselibs.conf
  taglib-1.7-ds-rusxmms-r2.patch
  taglib-1.7.2-doxygen.patch
  taglib-1.7.2.tar.bz2
  taglib-noansiflags.patch
  taglib.changes
  taglib.desktop
  taglib.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ taglib.spec ++++++
#
# spec file for package taglib
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           taglib
Version:        1.7.2
Release:        0
Summary:        Audio Meta-Data Library
License:        LGPL-2.1+ ; MPL-1.1
Group:          System/Libraries
Url:            http://ktown.kde.org/~wheeler/taglib/
# http://ktown.kde.org/~wheeler/files/src/taglib-1.7.tar.gz
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop
Source100:      baselibs.conf
Patch1:         taglib-1.7-ds-rusxmms-r2.patch
Patch2:         taglib-noansiflags.patch
Patch3:         taglib-1.7.2-doxygen.patch              
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  graphviz-gnome
BuildRequires:  libcppunit-devel
BuildRequires:  pkg-config
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
BuildRequires:  librcc-devel
BuildRequires:  zlib-devel
Requires:       libtag1 = %{version}
Requires:       libtag_c0 = %{version}

%description
TagLib is a library for reading and editing the meta-data of several popular
audio formats. Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg
Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack
TrueAudio, WAV, AIFF, MP4 and ASF files.

%package -n libtag1
Summary:        Audio Meta-Data Library
License:        LGPL-2.1+
Group:          System/Libraries
# Without this the old taglib package containing the libraries isn't removed 
when this package is installed.
# The only alternative is for the libraries to Require: taglib version-release, 
badness 440
Conflicts:      taglib <= 1.6.3

%description -n libtag1
TagLib is a library for reading and editing the meta-data of several popular
audio formats. Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg
Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack
TrueAudio, WAV, AIFF, MP4 and ASF files.

%package -n libtag_c0
Summary:        Audio Meta-Data Library
License:        LGPL-2.1+
Group:          System/Libraries
# Without this the old taglib package containing the libraries isn't removed 
when this package is installed.
# The only alternative is for the libraries to Require: taglib version-release, 
badness 440
Conflicts:      taglib <= 1.6.3

%description -n libtag_c0
TagLib is a library for reading and editing the meta-data of several popular
audio formats. Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg
Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack
TrueAudio, WAV, AIFF, MP4 and ASF files.

%package -n libtag-devel
Summary:        Development files for taglib
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
Requires:       libstdc++-devel
Requires:       libtag1 = %{version}-%{release}
Requires:       libtag_c0 = %{version}-%{release}
# taglib-devel was last used in openSUSE 11.4 (taglib-devel-1.6.2)
# The last taglib-devel used was version 1.6.3 from multimedia:libs.
Provides:       taglib-devel = %{version}
Obsoletes:      taglib-devel <= 1.6.3

%description -n libtag-devel
This package contains development files for taglib.

%prep
%setup -q
%patch1 -p1
%patch2
%patch3 -p1
%build
mkdir build
cd build
export CXXFLAGS="%{optflags} -D_GNU_SOURCE"
export CFLAGS="%{optflags} -D_GNU_SOURCE"
_libsuffix=$(echo %{_lib} | cut -b4-)
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DBUILD_TESTS:BOOL=ON 
-DLIB_SUFFIX=$_libsuffix -DWITH_ASF:BOOL=ON -DWITH_MP4:BOOL=ON ..
make %{?_smp_mflags} VERBOSE=1
cd ..

doxygen -u
doxygen

%install
cd build
%makeinstall
cd ..

# install susehelp file
mkdir -p %{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/
install -pm 0644 %{SOURCE1} 
%{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/

%if 0%{?suse_version}
%suse_update_desktop_file 
%{buildroot}%{_datadir}/susehelp/meta/Development/Libraries/%{name}.desktop
%endif

# Documentation
mkdir -p %{buildroot}%{_defaultdocdir}/libtag-devel
rm -f examples/CMake*
cp -a AUTHORS COPYING.LGPL COPYING.MPL NEWS doc/html/ examples/ 
%{buildroot}%{_defaultdocdir}/libtag-devel/

%fdupes -s %{buildroot}

echo <<EOF >README.taglib
This package only acts as a placeholder until all packages that use taglib
have upgraded to the new package names libtag1 and libtag_c0.
EOF

%check
# check the library
#pushd tests
#make check
#popd

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%post -n libtag1 -p /sbin/ldconfig

%postun -n libtag1 -p /sbin/ldconfig

%post -n libtag_c0 -p /sbin/ldconfig

%postun -n libtag_c0 -p /sbin/ldconfig

%files -n libtag1
%defattr(-,root,root,-)
%{_libdir}/libtag.so.1
%{_libdir}/libtag.so.1.*

%files -n libtag_c0
%defattr(-,root,root,-)
%{_libdir}/libtag_c.so.0
%{_libdir}/libtag_c.so.0.*

%files -n libtag-devel
%defattr(-,root,root,-)
%doc %{_defaultdocdir}/libtag-devel
%{_bindir}/taglib-config
%{_includedir}/taglib/
%{_libdir}/libtag*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/susehelp/

%files
%defattr(-,root,root,-)
%doc README.taglib

%changelog
++++++ baselibs.conf ++++++
libtag1
libtag_c0
++++++ taglib-1.7-ds-rusxmms-r2.patch ++++++
diff -dPNur taglib-1.7.2/config-taglib.h.cmake 
taglib-1.7.2-ds/config-taglib.h.cmake
--- taglib-1.7.2/config-taglib.h.cmake  2012-04-20 17:57:13.000000000 +0200
+++ taglib-1.7.2-ds/config-taglib.h.cmake       2013-01-29 12:30:59.000000000 
+0100
@@ -6,6 +6,8 @@
 /* Define if you have libz */
 #cmakedefine   HAVE_ZLIB 1
 
+#cmakedefine   HAVE_LIBRCC 1
+
 #cmakedefine   NO_ITUNES_HACKS 1
 #cmakedefine   WITH_ASF 1
 #cmakedefine   WITH_MP4 1
diff -dPNur taglib-1.7.2/ConfigureChecks.cmake 
taglib-1.7.2-ds/ConfigureChecks.cmake
--- taglib-1.7.2/ConfigureChecks.cmake  2012-04-20 17:57:13.000000000 +0200
+++ taglib-1.7.2-ds/ConfigureChecks.cmake       2013-01-29 12:30:59.000000000 
+0100
@@ -14,6 +14,8 @@
 #check for libz using the cmake supplied FindZLIB.cmake
 FIND_PACKAGE(ZLIB)
 
+SET(HAVE_LIBRCC 1)
+
 IF(ZLIB_FOUND)
        SET(HAVE_ZLIB 1)
 ELSE(ZLIB_FOUND)
diff -dPNur taglib-1.7.2/taglib/CMakeLists.txt 
taglib-1.7.2-ds/taglib/CMakeLists.txt
--- taglib-1.7.2/taglib/CMakeLists.txt  2012-04-20 17:57:13.000000000 +0200
+++ taglib-1.7.2-ds/taglib/CMakeLists.txt       2013-01-29 12:30:59.000000000 
+0100
@@ -171,6 +171,7 @@
 )
 
 SET(toolkit_SRCS
+toolkit/rccpatch.cpp
 toolkit/tstring.cpp
 toolkit/tstringlist.cpp
 toolkit/tbytevector.cpp
@@ -198,7 +199,7 @@
     add_library(tag SHARED ${tag_LIB_SRCS})
 endif(ENABLE_STATIC)
 
-TARGET_LINK_LIBRARIES(tag )
+TARGET_LINK_LIBRARIES(tag rcc)
 if(ZLIB_FOUND)
        TARGET_LINK_LIBRARIES(tag ${ZLIB_LIBRARIES})
 endif(ZLIB_FOUND)
diff -dPNur taglib-1.7.2/taglib/CMakeLists.txt.orig 
taglib-1.7.2-ds/taglib/CMakeLists.txt.orig
diff -dPNur taglib-1.7.2/taglib/mpeg/id3v1/id3v1tag.cpp 
taglib-1.7.2-ds/taglib/mpeg/id3v1/id3v1tag.cpp
--- taglib-1.7.2/taglib/mpeg/id3v1/id3v1tag.cpp 2012-04-20 17:57:13.000000000 
+0200
+++ taglib-1.7.2-ds/taglib/mpeg/id3v1/id3v1tag.cpp      2013-01-29 
12:30:59.000000000 +0100
@@ -59,17 +59,18 @@
 
 String ID3v1::StringHandler::parse(const ByteVector &data) const
 {
-  return String(data, String::Latin1).stripWhiteSpace();
+  return String(data, String::Latin1ID3).stripWhiteSpace();
 }
 
 ByteVector ID3v1::StringHandler::render(const String &s) const
 {
   if(!s.isLatin1())
   {
+   if (String::ID3WType(String::Latin1) == String::Latin1)
     return ByteVector();
   }
 
-  return s.data(String::Latin1);
+  return s.data(String::Latin1ID3);
 }
 
 
////////////////////////////////////////////////////////////////////////////////
@@ -240,7 +241,7 @@
     d->track = uchar(data[offset + 29]);
   }
   else
-    d->comment = data.mid(offset, 30);
+    d->comment = TagPrivate::stringHandler->parse(data.mid(offset, 30));
 
   offset += 30;
 
diff -dPNur taglib-1.7.2/taglib/mpeg/id3v2/frames/commentsframe.cpp 
taglib-1.7.2-ds/taglib/mpeg/id3v2/frames/commentsframe.cpp
--- taglib-1.7.2/taglib/mpeg/id3v2/frames/commentsframe.cpp     2012-04-20 
17:57:13.000000000 +0200
+++ taglib-1.7.2-ds/taglib/mpeg/id3v2/frames/commentsframe.cpp  2013-01-29 
12:30:59.000000000 +0100
@@ -136,10 +136,10 @@
     return;
   }
 
-  d->textEncoding = String::Type(data[0]);
+  d->textEncoding = String::ID3Type(data[0]);
   d->language = data.mid(1, 3);
 
-  int byteAlign = d->textEncoding == String::Latin1 || d->textEncoding == 
String::UTF8 ? 1 : 2;
+  int byteAlign = (d->textEncoding == String::Latin1 || d->textEncoding == 
String::Latin1ID3 || d->textEncoding == String::Latin1ID3V2 || d->textEncoding 
== String::UTF8) ? 1 : 2;
 
   ByteVectorList l = ByteVectorList::split(data.mid(4), 
textDelimiter(d->textEncoding), byteAlign, 2);
 
@@ -155,10 +155,12 @@
 
   String::Type encoding = d->textEncoding;
 
+  encoding = String::ID3WType(encoding);
+
   encoding = checkEncoding(d->description, encoding);
   encoding = checkEncoding(d->text, encoding);
-
-  v.append(char(encoding));
+  
+  v.append(char(String::ID3RealType(encoding)));
   v.append(d->language.size() == 3 ? d->language : "XXX");
   v.append(d->description.data(encoding));
   v.append(textDelimiter(encoding));
diff -dPNur taglib-1.7.2/taglib/mpeg/id3v2/frames/textidentificationframe.cpp 
taglib-1.7.2-ds/taglib/mpeg/id3v2/frames/textidentificationframe.cpp
--- taglib-1.7.2/taglib/mpeg/id3v2/frames/textidentificationframe.cpp   
2012-04-20 17:57:13.000000000 +0200
+++ taglib-1.7.2-ds/taglib/mpeg/id3v2/frames/textidentificationframe.cpp        
2013-01-29 12:30:59.000000000 +0100
@@ -105,12 +105,12 @@
 
   // read the string data type (the first byte of the field data)
 
-  d->textEncoding = String::Type(data[0]);
+  d->textEncoding = String::ID3Type(data[0]);
 
   // split the byte array into chunks based on the string type (two byte 
delimiter
   // for unicode encodings)
 
-  int byteAlign = d->textEncoding == String::Latin1 || d->textEncoding == 
String::UTF8 ? 1 : 2;
+  int byteAlign = (d->textEncoding == String::Latin1 || d->textEncoding == 
String::Latin1ID3 || d->textEncoding == String::Latin1ID3V2 || d->textEncoding 
== String::UTF8) ? 1 : 2;
 
   // build a small counter to strip nulls off the end of the field
 
@@ -139,11 +139,14 @@
 
 ByteVector TextIdentificationFrame::renderFields() const
 {
-  String::Type encoding = checkEncoding(d->fieldList, d->textEncoding);
+  String::Type encoding = d->textEncoding;
+
+  encoding = String::ID3WType(encoding);
+  encoding = checkEncoding(d->fieldList, encoding);
 
   ByteVector v;
 
-  v.append(char(encoding));
+  v.append(char(String::ID3RealType(encoding)));
 
   for(StringList::ConstIterator it = d->fieldList.begin(); it != 
d->fieldList.end(); it++) {
 
diff -dPNur taglib-1.7.2/taglib/toolkit/CMakeLists.txt 
taglib-1.7.2-ds/taglib/toolkit/CMakeLists.txt
--- taglib-1.7.2/taglib/toolkit/CMakeLists.txt  2012-04-20 17:57:13.000000000 
+0200
+++ taglib-1.7.2-ds/taglib/toolkit/CMakeLists.txt       2013-01-29 
12:30:59.000000000 +0100
@@ -1 +1 @@
-INSTALL( FILES  taglib.h tstring.h tlist.h tlist.tcc tstringlist.h     
tbytevector.h tbytevectorlist.h tfile.h         tmap.h tmap.tcc DESTINATION 
${INCLUDE_INSTALL_DIR}/taglib)
+INSTALL( FILES  rccpatch.h taglib.h tstring.h tlist.h tlist.tcc tstringlist.h  
        tbytevector.h tbytevectorlist.h tfile.h         tmap.h tmap.tcc 
DESTINATION ${INCLUDE_INSTALL_DIR}/taglib)
diff -dPNur taglib-1.7.2/taglib/toolkit/rccpatch.cpp 
taglib-1.7.2-ds/taglib/toolkit/rccpatch.cpp
--- taglib-1.7.2/taglib/toolkit/rccpatch.cpp    1970-01-01 01:00:00.000000000 
+0100
+++ taglib-1.7.2-ds/taglib/toolkit/rccpatch.cpp 2013-01-29 12:35:45.000000000 
+0100
@@ -0,0 +1,192 @@
+#include <stdlib.h>
+
+#include <string>
+#include "tstring.h"
+#include "tbytevector.h"
+
+#ifndef HAVE_LIBRCC
+# include <config.h>
+#endif
+
+#ifdef HAVE_LIBRCC
+# include <librcc.h>
+# include <string.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 */
+}
+
+
+TagLib::ByteVector rccPatchRecodeOutput(const std::string &s) {
+    TagLib::ByteVector v;
+#ifdef HAVE_LIBRCC
+    size_t rlen;
+    char *res;
+
+    rccPatchTryInit();
+
+    res = rccSizedRecode(ctx, UTF_CLASS, OUT_CLASS, s.c_str(), s.length(), 
&rlen);
+    if (res) v.setData(res, rlen);
+    else v.setData(s.c_str(), s.length());
+
+    return v;
+#else
+    v.setData("", 0);
+    
+    return v;
+#endif /* HAVE_LIBRCC */
+}
+
+TagLib::ByteVector rccPatchRecodeOutputID3(const std::string &s, bool v2 = 
false) {
+    TagLib::ByteVector v;
+#ifdef HAVE_LIBRCC
+    size_t rlen;
+    char *res;
+
+    rccPatchTryInit();
+
+    res = rccSizedRecode(ctx, UTF_CLASS, v2?ID3V2_CLASS:ID3_CLASS, s.c_str(), 
s.length(), &rlen);
+    if (res) v.setData(res, rlen);
+    else v.setData(s.c_str(), s.length());
+
+    return v;
+#else
+    v.setData("", 0);
+    
+    return v;
+#endif /* HAVE_LIBRCC */
+}
+
+TagLib::ByteVector rccPatchRecodeInput(const std::string &s) {
+    TagLib::ByteVector v;
+#ifdef HAVE_LIBRCC
+    size_t rlen;
+    char *res;
+
+    rccPatchTryInit();
+
+    res = rccSizedRecode(ctx, OUT_CLASS, UTF_CLASS, s.c_str(), s.length(), 
&rlen);
+    if (res) v.setData(res, rlen);
+    else
+#endif /* HAVE_LIBRCC */
+    v.setData("", 0);
+    
+    return v;
+}
+
+TagLib::ByteVector rccPatchRecodeInputID3(const std::string &s, bool v2 = 
false) {
+    TagLib::ByteVector v;
+#ifdef HAVE_LIBRCC
+    size_t rlen;
+    char *res;
+
+    rccPatchTryInit();
+
+    res = rccSizedRecode(ctx, v2?ID3V2_CLASS:ID3_CLASS, UTF_CLASS, s.c_str(), 
s.length(), &rlen);
+    if (res) v.setData(res, rlen);
+    else
+#endif /* HAVE_LIBRCC */
+    v.setData("", 0);
+
+    return v;
+}
+
+TagLib::String::Type rccPatchGetLocaleType() {
+#ifdef HAVE_LIBRCC
+    size_t len;
+    char charset[32];
+
+    rccPatchTryInit();
+    
+    if (!rccLocaleGetCharset(charset, NULL, 31)) {
+       if (!strncmp(charset, "UTF", 3)) {
+           len = strlen(charset);
+           
+           if (charset[len-1]=='8') return TagLib::String::UTF8;
+           if (!strcmp(charset+(len-2),"16")) return TagLib::String::UTF16;
+           if (!strcmp(charset+(len-4),"16LE")) return TagLib::String::UTF16LE;
+           if (!strcmp(charset+(len-4),"16BE")) return TagLib::String::UTF16BE;
+       }
+       return TagLib::String::Latin1;
+    }
+#endif /* HAVE_LIBRCC */
+    return TagLib::String::UTF8;
+}
+
+TagLib::String::Type rccPatchGetID3Type() {
+#ifdef HAVE_LIBRCC
+    size_t len;
+    const char *charset;
+
+    rccPatchTryInit();
+    
+    charset = rccGetCurrentCharsetName(ctx, ID3V2_CLASS);
+    if (charset) {
+       if (!strncmp(charset, "UTF", 3)) {
+           len = strlen(charset);
+           
+           if (charset[len-1]=='8') return TagLib::String::UTF8;
+           if (!strcmp(charset+(len-2),"16")) return TagLib::String::UTF16;
+           if (!strcmp(charset+(len-4),"16LE")) return TagLib::String::UTF16LE;
+           if (!strcmp(charset+(len-4),"16BE")) return TagLib::String::UTF16BE;
+       }
+       return TagLib::String::Latin1ID3V2;
+    }
+#endif /* HAVE_LIBRCC */
+    return TagLib::String::Latin1;
+}
diff -dPNur taglib-1.7.2/taglib/toolkit/rccpatch.h 
taglib-1.7.2-ds/taglib/toolkit/rccpatch.h
--- taglib-1.7.2/taglib/toolkit/rccpatch.h      1970-01-01 01:00:00.000000000 
+0100
+++ taglib-1.7.2-ds/taglib/toolkit/rccpatch.h   2013-01-29 12:30:59.000000000 
+0100
@@ -0,0 +1,20 @@
+#ifndef _RCC_PATCH_H
+#define _RCC_PATCH_H
+
+#include <string.h>
+#include "tstring.h"
+#include "tbytevector.h"
+
+void rccPatchFree();
+void rccPatchInit();
+void rccPatchSetContext(void *newctx);
+
+TagLib::ByteVector rccPatchRecodeOutput(const std::string &s);
+TagLib::ByteVector rccPatchRecodeInput(const std::string &s);
+TagLib::ByteVector rccPatchRecodeOutputID3(const std::string &s, bool v2 = 
false);
+TagLib::ByteVector rccPatchRecodeInputID3(const std::string &s, bool v2 = 
false);
+
+TagLib::String::Type rccPatchGetLocaleType();
+TagLib::String::Type rccPatchGetID3Type();
+
+#endif /* _RCC_PATCH_H */
diff -dPNur taglib-1.7.2/taglib/toolkit/tstring.cpp 
taglib-1.7.2-ds/taglib/toolkit/tstring.cpp
--- taglib-1.7.2/taglib/toolkit/tstring.cpp     2012-04-20 17:57:13.000000000 
+0200
+++ taglib-1.7.2-ds/taglib/toolkit/tstring.cpp  2013-01-29 12:34:24.000000000 
+0100
@@ -23,6 +23,7 @@
  *   http://www.mozilla.org/MPL/                                           *
  ***************************************************************************/
 
+#include "rccpatch.h"
 #include "tstring.h"
 #include "unicode.h"
 #include "tdebug.h"
@@ -167,7 +168,7 @@
   if(v.isEmpty())
     return;
 
-  if(t == Latin1 || t == UTF8) {
+  if(t == Latin1 || t == Latin1ID3 || t == Latin1ID3V2 || t == UTF8) {
 
     int length = 0;
     d->data.resize(v.size());
@@ -369,10 +370,21 @@
 {
   ByteVector v;
 
-  switch(t) {
+  if (t == Locale) t = rccPatchGetLocaleType();
 
+  switch(t) {
+  case Locale:
   case Latin1:
+  case Latin1ID3:
+  case Latin1ID3V2:
   {
+    std::string s = to8Bit(true);
+    if (t == Latin1ID3) v = rccPatchRecodeOutputID3(s, false);
+    else if (t == Latin1ID3V2) v = rccPatchRecodeOutputID3(s, true);
+    else /* if (t == Latin1(Locale) */ v = rccPatchRecodeOutput(s);
+
+    if (v.size()) return v;
+    
     for(wstring::const_iterator it = d->data.begin(); it != d->data.end(); 
it++)
       v.append(char(*it));
     break;
@@ -717,6 +729,30 @@
 
 void String::prepare(Type t)
 {
+  if (t == Locale) t = rccPatchGetLocaleType();
+
+  if ((t == Latin1)||(t == Latin1ID3)||(t == Latin1ID3V2)) {
+    std::string s = to8Bit(false);
+    ByteVector v;
+
+    if (t == Latin1ID3) v = rccPatchRecodeInputID3(s, false);
+    else if (t == Latin1ID3V2) v = rccPatchRecodeInputID3(s, true);
+    else /* Latin1 converted from Locale */ v = rccPatchRecodeInput(s);
+    
+    if (v.size()) {
+       int length = 0;
+       d->data.resize(v.size());
+       wstring::iterator targetIt = d->data.begin();
+       for(ByteVector::ConstIterator it = v.begin(); it != v.end() && (*it); 
++it) {
+           *targetIt = uchar(*it);
+           ++targetIt;
+            ++length;
+       }
+       d->data.resize(length);
+        t = UTF8;
+    }
+  }
+
   switch(t) {
   case UTF16:
   {
@@ -806,6 +842,27 @@
 
 std::ostream &operator<<(std::ostream &s, const String &str)
 {
-  s << str.to8Bit();
+  ByteVector bv = str.data(String::Locale);
+  s << bv;
   return s;
 }
+
+String::Type String::ID3Type(int i) {
+       if (i == Latin1) return Latin1ID3V2;
+       return Type(i);
+};
+
+String::Type String::ID3WType(Type type) {
+    Type rcc_type = rccPatchGetID3Type();
+    if ((rcc_type == Latin1ID3)||(rcc_type == Latin1ID3V2)) {
+       if (type == Latin1) return rcc_type;
+       return type;
+    }
+    
+    return rcc_type;
+};
+
+String::Type String::ID3RealType(Type type) {
+    if ((type == Latin1ID3)||(type == Latin1ID3V2)) return Latin1;
+    return type;
+}
diff -dPNur taglib-1.7.2/taglib/toolkit/tstring.h 
taglib-1.7.2-ds/taglib/toolkit/tstring.h
--- taglib-1.7.2/taglib/toolkit/tstring.h       2012-04-20 17:57:13.000000000 
+0200
+++ taglib-1.7.2-ds/taglib/toolkit/tstring.h    2013-01-29 12:30:59.000000000 
+0100
@@ -88,6 +88,18 @@
      */
     enum Type {
       /*!
+       * Determine using current locale settings
+       */
+      Locale = -1,
+      /*!
+       * Latin1 for ID3 tags.
+       */
+      Latin1ID3 = 65,
+      /*!
+       * Latin1 for ID3 tags.
+       */
+      Latin1ID3V2 = 66,
+      /*!
        * IS08859-1, or <i>Latin1</i> encoding.  8 bit characters.
        */
       Latin1 = 0,
@@ -110,6 +122,10 @@
       UTF16LE = 4
     };
 
+    static Type ID3Type(int i);
+    static Type ID3WType(Type type);
+    static Type ID3RealType(Type type);
+
     /*!
      * Constructs an empty String.
      */
++++++ taglib-1.7.2-doxygen.patch ++++++
Index: taglib-1.7.2/CMakeLists.txt
===================================================================
--- taglib-1.7.2.orig/CMakeLists.txt
+++ taglib-1.7.2/CMakeLists.txt
@@ -76,7 +76,7 @@ endif(NOT WIN32)
 
 INSTALL( PROGRAMS  ${CMAKE_CURRENT_BINARY_DIR}/taglib-config DESTINATION 
${BIN_INSTALL_DIR})
 
-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake 
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake 
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
 file(COPY doc/taglib.png DESTINATION doc)
 ADD_CUSTOM_TARGET(docs doxygen)
 
++++++ taglib-noansiflags.patch ++++++
--- CMakeLists.txt.orig
+++ CMakeLists.txt
@@ -24,8 +24,8 @@ set(INCLUDE_INSTALL_DIR      "${CMAKE_IN
 
 if (CMAKE_COMPILER_IS_GNUCXX)
    if (CMAKE_SYSTEM_NAME MATCHES Linux)
-     set ( CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef 
-Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute 
-fno-common")
-     set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor 
-Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -fno-check-new -fno-common")
+     set ( CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} -Wno-long-long -Wundef 
-Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute 
-fno-common")
+     set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden 
-Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall 
-W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-check-new 
-fno-common")
    endif (CMAKE_SYSTEM_NAME MATCHES Linux)
 endif (CMAKE_COMPILER_IS_GNUCXX)
 if(MSVC)
++++++ taglib.desktop ++++++
[Desktop Entry]
Name=Taglib API reference
Name[de]=Taglib API Referenz
Name[hu]=Taglib API referencia
DocPath=/usr/share/doc/packages/libtag-devel/html/index.html
X-DOC-SearchMethod=htdig
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to