summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-www/mozilla/ChangeLog6
-rw-r--r--net-www/mozilla/files/digest-mozilla-1.0.1-r13
-rw-r--r--net-www/mozilla/files/digest-mozilla-1.0.1-r23
-rw-r--r--net-www/mozilla/files/gtk2mozilla_head_patch773
-rw-r--r--net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch11
-rw-r--r--net-www/mozilla/files/mozilla-1.0.1-nsrange.patch104
-rw-r--r--net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch11
-rw-r--r--net-www/mozilla/files/mozilla-1.0.1-referrer.patch317
-rw-r--r--net-www/mozilla/files/mozilla-1.0.1-xuldom.patch14
-rw-r--r--net-www/mozilla/files/mozilla-1.0_rc1-xft.patch1426
-rw-r--r--net-www/mozilla/mozilla-1.0-r3.ebuild34
-rw-r--r--net-www/mozilla/mozilla-1.0.1-r1.ebuild472
-rw-r--r--net-www/mozilla/mozilla-1.0.1-r2.ebuild488
-rw-r--r--net-www/mozilla/mozilla-1.0.1-r3.ebuild32
-rw-r--r--net-www/mozilla/mozilla-1.1-r1.ebuild39
-rw-r--r--net-www/mozilla/mozilla-1.2_beta.ebuild32
16 files changed, 133 insertions, 3632 deletions
diff --git a/net-www/mozilla/ChangeLog b/net-www/mozilla/ChangeLog
index 1c0a816c27a8..752d1c4a4d77 100644
--- a/net-www/mozilla/ChangeLog
+++ b/net-www/mozilla/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-www/mozilla
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/ChangeLog,v 1.49 2002/11/19 19:15:22 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/ChangeLog,v 1.50 2002/11/20 15:10:42 azarah Exp $
+
+ 20 Nov 2002; Martin Schlemmer <azarah@gentoo.org> *.ebuild :
+ Change to new shared nsplugin scheme, bug #10056. Add strip-flags,
+ closing bug #10772.
19 Nov 2002; Martin Schlemmer <azarah@gentoo.org> mozilla-1.2_beta.ebuild :
diff --git a/net-www/mozilla/files/digest-mozilla-1.0.1-r1 b/net-www/mozilla/files/digest-mozilla-1.0.1-r1
deleted file mode 100644
index 7e16a39c7700..000000000000
--- a/net-www/mozilla/files/digest-mozilla-1.0.1-r1
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 8a4b5be862c3a0c33a86adf3a3a67c09 mozilla-source-1.0.1.tar.bz2 29943174
-MD5 946afa0c6fc91918fb3adc021c8471ae enigmail-0.63.3.tar.gz 134642
-MD5 a3cea7d2efa70fe9ce2066cf2fa6cf9d ipc-0.99.63.tar.gz 57214
diff --git a/net-www/mozilla/files/digest-mozilla-1.0.1-r2 b/net-www/mozilla/files/digest-mozilla-1.0.1-r2
deleted file mode 100644
index 7e16a39c7700..000000000000
--- a/net-www/mozilla/files/digest-mozilla-1.0.1-r2
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 8a4b5be862c3a0c33a86adf3a3a67c09 mozilla-source-1.0.1.tar.bz2 29943174
-MD5 946afa0c6fc91918fb3adc021c8471ae enigmail-0.63.3.tar.gz 134642
-MD5 a3cea7d2efa70fe9ce2066cf2fa6cf9d ipc-0.99.63.tar.gz 57214
diff --git a/net-www/mozilla/files/gtk2mozilla_head_patch b/net-www/mozilla/files/gtk2mozilla_head_patch
deleted file mode 100644
index 94f2ab042019..000000000000
--- a/net-www/mozilla/files/gtk2mozilla_head_patch
+++ /dev/null
@@ -1,773 +0,0 @@
-Index: build//unix/mozilla-gtkmozembed.pc.in
-===================================================================
-RCS file: /cvsroot/mozilla/build/unix/mozilla-gtkmozembed.pc.in,v
-retrieving revision 1.1
-diff -u -r1.1 mozilla-gtkmozembed.pc.in
---- build//unix/mozilla-gtkmozembed.pc.in 28 May 2002 20:20:40 -0000 1.1
-+++ build//unix/mozilla-gtkmozembed.pc.in 28 Jun 2002 16:08:30 -0000
-@@ -7,5 +7,5 @@
- Description: Mozilla Embedding Widget for Gtk+
- Version: %MOZILLA_VERSION%
- Requires: mozilla-xpcom = %MOZILLA_VERSION%
--Libs: -L${libdir} -lgtkembedmoz -lgtksuperwin
-+Libs: -L${libdir} -lgtkembedmoz
- Cflags: -I${includedir}/gtkembedmoz
-Index: embedding/browser/gtk//src/EmbedWindow.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/embedding/browser/gtk/src/EmbedWindow.cpp,v
-retrieving revision 1.25
-diff -u -r1.25 EmbedWindow.cpp
---- embedding/browser/gtk//src/EmbedWindow.cpp 29 Jan 2002 21:39:31 -0000 1.25
-+++ embedding/browser/gtk//src/EmbedWindow.cpp 28 Jun 2002 16:09:15 -0000
-@@ -226,9 +226,11 @@
- {
- GtkWidget* parent = GTK_WIDGET(mOwner->mOwningWidget)->parent;
-
-+#ifdef MOZ_WIDGET_GTK
- if (GTK_IS_CONTAINER(parent))
- gtk_container_focus(GTK_CONTAINER(parent),
- GTK_DIR_TAB_FORWARD);
-+#endif
- return NS_OK;
- }
-
-@@ -237,9 +239,11 @@
- {
- GtkWidget* parent = GTK_WIDGET(mOwner->mOwningWidget)->parent;
-
-+#ifdef MOZ_WIDGET_GTK
- if (GTK_IS_CONTAINER(parent))
- gtk_container_focus(GTK_CONTAINER(parent),
- GTK_DIR_TAB_BACKWARD);
-+#endif
- return NS_OK;
- }
-
-@@ -405,7 +409,9 @@
- 0, 0,
- sTipWindow->allocation.width, sTipWindow->allocation.height);
-
-+#ifdef MOZ_WIDGET_GTK
- gtk_widget_popup(sTipWindow, aXCoords + root_x, aYCoords + root_y);
-+#endif /* MOZ_WIDGET_GTK */
-
- nsMemory::Free( (void*)tipString );
-
-Index: embedding/browser/gtk//src/Makefile.in
-===================================================================
-RCS file: /cvsroot/mozilla/embedding/browser/gtk/src/Makefile.in,v
-retrieving revision 1.31
-diff -u -r1.31 Makefile.in
---- embedding/browser/gtk//src/Makefile.in 11 Apr 2002 14:30:28 -0000 1.31
-+++ embedding/browser/gtk//src/Makefile.in 28 Jun 2002 16:09:16 -0000
-@@ -56,6 +56,11 @@
- EmbedWindowCreator.cpp \
- EmbedStream.cpp
-
-+ifdef MOZ_ENABLE_GTK2
-+CSRCS = \
-+ gtkmozembedmarshal.c
-+endif
-+
- ifdef BUILD_STATIC_LIBS
- # Static build stuff
- DEFINES += -D_BUILD_STATIC_BIN=1
-@@ -88,12 +93,20 @@
- gtkmozembed.h \
- gtkmozembed_internal.h
-
-+ifdef MOZ_ENABLE_GTK
- EXTRA_DSO_LDOPTS = \
- $(MOZ_COMPONENT_LIBS) \
- -lgtksuperwin \
- $(NULL)
-+endif
-+
-+ifdef MOZ_ENABLE_GTK2
-+EXTRA_DSO_LDOPTS = \
-+ $(MOZ_COMPONENT_LIBS) \
-+ $(NULL)
-+endif
-
--EXTRA_DSO_LDOPTS += $(MOZ_GTK_LDFLAGS)
-+EXTRA_DSO_LDOPTS += $(MOZ_GTK_LDFLAGS) $(MOZ_GTK2_LIBS)
-
- include $(topsrcdir)/config/rules.mk
-
-@@ -108,7 +121,8 @@
- endif
- endif
-
--CXXFLAGS += $(MOZ_GTK_CFLAGS)
-+CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS)
-+CFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS)
-
- ifdef BUILD_STATIC_LIBS
-
-Index: embedding/browser/gtk//src/gtkmozembed2.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/embedding/browser/gtk/src/gtkmozembed2.cpp,v
-retrieving revision 1.23
-diff -u -r1.23 gtkmozembed2.cpp
---- embedding/browser/gtk//src/gtkmozembed2.cpp 12 Jan 2002 05:04:57 -0000 1.23
-+++ embedding/browser/gtk//src/gtkmozembed2.cpp 28 Jun 2002 16:09:21 -0000
-@@ -36,11 +36,32 @@
- #include <nsXPIDLString.h>
- #include <nsReadableUtils.h>
-
-+#ifdef MOZ_WIDGET_GTK
-+
- // so we can get callbacks from the mozarea
- #include <gtkmozarea.h>
-
-+// so we get the right marshaler for gtk 1.2
-+#define gtkmozembed_VOID__INT_UINT \
-+ gtk_marshal_NONE__INT_INT
-+#define gtkmozembed_VOID__POINTER_INT_INT \
-+ gtk_marshal_NONE__POINTER_INT_INT
-+#define gtkmozembed_VOID__POINTER_INT_UINT \
-+ gtk_marshal_NONE__POINTER_INT_INT
-+#define gtkmozembed_VOID__POINTER_INT_POINTER \
-+ gtk_marshal_NONE__POINTER_INT_POINTER
-+
-+#endif /* MOZ_WIDGET_GTK */
-+
-+#ifdef MOZ_WIDGET_GTK2
-+
-+#include "gtkmozembedmarshal.h"
-+
-+#endif /* MOZ_WIDGET_GTK2 */
-+
- class nsIDirectoryServiceProvider;
-
-+#ifdef MOZ_WIDGET_GTK
- // Some "massaged" enum information for the GTK Type System
- static GtkFlagValue gtk_moz_embed_progress_flags_values[] = {
- { GTK_MOZ_EMBED_FLAG_START,
-@@ -138,6 +159,7 @@
- { 0,
- NULL, NULL }
- };
-+#endif /* MOZ_WIDGET_GTK */
-
-
- // class and instance initialization
-@@ -180,6 +202,7 @@
- GdkEventFocus *aGdkFocusEvent,
- GtkMozEmbed *aEmbed);
-
-+#ifdef MOZ_WIDGET_GTK
- // signal handlers for tracking the focus and and focus out events on
- // the toplevel window.
-
-@@ -189,6 +212,7 @@
- static void
- handle_toplevel_focus_out(GtkMozArea *aArea,
- GtkMozEmbed *aEmbed);
-+#endif /* MOZ_WIDGET_GTK */
-
- // globals for this type of widget
-
-@@ -249,191 +273,193 @@
- moz_embed_signals[LINK_MESSAGE] =
- gtk_signal_new ("link_message",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, link_message),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- moz_embed_signals[JS_STATUS] =
- gtk_signal_new ("js_status",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, js_status),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- moz_embed_signals[LOCATION] =
- gtk_signal_new ("location",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, location),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- moz_embed_signals[TITLE] =
- gtk_signal_new("title",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, title),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- moz_embed_signals[PROGRESS] =
- gtk_signal_new("progress",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, progress),
- gtk_marshal_NONE__INT_INT,
- GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
- moz_embed_signals[PROGRESS_ALL] =
- gtk_signal_new("progress_all",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, progress_all),
-- gtk_marshal_NONE__POINTER_INT_INT,
-+ gtkmozembed_VOID__POINTER_INT_INT,
- GTK_TYPE_NONE, 3, GTK_TYPE_STRING,
- GTK_TYPE_INT, GTK_TYPE_INT);
- moz_embed_signals[NET_STATE] =
- gtk_signal_new("net_state",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_state),
-- gtk_marshal_NONE__INT_INT,
-+ gtkmozembed_VOID__INT_UINT,
- GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_UINT);
- moz_embed_signals[NET_STATE_ALL] =
- gtk_signal_new("net_state_all",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_state_all),
-- gtk_marshal_NONE__POINTER_INT_INT,
-+ gtkmozembed_VOID__POINTER_INT_UINT,
- GTK_TYPE_NONE, 3, GTK_TYPE_STRING,
- GTK_TYPE_INT, GTK_TYPE_UINT);
- moz_embed_signals[NET_START] =
- gtk_signal_new("net_start",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_start),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- moz_embed_signals[NET_STOP] =
- gtk_signal_new("net_stop",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, net_stop),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- moz_embed_signals[NEW_WINDOW] =
- gtk_signal_new("new_window",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, new_window),
- gtk_marshal_NONE__POINTER_UINT,
- GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
- moz_embed_signals[VISIBILITY] =
- gtk_signal_new("visibility",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, visibility),
- gtk_marshal_NONE__BOOL,
- GTK_TYPE_NONE, 1, GTK_TYPE_BOOL);
- moz_embed_signals[DESTROY_BROWSER] =
- gtk_signal_new("destroy_browser",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, destroy_brsr),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
- moz_embed_signals[OPEN_URI] =
- gtk_signal_new("open_uri",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, open_uri),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_STRING);
- moz_embed_signals[SIZE_TO] =
- gtk_signal_new("size_to",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, size_to),
- gtk_marshal_NONE__INT_INT,
- GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT);
- moz_embed_signals[DOM_KEY_DOWN] =
- gtk_signal_new("dom_key_down",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_down),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[DOM_KEY_PRESS] =
- gtk_signal_new("dom_key_press",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_press),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[DOM_KEY_UP] =
- gtk_signal_new("dom_key_up",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_key_up),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[DOM_MOUSE_DOWN] =
- gtk_signal_new("dom_mouse_down",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_down),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[DOM_MOUSE_UP] =
- gtk_signal_new("dom_mouse_up",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_up),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[DOM_MOUSE_CLICK] =
- gtk_signal_new("dom_mouse_click",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_click),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[DOM_MOUSE_DBL_CLICK] =
- gtk_signal_new("dom_mouse_dbl_click",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_dbl_click),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[DOM_MOUSE_OVER] =
- gtk_signal_new("dom_mouse_over",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_over),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[DOM_MOUSE_OUT] =
- gtk_signal_new("dom_mouse_out",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, dom_mouse_out),
- gtk_marshal_BOOL__POINTER,
- GTK_TYPE_BOOL, 1, GTK_TYPE_POINTER);
- moz_embed_signals[SECURITY_CHANGE] =
- gtk_signal_new("security_change",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, security_change),
- gtk_marshal_NONE__POINTER_UINT,
- GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
- moz_embed_signals[STATUS_CHANGE] =
- gtk_signal_new("status_change",
- GTK_RUN_LAST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedClass, status_change),
-- gtk_marshal_NONE__POINTER_INT_POINTER,
-+ gtkmozembed_VOID__POINTER_INT_POINTER,
- GTK_TYPE_NONE, 3,
- GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_POINTER);
-
-+#ifdef MOZ_WIDGET_GTK
- gtk_object_class_add_signals(object_class, moz_embed_signals,
- EMBED_LAST_SIGNAL);
-+#endif /* MOZ_WIDGET_GTK */
-
- }
-
-@@ -443,6 +469,8 @@
- EmbedPrivate *priv = new EmbedPrivate();
- embed->data = priv;
- gtk_widget_set_name(GTK_WIDGET(embed), "gtkmozembed");
-+
-+ GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET(embed), GTK_NO_WINDOW);
- }
-
- GtkWidget *
-@@ -538,6 +566,7 @@
- embed,
- GTK_OBJECT(child_widget));
-
-+#ifdef MOZ_WIDGET_GTK
- // connect to the toplevel focus out events for the child
- GtkMozArea *mozarea = GTK_MOZAREA(child_widget);
- gtk_signal_connect_while_alive(GTK_OBJECT(mozarea),
-@@ -551,6 +580,7 @@
- GTK_SIGNAL_FUNC(handle_toplevel_focus_out),
- embed,
- GTK_OBJECT(mozarea));
-+#endif /* MOZ_WIDGET_GTK */
- }
-
- static void
-@@ -663,6 +693,8 @@
- return FALSE;
- }
-
-+#ifdef MOZ_WIDGET_GTK
-+
- static void
- handle_toplevel_focus_in (GtkMozArea *aArea,
- GtkMozEmbed *aEmbed)
-@@ -683,6 +715,8 @@
- embedPrivate->TopLevelFocusOut();
- }
-
-+#endif /* MOZ_WIDGET_GTK */
-+
- // Widget methods
-
- void
-@@ -1011,6 +1045,8 @@
- return embedPrivate->mChromeMask;
- }
-
-+#ifdef MOZ_WIDGET_GTK
-+
- GtkType
- gtk_moz_embed_progress_flags_get_type(void)
- {
-@@ -1059,6 +1095,8 @@
- return chrome_flags_type;
- }
-
-+#endif /* MOZ_WIDGET_GTK */
-+
- void
- gtk_moz_embed_get_nsIWebBrowser (GtkMozEmbed *embed, nsIWebBrowser **retval)
- {
-@@ -1183,14 +1221,16 @@
- moz_embed_single_signals[NEW_WINDOW_ORPHAN] =
- gtk_signal_new("new_window_orphan",
- GTK_RUN_FIRST,
-- object_class->type,
-+ GTK_CLASS_TYPE(klass),
- GTK_SIGNAL_OFFSET(GtkMozEmbedSingleClass,
- new_window_orphan),
- gtk_marshal_NONE__POINTER_UINT,
- GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_UINT);
-
-+#ifdef MOZ_WIDGET_GTK
- gtk_object_class_add_signals(object_class, moz_embed_single_signals,
- SINGLE_LAST_SIGNAL);
-+#endif /* MOZ_WIDGET_GTK */
- }
-
- static void
-Index: widget/src/gtk2/nsWindow.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp,v
-retrieving revision 1.33
-diff -u -r1.33 nsWindow.cpp
---- widget/src/gtk2/nsWindow.cpp 25 Jun 2002 07:07:18 -0000 1.33
-+++ widget/src/gtk2/nsWindow.cpp 28 Jun 2002 16:09:54 -0000
-@@ -261,7 +261,8 @@
- gtk_widget_destroy(GTK_WIDGET(mContainer));
- mContainer = nsnull;
- }
-- else if (mDrawingarea) {
-+
-+ if (mDrawingarea) {
- g_object_unref(mDrawingarea);
- mDrawingarea = nsnull;
- }
-
---- /dev/null Thu Apr 11 16:25:15 2002
-+++ embedding/browser/gtk/src/gtkmozembedmarshal.txt Sat Jun 29 01:44:04 2002
-@@ -0,0 +1,4 @@
-+NONE:INT,UINT
-+NONE:POINTER,INT,INT
-+NONE:POINTER,INT,UINT
-+NONE:POINTER,INT,POINTER
---- /dev/null Thu Apr 11 16:25:15 2002
-+++ embedding/browser/gtk/src/gtkmozembedmarshal.c Sat Jun 29 01:44:02 2002
-@@ -0,0 +1,203 @@
-+
-+#include <glib-object.h>
-+
-+
-+#ifdef G_ENABLE_DEBUG
-+#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
-+#define g_marshal_value_peek_char(v) g_value_get_char (v)
-+#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
-+#define g_marshal_value_peek_int(v) g_value_get_int (v)
-+#define g_marshal_value_peek_uint(v) g_value_get_uint (v)
-+#define g_marshal_value_peek_long(v) g_value_get_long (v)
-+#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
-+#define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
-+#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
-+#define g_marshal_value_peek_enum(v) g_value_get_enum (v)
-+#define g_marshal_value_peek_flags(v) g_value_get_flags (v)
-+#define g_marshal_value_peek_float(v) g_value_get_float (v)
-+#define g_marshal_value_peek_double(v) g_value_get_double (v)
-+#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
-+#define g_marshal_value_peek_param(v) g_value_get_param (v)
-+#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
-+#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
-+#define g_marshal_value_peek_object(v) g_value_get_object (v)
-+#else /* !G_ENABLE_DEBUG */
-+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
-+ * Do not access GValues directly in your code. Instead, use the
-+ * g_value_get_*() functions
-+ */
-+#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
-+#define g_marshal_value_peek_char(v) (v)->data[0].v_int
-+#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
-+#define g_marshal_value_peek_int(v) (v)->data[0].v_int
-+#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
-+#define g_marshal_value_peek_long(v) (v)->data[0].v_long
-+#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
-+#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
-+#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
-+#define g_marshal_value_peek_enum(v) (v)->data[0].v_int
-+#define g_marshal_value_peek_flags(v) (v)->data[0].v_uint
-+#define g_marshal_value_peek_float(v) (v)->data[0].v_float
-+#define g_marshal_value_peek_double(v) (v)->data[0].v_double
-+#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
-+#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
-+#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
-+#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
-+#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
-+#endif /* !G_ENABLE_DEBUG */
-+
-+
-+/* NONE:INT,UINT (/dev/stdin:1) */
-+void
-+gtkmozembed_VOID__INT_UINT (GClosure *closure,
-+ GValue *return_value,
-+ guint n_param_values,
-+ const GValue *param_values,
-+ gpointer invocation_hint,
-+ gpointer marshal_data)
-+{
-+ typedef void (*GMarshalFunc_VOID__INT_UINT) (gpointer data1,
-+ gint arg_1,
-+ guint arg_2,
-+ gpointer data2);
-+ register GMarshalFunc_VOID__INT_UINT callback;
-+ register GCClosure *cc = (GCClosure*) closure;
-+ register gpointer data1, data2;
-+
-+ g_return_if_fail (n_param_values == 3);
-+
-+ if (G_CCLOSURE_SWAP_DATA (closure))
-+ {
-+ data1 = closure->data;
-+ data2 = g_value_peek_pointer (param_values + 0);
-+ }
-+ else
-+ {
-+ data1 = g_value_peek_pointer (param_values + 0);
-+ data2 = closure->data;
-+ }
-+ callback = (GMarshalFunc_VOID__INT_UINT) (marshal_data ? marshal_data : cc->callback);
-+
-+ callback (data1,
-+ g_marshal_value_peek_int (param_values + 1),
-+ g_marshal_value_peek_uint (param_values + 2),
-+ data2);
-+}
-+
-+/* NONE:POINTER,INT,INT (/dev/stdin:2) */
-+void
-+gtkmozembed_VOID__POINTER_INT_INT (GClosure *closure,
-+ GValue *return_value,
-+ guint n_param_values,
-+ const GValue *param_values,
-+ gpointer invocation_hint,
-+ gpointer marshal_data)
-+{
-+ typedef void (*GMarshalFunc_VOID__POINTER_INT_INT) (gpointer data1,
-+ gpointer arg_1,
-+ gint arg_2,
-+ gint arg_3,
-+ gpointer data2);
-+ register GMarshalFunc_VOID__POINTER_INT_INT callback;
-+ register GCClosure *cc = (GCClosure*) closure;
-+ register gpointer data1, data2;
-+
-+ g_return_if_fail (n_param_values == 4);
-+
-+ if (G_CCLOSURE_SWAP_DATA (closure))
-+ {
-+ data1 = closure->data;
-+ data2 = g_value_peek_pointer (param_values + 0);
-+ }
-+ else
-+ {
-+ data1 = g_value_peek_pointer (param_values + 0);
-+ data2 = closure->data;
-+ }
-+ callback = (GMarshalFunc_VOID__POINTER_INT_INT) (marshal_data ? marshal_data : cc->callback);
-+
-+ callback (data1,
-+ g_marshal_value_peek_pointer (param_values + 1),
-+ g_marshal_value_peek_int (param_values + 2),
-+ g_marshal_value_peek_int (param_values + 3),
-+ data2);
-+}
-+
-+/* NONE:POINTER,INT,UINT (/dev/stdin:3) */
-+void
-+gtkmozembed_VOID__POINTER_INT_UINT (GClosure *closure,
-+ GValue *return_value,
-+ guint n_param_values,
-+ const GValue *param_values,
-+ gpointer invocation_hint,
-+ gpointer marshal_data)
-+{
-+ typedef void (*GMarshalFunc_VOID__POINTER_INT_UINT) (gpointer data1,
-+ gpointer arg_1,
-+ gint arg_2,
-+ guint arg_3,
-+ gpointer data2);
-+ register GMarshalFunc_VOID__POINTER_INT_UINT callback;
-+ register GCClosure *cc = (GCClosure*) closure;
-+ register gpointer data1, data2;
-+
-+ g_return_if_fail (n_param_values == 4);
-+
-+ if (G_CCLOSURE_SWAP_DATA (closure))
-+ {
-+ data1 = closure->data;
-+ data2 = g_value_peek_pointer (param_values + 0);
-+ }
-+ else
-+ {
-+ data1 = g_value_peek_pointer (param_values + 0);
-+ data2 = closure->data;
-+ }
-+ callback = (GMarshalFunc_VOID__POINTER_INT_UINT) (marshal_data ? marshal_data : cc->callback);
-+
-+ callback (data1,
-+ g_marshal_value_peek_pointer (param_values + 1),
-+ g_marshal_value_peek_int (param_values + 2),
-+ g_marshal_value_peek_uint (param_values + 3),
-+ data2);
-+}
-+
-+/* NONE:POINTER,INT,POINTER (/dev/stdin:4) */
-+void
-+gtkmozembed_VOID__POINTER_INT_POINTER (GClosure *closure,
-+ GValue *return_value,
-+ guint n_param_values,
-+ const GValue *param_values,
-+ gpointer invocation_hint,
-+ gpointer marshal_data)
-+{
-+ typedef void (*GMarshalFunc_VOID__POINTER_INT_POINTER) (gpointer data1,
-+ gpointer arg_1,
-+ gint arg_2,
-+ gpointer arg_3,
-+ gpointer data2);
-+ register GMarshalFunc_VOID__POINTER_INT_POINTER callback;
-+ register GCClosure *cc = (GCClosure*) closure;
-+ register gpointer data1, data2;
-+
-+ g_return_if_fail (n_param_values == 4);
-+
-+ if (G_CCLOSURE_SWAP_DATA (closure))
-+ {
-+ data1 = closure->data;
-+ data2 = g_value_peek_pointer (param_values + 0);
-+ }
-+ else
-+ {
-+ data1 = g_value_peek_pointer (param_values + 0);
-+ data2 = closure->data;
-+ }
-+ callback = (GMarshalFunc_VOID__POINTER_INT_POINTER) (marshal_data ? marshal_data : cc->callback);
-+
-+ callback (data1,
-+ g_marshal_value_peek_pointer (param_values + 1),
-+ g_marshal_value_peek_int (param_values + 2),
-+ g_marshal_value_peek_pointer (param_values + 3),
-+ data2);
-+}
-+
---- /dev/null Thu Apr 11 16:25:15 2002
-+++ embedding/browser/gtk/src/gtkmozembedmarshal.h Wed Jun 26 21:06:15 2002
-@@ -0,0 +1,48 @@
-+
-+#ifndef __gtkmozembed_MARSHAL_H__
-+#define __gtkmozembed_MARSHAL_H__
-+
-+#include <glib-object.h>
-+
-+G_BEGIN_DECLS
-+
-+/* NONE:INT,UINT (/dev/stdin:1) */
-+extern void gtkmozembed_VOID__INT_UINT (GClosure *closure,
-+ GValue *return_value,
-+ guint n_param_values,
-+ const GValue *param_values,
-+ gpointer invocation_hint,
-+ gpointer marshal_data);
-+#define gtkmozembed_NONE__INT_UINT gtkmozembed_VOID__INT_UINT
-+
-+/* NONE:POINTER,INT,INT (/dev/stdin:2) */
-+extern void gtkmozembed_VOID__POINTER_INT_INT (GClosure *closure,
-+ GValue *return_value,
-+ guint n_param_values,
-+ const GValue *param_values,
-+ gpointer invocation_hint,
-+ gpointer marshal_data);
-+#define gtkmozembed_NONE__POINTER_INT_INT gtkmozembed_VOID__POINTER_INT_INT
-+
-+/* NONE:POINTER,INT,UINT (/dev/stdin:3) */
-+extern void gtkmozembed_VOID__POINTER_INT_UINT (GClosure *closure,
-+ GValue *return_value,
-+ guint n_param_values,
-+ const GValue *param_values,
-+ gpointer invocation_hint,
-+ gpointer marshal_data);
-+#define gtkmozembed_NONE__POINTER_INT_UINT gtkmozembed_VOID__POINTER_INT_UINT
-+
-+/* NONE:POINTER,INT,POINTER (/dev/stdin:4) */
-+extern void gtkmozembed_VOID__POINTER_INT_POINTER (GClosure *closure,
-+ GValue *return_value,
-+ guint n_param_values,
-+ const GValue *param_values,
-+ gpointer invocation_hint,
-+ gpointer marshal_data);
-+#define gtkmozembed_NONE__POINTER_INT_POINTER gtkmozembed_VOID__POINTER_INT_POINTER
-+
-+G_END_DECLS
-+
-+#endif /* __gtkmozembed_MARSHAL_H__ */
-+
-Index: embedding/browser/Makefile.in
-===================================================================
-RCS file: /cvsroot/mozilla/embedding/browser/Makefile.in,v
-retrieving revision 1.10
-diff -u -r1.10 Makefile.in
---- embedding/browser/Makefile.in 18 Dec 2001 09:10:33 -0000 1.10
-+++ embedding/browser/Makefile.in 29 Jun 2002 15:44:54 -0000
-@@ -27,6 +27,10 @@
-
- DIRS=webBrowser build chrome
-
-+ifdef MOZ_ENABLE_GTK2
-+DIRS += gtk
-+endif
-+
- ifdef MOZ_ENABLE_GTK
- DIRS += gtk
- endif
diff --git a/net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch b/net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch
deleted file mode 100644
index b0b0c2626ec9..000000000000
--- a/net-www/mozilla/files/mozilla-1.0.1-bidiselection.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/content/base/src/nsSelection.cpp.orig 2002-07-02 23:53:18.000000000 +0200
-+++ mozilla/content/base/src/nsSelection.cpp 2002-08-30 10:51:00.000000000 +0200
-@@ -2696,7 +2696,7 @@
- pos.mContentOffset = contentOffsetEnd;
- result = VisualSelectFrames(aPresContext, newFrame, pos);
- if (NS_FAILED(result))
-- result = HandleClick(newContent, startPos, contentOffsetEnd, PR_FALSE,
-+ result = HandleClick(newContent, startPos, contentOffsetEnd, PR_TRUE,
- PR_FALSE, beginOfContent);
- mHint = saveHint;
- }
diff --git a/net-www/mozilla/files/mozilla-1.0.1-nsrange.patch b/net-www/mozilla/files/mozilla-1.0.1-nsrange.patch
deleted file mode 100644
index f50d0e0196c0..000000000000
--- a/net-www/mozilla/files/mozilla-1.0.1-nsrange.patch
+++ /dev/null
@@ -1,104 +0,0 @@
---- mozilla/content/base/src/nsRange.h.nsrange 2002-07-10 07:10:09.000000000 +0200
-+++ mozilla/content/base/src/nsRange.h 2002-08-27 17:18:47.000000000 +0200
-@@ -209,6 +209,8 @@
- // the range spec after the removal of nodes within the range.
- static nsresult CollapseRangeAfterDelete(nsIDOMRange *aRange);
-
-+ static PRInt32 GetNodeLength(nsIDOMNode *aNode);
-+
- nsresult DoSetRange(nsIDOMNode* aStartN, PRInt32 aStartOffset,
- nsIDOMNode* aEndN, PRInt32 aEndOffset);
-
---- mozilla/content/base/src/nsRange.cpp.nsrange 2002-07-16 15:09:01.000000000 +0200
-+++ mozilla/content/base/src/nsRange.cpp 2002-08-27 17:53:01.000000000 +0200
-@@ -635,6 +635,33 @@
- return res;
- }
-
-+// Get the length of aNode
-+PRInt32 nsRange::GetNodeLength(nsIDOMNode *aNode)
-+{
-+ if (!aNode)
-+ return 0;
-+
-+ PRUint16 nodeType;
-+ PRUint32 len = -1;
-+
-+ aNode->GetNodeType(&nodeType);
-+ if( (nodeType == nsIDOMNode::CDATA_SECTION_NODE) ||
-+ (nodeType == nsIDOMNode::TEXT_NODE) )
-+ {
-+ nsCOMPtr<nsIDOMText> textText = do_QueryInterface(aNode);
-+ if (textText)
-+ textText->GetLength(&len);
-+ }
-+ else
-+ {
-+ nsCOMPtr<nsIDOMNodeList> childList;
-+ nsresult res = aNode->GetChildNodes(getter_AddRefs(childList));
-+ if (NS_SUCCEEDED(res) && childList)
-+ childList->GetLength(&len);
-+ }
-+ return len;
-+}
-+
- // It's important that all setting of the range start/end points
- // go through this function, which will do all the right voodoo
- // for content notification of range ownership.
-@@ -990,6 +990,10 @@
- if(IsDetached())
- return NS_ERROR_DOM_INVALID_STATE_ERR;
-
-+ PRInt32 len = GetNodeLength(aParent);
-+ if ( (aOffset < 0) || (len < 0) || (aOffset > len) )
-+ return NS_ERROR_DOM_INDEX_SIZE_ERR;
-+
- nsresult res;
-
- if (!aParent) return NS_ERROR_NULL_POINTER;
-@@ -1020,6 +1051,7 @@
-
- if(IsDetached())
- return NS_ERROR_DOM_INVALID_STATE_ERR;
-+
- if (nsnull == aSibling)// Not the correct one to throw, but spec doesn't say what is
- return NS_ERROR_DOM_NOT_OBJECT_ERR;
-
-@@ -1157,6 +1189,10 @@
- if(IsDetached())
- return NS_ERROR_DOM_INVALID_STATE_ERR;
-
-+ PRInt32 len = GetNodeLength(aParent);
-+ if ( (aOffset < 0) || (len < 0) || (aOffset > len) )
-+ return NS_ERROR_DOM_INDEX_SIZE_ERR;
-+
- nsresult res;
-
- if (!aParent) return NS_ERROR_NULL_POINTER;
-@@ -2229,23 +2265,9 @@
- this->InsertNode(aN);
-
- // re-define the range so that it contains the same content as it did before
-- tEndContainer->GetNodeType(&tEndNodeType);
-- if( (nsIDOMNode::CDATA_SECTION_NODE == tEndNodeType) ||
-- (nsIDOMNode::TEXT_NODE == tEndNodeType) )
-- {
-- nsCOMPtr<nsIDOMText> tEndContainerText = do_QueryInterface(tEndContainer);
-- PRUint32 tInt;
-- tEndContainerText->GetLength(&tInt);
-- tEndOffset = tInt;
-- }
-- else
-- {
-- nsCOMPtr<nsIDOMNodeList>tChildList;
-- res = tEndContainer->GetChildNodes(getter_AddRefs(tChildList));
-- PRUint32 tInt;
-- tChildList->GetLength(&tInt);
-- tEndOffset = tInt;
-- }
-+ tEndOffset = GetNodeLength(tEndContainer);
-+ if (tEndOffset == -1) // failure code
-+ return NS_ERROR_FAILURE;
- this->DoSetRange(tStartContainer, 0, tEndContainer, tEndOffset);
- }
- this->SelectNode(aN);
diff --git a/net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch b/net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch
deleted file mode 100644
index c31d2bbad50b..000000000000
--- a/net-www/mozilla/files/mozilla-1.0.1-prefcrash.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/layout/base/src/nsPresContext.cpp.orig 2002-06-25 23:16:00.000000000 +0200
-+++ mozilla/layout/base/src/nsPresContext.cpp 2002-08-28 10:41:22.000000000 +0200
-@@ -161,6 +161,8 @@
- mStopChrome = PR_TRUE;
-
- mShell = nsnull;
-+ mLinkHandler = nsnull;
-+ mContainer = nsnull;
-
- mDefaultColor = NS_RGB(0x00, 0x00, 0x00);
- mDefaultBackgroundColor = NS_RGB(0xFF, 0xFF, 0xFF);
diff --git a/net-www/mozilla/files/mozilla-1.0.1-referrer.patch b/net-www/mozilla/files/mozilla-1.0.1-referrer.patch
deleted file mode 100644
index 8e8326d2f96f..000000000000
--- a/net-www/mozilla/files/mozilla-1.0.1-referrer.patch
+++ /dev/null
@@ -1,317 +0,0 @@
-Index: content/html/content/src/nsHTMLImageElement.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/content/html/content/src/nsHTMLImageElement.cpp,v
-retrieving revision 1.121
-diff -u -r1.121 nsHTMLImageElement.cpp
---- mozilla/content/html/content/src/nsHTMLImageElement.cpp 24 Aug 2002 14:40:45 -0000 1.121
-+++ mozilla/content/html/content/src/nsHTMLImageElement.cpp 17 Sep 2002 04:07:27 -0000
-@@ -957,12 +957,17 @@
-
- nsCOMPtr<nsIDocument> doc;
- nsCOMPtr<nsILoadGroup> loadGroup;
-+ nsCOMPtr<nsIURI> documentURI;
- shell->GetDocument(getter_AddRefs(doc));
- if (doc) {
- doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
-+
-+ // Get the documment URI for the referrer.
-+ doc->GetDocumentURL(getter_AddRefs(documentURI));
- }
-
-- il->LoadImage(uri, nsnull, loadGroup, this, sup, nsIRequest::LOAD_NORMAL,
-+ // XXX: initialDocumentURI is NULL!
-+ il->LoadImage(uri, nsnull, documentURI, loadGroup, this, context, nsIRequest::LOAD_NORMAL,
- nsnull, nsnull, getter_AddRefs(mRequest));
- }
- }
-Index: content/xbl/src/nsXBLResourceLoader.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/content/xbl/src/nsXBLResourceLoader.cpp,v
-retrieving revision 1.7
-diff -u -r1.7 nsXBLResourceLoader.cpp
---- mozilla/content/xbl/src/nsXBLResourceLoader.cpp 7 Sep 2002 17:08:43 -0000 1.7
-+++ mozilla/content/xbl/src/nsXBLResourceLoader.cpp 17 Sep 2002 04:07:29 -0000
-@@ -127,9 +127,11 @@
- if (!il) continue;
- }
-
-- // Now kick off the image load
-+ // Now kick off the image load...
-+ // Passing NULL for pretty much everything -- cause we don't care!
-+ // XXX: initialDocumentURI is NULL!
- nsCOMPtr<imgIRequest> req;
-- il->LoadImage(url, nsnull, nsnull, nsnull, nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(req));
-+ il->LoadImage(url, nsnull, nsnull, nsnull, nsnull, nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(req));
- }
- else if (curr->mType == nsXBLAtoms::stylesheet) {
- if (!cssLoader) {
-Index: layout/base/src/nsImageLoader.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/layout/base/src/nsImageLoader.cpp,v
-retrieving revision 3.11
-diff -u -r3.11 nsImageLoader.cpp
---- mozilla/layout/base/src/nsImageLoader.cpp 26 Apr 2002 20:44:37 -0000 3.11
-+++ mozilla/layout/base/src/nsImageLoader.cpp 17 Sep 2002 04:07:48 -0000
-@@ -92,8 +92,6 @@
- return NS_ERROR_FAILURE;
-
- nsCOMPtr<nsILoadGroup> loadGroup;
-- nsCOMPtr<nsIURI> uri;
-- nsCOMPtr<nsIURI> baseURI;
-
- nsCOMPtr<nsIPresShell> shell;
- nsresult rv = mPresContext->GetShell(getter_AddRefs(shell));
-@@ -106,6 +104,10 @@
- // Get the document's loadgroup
- doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
-
-+ // Get the document URI (for the referrer).
-+ nsCOMPtr<nsIURI> documentURI;
-+ doc->GetDocumentURL(getter_AddRefs(documentURI));
-+
- if (mRequest) {
- nsCOMPtr<nsIURI> oldURI;
- mRequest->GetURI(getter_AddRefs(oldURI));
-@@ -119,7 +121,8 @@
- nsCOMPtr<imgILoader> il(do_GetService("@mozilla.org/image/loader;1", &rv));
- if (NS_FAILED(rv)) return rv;
-
-- return il->LoadImage(aURI, nsnull, loadGroup, NS_STATIC_CAST(imgIDecoderObserver *, this),
-+ // XXX: initialDocumentURI is NULL!
-+ return il->LoadImage(aURI, nsnull, documentURI, loadGroup, NS_STATIC_CAST(imgIDecoderObserver *, this),
- nsnull, nsIRequest::LOAD_BACKGROUND, nsnull, nsnull, getter_AddRefs(mRequest));
- }
-
-Index: layout/html/base/src/nsBulletFrame.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/layout/html/base/src/nsBulletFrame.cpp,v
-retrieving revision 1.79
-diff -u -r1.79 nsBulletFrame.cpp
---- mozilla/layout/html/base/src/nsBulletFrame.cpp 12 Jul 2002 20:46:19 -0000 1.79
-+++ mozilla/layout/html/base/src/nsBulletFrame.cpp 17 Sep 2002 04:07:49 -0000
-@@ -134,6 +134,16 @@
- nsCOMPtr<nsIURI> imgURI;
- NS_NewURI(getter_AddRefs(imgURI), myList->mListStyleImage, nsnull, baseURI);
-
-+ // Get the document URI for the referrer...
-+ nsCOMPtr<nsIURI> documentURI;
-+ nsCOMPtr<nsIDocument> doc;
-+ if (mContent) {
-+ (void) mContent->GetDocument(*getter_AddRefs(doc));
-+ if (doc) {
-+ doc->GetDocumentURL(getter_AddRefs(documentURI));
-+ }
-+ }
-+
- if (!mListener) {
- nsBulletListener *listener;
- NS_NEWXPCOM(listener, nsBulletListener);
-@@ -144,7 +154,8 @@
- NS_RELEASE(listener);
- }
-
-- il->LoadImage(imgURI, nsnull, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
-+ // XXX: initialDocumentURI is NULL !
-+ il->LoadImage(imgURI, nsnull, documentURI, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
- }
-
- return NS_OK;
-@@ -1529,7 +1540,19 @@
- nsCOMPtr<nsILoadGroup> loadGroup;
- GetLoadGroup(aPresContext, getter_AddRefs(loadGroup));
-
-- il->LoadImage(newURI, nsnull, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
-+ // Get the document URI for the referrer...
-+ nsCOMPtr<nsIURI> documentURI;
-+ nsCOMPtr<nsIDocument> doc;
-+ if (mContent) {
-+ (void) mContent->GetDocument(*getter_AddRefs(doc));
-+ if (doc) {
-+ doc->GetDocumentURL(getter_AddRefs(documentURI));
-+ }
-+ }
-+
-+
-+ // XXX: initialDocumentURI is NULL !
-+ il->LoadImage(newURI, nsnull, documentURI, loadGroup, mListener, aPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(mImageRequest));
- }
- }
- }
-Index: layout/html/base/src/nsImageFrame.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/layout/html/base/src/nsImageFrame.cpp,v
-retrieving revision 1.248
-diff -u -r1.248 nsImageFrame.cpp
---- mozilla/layout/html/base/src/nsImageFrame.cpp 3 Sep 2002 22:49:51 -0000 1.248
-+++ mozilla/layout/html/base/src/nsImageFrame.cpp 17 Sep 2002 04:07:49 -0000
-@@ -2001,8 +2001,19 @@
-
- nsCOMPtr<nsIURI> baseURI;
- rv = aPresContext->GetBaseURL(getter_AddRefs(baseURI));
-+
-+ // Get the document URI for the referrer...
-+ nsCOMPtr<nsIURI> documentURI;
-+ nsCOMPtr<nsIDocument> doc;
-+ if (mContent) {
-+ (void) mContent->GetDocument(*getter_AddRefs(doc));
-+ if (doc) {
-+ doc->GetDocumentURL(getter_AddRefs(documentURI));
-+ }
-+ }
-+
- nsCOMPtr<imgIRequest> tempRequest;
-- return il->LoadImage(uri, baseURI, loadGroup, mListener, aPresContext, loadFlags, nsnull, aRequest, getter_AddRefs(tempRequest));
-+ return il->LoadImage(uri, baseURI, documentURI, loadGroup, mListener, aPresContext, loadFlags, nsnull, aRequest, getter_AddRefs(tempRequest));
- }
-
- #define INTERNAL_GOPHER_LENGTH 16 /* "internal-gopher-" length */
-Index: layout/xul/base/src/nsImageBoxFrame.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp,v
-retrieving revision 1.39
-diff -u -r1.39 nsImageBoxFrame.cpp
---- mozilla/layout/xul/base/src/nsImageBoxFrame.cpp 23 May 2002 00:00:32 -0000 1.39
-+++ mozilla/layout/xul/base/src/nsImageBoxFrame.cpp 17 Sep 2002 04:07:54 -0000
-@@ -456,7 +456,18 @@
- nsCOMPtr<nsILoadGroup> loadGroup;
- GetLoadGroup(aPresContext, getter_AddRefs(loadGroup));
-
-- il->LoadImage(srcURI, nsnull, loadGroup, mListener, aPresContext, mLoadFlags, nsnull, nsnull, getter_AddRefs(mImageRequest));
-+ // Get the document URI for the referrer...
-+ nsCOMPtr<nsIURI> documentURI;
-+ nsCOMPtr<nsIDocument> doc;
-+ if (mContent) {
-+ (void) mContent->GetDocument(*getter_AddRefs(doc));
-+ if (doc) {
-+ doc->GetDocumentURL(getter_AddRefs(documentURI));
-+ }
-+ }
-+
-+ // XXX: initialDocumentURI is NULL!
-+ il->LoadImage(srcURI, nsnull, documentURI, loadGroup, mListener, aPresContext, mLoadFlags, nsnull, nsnull, getter_AddRefs(mImageRequest));
-
- aResize = PR_TRUE;
- }
-Index: layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp,v
-retrieving revision 1.136
-diff -u -r1.136 nsTreeBodyFrame.cpp
---- mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp 7 Sep 2002 05:37:42 -0000 1.136
-+++ mozilla/layout/xul/base/src/tree/src/nsTreeBodyFrame.cpp 17 Sep 2002 04:07:54 -0000
-@@ -1862,8 +1862,14 @@
-
- nsresult rv;
- nsCOMPtr<imgILoader> il(do_GetService("@mozilla.org/image/loader;1", &rv));
-+
-+ // Get the documment URI for the referrer.
-+ nsCOMPtr<nsIURI> documentURI;
-+ doc->GetDocumentURL(getter_AddRefs(documentURI));
-+
- mImageGuard = PR_TRUE;
-- rv = il->LoadImage(srcURI, nsnull, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));
-+ // XXX: initialDocumentURI is NULL!
-+ rv = il->LoadImage(srcURI, nsnull, documentURI, nsnull, listener, mPresContext, nsIRequest::LOAD_NORMAL, nsnull, nsnull, getter_AddRefs(imageRequest));
- mImageGuard = PR_FALSE;
-
- // In a case it was already cached.
-Index: modules/libpr0n/public/imgILoader.idl
-===================================================================
-RCS file: /cvsroot/mozilla/modules/libpr0n/public/imgILoader.idl,v
-retrieving revision 1.8
-diff -u -r1.8 imgILoader.idl
---- mozilla/modules/libpr0n/public/imgILoader.idl 23 Mar 2002 13:21:27 -0000 1.8
-+++ mozilla/modules/libpr0n/public/imgILoader.idl 17 Sep 2002 04:08:04 -0000
-@@ -48,6 +48,8 @@
- /**
- * Start the load and decode of an image.
- * @param aURI the URI to load
-+ * @param aInitialDocumentURI the URI that 'initiated' the load -- used for 3rd party cookie blocking
-+ * @param aReferrerURI the 'referring' URI
- * @param aLoadGroup Loadgroup to put the image load into
- * @param aObserver the observer
- * @param aCX some random data
-@@ -57,9 +59,14 @@
- * @param aRequest A newly created, unused imgIRequest object or NULL for one to
- be created for you.
- */
-- imgIRequest loadImage(in nsIURI aURI, in nsIURI parentURL, in nsILoadGroup aLoadGroup,
-- in imgIDecoderObserver aObserver, in nsISupports aCX,
-- in nsLoadFlags aLoadFlags, in nsISupports cacheKey,
-+ imgIRequest loadImage(in nsIURI aURI,
-+ in nsIURI aInitialDocumentURL,
-+ in nsIURI aReferrerURI,
-+ in nsILoadGroup aLoadGroup,
-+ in imgIDecoderObserver aObserver,
-+ in nsISupports aCX,
-+ in nsLoadFlags aLoadFlags,
-+ in nsISupports cacheKey,
- in imgIRequest aRequest);
-
- /**
-Index: modules/libpr0n/src/imgLoader.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/modules/libpr0n/src/imgLoader.cpp,v
-retrieving revision 1.50
-diff -u -r1.50 imgLoader.cpp
---- mozilla/modules/libpr0n/src/imgLoader.cpp 12 Sep 2002 08:42:39 -0000 1.50
-+++ mozilla/modules/libpr0n/src/imgLoader.cpp 17 Sep 2002 04:08:04 -0000
-@@ -112,11 +112,18 @@
- return 1;
- }
-
--/* imgIRequest loadImage (in nsIURI aURI, in nsIURI parentURI, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports aCX, in nsLoadFlags aLoadFlags, in nsISupports cacheKey, in imgIRequest aRequest); */
-+/* imgIRequest loadImage (in nsIURI aURI, in nsIURI initialDocumentURI, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports aCX, in nsLoadFlags aLoadFlags, in nsISupports cacheKey, in imgIRequest aRequest); */
-
--NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI, nsIURI *parentURI, nsILoadGroup *aLoadGroup,
-- imgIDecoderObserver *aObserver, nsISupports *aCX, nsLoadFlags aLoadFlags,
-- nsISupports *cacheKey, imgIRequest *aRequest, imgIRequest **_retval)
-+NS_IMETHODIMP imgLoader::LoadImage(nsIURI *aURI,
-+ nsIURI *initialDocumentURI,
-+ nsIURI *referrerURI,
-+ nsILoadGroup *aLoadGroup,
-+ imgIDecoderObserver *aObserver,
-+ nsISupports *aCX,
-+ nsLoadFlags aLoadFlags,
-+ nsISupports *cacheKey,
-+ imgIRequest *aRequest,
-+ imgIRequest **_retval)
- {
- NS_ASSERTION(aURI, "imgLoader::LoadImage -- NULL URI pointer");
-
-@@ -301,7 +308,7 @@
-
- nsCOMPtr<nsIHttpChannel> newHttpChannel = do_QueryInterface(newChannel);
- if (newHttpChannel) {
-- newHttpChannel->SetDocumentURI(parentURI);
-+ newHttpChannel->SetDocumentURI(initialDocumentURI);
- }
-
- if (aLoadGroup) {
-@@ -348,24 +355,8 @@
- nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(newChannel));
-
- if (httpChannel) {
-- nsresult rv;
-- // Get the defloadRequest from the loadgroup
-- nsCOMPtr<nsIRequest> defLoadRequest;
-- rv = aLoadGroup->GetDefaultLoadRequest(getter_AddRefs(defLoadRequest));
--
-- if (NS_SUCCEEDED(rv) && defLoadRequest) {
-- nsCOMPtr<nsIChannel> reqChannel(do_QueryInterface(defLoadRequest));
--
-- if (reqChannel) {
-- // Get the referrer from the loadchannel
-- nsCOMPtr<nsIURI> referrer;
-- rv = reqChannel->GetURI(getter_AddRefs(referrer));
-- if (NS_SUCCEEDED(rv)) {
-- // Set the referrer
-- httpChannel->SetReferrer(referrer, nsIHttpChannel::REFERRER_INLINES);
-- }
-- }
-- }
-+ // Set the referrer
-+ httpChannel->SetReferrer(referrerURI, nsIHttpChannel::REFERRER_INLINES);
- }
- }
-
diff --git a/net-www/mozilla/files/mozilla-1.0.1-xuldom.patch b/net-www/mozilla/files/mozilla-1.0.1-xuldom.patch
deleted file mode 100644
index 143ad0c038b0..000000000000
--- a/net-www/mozilla/files/mozilla-1.0.1-xuldom.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- mozilla/content/xul/content/src/nsXULElement.cpp.orig 2002-08-24 02:08:08.000000000 +0200
-+++ mozilla/content/xul/content/src/nsXULElement.cpp 2002-08-27 16:27:35.000000000 +0200
-@@ -993,6 +993,11 @@
- if (NS_FAILED(rv))
- return rv;
-
-+ // We can't insert an ancestor or ourself.
-+ if (IsAncestor(aNewChild, this)) {
-+ return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR;
-+ }
-+
- nsCOMPtr<nsIContent> newcontent = do_QueryInterface(aNewChild);
- NS_ASSERTION(newcontent != nsnull, "not an nsIContent");
- if (! newcontent)
diff --git a/net-www/mozilla/files/mozilla-1.0_rc1-xft.patch b/net-www/mozilla/files/mozilla-1.0_rc1-xft.patch
deleted file mode 100644
index d386be8454a1..000000000000
--- a/net-www/mozilla/files/mozilla-1.0_rc1-xft.patch
+++ /dev/null
@@ -1,1426 +0,0 @@
-Index: gfx/src/gtk/Makefile.in
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/gtk/Makefile.in,v
-retrieving revision 1.75.8.1
-diff -u -r1.75.8.1 Makefile.in
---- gfx/src/gtk/Makefile.in 10 Apr 2002 02:46:14 -0000 1.75.8.1
-+++ gfx/src/gtk/Makefile.in 20 Apr 2002 17:38:25 -0000
-@@ -97,6 +97,10 @@
-
- endif
-
-+DEFINES += -DMOZ_ENABLE_XFT
-+INCLUDES +=
-+EXTRA_DSO_LDOPTS += -lXft -lfontconfig
-+
- ifdef MOZ_ENABLE_GTK2
- CPPSRCS += \
- nsRegionGTK2.cpp \
-Index: gfx/src/gtk/nsDeviceContextGTK.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp,v
-retrieving revision 1.99.8.1
-diff -u -r1.99.8.1 nsDeviceContextGTK.cpp
---- gfx/src/gtk/nsDeviceContextGTK.cpp 10 Apr 2002 02:46:14 -0000 1.99.8.1
-+++ gfx/src/gtk/nsDeviceContextGTK.cpp 20 Apr 2002 17:38:26 -0000
-@@ -809,11 +809,11 @@
- GetFontSize(XFontStruct *aFontStruct, float aPixelsToTwips)
- {
- unsigned long pr = 0;
-- Atom pixelSizeAtom = ::XInternAtom(GDK_DISPLAY(), "PIXEL_SIZE", 0);
-- ::XGetFontProperty(aFontStruct, pixelSizeAtom, &pr);
-+ Atom pointSizeAtom = ::XInternAtom(GDK_DISPLAY(), "POINT_SIZE", 0);
-+ ::XGetFontProperty(aFontStruct, pointSizeAtom, &pr);
- if (!pr)
- return DEFAULT_TWIP_FONT_SIZE;
-- return NSIntPixelsToTwips(pr, aPixelsToTwips);
-+ return NSIntPointsToTwips(pr/10);
- }
-
- nsresult
-Index: gfx/src/gtk/nsDrawingSurfaceGTK.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/gtk/nsDrawingSurfaceGTK.cpp,v
-retrieving revision 1.35.10.1
-diff -u -r1.35.10.1 nsDrawingSurfaceGTK.cpp
---- gfx/src/gtk/nsDrawingSurfaceGTK.cpp 10 Apr 2002 02:46:15 -0000 1.35.10.1
-+++ gfx/src/gtk/nsDrawingSurfaceGTK.cpp 20 Apr 2002 17:38:26 -0000
-@@ -89,6 +89,9 @@
- mPixFormat.mAlphaShift = 0;
-
- mDepth = v->depth;
-+#ifdef MOZ_ENABLE_XFT
-+ mXftDraw = nsnull;
-+#endif /* MOZ_ENABLE_XFT */
- }
-
- nsDrawingSurfaceGTK :: ~nsDrawingSurfaceGTK()
-@@ -101,6 +104,11 @@
-
- if (mGC)
- gdk_gc_unref(mGC);
-+
-+#ifdef MOZ_ENABLE_XFT
-+ if (mXftDraw)
-+ XftDrawDestroy(mXftDraw);
-+#endif /* MOZ_ENABLE_XFT */
- }
-
- /**
-@@ -249,6 +257,29 @@
-
- return NS_OK;
- }
-+
-+#ifdef MOZ_ENABLE_XFT
-+XftDraw * nsDrawingSurfaceGTK :: GetXftDraw(void)
-+{
-+ if (!mXftDraw)
-+ mXftDraw = XftDrawCreate(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(mPixmap),
-+ GDK_VISUAL_XVISUAL(::gdk_rgb_get_visual()),
-+ GDK_COLORMAP_XCOLORMAP(::gdk_rgb_get_cmap()));
-+ return mXftDraw;
-+}
-+
-+void nsDrawingSurfaceGTK :: GetLastXftClip(nsIRegion **aLastRegion)
-+{
-+ *aLastRegion = mLastXftClip.get();
-+ NS_IF_ADDREF(*aLastRegion);
-+}
-+
-+void nsDrawingSurfaceGTK :: SetLastXftClip(nsIRegion *aLastRegion)
-+{
-+ mLastXftClip = aLastRegion;
-+}
-+
-+#endif /* MOZ_ENABLE_XFT */
-
- nsresult nsDrawingSurfaceGTK :: Init(GdkDrawable *aDrawable, GdkGC *aGC)
- {
-Index: gfx/src/gtk/nsDrawingSurfaceGTK.h
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/gtk/nsDrawingSurfaceGTK.h,v
-retrieving revision 1.17.34.1
-diff -u -r1.17.34.1 nsDrawingSurfaceGTK.h
---- gfx/src/gtk/nsDrawingSurfaceGTK.h 10 Apr 2002 02:46:15 -0000 1.17.34.1
-+++ gfx/src/gtk/nsDrawingSurfaceGTK.h 20 Apr 2002 17:38:27 -0000
-@@ -45,6 +45,20 @@
-
- #include <gtk/gtk.h>
-
-+#ifdef MOZ_ENABLE_XFT
-+#include "nsIRegion.h"
-+#include "nsCOMPtr.h"
-+#ifndef Bool
-+#include <X11/Xlib.h>
-+#define MOZ_DEFINED_BOOL
-+#endif
-+#include <X11/Xdefs.h>
-+#include <X11/Xft/Xft.h>
-+#ifdef MOZ_DEFINED_BOOL
-+#undef Bool
-+#endif
-+#endif /* MOZ_ENABLE_XFT */
-+
- class nsDrawingSurfaceGTK : public nsIDrawingSurface
- {
- public:
-@@ -102,6 +116,12 @@
-
- PRInt32 GetDepth() { return mDepth; }
-
-+#ifdef MOZ_ENABLE_XFT
-+ XftDraw *GetXftDraw (void);
-+ void GetLastXftClip (nsIRegion **aLastRegion);
-+ void SetLastXftClip (nsIRegion *aLastRegion);
-+#endif
-+
- protected:
- inline PRUint8 ConvertMaskToCount(unsigned long val);
-
-@@ -115,6 +135,11 @@
- PRUint32 mHeight;
- PRUint32 mFlags;
- PRBool mIsOffscreen;
-+
-+#ifdef MOZ_ENABLE_XFT
-+ XftDraw *mXftDraw;
-+ nsCOMPtr<nsIRegion> mLastXftClip;
-+#endif
-
- /* for locks */
- GdkImage *mImage;
-Index: gfx/src/gtk/nsFontMetricsGTK.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp,v
-retrieving revision 1.204.2.2
-diff -u -r1.204.2.2 nsFontMetricsGTK.cpp
---- gfx/src/gtk/nsFontMetricsGTK.cpp 14 Apr 2002 00:40:24 -0000 1.204.2.2
-+++ gfx/src/gtk/nsFontMetricsGTK.cpp 20 Apr 2002 17:38:32 -0000
-@@ -68,6 +68,12 @@
- #include <regex.h>
- #endif /* ENABLE_X_FONT_BANNING */
-
-+#ifdef MOZ_ENABLE_XFT
-+#include <fontconfig/fontconfig.h>
-+#include <freetype/freetype.h>
-+#include <freetype/tttables.h>
-+#endif
-+
- #include <X11/Xatom.h>
- #include <gdk/gdk.h>
-
-@@ -1450,11 +1456,20 @@
- return;
- #endif /* (defined(MOZ_ENABLE_FREETYPE2)) */
- }
-- nsXFont *xFont = mWesternFont->GetXFont();
-- XFontStruct *fontInfo = xFont->GetXFontStruct();
-- mDeviceContext->GetDevUnitsToAppUnits(f);
-
-- nscoord lineSpacing = nscoord((fontInfo->ascent + fontInfo->descent) * f);
-+ float space_width, x_height, underline_position;
-+
-+ nscoord ascent, descent, line_spacing, width_max_bounds;
-+ nscoord underline_thickness, superscript_offset, subscript_offset;
-+ mWesternFont->GetFontProperties(f, ascent, descent,
-+ line_spacing, width_max_bounds,
-+ space_width, x_height,
-+ underline_position,
-+ underline_thickness,
-+ superscript_offset,
-+ subscript_offset);
-+
-+ nscoord lineSpacing = nscoord(line_spacing * f);
- mEmHeight = PR_MAX(1, nscoord(mWesternFont->mSize * f));
- if (lineSpacing > mEmHeight) {
- mLeading = lineSpacing - mEmHeight;
-@@ -1462,97 +1477,32 @@
- else {
- mLeading = 0;
- }
-- mMaxHeight = nscoord((fontInfo->ascent + fontInfo->descent) * f);
-- mMaxAscent = nscoord(fontInfo->ascent * f);
-- mMaxDescent = nscoord(fontInfo->descent * f);
-+ mMaxHeight = nscoord(line_spacing * f);
-+ mMaxAscent = nscoord(ascent * f);
-+ mMaxDescent = nscoord(descent * f);
-
- mEmAscent = nscoord(mMaxAscent * mEmHeight / lineSpacing);
- mEmDescent = mEmHeight - mEmAscent;
-
-- mMaxAdvance = nscoord(fontInfo->max_bounds.width * f);
-+ mMaxAdvance = nscoord(width_max_bounds * f);
-
-- gint rawWidth;
-- if ((fontInfo->min_byte1 == 0) && (fontInfo->max_byte1 == 0)) {
-- rawWidth = xFont->TextWidth8(" ", 1);
-- }
-- else {
-- XChar2b _16bit_space;
-- _16bit_space.byte1 = 0;
-- _16bit_space.byte2 = ' ';
-- rawWidth = xFont->TextWidth16(&_16bit_space, sizeof(_16bit_space)/2);
-- }
-- mSpaceWidth = NSToCoordRound(rawWidth * f);
-+ mSpaceWidth = NSToCoordRound(space_width * f);
-
-- unsigned long pr = 0;
-- if (xFont->GetXFontProperty(XA_X_HEIGHT, &pr) &&
-- pr < 0x00ffffff) // Bug 43214: arbitrary to exclude garbage values
-- {
-- mXHeight = nscoord(pr * f);
--#ifdef REALLY_NOISY_FONTS
-- printf("xHeight=%d\n", mXHeight);
--#endif
-- }
-- else
-- {
-- // 56% of ascent, best guess for non-true type
-- mXHeight = NSToCoordRound((float) fontInfo->ascent* f * 0.56f);
-- }
-+ mXHeight = NSToCoordRound(x_height * f);
-+ mUnderlineOffset = -NSToIntRound(underline_position * f);
-
-- if (xFont->GetXFontProperty(XA_UNDERLINE_POSITION, &pr))
-- {
-- /* this will only be provided from adobe .afm fonts and TrueType
-- * fonts served by xfsft (not xfstt!) */
-- mUnderlineOffset = -NSToIntRound(pr * f);
--#ifdef REALLY_NOISY_FONTS
-- printf("underlineOffset=%d\n", mUnderlineOffset);
--#endif
-- }
-- else
-- {
-- /* this may need to be different than one for those weird asian fonts */
-- float height;
-- height = fontInfo->ascent + fontInfo->descent;
-- mUnderlineOffset = -NSToIntRound(MAX (1, floor (0.1 * height + 0.5)) * f);
-- }
--
-- if (xFont->GetXFontProperty(XA_UNDERLINE_THICKNESS, &pr))
-- {
-- /* this will only be provided from adobe .afm fonts */
-- mUnderlineSize = nscoord(MAX(f, NSToIntRound(pr * f)));
--#ifdef REALLY_NOISY_FONTS
-- printf("underlineSize=%d\n", mUnderlineSize);
--#endif
-- }
-- else
-- {
-- float height;
-- height = fontInfo->ascent + fontInfo->descent;
-- mUnderlineSize = NSToIntRound(MAX(1, floor (0.05 * height + 0.5)) * f);
-- }
--
-- if (xFont->GetXFontProperty(XA_SUPERSCRIPT_Y, &pr))
-- {
-- mSuperscriptOffset = nscoord(MAX(f, NSToIntRound(pr * f)));
--#ifdef REALLY_NOISY_FONTS
-- printf("superscriptOffset=%d\n", mSuperscriptOffset);
--#endif
-- }
-- else
-- {
-- mSuperscriptOffset = mXHeight;
-- }
-+ // these are pre-calculated with the scale in GetFontProperties
-+ mUnderlineSize = underline_thickness;
-+ mSuperscriptOffset = superscript_offset;
-+ mSubscriptOffset = subscript_offset;
-
-- if (xFont->GetXFontProperty(XA_SUBSCRIPT_Y, &pr))
-- {
-- mSubscriptOffset = nscoord(MAX(f, NSToIntRound(pr * f)));
- #ifdef REALLY_NOISY_FONTS
-- printf("subscriptOffset=%d\n", mSubscriptOffset);
-+ printf("RealizeFont [%p]: underline size: %d underline offset %d "
-+ "superscript offset %d subscript offset %d\n",
-+ (void *)this,
-+ mUnderlineSize, mUnderlineOffset,
-+ mSuperscriptOffset, mSubscriptOffset);
- #endif
-- }
-- else
-- {
-- mSubscriptOffset = mXHeight;
-- }
-
- /* need better way to calculate this */
- mStrikeoutOffset = NSToCoordRound(mXHeight / 2.0);
-@@ -2193,6 +2143,12 @@
- return PR_TRUE;
- }
-
-+int
-+nsFontGTK::SupportsChar(PRUnichar aChar)
-+{
-+ return mFont && CCMAP_HAS_CHAR(mCCMap, aChar);
-+}
-+
- void
- nsFontGTK::LoadFont(void)
- {
-@@ -2318,6 +2274,143 @@
- return ((PRBool) (mCharSetInfo == &ISO106461));
- }
-
-+void
-+nsFontGTK::GetFontProperties(float &aScale,
-+ nscoord &aAscent,
-+ nscoord &aDescent,
-+ nscoord &aLineSpacing,
-+ nscoord &aWidthMaxBounds,
-+ float &aSpaceWidth,
-+ float &aXHeight,
-+ float &aUnderlinePosition,
-+ nscoord &aUnderlineThickness,
-+ nscoord &aSuperscriptOffset,
-+ nscoord &aSubscriptOffset)
-+{
-+ XFontStruct *fontInfo = mXFont->GetXFontStruct();
-+
-+ aAscent = fontInfo->ascent;
-+ aDescent = fontInfo->descent;
-+ aLineSpacing = aAscent + aDescent;
-+ aWidthMaxBounds = fontInfo->max_bounds.width;
-+
-+ // aSpaceWidth
-+ gint rawWidth;
-+ if ((fontInfo->min_byte1 == 0) && (fontInfo->max_byte1 == 0)) {
-+ rawWidth = mXFont->TextWidth8(" ", 1);
-+ }
-+ else {
-+ XChar2b _16bit_space;
-+ _16bit_space.byte1 = 0;
-+ _16bit_space.byte2 = ' ';
-+ rawWidth = mXFont->TextWidth16(&_16bit_space, sizeof(_16bit_space)/2);
-+ }
-+
-+ aSpaceWidth = rawWidth;
-+
-+ unsigned long pr = 0;
-+
-+ // aXHeight
-+ if (mXFont->GetXFontProperty(XA_X_HEIGHT, &pr) &&
-+ pr < 0x00ffffff) // Bug 43214: arbitrary to exclude garbage values
-+ {
-+ aXHeight = pr;
-+#ifdef REALLY_NOISY_FONTS
-+ printf("aXHeight=%f\n", aXHeight);
-+#endif
-+ }
-+ else
-+ {
-+ // 56% of ascent, best guess for non-true type
-+ aXHeight = ((float)fontInfo->ascent) * 0.56f;
-+ }
-+
-+ // aUnderlinePosition
-+ if (mXFont->GetXFontProperty(XA_UNDERLINE_POSITION, &pr))
-+ {
-+ /* this will only be provided from adobe .afm fonts and TrueType
-+ * fonts served by xfsft (not xfstt!) */
-+ aUnderlinePosition = pr;
-+#ifdef REALLY_NOISY_FONTS
-+ printf("aUnderlinePosition=%f\n", aUnderlinePosition);
-+#endif
-+ }
-+ else
-+ {
-+ /* this may need to be different than one for those weird asian fonts */
-+ float height;
-+ height = fontInfo->ascent + fontInfo->descent;
-+ aUnderlinePosition = MAX(1, floor(0.1 * height + 0.5));
-+ }
-+
-+ // aUnderlineThickness
-+ if (mXFont->GetXFontProperty(XA_UNDERLINE_THICKNESS, &pr))
-+ {
-+ /* this will only be provided from adobe .afm fonts */
-+ aUnderlineThickness = nscoord(MAX(aScale, NSToIntRound(pr * aScale)));
-+#ifdef REALLY_NOISY_FONTS
-+ printf("aUnderlineThickness=%d\n", aUnderlineThickness);
-+#endif
-+ }
-+ else
-+ {
-+ float height;
-+ height = fontInfo->ascent + fontInfo->descent;
-+ aUnderlineThickness = NSToIntRound(MAX(1, floor(0.05 * height + 0.5))
-+ * aScale);
-+ }
-+
-+ // aSuperscriptOffset
-+ if (mXFont->GetXFontProperty(XA_SUPERSCRIPT_Y, &pr))
-+ {
-+ aSuperscriptOffset = nscoord(MAX(aScale, NSToIntRound(pr * aScale)));
-+#ifdef REALLY_NOISY_FONTS
-+ printf("superscriptOffset=%d\n", aSuperscriptOffset);
-+#endif
-+ }
-+ else
-+ {
-+ aSuperscriptOffset = NSToIntRound(aXHeight * aScale);
-+ }
-+
-+ // aSubscriptOffset
-+ if (mXFont->GetXFontProperty(XA_SUBSCRIPT_Y, &pr))
-+ {
-+ aSubscriptOffset = nscoord(MAX(aScale, NSToIntRound(pr * aScale)));
-+#ifdef REALLY_NOISY_FONTS
-+ printf("aSubscriptOffset=%d\n", aSubscriptOffset);
-+#endif
-+ }
-+ else
-+ {
-+ aSubscriptOffset = NSToIntRound(aXHeight * aScale);
-+ }
-+}
-+
-+PRBool
-+nsFontGTK::IsXftFont(void)
-+{
-+ return PR_FALSE;
-+}
-+
-+gint
-+nsFontGTK::GetWidth8(const char *aString, PRUint32 aLength)
-+{
-+ NS_NOTREACHED("nsFontGTK::GetWidth8\n");
-+ return 0;
-+}
-+
-+gint
-+nsFontGTK::DrawString8(nsRenderingContextGTK *aContext,
-+ nsDrawingSurfaceGTK* aSurface,
-+ nscoord aX, nscoord aY,
-+ const char* aString,
-+ PRUint32 aLength)
-+{
-+ NS_NOTREACHED("nsFontGTK::DrawString8\n");
-+ return 0;
-+}
-+
- PRBool
- nsFontGTK::IsFreeTypeFont(void)
- {
-@@ -2830,6 +2923,778 @@
- }
- #endif
-
-+#ifdef MOZ_ENABLE_XFT
-+
-+struct xftLangGroup {
-+ char *aMozLangGroup;
-+ FcChar32 aChar;
-+ char *aXftLangGroup[4];
-+};
-+
-+static const struct xftLangGroup xftLangGroups[] = {
-+ { "x-western", 0x0041, { FC_LANG_LATIN_1,
-+ FC_LANG_WE_LATIN_1,
-+ FC_LANG_US, 0 } },
-+ { "x-central-euro", 0x0100, { FC_LANG_LATIN_2_EASTERN_EUROPE, 0 } },
-+ { "x-cyrillic", 0x0411, { FC_LANG_CYRILLIC,
-+ FC_LANG_IBM_CYRILLIC,
-+ FC_LANG_MSDOS_RUSSIAN, 0 } },
-+ { "el", 0x03b1, { FC_LANG_GREEK,
-+ FC_LANG_IBM_GREEK,
-+ FC_LANG_GREEK_437_G, 0 } },
-+ { "tr", 0x0130, { FC_LANG_TURKISH,
-+ FC_LANG_IBM_TURKISH, 0 } },
-+ { "he", 0x05d0, { FC_LANG_HEBREW,
-+ FC_LANG_HEBREW_862, 0 } },
-+ { "ar", 0x0630, { FC_LANG_ARABIC,
-+ FC_LANG_ARABIC_864,
-+ FC_LANG_ARABIC_ASMO_708, 0 } },
-+ { "x-baltic", 0x0104, { FC_LANG_WINDOWS_BALTIC,
-+ FC_LANG_MSDOS_BALTIC, 0 } },
-+ { "th", 0x0e01, { FC_LANG_THAI, 0 } },
-+ { "ja", 0x65e5, { FC_LANG_JAPANESE, 0 } },
-+ { "zh-CN", 0x4e00, { FC_LANG_SIMPLIFIED_CHINESE, 0 } },
-+ { "ko", 0x4e00, { FC_LANG_KOREAN_WANSUNG,
-+ FC_LANG_KOREAN_JOHAB, 0 } },
-+ { "zh-TW", 0x4e00, { FC_LANG_TRADITIONAL_CHINESE, 0 } },
-+ { "x-unicode", 0x0000, { 0 } },
-+ { "x-user-def", 0x0000, { 0 } },
-+};
-+
-+#define NUM_XFT_LANG_GROUPS (sizeof (xftLangGroups) / \
-+ sizeof (xftLangGroups[0]))
-+
-+static const struct xftLangGroup *
-+xftFindMozLangGroup (nsACString &mozLangGroup)
-+{
-+ for (unsigned int i = 0; i < NUM_XFT_LANG_GROUPS; i++)
-+ {
-+ if (mozLangGroup.Equals (xftLangGroups[i].aMozLangGroup,
-+ nsCaseInsensitiveCStringComparator()))
-+ {
-+ return &xftLangGroups[i];
-+ }
-+ }
-+ return 0;
-+}
-+
-+static const struct xftLangGroup *
-+xftFindMozLangAtom (nsIAtom *aLangGroup)
-+{
-+ nsAutoString aName;
-+ nsCAutoString aCName;
-+
-+ aLangGroup->ToString (aName);
-+ aCName.AppendWithConversion (aName);
-+ return xftFindMozLangGroup (aCName);
-+}
-+
-+class nsFontGTKXft : public nsFontGTK
-+{
-+public:
-+ nsFontGTKXft();
-+ nsFontGTKXft(nsFontGTKXft *aFont);
-+ nsFontGTKXft(XftFont *aFont);
-+ virtual ~nsFontGTKXft();
-+
-+ virtual PRBool IsXftFont(void);
-+ virtual PRBool SupportsChar(PRUnichar aChar);
-+ virtual gint GetWidth8(const char *aString, PRUint32 aLength);
-+ virtual gint GetWidth(const PRUnichar* aString, PRUint32 aLength);
-+ virtual gint DrawString8(nsRenderingContextGTK *aContext,
-+ nsDrawingSurfaceGTK* aSurface,
-+ nscoord aX, nscoord aY,
-+ const char* aString,
-+ PRUint32 aLength);
-+ virtual gint DrawString(nsRenderingContextGTK* aContext,
-+ nsDrawingSurfaceGTK* aSurface, nscoord aX,
-+ nscoord aY, const PRUnichar* aString,
-+ PRUint32 aLength);
-+ virtual void GetFontProperties(float &aScale,
-+ nscoord &aAscent,
-+ nscoord &aDescent,
-+ nscoord &aLineSpacing,
-+ nscoord &aWidthMaxBounds,
-+ float &aSpaceWidth,
-+ float &aXHeight,
-+ float &aUnderlinePosition,
-+ nscoord &aUnderlineThickness,
-+ nscoord &aSuperscriptOffset,
-+ nscoord &aSubscriptOffset);
-+#ifdef MOZ_MATHML
-+ virtual nsresult GetBoundingMetrics(const PRUnichar* aString,
-+ PRUint32 aLength,
-+ nsBoundingMetrics& aBoundingMetrics);
-+#endif
-+ FcCharSet *mSubstituteChars;
-+private:
-+ XftFont *mXftFont;
-+};
-+
-+nsFontGTKXft::nsFontGTKXft()
-+{
-+ mXftFont = nsnull;
-+ mSize = 0;
-+}
-+
-+nsFontGTKXft::nsFontGTKXft(nsFontGTKXft *aFont)
-+{
-+ mXftFont = XftFontCopy(GDK_DISPLAY(), aFont->mXftFont);
-+ mSize = aFont->mSize;
-+}
-+
-+nsFontGTKXft::nsFontGTKXft(XftFont *aFont)
-+{
-+ mXftFont = aFont;
-+ mSize = aFont->ascent + aFont->descent;
-+}
-+
-+nsFontGTKXft::~nsFontGTKXft()
-+{
-+ if (mXftFont)
-+ XftFontClose(GDK_DISPLAY(), mXftFont);
-+ if (mSubstituteChars)
-+ FcCharSetDestroy (mSubstituteChars);
-+}
-+
-+PRBool
-+nsFontGTKXft::IsXftFont(void)
-+{
-+ return PR_TRUE;
-+}
-+
-+PRBool
-+nsFontGTKXft::SupportsChar(PRUnichar aChar)
-+{
-+ if (mSubstituteChars)
-+ return FcCharSetHasChar (mSubstituteChars, aChar);
-+ if (mXftFont)
-+ return XftCharExists(GDK_DISPLAY(), mXftFont, aChar);
-+
-+ return FALSE;
-+}
-+
-+gint
-+nsFontGTKXft::GetWidth8(const char *aString, PRUint32 aLength)
-+{
-+ XGlyphInfo glyphinfo;
-+ XftTextExtents8(GDK_DISPLAY(), mXftFont, (FcChar8 *)aString,
-+ aLength, &glyphinfo);
-+ return glyphinfo.xOff;
-+}
-+
-+gint
-+nsFontGTKXft::GetWidth(const PRUnichar* aString, PRUint32 aLength)
-+{
-+ XGlyphInfo glyphinfo;
-+ XftTextExtents16(GDK_DISPLAY(), mXftFont, (FcChar16 *)aString,
-+ aLength, &glyphinfo);
-+ return glyphinfo.xOff;
-+}
-+
-+#define NS_TO_GDK_RGB(ns) (ns & 0xff) << 16 | \
-+ (ns & 0xff00) | ((ns >> 16) & 0xff)
-+
-+gint
-+nsFontGTKXft::DrawString(nsRenderingContextGTK* aContext,
-+ nsDrawingSurfaceGTK* aSurface, nscoord aX,
-+ nscoord aY, const PRUnichar* aString,
-+ PRUint32 aLength)
-+{
-+ XftColor color;
-+ nscolor rccolor;
-+
-+ aContext->GetColor(rccolor);
-+
-+ color.pixel = gdk_rgb_xpixel_from_rgb(NS_TO_GDK_RGB(rccolor));
-+ color.color.red = (NS_GET_R(rccolor) << 8) | NS_GET_R(rccolor);
-+ color.color.green = (NS_GET_G(rccolor) << 8) | NS_GET_G(rccolor);
-+ color.color.blue = (NS_GET_B(rccolor) << 8) | NS_GET_B(rccolor);
-+ color.color.alpha = 0xffff;
-+
-+ XftDraw *draw = aSurface->GetXftDraw();
-+
-+ nsCOMPtr<nsIRegion> lastRegion;
-+ nsCOMPtr<nsIRegion> clipRegion;
-+
-+ aSurface->GetLastXftClip(getter_AddRefs(lastRegion));
-+ aContext->GetClipRegion(getter_AddRefs(clipRegion));
-+
-+ // avoid setting the clip, if possible
-+ if (!lastRegion || !clipRegion || !lastRegion->IsEqual(*clipRegion)) {
-+ aSurface->SetLastXftClip(clipRegion);
-+
-+ GdkRegion *rgn = nsnull;
-+ clipRegion->GetNativeRegion((void *&)rgn);
-+ GdkRegionPrivate *priv = (GdkRegionPrivate *)rgn;
-+
-+ XftDrawSetClip(draw, priv->xregion);
-+ }
-+
-+ XftDrawString16(draw, &color, mXftFont, aX, aY + mBaselineAdjust,
-+ (FcChar16 *)aString, aLength);
-+
-+ return GetWidth(aString, aLength);
-+}
-+
-+gint
-+nsFontGTKXft::DrawString8(nsRenderingContextGTK *aContext,
-+ nsDrawingSurfaceGTK* aSurface,
-+ nscoord aX, nscoord aY,
-+ const char* aString,
-+ PRUint32 aLength)
-+{
-+ XftColor color;
-+ nscolor rccolor;
-+
-+ aContext->GetColor(rccolor);
-+
-+ color.pixel = gdk_rgb_xpixel_from_rgb(NS_TO_GDK_RGB(rccolor));
-+ color.color.red = (NS_GET_R(rccolor) << 8) | NS_GET_R(rccolor);
-+ color.color.green = (NS_GET_G(rccolor) << 8) | NS_GET_G(rccolor);
-+ color.color.blue = (NS_GET_B(rccolor) << 8) | NS_GET_B(rccolor);
-+ color.color.alpha = 0xffff;
-+
-+ XftDraw *draw = aSurface->GetXftDraw();
-+
-+ nsCOMPtr<nsIRegion> lastRegion;
-+ nsCOMPtr<nsIRegion> clipRegion;
-+
-+ aSurface->GetLastXftClip(getter_AddRefs(lastRegion));
-+ aContext->GetClipRegion(getter_AddRefs(clipRegion));
-+
-+ // avoid setting the clip, if possible
-+ if (!lastRegion || !clipRegion || !lastRegion->IsEqual(*clipRegion)) {
-+ aSurface->SetLastXftClip(clipRegion);
-+
-+ GdkRegion *rgn = nsnull;
-+ clipRegion->GetNativeRegion((void *&)rgn);
-+ GdkRegionPrivate *priv = (GdkRegionPrivate *)rgn;
-+
-+ XftDrawSetClip(draw, priv->xregion);
-+ }
-+
-+ XftDrawString8(draw, &color, mXftFont, aX, aY + mBaselineAdjust,
-+ (FcChar8 *)aString, aLength);
-+
-+ return aLength;
-+}
-+
-+void
-+nsFontGTKXft::GetFontProperties(float &aScale,
-+ nscoord &aAscent,
-+ nscoord &aDescent,
-+ nscoord &aLineSpacing,
-+ nscoord &aWidthMaxBounds,
-+ float &aSpaceWidth,
-+ float &aXHeight,
-+ float &aUnderlinePosition,
-+ nscoord &aUnderlineThickness,
-+ nscoord &aSuperscriptOffset,
-+ nscoord &aSubscriptOffset)
-+{
-+ FT_Face face;
-+ TT_OS2 *os2;
-+
-+ face = XftLockFace(mXftFont);
-+ os2 = (TT_OS2 *) FT_Get_Sfnt_Table(face, ft_sfnt_os2);
-+
-+ // aAscent
-+ aAscent = mXftFont->ascent;
-+ // aDescent
-+ aDescent = mXftFont->descent;
-+ // aLineSpacing
-+ aLineSpacing = mXftFont->height;
-+ // aWidthMaxBounds
-+ aWidthMaxBounds = mXftFont->max_advance_width;
-+
-+ // aSpaceWidth
-+ PRUnichar unispace(' ');
-+ aSpaceWidth = GetWidth(&unispace, 1);
-+
-+ // aXHeight
-+ PRUnichar xUnichar('x');
-+ if (SupportsChar(xUnichar)) {
-+ XGlyphInfo extents;
-+ XftTextExtents16(GDK_DISPLAY(), mXftFont, &xUnichar, 1, &extents);
-+ aXHeight = extents.height;
-+ }
-+ else {
-+ // 56% of ascent, best guess for non-true type or asian fonts
-+ aXHeight = ((float)aAscent) * 0.56;
-+ }
-+
-+ float val;
-+
-+ // aUnderlinePosition
-+ val = face->underline_position >> 16;
-+ // val = FT_MulFix(face->underline_position, face->size->metrics.x_scale);
-+ if (val)
-+ aUnderlinePosition = -val;
-+ else
-+ aUnderlinePosition = -MAX(1, floor(0.1 * mXftFont->height + 0.5));
-+
-+ // aUnderlineThickness
-+ val = face->underline_thickness >> 16;
-+ // val = FT_MulFix(face->underline_thickness, face->size->metrics.x_scale);
-+ if (val) {
-+ aUnderlineThickness = nscoord(MAX(aScale, NSToIntRound(val * aScale)));
-+ }
-+ else {
-+ aUnderlineThickness =
-+ NSToIntRound(MAX(1, floor(0.05 * mXftFont->height + 0.5)) * aScale);
-+ }
-+
-+ // aSuperscriptOffset
-+ if (os2 && os2->ySuperscriptYOffset) {
-+ //val = FT_MulFix(os2->ySuperscriptYOffset, face->size->metrics.x_scale);
-+ val = os2->ySuperscriptYOffset >> 16;
-+ aSuperscriptOffset = nscoord(MAX(aScale, NSToIntRound(val * aScale)));
-+ }
-+ else {
-+ aSuperscriptOffset = NSToIntRound(aXHeight * aScale);
-+ }
-+
-+ // aSubscriptOffset
-+ if (os2 && os2->ySubscriptYOffset) {
-+ // val = FT_MulFix(os2->ySubscriptYOffset, face->size->metrics.x_scale);
-+ val = os2->ySubscriptYOffset >> 16;
-+ aSubscriptOffset = nscoord(MAX(aScale, NSToIntRound(val * aScale)));
-+ }
-+ else {
-+ aSubscriptOffset = NSToIntRound(aXHeight * aScale);
-+ }
-+
-+ XftUnlockFace(mXftFont);
-+}
-+
-+#ifdef MOZ_MATHML
-+nsresult
-+nsFontGTKXft::GetBoundingMetrics(const PRUnichar* aString,
-+ PRUint32 aLength,
-+ nsBoundingMetrics& aBoundingMetrics)
-+{
-+ aBoundingMetrics.Clear ();
-+
-+ if (aString && aLength) {
-+ XGlyphInfo info;
-+ XftTextExtents16 (GDK_DISPLAY (), mXftFont, (FcChar16 *) aString,
-+ aLength, &info);
-+ aBoundingMetrics.leftBearing = info.x;
-+ aBoundingMetrics.rightBearing = info.width - info.x;
-+ aBoundingMetrics.ascent = -info.y;
-+ aBoundingMetrics.descent = info.height + info.y;
-+ aBoundingMetrics.width = info.xOff;
-+ }
-+ return NS_OK;
-+}
-+#endif /* MOZ_MATHML */
-+
-+PRBool
-+UseXft (void)
-+{
-+ static PRBool been_here_done_that = PR_FALSE;
-+ static PRBool use_xft;
-+ if (!been_here_done_that)
-+ {
-+ char *e = getenv ("MOZILLA_XFT");
-+ been_here_done_that = PR_TRUE;
-+ use_xft = !e || atoi(e) == 1;
-+ }
-+ return use_xft;
-+}
-+
-+static FcPattern *
-+ListLangGroup (nsIAtom *aLangGroup, const char *aGeneric)
-+{
-+ const struct xftLangGroup *langGroup = xftFindMozLangAtom (aLangGroup);
-+ if (langGroup && langGroup->aXftLangGroup[0])
-+ {
-+ const char *const *langGroups = langGroup->aXftLangGroup;
-+ FcPattern *pat = FcPatternCreate ();
-+ if (!pat)
-+ return 0;
-+ while (*langGroups)
-+ FcPatternAddString (pat, FC_LANG, (const FcChar8 *) *langGroups++);
-+ return pat;
-+ }
-+ return 0;
-+}
-+
-+static FcPattern *
-+ListLangChar (nsIAtom *aLangGroup, const char *aGeneric)
-+{
-+ const struct xftLangGroup *langGroup = xftFindMozLangAtom (aLangGroup);
-+ if (langGroup && langGroup->aChar)
-+ {
-+ FcPattern *pat = FcPatternCreate ();
-+ if (!pat)
-+ return 0;
-+
-+ FcCharSet *cs = FcCharSetCreate ();
-+ if (!cs) {
-+ FcPatternDestroy (pat);
-+ return 0;
-+ }
-+ FcCharSetAddChar (cs, langGroup->aChar);
-+ FcPatternAddCharSet (pat, FC_CHARSET, cs);
-+ FcCharSetDestroy (cs);
-+ return pat;
-+ }
-+ return 0;
-+}
-+
-+
-+static int
-+FFRECountHyphens (nsACString &aFFREName)
-+{
-+ int h = 0;
-+ PRInt32 hyphen = 0;
-+ while ((hyphen = aFFREName.FindChar('-', hyphen)) >= 0) {
-+ h++;
-+ hyphen++;
-+ }
-+ return h;
-+}
-+
-+static void
-+FFREToFamily(nsACString &aFFREName, nsACString &oFamily)
-+{
-+ if (FFRECountHyphens(aFFREName) == 3)
-+ {
-+ PRInt32 familyHyphen = aFFREName.FindChar('-') + 1;
-+ PRInt32 registryHyphen = aFFREName.FindChar('-',familyHyphen);
-+ oFamily.Append(PromiseFlatCString(aFFREName).get() + familyHyphen,
-+ registryHyphen - familyHyphen);
-+ }
-+ else
-+ oFamily.Append(aFFREName);
-+}
-+
-+struct nsXftFontSearch
-+{
-+ FcPattern *fcPat;
-+ nsIAtom *langGroup;
-+};
-+
-+static void
-+nsXftAddFFRE (FcPattern *fcPat, nsCString *familyName)
-+{
-+ nsCAutoString family;
-+ FFREToFamily (*familyName, family);
-+ FcPatternAddString (fcPat, FC_FAMILY, (const FcChar8 *) family.get());
-+}
-+
-+static PRBool
-+PrefXftMatchLang (const char *pref, nsIAtom *aLangGroup)
-+{
-+ if (aLangGroup) {
-+ const char *lang = atomToName (aLangGroup);
-+ int nlen = strlen (pref);
-+ int alen = strlen (lang);
-+
-+ if (alen > nlen || strcmp (pref + (nlen - alen), lang) != 0)
-+ return PR_FALSE;
-+ }
-+ return PR_TRUE;
-+}
-+
-+static void
-+PrefXftEnumCallback(const char* aName, void* aClosure)
-+{
-+ nsXftFontSearch *s = (nsXftFontSearch *) aClosure;
-+
-+ if (!PrefXftMatchLang (aName, s->langGroup))
-+ return;
-+ nsXPIDLCString value;
-+ gPref->CopyCharPref(aName, getter_Copies(value));
-+ nsCAutoString name;
-+ if (value) {
-+ name = value;
-+ nsXftAddFFRE (s->fcPat, &name);
-+ }
-+ gPref->CopyDefaultCharPref(aName, getter_Copies(value));
-+ if (value) {
-+ name = value;
-+ nsXftAddFFRE (s->fcPat, &name);
-+ }
-+}
-+
-+nsFontGTK *
-+nsFontMetricsGTK::FindXftFont(PRUnichar aChar)
-+{
-+ FcPattern *fcPat;
-+
-+ fcPat = FcPatternCreate ();
-+
-+ /* Add user-defined family */
-+ if (mIsUserDefined && !mUserDefined.Equals(*mGeneric))
-+ FcPatternAddString (fcPat, FC_FAMILY, (const FcChar8 *) mUserDefined.get());
-+
-+ /* Add CSS names */
-+ for (int i = 0; i < mFonts.Count (); i++)
-+ {
-+ nsCString *familyName = mFonts.CStringAt(i);
-+ if (!familyName->Equals(*mGeneric))
-+ nsXftAddFFRE (fcPat, familyName);
-+ }
-+
-+ /* Add user preference names */
-+ //
-+ // Search all font prefs for generic
-+ //
-+ nsCAutoString prefix("font.name.");
-+ prefix.Append(*mGeneric);
-+ prefix.Append(".");
-+ prefix.Append(atomToName(mLangGroup));
-+ nsXftFontSearch search = { fcPat, mLangGroup };
-+ FIND_FONT_PRINTF((" Search all font prefs for generic"));
-+ gPref->EnumerateChildren(prefix.get(), PrefXftEnumCallback, &search);
-+
-+ //
-+ // Add the generic name to use the Fontconfig mappings
-+ //
-+ FcPatternAddString (fcPat, FC_FAMILY, (const FcChar8 *) mGeneric->get());
-+
-+ //
-+ // Search all font prefs
-+ //
-+ // find based on all prefs (no generic part (eg: sans-serif))
-+ nsCAutoString allPrefs("font.name.");
-+ FIND_FONT_PRINTF((" Search all font prefs"));
-+ gPref->EnumerateChildren(allPrefs.get(), PrefXftEnumCallback, &search);
-+
-+ const struct xftLangGroup *langGroup = xftFindMozLangAtom (mLangGroup);
-+ if (langGroup)
-+ for (const char *const*g = langGroup->aXftLangGroup; *g; g++)
-+ FcPatternAddString (fcPat, FC_LANG, (const FcChar8 *) *g);
-+
-+ /* Add character */
-+ FcCharSet *cs = FcCharSetCreate ();
-+ if (cs) {
-+ FcCharSetAddChar (cs, aChar);
-+ FcPatternAddCharSet (fcPat, FC_CHARSET, cs);
-+ FcCharSetDestroy (cs);/* we're done with it, the pattern holds a copy */
-+ }
-+
-+ /* Add the style bits */
-+ FcPatternAddInteger (fcPat, FC_PIXEL_SIZE, mPixelSize);
-+
-+ int fcSlant = FC_SLANT_ROMAN;
-+
-+ switch(mFont->style) {
-+ case NS_FONT_STYLE_ITALIC:
-+ fcSlant = FC_SLANT_ITALIC;
-+ break;
-+ case NS_FONT_STYLE_OBLIQUE:
-+ fcSlant = FC_SLANT_OBLIQUE;
-+ break;
-+ }
-+
-+ FcPatternAddInteger(fcPat, FC_SLANT, fcSlant);
-+
-+ /*
-+ * weights come in two parts crammed into one
-+ * integer -- the "base" weight is weight / 100,
-+ * the rest of the value is the "offset" from that
-+ * weight -- the number of steps to move to adjust
-+ * the weight in the list of supported font weights,
-+ * this value can be negative or positive.
-+ */
-+ PRInt32 baseWeight = (mFont->weight + 50) / 100;
-+ PRInt32 offset = mFont->weight - baseWeight * 100;
-+
-+ /* clip weights to range 0 to 9 */
-+ if (baseWeight < 0) baseWeight = 0;
-+ if (baseWeight > 9) baseWeight = 9;
-+
-+ /* Map to final FC_WEIGHT value */
-+ static int fcWeights[5] = {
-+ FC_WEIGHT_LIGHT, /* 0 */
-+ FC_WEIGHT_MEDIUM, /* 1 */
-+ FC_WEIGHT_DEMIBOLD, /* 2 */
-+ FC_WEIGHT_BOLD, /* 3 */
-+ FC_WEIGHT_BLACK, /* 4 */
-+ };
-+
-+ /* Map from weight value to fcWeights index */
-+ static int fcWeightLookup[10] = {
-+ 0, 0, 0, 0, 1, 1, 2, 3, 3, 4,
-+ };
-+
-+ PRInt32 fcWeight = fcWeightLookup[baseWeight];
-+
-+ /*
-+ * adjust by the offset value, make sure we stay inside the
-+ * fcWeights table
-+ */
-+ fcWeight += offset;
-+ if (fcWeight < 0) fcWeight = 0;
-+ if (fcWeight > 4) fcWeight = 4;
-+
-+ FcPatternAddInteger(fcPat, FC_WEIGHT, fcWeights[fcWeight]);
-+
-+#if 0
-+ FcChar8 *name = FcNameUnparse (fcPat);
-+ if (name) {
-+ printf ("font %s\n", name);
-+ free (name);
-+ }
-+#endif
-+
-+ /* Go forth and match */
-+ FcResult result;
-+ FcPattern *fcFont = XftFontMatch (GDK_DISPLAY(),
-+ DefaultScreen (GDK_DISPLAY()),
-+ fcPat, &result);
-+ FcPatternDestroy (fcPat);
-+
-+ XftFont *xftFont = 0;
-+
-+ if (fcFont) {
-+
-+ FcCharSet *cs;
-+ PRBool is_substitute = PR_FALSE;
-+ if (FcPatternGetCharSet (fcFont, FC_CHARSET, 0, &cs) != FcResultMatch ||
-+ !FcCharSetHasChar (cs, aChar))
-+ {
-+ if (mSubstituteFont)
-+ {
-+ nsFontGTKXft *font = (nsFontGTKXft *) mSubstituteFont;
-+ FcPatternDestroy (fcFont);
-+ FcCharSetAddChar (font->mSubstituteChars, aChar);
-+ return mSubstituteFont;
-+ }
-+ is_substitute = PR_TRUE;
-+ }
-+
-+ xftFont = XftFontOpenPattern(GDK_DISPLAY(), fcFont);
-+
-+ if (xftFont) {
-+ nsFontGTKXft *retval;
-+
-+ retval = new nsFontGTKXft(xftFont);
-+ if (retval) {
-+ if (is_substitute) {
-+ retval->mSubstituteChars = FcCharSetCreate ();
-+ FcCharSetAddChar (retval->mSubstituteChars, aChar);
-+ if (!retval->mSubstituteChars) {
-+ delete retval;
-+ retval = 0;
-+ }
-+ mSubstituteFont = retval;
-+ }
-+ AddToLoadedFontsList(retval);
-+ return retval;
-+ }
-+ XftFontClose(GDK_DISPLAY(), xftFont);
-+ }
-+ else {
-+ FcPatternDestroy(fcFont);
-+ }
-+ }
-+ return nsnull;
-+
-+}
-+
-+static int
-+CompareXftFontNames(const void* aArg1, const void* aArg2, void* aClosure)
-+{
-+ const PRUnichar* str1 = *((const PRUnichar**) aArg1);
-+ const PRUnichar* str2 = *((const PRUnichar**) aArg2);
-+
-+ // XXX add nsICollation stuff
-+
-+ return nsCRT::strcmp(str1, str2);
-+}
-+
-+static nsresult
-+EnumXftFonts(nsIAtom* aLangGroup, const char* aGeneric, PRUint32* aCount,
-+ PRUnichar*** aResult)
-+{
-+ PRUnichar **array;
-+ PRUint32 narray;
-+ FcPattern *pat;
-+ FcObjectSet *os = FcObjectSetBuild (FC_FAMILY, FC_FOUNDRY, 0);
-+ FcFontSet *fs;
-+
-+ fs = 0;
-+ if ((pat = ListLangGroup (aLangGroup, aGeneric))) {
-+ fs = FcFontList (0, pat, os);
-+ if (fs && !fs->nfont) {
-+ FcFontSetDestroy (fs);
-+ fs = 0;
-+ }
-+ FcPatternDestroy (pat);
-+ }
-+
-+ if (!fs && (pat = ListLangChar (aLangGroup, aGeneric))) {
-+ fs = FcFontList (0, pat, os);
-+ if (fs && !fs->nfont) {
-+ FcFontSetDestroy (fs);
-+ fs = 0;
-+ }
-+ FcPatternDestroy (pat);
-+ }
-+
-+ if (!fs && (pat = FcPatternCreate ())) {
-+ fs = FcFontList (0, pat, os);
-+ FcPatternDestroy (pat);
-+ }
-+ FcObjectSetDestroy (os);
-+
-+ if (!fs)
-+ return NS_ERROR_OUT_OF_MEMORY;
-+
-+ array = (PRUnichar**) nsMemory::Alloc(fs->nfont * sizeof(PRUnichar*));
-+ narray = 0;
-+ for (int i = 0; i < fs->nfont; i++) {
-+ char *family, *foundry;
-+ PRUnichar *name;
-+
-+ if (FcPatternGetString (fs->fonts[i], FC_FOUNDRY, 0, (FcChar8 **) &foundry) !=
-+ FcResultMatch)
-+ foundry = "*";
-+
-+ if (FcPatternGetString (fs->fonts[i], FC_FAMILY, 0, (FcChar8 **) &family) !=
-+ FcResultMatch)
-+ family = "*";
-+
-+ name = (PRUnichar *) nsMemory::Alloc ((strlen (foundry) +
-+ 1 +
-+ strlen (family) +
-+ strlen ("-iso10646-1") +
-+ 1) * sizeof (PRUnichar));
-+ if (!name) {
-+ for (PRUint32 j = 0; j < narray; j++)
-+ nsMemory::Free (array[j]);
-+ nsMemory::Free (array);
-+ return NS_ERROR_OUT_OF_MEMORY;
-+ }
-+
-+ PRUnichar *r = name;
-+ for (char *f = foundry; *f; f++)
-+ *r++ = *f;
-+ *r++ = '-';
-+ for (char *f = family; *f; f++)
-+ *r++ = *f;
-+ for (char *f = "-iso10646-1"; *f; f++)
-+ *r++ = *f;
-+ *r++ = '\0';
-+
-+ array[narray++] = name;
-+ }
-+ FcFontSetDestroy (fs);
-+ NS_QuickSort(array, narray, sizeof (PRUnichar*), CompareXftFontNames, nsnull);
-+ *aCount = narray;
-+ if (narray)
-+ *aResult = array;
-+ else
-+ nsMemory::Free(array);
-+ return NS_OK;
-+}
-+#endif /* MOZ_ENABLE_XFT */
-+
- nsFontGTK*
- nsFontMetricsGTK::AddToLoadedFontsList(nsFontGTK* aFont)
- {
-@@ -4765,6 +5630,11 @@
- {
- FIND_FONT_PRINTF(("\nFindFont(%c/0x%04x)", aChar, aChar));
-
-+#ifdef MOZ_ENABLE_XFT
-+ if (UseXft ()) {
-+ return FindXftFont(aChar);
-+ }
-+#endif /* MOZ_ENABLE_XFT */
- nsFontGTK* font = FindUserDefinedFont(aChar);
- if (!font) {
- font = FindStyleSheetSpecificFont(aChar);
-@@ -4876,6 +5746,11 @@
- EnumFonts(nsIAtom* aLangGroup, const char* aGeneric, PRUint32* aCount,
- PRUnichar*** aResult)
- {
-+#ifdef MOZ_ENABLE_XFT
-+ if (UseXft ()) {
-+ return EnumXftFonts (aLangGroup, aGeneric, aCount, aResult);
-+ }
-+#endif /* MOZ_ENABLE_XFT */
- nsresult res = GetAllFontNames();
- if (NS_FAILED(res)) {
- return res;
-Index: gfx/src/gtk/nsFontMetricsGTK.h
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/gtk/nsFontMetricsGTK.h,v
-retrieving revision 1.48.2.1
-diff -u -r1.48.2.1 nsFontMetricsGTK.h
---- gfx/src/gtk/nsFontMetricsGTK.h 10 Apr 2002 02:46:16 -0000 1.48.2.1
-+++ gfx/src/gtk/nsFontMetricsGTK.h 20 Apr 2002 17:38:33 -0000
-@@ -222,18 +222,36 @@
- void LoadFont(void);
- PRBool IsEmptyFont(XFontStruct*);
-
-- inline int SupportsChar(PRUnichar aChar)
-- { return mCCMap && CCMAP_HAS_CHAR(mCCMap, aChar); };
-+ virtual int SupportsChar(PRUnichar aChar);
-
- virtual GdkFont* GetGDKFont(void);
- virtual nsXFont* GetXFont(void);
- virtual PRBool GetXFontIs10646(void);
-+ virtual PRBool IsXftFont(void);
- virtual PRBool IsFreeTypeFont(void);
-+ virtual gint GetWidth8(const char *aString, PRUint32 aLength);
- virtual gint GetWidth(const PRUnichar* aString, PRUint32 aLength) = 0;
-+ virtual gint DrawString8(nsRenderingContextGTK *aContext,
-+ nsDrawingSurfaceGTK* aSurface,
-+ nscoord aX, nscoord aY,
-+ const char* aString,
-+ PRUint32 aLength);
- virtual gint DrawString(nsRenderingContextGTK* aContext,
- nsDrawingSurfaceGTK* aSurface, nscoord aX,
- nscoord aY, const PRUnichar* aString,
- PRUint32 aLength) = 0;
-+ virtual void GetFontProperties(float &aScale,
-+ nscoord &aAscent,
-+ nscoord &aDescent,
-+ nscoord &aLineSpacing,
-+ nscoord &aWidthMaxBounds,
-+ float &aSpaceWidth,
-+ float &aXHeight,
-+ float &aUnderlinePosition,
-+ nscoord &aUnderlineThickness,
-+ nscoord &aSuperscriptOffset,
-+ nscoord &aSubscriptOffset);
-+
- #ifdef MOZ_MATHML
- // bounding metrics for a string
- // remember returned values are not in app units
-@@ -301,6 +319,9 @@
- NS_IMETHOD GetSpaceWidth(nscoord &aSpaceWidth);
-
- nsFontGTK* FindFont(PRUnichar aChar);
-+#ifdef MOZ_ENABLE_XFT
-+ nsFontGTK* FindXftFont(PRUnichar aChar);
-+#endif
- nsFontGTK* FindUserDefinedFont(PRUnichar aChar);
- nsFontGTK* FindStyleSheetSpecificFont(PRUnichar aChar);
- nsFontGTK* FindStyleSheetGenericFont(PRUnichar aChar);
-Index: gfx/src/gtk/nsRenderingContextGTK.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/gtk/nsRenderingContextGTK.cpp,v
-retrieving revision 1.156.8.1
-diff -u -r1.156.8.1 nsRenderingContextGTK.cpp
---- gfx/src/gtk/nsRenderingContextGTK.cpp 10 Apr 2002 02:46:18 -0000 1.156.8.1
-+++ gfx/src/gtk/nsRenderingContextGTK.cpp 20 Apr 2002 17:38:35 -0000
-@@ -1304,6 +1304,12 @@
- g_return_val_if_fail(mCurrentFont != NULL, NS_ERROR_FAILURE);
- gint rawWidth;
- nsXFont *xFont = mCurrentFont->GetXFont();
-+#ifdef MOZ_ENABLE_XFT
-+ if (mCurrentFont->IsXftFont()) {
-+ rawWidth = mCurrentFont->GetWidth8(aString, aLength);
-+ }
-+ else
-+#endif
- if (mCurrentFont->IsFreeTypeFont()) {
- PRUnichar unichars[WIDEN_8_TO_16_BUF_SIZE];
- // need to fix this for long strings
-@@ -1354,7 +1360,7 @@
- nsFontGTK** font = metrics->mLoadedFonts;
- nsFontGTK** end = &metrics->mLoadedFonts[metrics->mLoadedFontsCount];
- while (font < end) {
-- if (CCMAP_HAS_CHAR((*font)->mCCMap, c)) {
-+ if ((*font)->SupportsChar(c)) {
- currFont = *font;
- goto FoundFont; // for speed -- avoid "if" statement
- }
-@@ -1419,7 +1425,7 @@
- nsFontGTK** font = metrics->mLoadedFonts;
- nsFontGTK** end = &metrics->mLoadedFonts[metrics->mLoadedFontsCount];
- while (font < end) {
-- if (CCMAP_HAS_CHAR((*font)->mCCMap, c)) {
-+ if ((*font)->SupportsChar(c)) {
- currFont = *font;
- goto FoundFont; // for speed -- avoid "if" statement
- }
-@@ -1490,6 +1496,12 @@
- nscoord xx = x;
- nscoord yy = y;
- mTranMatrix->TransformCoord(&xx, &yy);
-+#ifdef MOZ_ENABLE_XFT
-+ if (mCurrentFont->IsXftFont()) {
-+ mCurrentFont->DrawString8(this, mSurface, xx, yy, &ch, 1);
-+ }
-+ else
-+#endif
- if (mCurrentFont->IsFreeTypeFont()) {
- PRUnichar unichars[WIDEN_8_TO_16_BUF_SIZE];
- // need to fix this for long strings
-@@ -1518,6 +1530,12 @@
- }
- else {
- mTranMatrix->TransformCoord(&x, &y);
-+#ifdef MOZ_ENABLE_XFT
-+ if (mCurrentFont->IsXftFont()) {
-+ mCurrentFont->DrawString8(this, mSurface, x, y, aString, aLength);
-+ }
-+ else
-+#endif
- if (mCurrentFont->IsFreeTypeFont()) {
- PRUnichar unichars[WIDEN_8_TO_16_BUF_SIZE];
- // need to fix this for long strings
-@@ -1607,7 +1625,7 @@
- nsFontGTK** font = metrics->mLoadedFonts;
- nsFontGTK** lastFont = &metrics->mLoadedFonts[metrics->mLoadedFontsCount];
- while (font < lastFont) {
-- if (CCMAP_HAS_CHAR((*font)->mCCMap, c)) {
-+ if ((*font)->SupportsChar(c)) {
- currFont = *font;
- goto FoundFont; // for speed -- avoid "if" statement
- }
-@@ -1989,7 +2007,7 @@
- nsFontGTK** font = metrics->mLoadedFonts;
- nsFontGTK** end = &metrics->mLoadedFonts[metrics->mLoadedFontsCount];
- while (font < end) {
-- if (CCMAP_HAS_CHAR((*font)->mCCMap, c)) {
-+ if ((*font)->SupportsChar(c)) {
- currFont = *font;
- goto FoundFont; // for speed -- avoid "if" statement
- }
-Index: gfx/src/x11shared/nsFT2FontCatalog.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp,v
-retrieving revision 1.8.2.1
-diff -u -r1.8.2.1 nsFT2FontCatalog.cpp
---- gfx/src/x11shared/nsFT2FontCatalog.cpp 10 Apr 2002 02:46:51 -0000 1.8.2.1
-+++ gfx/src/x11shared/nsFT2FontCatalog.cpp 20 Apr 2002 17:38:39 -0000
-@@ -100,7 +100,9 @@
- //
-
- // Solaris is missing a prototype for ctime
-+extern "C" {
- extern char *ctime(const time_t *timep);
-+}
-
- #include <ft2build.h>
- #include FT_GLYPH_H
diff --git a/net-www/mozilla/mozilla-1.0-r3.ebuild b/net-www/mozilla/mozilla-1.0-r3.ebuild
index db2b13f654aa..86cca62c61b7 100644
--- a/net-www/mozilla/mozilla-1.0-r3.ebuild
+++ b/net-www/mozilla/mozilla-1.0-r3.ebuild
@@ -1,12 +1,34 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.0-r3.ebuild,v 1.19 2002/10/24 23:23:45 blizzy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.0-r3.ebuild,v 1.20 2002/11/20 15:10:42 azarah Exp $
IUSE="moznomail java mozp3p mozaccess gtk2 mozinterfaceinfo ssl ldap mozxmlterm mozctl gnome mozsvg"
-inherit makeedit
+inherit makeedit nsplugins
# NOTE: to build without the mail and news component: export NO_MAIL="YES"
+# Recently there has been a lot of stability problem in Gentoo-land. Many
+# things can be the cause to this, but I believe that it is due to gcc3
+# still having issues with optimizations, or with it not filtering bad
+# combinations (protecting the user maybe from himeself) yet.
+#
+# This can clearly be seen in large builds like glibc, where too aggressive
+# CFLAGS cause the tests to fail miserbly.
+#
+# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
+# knows what he is talking about:
+#
+# People really shouldn't force code-specific options on... It's a
+# bad idea. The -march options aren't just to look pretty. They enable
+# options that are sensible (and include sse,mmx,3dnow when apropriate).
+#
+# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
+# you do not like it, comment it, but do not bugreport if you run into
+# problems.
+#
+# <azarah@gentoo.org> (13 Oct 2002)
+strip-flags
+
# handle _rc versions
MY_PV1=${PV/_}
MY_PV2=${PV/_/\.}
@@ -325,6 +347,9 @@ src_install() {
doins ${FILESDIR}/10mozilla
dodoc LEGAL LICENSE README/mozilla/README*
+ # Move plugins dir
+ src_mv_plugins usr/lib/mozilla/plugins
+
# Fix icons to look the same everywhere
insinto /usr/lib/mozilla/icons
doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
@@ -366,6 +391,9 @@ pkg_preinst() {
then
rm -rf ${ROOT}/usr/lib/mozilla/chrome
fi
+
+ # Move old plugins dir
+ pkg_mv_plugins /usr/lib/mozilla/plugins
}
pkg_postinst() {
@@ -412,7 +440,7 @@ pkg_postinst() {
${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt
${MOZILLA_FIVE_HOME}/regchrome
find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 755 {} \; || :
-
+
echo
ewarn "Please unmerge old versions of mozilla, as the header"
diff --git a/net-www/mozilla/mozilla-1.0.1-r1.ebuild b/net-www/mozilla/mozilla-1.0.1-r1.ebuild
deleted file mode 100644
index 360b770011df..000000000000
--- a/net-www/mozilla/mozilla-1.0.1-r1.ebuild
+++ /dev/null
@@ -1,472 +0,0 @@
-# Copyright 1999-2002 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.0.1-r1.ebuild,v 1.12 2002/10/24 23:23:45 blizzy Exp $
-
-IUSE="mozxmlterm moznomail java mozp3p crypt ipv6 gtk2 mozinterfaceinfo ssl ldap mozaccess mozctl gnome mozsvg"
-
-# NOTE: to build without the mail and news component: export NO_MAIL="YES"
-inherit flag-o-matic gcc makeedit
-
-# Crashes on start when compiled with -fomit-frame-pointer
-filter-flags "-fomit-frame-pointer"
-
-EMVER="0.63.3"
-IPCVER="0.99.63"
-
-# handle _rc versions
-MY_PV1=${PV/_}
-MY_PV2=${MY_PV1/eta}
-S=${WORKDIR}/mozilla
-DESCRIPTION="The Mozilla Web Browser"
-SRC_URI="ftp://ftp.mozilla.org/pub/mozilla/releases/${PN}${MY_PV2}/src/${PN}-source-${MY_PV2}.tar.bz2
- crypt? ( http://enigmail.mozdev.org/dload/src/enigmail-${EMVER}.tar.gz
- http://enigmail.mozdev.org/dload/src/ipc-${IPCVER}.tar.gz )"
-HOMEPAGE="http://www.mozilla.org"
-
-KEYWORDS="x86 ppc sparc sparc64 alpha"
-SLOT="0"
-LICENSE="MPL-1.1 NPL-1.1"
-
-RDEPEND=">=x11-base/xfree-4.2.0-r11
- >=gnome-base/ORBit-0.5.10-r1
- >=sys-libs/zlib-1.1.4
- >=media-libs/jpeg-6b
- >=media-libs/libmng-1.0.0
- >=media-libs/libpng-1.2.1
- >=sys-apps/portage-2.0.14
- dev-libs/expat
- app-arch/zip
- app-arch/unzip
- ( gtk2? >=x11-libs/gtk+-2.0.5 :
- =x11-libs/gtk+-1.2* )
- ( gtk2? >=dev-libs/glib-2.0.4 :
- =dev-libs/glib-1.2* )
- java? ( virtual/jre )"
-
-DEPEND="${RDEPEND}
- virtual/x11
- sys-devel/perl
- java? ( >=dev-java/java-config-0.2.0 )"
-
-# needed by src_compile() and src_install()
-export MOZILLA_OFFICIAL=1
-export BUILD_OFFICIAL=1
-
-# enable XFT
-[ "${DISABLE_XFT}" != "1" ] && export MOZ_ENABLE_XFT=1
-
-# make sure the nss module gets build (for NSS support)
-[ -n "`use ssl`" ] && export MOZ_PSM=1
-
-# do we build java support for the NSS stuff ?
-# NOTE: this is broken for the moment
-#[ "`use java`" ] && export NS_USE_JDK=1
-
-
-src_unpack() {
-
- unpack ${A}
-
- cd ${S}
-
- # Fix a ownership porblem
- chown -R root.root *
-
- if [ "$(gcc-version)" != "2.95" ] ; then
- # Fix bogus asm (from Mandrake .spec)
-# patch -p1 < ${FILESDIR}/mozilla-1.0-asmfixes.patch || die
-
- # ABI Patch for ppc/xpcom for gcc-3.x
- # http://bugzilla.mozilla.org/show_bug.cgi?id=142594
- if [ "${ARCH}" = "ppc" ] ; then
- patch -p0 < ${FILESDIR}/mozilla-1.0-abi-xpcom-ppc.patch || die
- fi
-
- # ABI Patch for alpha/xpcom for gcc-3.x
- if [ "${ARCH}" = "alpha" ] ; then
- patch -p1 < ${FILESDIR}/mozilla-alpha-xpcom-subs-fix.patch || die
- fi
-
- # ABI Patch for sparc and sparc64/xpcom for gcc-3.x
- if use sparc &>/dev/null || use sparc64 &>/dev/null
- then
- patch -p1 < ${FILESDIR}/mozilla-1.0.1-sparc-xpcom.patch || die
- fi
- fi
-
- # Apply the bytecode patch for freetype2
- patch -p1 < ${FILESDIR}/mozilla-ft-bytecode.patch || die
-
- # Some patches from Mandrake to fix various crashes. This
- # seems to fix the "crash on submit bug".
- patch -p1 < ${FILESDIR}/${P}-nsrange.patch || die
- patch -p1 < ${FILESDIR}/${P}-bidiselection.patch || die
- patch -p1 < ${FILESDIR}/${P}-referrer.patch || die
- patch -p1 < ${FILESDIR}/${P}-prefcrash.patch || die
- patch -p1 < ${FILESDIR}/${P}-xuldom.patch || die
-
- # Unpack the enigmail plugin
- if [ -n "`use crypt`" -a -z "`use moznomail`" ] && \
- [ "${NO_MAIL}" != "YES" -a "${NO_MAIL}" != "yes" ]
- then
- mv ${WORKDIR}/ipc ${S}/extensions/
- mv ${WORKDIR}/enigmail ${S}/extensions/
- fi
-
- # Fix bug #7656
- cd ${S}/other-licenses/Xft/Xrender
- ln -s /usr/X11R6/include/X11/extensions/Xext.h Xext.h
- ln -s /usr/X11R6/include/X11/extensions/renderproto.h renderproto.h
-}
-
-src_compile() {
-
- local myconf=""
- # NOTE: QT and XLIB toolkit seems very unstable, leave disabled until
- # tested ok -- azarah
- if [ -n "`use gtk2`" ] ; then
- myconf="${myconf} --enable-toolkit-gtk2 \
- --enable-default-toolkit=gtk2 \
- --disable-toolkit-qt \
- --disable-toolkit-xlib \
- --disable-toolkit-gtk"
- else
- myconf="${myconf} --enable-toolkit-gtk \
- --enable-default-toolkit=gtk \
- --disable-toolkit-qt \
- --disable-toolkit-xlib \
- --disable-toolkit-gtk2"
- fi
-
- if [ -z "`use ldap`" ] ; then
- myconf="${myconf} --disable-ldap"
- fi
-
- if [ -z "${DEBUG}" ] ; then
- myconf="${myconf} --enable-strip-libs \
- --disable-debug \
- --disable-tests"
-# Seems to be the cause of crashes on form submit
-# --disable-dtd-debug
- fi
-
- if [ -n "${MOZ_ENABLE_XFT}" ] ; then
- # Enable Xft (currently this is done via freetype2 for gtk1,
- # and libpangoXft for gtk2).
- myconf="${myconf} --enable-xft"
- fi
-
- if [ -n "`use ipv6`" ] ; then
- myconf="${myconf} --enable-ipv6"
- fi
-
-
- # NB!!: Due to the fact that the non default extensions do not always
- # compile properly, using them is considered unsupported, and
- # is just here for completeness. Please do not use if you
- # do not know what you are doing!
- #
- # The defaults are (as of 1.0rc1, according to configure (line ~10799)):
- # cookie wallet content-packs xml-rpc xmlextras help transformiix venkman inspector irc
- # Non-defaults are:
- # xmlterm access-builtin ctl p3p interfaceinfo
- local myext="default"
- if [ -n "`use mozxmlterm`" ] ; then
- myext="${myext},xmlterm"
- fi
- if [ -n "`use mozaccess-builtin`" ] ; then
- myext="${myext},access-builtin"
- fi
- if [ -n "`use mozctl`" ] ; then
- myext="${myext},ctl"
- fi
- if [ -n "`use mozp3p`" ] ; then
- myext="${myext},p3p"
- fi
- if [ -n "`use mozinterfaceinfo`" ] ; then
- myext="${myext},interfaceinfo"
- fi
-
- if [ -n "`use mozsvg`" ] ; then
- export MOZ_INTERNAL_LIBART_LGPL="1"
- myconf="${myconf} --enable-svg"
- else
- myconf="${myconf} --disable-svg"
- fi
-
- if [ -n "`use moznomail`" ] || \
- [ "${NO_MAIL}" = "YES" -o "${NO_MAIL}" = "yes" ]
- then
- myconf="${myconf} --disable-mailnews"
- fi
-
- export BUILD_MODULES=all
- export BUILD_OPT=1
-
- # Currently gcc-3.1.1 dont work well if we specify "-march"
- # and other optimizations for pentium4.
- if [ "$(gcc-major-version)" -eq "3" ] ; then
- export CFLAGS="${CFLAGS/pentium4/pentium3}"
- export CXXFLAGS="${CXXFLAGS/pentium4/pentium3}"
-
- # Enable us to use flash, etc plugins compiled with gcc-2.95.3
- if [ "${ARCH}" = "x86" ] ; then
- myconf="${myconf} --enable-old-abi-compat-wrappers"
- fi
- fi
-
- #This should enable parallel builds, I hope
- export MAKE="emake"
-
- # Get it to work without warnings on gcc3
- CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
-
- ./configure --prefix=/usr/lib/mozilla \
- --disable-pedantic \
- --enable-mathml \
- --without-system-nspr \
- --enable-nspr-autoconf \
- --with-system-zlib \
- --enable-xsl \
- --enable-crypto \
- --enable-detect-webshell-leaks \
- --enable-xinerama \
- --with-java-supplement \
- --with-pthreads \
- --with-extensions="${myext}" \
- --enable-optimize="-O2" \
- --with-default-mozilla-five-home=/usr/lib/mozilla \
- ${myconf} || die
-
- edit_makefiles
- make || die
-
- # Build the NSS/SSL support
- if [ "`use ssl`" ] ; then
- cd ${S}/security/coreconf
-
- # Fix #include problem
- cp headers.mk headers.mk.orig
- echo 'INCLUDES += -I$(DIST)/include/nspr -I$(DIST)/include/dbm'\
- >>headers.mk
-
- make || die
-
- cd ${S}/security/nss
-
- make moz_import || die
- make || die
- cd ${S}
- fi
-
- # Build the enigmail plugin
- if [ -n "`use crypt`" -a -z "`use moznomail`" ] && \
- [ "${NO_MAIL}" != "YES" -a "${NO_MAIL}" != "yes" ]
- then
- cd ${S}/extensions/ipc
- make || die
-
- cd ${S}/extensions/enigmail
- make || die
- fi
-}
-
-src_install() {
-
- # Install, don't create tarball
- dodir /usr/lib
- cd ${S}/xpinstall/packager
- einfo "Installing mozilla into build root..."
- make MOZ_PKG_FORMAT="raw" TAR_CREATE_FLAGS="-chf" > /dev/null || die
- mv -f ${S}/dist/mozilla ${D}/usr/lib/mozilla
-
- # Copy the include and idl files
- dodir /usr/lib/mozilla/include/idl /usr/include
- cd ${S}/dist
- cp -LfR include/* ${D}/usr/lib/mozilla/include
- cp -LfR idl/* ${D}/usr/lib/mozilla/include/idl
- dosym /usr/lib/mozilla/include /usr/include/mozilla
-
- # Install the development tools in /usr
- dodir /usr/bin
- mv ${D}/usr/lib/mozilla/{xpcshell,xpidl,xpt_dump,xpt_link} ${D}/usr/bin
-
- # Install the NSS/SSL libs, headers and tools
- if [ "`use ssl`" ] ; then
- # Install the headers ('make install' do not work for headers ...)
- insinto /usr/lib/mozilla/include/nss
- doins ${S}/dist/public/seccmd/*.h
- doins ${S}/dist/public/security/*.h
-
- cd ${S}/security/nss
-
- mkdir -p ${WORKDIR}/nss/{bin,lib}
- export BUILD_OPT=1
- export SOURCE_BIN_DIR=${WORKDIR}/nss/bin
- export SOURCE_LIB_DIR=${WORKDIR}/nss/lib
-
- make install || die
- # Gets installed as symbolic links ...
- cp -Lf ${WORKDIR}/nss/bin/* ${D}/usr/bin
- cp -Lf ${WORKDIR}/nss/lib/* ${D}/usr/lib/mozilla
-
- # Need to unset these incase we want to rebuild, else the build
- # gets newked.
- unset SOURCE_LIB_DIR
- unset SOURCE_BIN_DIR
- fi
-
- cd ${S}/build/unix
- # Fix mozilla-config and install it
- perl -pi -e "s:/lib/mozilla-${PV}::g" mozilla-config
- perl -pi -e "s:/mozilla-${PV}::g" mozilla-config
- exeinto /usr/lib/mozilla
- doexe mozilla-config
- # Fix pkgconfig files and install them
- insinto /usr/lib/pkgconfig
- for x in *.pc
- do
- if [ -f ${x} ]
- then
- perl -pi -e "s:/lib/mozilla-${PV}::g" ${x}
- perl -pi -e "s:/mozilla-${PV}::g" ${x}
- doins ${x}
- fi
- done
-
- cd ${S}
- exeinto /usr/bin
- newexe ${FILESDIR}/mozilla.sh mozilla
- insinto /etc/env.d
- doins ${FILESDIR}/10mozilla
- dodoc LEGAL LICENSE README/mozilla/README*
-
- # Fix icons to look the same everywhere
- insinto /usr/lib/mozilla/icons
- doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
- doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
-
- # Install icon and .desktop for menu entry
- if [ "`use gnome`" ] ; then
- insinto /usr/share/pixmaps
- doins ${S}/build/package/rpm/SOURCES/mozilla-icon.png
-
- # Fix comment of menu entry
- cd ${S}/build/package/rpm/SOURCES
- perl -pi -e 's:Comment=Mozilla:Comment=Mozilla Web Browser:' mozilla.desktop
- cd ${S}
- insinto /usr/share/gnome/apps/Internet
- doins ${S}/build/package/rpm/SOURCES/mozilla.desktop
- fi
-
- if [ -n "${MOZ_ENABLE_XFT}" ] ; then
- cd ${D}/usr/lib/mozilla/defaults/pref
- patch -p0 <${FILESDIR}/mozilla-xft-unix-prefs.patch || \
- die "failed unix prefs patch"
- fi
-
- # Take care of non root execution
- # (seems the problem is that not all files are readible by the user)
- chmod -R g+r,o+r ${D}/usr/lib/mozilla
-}
-
-pkg_preinst() {
- # Stale components and chrome files break when unmerging old
- if [ -d ${ROOT}/usr/lib/mozilla/components ] ; then
- rm -rf ${ROOT}/usr/lib/mozilla/components
- fi
- if [ -d ${ROOT}/usr/lib/mozilla/chrome ] ; then
- rm -rf ${ROOT}/usr/lib/mozilla/chrome
- fi
-
- # Remove stale component registry.
- if [ -e ${ROOT}/usr/lib/component.reg ] ; then
- rm -f ${ROOT}/usr/lib/component.reg
- fi
-}
-
-pkg_postinst() {
-
- export MOZILLA_FIVE_HOME="${ROOT}/usr/lib/mozilla"
-
- # Make symlink for Java plugin (do not do in src_install(), else it only
- # gets installed every second time)
- if [ "`use java`" -a ! -L ${MOZILLA_FIVE_HOME}/plugins/`java-config --browser-plugin=mozilla` ]
- then
- if [ -e `java-config --full-browser-plugin-path=mozilla` ]
- then
- ln -snf `java-config --full-browser-plugin-path=mozilla` \
- ${MOZILLA_FIVE_HOME}/plugins/`java-config --browser-plugin=mozilla`
- fi
- fi
-
- # We do not yet want any JAVA plugins with gcc-3.x, as they cause
- # mozilla to crash in some cases.
- if [ "$(gcc-version)" != "2.95" -a -n "`use java`" ] ; then
- if [ -L ${MOZILLA_FIVE_HOME}/plugins/`java-config --browser-plugin=mozilla` ] ; then
- rm -f ${MOZILLA_FIVE_HOME}/plugins/`java-config --browser-plugin=mozilla`
- fi
- fi
-
- # Take care of component registration
-
- # Remove any stale component.reg
- if [ -e ${MOZILLA_FIVE_HOME}/component.reg ] ; then
- rm -f ${MOZILLA_FIVE_HOME}/component.reg
- fi
-
- # Tempory fix for missing libtimer_gtk.so
- # If it exists when generating component.reg (before unmerge of old),
- # it 'corrupts' the newly generated component.reg with invalid references.
- if [ -e ${MOZILLA_FIVE_HOME}/components/libtimer_gtk.so ] ; then
- rm -f ${MOZILLA_FIVE_HOME}/components/libtimer_gtk.so
- fi
-
- # Needed to update the run time bindings for REGXPCOM
- # (do not remove next line!)
- env-update
- # Register components, setup Chrome .rdf files and fix file permissions
- einfo "Registering Components and Chrome..."
- umask 022
- ${MOZILLA_FIVE_HOME}/regxpcom
- if [ -e ${MOZILLA_FIVE_HOME}/component.reg ] ; then
- chmod g+r,o+r ${MOZILLA_FIVE_HOME}/component.reg
- fi
- # Setup the default skin and locale to correctly generate the Chrome .rdf files
- find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec rm -f {} \; || :
- echo "skin,install,select,classic/1.0" >> \
- ${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt
- echo "locale,install,select,en-US" >> \
- ${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt
- ${MOZILLA_FIVE_HOME}/regchrome
- find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 755 {} \; || :
-
-
- echo
- ewarn "Please unmerge old versions of mozilla, as the header"
- ewarn "layout in /usr/lib/mozilla/include have changed and will"
- ewarn "result in compile errors when compiling programs that need"
- ewarn "mozilla headers and libs (galeon, nautilus, ...)"
-}
-
-pkg_postrm() {
-
- # Regenerate component.reg in case some things changed
- if [ -e ${ROOT}/usr/lib/mozilla/regxpcom ] ; then
-
- export MOZILLA_FIVE_HOME="${ROOT}/usr/lib/mozilla"
-
- if [ -e ${MOZILLA_FIVE_HOME}/component.reg ] ; then
- rm -f ${MOZILLA_FIVE_HOME}/component.reg
- fi
-
- ${MOZILLA_FIVE_HOME}/regxpcom
- if [ -e ${MOZILLA_FIVE_HOME}/component.reg ] ; then
- chmod g+r,o+r ${MOZILLA_FIVE_HOME}/component.reg
- fi
-
- find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec rm -f {} \; || :
- ${MOZILLA_FIVE_HOME}/regchrome
- find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 755 {} \; || :
- fi
-}
diff --git a/net-www/mozilla/mozilla-1.0.1-r2.ebuild b/net-www/mozilla/mozilla-1.0.1-r2.ebuild
deleted file mode 100644
index ea946075496f..000000000000
--- a/net-www/mozilla/mozilla-1.0.1-r2.ebuild
+++ /dev/null
@@ -1,488 +0,0 @@
-# Copyright 1999-2002 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.0.1-r2.ebuild,v 1.3 2002/10/24 23:23:45 blizzy Exp $
-
-IUSE="mozxmlterm moznomail java mozp3p crypt ipv6 gtk2 mozinterfaceinfo ssl ldap mozaccess mozctl gnome mozsvg"
-
-# NOTE: to build without the mail and news component: export NO_MAIL="YES"
-inherit flag-o-matic gcc makeedit
-
-# Crashes on start when compiled with -fomit-frame-pointer
-filter-flags "-fomit-frame-pointer"
-
-EMVER="0.63.3"
-IPCVER="0.99.63"
-
-# handle _rc versions
-MY_PV1=${PV/_}
-MY_PV2=${MY_PV1/eta}
-S=${WORKDIR}/mozilla
-DESCRIPTION="The Mozilla Web Browser"
-SRC_URI="ftp://ftp.mozilla.org/pub/mozilla/releases/${PN}${MY_PV2}/src/${PN}-source-${MY_PV2}.tar.bz2
- crypt? ( http://enigmail.mozdev.org/dload/src/enigmail-${EMVER}.tar.gz
- http://enigmail.mozdev.org/dload/src/ipc-${IPCVER}.tar.gz )"
-HOMEPAGE="http://www.mozilla.org"
-
-KEYWORDS="x86 ppc sparc sparc64 alpha"
-SLOT="0"
-LICENSE="MPL-1.1 NPL-1.1"
-
-RDEPEND=">=x11-base/xfree-4.2.0-r11
- >=gnome-base/ORBit-0.5.10-r1
- >=sys-libs/zlib-1.1.4
- >=media-libs/jpeg-6b
- >=media-libs/libmng-1.0.0
- >=media-libs/libpng-1.2.1
- >=sys-apps/portage-2.0.14
- dev-libs/expat
- app-arch/zip
- app-arch/unzip
- ( gtk2? >=x11-libs/gtk+-2.0.5 :
- =x11-libs/gtk+-1.2* )
- ( gtk2? >=dev-libs/glib-2.0.4 :
- =dev-libs/glib-1.2* )
- java? ( virtual/jre )"
-
-DEPEND="${RDEPEND}
- virtual/x11
- sys-devel/perl
- java? ( >=dev-java/java-config-0.2.0 )"
-
-# needed by src_compile() and src_install()
-export MOZILLA_OFFICIAL=1
-export BUILD_OFFICIAL=1
-
-# enable XFT
-[ "${DISABLE_XFT}" != "1" ] && export MOZ_ENABLE_XFT=1
-
-# make sure the nss module gets build (for NSS support)
-[ -n "`use ssl`" ] && export MOZ_PSM=1
-
-# do we build java support for the NSS stuff ?
-# NOTE: this is broken for the moment
-#[ "`use java`" ] && export NS_USE_JDK=1
-
-
-src_unpack() {
-
- unpack ${A}
-
- cd ${S}
-
- # Fix a ownership porblem
- chown -R root.root *
-
- if [ "$(gcc-version)" != "2.95" ] ; then
- # Fix bogus asm (from Mandrake .spec)
- patch -p1 < ${FILESDIR}/mozilla-1.0-asmfixes.patch || die
-
- # ABI compat patch for gcc-3.x to use gcc-2.95 plugins
- #
- # http://bugzilla.mozilla.org/show_bug.cgi?id=154206
- # http://bugzilla.mozilla.org/show_bug.cgi?id=124006
- # http://bugzilla.mozilla.org/show_bug.cgi?id=116444
- #
- if [ "${ARCH}" = "x86" ] ; then
- patch -p0 < ${FILESDIR}/mozilla-1.0-abi-compat-wrappers.patch || die
- fi
-
- # ABI Patch for ppc/xpcom for gcc-3.x
- # http://bugzilla.mozilla.org/show_bug.cgi?id=142594
- if [ "${ARCH}" = "ppc" ] ; then
- patch -p0 < ${FILESDIR}/mozilla-1.0-abi-xpcom-ppc.patch || die
- fi
-
- # ABI Patch for alpha/xpcom for gcc-3.x
- if [ "${ARCH}" = "alpha" ] ; then
- patch -p1 < ${FILESDIR}/mozilla-alpha-xpcom-subs-fix.patch || die
- fi
-
- # ABI Patch for sparc and sparc64/xpcom for gcc-3.x
- if use sparc &>/dev/null || use sparc64 &>/dev/null
- then
- patch -p1 < ${FILESDIR}/mozilla-1.0.1-sparc-xpcom.patch || die
- fi
- fi
-
- # Apply the bytecode patch for freetype2
- patch -p1 < ${FILESDIR}/mozilla-ft-bytecode.patch || die
-
- # Some patches from Mandrake to fix various crashes. This
- # seems to fix the "crash on submit bug".
- patch -p1 < ${FILESDIR}/${P}-nsrange.patch || die
- patch -p1 < ${FILESDIR}/${P}-bidiselection.patch || die
- patch -p1 < ${FILESDIR}/${P}-referrer.patch || die
- patch -p1 < ${FILESDIR}/${P}-prefcrash.patch || die
- patch -p1 < ${FILESDIR}/${P}-xuldom.patch || die
-
- # A patch for mozilla to disregard the PLATFORM variable, which
- # can break compiles (has done for sparc64). See:
- # http://bugzilla.mozilla.org/show_bug.cgi?id=174143
- patch -p1 < ${FILESDIR}/${P}-platform.patch || die
-
- # Unpack the enigmail plugin
- if [ -n "`use crypt`" -a -z "`use moznomail`" ] && \
- [ "${NO_MAIL}" != "YES" -a "${NO_MAIL}" != "yes" ]
- then
- mv ${WORKDIR}/ipc ${S}/extensions/
- mv ${WORKDIR}/enigmail ${S}/extensions/
- fi
-
- # Fix bug #7656
- cd ${S}/other-licenses/Xft/Xrender
- ln -s /usr/X11R6/include/X11/extensions/Xext.h Xext.h
- ln -s /usr/X11R6/include/X11/extensions/renderproto.h renderproto.h
-}
-
-src_compile() {
-
- local myconf=""
- # NOTE: QT and XLIB toolkit seems very unstable, leave disabled until
- # tested ok -- azarah
- if [ -n "`use gtk2`" ] ; then
- myconf="${myconf} --enable-toolkit-gtk2 \
- --enable-default-toolkit=gtk2 \
- --disable-toolkit-qt \
- --disable-toolkit-xlib \
- --disable-toolkit-gtk"
- else
- myconf="${myconf} --enable-toolkit-gtk \
- --enable-default-toolkit=gtk \
- --disable-toolkit-qt \
- --disable-toolkit-xlib \
- --disable-toolkit-gtk2"
- fi
-
- if [ -z "`use ldap`" ] ; then
- myconf="${myconf} --disable-ldap"
- fi
-
- if [ -z "${DEBUG}" ] ; then
- myconf="${myconf} --enable-strip-libs \
- --disable-debug \
- --disable-tests"
-# Seems to be the cause of crashes on form submit
-# --disable-dtd-debug
- fi
-
- if [ -n "${MOZ_ENABLE_XFT}" ] ; then
- # Enable Xft (currently this is done via freetype2 for gtk1,
- # and libpangoXft for gtk2).
- myconf="${myconf} --enable-xft"
- fi
-
- if [ -n "`use ipv6`" ] ; then
- myconf="${myconf} --enable-ipv6"
- fi
-
-
- # NB!!: Due to the fact that the non default extensions do not always
- # compile properly, using them is considered unsupported, and
- # is just here for completeness. Please do not use if you
- # do not know what you are doing!
- #
- # The defaults are (as of 1.0rc1, according to configure (line ~10799)):
- # cookie wallet content-packs xml-rpc xmlextras help transformiix venkman inspector irc
- # Non-defaults are:
- # xmlterm access-builtin ctl p3p interfaceinfo
- local myext="default"
- if [ -n "`use mozxmlterm`" ] ; then
- myext="${myext},xmlterm"
- fi
- if [ -n "`use mozaccess-builtin`" ] ; then
- myext="${myext},access-builtin"
- fi
- if [ -n "`use mozctl`" ] ; then
- myext="${myext},ctl"
- fi
- if [ -n "`use mozp3p`" ] ; then
- myext="${myext},p3p"
- fi
- if [ -n "`use mozinterfaceinfo`" ] ; then
- myext="${myext},interfaceinfo"
- fi
-
- if [ -n "`use mozsvg`" ] ; then
- export MOZ_INTERNAL_LIBART_LGPL="1"
- myconf="${myconf} --enable-svg"
- else
- myconf="${myconf} --disable-svg"
- fi
-
- if [ -n "`use moznomail`" ] || \
- [ "${NO_MAIL}" = "YES" -o "${NO_MAIL}" = "yes" ]
- then
- myconf="${myconf} --disable-mailnews"
- fi
-
- export BUILD_MODULES=all
- export BUILD_OPT=1
-
- # Currently gcc-3.1.1 dont work well if we specify "-march"
- # and other optimizations for pentium4.
- if [ "$(gcc-major-version)" -eq "3" ] ; then
- export CFLAGS="${CFLAGS/pentium4/pentium3}"
- export CXXFLAGS="${CXXFLAGS/pentium4/pentium3}"
-
- # Enable us to use flash, etc plugins compiled with gcc-2.95.3
- if [ "${ARCH}" = "x86" ] ; then
- myconf="${myconf} --enable-old-abi-compat-wrappers"
- fi
- fi
-
- #This should enable parallel builds, I hope
- export MAKE="emake"
-
- # Get it to work without warnings on gcc3
- CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
-
- ./configure --prefix=/usr/lib/mozilla \
- --disable-pedantic \
- --enable-mathml \
- --without-system-nspr \
- --enable-nspr-autoconf \
- --with-system-zlib \
- --enable-xsl \
- --enable-crypto \
- --enable-detect-webshell-leaks \
- --enable-xinerama \
- --with-java-supplement \
- --with-pthreads \
- --with-extensions="${myext}" \
- --enable-optimize="-O2" \
- --with-default-mozilla-five-home=/usr/lib/mozilla \
- ${myconf} || die
-
- edit_makefiles
- make || die
-
- # Build the NSS/SSL support
- if [ "`use ssl`" ] ; then
- cd ${S}/security/coreconf
-
- # Fix #include problem
- cp headers.mk headers.mk.orig
- echo 'INCLUDES += -I$(DIST)/include/nspr -I$(DIST)/include/dbm'\
- >>headers.mk
-
- make || die
-
- cd ${S}/security/nss
-
- make moz_import || die
- make || die
- cd ${S}
- fi
-
- # Build the enigmail plugin
- if [ -n "`use crypt`" -a -z "`use moznomail`" ] && \
- [ "${NO_MAIL}" != "YES" -a "${NO_MAIL}" != "yes" ]
- then
- cd ${S}/extensions/ipc
- make || die
-
- cd ${S}/extensions/enigmail
- make || die
- fi
-}
-
-src_install() {
-
- # Install, don't create tarball
- dodir /usr/lib
- cd ${S}/xpinstall/packager
- einfo "Installing mozilla into build root..."
- make MOZ_PKG_FORMAT="raw" TAR_CREATE_FLAGS="-chf" > /dev/null || die
- mv -f ${S}/dist/mozilla ${D}/usr/lib/mozilla
-
- # Copy the include and idl files
- dodir /usr/lib/mozilla/include/idl /usr/include
- cd ${S}/dist
- cp -LfR include/* ${D}/usr/lib/mozilla/include
- cp -LfR idl/* ${D}/usr/lib/mozilla/include/idl
- dosym /usr/lib/mozilla/include /usr/include/mozilla
-
- # Install the development tools in /usr
- dodir /usr/bin
- mv ${D}/usr/lib/mozilla/{xpcshell,xpidl,xpt_dump,xpt_link} ${D}/usr/bin
-
- # Install the NSS/SSL libs, headers and tools
- if [ "`use ssl`" ] ; then
- # Install the headers ('make install' do not work for headers ...)
- insinto /usr/lib/mozilla/include/nss
- doins ${S}/dist/public/seccmd/*.h
- doins ${S}/dist/public/security/*.h
-
- cd ${S}/security/nss
-
- mkdir -p ${WORKDIR}/nss/{bin,lib}
- export BUILD_OPT=1
- export SOURCE_BIN_DIR=${WORKDIR}/nss/bin
- export SOURCE_LIB_DIR=${WORKDIR}/nss/lib
-
- make install || die
- # Gets installed as symbolic links ...
- cp -Lf ${WORKDIR}/nss/bin/* ${D}/usr/bin
- cp -Lf ${WORKDIR}/nss/lib/* ${D}/usr/lib/mozilla
-
- # Need to unset these incase we want to rebuild, else the build
- # gets newked.
- unset SOURCE_LIB_DIR
- unset SOURCE_BIN_DIR
- fi
-
- cd ${S}/build/unix
- # Fix mozilla-config and install it
- perl -pi -e "s:/lib/mozilla-${PV}::g" mozilla-config
- perl -pi -e "s:/mozilla-${PV}::g" mozilla-config
- exeinto /usr/lib/mozilla
- doexe mozilla-config
- # Fix pkgconfig files and install them
- insinto /usr/lib/pkgconfig
- for x in *.pc
- do
- if [ -f ${x} ]
- then
- perl -pi -e "s:/lib/mozilla-${PV}::g" ${x}
- perl -pi -e "s:/mozilla-${PV}::g" ${x}
- doins ${x}
- fi
- done
-
- cd ${S}
- exeinto /usr/bin
- newexe ${FILESDIR}/mozilla.sh mozilla
- insinto /etc/env.d
- doins ${FILESDIR}/10mozilla
- dodoc LEGAL LICENSE README/mozilla/README*
-
- # Fix icons to look the same everywhere
- insinto /usr/lib/mozilla/icons
- doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
- doins ${S}/build/package/rpm/SOURCES/mozicon50.xpm
-
- # Install icon and .desktop for menu entry
- if [ "`use gnome`" ] ; then
- insinto /usr/share/pixmaps
- doins ${S}/build/package/rpm/SOURCES/mozilla-icon.png
-
- # Fix comment of menu entry
- cd ${S}/build/package/rpm/SOURCES
- perl -pi -e 's:Comment=Mozilla:Comment=Mozilla Web Browser:' mozilla.desktop
- cd ${S}
- insinto /usr/share/gnome/apps/Internet
- doins ${S}/build/package/rpm/SOURCES/mozilla.desktop
- fi
-
- if [ -n "${MOZ_ENABLE_XFT}" ] ; then
- cd ${D}/usr/lib/mozilla/defaults/pref
- patch -p0 <${FILESDIR}/mozilla-xft-unix-prefs.patch || \
- die "failed unix prefs patch"
- fi
-
- # Take care of non root execution
- # (seems the problem is that not all files are readible by the user)
- chmod -R g+r,o+r ${D}/usr/lib/mozilla
-}
-
-pkg_preinst() {
- # Stale components and chrome files break when unmerging old
- if [ -d ${ROOT}/usr/lib/mozilla/components ] ; then
- rm -rf ${ROOT}/usr/lib/mozilla/components
- fi
- if [ -d ${ROOT}/usr/lib/mozilla/chrome ] ; then
- rm -rf ${ROOT}/usr/lib/mozilla/chrome
- fi
-
- # Remove stale component registry.
- if [ -e ${ROOT}/usr/lib/component.reg ] ; then
- rm -f ${ROOT}/usr/lib/component.reg
- fi
-}
-
-pkg_postinst() {
-
- export MOZILLA_FIVE_HOME="${ROOT}/usr/lib/mozilla"
-
- # Make symlink for Java plugin (do not do in src_install(), else it only
- # gets installed every second time)
- if [ "`use java`" -a ! -L ${MOZILLA_FIVE_HOME}/plugins/`java-config --browser-plugin=mozilla` ]
- then
- if [ -e `java-config --full-browser-plugin-path=mozilla` ]
- then
- ln -snf `java-config --full-browser-plugin-path=mozilla` \
- ${MOZILLA_FIVE_HOME}/plugins/`java-config --browser-plugin=mozilla`
- fi
- fi
-
- # We do not yet want any JAVA plugins with gcc-3.x, as they cause
- # mozilla to crash in some cases.
- if [ "$(gcc-version)" != "2.95" -a -n "`use java`" ] ; then
- if [ -L ${MOZILLA_FIVE_HOME}/plugins/`java-config --browser-plugin=mozilla` ] ; then
- rm -f ${MOZILLA_FIVE_HOME}/plugins/`java-config --browser-plugin=mozilla`
- fi
- fi
-
- # Take care of component registration
-
- # Remove any stale component.reg
- if [ -e ${MOZILLA_FIVE_HOME}/component.reg ] ; then
- rm -f ${MOZILLA_FIVE_HOME}/component.reg
- fi
-
- # Tempory fix for missing libtimer_gtk.so
- # If it exists when generating component.reg (before unmerge of old),
- # it 'corrupts' the newly generated component.reg with invalid references.
- if [ -e ${MOZILLA_FIVE_HOME}/components/libtimer_gtk.so ] ; then
- rm -f ${MOZILLA_FIVE_HOME}/components/libtimer_gtk.so
- fi
-
- # Needed to update the run time bindings for REGXPCOM
- # (do not remove next line!)
- env-update
- # Register components, setup Chrome .rdf files and fix file permissions
- einfo "Registering Components and Chrome..."
- umask 022
- ${MOZILLA_FIVE_HOME}/regxpcom
- if [ -e ${MOZILLA_FIVE_HOME}/component.reg ] ; then
- chmod g+r,o+r ${MOZILLA_FIVE_HOME}/component.reg
- fi
- # Setup the default skin and locale to correctly generate the Chrome .rdf files
- find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec rm -f {} \; || :
- echo "skin,install,select,classic/1.0" >> \
- ${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt
- echo "locale,install,select,en-US" >> \
- ${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt
- ${MOZILLA_FIVE_HOME}/regchrome
- find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 755 {} \; || :
-
-
- echo
- ewarn "Please unmerge old versions of mozilla, as the header"
- ewarn "layout in /usr/lib/mozilla/include have changed and will"
- ewarn "result in compile errors when compiling programs that need"
- ewarn "mozilla headers and libs (galeon, nautilus, ...)"
-}
-
-pkg_postrm() {
-
- # Regenerate component.reg in case some things changed
- if [ -e ${ROOT}/usr/lib/mozilla/regxpcom ] ; then
-
- export MOZILLA_FIVE_HOME="${ROOT}/usr/lib/mozilla"
-
- if [ -e ${MOZILLA_FIVE_HOME}/component.reg ] ; then
- rm -f ${MOZILLA_FIVE_HOME}/component.reg
- fi
-
- ${MOZILLA_FIVE_HOME}/regxpcom
- if [ -e ${MOZILLA_FIVE_HOME}/component.reg ] ; then
- chmod g+r,o+r ${MOZILLA_FIVE_HOME}/component.reg
- fi
-
- find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec rm -f {} \; || :
- ${MOZILLA_FIVE_HOME}/regchrome
- find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 755 {} \; || :
- fi
-}
-
diff --git a/net-www/mozilla/mozilla-1.0.1-r3.ebuild b/net-www/mozilla/mozilla-1.0.1-r3.ebuild
index 3d029c0d26c0..c7a5e07e04b7 100644
--- a/net-www/mozilla/mozilla-1.0.1-r3.ebuild
+++ b/net-www/mozilla/mozilla-1.0.1-r3.ebuild
@@ -1,15 +1,37 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.0.1-r3.ebuild,v 1.2 2002/11/18 20:16:00 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.0.1-r3.ebuild,v 1.3 2002/11/20 15:10:42 azarah Exp $
IUSE="mozxmlterm moznomail java mozp3p crypt ipv6 gtk2 mozinterfaceinfo ssl ldap mozaccess mozctl gnome mozsvg"
# NOTE: to build without the mail and news component: export NO_MAIL="YES"
-inherit flag-o-matic gcc makeedit eutils
+inherit flag-o-matic gcc makeedit eutils nsplugins
# Crashes on start when compiled with -fomit-frame-pointer
filter-flags "-fomit-frame-pointer"
+# Recently there has been a lot of stability problem in Gentoo-land. Many
+# things can be the cause to this, but I believe that it is due to gcc3
+# still having issues with optimizations, or with it not filtering bad
+# combinations (protecting the user maybe from himeself) yet.
+#
+# This can clearly be seen in large builds like glibc, where too aggressive
+# CFLAGS cause the tests to fail miserbly.
+#
+# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
+# knows what he is talking about:
+#
+# People really shouldn't force code-specific options on... It's a
+# bad idea. The -march options aren't just to look pretty. They enable
+# options that are sensible (and include sse,mmx,3dnow when apropriate).
+#
+# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
+# you do not like it, comment it, but do not bugreport if you run into
+# problems.
+#
+# <azarah@gentoo.org> (13 Oct 2002)
+strip-flags
+
EMVER="0.63.3"
IPCVER="0.99.63"
@@ -354,6 +376,9 @@ src_install() {
doins ${FILESDIR}/10mozilla
dodoc LEGAL LICENSE README/mozilla/README*
+ # Move plugins dir
+ src_mv_plugins usr/lib/mozilla/plugins
+
# Fix icons to look the same everywhere
insinto /usr/lib/mozilla/icons
doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
@@ -395,6 +420,9 @@ pkg_preinst() {
if [ -e ${ROOT}/usr/lib/component.reg ] ; then
rm -f ${ROOT}/usr/lib/component.reg
fi
+
+ # Move old plugins dir
+ pkg_mv_plugins /usr/lib/mozilla/plugins
}
pkg_postinst() {
diff --git a/net-www/mozilla/mozilla-1.1-r1.ebuild b/net-www/mozilla/mozilla-1.1-r1.ebuild
index 7a575b5b804e..cd1bc4636c1b 100644
--- a/net-www/mozilla/mozilla-1.1-r1.ebuild
+++ b/net-www/mozilla/mozilla-1.1-r1.ebuild
@@ -1,11 +1,33 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.1-r1.ebuild,v 1.10 2002/10/24 23:23:45 blizzy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.1-r1.ebuild,v 1.11 2002/11/20 15:10:42 azarah Exp $
IUSE="moznomail java mozp3p crypt ldap gtk2 mozinterfaceinfo ssl mozaccess mozxmlterm mozctl gnome mozsvg"
# NOTE: to build without the mail and news component: export NO_MAIL="YES"
-inherit makeedit
+inherit makeedit nsplugins
+
+# Recently there has been a lot of stability problem in Gentoo-land. Many
+# things can be the cause to this, but I believe that it is due to gcc3
+# still having issues with optimizations, or with it not filtering bad
+# combinations (protecting the user maybe from himeself) yet.
+#
+# This can clearly be seen in large builds like glibc, where too aggressive
+# CFLAGS cause the tests to fail miserbly.
+#
+# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
+# knows what he is talking about:
+#
+# People really shouldn't force code-specific options on... It's a
+# bad idea. The -march options aren't just to look pretty. They enable
+# options that are sensible (and include sse,mmx,3dnow when apropriate).
+#
+# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
+# you do not like it, comment it, but do not bugreport if you run into
+# problems.
+#
+# <azarah@gentoo.org> (13 Oct 2002)
+strip-flags
EMVER="0.65.2"
IPCVER="1.0.0.1"
@@ -322,6 +344,9 @@ src_install() {
doins ${FILESDIR}/10mozilla
dodoc LEGAL LICENSE README/mozilla/README*
+ # Move plugins dir
+ src_mv_plugins usr/lib/mozilla/plugins
+
# Fix icons to look the same everywhere
insinto /usr/lib/mozilla/icons
doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
@@ -366,6 +391,16 @@ pkg_preinst() {
if [ -e ${ROOT}/usr/lib/component.reg ] ; then
rm -f ${ROOT}/usr/lib/component.reg
fi
+
+ # Move old plugins dir
+ if [ -d ${ROOT}/usr/lib/mozilla/plugins ] ; then
+ mkdir -p ${ROOT}/usr/lib/${PLUGIN_DIR}
+ cp -a ${ROOT}/usr/lib/mozilla/plugins/* ${ROOT}/usr/lib/${PLUGIN_DIR}
+ rm -rf ${ROOT}/usr/lib/mozilla/plugins
+ fi
+
+ # Move old plugins dir
+ pkg_mv_plugins /usr/lib/mozilla/plugins
}
pkg_postinst() {
diff --git a/net-www/mozilla/mozilla-1.2_beta.ebuild b/net-www/mozilla/mozilla-1.2_beta.ebuild
index 910c66cfe4d8..ca2b080d85d2 100644
--- a/net-www/mozilla/mozilla-1.2_beta.ebuild
+++ b/net-www/mozilla/mozilla-1.2_beta.ebuild
@@ -1,15 +1,37 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.2_beta.ebuild,v 1.4 2002/11/19 19:15:22 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla/mozilla-1.2_beta.ebuild,v 1.5 2002/11/20 15:10:42 azarah Exp $
IUSE="mozxmlterm moznomail java mozp3p crypt ipv6 gtk2 mozinterfaceinfo ssl ldap mozaccess mozctl gnome mozsvg"
# NOTE: to build without the mail and news component: export NO_MAIL="YES"
-inherit flag-o-matic gcc makeedit eutils
+inherit flag-o-matic gcc makeedit eutils nsplugins
# Crashes on start when compiled with -fomit-frame-pointer
filter-flags "-fomit-frame-pointer"
+# Recently there has been a lot of stability problem in Gentoo-land. Many
+# things can be the cause to this, but I believe that it is due to gcc3
+# still having issues with optimizations, or with it not filtering bad
+# combinations (protecting the user maybe from himeself) yet.
+#
+# This can clearly be seen in large builds like glibc, where too aggressive
+# CFLAGS cause the tests to fail miserbly.
+#
+# Quote from Nick Jones <carpaski@gentoo.org>, who in my opinion
+# knows what he is talking about:
+#
+# People really shouldn't force code-specific options on... It's a
+# bad idea. The -march options aren't just to look pretty. They enable
+# options that are sensible (and include sse,mmx,3dnow when apropriate).
+#
+# The next command strips CFLAGS and CXXFLAGS from nearly all flags. If
+# you do not like it, comment it, but do not bugreport if you run into
+# problems.
+#
+# <azarah@gentoo.org> (13 Oct 2002)
+strip-flags
+
EMVER="0.70.0"
IPCVER="1.0.1"
@@ -416,6 +438,9 @@ src_install() {
doins ${FILESDIR}/10mozilla
dodoc LEGAL LICENSE README/mozilla/README*
+ # Move plugins dir
+ src_mv_plugins usr/lib/mozilla/plugins
+
# Fix icons to look the same everywhere
insinto /usr/lib/mozilla/icons
doins ${S}/build/package/rpm/SOURCES/mozicon16.xpm
@@ -453,6 +478,9 @@ pkg_preinst() {
if [ -e ${ROOT}/usr/lib/component.reg ] ; then
rm -f ${ROOT}/usr/lib/component.reg
fi
+
+ # Move old plugins dir
+ pkg_mv_plugins /usr/lib/mozilla/plugins
}
pkg_postinst() {