summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2010-09-24 09:44:51 +0000
committerwiz <wiz@pkgsrc.org>2010-09-24 09:44:51 +0000
commit3b8e9f2dec829c185d7226a1ef4e6a6d4cf99232 (patch)
tree2e8bf1e1e3f9671d04f3131788f2923f49074b40 /audio
parent44bc323d74f46db00fdfaba24993de8765c3de29 (diff)
downloadpkgsrc-3b8e9f2dec829c185d7226a1ef4e6a6d4cf99232.tar.gz
Add another patch from upstream for fixing problems with XML tags
in the collection scanner. Bump PKGREVISION.
Diffstat (limited to 'audio')
-rw-r--r--audio/amarok/Makefile3
-rw-r--r--audio/amarok/distinfo4
-rw-r--r--audio/amarok/patches/patch-aa81
3 files changed, 76 insertions, 12 deletions
diff --git a/audio/amarok/Makefile b/audio/amarok/Makefile
index 5e2989c759e..fb91ea781b7 100644
--- a/audio/amarok/Makefile
+++ b/audio/amarok/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.87 2010/09/20 21:29:15 wiz Exp $
+# $NetBSD: Makefile,v 1.88 2010/09/24 09:44:51 wiz Exp $
#
DISTNAME= amarok-${VERS}
VERS= 2.3.2
+PKGREVISION= 1
CATEGORIES= audio multimedia
#MASTER_SITES= http://download.kde.org/unstable/amarok/${VERS}/src/ \
# ftp://gd.tuwien.ac.at/kde/unstable/amarok/${VERS}/src/
diff --git a/audio/amarok/distinfo b/audio/amarok/distinfo
index 92add65105e..6b330570bb4 100644
--- a/audio/amarok/distinfo
+++ b/audio/amarok/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.42 2010/09/20 21:29:15 wiz Exp $
+$NetBSD: distinfo,v 1.43 2010/09/24 09:44:51 wiz Exp $
SHA1 (amarok-2.3.2.tar.bz2) = 594d6d3ad57832fb80ba4387459356132d37ace2
RMD160 (amarok-2.3.2.tar.bz2) = 3c2a7868fb7b3f74e35e124cf3a8bad5d8653390
Size (amarok-2.3.2.tar.bz2) = 13948250 bytes
-SHA1 (patch-aa) = 981882a42a2857c8950ee6be3507fbdf33467747
+SHA1 (patch-aa) = 30de693fabd0ac8637c049e5357fd08fadd4ceed
SHA1 (patch-ab) = 152a6c0516dcab316c4f90480f1bb7fb46eabfbe
diff --git a/audio/amarok/patches/patch-aa b/audio/amarok/patches/patch-aa
index 3ef8bdd5245..c5d04a0aabc 100644
--- a/audio/amarok/patches/patch-aa
+++ b/audio/amarok/patches/patch-aa
@@ -1,15 +1,78 @@
-$NetBSD: patch-aa,v 1.19 2010/09/20 21:29:15 wiz Exp $
+$NetBSD: patch-aa,v 1.20 2010/09/24 09:44:52 wiz Exp $
+
+Two fixes from upstream:
BPM bugfix for FLAC fils, amarok commit ce57e426.
---- utilities/collectionscanner/CollectionScanner.cpp.orig 2010-09-15 21:24:13.000000000 +0000
+Re-add some tests for unprintable but also invalid chars. Apparently
+Qt's XML classes don't properly check for invalid chars when writing
+XML, even if you tel l them to. Also switch to QXmlStreamWriter,
+as apparently going forward it is the more supported class. BUG:
+251762, commmit 79d86829294ac54132c01153660e70e30c15c378 (I think).
+
+--- utilities/collectionscanner/CollectionScanner.cpp.orig 2010-09-24 09:21:46.000000000 +0000
+++ utilities/collectionscanner/CollectionScanner.cpp
-@@ -701,7 +701,7 @@ CollectionScanner::readTags( const QStri
- attributes["composer"] = TStringToQString( file->xiphComment()->fieldListMap()["COMPOSER"].front() ).trimmed();
+@@ -37,13 +37,13 @@
+ #include <QByteArray>
+ #include <QDBusReply>
+ #include <QDir>
+-#include <QDomDocument>
+ #include <QFile>
+ #include <QtDebug>
+ #include <QTextCodec>
+ #include <QTextStream>
+ #include <QTimer>
+ #include <QThread>
++#include <QXmlStreamWriter>
+
+ //Taglib:
+ #include <apetag.h>
+@@ -814,8 +814,10 @@ CollectionScanner::readTags( const QStri
+ void
+ CollectionScanner::writeElement( const QString &name, const AttributeHash &attributes )
+ {
+- QDomDocument doc; // A dummy. We don't really use DOM, but SAX2
+- QDomElement element = doc.createElement( name );
++ QString text;
++ QXmlStreamWriter writer( &text );
++
++ writer.writeStartElement( name );
+
+ QHashIterator<QString, QString> it( attributes );
+ while( it.hasNext() )
+@@ -829,7 +831,15 @@ CollectionScanner::writeElement( const Q
+ bool noCategory = false;
+ for( unsigned i = 0; i < len; i++ )
+ {
+- if( data[i].category() == QChar::NoCategory )
++ if( data[i].category() == QChar::NoCategory ||
++ data[i].category() == QChar::Other_Surrogate ||
++ (
++ data[i].unicode() < 20 &&
++ data[i].unicode() != 9 &&
++ data[i].unicode() != 10 &&
++ data[i].unicode() != 13
++ )
++ )
+ {
+ noCategory = true;
+ break;
+@@ -838,15 +848,12 @@ CollectionScanner::writeElement( const Q
+
+ if( noCategory )
+ continue;
+-
+- element.setAttribute( it.key(), it.value() );
++ writer.writeAttribute( it.key(), it.value() );
+ }
+
+- QString text;
+- QTextStream stream( &text, QIODevice::WriteOnly );
+- element.save( stream, 0 );
++ writer.writeEndElement();
- if ( !file->xiphComment()->fieldListMap()[ "BPM" ].isEmpty() )
-- attributes["bpm"] = TStringToQString( file->xiphComment()->fieldListMap()["BPM"].front() ).trimmed().toFloat();
-+ attributes["bpm"] = TStringToQString( file->xiphComment()->fieldListMap()["BPM"].front() ).trimmed();
+- std::cout << text.toUtf8().data() << std::endl;
++ std::cout << text.toUtf8().data() << std::endl << std::endl;
+ }
- if ( !file->xiphComment()->fieldListMap()[ "DISCNUMBER" ].isEmpty() )
- disc = TStringToQString( file->xiphComment()->fieldListMap()["DISCNUMBER"].front() ).trimmed();
+ // taken verbatim from Qt's sources, since it's stupidly in the QtGui module