[arch-commits] CVS update of extra/network/firefox (2 files)
Alexander Baldeck
alexander at archlinux.org
Wed Feb 13 13:58:27 UTC 2008
Date: Wednesday, February 13, 2008 @ 08:58:27
Author: alexander
Path: /home/cvs-extra/extra/network/firefox
Added: iceweasel_2.0.0.12-1_part.patch (1.1)
Modified: PKGBUILD (1.28 -> 1.29)
* fixed build problems with missing patches
* added some pango/xft fixes from debian
---------------------------------+
PKGBUILD | 15 ++---
iceweasel_2.0.0.12-1_part.patch | 113 ++++++++++++++++++++++++++++++++++++++
2 files changed, 119 insertions(+), 9 deletions(-)
Index: extra/network/firefox/PKGBUILD
diff -u extra/network/firefox/PKGBUILD:1.28 extra/network/firefox/PKGBUILD:1.29
--- extra/network/firefox/PKGBUILD:1.28 Tue Feb 12 04:12:48 2008
+++ extra/network/firefox/PKGBUILD Wed Feb 13 08:58:26 2008
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD,v 1.28 2008/02/12 09:12:48 alexander Exp $
+# $Id: PKGBUILD,v 1.29 2008/02/13 13:58:26 alexander Exp $
# Maintainer: Alexander Baldeck <alexander at archlinux.org>
# Contributor: Dale Blount <dale at archlinux.org>
# Contributer: Nick Penwarden <toth64 at yahoo.com>
pkgname=firefox
pkgver=2.0.0.12
-pkgrel=1
+pkgrel=2
pkgdesc="Standalone web browser from mozilla.org"
arch=(i686 x86_64)
license=('MPL' 'GPL' 'LGPL')
@@ -23,15 +23,14 @@
moz325644.patch
firefox-visibility.patch
firefox-1.5-new-gtkim.patch
- firefox-1.5-pango-cursor-position.patch
firefox-2.0-add-ldflags.patch
firefox-2.0-buildversion.patch
- firefox-2.0-pango-ligatures.patch
firefox-1.5-pango-underline.patch
firefox-1.5-pango-justified-range.patch
firefox-1.5-xft-rangewidth.patch
firefox-2.0-pango-printing.patch
firefox-1.5-theme-change.patch
+ iceweasel_2.0.0.12-1_part.patch
firefox.desktop
firefox-safe.desktop)
options=('!makeflags')
@@ -43,15 +42,14 @@
patch -Np0 -i ${startdir}/src/launcher.patch || return 1
patch -Np1 -i ${startdir}/src/mozilla-firefox-1.0-lang.patch || return 1
patch -Np1 -i ${startdir}/src/firefox-1.5-new-gtkim.patch || return 1
- patch -Np1 -i ${startdir}/src/firefox-1.5-pango-cursor-position.patch || return 1
patch -Np0 -i ${startdir}/src/firefox-2.0-add-ldflags.patch || return 1
patch -Np0 -i ${startdir}/src/firefox-2.0-buildversion.patch || return 1
- #patch -Np1 -i ${startdir}/src/firefox-2.0-pango-ligatures.patch || return 1
patch -Np1 -i ${startdir}/src/firefox-1.5-pango-underline.patch || return 1
patch -Np1 -i ${startdir}/src/firefox-1.5-pango-justified-range.patch || return 1
patch -Np1 -i ${startdir}/src/firefox-1.5-xft-rangewidth.patch || return 1
patch -Np0 -i ${startdir}/src/firefox-2.0-pango-printing.patch || return 1
- patch -Np1 -i ${startdir}/src/firefox-1.5-theme-change.patch || return 1
+ patch -Np0 -i ${startdir}/src/firefox-1.5-theme-change.patch || return 1
+ patch -Np1 -i ${startdir}/src/iceweasel_2.0.0.12-1_part.patch || return 1
if [ "$CARCH" = "x86_64" ]; then
patch -Np0 -i ../firefox-visibility.patch || return 1
@@ -99,14 +97,13 @@
'2082c2a2d1cedd08e83179271aacf337'
'362f9e0b0f25b964f7120b68fb629ee0'
'60b4bbe73d2e919ee4a6476dca6705b6'
- '288fb7db871700ff5cf7286db6192b45'
'25f355113cdee6800380c6e1a4cd38f0'
'11b221ff41078d97c131e17361072e47'
- '300170989d3743fda3e4b7a21ac56ed4'
'713a9587dd024f5d03f1fe9c095da9de'
'4d0713c0a94a367a4e84d5f7e56de631'
'affb470ca6bac11a7f3005e2508621a8'
'52a9fc53aa12117dc392cb1dbdc56ae9'
'51681f096254c07149f687fdc4c3c5b7'
+ '0878e1b02081e1ed71929e7553cbe04c'
'74ea70c9e935f0e7f7b75436fe33efd5'
'5e68cabfcf3c021806b326f664ac505e')
Index: extra/network/firefox/iceweasel_2.0.0.12-1_part.patch
diff -u /dev/null extra/network/firefox/iceweasel_2.0.0.12-1_part.patch:1.1
--- /dev/null Wed Feb 13 08:58:27 2008
+++ extra/network/firefox/iceweasel_2.0.0.12-1_part.patch Wed Feb 13 08:58:27 2008
@@ -0,0 +1,113 @@
+--- iceweasel-2.0.0.12.orig/gfx/src/gtk/nsFontMetricsPango.cpp
++++ iceweasel-2.0.0.12/gfx/src/gtk/nsFontMetricsPango.cpp
+@@ -537,11 +537,23 @@
+ nsRenderingContextGTK *aContext)
+ {
+ nsresult rv = NS_OK;
+-
++ gchar *text = NULL;
+ PangoLayout *layout = pango_layout_new(mPangoContext);
+
+- gchar *text = g_utf16_to_utf8(aString, aLength,
+- NULL, NULL, NULL);
++ // Just copy the aString to ensure the alignment,
++ // it is not used anywhere else.
++ PRUnichar* dummy = (PRUnichar *) PR_Malloc(aLength*sizeof(PRUnichar));
++ if(!dummy) {
++#ifdef DEBUG
++ NS_WARNING("nsFontMetricsPango::GetTextDimensions malloc() failed");
++#endif
++ rv = NS_ERROR_FAILURE;
++ goto out;
++ }
++ memcpy(dummy, aString, aLength*sizeof(PRUnichar));
++ text = g_utf16_to_utf8(dummy, aLength,
++ NULL, NULL, NULL);
++ PR_Free(dummy);
+
+ if (!text) {
+ #ifdef DEBUG
+@@ -582,6 +594,7 @@
+
+ loser:
+ g_free(text);
++ out:
+ g_object_unref(layout);
+
+ return rv;
+@@ -952,7 +965,6 @@
+ {
+ int trailing = 0;
+ int inx = 0;
+- gboolean found = FALSE;
+ const gchar *curChar;
+ PRInt32 retval = 0;
+
+@@ -978,22 +990,12 @@
+ pango_layout_set_text(layout, text, strlen(text));
+ FixupSpaceWidths(layout, text);
+
+- found = pango_layout_xy_to_index(layout, localX, localY,
+- &inx, &trailing);
++ pango_layout_xy_to_index(layout, localX, localY,
++ &inx, &trailing);
+
+ // Convert the index back to the utf-16 index
+ curChar = text;
+
+- // Jump to the end if it's not found.
+- if (!found) {
+- if (inx == 0)
+- retval = 0;
+- else if (trailing)
+- retval = aLength;
+-
+- goto loser;
+- }
+-
+ for (PRUint32 curOffset=0; curOffset < aLength;
+ curOffset++, curChar = g_utf8_find_next_char(curChar, NULL)) {
+
+--- iceweasel-2.0.0.12.orig/gfx/src/gtk/nsFontMetricsXft.cpp
++++ iceweasel-2.0.0.12/gfx/src/gtk/nsFontMetricsXft.cpp
+@@ -2200,19 +2200,27 @@
+ nsAutoDrawSpecBuffer::Flush()
+ {
+ if (mSpecPos) {
+- // Some Xft libraries will crash if none of the glyphs have any
+- // area. So before we draw, we scan through the glyphs. If we
+- // find any that have area, we can draw.
+- for (PRUint32 i = 0; i < mSpecPos; i++) {
+- XftGlyphFontSpec *sp = &mSpecBuffer[i];
+- XGlyphInfo info;
+- XftGlyphExtents(GDK_DISPLAY(), sp->font, &sp->glyph, 1, &info);
+- if (info.width && info.height) {
+- // If we get here it means we found a drawable glyph. We will
+- // Draw all the remaining glyphs and then break out of the loop
+- XftDrawGlyphFontSpec(mDraw, mColor, mSpecBuffer+i, mSpecPos-i);
+- break;
++ // There are two Xft problems to work around here:
++ // 1. Some Xft libraries reportedly crash if none of the
++ // glyphs have any area.
++ // 2. Because of an apparent X server bug (see bug 252033),
++ // a glyph with no area may cause all following glyphs to be
++ // dropped under some circumstances.
++ // For this reason, we manually ship out blocks of glyphs with
++ // area and skip blocks of glyphs with no area.
++ PRUint32 start = 0;
++ while (start < mSpecPos) {
++ PRUint32 i;
++ for (i = start; i < mSpecPos; i++) {
++ XftGlyphFontSpec *sp = &mSpecBuffer[i];
++ XGlyphInfo info;
++ XftGlyphExtents(GDK_DISPLAY(), sp->font, &sp->glyph, 1, &info);
++ if (!info.width || !info.height)
++ break;
+ }
++ if (i > start)
++ XftDrawGlyphFontSpec(mDraw, mColor, mSpecBuffer+start, i-start);
++ start = i + 1;
+ }
+ mSpecPos = 0;
+ }
+
More information about the arch-commits
mailing list