rpms/xulrunner/OLPC-2 add-gecko-provides.in, NONE, 1.1 camellia256.patch, NONE, 1.1 find-external-requires, NONE, 1.1 firefox-0.7.3-psfonts.patch, 1.2, 1.3 firefox-1.1-uriloader.patch, NONE, 1.1 firefox-2.0-link-layout.patch, NONE, 1.1 firefox-2.0.0.4-undo-uriloader.patch, NONE, 1.1 mozilla-build.patch, NONE, 1.1 mozilla-firefox-head.ppc64.patch, NONE, 1.1 mozilla-gtkmozembed.patch, NONE, 1.1 mozilla-sqlite-build.patch, NONE, 1.1 mozilla-xulrunner-pkgconfig.patch, NONE, 1.1 xulrunner-compile.patch, NONE, 1.1 xulrunner-redhat-default-prefs.js, NONE, 1.1 xulrunner.1, NONE, 1.1 .cvsignore, 1.8, 1.9 sources, 1.10, 1.11 xulrunner-1.9a6-no-native-theme.patch, 1.3, 1.4 xulrunner-mozconfig, 1.5, 1.6 xulrunner.spec, 1.35, 1.36

Marco Pesenti Gritti (mpg) fedora-extras-commits at redhat.com
Wed Nov 21 16:25:32 UTC 2007


Author: mpg

Update of /cvs/pkgs/rpms/xulrunner/OLPC-2
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5366

Modified Files:
	.cvsignore sources xulrunner-1.9a6-no-native-theme.patch 
	xulrunner-mozconfig xulrunner.spec 
Added Files:
	add-gecko-provides.in camellia256.patch find-external-requires 
	firefox-0.7.3-psfonts.patch firefox-1.1-uriloader.patch 
	firefox-2.0-link-layout.patch 
	firefox-2.0.0.4-undo-uriloader.patch mozilla-build.patch 
	mozilla-firefox-head.ppc64.patch mozilla-gtkmozembed.patch 
	mozilla-sqlite-build.patch mozilla-xulrunner-pkgconfig.patch 
	xulrunner-compile.patch xulrunner-redhat-default-prefs.js 
	xulrunner.1 
Log Message:
* Wed Nov 21 2007 Marco Pesenti Gritti <marco at localhost.localdomain> - 1.9-0.beta1.1
- Resync with devel




--- NEW FILE add-gecko-provides.in ---
#!/bin/sh
#
# Use the internal provides generator"
#
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
provides=`echo $filelist | /usr/lib/rpm/find-provides`
echo $provides

#
# Now output the stuff we want to add
#
core_files=`echo $filelist | grep "libxpcom\.so" | wc -l`
devel_files=`echo $filelist | grep "firefox\-xpcom\.pc" | wc -l`
debug_files=`echo $filelist | grep "libxpcom\.so\.debug" | wc -l`
if [ $debug_files -eq 0 ]; then
  if [ $devel_files -gt 0 ]; then
    echo "gecko-devel = @GECKO_VERSION@"
  elif [ $core_files -gt 0 ]; then
    echo "gecko-libs = @GECKO_VERSION@"
  fi
fi

camellia256.patch:

--- NEW FILE camellia256.patch ---
Temporarily revert https://bugzilla.mozilla.org/attachment.cgi?id=266361

Index: mozilla/security/manager/ssl/src/nsNSSComponent.cpp
===================================================================
RCS file: /cvsroot/mozilla/security/manager/ssl/src/nsNSSComponent.cpp,v
retrieving revision 1.147
diff -u -8 -p -r1.147 nsNSSComponent.cpp
--- mozilla/security/manager/ssl/src/nsNSSComponent.cpp	14 May 2007 21:09:58 -0000	1.147
+++ mozilla/security/manager/ssl/src/nsNSSComponent.cpp	28 May 2007 09:51:50 -0000
@@ -902,16 +902,19 @@ static CipherPref CipherPrefs[] = {
  {"security.ssl3.rsa_des_ede3_sha", SSL_RSA_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with RSA and a SHA1 MAC
  {"security.ssl3.rsa_fips_des_sha", SSL_RSA_FIPS_WITH_DES_CBC_SHA}, // 56-bit DES encryption with RSA and a SHA1 MAC (FIPS)
  {"security.ssl3.rsa_des_sha", SSL_RSA_WITH_DES_CBC_SHA}, // 56-bit DES encryption with RSA and a SHA1 MAC
  {"security.ssl3.rsa_1024_rc4_56_sha", TLS_RSA_EXPORT1024_WITH_RC4_56_SHA}, // 56-bit RC4 encryption with RSA and a SHA1 MAC (export)
  {"security.ssl3.rsa_1024_des_cbc_sha", TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA}, // 56-bit DES encryption with RSA and a SHA1 MAC (export)
  {"security.ssl3.rsa_rc4_40_md5", SSL_RSA_EXPORT_WITH_RC4_40_MD5}, // 40-bit RC4 encryption with RSA and an MD5 MAC (export)
  {"security.ssl3.rsa_rc2_40_md5", SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5}, // 40-bit RC2 encryption with RSA and an MD5 MAC (export)
  /* Extra SSL3/TLS cipher suites */
+ {"security.ssl3.dhe_rsa_camellia_256_sha", TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA}, // 256-bit Camellia encryption with RSA, DHE, and a SHA1 MAC
+ {"security.ssl3.dhe_dss_camellia_256_sha", TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA}, // 256-bit Camellia encryption with DSA, DHE, and a SHA1 MAC
+ {"security.ssl3.rsa_camellia_256_sha", TLS_RSA_WITH_CAMELLIA_256_CBC_SHA}, // 256-bit Camellia encryption with RSA and a SHA1 MAC
  {"security.ssl3.dhe_rsa_aes_256_sha", TLS_DHE_RSA_WITH_AES_256_CBC_SHA}, // 256-bit AES encryption with RSA, DHE, and a SHA1 MAC
  {"security.ssl3.dhe_dss_aes_256_sha", TLS_DHE_DSS_WITH_AES_256_CBC_SHA}, // 256-bit AES encryption with DSA, DHE, and a SHA1 MAC
  {"security.ssl3.rsa_aes_256_sha", TLS_RSA_WITH_AES_256_CBC_SHA}, // 256-bit AES encryption with RSA and a SHA1 MAC
    /* TLS_DHE_DSS_WITH_RC4_128_SHA // 128-bit RC4 encryption with DSA, DHE, and a SHA1 MAC
       If this cipher gets included at a later time, it should get added at this position */
  {"security.ssl3.ecdhe_ecdsa_aes_256_sha", TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA}, // 256-bit AES encryption with ECDHE-ECDSA and a SHA1 MAC
  {"security.ssl3.ecdhe_ecdsa_aes_128_sha", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with ECDHE-ECDSA and a SHA1 MAC
  {"security.ssl3.ecdhe_ecdsa_des_ede3_sha", TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with ECDHE-ECDSA and a SHA1 MAC
@@ -927,16 +930,19 @@ static CipherPref CipherPrefs[] = {
  {"security.ssl3.ecdh_ecdsa_des_ede3_sha", TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with ECDH-ECDSA and a SHA1 MAC
  {"security.ssl3.ecdh_ecdsa_rc4_128_sha", TLS_ECDH_ECDSA_WITH_RC4_128_SHA}, // 128-bit RC4 encryption with ECDH-ECDSA and a SHA1 MAC
  {"security.ssl3.ecdh_ecdsa_null_sha", TLS_ECDH_ECDSA_WITH_NULL_SHA}, // No encryption with ECDH-ECDSA and a SHA1 MAC
  {"security.ssl3.ecdh_rsa_aes_256_sha", TLS_ECDH_RSA_WITH_AES_256_CBC_SHA}, // 256-bit AES encryption with ECDH-RSA and a SHA1 MAC
  {"security.ssl3.ecdh_rsa_aes_128_sha", TLS_ECDH_RSA_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with ECDH-RSA and a SHA1 MAC
  {"security.ssl3.ecdh_rsa_des_ede3_sha", TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with ECDH-RSA and a SHA1 MAC
  {"security.ssl3.ecdh_rsa_rc4_128_sha", TLS_ECDH_RSA_WITH_RC4_128_SHA}, // 128-bit RC4 encryption with ECDH-RSA and a SHA1 MAC
  {"security.ssl3.ecdh_rsa_null_sha", TLS_ECDH_RSA_WITH_NULL_SHA}, // No encryption with ECDH-RSA and a SHA1 MAC
+ {"security.ssl3.dhe_rsa_camellia_128_sha", TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA}, // 128-bit Camellia encryption with RSA, DHE, and a SHA1 MAC
+ {"security.ssl3.dhe_dss_camellia_128_sha", TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA}, // 128-bit Camellia encryption with DSA, DHE, and a SHA1 MAC
+ {"security.ssl3.rsa_camellia_128_sha", TLS_RSA_WITH_CAMELLIA_128_CBC_SHA}, // 128-bit Camellia encryption with RSA and a SHA1 MAC
  {"security.ssl3.dhe_rsa_aes_128_sha", TLS_DHE_RSA_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with RSA, DHE, and a SHA1 MAC
  {"security.ssl3.dhe_dss_aes_128_sha", TLS_DHE_DSS_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with DSA, DHE, and a SHA1 MAC
  {"security.ssl3.rsa_aes_128_sha", TLS_RSA_WITH_AES_128_CBC_SHA}, // 128-bit AES encryption with RSA and a SHA1 MAC
  {"security.ssl3.dhe_rsa_des_ede3_sha", SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with RSA, DHE, and a SHA1 MAC
  {"security.ssl3.dhe_dss_des_ede3_sha", SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA}, // 168-bit Triple DES with DSA, DHE, and a SHA1 MAC
  {"security.ssl3.dhe_rsa_des_sha", SSL_DHE_RSA_WITH_DES_CBC_SHA}, // 56-bit DES encryption with RSA, DHE, and a SHA1 MAC
  {"security.ssl3.dhe_dss_des_sha", SSL_DHE_DSS_WITH_DES_CBC_SHA}, // 56-bit DES encryption with DSA, DHE, and a SHA1 MAC
  {"security.ssl3.rsa_null_sha", SSL_RSA_WITH_NULL_SHA}, // No encryption with RSA authentication and a SHA1 MAC
Index: mozilla/netwerk/base/public/security-prefs.js
===================================================================
RCS file: /cvsroot/mozilla/netwerk/base/public/security-prefs.js,v
retrieving revision 1.15
diff -u -8 -p -r1.15 security-prefs.js
--- mozilla/netwerk/base/public/security-prefs.js	16 May 2006 00:33:43 -0000	1.15
+++ mozilla/netwerk/base/public/security-prefs.js	28 May 2007 09:52:49 -0000
@@ -15,16 +15,22 @@ pref("security.ssl3.rsa_rc4_128_sha", tr
 pref("security.ssl3.rsa_fips_des_ede3_sha", true);
 pref("security.ssl3.rsa_des_ede3_sha", true);
 pref("security.ssl3.rsa_fips_des_sha", false);
 pref("security.ssl3.rsa_des_sha", false);
 pref("security.ssl3.rsa_1024_rc4_56_sha", false);
 pref("security.ssl3.rsa_1024_des_cbc_sha", false);
 pref("security.ssl3.rsa_rc4_40_md5", false);
 pref("security.ssl3.rsa_rc2_40_md5", false);
+pref("security.ssl3.dhe_rsa_camellia_256_sha", true);
+pref("security.ssl3.dhe_dss_camellia_256_sha", true);
+pref("security.ssl3.rsa_camellia_256_sha", true);
+pref("security.ssl3.dhe_rsa_camellia_128_sha", true);
+pref("security.ssl3.dhe_dss_camellia_128_sha", true);
+pref("security.ssl3.rsa_camellia_128_sha", true);
 pref("security.ssl3.dhe_rsa_aes_256_sha", true);
 pref("security.ssl3.dhe_dss_aes_256_sha", true);
 pref("security.ssl3.rsa_aes_256_sha", true);
 pref("security.ssl3.ecdhe_ecdsa_aes_256_sha", true);
 pref("security.ssl3.ecdhe_ecdsa_aes_128_sha", true);
 pref("security.ssl3.ecdhe_ecdsa_des_ede3_sha", true);
 pref("security.ssl3.ecdhe_ecdsa_rc4_128_sha", true);
 pref("security.ssl3.ecdhe_ecdsa_null_sha", false);



--- NEW FILE find-external-requires ---
#!/bin/sh

# Finds requirements provided outside of the current file set

filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`

provides=`echo $filelist | /usr/lib/rpm/find-provides`

{
for f in $filelist ; do
	echo $f | /usr/lib/rpm/find-requires | while read req ; do
		found=0
		for p in $provides ; do
			if [ "$req" = "$p" ]; then
				found=1
			fi
		done
		if [ "$found" = "0" ]; then
			echo $req
		fi
	done
done
} | sort -u
firefox-0.7.3-psfonts.patch:

Index: firefox-0.7.3-psfonts.patch
===================================================================
RCS file: firefox-0.7.3-psfonts.patch
diff -N firefox-0.7.3-psfonts.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ firefox-0.7.3-psfonts.patch	21 Nov 2007 16:25:29 -0000	1.3
@@ -0,0 +1,28 @@
+--- mozilla/modules/libpref/src/init/all.js.foo	2004-06-18 13:16:32.000000000 -0400
++++ mozilla/modules/libpref/src/init/all.js	2004-06-18 13:17:28.000000000 -0400
+@@ -1776,8 +1776,10 @@
+ pref("print.postscript.nativefont.ar",             "");
+ pref("print.postscript.nativefont.el",             "");
+ pref("print.postscript.nativefont.he",             "");
+-pref("print.postscript.nativefont.ja",             "");
+-pref("print.postscript.nativefont.ko",             "");
++pref("print.postscript.nativecode.ja",             "euc-jp");
++pref("print.postscript.nativefont.ja",             "Ryumin-Light-EUC-H");
++pref("print.postscript.nativecode.ko",             "euc-kr");
++pref("print.postscript.nativefont.ko",             "Baekmuk-Gulim-KSC-EUC-H");
+ pref("print.postscript.nativefont.th",             "");
+ pref("print.postscript.nativefont.tr",             "");
+ pref("print.postscript.nativefont.x-baltic",       "");
+@@ -1786,8 +1788,10 @@
+ pref("print.postscript.nativefont.x-unicode",      "");
+ pref("print.postscript.nativefont.x-user-def",     "");
+ pref("print.postscript.nativefont.x-western",      "");
+-pref("print.postscript.nativefont.zh-CN",          "");
+-pref("print.postscript.nativefont.zh-TW",          "");
++pref("print.postscript.nativecode.zh-CN", "gb18030");
++pref("print.postscript.nativefont.zh-CN", "MSungGBK-Light-GBK2K-H");
++pref("print.postscript.nativecode.zh-TW", "big5");
++pref("print.postscript.nativefont.zh-TW", "ShanHeiSun-Light-B5-H");
+ pref("print.postscript.nativefont.zh-HK",          "");
+ 
+ # XP_UNIX

firefox-1.1-uriloader.patch:

--- NEW FILE firefox-1.1-uriloader.patch ---
Index: uriloader/exthandler/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/Makefile.in,v
retrieving revision 1.60
diff -d -u -p -r1.60 Makefile.in
--- uriloader/exthandler/Makefile.in	2 May 2005 16:30:03 -0000	1.60
+++ uriloader/exthandler/Makefile.in	21 Jul 2005 03:07:39 -0000
@@ -102,7 +102,7 @@ endif
 LOCAL_INCLUDES = -I$(srcdir)
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
-OSHELPER	+= nsGNOMERegistry.cpp
+OSHELPER	+= nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
Index: uriloader/exthandler/unix/nsGNOMERegistry.cpp
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp,v
retrieving revision 1.10
diff -d -u -p -r1.10 nsGNOMERegistry.cpp
--- uriloader/exthandler/unix/nsGNOMERegistry.cpp	16 Oct 2004 13:46:17 -0000	1.10
+++ uriloader/exthandler/unix/nsGNOMERegistry.cpp	21 Jul 2005 03:07:40 -0000
@@ -42,7 +42,7 @@
 #include "nsString.h"
 #include "nsIComponentManager.h"
 #include "nsILocalFile.h"
-#include "nsMIMEInfoImpl.h"
+#include "nsMIMEInfoUnix.h"
 #include "nsAutoPtr.h"
 
 #include <glib.h>
@@ -56,12 +56,12 @@ typedef struct _GConfClient GConfClient;
 typedef struct _GnomeProgram GnomeProgram;
 typedef struct _GnomeModuleInfo GnomeModuleInfo;
 
-typedef struct {
+struct GnomeVFSMimeApplication {
   char *id;
   char *name;
   char *command;
   /* there is more here, but we don't need it */
-} GnomeVFSMimeApplication;
+};
 
 typedef GConfClient * (*_gconf_client_get_default_fn)();
 typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *,
@@ -264,7 +264,7 @@ nsGNOMERegistry::GetAppDescForScheme(con
 }
 
 
-/* static */ already_AddRefed<nsMIMEInfoBase>
+/* static */ already_AddRefed<nsMIMEInfoUnix>
 nsGNOMERegistry::GetFromExtension(const char *aFileExt)
 {
   if (!gconfLib)
@@ -286,7 +286,7 @@ nsGNOMERegistry::GetFromExtension(const 
   return GetFromType(mimeType);
 }
 
-/* static */ already_AddRefed<nsMIMEInfoBase>
+/* static */ already_AddRefed<nsMIMEInfoUnix>
 nsGNOMERegistry::GetFromType(const char *aMIMEType)
 {
   if (!gconfLib)
@@ -296,9 +296,11 @@ nsGNOMERegistry::GetFromType(const char 
   if (!handlerApp)
     return nsnull;
 
-  nsRefPtr<nsMIMEInfoImpl> mimeInfo = new nsMIMEInfoImpl(aMIMEType);
+  nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(aMIMEType);
   NS_ENSURE_TRUE(mimeInfo, nsnull);
 
+  mimeInfo->SetDefaultGnomeVFSMimeApplication(handlerApp);
+
   // Get the list of extensions and append then to the mimeInfo.
   GList *extensions = _gnome_vfs_mime_get_extensions_list(aMIMEType);
   for (GList *extension = extensions; extension; extension = extension->next)
@@ -320,11 +322,21 @@ nsGNOMERegistry::GetFromType(const char 
     return nsnull;
   }
 
-  gchar *commandPath = g_find_program_in_path(nativeCommand);
+  gchar **argv;
+  gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL);
+  if (!res) {
+    NS_ERROR("Could not convert helper app command to filesystem encoding");
+    _gnome_vfs_mime_application_free(handlerApp);
+    return nsnull;
+  }
+
+  gchar *commandPath = g_find_program_in_path(argv[0]);
 
   g_free(nativeCommand);
+  g_strfreev(argv);
 
   if (!commandPath) {
+    NS_WARNING("could not find command in path");
     _gnome_vfs_mime_application_free(handlerApp);
     return nsnull;
   }
@@ -342,7 +354,7 @@ nsGNOMERegistry::GetFromType(const char 
 
   _gnome_vfs_mime_application_free(handlerApp);
 
-  nsMIMEInfoBase* retval;
+  nsMIMEInfoUnix* retval;
   NS_ADDREF((retval = mimeInfo));
   return retval;
 }
Index: uriloader/exthandler/unix/nsGNOMERegistry.h
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.h,v
retrieving revision 1.3
diff -d -u -p -r1.3 nsGNOMERegistry.h
--- uriloader/exthandler/unix/nsGNOMERegistry.h	16 Oct 2004 13:46:17 -0000	1.3
+++ uriloader/exthandler/unix/nsGNOMERegistry.h	21 Jul 2005 03:07:40 -0000
@@ -35,10 +35,13 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
+#ifndef nsGNOMERegistry_h__
+#define nsGNOMERegistry_h__
+
 #include "nsIURI.h"
 #include "nsCOMPtr.h"
 
-class nsMIMEInfoBase;
+class nsMIMEInfoUnix;
 
 class nsGNOMERegistry
 {
@@ -52,7 +55,9 @@ class nsGNOMERegistry
   static void GetAppDescForScheme(const nsACString& aScheme,
                                   nsAString& aDesc);
 
-  static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const char *aFileExt);
+  static already_AddRefed<nsMIMEInfoUnix> GetFromExtension(const char *aFileExt);
 
-  static already_AddRefed<nsMIMEInfoBase> GetFromType(const char *aMIMEType);
+  static already_AddRefed<nsMIMEInfoUnix> GetFromType(const char *aMIMEType);
 };
+
+#endif // nsGNOMERegistry_h__
Index: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
===================================================================
RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp	21 Jul 2005 03:07:40 -0000
@@ -0,0 +1,196 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org Code.
+ *
+ * The Initial Developer of the Original Code is
+ * Red Hat, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Christopher Aillon <caillon at redhat.com> (Original author)
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsMIMEInfoUnix.h"
+#include "prlink.h"
+#include "prmem.h"
+#include <glib.h>
+#include <glib-object.h>
+
+static PRLibrary *gnomeLib;
+static PRLibrary *vfsLib;
+
+typedef struct _GnomeProgram GnomeProgram;
+typedef struct _GnomeModuleInfo GnomeModuleInfo;
+
+typedef enum {
+  GNOME_VFS_OK // there's more but we don't care about them.
+} GnomeVFSResult;
+
+typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn)
+                              (GnomeVFSMimeApplication *app,
+                               GList *uris);
+typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *);
+typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *);
+typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
+						 const GnomeModuleInfo *, int,
+						 char **, const char *, ...);
+typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *);
+typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)();
+typedef GnomeProgram * (*_gnome_program_get_fn)();
+typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *);
+
+#define DECL_FUNC_PTR(func) static _##func##_fn _##func
+
+DECL_FUNC_PTR(gnome_vfs_mime_application_launch);
+DECL_FUNC_PTR(gnome_vfs_mime_application_free);
+DECL_FUNC_PTR(gnome_vfs_mime_application_copy);
+DECL_FUNC_PTR(gnome_vfs_mime_application_get_name);
+DECL_FUNC_PTR(gnome_program_init);
+DECL_FUNC_PTR(gnome_program_get);
+DECL_FUNC_PTR(libgnome_module_info_get);
+DECL_FUNC_PTR(gnome_vfs_make_uri_from_input);
+
+static PRLibrary *
+LoadVersionedLibrary(const char* libName, const char* libVersion)
+{
+  char *platformLibName = PR_GetLibraryName(nsnull, libName);
+  nsCAutoString versionLibName(platformLibName);
+  versionLibName.Append(libVersion);
+  PR_Free(platformLibName);
+  return PR_LoadLibrary(versionLibName.get());
+}
+
+static void
+Cleanup()
+{
+  // Unload all libraries
+  if (gnomeLib)
+    PR_UnloadLibrary(gnomeLib);
+  if (vfsLib)
+    PR_UnloadLibrary(vfsLib);
+
+  gnomeLib = vfsLib = nsnull;
+}
+
+static void
+InitGnomeVFS()
+{
+  static PRBool initialized = PR_FALSE;
+
+  if (initialized)
+    return;
+
+  #define ENSURE_LIB(lib) \
+    PR_BEGIN_MACRO \
+    if (!lib) { \
+      Cleanup(); \
+      return; \
+    } \
+    PR_END_MACRO
+
+  #define GET_LIB_FUNCTION(lib, func, failure) \
+    PR_BEGIN_MACRO \
+    _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \
+    if (!_##func) { \
+      failure; \
+    } \
+    PR_END_MACRO
+
+  // Attempt to open libgnome
+  gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
+  ENSURE_LIB(gnomeLib);
+
+  GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup());
+  GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup());
+  GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup());
+
+  // Attempt to open libgnomevfs
+  vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
+  ENSURE_LIB(vfsLib);
+
+  GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */);
+  GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup());
+  GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup());
+  GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup());
+  GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup());
+
+  // Initialize GNOME, if it's not already initialized.  It's not
+  // necessary to tell GNOME about our actual command line arguments.
+
+  if (!_gnome_program_get()) {
+    char *argv[1] = { "gecko" };
+    _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
+                        1, argv, NULL);
+  }
+
+  // Note: after GNOME has been initialized, do not ever unload these
+  // libraries.  They register atexit handlers, so if they are unloaded, we'll
+  // crash on exit.  
+}
+
+void
+nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app)
+{
+  if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) {
+    mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app);
+
+    mPreferredAction = nsIMIMEInfo::useSystemDefault;
+
+    const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication);
+    if (name) 
+      mDefaultAppDescription = NS_ConvertUTF8toUTF16(name);
+  }
+}
+
+nsMIMEInfoUnix::~nsMIMEInfoUnix()
+{
+  if (mDefaultVFSApplication)
+    _gnome_vfs_mime_application_free(mDefaultVFSApplication);
+}
+
+nsresult
+nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile)
+{
+  NS_ENSURE_ARG_POINTER(aFile);
+
+  InitGnomeVFS();
+
+  if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) {
+    nsCAutoString nativePath;
+    aFile->GetNativePath(nativePath);
+
+    gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get());
+
+    GList *uris = NULL;
+    uris = g_list_append(uris, uri);
+
+    GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris);
+
+    g_free(uri);
+    g_list_free(uris);
+
+    if (result != GNOME_VFS_OK)
+      return NS_ERROR_FAILURE;
+
+    return NS_OK;
+  }
+
+  if (!mDefaultApplication)
+    return NS_ERROR_FILE_NOT_FOUND;
+
+  return LaunchWithIProcess(mDefaultApplication, aFile);
+}
Index: uriloader/exthandler/unix/nsMIMEInfoUnix.h
===================================================================
RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.h
diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ uriloader/exthandler/unix/nsMIMEInfoUnix.h	21 Jul 2005 03:07:40 -0000
@@ -0,0 +1,50 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org Code.
+ *
+ * The Initial Developer of the Original Code is
+ * Red Hat, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Christopher Aillon <caillon at redhat.com> (Original author)
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nsMimeInfoUnix_h__
+#define nsMimeInfoUnix_h__
+
+#include "nsMIMEInfoImpl.h"
+
+struct GnomeVFSMimeApplication;
+
+class nsMIMEInfoUnix : public nsMIMEInfoImpl
+{
+public:
+  nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {}
+  nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {};
+
+  virtual ~nsMIMEInfoUnix();
+
+  void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app);
+
+protected:
+  virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
+
+  GnomeVFSMimeApplication *mDefaultVFSApplication;
+};
+ 
+#endif // nsMimeInfoUnix_h__
Index: uriloader/exthandler/unix/nsOSHelperAppService.cpp
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
retrieving revision 1.58
diff -d -u -p -r1.58 nsOSHelperAppService.cpp
--- uriloader/exthandler/unix/nsOSHelperAppService.cpp	25 Oct 2004 07:46:01 -0000	1.58
+++ uriloader/exthandler/unix/nsOSHelperAppService.cpp	21 Jul 2005 03:07:40 -0000
@@ -44,6 +44,7 @@
 #include "nsOSHelperAppService.h"
 #ifdef MOZ_WIDGET_GTK2
 #include "nsGNOMERegistry.h"
+#include "nsMIMEInfoUnix.h"
 #endif
 #include "nsISupports.h"
 #include "nsString.h"
@@ -1486,6 +1487,17 @@ nsOSHelperAppService::GetFromType(const 
   
   LOG(("Here we do a mimetype lookup for '%s'\n", aMIMEType.get()));
 
+#ifdef MOZ_WIDGET_GTK2
+  // Look in GNOME registry first since it is the preferred method in GNOME,
+  // should trump the mailcap entry
+  LOG(("Looking in GNOME registry\n"));
+  nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
+  if (gnomeInfo) {
+    LOG(("Got MIMEInfo from GNOME registry\n"));
+    return gnomeInfo;
+  }
+#endif
+
   // extract the major and minor types
   NS_ConvertASCIItoUTF16 mimeType(aMIMEType);
   nsAString::const_iterator start_iter, end_iter,
@@ -1522,21 +1534,6 @@ nsOSHelperAppService::GetFromType(const 
                                 mozillaFlags,
                                 PR_TRUE);
 
-  
-  if (handler.IsEmpty() && extensions.IsEmpty() &&
-      mailcap_description.IsEmpty() && mime_types_description.IsEmpty()) {
-    // No useful data yet
-    
-#ifdef MOZ_WIDGET_GTK2
-    LOG(("Looking in GNOME registry\n"));
-    nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
-    if (gnomeInfo) {
-      LOG(("Got MIMEInfo from GNOME registry\n"));
-      return gnomeInfo;
-    }
-#endif
-  }
-
   if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
     DoLookUpHandlerAndDescription(majorType,
                                   minorType,

firefox-2.0-link-layout.patch:

--- NEW FILE firefox-2.0-link-layout.patch ---
Index: mozilla/layout/build/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/layout/build/Makefile.in,v
retrieving revision 1.127.8.7
diff -d -u -p -r1.127.8.7 Makefile.in
--- mozilla/layout/build/Makefile.in	17 Jul 2006 19:05:13 -0000	1.127.8.7
+++ mozilla/layout/build/Makefile.in	10 Oct 2006 04:29:16 -0000
@@ -240,6 +240,11 @@ EXTRA_DSO_LDOPTS += \
 	$(NULL)
 endif
 
+# Add explicit X11 dependency when building against X11 toolkits
+ifneq (,$(filter gtk gtk2 qt xlib,$(MOZ_WIDGET_TOOLKIT)))
+EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) -lXrender
+endif
+
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES	+= -I$(srcdir)/../base \

firefox-2.0.0.4-undo-uriloader.patch:

--- NEW FILE firefox-2.0.0.4-undo-uriloader.patch ---
Index: mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp
===================================================================
RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
retrieving revision 1.58.20.1
retrieving revision 1.58
diff -d -u -p -r1.58.20.1 -r1.58
--- mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp	16 Apr 2007 18:54:53 -0000	1.58.20.1
+++ mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp	25 Oct 2004 07:46:01 -0000	1.58
@@ -1506,8 +1506,13 @@ nsOSHelperAppService::GetFromType(const 
 
   nsDependentSubstring majorType(majorTypeStart, majorTypeEnd);
   nsDependentSubstring minorType(minorTypeStart, minorTypeEnd);
+  nsAutoString extensions, mime_types_description;
+  LookUpExtensionsAndDescription(majorType,
+                                 minorType,
+                                 extensions,
+                                 mime_types_description);
+
 
-  // First check the user's private mailcap file
   nsAutoString mailcap_description, handler, mozillaFlags;
   DoLookUpHandlerAndDescription(majorType,
                                 minorType,
@@ -1516,46 +1521,23 @@ nsOSHelperAppService::GetFromType(const 
                                 mailcap_description,
                                 mozillaFlags,
                                 PR_TRUE);
-  
-  LOG(("Private Handler/Description results:  handler='%s', description='%s'\n",
-          NS_LossyConvertUTF16toASCII(handler).get(),
-          NS_LossyConvertUTF16toASCII(mailcap_description).get()));
 
+  
+  if (handler.IsEmpty() && extensions.IsEmpty() &&
+      mailcap_description.IsEmpty() && mime_types_description.IsEmpty()) {
+    // No useful data yet
+    
 #ifdef MOZ_WIDGET_GTK2
-  nsMIMEInfoBase *gnomeInfo = nsnull;
-  if (handler.IsEmpty()) {
-    // No useful data yet.  Check the GNOME registry.  Unfortunately, newer
-    // GNOME versions no longer have type-to-extension mappings, so we might
-    // get back a MIMEInfo without any extensions set.  In that case we'll have
-    // to look in our mime.types files for the extensions.    
     LOG(("Looking in GNOME registry\n"));
-    gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
-    if (gnomeInfo && gnomeInfo->HasExtensions()) {
-      LOG(("Got MIMEInfo from GNOME registry, and it has extensions set\n"));
+    nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
+    if (gnomeInfo) {
+      LOG(("Got MIMEInfo from GNOME registry\n"));
       return gnomeInfo;
     }
-  }
 #endif
-
-  // Now look up our extensions
-  nsAutoString extensions, mime_types_description;
-  LookUpExtensionsAndDescription(majorType,
-                                 minorType,
-                                 extensions,
-                                 mime_types_description);
-
-#ifdef MOZ_WIDGET_GTK2
-  if (gnomeInfo) {
-    LOG(("Got MIMEInfo from GNOME registry without extensions; setting them "
-         "to %s\n", NS_LossyConvertUTF16toASCII(extensions).get()));
-
-    NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?");
-    gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions));
-    return gnomeInfo;
   }
-#endif
 
-  if (handler.IsEmpty()) {
+  if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
     DoLookUpHandlerAndDescription(majorType,
                                   minorType,
                                   typeOptions,
@@ -1565,7 +1547,7 @@ nsOSHelperAppService::GetFromType(const 
                                   PR_FALSE);
   }
 
-  if (handler.IsEmpty()) {
+  if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
     DoLookUpHandlerAndDescription(majorType,
                                   NS_LITERAL_STRING("*"),
                                   typeOptions,
@@ -1575,7 +1557,7 @@ nsOSHelperAppService::GetFromType(const 
                                   PR_TRUE);
   }
 
-  if (handler.IsEmpty()) {
+  if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
     DoLookUpHandlerAndDescription(majorType,
                                   NS_LITERAL_STRING("*"),
                                   typeOptions,

mozilla-build.patch:

--- NEW FILE mozilla-build.patch ---
diff -up mozilla/security/manager/Makefile.in.old mozilla/security/manager/Makefile.in
--- mozilla/security/manager/Makefile.in.old	2007-10-25 00:25:30.000000000 +0200
+++ mozilla/security/manager/Makefile.in	2007-11-06 10:57:39.000000000 +0100
@@ -150,7 +150,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR=
 DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR)
 DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
-DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1
 ABS_topsrcdir   := $(shell cd $(topsrcdir); pwd)
 ifneq ($(ABS_topsrcdir),$(MOZ_BUILD_ROOT))
 DEFAULT_GMAKE_FLAGS += BUILD_TREE=$(MOZ_BUILD_ROOT)
diff -up mozilla/security/manager/ssl/src/Makefile.in.old mozilla/security/manager/ssl/src/Makefile.in
--- mozilla/security/manager/ssl/src/Makefile.in.old	2007-10-19 21:16:36.000000000 +0200
+++ mozilla/security/manager/ssl/src/Makefile.in	2007-11-06 10:57:52.000000000 +0100
@@ -134,8 +134,6 @@ REQUIRES	= nspr \
 
 EXTRA_DEPS = $(NSS_DEP_LIBS)
 
-DEFINES += -DNSS_ENABLE_ECC
-
 # Use local includes because they are inserted before INCLUDES
 # so that Mozilla's nss.h is used, not glibc's
 LOCAL_INCLUDES += $(NSS_CFLAGS)

mozilla-firefox-head.ppc64.patch:

--- NEW FILE mozilla-firefox-head.ppc64.patch ---
Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
retrieving revision 1.92
diff -u -B -u -p -r1.92 Makefile.in
--- xpcom/reflect/xptcall/src/md/unix/Makefile.in	14 Dec 2006 19:13:43 -0000	1.92
+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in	29 Jan 2007 17:49:54 -0000
@@ -268,11 +268,16 @@ endif
 #
 # Linux/PPC
 #
-ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
+ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
 CPPSRCS		:= xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
 ASFILES		:= xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
 AS		:= $(CC) -c -x assembler-with-cpp
 endif
+ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
+CPPSRCS		:= xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
+ASFILES		:= xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
+AS		:= $(CC) -c -x assembler-with-cpp
+endif
 
 #
 # NetBSD/PPC
Index: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp,v
retrieving revision 1.3
diff -u -B -u -p -r1.3 xptcinvoke_ppc_netbsd.cpp
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp	18 Apr 2004 14:18:18 -0000	1.3
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp	29 Jan 2007 17:49:55 -0000
@@ -44,7 +44,7 @@
 // indepenpent call to the platform ABI. To do that,
 // XPTC_InvokeByIndex() has to determine the method to call via vtable
 // access. The parameters for the method are read from the
-// nsXPTCVariant* and prepared for th native ABI.  For the Linux/PPC
+// nsXPTCVariant* and prepared for the native ABI.  For the Linux/PPC
 // ABI this means that the first 8 integral and floating point
 // parameters are passed in registers.
 
--- /dev/null	2000-10-22 01:01:00.000000000 +0000
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s	2007-01-29 17:36:50.000000000 +0000
@@ -0,0 +1,164 @@
+## ***** BEGIN LICENSE BLOCK *****
+ # Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ #
+ # The contents of this file are subject to the Mozilla Public License Version
+ # 1.1 (the "License"); you may not use this file except in compliance with
+ # the License. You may obtain a copy of the License at
+ # http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS IS" basis,
+ # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ # for the specific language governing rights and limitations under the
+ # License.
+ #
+ # The Original Code is mozilla.org code.
+ #
+ # The Initial Developer of the Original Code is
+ # dwmw2 at infradead.org (David Woodhouse).
+ # Portions created by the Initial Developer are Copyright (C) 2006
+ # the Initial Developer. All Rights Reserved.
+ #
+ # Contributor(s):
+ #
+ # Alternatively, the contents of this file may be used under the terms of
+ # either the GNU General Public License Version 2 or later (the "GPL"), or
+ # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ # in which case the provisions of the GPL or the LGPL are applicable instead
+ # of those above. If you wish to allow use of your version of this file only
+ # under the terms of either the GPL or the LGPL, and not to allow others to
+ # use your version of this file under the terms of the MPL, indicate your
+ # decision by deleting the provisions above and replace them with the notice
+ # and other provisions required by the GPL or the LGPL. If you do not delete
+ # the provisions above, a recipient may use your version of this file under
+ # the terms of any one of the MPL, the GPL or the LGPL.
+ #
+ # ***** END LICENSE BLOCK *****
+
+.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
+.set r30,30; .set r31,31
+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
+.set f30,30; .set f31,31
+
+
+#
+# NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+#                  PRUint32 paramCount, nsXPTCVariant* params)
+#
+
+        .section ".toc","aw"
+        .section ".text"
+        .align 2
+        .globl  NS_InvokeByIndex_P
+        .section ".opd","aw"
+        .align 3
+NS_InvokeByIndex_P:
+        .quad   .NS_InvokeByIndex_P,.TOC. at tocbase
+        .previous
+        .type   NS_InvokeByIndex_P, at function
+.NS_InvokeByIndex_P:
+        mflr    0
+        std     0,16(r1)
+
+        std     r29,-24(r1)
+        std     r30,-16(r1)
+        std     r31,-8(r1)
+
+        mr      r29,r3                  # Save 'that' in r29
+        mr      r30,r4                  # Save 'methodIndex' in r30
+        mr      r31,r1                  # Save old frame
+
+        # Allocate stack frame with space for params. Since at least the
+        # first 7 parameters (not including 'that') will be in registers,
+        # we don't actually need stack space for those. We must ensure
+        # that the stack remains 16-byte aligned.
+        #
+        #  | ..128-byte stack frame.. |     | 7 GP | 13 FP | 3 NV |
+        #  |               |(params)........| regs | regs  | regs |
+        # (r1)...........(+112)....(+128)
+        #                               (-23*8).(-16*8).(-3*8)..(r31)
+
+        # +stack frame, -unused stack params, +regs storage, +1 for alignment
+        addi    r7,r5,((112/8)-7+7+13+3+1)
+        rldicr  r7,r7,3,59              # multiply by 8 and mask with ~15
+        neg     r7,r7
+        stdux   r1,r1,r7
+
+
+        # Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
+        #                           PRUint32 paramCount, nsXPTCVariant* s, 
+        #                           PRUint64* d))
+
+        # r5, r6 are passed through intact (paramCount, params)
+        # r7 (d) has to be r1+112 -- where parameters are passed on the stack.
+        # r3, r4 are above that, easier to address from r31 than from r1
+
+        subi    r3,r31,(23*8)           # r3 --> GPRS
+        subi    r4,r31,(16*8)           # r4 --> FPRS
+        addi    r7,r1,112               # r7 --> params
+        bl      invoke_copy_to_stack
+        nop
+
+        # Set up to invoke function
+
+        ld      r9,0(r29)               # vtable (r29 is 'that')
+        mr      r3,r29                  # self is first arg, obviously
+
+        sldi    r30,r30,3               # Find function descriptor 
+        add     r9,r9,r30
+        ld      r9,0(r9)
+
+        ld      r0,0(r9)                # Actual address from fd.
+        std     r2,40(r1)               # Save r2 (TOC pointer)
+
+        mtctr   0
+        ld      r11,16(r9)              # Environment pointer from fd.
+        ld      r2,8(r9)                # TOC pointer from fd.
+
+        # Load FP and GP registers as required
+        ld      r4, -(23*8)(r31) 
+        ld      r5, -(22*8)(r31) 
+        ld      r6, -(21*8)(r31) 
+        ld      r7, -(20*8)(r31) 
+        ld      r8, -(19*8)(r31) 
+        ld      r9, -(18*8)(r31) 
+        ld      r10, -(17*8)(r31) 
+
+        lfd     f1, -(16*8)(r31)
+        lfd     f2, -(15*8)(r31)
+        lfd     f3, -(14*8)(r31)
+        lfd     f4, -(13*8)(r31)
+        lfd     f5, -(12*8)(r31)
+        lfd     f6, -(11*8)(r31)
+        lfd     f7, -(10*8)(r31)
+        lfd     f8, -(9*8)(r31)
+        lfd     f9, -(8*8)(r31)
+        lfd     f10, -(7*8)(r31)
+        lfd     f11, -(6*8)(r31)
+        lfd     f12, -(5*8)(r31)
+        lfd     f13, -(4*8)(r31)
+
+        bctrl                           # Do it
+
+        ld      r2,40(r1)               # Load our own TOC pointer
+        ld      r1,0(r1)                # Revert stack frame
+        ld      0,16(r1)                # Reload lr
+        ld      29,-24(r1)              # Restore NVGPRS
+        ld      30,-16(r1)
+        ld      31,-8(r1)
+        mtlr    0
+        blr
+
+        .size   NS_InvokeByIndex_P,.-.NS_InvokeByIndex_P
+
+        # Magic indicating no need for an executable stack
+        .section .note.GNU-stack, "", @progbits ; .previous
--- /dev/null	2000-10-22 01:01:00.000000000 +0000
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp	2007-01-29 17:36:50.000000000 +0000
@@ -0,0 +1,131 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   dwmw2 at infradead.org (David Woodhouse)
+ *   Franz.Sirl-kernel at lauterbach.com (Franz Sirl)
+ *   beard at netscape.com (Patrick Beard)
+ *   waterson at netscape.com (Chris Waterson)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// Platform specific code to invoke XPCOM methods on native objects
+
+// The purpose of NS_InvokeByIndex_P() is to map a platform
+// independent call to the platform ABI. To do that,
+// NS_InvokeByIndex_P() has to determine the method to call via vtable
+// access. The parameters for the method are read from the
+// nsXPTCVariant* and prepared for the native ABI.
+
+// The PowerPC64 platform ABI can be found here:
+// http://www.freestandards.org/spec/ELF/ppc64/
+// and in particular:
+// http://www.freestandards.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-CALL
+
+#include <stdio.h>
+#include "xptcprivate.h"
+
+// 8 integral parameters are passed in registers, not including 'that'
+#define GPR_COUNT     7
+
+// 8 floating point parameters are passed in registers, floats are
+// promoted to doubles when passed in registers
+#define FPR_COUNT     13
+
+extern "C" PRUint32
+invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
+{
+    return PRUint32(((paramCount * 2) + 3) & ~3);
+}
+
+extern "C" void
+invoke_copy_to_stack(PRUint64* gpregs,
+                     double* fpregs,
+                     PRUint32 paramCount,
+                     nsXPTCVariant* s, 
+                     PRUint64* d)
+{
+    PRUint64 tempu64;
+
+    for(uint32 i = 0; i < paramCount; i++, s++) {
+        if(s->IsPtrData())
+            tempu64 = (PRUint64) s->ptr;
+        else {
+            switch(s->type) {
+            case nsXPTType::T_FLOAT:                                  break;
+            case nsXPTType::T_DOUBLE:                                 break;
+            case nsXPTType::T_I8:     tempu64 = s->val.i8;            break;
+            case nsXPTType::T_I16:    tempu64 = s->val.i16;           break;
+            case nsXPTType::T_I32:    tempu64 = s->val.i32;           break;
+            case nsXPTType::T_I64:    tempu64 = s->val.i64;           break;
+            case nsXPTType::T_U8:     tempu64 = s->val.u8;            break;
+            case nsXPTType::T_U16:    tempu64 = s->val.u16;           break;
+            case nsXPTType::T_U32:    tempu64 = s->val.u32;           break;
+            case nsXPTType::T_U64:    tempu64 = s->val.u64;           break;
+            case nsXPTType::T_BOOL:   tempu64 = s->val.b;             break;
+            case nsXPTType::T_CHAR:   tempu64 = s->val.c;             break;
+            case nsXPTType::T_WCHAR:  tempu64 = s->val.wc;            break;
+            default:                  tempu64 = (PRUint64) s->val.p;  break;
+            }
+        }
+
+        if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
+            if (i < FPR_COUNT)
+                fpregs[i]    = s->val.d;
+            else
+                *(double *)d = s->val.d;
+        }
+        else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
+            if (i < FPR_COUNT) {
+                fpregs[i]   = s->val.f; // if passed in registers, floats are promoted to doubles
+            } else {
+                float *p = (float *)d;
+                p++;
+                *p = s->val.f;
+            }
+        }
+        else {
+            if (i < GPR_COUNT)
+                gpregs[i] = tempu64;
+            else
+                *d = tempu64;
+        }
+        if (i >= 7)
+            d++;
+    }
+}
+
+EXPORT_XPCOM_API(nsresult)
+NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+                 PRUint32 paramCount, nsXPTCVariant* params);
+
--- /dev/null	2000-10-22 01:01:00.000000000 +0000
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s	2007-01-29 17:36:50.000000000 +0000
@@ -0,0 +1,113 @@
+## ***** BEGIN LICENSE BLOCK *****
+ # Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ #
+ # The contents of this file are subject to the Mozilla Public License Version
+ # 1.1 (the "License"); you may not use this file except in compliance with
+ # the License. You may obtain a copy of the License at
+ # http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS IS" basis,
+ # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ # for the specific language governing rights and limitations under the
+ # License.
+ #
+ # The Original Code is mozilla.org code.
+ #
+ # The Initial Developer of the Original Code is
+ # dwmw2 at infradead.org (David Woodhouse).
+ # Portions created by the Initial Developer are Copyright (C) 2006
+ # the Initial Developer. All Rights Reserved.
+ #
+ # Contributor(s):
+ #
+ # Alternatively, the contents of this file may be used under the terms of
+ # either the GNU General Public License Version 2 or later (the "GPL"), or
+ # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ # in which case the provisions of the GPL or the LGPL are applicable instead
+ # of those above. If you wish to allow use of your version of this file only
+ # under the terms of either the GPL or the LGPL, and not to allow others to
+ # use your version of this file under the terms of the MPL, indicate your
+ # decision by deleting the provisions above and replace them with the notice
+ # and other provisions required by the GPL or the LGPL. If you do not delete
+ # the provisions above, a recipient may use your version of this file under
+ # the terms of any one of the MPL, the GPL or the LGPL.
+ #
+ # ***** END LICENSE BLOCK *****
+
+.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
+.set r30,30; .set r31,31
+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
+.set f30,30; .set f31,31
+
+        .section ".text"
+        .align 2
+        .globl SharedStub
+        .section ".opd","aw"
+        .align 3
+
+SharedStub:
+        .quad   .SharedStub,.TOC. at tocbase
+        .previous
+        .type   SharedStub, at function
+
+.SharedStub:
+        mflr    r0
+
+        std     r4, -56(r1)                     # Save all GPRS
+        std     r5, -48(r1)
+        std     r6, -40(r1)
+        std     r7, -32(r1)
+        std     r8, -24(r1)
+        std     r9, -16(r1)
+        std     r10, -8(r1)
+
+        stfd    f13, -64(r1)                    # ... and FPRS
+        stfd    f12, -72(r1)
+        stfd    f11, -80(r1)
+        stfd    f10, -88(r1)
+        stfd    f9, -96(r1)
+        stfd    f8, -104(r1)
+        stfd    f7, -112(r1)
+        stfd    f6, -120(r1)
+        stfd    f5, -128(r1)
+        stfd    f4, -136(r1)
+        stfd    f3, -144(r1)
+        stfd    f2, -152(r1)
+        stfd    f1, -160(r1)
+
+        subi    r6,r1,56                        # r6 --> gprData
+        subi    r7,r1,160                       # r7 --> fprData
+        addi    r5,r1,112                       # r5 --> extra stack args
+
+        std     r0, 16(r1)
+	
+        stdu    r1,-288(r1)
+                                                # r3 has the 'self' pointer
+                                                # already
+
+        mr      r4,r11                          # r4 is methodIndex selector,
+                                                # passed via r11 in the
+                                                # nsNSStubBase::StubXX() call
+
+        bl      PrepareAndDispatch
+        nop
+
+        ld      1,0(r1)                         # restore stack
+        ld      r0,16(r1)                       # restore LR
+        mtlr    r0
+        blr
+
+        .size   SharedStub,.-.SharedStub
+
+        # Magic indicating no need for an executable stack
+        .section .note.GNU-stack, "", @progbits ; .previous
--- /dev/null	2000-10-22 01:01:00.000000000 +0000
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp	2007-01-29 17:36:50.000000000 +0000
@@ -0,0 +1,245 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1999
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   dwmw2 at infradead.org (David Woodhouse)
+ *   Franz.Sirl-kernel at lauterbach.com (Franz Sirl)
+ *   beard at netscape.com (Patrick Beard)
+ *   waterson at netscape.com (Chris Waterson)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// Implement shared vtbl methods.
+
+#include "xptcprivate.h"
+#include "xptiprivate.h"
+
+// The Linux/PPC64 ABI passes the first 8 integral
+// parameters and the first 13 floating point parameters in registers
+// (r3-r10 and f1-f13), no stack space is allocated for these by the
+// caller.  The rest of the parameters are passed in the caller's stack
+// area. The stack pointer has to retain 16-byte alignment.
+
+// The PowerPC64 platform ABI can be found here:
+// http://www.freestandards.org/spec/ELF/ppc64/
+// and in particular:
+// http://www.freestandards.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-CALL
+
+#define PARAM_BUFFER_COUNT      16
+#define GPR_COUNT                7
+#define FPR_COUNT               13
+
+// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
+//
+// - 'args[]' contains the arguments passed on stack
+// - 'gprData[]' contains the arguments passed in integer registers
+// - 'fprData[]' contains the arguments passed in floating point registers
+// 
+// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
+// and then the method gets called.
+#include <stdio.h>
+extern "C" nsresult
+PrepareAndDispatch(nsXPTCStubBase* self,
+                   PRUint64 methodIndex,
+                   PRUint64* args,
+                   PRUint64 *gprData,
+                   double *fprData)
+{
+    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
+    nsXPTCMiniVariant* dispatchParams = NULL;
+    const nsXPTMethodInfo* info;
+    PRUint32 paramCount;
+    PRUint32 i;
+    nsresult result = NS_ERROR_FAILURE;
+
+    NS_ASSERTION(self,"no self");
+
+    self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
+    NS_ASSERTION(info,"no method info");
+    if (! info)
+        return NS_ERROR_UNEXPECTED;
+
+    paramCount = info->GetParamCount();
+
+    // setup variant array pointer
+    if(paramCount > PARAM_BUFFER_COUNT)
+        dispatchParams = new nsXPTCMiniVariant[paramCount];
+    else
+        dispatchParams = paramBuffer;
+
+    NS_ASSERTION(dispatchParams,"no place for params");
+    if (! dispatchParams)
+        return NS_ERROR_OUT_OF_MEMORY;
+
+    PRUint64* ap = args;
+    PRUint64 tempu64;
+
+    for(i = 0; i < paramCount; i++) {
+        const nsXPTParamInfo& param = info->GetParam(i);
+        const nsXPTType& type = param.GetType();
+        nsXPTCMiniVariant* dp = &dispatchParams[i];
+	
+        if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
+            if (i < FPR_COUNT)
+                dp->val.d = fprData[i];
+            else
+                dp->val.d = *(double*) ap;
+        } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
+            if (i < FPR_COUNT)
+                dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
+            else {
+                float *p = (float *)ap;
+                p++;
+                dp->val.f = *p;
+            }
+        } else { /* integer type or pointer */
+            if (i < GPR_COUNT)
+                tempu64 = gprData[i];
+            else
+                tempu64 = *ap;
+
+            if (param.IsOut() || !type.IsArithmetic())
+                dp->val.p = (void*) tempu64;
+            else if (type ==nsXPTType::T_I8)
+                dp->val.i8  = (PRInt8)   tempu64;
+            else if (type ==nsXPTType::T_I16)
+                dp->val.i16 = (PRInt16)  tempu64;
+            else if (type ==nsXPTType::T_I32)
+                dp->val.i32 = (PRInt32)  tempu64;
+            else if (type ==nsXPTType::T_I64)
+                dp->val.i64 = (PRInt64)  tempu64;
+            else if (type ==nsXPTType::T_U8)
+                dp->val.u8  = (PRUint8)  tempu64;
+            else if (type ==nsXPTType::T_U16)
+                dp->val.u16 = (PRUint16) tempu64;
+            else if (type ==nsXPTType::T_U32)
+                dp->val.u32 = (PRUint32) tempu64;
+            else if (type ==nsXPTType::T_U64)
+                dp->val.u64 = (PRUint64) tempu64;
+            else if (type ==nsXPTType::T_BOOL)
+                dp->val.b   = (PRBool)   tempu64;
+            else if (type ==nsXPTType::T_CHAR)
+                dp->val.c   = (char)     tempu64;
+            else if (type ==nsXPTType::T_WCHAR)
+                dp->val.wc  = (wchar_t)  tempu64;
+            else
+                NS_ASSERTION(0, "bad type");
+        }
+
+        if (i >= 7)
+            ap++;
+    }
+
+    result = self->mOuter->CallMethod((PRUint16) methodIndex, info,
+                                      dispatchParams);
+
+    if (dispatchParams != paramBuffer)
+        delete [] dispatchParams;
+
+    return result;
+}
+
+// Load r11 with the constant 'n' and branch to SharedStub().
+//
+// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
+// however, it's quick, dirty, and'll break when the ABI changes on
+// us, which is what we want ;-).
+
+#if __GXX_ABI_VERSION < 100
+#error Prehistoric GCC not supported here
+#else
+// gcc-3 version
+//
+// As G++3 ABI contains the length of the functionname in the mangled
+// name, it is difficult to get a generic assembler mechanism like
+// in the G++ 2.95 case.
+// Create names would be like:
+// _ZN14nsXPTCStubBase5Stub1Ev
+// _ZN14nsXPTCStubBase6Stub12Ev
+// _ZN14nsXPTCStubBase7Stub123Ev
+// _ZN14nsXPTCStubBase8Stub1234Ev
+// etc.
+// Use assembler directives to get the names right...
+
+# define STUB_ENTRY(n)                                                  \
+__asm__ (                                                               \
+        ".section \".toc\",\"aw\" \n\t"                                 \
+        ".section \".text\" \n\t"                                       \
+        ".align 2 \n\t"                                                 \
+        ".if "#n" < 10 \n\t"                                            \
+        ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t"                    \
+        ".section \".opd\",\"aw\" \n\t"                                 \
+        ".align 3 \n\t"                                                 \
+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t"                                  \
+        ".quad  ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC. at tocbase \n\t"     \
+        ".previous \n\t"                                                \
+        ".type  _ZN14nsXPTCStubBase5Stub"#n"Ev, at function \n\n"          \
+"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t"                                 \
+                                                                        \
+        ".elseif "#n" < 100 \n\t"                                       \
+        ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t"                    \
+        ".section \".opd\",\"aw\" \n\t"                                 \
+        ".align 3 \n\t"                                                 \
+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t"                                  \
+        ".quad  ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC. at tocbase \n\t"     \
+        ".previous \n\t"                                                \
+        ".type  _ZN14nsXPTCStubBase6Stub"#n"Ev, at function \n\n"          \
+"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t"                                 \
+                                                                        \
+        ".elseif "#n" < 1000 \n\t"                                      \
+        ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t"                    \
+        ".section \".opd\",\"aw\" \n\t"                                 \
+        ".align 3 \n\t"                                                 \
+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t"                                  \
+        ".quad  ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC. at tocbase \n\t"     \
+        ".previous \n\t"                                                \
+        ".type  _ZN14nsXPTCStubBase7Stub"#n"Ev, at function \n\n"          \
+"._ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t"                                 \
+                                                                        \
+        ".else  \n\t"                                                   \
+        ".err   \"stub number "#n" >= 1000 not yet supported\"\n"       \
+        ".endif \n\t"                                                   \
+                                                                        \
+        "li     11,"#n" \n\t"                                           \
+        "b      SharedStub \n"                                          \
+);
+#endif
+
+#define SENTINEL_ENTRY(n)                                               \
+nsresult nsXPTCStubBase::Sentinel##n()                                  \
+{                                                                       \
+    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called");                  \
+    return NS_ERROR_NOT_IMPLEMENTED;                                    \
+}
+
+#include "xptcstubsdef.inc"

mozilla-gtkmozembed.patch:

--- NEW FILE mozilla-gtkmozembed.patch ---
diff -up mozilla/xulrunner/installer/mozilla-gtkmozembed.pc.in.old mozilla/xulrunner/installer/mozilla-gtkmozembed.pc.in
--- mozilla/xulrunner/installer/mozilla-gtkmozembed.pc.in.old	2007-11-15 15:45:47.000000000 +0100
+++ mozilla/xulrunner/installer/mozilla-gtkmozembed.pc.in	2007-11-15 16:09:59.000000000 +0100
@@ -0,0 +1,13 @@
+prefix=%prefix%
+sdkdir=%sdkdir%
+includedir=%includedir%
+idldir=%idldir%
+includetype=stable
+libdir=%sdkdir%
+
+Name: mozilla-gtkembedmoz
+Description: Mozilla Embedding Widget for Gtk+
+Version: %MOZILLA_VERSION%
+Requires: %MOZ_APP_NAME%-xpcom = %MOZILLA_VERSION%
+Libs: -L${libdir} -lxpcomglue_s -lxul -lxpcom
+Cflags: -I${includedir}/gtkembedmoz

mozilla-sqlite-build.patch:

--- NEW FILE mozilla-sqlite-build.patch ---
diff -up mozilla/storage/build/Makefile.in.old mozilla/storage/build/Makefile.in
--- mozilla/storage/build/Makefile.in.old	2007-08-10 18:19:57.000000000 +0200
+++ mozilla/storage/build/Makefile.in	2007-11-14 09:17:00.000000000 +0100
@@ -21,7 +21,6 @@
 #
 # Contributor(s):
 #   Vladimir Vukicevic <vladimir.vukicevic at oracle.com>
-#   Shawn Wilsher <me at shawnwilsher.com>
 #
 # Alternatively, the contents of this file may be used under the terms of
 # either of the GNU General Public License Version 2 or later (the "GPL"),
@@ -71,10 +70,9 @@ LOCAL_INCLUDES = \
 
 SHARED_LIBRARY_LIBS = \
 	../src/$(LIB_PREFIX)storage_s.$(LIB_SUFFIX) \
+	$(DEPTH)/db/sqlite3/src/$(LIB_PREFIX)sqlite3_s.$(LIB_SUFFIX) \
 	$(NULL)
 
-EXTRA_DSO_LIBS += sqlite3
-
 EXTRA_DSO_LDOPTS += \
 	$(LIBS_DIR) \
 	$(EXTRA_DSO_LIBS) \
diff -up mozilla/toolkit/library/libxul-config.mk.old mozilla/toolkit/library/libxul-config.mk
--- mozilla/toolkit/library/libxul-config.mk.old	2007-09-17 01:48:08.000000000 +0200
+++ mozilla/toolkit/library/libxul-config.mk	2007-11-14 09:14:16.000000000 +0100
@@ -21,7 +21,6 @@
 # the Initial Developer. All Rights Reserved.
 #
 # Contributor(s):
-#   Shawn Wilsher <me at shawnwilsher.com>
 #
 # Alternatively, the contents of this file may be used under the terms of
 # either of the GNU General Public License Version 2 or later (the "GPL"),
@@ -223,7 +222,6 @@ endif
 
 ifdef MOZ_STORAGE
 COMPONENT_LIBS += storagecomps
-EXTRA_DSO_LIBS += sqlite3
 endif
 
 ifdef MOZ_PLACES
diff -up mozilla/xpcom/stub/Makefile.in.old mozilla/xpcom/stub/Makefile.in
--- mozilla/xpcom/stub/Makefile.in.old	2007-10-13 23:13:52.000000000 +0200
+++ mozilla/xpcom/stub/Makefile.in	2007-11-14 09:15:28.000000000 +0100
@@ -91,7 +91,6 @@ DEPENDENT_LIBS_LIST += \
 ifdef MOZ_ENABLE_LIBXUL
 
 DEPENDENT_LIBS_LIST += \
-	$(LIB_PREFIX)sqlite3$(DLL_SUFFIX) \
 	$(LIB_PREFIX)softokn3$(DLL_SUFFIX) \
 	$(LIB_PREFIX)nss3$(DLL_SUFFIX) \
 	$(LIB_PREFIX)ssl3$(DLL_SUFFIX) \
diff -up mozilla/config/static-config.mk.old mozilla/config/static-config.mk
--- mozilla/config/static-config.mk.old	2007-07-24 00:02:20.000000000 +0200
+++ mozilla/config/static-config.mk	2007-11-14 09:14:16.000000000 +0100
@@ -98,10 +98,6 @@ ifdef MOZ_ENABLE_PANGO
 STATIC_EXTRA_LIBS	+= $(MOZ_PANGO_LIBS)
 endif
 
-ifdef MOZ_STORAGE
-EXTRA_DSO_LIBS += sqlite3
-endif
-
 ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
 STATIC_EXTRA_LIBS	+= $(MOZ_STARTUP_NOTIFICATION_LIBS)
 endif
diff -up mozilla/config/system-headers.old mozilla/config/system-headers
--- mozilla/config/system-headers.old	2007-10-12 14:34:46.000000000 +0200
+++ mozilla/config/system-headers	2007-11-14 09:14:16.000000000 +0100
@@ -617,8 +617,6 @@ SIOUX.h
 size_t.h
 someincludefile.h
 Sound.h
-sqlite3.h
-sqlite3file.h
 ssdef.h
 sslerr.h
 ssl.h
diff -up mozilla/db/sqlite3/src/sqlite3file.h.old mozilla/db/sqlite3/src/sqlite3file.h
--- mozilla/db/sqlite3/src/sqlite3file.h.old	2007-07-25 04:18:54.000000000 +0200
+++ mozilla/db/sqlite3/src/sqlite3file.h	2007-11-14 09:14:16.000000000 +0100
@@ -199,11 +199,7 @@ struct sqlite3OsVtbl {
   /*
   ** Files other than os.c just reference the global virtual function table. 
   */
-#ifdef XP_WIN
-  extern __declspec(dllimport) struct sqlite3OsVtbl sqlite3Os;
-#else
   extern struct sqlite3OsVtbl sqlite3Os;
-#endif // windows symbol ifdef
 #endif /* _SQLITE_OS_C_ */
 
 } // extern "C"
diff -up mozilla/db/sqlite3/src/Makefile.in.old mozilla/db/sqlite3/src/Makefile.in
--- mozilla/db/sqlite3/src/Makefile.in.old	2007-09-16 03:47:04.000000000 +0200
+++ mozilla/db/sqlite3/src/Makefile.in	2007-11-14 09:20:17.000000000 +0100
@@ -45,15 +45,9 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE           = sqlite3
-LIBRARY_NAME     = sqlite3
-FORCE_SHARED_LIB = 1
-VISIBILITY_FLAGS =
-
-ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
-ifndef GNU_CC
-DEFFILE = $(win_srcdir)/sqlite.def
-endif
-endif
+LIBRARY_NAME     = sqlite3_s
+MODULE_NAME      = sqlite3
+FORCE_STATIC_LIB = 1
 
 ifdef GNU_CC
 MODULE_OPTIMIZE_FLAGS = -O3
@@ -83,7 +77,15 @@ DEFINES += -DOS2_HIGH_MEMORY
 endif
 endif
 
+ifdef ENABLE_TESTS
+##LIBS = $(DIST)/lib/$(LIB_PREFIX)sqlite3_s.$(LIB_SUFFIX)
+##SIMPLE_PROGRAMS = sqlite-shell
+endif
+
 include $(topsrcdir)/config/rules.mk
+    
+sqlite-shell.$(OBJ_SUFFIX): shell.c
+	$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
 
 # next line allows use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS, maybe others
 LOCAL_INCLUDES += -I$(srcdir)

mozilla-xulrunner-pkgconfig.patch:

--- NEW FILE mozilla-xulrunner-pkgconfig.patch ---
diff -up mozilla/config/autoconf.mk.in.old mozilla/config/autoconf.mk.in
--- mozilla/config/autoconf.mk.in.old	2007-10-11 20:50:54.000000000 +0200
+++ mozilla/config/autoconf.mk.in	2007-11-15 16:31:06.000000000 +0100
@@ -65,7 +65,7 @@ mandir		= @mandir@
 idldir		= $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
 
 installdir	= $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-sdkdir		= $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
+sdkdir		= $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
 
 DIST		= $(DEPTH)/dist
 LIBXUL_SDK      = @LIBXUL_SDK@
diff -up mozilla/xulrunner/installer/xulrunner-xpcom.pc.in.old mozilla/xulrunner/installer/xulrunner-xpcom.pc.in
--- mozilla/xulrunner/installer/xulrunner-xpcom.pc.in.old	2007-11-15 16:31:06.000000000 +0100
+++ mozilla/xulrunner/installer/xulrunner-xpcom.pc.in	2007-11-15 16:31:06.000000000 +0100
@@ -3,14 +3,15 @@ sdkdir=%sdkdir%
 includedir=%includedir%
 idldir=%idldir%
 includetype=stable
+libdir=%sdkdir%
 
 # Note: the default pkg-config includes will only list include directories
 # that contain stable (frozen or safe for linking) header files. To include
 # nonfrozen headers, run pkg-config with --define-variable=includetype=unstable
 
-Name: libxul
+Name: xulrunner-xpcom
 Description: The Mozilla Runtime and Embedding Engine
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom
+Libs: -L${sdkdir} -lxpcomglue_s -lxul -lxpcom
 Cflags: -I${includedir}/${includetype} -fshort-wchar
\ No newline at end of file
diff -up mozilla/xulrunner/installer/libxul.pc.in.old mozilla/xulrunner/installer/libxul.pc.in
--- mozilla/xulrunner/installer/libxul.pc.in.old	2007-08-03 16:46:28.000000000 +0200
+++ mozilla/xulrunner/installer/libxul.pc.in	2007-11-15 16:31:06.000000000 +0100
@@ -2,6 +2,7 @@ prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
 idldir=%idldir%
+libdir=%sdkdir%
 includetype=stable
 
 # Note: the default pkg-config includes will only list include directories
@@ -12,5 +13,5 @@ Name: libxul
 Description: The Mozilla Runtime and Embedding Engine
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom
+Libs: -L${sdkdir} -lxpcomglue_s -lxul -lxpcom
 Cflags: -I${includedir}/${includetype} -fshort-wchar
\ No newline at end of file
diff -up mozilla/xulrunner/installer/mozilla-xpcom.pc.in.old mozilla/xulrunner/installer/mozilla-xpcom.pc.in
--- mozilla/xulrunner/installer/mozilla-xpcom.pc.in.old	2007-11-15 16:31:06.000000000 +0100
+++ mozilla/xulrunner/installer/mozilla-xpcom.pc.in	2007-11-15 16:31:06.000000000 +0100
@@ -2,15 +2,16 @@ prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
 idldir=%idldir%
+libdir=%sdkdir%
 includetype=stable
 
 # Note: the default pkg-config includes will only list include directories
 # that contain stable (frozen or safe for linking) header files. To include
 # nonfrozen headers, run pkg-config with --define-variable=includetype=unstable
 
-Name: libxul
+Name: mozilla-xpcom
 Description: The Mozilla Runtime and Embedding Engine
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue_s -lxul -lxpcom
+Libs: -L${sdkdir} -lxpcomglue_s -lxul -lxpcom
 Cflags: -I${includedir}/${includetype} -fshort-wchar
\ No newline at end of file
diff -up mozilla/xulrunner/installer/xulrunner-embedding.pc.in.old mozilla/xulrunner/installer/xulrunner-embedding.pc.in
--- mozilla/xulrunner/installer/xulrunner-embedding.pc.in.old	2007-11-15 16:31:06.000000000 +0100
+++ mozilla/xulrunner/installer/xulrunner-embedding.pc.in	2007-11-15 16:31:06.000000000 +0100
@@ -2,14 +2,15 @@ prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
 idldir=%idldir%
+libdir=%sdkdir%
 includetype=stable
 
 # Note: the default pkg-config cflags will only list include directories
 # that contain stable (frozen or safe for linking) header files. To include
 # nonfrozen headers, run pkg-config with --define-variable=includetype=unstable
 
-Name: libxul-embedding
+Name: xulrunner-embedding
 Description: Static library for version-independent embedding of the Mozilla runtime
 Version: %MOZILLA_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue
+Libs: -L${sdkdir} -lxpcomglue
 Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} -fshort-wchar
diff -up mozilla/xulrunner/installer/xulrunner-plugin.pc.in.old mozilla/xulrunner/installer/xulrunner-plugin.pc.in
--- mozilla/xulrunner/installer/xulrunner-plugin.pc.in.old	2007-11-15 16:31:06.000000000 +0100
+++ mozilla/xulrunner/installer/xulrunner-plugin.pc.in	2007-11-15 16:31:06.000000000 +0100
@@ -1,6 +1,7 @@
 prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
+libdir=%sdkdir%
 
 Name: Mozilla Plug-In API
 Description: Mozilla Plug-In API
diff -up mozilla/xulrunner/installer/libxul-embedding.pc.in.old mozilla/xulrunner/installer/libxul-embedding.pc.in
--- mozilla/xulrunner/installer/libxul-embedding.pc.in.old	2007-08-03 16:46:28.000000000 +0200
+++ mozilla/xulrunner/installer/libxul-embedding.pc.in	2007-11-15 16:31:06.000000000 +0100
@@ -2,6 +2,7 @@ prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
 idldir=%idldir%
+libdir=%sdkdir%
 includetype=stable
 
 # Note: the default pkg-config cflags will only list include directories
@@ -11,5 +12,5 @@ includetype=stable
 Name: libxul-embedding
 Description: Static library for version-independent embedding of the Mozilla runtime
 Version: %MOZILLA_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue
+Libs: -L${sdkdir} -lxpcomglue
 Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} -fshort-wchar
diff -up mozilla/xulrunner/installer/mozilla-embedding.pc.in.old mozilla/xulrunner/installer/mozilla-embedding.pc.in
--- mozilla/xulrunner/installer/mozilla-embedding.pc.in.old	2007-11-15 16:31:06.000000000 +0100
+++ mozilla/xulrunner/installer/mozilla-embedding.pc.in	2007-11-15 16:31:06.000000000 +0100
@@ -2,14 +2,15 @@ prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
 idldir=%idldir%
+libdir=%sdkdir%
 includetype=stable
 
 # Note: the default pkg-config cflags will only list include directories
 # that contain stable (frozen or safe for linking) header files. To include
 # nonfrozen headers, run pkg-config with --define-variable=includetype=unstable
 
-Name: libxul-embedding
+Name: mozilla-embedding
 Description: Static library for version-independent embedding of the Mozilla runtime
 Version: %MOZILLA_VERSION%
-Libs: -L${sdkdir}/lib -lxpcomglue
+Libs: -L${sdkdir} -lxpcomglue
 Cflags: -DXPCOM_GLUE -I${includedir}/${includetype} -fshort-wchar
diff -up mozilla/xulrunner/installer/xulrunner-gtkmozembed.pc.in.old mozilla/xulrunner/installer/xulrunner-gtkmozembed.pc.in
--- mozilla/xulrunner/installer/xulrunner-gtkmozembed.pc.in.old	2007-11-15 16:31:06.000000000 +0100
+++ mozilla/xulrunner/installer/xulrunner-gtkmozembed.pc.in	2007-11-15 16:33:40.000000000 +0100
@@ -5,7 +5,7 @@ idldir=%idldir%
 includetype=stable
 libdir=%sdkdir%
 
-Name: mozilla-gtkembedmoz
+Name: xulrunner-gtkembedmoz
 Description: Mozilla Embedding Widget for Gtk+
 Version: %MOZILLA_VERSION%
 Requires: %MOZ_APP_NAME%-xpcom = %MOZILLA_VERSION%
diff -up mozilla/xulrunner/installer/xulrunner-js.pc.in.old mozilla/xulrunner/installer/xulrunner-js.pc.in
--- mozilla/xulrunner/installer/xulrunner-js.pc.in.old	2007-11-15 16:31:06.000000000 +0100
+++ mozilla/xulrunner/installer/xulrunner-js.pc.in	2007-11-15 16:31:06.000000000 +0100
@@ -1,10 +1,11 @@
 prefix=%prefix%
 sdkdir=%sdkdir%
 includedir=%includedir%
+libdir=%sdkdir%
 
 Name: JavaScript
 Description: The Mozilla JavaScript Library
 Version: %MOZILLA_VERSION%
 Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${sdkdir}/lib -lmozjs
+Libs: -L${sdkdir} -lmozjs
 Cflags: -I${includedir}/stable -DXP_UNIX -DJS_THREADSAFE
diff -up mozilla/xulrunner/installer/Makefile.in.old mozilla/xulrunner/installer/Makefile.in
--- mozilla/xulrunner/installer/Makefile.in.old	2007-08-10 14:56:59.000000000 +0200
+++ mozilla/xulrunner/installer/Makefile.in	2007-11-15 16:33:15.000000000 +0100
@@ -87,6 +87,14 @@ pkg_config_files = \
 	libxul-embedding.pc \
 	mozilla-js.pc \
 	mozilla-plugin.pc \
+	mozilla-xpcom.pc \
+	mozilla-embedding.pc \
+	mozilla-gtkmozembed.pc \
+	xulrunner-js.pc \
+	xulrunner-plugin.pc \
+	xulrunner-xpcom.pc \
+	xulrunner-embedding.pc \
+	xulrunner-gtkmozembed.pc \
 	$(NULL)
 
 ifdef MOZ_NATIVE_NSPR

xulrunner-compile.patch:

--- NEW FILE xulrunner-compile.patch ---
diff -up mozilla/toolkit/xre/Makefile.in.old mozilla/toolkit/xre/Makefile.in
--- mozilla/toolkit/xre/Makefile.in.old	2007-09-17 17:13:01.000000000 +0200
+++ mozilla/toolkit/xre/Makefile.in	2007-09-17 17:12:33.000000000 +0200
@@ -263,5 +263,5 @@ platform.ini: FORCE
 libs:: platform.ini
 	$(INSTALL) $^ $(DIST)/bin
 
-install::
-	$(INSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)
+install:: platform.ini
+	$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)


--- NEW FILE xulrunner-redhat-default-prefs.js ---
pref("app.update.enabled", false);
pref("app.update.autoInstallEnabled", false);
pref("browser.display.use_system_colors",   true);
pref("browser.link.open_external",          3);
pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html");
pref("startup.homepage_override_url", "file:///usr/share/doc/HTML/index.html");
pref("startup.homepage_welcome_url", "file:///usr/share/doc/HTML/index.html");
pref("general.smoothScroll",                true);
pref("general.useragent.vendor", "Fedora");
pref("general.useragent.vendorSub", "RPM_VERREL");
pref("intl.locale.matchOS", true);


--- NEW FILE xulrunner.1 ---
.TH FIREFOX 1 "August 07, 2001" firefox "Linux User's Manual"
.SH NAME
firefox \- a Web browser for X11 derived from the Mozilla browser

.SH SYNOPSIS
.B firefox
[\fIOPTIONS\fR] [\fIURL\fR]

.B firefox-bin
[\fIOPTIONS\fR] [\fIURL\fR]

.SH DESCRIPTION
\fBMozilla Firefox\fR is an open-source web browser, designed for
standards compliance, performance and portability.

.SH USAGE
\fBfirefox\fR is a simple shell script that will set up the
environment for the actual executable, \fBfirefox-bin\fR.

.SH OPTIONS
A summary of the options supported by \fBfirefox\fR is included below.

.SS "GTK options"
\fB\-\-gdk-debug=\fR\fIFLAGS\fR
Gdk debugging flags to set
.TP
\fB\-\-gdk-no-debug=\fR\fIFLAGS\fR
Gdk debugging flags to unset
.TP
\fB\-\-gtk-debug=\fR\fIFLAGS\fR
Gtk+ debugging flags to set
.TP
\fB\-\-gtk-no-debug=\fR\fIFLAGS\fR
Gtk+ debugging flags to unset
.TP
\fB\-\-gtk-module=\fR\fIMODULE\fR
Load an additional Gtk module

.SS "X11 options"
.TP
.BI \-\-display= DISPLAY
X display to use
.TP
.B \--sync
Make X calls synchronous
.TP
.B \-\-no-xshm
Don't use X shared memory extension
.TP
.BI \-\-xim-preedit= STYLE
.TP
.BI \-\-xim-status= STYLE
.TP
.B \-\-g-fatal-warnings
Make all warnings fatal

.SS "Firefox options"
.TP
\fB\-height\fR \fIvalue\fR
Set height of startup window to \fIvalue\fR.
.TP
.B \-h, \-help
Show summary of options.
.TP
.B \-installer
Start with 4.x migration window.
.TP
\fB\-width\fR \fIvalue\fR
Set width of startup window to \fIvalue\fR.
.TP
.B \-v, \-version
Print \fB/usr/bin/firefox-bin\fR version.
.TP
\fB\-CreateProfile\fR \fIprofile\fR
Create \fIprofile\fR.
.TP
\fB\-P\fR \fIprofile\fR
Start with \fIprofile\fR.
.TP
.B \-ProfileWizard
Start with profile wizard.
.TP
.B \-ProfileManager
Start with profile manager.
.TP
.B \-SelectProfile
Start with profile selection dialog.
.TP
\fB\-lang\fR \fIlang-region\fR
Start with \fIlang-region\fR resources.
.TP
\fB\-remote\fR \fIcommand\fR
Execute \fIcommand\fR in an already running Firefox process.  For more info,
see: \fIhttp://www.mozilla.org/unix/remote.html\fR
.TP
.B \-splash
Enable splash screen.
.TP
.B \-jsconsole
Start with Javascript Console
.TP
\fB\-chrome\fR \fIurl\fR
Load the specified chrome.
.TP

.SH FILES
\fI/usr/bin/firefox\fR - shell script wrapping
\fBfirefox\fR
.br
\fI/usr/lib/mozilla/firefox-bin\fR - \fBfirefox\fR
executable

.SH VERSION
1.0

.SH BUGS
To report a bug, please visit \fIhttp://bugzilla.mozilla.org/\fR

.SH "SEE ALSO"
.BR mozilla(1)

.SH AUTHORS
.TP
.B The Mozilla Organization
.I http://www.mozilla.org/about.html


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/OLPC-2/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- .cvsignore	21 Nov 2007 13:31:01 -0000	1.8
+++ .cvsignore	21 Nov 2007 16:25:29 -0000	1.9
@@ -1 +1 @@
-xulrunner-1.9b1.tar.bz2
+xulrunner-20071120.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/OLPC-2/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources	21 Nov 2007 13:31:01 -0000	1.10
+++ sources	21 Nov 2007 16:25:29 -0000	1.11
@@ -1 +1 @@
-05d4cc5eb5557686a1a7359d072191ad  xulrunner-1.9b1.tar.bz2
+c2350415fb0172978981a42be68a9c8f  xulrunner-20071120.tar.bz2

xulrunner-1.9a6-no-native-theme.patch:

Index: xulrunner-1.9a6-no-native-theme.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/OLPC-2/xulrunner-1.9a6-no-native-theme.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xulrunner-1.9a6-no-native-theme.patch	21 Nov 2007 13:59:54 -0000	1.3
+++ xulrunner-1.9a6-no-native-theme.patch	21 Nov 2007 16:25:29 -0000	1.4
@@ -1,137 +1,13 @@
-Index: widget/src/gtk2/nsNativeThemeGTK.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/widget/src/gtk2/nsNativeThemeGTK.cpp,v
-retrieving revision 1.97
-diff -u -r1.97 nsNativeThemeGTK.cpp
---- widget/src/gtk2/nsNativeThemeGTK.cpp	27 Jun 2007 06:38:51 -0000	1.97
-+++ widget/src/gtk2/nsNativeThemeGTK.cpp	21 Jul 2007 11:59:59 -0000
-@@ -925,23 +925,23 @@
-     return PR_FALSE;
- 
-   switch (aWidgetType) {
--  case NS_THEME_BUTTON:
--  case NS_THEME_BUTTON_FOCUS:
--  case NS_THEME_RADIO:
--  case NS_THEME_RADIO_SMALL:
--  case NS_THEME_CHECKBOX:
--  case NS_THEME_CHECKBOX_SMALL:
--  case NS_THEME_TOOLBOX: // N/A
--  case NS_THEME_TOOLBAR:
--  case NS_THEME_TOOLBAR_BUTTON:
--  case NS_THEME_TOOLBAR_DUAL_BUTTON: // so we can override the border with 0
-+//  case NS_THEME_BUTTON:
-+//  case NS_THEME_BUTTON_FOCUS:
-+//  case NS_THEME_RADIO:
-+//  case NS_THEME_RADIO_SMALL:
-+//  case NS_THEME_CHECKBOX:
-+//  case NS_THEME_CHECKBOX_SMALL:
-+//  case NS_THEME_TOOLBOX: // N/A
-+//  case NS_THEME_TOOLBAR:
-+//  case NS_THEME_TOOLBAR_BUTTON:
-+//  case NS_THEME_TOOLBAR_DUAL_BUTTON: // so we can override the border with 0
-     // case NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN:
-     // case NS_THEME_TOOLBAR_SEPARATOR:
--  case NS_THEME_TOOLBAR_GRIPPER:
--  case NS_THEME_STATUSBAR:
--  case NS_THEME_STATUSBAR_PANEL:
-+//  case NS_THEME_TOOLBAR_GRIPPER:
-+//  case NS_THEME_STATUSBAR:
-+//  case NS_THEME_STATUSBAR_PANEL:
-     // case NS_THEME_RESIZER:  (n/a for gtk)
--  case NS_THEME_LISTBOX:
-+//  case NS_THEME_LISTBOX:
-     // case NS_THEME_LISTBOX_LISTITEM:
-     // case NS_THEME_TREEVIEW:
-     // case NS_THEME_TREEVIEW_TREEITEM:
-@@ -951,19 +951,19 @@
-     // case NS_THEME_TREEVIEW_HEADER_CELL:
-     // case NS_THEME_TREEVIEW_HEADER_SORTARROW:
-     // case NS_THEME_TREEVIEW_TWISTY_OPEN:
--    case NS_THEME_PROGRESSBAR:
--    case NS_THEME_PROGRESSBAR_CHUNK:
--    case NS_THEME_PROGRESSBAR_VERTICAL:
--    case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
--    case NS_THEME_TAB:
-+//    case NS_THEME_PROGRESSBAR:
-+//    case NS_THEME_PROGRESSBAR_CHUNK:
-+//    case NS_THEME_PROGRESSBAR_VERTICAL:
-+//    case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
-+//    case NS_THEME_TAB:
-     // case NS_THEME_TAB_PANEL:
--    case NS_THEME_TAB_LEFT_EDGE:
--    case NS_THEME_TAB_RIGHT_EDGE:
--    case NS_THEME_TAB_PANELS:
--  case NS_THEME_TOOLTIP:
-+//    case NS_THEME_TAB_LEFT_EDGE:
-+//    case NS_THEME_TAB_RIGHT_EDGE:
-+//    case NS_THEME_TAB_PANELS:
-+//  case NS_THEME_TOOLTIP:
-     // case NS_THEME_SPINNER:
--  case NS_THEME_SPINNER_UP_BUTTON:
--  case NS_THEME_SPINNER_DOWN_BUTTON:
-+//  case NS_THEME_SPINNER_UP_BUTTON:
-+//  case NS_THEME_SPINNER_DOWN_BUTTON:
-     // case NS_THEME_SCROLLBAR:  (n/a for gtk)
-   case NS_THEME_SCROLLBAR_BUTTON_UP:
-   case NS_THEME_SCROLLBAR_BUTTON_DOWN:
-@@ -975,31 +975,31 @@
-   case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
-     // case NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL:  (n/a for gtk)
-     // case NS_THEME_SCROLLBAR_GRIPPER_VERTICAL:  (n/a for gtk)
--  case NS_THEME_TEXTFIELD:
--  case NS_THEME_TEXTFIELD_MULTILINE:
-+//  case NS_THEME_TEXTFIELD:
-+//  case NS_THEME_TEXTFIELD_MULTILINE:
-     // case NS_THEME_TEXTFIELD_CARET:
-     // case NS_THEME_DROPDOWN_BUTTON:
--  case NS_THEME_DROPDOWN_TEXTFIELD:
--  case NS_THEME_SCALE_HORIZONTAL:
--  case NS_THEME_SCALE_THUMB_HORIZONTAL:
--  case NS_THEME_SCALE_VERTICAL:
--  case NS_THEME_SCALE_THUMB_VERTICAL:
-+//  case NS_THEME_DROPDOWN_TEXTFIELD:
-+//  case NS_THEME_SCALE_HORIZONTAL:
-+//  case NS_THEME_SCALE_THUMB_HORIZONTAL:
-+//  case NS_THEME_SCALE_VERTICAL:
-+//  case NS_THEME_SCALE_THUMB_VERTICAL:
-     // case NS_THEME_SCALE_THUMB_START:
-     // case NS_THEME_SCALE_THUMB_END:
-     // case NS_THEME_SCALE_TICK:
--  case NS_THEME_CHECKBOX_CONTAINER:
--  case NS_THEME_RADIO_CONTAINER:
--  case NS_THEME_CHECKBOX_LABEL:
--  case NS_THEME_RADIO_LABEL:
--  case NS_THEME_MENUBAR:
--  case NS_THEME_MENUPOPUP:
--  case NS_THEME_MENUITEM:
--  case NS_THEME_CHECKMENUITEM:
--  case NS_THEME_RADIOMENUITEM:
--  case NS_THEME_WINDOW:
--  case NS_THEME_DIALOG:
--  case NS_THEME_DROPDOWN:
--  case NS_THEME_DROPDOWN_TEXT:
-+//  case NS_THEME_CHECKBOX_CONTAINER:
-+//  case NS_THEME_RADIO_CONTAINER:
-+//  case NS_THEME_CHECKBOX_LABEL:
-+//  case NS_THEME_RADIO_LABEL:
-+//  case NS_THEME_MENUBAR:
-+//  case NS_THEME_MENUPOPUP:
-+//  case NS_THEME_MENUITEM:
-+//  case NS_THEME_CHECKMENUITEM:
-+//  case NS_THEME_RADIOMENUITEM:
-+//  case NS_THEME_WINDOW:
-+//  case NS_THEME_DIALOG:
-+//  case NS_THEME_DROPDOWN:
-+//  case NS_THEME_DROPDOWN_TEXT:
-     return !IsWidgetStyled(aPresContext, aFrame, aWidgetType);
-   }
- 
---- widget/src/gtk2/nsNativeThemeGTK.cpp.no-native-theme	2007-10-25 22:23:13.000000000 +0200
-+++ widget/src/gtk2/nsNativeThemeGTK.cpp	2007-11-21 14:56:21.000000000 +0100
-@@ -921,23 +921,23 @@
-     return PR_FALSE;
- 
-   switch (aWidgetType) {
+--- widget/src/gtk2/nsNativeThemeGTK.cpp.old	2007-11-21 17:11:03.000000000 +0100
++++ widget/src/gtk2/nsNativeThemeGTK.cpp	2007-11-21 17:19:10.000000000 +0100
+@@ -979,96 +979,6 @@
+                                       nsIFrame* aFrame,
+                                       PRUint8 aWidgetType)
+ {
+-  if (IsWidgetTypeDisabled(mDisabledWidgetTypes, aWidgetType))
+-    return PR_FALSE;
+-
+-  switch (aWidgetType) {
 -  case NS_THEME_BUTTON:
 -  case NS_THEME_BUTTON_FOCUS:
 -  case NS_THEME_RADIO:
@@ -142,83 +18,59 @@
 -  case NS_THEME_TOOLBAR:
 -  case NS_THEME_TOOLBAR_BUTTON:
 -  case NS_THEME_TOOLBAR_DUAL_BUTTON: // so we can override the border with 0
-+//  case NS_THEME_BUTTON:
-+//  case NS_THEME_BUTTON_FOCUS:
-+//  case NS_THEME_RADIO:
-+//  case NS_THEME_RADIO_SMALL:
-+//  case NS_THEME_CHECKBOX:
-+//  case NS_THEME_CHECKBOX_SMALL:
-+//  case NS_THEME_TOOLBOX: // N/A
-+//  case NS_THEME_TOOLBAR:
-+//  case NS_THEME_TOOLBAR_BUTTON:
-+//  case NS_THEME_TOOLBAR_DUAL_BUTTON: // so we can override the border with 0
-     // case NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN:
-     // case NS_THEME_TOOLBAR_SEPARATOR:
+-    // case NS_THEME_TOOLBAR_DUAL_BUTTON_DROPDOWN:
+-    // case NS_THEME_TOOLBAR_SEPARATOR:
 -  case NS_THEME_TOOLBAR_GRIPPER:
 -  case NS_THEME_STATUSBAR:
 -  case NS_THEME_STATUSBAR_PANEL:
-+//  case NS_THEME_TOOLBAR_GRIPPER:
-+//  case NS_THEME_STATUSBAR:
-+//  case NS_THEME_STATUSBAR_PANEL:
-     // case NS_THEME_RESIZER:  (n/a for gtk)
+-  case NS_THEME_STATUSBAR_RESIZER_PANEL:
+-  case NS_THEME_RESIZER:
 -  case NS_THEME_LISTBOX:
-+//  case NS_THEME_LISTBOX:
-     // case NS_THEME_LISTBOX_LISTITEM:
-     // case NS_THEME_TREEVIEW:
-     // case NS_THEME_TREEVIEW_TREEITEM:
-@@ -947,19 +947,19 @@
-     // case NS_THEME_TREEVIEW_HEADER_CELL:
-     // case NS_THEME_TREEVIEW_HEADER_SORTARROW:
-     // case NS_THEME_TREEVIEW_TWISTY_OPEN:
+-    // case NS_THEME_LISTBOX_LISTITEM:
+-  case NS_THEME_TREEVIEW:
+-    // case NS_THEME_TREEVIEW_TREEITEM:
+-  case NS_THEME_TREEVIEW_TWISTY:
+-    // case NS_THEME_TREEVIEW_LINE:
+-    // case NS_THEME_TREEVIEW_HEADER:
+-  case NS_THEME_TREEVIEW_HEADER_CELL:
+-  case NS_THEME_TREEVIEW_HEADER_SORTARROW:
+-  case NS_THEME_TREEVIEW_TWISTY_OPEN:
 -    case NS_THEME_PROGRESSBAR:
 -    case NS_THEME_PROGRESSBAR_CHUNK:
 -    case NS_THEME_PROGRESSBAR_VERTICAL:
 -    case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
 -    case NS_THEME_TAB:
-+//    case NS_THEME_PROGRESSBAR:
-+//    case NS_THEME_PROGRESSBAR_CHUNK:
-+//    case NS_THEME_PROGRESSBAR_VERTICAL:
-+//    case NS_THEME_PROGRESSBAR_CHUNK_VERTICAL:
-+//    case NS_THEME_TAB:
-     // case NS_THEME_TAB_PANEL:
+-    // case NS_THEME_TAB_PANEL:
 -    case NS_THEME_TAB_LEFT_EDGE:
 -    case NS_THEME_TAB_RIGHT_EDGE:
 -    case NS_THEME_TAB_PANELS:
 -  case NS_THEME_TOOLTIP:
-+//    case NS_THEME_TAB_LEFT_EDGE:
-+//    case NS_THEME_TAB_RIGHT_EDGE:
-+//    case NS_THEME_TAB_PANELS:
-+//  case NS_THEME_TOOLTIP:
-     // case NS_THEME_SPINNER:
+-    // case NS_THEME_SPINNER:
 -  case NS_THEME_SPINNER_UP_BUTTON:
 -  case NS_THEME_SPINNER_DOWN_BUTTON:
-+//  case NS_THEME_SPINNER_UP_BUTTON:
-+//  case NS_THEME_SPINNER_DOWN_BUTTON:
-     // case NS_THEME_SCROLLBAR:  (n/a for gtk)
-     // case NS_THEME_SCROLLBAR_SMALL: (n/a for gtk)
-   case NS_THEME_SCROLLBAR_BUTTON_UP:
-@@ -972,30 +972,30 @@
-   case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
-     // case NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL:  (n/a for gtk)
-     // case NS_THEME_SCROLLBAR_GRIPPER_VERTICAL:  (n/a for gtk)
+-    // case NS_THEME_SCROLLBAR:  (n/a for gtk)
+-    // case NS_THEME_SCROLLBAR_SMALL: (n/a for gtk)
+-  case NS_THEME_SCROLLBAR_BUTTON_UP:
+-  case NS_THEME_SCROLLBAR_BUTTON_DOWN:
+-  case NS_THEME_SCROLLBAR_BUTTON_LEFT:
+-  case NS_THEME_SCROLLBAR_BUTTON_RIGHT:
+-  case NS_THEME_SCROLLBAR_TRACK_HORIZONTAL:
+-  case NS_THEME_SCROLLBAR_TRACK_VERTICAL:
+-  case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
+-  case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
+-    // case NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL:  (n/a for gtk)
+-    // case NS_THEME_SCROLLBAR_GRIPPER_VERTICAL:  (n/a for gtk)
 -  case NS_THEME_TEXTFIELD:
 -  case NS_THEME_TEXTFIELD_MULTILINE:
-+//  case NS_THEME_TEXTFIELD:
-+//  case NS_THEME_TEXTFIELD_MULTILINE:
-     // case NS_THEME_TEXTFIELD_CARET:
+-    // case NS_THEME_TEXTFIELD_CARET:
 -  case NS_THEME_DROPDOWN_TEXTFIELD:
 -  case NS_THEME_SCALE_HORIZONTAL:
 -  case NS_THEME_SCALE_THUMB_HORIZONTAL:
 -  case NS_THEME_SCALE_VERTICAL:
 -  case NS_THEME_SCALE_THUMB_VERTICAL:
-+//  case NS_THEME_DROPDOWN_TEXTFIELD:
-+//  case NS_THEME_SCALE_HORIZONTAL:
-+//  case NS_THEME_SCALE_THUMB_HORIZONTAL:
-+//  case NS_THEME_SCALE_VERTICAL:
-+//  case NS_THEME_SCALE_THUMB_VERTICAL:
-     // case NS_THEME_SCALE_THUMB_START:
-     // case NS_THEME_SCALE_THUMB_END:
-     // case NS_THEME_SCALE_TICK:
+-    // case NS_THEME_SCALE_THUMB_START:
+-    // case NS_THEME_SCALE_THUMB_END:
+-    // case NS_THEME_SCALE_TICK:
 -  case NS_THEME_CHECKBOX_CONTAINER:
 -  case NS_THEME_RADIO_CONTAINER:
 -  case NS_THEME_CHECKBOX_LABEL:
@@ -232,19 +84,16 @@
 -  case NS_THEME_DIALOG:
 -  case NS_THEME_DROPDOWN:
 -  case NS_THEME_DROPDOWN_TEXT:
-+//  case NS_THEME_CHECKBOX_CONTAINER:
-+//  case NS_THEME_RADIO_CONTAINER:
-+//  case NS_THEME_CHECKBOX_LABEL:
-+//  case NS_THEME_RADIO_LABEL:
-+//  case NS_THEME_MENUBAR:
-+//  case NS_THEME_MENUPOPUP:
-+//  case NS_THEME_MENUITEM:
-+//  case NS_THEME_CHECKMENUITEM:
-+//  case NS_THEME_RADIOMENUITEM:
-+//  case NS_THEME_WINDOW:
-+//  case NS_THEME_DIALOG:
-+//  case NS_THEME_DROPDOWN:
-+//  case NS_THEME_DROPDOWN_TEXT:
-     return !IsWidgetStyled(aPresContext, aFrame, aWidgetType);
+-    return !IsWidgetStyled(aPresContext, aFrame, aWidgetType);
+-
+-  case NS_THEME_DROPDOWN_BUTTON:
+-    // "Native" dropdown buttons cause padding and margin problems, but only
+-    // in HTML so allow them in XUL.
+-    return (!aFrame || aFrame->GetContent()->IsNodeOfType(nsINode::eXUL)) &&
+-           !IsWidgetStyled(aPresContext, aFrame, aWidgetType);
+-
+-  }
+-
+   return PR_FALSE;
+ }
  
-   case NS_THEME_DROPDOWN_BUTTON:


Index: xulrunner-mozconfig
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/OLPC-2/xulrunner-mozconfig,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- xulrunner-mozconfig	11 Jul 2007 08:30:45 -0000	1.5
+++ xulrunner-mozconfig	21 Nov 2007 16:25:29 -0000	1.6
@@ -1,19 +1,20 @@
 . $topsrcdir/xulrunner/config/mozconfig
 
-# FIXME failures in nsNSSComponent.cpp
-#ac_add_options --with-system-nss
-# FIXME we need to fix nspr and reenable this.
+ac_add_options --prefix="$PREFIX"
+ac_add_options --libdir="$LIBDIR"
 #ac_add_options --with-system-nspr
+#ac_add_options --with-system-nss
 ac_add_options --with-system-jpeg
 ac_add_options --with-system-zlib
-# FIXME missing APNG support
 #ac_add_options --with-system-png
 ac_add_options --with-pthreads
 ac_add_options --disable-strip
 ac_add_options --disable-tests
-ac_add_options --disable-debug
 ac_add_options --disable-installer
+ac_add_options --disable-debug
 ac_add_options --enable-optimize="$RPM_OPT_FLAGS"
+#ac_add_options --enable-debug
+#ac_add_options --disable-optimize
 ac_add_options --enable-xinerama
 ac_add_options --enable-default-toolkit=cairo-gtk2
 ac_add_options --disable-xprint
@@ -24,9 +25,10 @@
 ac_add_options --disable-javaxpcom
 ac_add_options --disable-gnomeui
 ac_add_options --disable-gnomevfs
+#ac_add_options --enable-extensions=default,cookie
 ac_add_options --enable-extensions=default,cookie,python
-ac_add_options --prefix="$PREFIX"
-ac_add_options --libdir="$LIBDIR"
+ac_add_options --disable-airbag
+
 export BUILD_OFFICIAL=1
 export MOZILLA_OFFICIAL=1
 mk_add_options BUILD_OFFICIAL=1


Index: xulrunner.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xulrunner/OLPC-2/xulrunner.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- xulrunner.spec	21 Nov 2007 13:49:56 -0000	1.35
+++ xulrunner.spec	21 Nov 2007 16:25:29 -0000	1.36
@@ -1,81 +1,189 @@
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%define desktop_file_utils_version 0.9
+%define nspr_version 4.6.99
+%define nss_version 3.11.99
+%define cairo_version 0.5
+%define builddir %{_builddir}/mozilla
+%define build_devel_package 1
 
-%define nss_version 3.10
-%define cairo_version 1.3.12
-%define prerelease b1
+%define official_branding 0
 
-Summary:        XUL Runner
+
+Summary:        XUL Runtime for Gecko Applications
 Name:           xulrunner
 Version:        1.9
-Release:        0.11.%{prerelease}%{?dist}
-URL:            http://www.mozilla.org
-License:        MPL/LGPL
+Release:        0.beta1.1%{?dist}
+URL:            http://www.mozilla.org/projects/xulrunner/
+License:        MPLv1.1 or GPLv2+ or LGPLv2+
 Group:          Applications/Internet
-Source0:        http://dev.laptop.org/pub/sugar/xulrunner/xulrunner-%{version}%{prerelease}.tar.bz2
-Source10:       xulrunner-mozconfig
-Source12:       xulrunner-olpc-default-prefs.js
-
-Patch1:         xulrunner-1.9a6-no-native-theme.patch
-Patch2:         xulrunner-1.9a3pre-dpi.patch
-Patch3:         xulrunner-1.9a5pre-build.patch
-Patch4:         xulrunner-1.9a6-xds.patch
+%if %{official_branding}
+%define tarball xulrunner-%{version}-source.tar.bz2
+%else
+%define tarball xulrunner-20071120.tar.bz2
+%endif
+Source0:        %{tarball}
+Source10:       %{name}-mozconfig
+Source12:       %{name}-redhat-default-prefs.js
+#Source20:       %{name}.desktop
+#Source21:       %{name}.sh.in
+Source23:       %{name}.1
+Source100:      find-external-requires
+Source101:      add-gecko-provides.in
+
+# build patches
+Patch1:         firefox-2.0-link-layout.patch
+Patch2:         camellia256.patch
+Patch3:         xulrunner-compile.patch
+Patch4:         mozilla-build.patch
+
+# customization patches
+Patch21:        firefox-0.7.3-psfonts.patch
+
+# local bugfixes
+Patch41:        firefox-2.0.0.4-undo-uriloader.patch
+Patch42:        firefox-1.1-uriloader.patch
+
+# font system fixes
+
+# Other
+Patch104:       mozilla-firefox-head.ppc64.patch
+Patch105:       mozilla-sqlite-build.patch
+Patch106:       mozilla-gtkmozembed.patch
+Patch107:       mozilla-xulrunner-pkgconfig.patch
+
+# OLPC
+Patch201:       xulrunner-1.9a6-no-native-theme.patch
+Patch202:       xulrunner-1.9a3pre-dpi.patch
+Patch203:       xulrunner-1.9a5pre-build.patch
+Patch204:       xulrunner-1.9a6-xds.patch
+
+%if %{official_branding}
+# Required by Mozilla Corporation
+
+
+%else
+# Not yet approved by Mozillla Corporation
+
+
+%endif
 
 # ---------------------------------------------------
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires:  nspr-devel >= %{nspr_version}
 BuildRequires:  nss-devel >= %{nss_version}
 BuildRequires:  cairo-devel >= %{cairo_version}
 BuildRequires:  libpng-devel, libjpeg-devel
 BuildRequires:  zlib-devel, zip
 BuildRequires:  libIDL-devel
+#BuildRequires:  desktop-file-utils
 BuildRequires:  gtk2-devel
+BuildRequires:  gnome-vfs2-devel
+#BuildRequires:  libgnome-devel
+#BuildRequires:  libgnomeui-devel
 BuildRequires:  krb5-devel
 BuildRequires:  pango-devel
 BuildRequires:  freetype-devel >= 2.1.9
 BuildRequires:  libXt-devel
 BuildRequires:  libXrender-devel
-BuildRequires:  python-devel
-BuildRequires:  nspr-devel
+#BuildRequires:  system-bookmarks
 BuildRequires:  curl-devel
 
-Requires:       nss >= %{nss_version}
-Requires:       pkgconfig
-
+#Requires:       nspr >= %{nspr_version}
+#Requires:       nss >= %{nss_version}
+#Requires:       desktop-file-utils >= %{desktop_file_utils_version}
+#Requires:       system-bookmarks
+Obsoletes:      phoenix, mozilla-firebird, MozillaFirebird
+#Obsoletes:      mozilla <= 37:1.7.13
+#Obsoletes:      firefox < 2.1
+Provides:       webclient
 Provides:       gecko-libs = %{version}
-%define mozappdir %{_libdir}/%{name}-%{version}%{prerelease}
+
+%define _use_internal_dependency_generator 0
+
+%if %{build_devel_package}
+%define __find_provides %{_builddir}/add-gecko-provides
+%else
+%define __find_requires %{SOURCE100}
+%endif
 
 %description
-XULRunner is a Mozilla runtime package that can be used to bootstrap XUL+XPCOM
-applications that are as rich as Firefox and Thunderbird. It will provide
-mechanisms for installing, upgrading, and uninstalling these applications.
-XULRunner will also provide libxul, a solution which allows the embedding
-of Mozilla technologies in other projects and products.
+XULRunner provides the XUL Runtime environment for Gecko applications.
 
+%if %{build_devel_package}
 %package devel
-Summary: Libraries and headers for gecko-embed
+Summary: Development files for Gecko
 Group: Development/Libraries
-Requires: %name = %{version}
+#Obsoletes: mozilla-devel
+#Obsoletes: firefox-devel < 2.1
+Requires: xulrunner = %{version}-%{release}
+Requires: nspr-devel >= %{nspr_version}
+Requires: nss-devel >= %{nss_version}
 Provides: gecko-devel = %{version}
 
 %description devel
-XUL Runner devel is...
+Gecko development files.
+%endif
+
+#---------------------------------------------------------------------
 
 %prep
-%setup -q -n xulrunner-%{version}%{prerelease}
+%setup -q -n mozilla
+%patch1   -p1 -b .link-layout
+%patch2   -R -p1 -b .camellia256
+%patch3   -p1
+%patch4   -p1
+
+%patch104 -p0 -b .ppc64
+%patch105 -p1 -b .sqlite
+%patch106 -p1
+
+%patch201 -p0 -b .no-native-theme
+%patch202 -p0 -b .dpi
+%patch203 -p0 -b .build
+%patch204 -p0 -b .xds
+
+# Install missing *.pc files
+pushd xulrunner/installer
+
+# Copy as xpcom
+cp libxul.pc.in mozilla-xpcom.pc.in
+cp libxul-embedding.pc.in mozilla-embedding.pc.in
+
+# Copy to expected xulrunner-*.pc
+cp mozilla-js.pc.in xulrunner-js.pc.in
+cp mozilla-plugin.pc.in xulrunner-plugin.pc.in
+cp mozilla-xpcom.pc.in xulrunner-xpcom.pc.in
+cp mozilla-embedding.pc.in xulrunner-embedding.pc.in
+cp mozilla-gtkmozembed.pc.in xulrunner-gtkmozembed.pc.in
+popd
+
+%patch107 -p1 -b .old
+
+
+# For branding specific patches.
+
+%if %{official_branding}
+# Required by Mozilla Corporation
+
+
+%else
+# Not yet approved by Mozilla Corporation
 
-%patch1 -p0 -b .no-native-theme
-%patch2 -p0 -b .dpi
-%patch3 -p0 -b .build
-%patch4 -p0 -b .xds
+
+%endif
 
 %{__rm} -f .mozconfig
 %{__cp} %{SOURCE10} .mozconfig
+%if %{official_branding}
+%{__cat} %{SOURCE11} >> .mozconfig
+%endif
 
-cat << EOF >> .mozconfig
-ac_add_options --with-default-mozilla-five-home=%{_libdir}/xulrunner-%{version} 
-EOF
+#---------------------------------------------------------------------
 
 %build
+INTERNAL_GECKO=`./config/milestone.pl --topsrcdir=.`
+MOZ_APP_DIR=%{_libdir}/%{name}-${INTERNAL_GECKO}
+
 # Build with -Os as it helps the browser; also, don't override mozilla's warning
 # level; they use -Wall but disable a few warnings that show up _everywhere_
 MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | %{__sed} -e 's/-O2/-Os/' -e 's/-Wall//')
@@ -90,42 +198,205 @@
 %define moz_make_flags %{?_smp_mflags}
 %endif
 
-export LDFLAGS="-Wl,-rpath,%{mozappdir}"
-MAKE="gmake %{?_smp_mflags}" 
+export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}"
+export MAKE="gmake %{moz_make_flags}"
 make -f client.mk build
 
+#---------------------------------------------------------------------
+
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+%{__rm} -rf $RPM_BUILD_ROOT
+
+INTERNAL_GECKO=`./config/milestone.pl --topsrcdir=.`
+INTERNAL_APP_NAME=%{name}-${INTERNAL_GECKO}
+MOZ_APP_DIR=%{_libdir}/${INTERNAL_APP_NAME}
+
+DESTDIR=$RPM_BUILD_ROOT make install
+
+%{__mkdir_p} $RPM_BUILD_ROOT/${MOZ_APP_DIR} \
+             $RPM_BUILD_ROOT%{_datadir}/idl/${INTERNAL_APP_NAME} \
+             $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_NAME}
+%{__install} -p -d dist/sdk/include $RPM_BUILD_ROOT%{_includedir}/${INTERNAL_APP_NAME}
+%{__install} -p -d dist/sdk/idl $RPM_BUILD_ROOT%{_datadir}/idl/${INTERNAL_APP_NAME}
+%{__install} -p dist/sdk/bin/* $RPM_BUILD_ROOT/$MOZ_APP_DIR
+%{__install} -p dist/sdk/lib/* $RPM_BUILD_ROOT/$MOZ_APP_DIR
+
+%{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications}
+
+#desktop-file-install --vendor mozilla \
+#  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
+#  --add-category WebBrowser \
+#  --add-category Network \
+#  %{SOURCE20} 
+
+# set up our default preferences
+%{__cat} %{SOURCE12} | %{__sed} -e 's,RPM_VERREL,%{version}-%{release},g' > rh-default-prefs
+%{__install} -p -D -m 644 rh-default-prefs $RPM_BUILD_ROOT/${MOZ_APP_DIR}/defaults/pref/all-redhat.js
+%{__rm} rh-default-prefs
+
+%{__install} -p -D -m 644 %{SOURCE23} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
+
+%{__rm} -f $RPM_BUILD_ROOT${MOZ_APP_DIR}/%{name}-config
+
+cd $RPM_BUILD_ROOT${MOZ_APP_DIR}/chrome
+find . -name "*" -type d -maxdepth 1 -exec %{__rm} -rf {} \;
+cd -
+
+%if %{official_branding}
+%{__mkdir_p} $RPM_BUILD_ROOT${MOZ_APP_DIR}/chrome/icons/default/
+%{__cp} other-licenses/branding/%{name}/default.xpm \
+        $RPM_BUILD_ROOT${MOZ_APP_DIR}/chrome/icons/default/ 
+%{__cp} other-licenses/branding/%{name}/default.xpm \
+        $RPM_BUILD_ROOT${MOZ_APP_DIR}/icons/
+%endif
 
 # own mozilla plugin dir (#135050)
 %{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/mozilla/plugins
 
-# set up our default preferences
-%{__cp} %{SOURCE12} $RPM_BUILD_ROOT/%{mozappdir}/greprefs/all-olpc.js
-%{__cp} %{SOURCE12} $RPM_BUILD_ROOT/%{mozappdir}/defaults/pref/all-olpc.js
+# Prepare our devel package
+%if %{build_devel_package}
+%{__mkdir_p} $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME}
+%{__mkdir_p} $RPM_BUILD_ROOT/%{_datadir}/idl/${INTERNAL_APP_NAME}
+%{__mkdir_p} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
+%{__cp} -rL dist/include/* \
+  $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME}
+%{__cp} -rL dist/idl/* \
+  $RPM_BUILD_ROOT/%{_datadir}/idl/${INTERNAL_APP_NAME}
+install -c -m 755 dist/bin/xpcshell \
+  dist/bin/xpidl \
+  dist/bin/xpt_dump \
+  dist/bin/xpt_link \
+  $RPM_BUILD_ROOT/${MOZ_APP_DIR}
+%endif
+
+# GRE stuff
+#%ifarch x86_64 ia64 ppc64 s390x
+#%define gre_conf_file gre64.conf
+#%else
+#%define gre_conf_file gre.conf
+#%endif
+
+#%{__mkdir_p} $RPM_BUILD_ROOT/etc/gre.d/
+#%{__cat} > $RPM_BUILD_ROOT/etc/gre.d/%{gre_conf_file} << EOF
+#[%{version}]
+#GRE_PATH=${MOZ_APP_DIR}
+#EOF
+
+# Library path
+%{__mkdir_p} $RPM_BUILD_ROOT/etc/ld.so.conf.d
+%{__cat} > $RPM_BUILD_ROOT/etc/ld.so.conf.d/xulrunner.conf << EOF
+${MOZ_APP_DIR}
+EOF
+
+GECKO_VERSION=$(./config/milestone.pl --topsrcdir='.')
+%{__cat} %{SOURCE101} | %{__sed} -e "s/@GECKO_VERSION@/$GECKO_VERSION/g" > \
+                        %{_builddir}/add-gecko-provides
+chmod 700 %{_builddir}/add-gecko-provides
+                        
+# Copy over the LICENSE
+install -c -m 644 LICENSE $RPM_BUILD_ROOT${MOZ_APP_DIR}
+
+# ghost files
+%{__mkdir_p} $RPM_BUILD_ROOT${MOZ_APP_DIR}/components
+touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/compreg.dat
+touch $RPM_BUILD_ROOT${MOZ_APP_DIR}/components/xpti.dat
+
+# remove unused files
+rm -rf $RPM_BUILD_ROOT/etc/gre.d
+rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/crashreporter
+rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/crashreporter.ini
+
+#rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/*.a
+
+rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/bin
+rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/lib
+rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/include
+rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/idl
+
+rm -rf $RPM_BUILD_ROOT${MOZ_APP_DIR}/sdk/lib
+ln -s ${MOZ_APP_DIR} $RPM_BUILD_ROOT${MOZ_APP_DIR}/sdk/lib
+
+#---------------------------------------------------------------------
 
 %clean
 %{__rm} -rf $RPM_BUILD_ROOT
 
+#---------------------------------------------------------------------
+
+%post
+/sbin/ldconfig
+#update-desktop-database %{_datadir}/applications
+
+%postun
+/sbin/ldconfig
+#update-desktop-database %{_datadir}/applications
+
+%preun
+# is it a final removal?
+if [ $1 -eq 0 ]; then
+  %{__rm} -rf ${MOZ_APP_DIR}/components
+fi
+
 %files
 %defattr(-,root,root,-)
-%doc LICENSE LEGAL
 %{_bindir}/xulrunner
-%{_sysconfdir}/gre.d/*.system.conf
+#%exclude %{_bindir}/xulrunner-config
+%{_mandir}/man1/*
 %{_libdir}/mozilla
-%{_libdir}/xulrunner-%{version}%{prerelease}
+#%dir /etc/gre.d
+#/etc/gre.d/%{gre_conf_file}
+%dir %{_libdir}/%{name}-*
+%{_libdir}/%{name}-*/LICENSE
+%{_libdir}/%{name}-*/README.txt
+%{_libdir}/%{name}-*/chrome
+%{_libdir}/%{name}-*/dictionaries
+%dir %{_libdir}/%{name}-*/components
+%ghost %{_libdir}/%{name}-*/components/compreg.dat
+%ghost %{_libdir}/%{name}-*/components/xpti.dat
+%{_libdir}/%{name}-*/components/*.xpt
+%{_libdir}/%{name}-*/components/*.js
+%{_libdir}/%{name}-*/defaults
+%{_libdir}/%{name}-*/greprefs
+%{_libdir}/%{name}-*/icons
+%{_libdir}/%{name}-*/modules
+%{_libdir}/%{name}-*/plugins
+%{_libdir}/%{name}-*/res
+%{_libdir}/%{name}-*/*.so
+%{_libdir}/%{name}-*/mozilla-xremote-client
+%{_libdir}/%{name}-*/run-mozilla.sh
+%{_libdir}/%{name}-*/regxpcom
+%{_libdir}/%{name}-*/xulrunner
+%{_libdir}/%{name}-*/xulrunner-bin
+%{_libdir}/%{name}-*/xulrunner-stub
+%{_libdir}/%{name}-*/platform.ini
+%{_libdir}/%{name}-*/dependentlibs.list
+%{_sysconfdir}/ld.so.conf.d/xulrunner.conf
+
+# XXX See if these are needed still
+%{_libdir}/%{name}-*/updater*
 
+%if %{build_devel_package}
 %files devel
-%defattr(-, root, root)
+%defattr(-,root,root)
+%{_datadir}/idl/%{name}-*
+%{_includedir}/%{name}-*
+%dir %{_libdir}/%{name}-*
+%{_libdir}/%{name}-*/xpcshell
+%{_libdir}/%{name}-*/xpicleanup
+%{_libdir}/%{name}-*/xpidl
+%{_libdir}/%{name}-*/xpt_dump
+%{_libdir}/%{name}-*/xpt_link
+%{_libdir}/%{name}-*/xpcom-config.h
+%{_libdir}/%{name}-*/sdk/*
+%{_libdir}/%{name}-*/*.a
 %{_libdir}/pkgconfig/*.pc
-%{_datadir}/idl/xulrunner-%{version}%{prerelease}
-%{_libdir}/xulrunner-devel-%{version}%{prerelease}
-%{_includedir}/xulrunner-%{version}%{prerelease}
+%endif
+
+#---------------------------------------------------------------------
 
 %changelog
-* Wed Nov 21 2007 Marco Pesenti Gritti <mpg at redhat.com> - 1.9-0.11.b1
-- Update to 1.9b1
+* Wed Nov 21 2007 Marco Pesenti Gritti <marco at localhost.localdomain> - 1.9-0.beta1.1
+- Resync with devel
 
 * Wed Oct 10 2007 Marco Pesenti Gritti <mpg at redhat.com> - 1.9-0.10.a9
 - Upgrade to an a9 snapshot




More information about the fedora-extras-commits mailing list