Commit 4ec7b9eb authored by Manuel Tortosa's avatar Manuel Tortosa

Add patch for qt 4.7

parent 9ef53a50
......@@ -6,6 +6,7 @@
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
pkgname=amarok
replaces=('amarok-base' 'amarok-engine-xine' 'amarok-base-mysqlfree')
pkgver=2.3.2
......@@ -15,26 +16,32 @@ arch=("i686" "x86_64")
url="http://amarok.kde.org"
license=('GPL2' 'LGPL2' 'FDL')
depends=('kdebase-runtime' 'mysql' 'qtscriptgenerator' 'taglib-extras' 'liblastfm')
makedepends=('pkgconfig' 'automoc4' 'cmake' 'libgpod' 'libmtp' 'loudmouth')
makedepends=('pkgconfig' 'automoc4' 'cmake' 'libgpod' 'libmtp' 'loudmouth' 'docbook-xsl')
optdepends=("libgpod: support Apple iPod audio devices"
"libmtp: support for portable media devices"
"loudmouth: backend needed by mp3tunes for syncing")
"libmtp: support for portable media devices"
"loudmouth: backend needed by mp3tunes for syncing")
install=${pkgname}.install
source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
md5sums=('4e03dc009f8b44d9b8dfb5f6d1034081')
source=("http://download.kde.org/stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2"
'scanning-qt-regression.patch')
md5sums=('4e03dc009f8b44d9b8dfb5f6d1034081'
'a2effdfed3cf836c42264edbd2845441')
build() {
cd ${srcdir}
mkdir build
cd build
cmake ../${pkgname}-${pkgver} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_INSTALL_PREFIX=/usr
make || return 1
# Already fixed upstream see:
# https://bugs.kde.org/show_bug.cgi?id=251762
cd ${srcdir}/${pkgname}-${pkgver}
patch -Np1 -i ${srcdir}/scanning-qt-regression.patch
cd ${srcdir}
mkdir build
cd build
cmake ../${pkgname}-${pkgver} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
make
}
package(){
cd ${srcdir}/build
make DESTDIR=${pkgdir} install || return 1
make DESTDIR=${pkgdir} install
}
From: Jeff Mitchell <mitchell@kde.org>
Date: Wed, 22 Sep 2010 22:15:17 +0000 (-0400)
Subject: Re-add some tests for unprintable but also invalid chars. Apparently Qt's XML classes...
X-Git-Url: http://gitweb.kde.org?hp=fd2a40d970c57fa2102e95de1a60c59e37892638
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 tell them to.
Also switch to QXmlStreamWriter, as apparently going forward it is the more supported class.
BUG: 251762
---
diff --git a/utilities/collectionscanner/CollectionScanner.cpp b/utilities/collectionscanner/CollectionScanner.cpp
index 0a23a53..28c554b 100644
--- a/utilities/collectionscanner/CollectionScanner.cpp
+++ b/utilities/collectionscanner/CollectionScanner.cpp
@@ -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 QString &path, TagLib::AudioProperties::ReadS
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 QString &name, const AttributeHash &attri
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 QString &name, const AttributeHash &attri
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();
- std::cout << text.toUtf8().data() << std::endl;
+ std::cout << text.toUtf8().data() << std::endl << std::endl;
}
// taken verbatim from Qt's sources, since it's stupidly in the QtGui module
......@@ -52,6 +52,8 @@ check_files()
# Get the file list in _repo/remote
local_files=`ls -a _repo/remote/* | cut -d "/" -f 3`
remove_list=""
repo_total=0
local_total=0
for parse_file in $local_files
do
file_exist="false"
......@@ -60,10 +62,12 @@ check_files()
if [ "$parse_file" = "$compare_file" ] ; then
file_exist="true"
fi
(($repo_total++))
done
if [ "$file_exist" = "false" ] ; then
remove_list="$remove_list $parse_file"
fi
(($local_total++))
done
if [ "$remove_list" != "" ] ; then
title2 "The following packages in _repo/remote don't exist in the sever:"
......@@ -91,6 +95,26 @@ check_files()
esac
done
fi
if [ $repo_total > $local_total ] ; then
title2 "Warning: the number of files in the server is bigger, check if there was a problem syncing down!"
newline
question "Do you want to continue? (y/n)"
while true; do
read yn
case $yn in
y* | Y* )
break
;;
[nN]* )
title "Aborting...." ;
exit
;;
* )
echo "Enter yes or no"
;;
esac
done
fi
}
sync_complete()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment