summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2011-04-18 20:09:33 +0000
committerAndreas K. Hüttel <dilfridge@gentoo.org>2011-04-18 20:09:33 +0000
commit350fb79615e856fba67f8fb2e23e0b4e75d2b67e (patch)
tree4af2049d766edab03277d58a49a053c2de071e52 /kde-base
parentAdded optional support for color torrent listing (diff)
downloadgentoo-2-350fb79615e856fba67f8fb2e23e0b4e75d2b67e.tar.gz
gentoo-2-350fb79615e856fba67f8fb2e23e0b4e75d2b67e.tar.bz2
gentoo-2-350fb79615e856fba67f8fb2e23e0b4e75d2b67e.zip
Add upstream patch to fix encoding in e-mail headers, kde bug 263761
(Portage version: 2.1.9.46/cvs/Linux x86_64)
Diffstat (limited to 'kde-base')
-rw-r--r--kde-base/kdepimlibs/ChangeLog9
-rw-r--r--kde-base/kdepimlibs/files/kdepimlibs-4.6.2-encoding.patch41
-rw-r--r--kde-base/kdepimlibs/kdepimlibs-4.6.2-r1.ebuild (renamed from kde-base/kdepimlibs/kdepimlibs-4.6.2.ebuild)6
3 files changed, 54 insertions, 2 deletions
diff --git a/kde-base/kdepimlibs/ChangeLog b/kde-base/kdepimlibs/ChangeLog
index 913f4e79419b..7eb5e1219c10 100644
--- a/kde-base/kdepimlibs/ChangeLog
+++ b/kde-base/kdepimlibs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for kde-base/kdepimlibs
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdepimlibs/ChangeLog,v 1.93 2011/04/06 14:19:01 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdepimlibs/ChangeLog,v 1.94 2011/04/18 20:09:32 dilfridge Exp $
+
+*kdepimlibs-4.6.2-r1 (18 Apr 2011)
+
+ 18 Apr 2011; Andreas K. Huettel <dilfridge@gentoo.org>
+ -kdepimlibs-4.6.2.ebuild, +kdepimlibs-4.6.2-r1.ebuild,
+ +files/kdepimlibs-4.6.2-encoding.patch:
+ Add upstream patch to fix encoding in e-mail headers, kde bug 263761
*kdepimlibs-4.6.2 (06 Apr 2011)
diff --git a/kde-base/kdepimlibs/files/kdepimlibs-4.6.2-encoding.patch b/kde-base/kdepimlibs/files/kdepimlibs-4.6.2-encoding.patch
new file mode 100644
index 000000000000..7630a8c119fe
--- /dev/null
+++ b/kde-base/kdepimlibs/files/kdepimlibs-4.6.2-encoding.patch
@@ -0,0 +1,41 @@
+commit 6d80788587894ee0cf3e087f959226a3d764af95
+Author: Thomas McGuire <mcguire@kde.org>
+Date: Sat Apr 16 21:56:01 2011 +0100
+
+ Use UTF-8 if the charset can't encode the string.
+
+ Hopefully the call to canEncode() won't affect the performance too
+ much...
+
+ BUG: 263761
+ (cherry picked from commit 7b75f8a769ef0e40e59dedb1327ff0ed51e63ba9)
+
+diff --git a/kmime/kmime_util.cpp b/kmime/kmime_util.cpp
+index 29ea676..ab1906c 100644
+--- a/kmime/kmime_util.cpp
++++ b/kmime/kmime_util.cpp
+@@ -287,6 +287,11 @@ QByteArray encodeRFC2047String( const QString &src, const QByteArray &charset,
+ usedCS = charset;
+ }
+
++ if ( !codec->canEncode( src ) ) {
++ usedCS = "utf-8";
++ codec = QTextCodec::codecForName( usedCS );
++ }
++
+ if ( usedCS.contains( "8859-" ) ) { // use "B"-Encoding for non iso-8859-x charsets
+ useQEncoding = true;
+ }
+diff --git a/kmime/kmime_util.h b/kmime/kmime_util.h
+index 84c061e..ebe2a38 100644
+--- a/kmime/kmime_util.h
++++ b/kmime/kmime_util.h
+@@ -165,7 +165,7 @@ KMIME_EXPORT extern QString decodeRFC2047String( const QByteArray &src );
+ Encodes string @p src according to RFC2047 using charset @p charset.
+
+ @param src source string.
+- @param charset charset to use.
++ @param charset charset to use. If it can't encode the string, UTF-8 will be used instead.
+ @param addressHeader if this flag is true, all special chars
+ like <,>,[,],... will be encoded, too.
+ @param allow8bitHeaders if this flag is true, 8Bit headers are allowed.
diff --git a/kde-base/kdepimlibs/kdepimlibs-4.6.2.ebuild b/kde-base/kdepimlibs/kdepimlibs-4.6.2-r1.ebuild
index d26cdb468ecd..4f39f3d51408 100644
--- a/kde-base/kdepimlibs/kdepimlibs-4.6.2.ebuild
+++ b/kde-base/kdepimlibs/kdepimlibs-4.6.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdepimlibs/kdepimlibs-4.6.2.ebuild,v 1.1 2011/04/06 14:19:01 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdepimlibs/kdepimlibs-4.6.2-r1.ebuild,v 1.1 2011/04/18 20:09:32 dilfridge Exp $
EAPI=3
@@ -42,6 +42,10 @@ add_blocker libkholidays
# @since 4.4 - kontactinterfaces is in kdepimlibs now
add_blocker kontactinterfaces
+PATCHES=(
+ "${FILESDIR}/${PN}-4.6.2-encoding.patch"
+ )
+
src_prepare() {
kde4-base_src_prepare