summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavoz@gentoo.org>2006-05-23 17:59:16 +0000
committerGustavo Zacarias <gustavoz@gentoo.org>2006-05-23 17:59:16 +0000
commitf6c1e38f5ab577ff98adb2bdadbfa30aab9d50b3 (patch)
tree08e5c5f97dd810dbc18a5c7d4a91d830b22393de /mail-client
parentRemove port001 from metadata, bug 26349. (diff)
downloadgentoo-2-f6c1e38f5ab577ff98adb2bdadbfa30aab9d50b3.tar.gz
gentoo-2-f6c1e38f5ab577ff98adb2bdadbfa30aab9d50b3.tar.bz2
gentoo-2-f6c1e38f5ab577ff98adb2bdadbfa30aab9d50b3.zip
Fix sparc issues wrt #115729 and keyworded ~sparc
(Portage version: 2.0.54-r2)
Diffstat (limited to 'mail-client')
-rw-r--r--mail-client/mozilla-thunderbird/ChangeLog6
-rw-r--r--mail-client/mozilla-thunderbird/files/firefox-bus-error.patch145
-rw-r--r--mail-client/mozilla-thunderbird/mozilla-thunderbird-1.5.0.2-r1.ebuild7
3 files changed, 155 insertions, 3 deletions
diff --git a/mail-client/mozilla-thunderbird/ChangeLog b/mail-client/mozilla-thunderbird/ChangeLog
index d40a2a8f1133..fe2e7d595c58 100644
--- a/mail-client/mozilla-thunderbird/ChangeLog
+++ b/mail-client/mozilla-thunderbird/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for mail-client/mozilla-thunderbird
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-client/mozilla-thunderbird/ChangeLog,v 1.111 2006/04/30 03:15:40 anarchy Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-client/mozilla-thunderbird/ChangeLog,v 1.112 2006/05/23 17:59:16 gustavoz Exp $
+
+ 23 May 2006; Gustavo Zacarias <gustavoz@gentoo.org>
+ +files/firefox-bus-error.patch, mozilla-thunderbird-1.5.0.2-r1.ebuild:
+ Fix sparc issues wrt #115729 and keyworded ~sparc
*mozilla-thunderbird-1.5.0.2-r1 (30 Apr 2006)
diff --git a/mail-client/mozilla-thunderbird/files/firefox-bus-error.patch b/mail-client/mozilla-thunderbird/files/firefox-bus-error.patch
new file mode 100644
index 000000000000..0968762e97ff
--- /dev/null
+++ b/mail-client/mozilla-thunderbird/files/firefox-bus-error.patch
@@ -0,0 +1,145 @@
+diff -aur a/gfx/src/gtk/nsFontMetricsPango.cpp b/gfx/src/gtk/nsFontMetricsPango.cpp
+--- a/gfx/src/gtk/nsFontMetricsPango.cpp 2006-02-23 13:01:42.000000000 -0800
++++ b/gfx/src/gtk/nsFontMetricsPango.cpp 2006-05-20 20:27:50.000000000 -0700
+@@ -535,8 +535,13 @@
+
+ PangoLayout *layout = pango_layout_new(mPangoContext);
+
+- gchar *text = g_utf16_to_utf8(aString, aLength,
++ // Just copy the aString to ensure the alignment,
++ // it is not used anywhere else.
++ PRUnichar* dummy = new PRUnichar[aLength];
++ memcpy(dummy, aString, aLength*sizeof(PRUnichar));
++ gchar *text = g_utf16_to_utf8(dummy, aLength,
+ NULL, NULL, NULL);
++ delete [] dummy;
+
+ if (!text) {
+ #ifdef DEBUG
+diff -aur a/intl/lwbrk/src/nsJISx4501LineBreaker.cpp b/intl/lwbrk/src/nsJISx4501LineBreaker.cpp
+--- a/intl/lwbrk/src/nsJISx4501LineBreaker.cpp 2004-04-18 07:21:07.000000000 -0700
++++ b/intl/lwbrk/src/nsJISx4501LineBreaker.cpp 2006-05-20 20:27:51.000000000 -0700
+@@ -487,13 +487,13 @@
+ PRUint32 cur;
+ for (cur = aPos; cur < aLen; ++cur)
+ {
+- if (IS_SPACE(aText[cur]))
++ if (IS_SPACE(GetUnichar(&aText[cur])))
+ {
+ *oNext = cur;
+ *oNeedMoreText = PR_FALSE;
+ return NS_OK;
+ }
+- if (IS_CJK_CHAR(aText[cur]))
++ if (IS_CJK_CHAR(GetUnichar(&aText[cur])))
+ goto ROUTE_CJK_NEXT;
+ }
+ *oNext = aLen;
+@@ -503,13 +503,13 @@
+ ROUTE_CJK_NEXT:
+ PRInt8 c1, c2;
+ cur = aPos;
+- if(NEED_CONTEXTUAL_ANALYSIS(aText[cur]))
++ if(NEED_CONTEXTUAL_ANALYSIS(GetUnichar(&aText[cur])))
+ {
+- c1 = this->ContextualAnalysis((cur>0)?aText[cur-1]:0,
+- aText[cur],
+- (cur<(aLen-1)) ?aText[cur+1]:0);
++ c1 = this->ContextualAnalysis((cur>0)?GetUnichar(&aText[cur-1]):0,
++ GetUnichar(&aText[cur]),
++ (cur<(aLen-1)) ?GetUnichar(&aText[cur+1]):0);
+ } else {
+- c1 = this->GetClass(aText[cur]);
++ c1 = this->GetClass(GetUnichar(&aText[cur]));
+ }
+
+ if(CLASS_THAI == c1)
+@@ -521,13 +521,13 @@
+
+ for(cur++; cur <aLen; cur++)
+ {
+- if(NEED_CONTEXTUAL_ANALYSIS(aText[cur]))
++ if(NEED_CONTEXTUAL_ANALYSIS(GetUnichar(&aText[cur])))
+ {
+- c2= this->ContextualAnalysis((cur>0)?aText[cur-1]:0,
+- aText[cur],
+- (cur<(aLen-1)) ?aText[cur+1]:0);
++ c2= this->ContextualAnalysis((cur>0)?GetUnichar(&aText[cur-1]):0,
++ GetUnichar(&aText[cur]),
++ (cur<(aLen-1)) ?GetUnichar(&aText[cur+1]):0);
+ } else {
+- c2 = this->GetClass(aText[cur]);
++ c2 = this->GetClass(GetUnichar(&aText[cur]));
+ }
+
+ if(GetPair(c1, c2)) {
+diff -aur a/intl/unicharutil/util/nsUnicharUtils.cpp b/intl/unicharutil/util/nsUnicharUtils.cpp
+--- a/intl/unicharutil/util/nsUnicharUtils.cpp 2005-04-21 15:30:21.000000000 -0700
++++ b/intl/unicharutil/util/nsUnicharUtils.cpp 2006-05-20 20:27:50.000000000 -0700
+@@ -340,3 +340,28 @@
+ return result;
+ }
+
++PRUnichar
++GetUnichar(const void *ptr)
++{
++ PRUnichar result;
++#if defined(__sparc__) || defined(__alpha__)
++ *((char *) &result) = *((char *) ptr);
++ *((char *) &result + 1) = *((char *) ptr + 1);
++#else
++ result = *((PRUnichar *) ptr);
++#endif
++ return result;
++}
++
++void
++SetUnichar(void *ptr, PRUnichar aChar)
++{
++#if defined(__sparc__) || defined(__alpha__)
++ *((char *) ptr) = *((char *) &aChar);
++ *((char *) ptr + 1) = *((char *) &aChar + 1);
++#else
++ *((PRUnichar *) ptr) = aChar;
++#endif
++}
++
++
+diff -aur a/intl/unicharutil/util/nsUnicharUtils.h b/intl/unicharutil/util/nsUnicharUtils.h
+--- a/intl/unicharutil/util/nsUnicharUtils.h 2005-02-24 07:50:57.000000000 -0800
++++ b/intl/unicharutil/util/nsUnicharUtils.h 2006-05-20 20:27:50.000000000 -0700
+@@ -81,6 +81,8 @@
+
+ PRUnichar ToUpperCase(PRUnichar);
+ PRUnichar ToLowerCase(PRUnichar);
++PRUnichar GetUnichar(const void *);
++void SetUnichar(void *, PRUnichar);
+
+ inline PRBool IsUpperCase(PRUnichar c) {
+ return ToLowerCase(c) != c;
+diff -aur a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
+--- a/layout/generic/nsTextFrame.cpp 2006-02-13 18:05:07.000000000 -0800
++++ b/layout/generic/nsTextFrame.cpp 2006-05-20 20:27:50.000000000 -0700
+@@ -5101,8 +5101,8 @@
+
+ while (aNumChars-- > 0) {
+ // XXX: If you crash here then you may see the issue described
+- // in http://bugzilla.mozilla.org/show_bug.cgi?id=36146#c44
+- *cp2-- = PRUnichar(*cp1--);
++ // in http://bugzilla.mozilla.org/show_bug.cgi?id=161826
++ SetUnichar(cp2--, PRUnichar(*cp1--));
+ }
+ }
+
+@@ -6199,9 +6199,9 @@
+ {
+ PRUnichar* end = aBuffer + aWordLen;
+ for (; aBuffer < end; aBuffer++) {
+- PRUnichar ch = *aBuffer;
++ PRUnichar ch = GetUnichar(aBuffer);
+ if (ch == ' ') {
+- *aBuffer = CH_NBSP;
++ SetUnichar(aBuffer, CH_NBSP);
+ }
+ }
+ }
diff --git a/mail-client/mozilla-thunderbird/mozilla-thunderbird-1.5.0.2-r1.ebuild b/mail-client/mozilla-thunderbird/mozilla-thunderbird-1.5.0.2-r1.ebuild
index 8a0761c20ea9..0d4ab9fa3bdb 100644
--- a/mail-client/mozilla-thunderbird/mozilla-thunderbird-1.5.0.2-r1.ebuild
+++ b/mail-client/mozilla-thunderbird/mozilla-thunderbird-1.5.0.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-client/mozilla-thunderbird/mozilla-thunderbird-1.5.0.2-r1.ebuild,v 1.1 2006/04/30 03:15:40 anarchy Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-client/mozilla-thunderbird/mozilla-thunderbird-1.5.0.2-r1.ebuild,v 1.2 2006/05/23 17:59:16 gustavoz Exp $
unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179
inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib autotools
@@ -13,7 +13,7 @@ SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/${PV}/sourc
mirror://gentoo/${P}-patches-${PVER}.tar.bz2
http://dev.gentoo.org/~anarchy/dist/${P}-patches-${PVER}.tar.bz2"
-KEYWORDS="amd64 ~ia64 ppc ~x86"
+KEYWORDS="amd64 ~ia64 ppc ~sparc ~x86"
SLOT="0"
LICENSE="MPL-1.1 NPL-1.1"
IUSE="ldap crypt"
@@ -55,6 +55,9 @@ src_unpack() {
${S}/security/coreconf/arch.mk
fi
+ # Fix sparc bus errors #115729 <gustavoz>
+ use sparc && epatch ${FILESDIR}/firefox-bus-error.patch
+
WANT_AUTOCONF="2.13" \
WANT_AUTOMAKE="2.13" \
eautoreconf || die "failed running autoreconf"