SOURCES (DEVEL): mozilla-firefox-canvas-system-cairo.patch (NEW), ...

arekm arekm at pld-linux.org
Fri Sep 9 01:20:54 CEST 2005


Author: arekm                        Date: Thu Sep  8 23:20:54 2005 GMT
Module: SOURCES                       Tag: DEVEL
---- Log message:
- deep park

---- Files affected:
SOURCES:
   mozilla-firefox-canvas-system-cairo.patch (NONE -> 1.1.2.1)  (NEW), mozilla-firefox-dont-package-nspr-libs.patch (NONE -> 1.1.2.1)  (NEW), mozilla-firefox-gcc4.patch (NONE -> 1.1.2.1)  (NEW), mozilla-firefox-nss-system-nspr.patch (NONE -> 1.1.2.1)  (NEW), mozilla-firefox-pango-cairo.patch (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/mozilla-firefox-canvas-system-cairo.patch
diff -u /dev/null SOURCES/mozilla-firefox-canvas-system-cairo.patch:1.1.2.1
--- /dev/null	Fri Sep  9 01:20:54 2005
+++ SOURCES/mozilla-firefox-canvas-system-cairo.patch	Fri Sep  9 01:20:49 2005
@@ -0,0 +1,14 @@
+Index: content/canvas/src/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/content/canvas/src/Makefile.in,v
+retrieving revision 1.4
+diff -u -r1.4 Makefile.in
+--- content/canvas/src/Makefile.in	11 May 2005 23:49:51 -0000	1.4
++++ content/canvas/src/Makefile.in	22 Aug 2005 19:57:51 -0000
+@@ -94,4 +94,6 @@
+ 
+ include $(topsrcdir)/config/rules.mk
+ 
++CXXFLAGS	+= $(MOZ_CAIRO_CFLAGS)
++
+ DEFINES += -D_IMPL_NS_LAYOUT

================================================================
Index: SOURCES/mozilla-firefox-dont-package-nspr-libs.patch
diff -u /dev/null SOURCES/mozilla-firefox-dont-package-nspr-libs.patch:1.1.2.1
--- /dev/null	Fri Sep  9 01:20:54 2005
+++ SOURCES/mozilla-firefox-dont-package-nspr-libs.patch	Fri Sep  9 01:20:49 2005
@@ -0,0 +1,22 @@
+Index: toolkit/mozapps/installer/packager.mk
+===================================================================
+RCS file: /cvsroot/mozilla/toolkit/mozapps/installer/packager.mk,v
+retrieving revision 1.13
+diff -d -u -p -6 -r1.13 packager.mk
+--- toolkit/mozapps/installer/packager.mk	1 Jul 2005 01:18:49 -0000	1.13
++++ toolkit/mozapps/installer/packager.mk	18 Jul 2005 06:00:20 -0000
+@@ -207,13 +207,13 @@ ifdef MOZ_PKG_MANIFEST
+ 	$(PERL) $(topsrcdir)/xpinstall/packager/xptlink.pl -s $(DIST) -d $(DIST)/xpt -f $(DIST)/$(MOZ_PKG_APPNAME)/components -v -o $(PKGCP_OS)
+ else # !MOZ_PKG_MANIFEST
+ ifeq ($(MOZ_PKG_FORMAT),DMG)
+ 	@cd $(DIST) && rsync -auvL $(_APPNAME) $(MOZ_PKG_APPNAME)
+ else
+ 	@cd $(DIST)/bin && tar $(TAR_CREATE_FLAGS) - * | (cd ../$(MOZ_PKG_APPNAME); tar -xf -)
+-ifdef MOZ_NATIVE_NSPR
++ifndef MOZ_NATIVE_NSPR
+ ifndef EXCLUDE_NSPR_LIBS
+ 	@echo "Copying NSPR libs..."
+ 	@cp -p $(NSPR_LDIR)/*$(DLL_SUFFIX) $(DIST)/$(MOZ_PKG_APPNAME)
+ 	@chmod 755 $(DIST)/$(MOZ_PKG_APPNAME)/*$(DLL_SUFFIX)
+ endif
+ endif

================================================================
Index: SOURCES/mozilla-firefox-gcc4.patch
diff -u /dev/null SOURCES/mozilla-firefox-gcc4.patch:1.1.2.1
--- /dev/null	Fri Sep  9 01:20:54 2005
+++ SOURCES/mozilla-firefox-gcc4.patch	Fri Sep  9 01:20:49 2005
@@ -0,0 +1,70 @@
+Index: netwerk/protocol/http/src/nsHttpConnectionMgr.cpp
+===================================================================
+RCS file: /cvsroot/mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp,v
+retrieving revision 1.7.20.1
+diff -u -r1.7.20.1 nsHttpConnectionMgr.cpp
+--- netwerk/protocol/http/src/nsHttpConnectionMgr.cpp	1 Sep 2004 23:31:03 -0000	1.7.20.1
++++ netwerk/protocol/http/src/nsHttpConnectionMgr.cpp	4 Mar 2005 19:59:57 -0000
+@@ -834,8 +834,8 @@
+ void
+ nsHttpConnectionMgr::OnMsgUpdateParam(nsresult status, void *param)
+ {
+-    PRUint16 name  = (PRUint32(param) & 0xFFFF0000) >> 16;
+-    PRUint16 value =  PRUint32(param) & 0x0000FFFF;
++    PRUint16 name  = (NS_PTR_TO_INT32(param) & 0xFFFF0000) >> 16;
++    PRUint16 value =  NS_PTR_TO_INT32(param) & 0x0000FFFF;
+ 
+     switch (name) {
+     case MAX_CONNECTIONS:
+Index: widget/src/gtk2/nsDragService.cpp
+===================================================================
+RCS file: /cvsroot/mozilla/widget/src/gtk2/nsDragService.cpp,v
+retrieving revision 1.5
+diff -u -r1.5 nsDragService.cpp
+--- widget/src/gtk2/nsDragService.cpp	30 Oct 2003 01:48:41 -0000	1.5
++++ widget/src/gtk2/nsDragService.cpp	4 Mar 2005 20:00:01 -0000
+@@ -838,7 +838,7 @@
+             (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
+         listTarget->target = g_strdup(gMimeListType);
+         listTarget->flags = 0;
+-        listTarget->info = (guint)listAtom;
++        listTarget->info = (guint)(NS_PTR_TO_INT32(listAtom));
+         PR_LOG(sDragLm, PR_LOG_DEBUG,
+                ("automatically adding target %s with id %ld\n",
+                listTarget->target, listAtom));
+@@ -877,7 +877,7 @@
+                              (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
+                             listTarget->target = g_strdup(gTextUriListType);
+                             listTarget->flags = 0;
+-                            listTarget->info = (guint)listAtom;
++                            listTarget->info = (guint)NS_PTR_TO_INT32(listAtom);
+                             PR_LOG(sDragLm, PR_LOG_DEBUG,
+                                    ("automatically adding target %s with \
+                                    id %ld\n", listTarget->target, listAtom));
+@@ -914,7 +914,7 @@
+                           (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
+                         target->target = g_strdup(flavorStr);
+                         target->flags = 0;
+-                        target->info = (guint)atom;
++                        target->info = (guint)NS_PTR_TO_INT32(atom);
+                         PR_LOG(sDragLm, PR_LOG_DEBUG,
+                                ("adding target %s with id %ld\n",
+                                target->target, atom));
+@@ -931,7 +931,7 @@
+                              (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
+                             plainTarget->target = g_strdup(kTextMime);
+                             plainTarget->flags = 0;
+-                            plainTarget->info = (guint)plainAtom;
++                            plainTarget->info = (guint)NS_PTR_TO_INT32(plainAtom);
+                             PR_LOG(sDragLm, PR_LOG_DEBUG,
+                                    ("automatically adding target %s with \
+                                    id %ld\n", plainTarget->target, plainAtom));
+@@ -948,7 +948,7 @@
+                              (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
+                             urlTarget->target = g_strdup(gMozUrlType);
+                             urlTarget->flags = 0;
+-                            urlTarget->info = (guint)urlAtom;
++                            urlTarget->info = (guint)NS_PTR_TO_INT32(urlAtom);
+                             PR_LOG(sDragLm, PR_LOG_DEBUG,
+                                    ("automatically adding target %s with \
+                                    id %ld\n", urlTarget->target, urlAtom));

================================================================
Index: SOURCES/mozilla-firefox-nss-system-nspr.patch
diff -u /dev/null SOURCES/mozilla-firefox-nss-system-nspr.patch:1.1.2.1
--- /dev/null	Fri Sep  9 01:20:54 2005
+++ SOURCES/mozilla-firefox-nss-system-nspr.patch	Fri Sep  9 01:20:49 2005
@@ -0,0 +1,124 @@
+Index: mozilla/security/coreconf/location.mk
+===================================================================
+RCS file: /cvsroot/mozilla/security/coreconf/location.mk,v
+retrieving revision 1.9
+diff -u -r1.9 location.mk
+--- mozilla/security/coreconf/location.mk	25 Apr 2004 15:02:17 -0000	1.9
++++ mozilla/security/coreconf/location.mk	11 Apr 2005 20:21:57 -0000
+@@ -61,6 +61,8 @@
+ 
+ DIST          = $(SOURCE_PREFIX)/$(PLATFORM)
+ 
++NSPR_LIBDIR   = $(DIST)/lib
++
+ ifdef BUILD_DEBUG_GC
+     DEFINES += -DDEBUG_GC
+ endif
+Index: mozilla/security/manager/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v
+retrieving revision 1.56
+diff -u -r1.56 Makefile.in
+--- mozilla/security/manager/Makefile.in	14 Mar 2005 10:00:58 -0000	1.56
++++ mozilla/security/manager/Makefile.in	11 Apr 2005 20:21:57 -0000
+@@ -76,12 +76,23 @@
+ endif
+ endif
+ 
++ABS_DIST := $(shell cd $(DIST) && pwd)
++ifeq ($(OS_ARCH),WINNT)
++ABS_DIST := $(shell cygpath -w $(ABS_DIST) | sed -e 's|\\\\|/|g')
++endif
++NSPR_LIBDIR = $(firstword $(filter -L%,$(NSPR_LIBS)))
++ifneq (,$(strip $(NSPR_LIBDIR)))
++NSPR_LIBDIR := $(subst -L,,$(subst -L$(DIST),-L$(ABS_DIST),$(NSPR_LIBDIR)))
++else
++NSPR_LIBDIR = $(ABS_DIST)/lib
++endif
+ # NSS makefiles are not safe for parallel execution.
+ DEFAULT_GMAKE_FLAGS = MAKE="$(MAKE) -j1" -j1
+ DEFAULT_GMAKE_FLAGS += CC="$(CC)"
+-DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="-I$(MOZ_BUILD_ROOT)/dist/include/nspr -I$(MOZ_BUILD_ROOT)/dist/include/dbm"
+-DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(MOZ_BUILD_ROOT)/dist
+-DEFAULT_GMAKE_FLAGS += DIST=$(MOZ_BUILD_ROOT)/dist
++DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="$(subst -I$(DIST),-I$(ABS_DIST),$(NSPR_CFLAGS) -I$(DIST)/include/dbm)"
++DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(ABS_DIST)
++DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST)
++DEFAULT_GMAKE_FLAGS += NSPR_LIBDIR=$(NSPR_LIBDIR)
+ DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
+ DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
+ ABS_topsrcdir   := $(shell cd $(topsrcdir); pwd)
+Index: mozilla/security/nss/lib/ckfw/builtins/Makefile
+===================================================================
+RCS file: /cvsroot/mozilla/security/nss/lib/ckfw/builtins/Makefile,v
+retrieving revision 1.14
+diff -u -r1.14 Makefile
+--- mozilla/security/nss/lib/ckfw/builtins/Makefile	20 Jan 2005 02:25:46 -0000	1.14
++++ mozilla/security/nss/lib/ckfw/builtins/Makefile	11 Apr 2005 20:21:57 -0000
+@@ -53,23 +53,23 @@
+ # This is merely an expedient hack and not the right solution.
+ ifdef NS_USE_GCC
+ EXTRA_LIBS += \
+-	-L$(DIST)/lib \
++	-L$(NSPR_LIBDIR) \
+ 	-lplc4 \
+ 	-lplds4 \
+ 	-lnspr4 \
+ 	$(NULL)
+ else
+ EXTRA_LIBS += \
+-	$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
+-	$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \
++	$(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \
++	$(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \
+ 	$(NULL)
+ endif
+ 
+ else
+ 
+ EXTRA_LIBS += \
+-	$(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
+-	$(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
++	$(NSPR_LIBDIR)/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
++	$(NSPR_LIBDIR)/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
+ 	$(NULL)
+ 
+ endif
+Index: mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile
+===================================================================
+RCS file: /cvsroot/mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile,v
+retrieving revision 1.18
+diff -u -r1.18 Makefile
+--- mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile	25 Apr 2004 15:03:08 -0000	1.18
++++ mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile	11 Apr 2005 20:21:57 -0000
+@@ -63,7 +63,7 @@
+ 	$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
+ 	$(CRYPTO_LIB) \
+ 	$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
+-	-L$(DIST)/lib \
++	-L$(NSPR_LIBDIR) \
+ 	-lplc4 \
+ 	-lplds4 \
+ 	-lnspr4 \
+@@ -76,8 +76,8 @@
+ 	$(DIST)/lib/softokn.lib \
+ 	$(CRYPTO_LIB) \
+ 	$(DIST)/lib/secutil.lib \
+-	$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \
+-	$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \
++	$(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \
++	$(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \
+ 	wsock32.lib \
+ 	winmm.lib \
+ 	$(NULL)
+@@ -98,8 +98,8 @@
+ 	$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \
+ 	$(CRYPTO_LIB) \
+ 	$(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \
+-	$(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
+-	$(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
++	$(NSPR_LIBDIR)/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \
++	$(NSPR_LIBDIR)/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \
+ 	$(NULL)
+ 
+ endif

================================================================
Index: SOURCES/mozilla-firefox-pango-cairo.patch
diff -u /dev/null SOURCES/mozilla-firefox-pango-cairo.patch:1.1.2.1
--- /dev/null	Fri Sep  9 01:20:54 2005
+++ SOURCES/mozilla-firefox-pango-cairo.patch	Fri Sep  9 01:20:49 2005
@@ -0,0 +1,132 @@
+--- mozilla/gfx/src/gtk/nsFontMetricsPango.cpp.foo2	2005-06-20 13:12:24.000000000 -0400
++++ mozilla/gfx/src/gtk/nsFontMetricsPango.cpp	2005-06-20 10:16:59.000000000 -0400
+@@ -53,7 +53,6 @@
+ #include "nsUnicharUtils.h"
+ #include "nsQuickSort.h"
+ 
+-#include <pango/pangoxft.h>
+ #include <fontconfig/fontconfig.h>
+ #include <gdk/gdk.h>
+ #include <gdk/gdkx.h>
+@@ -301,12 +300,11 @@
+ 
+     // Get our font face
+     FT_Face face;
++    face = pango_fc_font_lock_face(fcfont);
++    if (!face)
++    	return NS_ERROR_NOT_AVAILABLE;
++    	
+     TT_OS2 *os2;
+-    XftFont *xftFont = pango_xft_font_get_font(PANGO_FONT(fcfont));
+-    if (!xftFont)
+-        return NS_ERROR_NOT_AVAILABLE;
+-
+-    face = XftLockFace(xftFont);
+     os2 = (TT_OS2 *) FT_Get_Sfnt_Table(face, ft_sfnt_os2);
+ 
+     // mEmHeight (size in pixels of EM height)
+@@ -318,10 +316,12 @@
+     mEmHeight = PR_MAX(1, nscoord(size * f));
+ 
+     // mMaxAscent
+-    mMaxAscent = nscoord(xftFont->ascent * f);
++    val = MOZ_FT_TRUNC(face->size->metrics.ascender);
++    mMaxAscent = NSToIntRound(val * f);
+ 
+     // mMaxDescent
+-    mMaxDescent = nscoord(xftFont->descent * f);
++    val = -MOZ_FT_TRUNC(face->size->metrics.descender);
++    mMaxDescent = NSToIntRound(val * f);
+ 
+     nscoord lineHeight = mMaxAscent + mMaxDescent;
+ 
+@@ -341,7 +341,8 @@
+     mEmDescent = mEmHeight - mEmAscent;
+ 
+     // mMaxAdvance
+-    mMaxAdvance = nscoord(xftFont->max_advance_width * f);
++    val = MOZ_FT_TRUNC(face->size->metrics.max_advance);
++    mMaxAdvance = NSToIntRound(val * f);
+ 
+     // mPangoSpaceWidth
+     PangoLayout *layout = pango_layout_new(mPangoContext);
+@@ -364,17 +365,16 @@
+     mAveCharWidth = tmpWidth;
+ 
+     // mXHeight (height of an 'x' character)
+-    PRUnichar xUnichar('x');
+-    XGlyphInfo extents;
+-    if (FcCharSetHasChar(xftFont->charset, xUnichar)) {
+-        XftTextExtents16(GDK_DISPLAY(), xftFont, &xUnichar, 1, &extents);
+-        mXHeight = extents.height;
++    if (pango_fc_font_has_char(fcfont, 'x')) {
++        PangoRectangle rect;
++        PangoGlyph glyph = pango_fc_font_get_glyph (fcfont, 'x');
++        pango_font_get_glyph_extents (PANGO_FONT (fcfont), glyph, &rect, NULL);
++        mXHeight = NSToIntRound(rect.height * f / PANGO_SCALE);
+     }
+     else {
+         // 56% of ascent, best guess for non-true type or asian fonts
+-        mXHeight = nscoord(((float)mMaxAscent) * 0.56);
++        mXHeight = nscoord(((float)mMaxAscent) * 0.56 * f);
+     }
+-    mXHeight = nscoord(mXHeight * f);
+ 
+     // mUnderlineOffset (offset for underlines)
+     val = CONVERT_DESIGN_UNITS_TO_PIXELS(face->underline_position,
+@@ -384,7 +394,8 @@
+     }
+     else {
+         mUnderlineOffset =
+-            -NSToIntRound(PR_MAX(1, floor(0.1 * xftFont->height + 0.5)) * f);
++            -NSToIntRound(PR_MAX(1, floor(0.1 *
++                MOZ_FT_TRUNC(face->size->metrics.height) + 0.5)) * f);
+     }
+ 
+     // mUnderlineSize (thickness of an underline)
+@@ -395,7 +406,8 @@
+     }
+     else {
+         mUnderlineSize =
+-            NSToIntRound(PR_MAX(1, floor(0.05 * xftFont->height + 0.5)) * f);
++            NSToIntRound(PR_MAX(1,
++               floor(0.05 * MOZ_FT_TRUNC(face->size->metrics.height) + 0.5)) * f);
+     }
+ 
+     // mSuperscriptOffset
+@@ -426,7 +438,7 @@
+     // mStrikeoutSize
+     mStrikeoutSize = mUnderlineSize;
+ 
+-    XftUnlockFace(xftFont);
++    pango_fc_font_unlock_face(fcfont);
+ 
+     /*
+     printf("%i\n", mXHeight);
+@@ -893,7 +905,7 @@
+ {
+     if (aIsRTL) {
+         if (!mRTLPangoContext) {
+-            mRTLPangoContext = pango_xft_get_context(GDK_DISPLAY(), 0);
++            mRTLPangoContext = gdk_pango_context_get();
+             pango_context_set_base_dir(mRTLPangoContext, PANGO_DIRECTION_RTL);
+ 
+             gdk_pango_context_set_colormap(mRTLPangoContext, gdk_rgb_get_cmap());
+@@ -1163,7 +1175,7 @@
+     NS_ConvertUCS2toUTF8 name(aName);
+ 
+     nsresult rv = NS_ERROR_FAILURE;
+-    PangoContext *context = pango_xft_get_context(GDK_DISPLAY(), 0);
++    PangoContext *context = gdk_pango_context_get();
+     PangoFontFamily **familyList;
+     int n;
+ 
+@@ -1262,7 +1274,7 @@
+ 
+     // Now that we have the font description set up, create the
+     // context.
+-    mLTRPangoContext = pango_xft_get_context(GDK_DISPLAY(), 0);
++    mLTRPangoContext = gdk_pango_context_get();
+     mPangoContext = mLTRPangoContext;
+ 
+     // Make sure to set the base direction to LTR - if layout needs to
================================================================



More information about the pld-cvs-commit mailing list