Compare commits

..

1 commit

Author SHA1 Message Date
Karsten Hopp
5d200586b7 xulrunner-10 was the latest version that worked on PPC, need to
bump release and rebuild
2012-05-08 14:05:50 +02:00
28 changed files with 12558 additions and 1 deletions

26
.gitignore vendored Normal file
View file

@ -0,0 +1,26 @@
xulrunner-1.9.2.7.source.tar.bz2
xulrunner-1.9.3.0b3.source.tar.bz2
/xulrunner-1.9.3.0b4.source.tar.bz2
/xulrunner-2.0b6.source.tar.bz2
/xulrunner-4.0b7.source.tar.bz2
/xulrunner-2.0b7.source.tar.bz2
/xulrunner-2.0b8.source.tar.bz2
/xulrunner-2.0b9.source.tar.bz2
/xulrunner-2.0b10.source.tar.bz2
/xulrunner-2.0b11.source.tar.bz2
/xulrunner-2.0b12.source.tar.bz2
/xulrunner-2.0rc1.source.tar.bz2
/xulrunner-2.0rc2.source.tar.bz2
/xulrunner-2.0.source.tar.bz2
/xulrunner-2.0.1.source.tar.bz2
/xulrunner-5.0.source.tar.bz2
/xulrunner-6.0.source.tar.bz2
/xulrunner-6.0.2.source.tar.bz2
/xulrunner-7.0.source.tar.bz2
/xulrunner-7.0.1.source.tar.bz2
/xulrunner-8.0.source.tar.bz2
/xulrunner-9.0.source.tar.bz2
/xulrunner-9.0.1.source.tar.bz2
/xulrunner-10.0b6.source.tar.bz2
/xulrunner-10.0.source.tar.bz2
/xulrunner-10.0.1.source.tar.bz2

8846
add-gtkmozembed-10.0.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,11 @@
diff -up comm-1.9.2/mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in.static comm-1.9.2/mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in
--- mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in.static 2010-06-23 19:47:11.000000000 +0200
+++ mozilla/toolkit/crashreporter/google-breakpad/src/tools/linux/dump_syms/Makefile.in 2010-07-12 15:51:41.000000000 +0200
@@ -64,6 +64,6 @@ FORCE_USE_PIC = 1
#XXX: bug 554854 causes us to be unable to run binaries on the build slaves
# due to them having an older libstdc++
-HOST_LDFLAGS += -static
+#HOST_LDFLAGS += -static
include $(topsrcdir)/config/rules.mk

View file

@ -1 +0,0 @@
This package is no longer supported by upstream

View file

@ -0,0 +1,32 @@
diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in
--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in.pk 2010-08-06 03:09:24.000000000 +0200
+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul-embedding.pc.in 2010-08-16 11:12:32.000000000 +0200
@@ -6,5 +6,6 @@ idldir=%idldir%
Name: libxul-embedding
Description: Static library for version-independent embedding of the Mozilla runtime
Version: %MOZILLA_VERSION%
+Requires: %NSPR_NAME% >= %NSPR_VERSION%
Libs: -L${sdkdir}/lib -lxpcomglue -ldl
Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in
--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in.pk 2010-08-06 03:09:24.000000000 +0200
+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/libxul.pc.in 2010-08-16 11:07:52.000000000 +0200
@@ -2,6 +2,7 @@ prefix=%prefix%
sdkdir=%sdkdir%
includedir=%includedir%
idldir=%idldir%
+libdir=%libdir%
Name: libxul
Description: The Mozilla Runtime and Embedding Engine
diff -up xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in
--- xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in.pk 2010-08-16 11:07:52.000000000 +0200
+++ xulrunner-1.9.3.0/mozilla-central/xulrunner/installer/Makefile.in 2010-08-16 11:07:52.000000000 +0200
@@ -116,6 +116,7 @@ endif
-e "s|%includedir%|$(includedir)|" \
-e "s|%idldir%|$(idldir)|" \
-e "s|%sdkdir%|$(sdkdir)|" \
+ -e "s|%libdir%|$(installdir)|" \
-e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
-e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \

15
mozilla-639554.patch Normal file
View file

@ -0,0 +1,15 @@
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -621,10 +621,12 @@ ifdef INSTALL_SDK # Here comes the hard
(cd $(DESTDIR)$(idldir) && tar -xf -)
# SDK directory is the libs + a bunch of symlinks
$(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/lib
+ $(NSINSTALL) -D $(DESTDIR)$(sdkdir)/sdk/bin
if test -f $(DIST)/include/xpcom-config.h; then \
$(SYSINSTALL) $(IFLAGS1) $(DIST)/include/xpcom-config.h $(DESTDIR)$(sdkdir); \
fi
(cd $(DIST)/sdk/lib && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/lib && tar -xf -)
+ (cd $(DIST)/sdk/bin && tar $(TAR_CREATE_FLAGS) - .) | (cd $(DESTDIR)$(sdkdir)/sdk/bin && tar -xf -)
$(RM) -f $(DESTDIR)$(sdkdir)/lib $(DESTDIR)$(sdkdir)/bin $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/include $(DESTDIR)$(sdkdir)/sdk/idl $(DESTDIR)$(sdkdir)/idl
ln -s $(sdkdir)/sdk/lib $(DESTDIR)$(sdkdir)/lib
ln -s $(installdir) $(DESTDIR)$(sdkdir)/bin

358
mozilla-682832-proxy.patch Normal file
View file

@ -0,0 +1,358 @@
diff -up xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp.682832 xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp
--- xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp.682832 2012-01-18 17:25:24.000000000 +0100
+++ xulrunner-10.0/mozilla-beta/toolkit/system/gnome/nsGSettingsService.cpp 2012-01-23 15:40:14.803170842 +0100
@@ -44,6 +44,8 @@
#include "nsMemory.h"
#include "prlink.h"
#include "nsComponentManagerUtils.h"
+#include "nsIMutableArray.h"
+#include "nsISupportsPrimitives.h"
#include <glib.h>
#include <glib-object.h>
@@ -60,6 +62,7 @@ typedef struct _GVariant GVariant;
# define G_VARIANT_TYPE_STRING ((const GVariantType *) "s")
# define G_VARIANT_TYPE_OBJECT_PATH ((const GVariantType *) "o")
# define G_VARIANT_TYPE_SIGNATURE ((const GVariantType *) "g")
+# define G_VARIANT_TYPE_STRING_ARRAY ((const GVariantType *) "as")
#endif
#define GSETTINGS_FUNCTIONS \
@@ -72,6 +75,7 @@ typedef struct _GVariant GVariant;
FUNC(g_variant_get_int32, gint32, (GVariant* variant)) \
FUNC(g_variant_get_boolean, gboolean, (GVariant* variant)) \
FUNC(g_variant_get_string, const char *, (GVariant* value, gsize* length)) \
+ FUNC(g_variant_get_strv, const char **, (GVariant* value, gsize* length)) \
FUNC(g_variant_is_of_type, gboolean, (GVariant* value, const GVariantType* type)) \
FUNC(g_variant_new_int32, GVariant *, (gint32 value)) \
FUNC(g_variant_new_boolean, GVariant *, (gboolean value)) \
@@ -95,6 +99,7 @@ GSETTINGS_FUNCTIONS
#define g_variant_get_int32 _g_variant_get_int32
#define g_variant_get_boolean _g_variant_get_boolean
#define g_variant_get_string _g_variant_get_string
+#define g_variant_get_strv _g_variant_get_strv
#define g_variant_is_of_type _g_variant_is_of_type
#define g_variant_new_int32 _g_variant_new_int32
#define g_variant_new_boolean _g_variant_new_boolean
@@ -267,6 +272,49 @@ nsGSettingsCollection::GetInt(const nsAC
return NS_OK;
}
+NS_IMETHODIMP
+nsGSettingsCollection::GetStringList(const nsACString& aKey, nsIArray** aResult)
+{
+ if (!KeyExists(aKey))
+ return NS_ERROR_INVALID_ARG;
+
+ nsCOMPtr<nsIMutableArray> items(do_CreateInstance(NS_ARRAY_CONTRACTID));
+ if (!items) {
+ return NS_ERROR_OUT_OF_MEMORY;
+ }
+
+ GVariant *value = g_settings_get_value(mSettings,
+ PromiseFlatCString(aKey).get());
+
+ if (!g_variant_is_of_type(value, G_VARIANT_TYPE_STRING_ARRAY)) {
+ g_variant_unref(value);
+ return NS_ERROR_FAILURE;
+ }
+
+ const gchar ** gs_strings = g_variant_get_strv(value, NULL);
+ if (!gs_strings) {
+ // empty array
+ NS_ADDREF(*aResult = items);
+ g_variant_unref(value);
+ return NS_OK;
+ }
+
+ const gchar** p_gs_strings = gs_strings;
+ while (*p_gs_strings != NULL)
+ {
+ nsCOMPtr<nsISupportsCString> obj(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
+ if (obj) {
+ obj->SetData(nsDependentCString(*p_gs_strings));
+ items->AppendElement(obj, false);
+ }
+ p_gs_strings++;
+ }
+ g_free(gs_strings);
+ NS_ADDREF(*aResult = items);
+ g_variant_unref(value);
+ return NS_OK;
+}
+
// These types are local to nsGSettingsService::Init, but ISO C++98 doesn't
// allow a template (ArrayLength) to be instantiated based on a local type.
// Boo-urns!
diff -up xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
--- xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.682832 2012-01-18 17:25:24.000000000 +0100
+++ xulrunner-10.0/mozilla-beta/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2012-01-23 15:39:23.083172529 +0100
@@ -49,6 +49,7 @@
#include "nsPrintfCString.h"
#include "nsNetUtil.h"
#include "nsISupportsPrimitives.h"
+#include "nsIGSettingsService.h"
class nsUnixSystemProxySettings : public nsISystemProxySettings {
public:
@@ -62,9 +63,12 @@ private:
~nsUnixSystemProxySettings() {}
nsCOMPtr<nsIGConfService> mGConf;
+ nsCOMPtr<nsIGSettingsService> mGSettings;
bool IsProxyMode(const char* aMode);
nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
+ nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
+ nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
};
NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
@@ -73,6 +77,7 @@ nsresult
nsUnixSystemProxySettings::Init()
{
mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+ mGSettings = do_GetService(NS_GSETTINGSSERVICE_CONTRACTID);
return NS_OK;
}
@@ -87,14 +92,31 @@ nsUnixSystemProxySettings::IsProxyMode(c
nsresult
nsUnixSystemProxySettings::GetPACURI(nsACString& aResult)
{
- if (!mGConf || !IsProxyMode("auto")) {
- // Return an empty string in this case
- aResult.Truncate();
- return NS_OK;
+ if (mGSettings) {
+ nsCOMPtr<nsIGSettingsCollection> proxy_settings;
+ mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
+ getter_AddRefs(proxy_settings));
+ if (proxy_settings) {
+ nsCString proxyMode;
+ // Check if mode is auto
+ nsresult rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode);
+ if (rv == NS_OK && proxyMode.Equals("auto")) {
+ return proxy_settings->GetString(NS_LITERAL_CSTRING("autoconfig-url"), aResult);
+ }
+ /* The org.gnome.system.proxy schema has been found, but auto mode is not set.
+ * Don't try the GConf and return empty string. */
+ aResult.Truncate();
+ return NS_OK;
+ }
}
- return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
- aResult);
+ if (mGConf && IsProxyMode("auto")) {
+ return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
+ aResult);
+ }
+ // Return an empty string when auto mode is not set.
+ aResult.Truncate();
+ return NS_OK;
}
static bool
@@ -231,7 +253,38 @@ nsUnixSystemProxySettings::SetProxyResul
PRInt32 port;
rv = mGConf->GetInt(portKey, &port);
NS_ENSURE_SUCCESS(rv, rv);
+
+ /* When port is 0, proxy is not considered as enabled even if host is set. */
+ if (port == 0)
+ return NS_ERROR_FAILURE;
+
+ SetProxyResult(aType, host, port, aResult);
+ return NS_OK;
+}
+
+nsresult
+nsUnixSystemProxySettings::SetProxyResultFromGSettings(const char* aKeyBase, const char* aType,
+ nsACString& aResult)
+{
+ nsCOMPtr<nsIGSettingsCollection> proxy_settings;
+ nsresult rv = mGSettings->GetCollectionForSchema(nsDependentCString(aKeyBase),
+ getter_AddRefs(proxy_settings));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ nsCAutoString host;
+ rv = proxy_settings->GetString(NS_LITERAL_CSTRING("host"), host);
+ NS_ENSURE_SUCCESS(rv, rv);
+ if (host.IsEmpty())
+ return NS_ERROR_FAILURE;
+
+ PRInt32 port;
+ rv = proxy_settings->GetInt(NS_LITERAL_CSTRING("port"), &port);
+ NS_ENSURE_SUCCESS(rv, rv);
+ /* When port is 0, proxy is not considered as enabled even if host is set. */
+ if (port == 0)
+ return NS_ERROR_FAILURE;
+
SetProxyResult(aType, host, port, aResult);
return NS_OK;
}
@@ -271,17 +324,17 @@ static bool ConvertToIPV6Addr(const nsAC
PRIPv6Addr* aAddr)
{
PRNetAddr addr;
+ // try to convert hostname to IP
if (PR_StringToNetAddr(PromiseFlatCString(aName).get(), &addr) != PR_SUCCESS)
return false;
- PRIPv6Addr ipv6;
// convert parsed address to IPv6
if (addr.raw.family == PR_AF_INET) {
// convert to IPv4-mapped address
- PR_ConvertIPv4AddrToIPv6(addr.inet.ip, &ipv6);
+ PR_ConvertIPv4AddrToIPv6(addr.inet.ip, aAddr);
} else if (addr.raw.family == PR_AF_INET6) {
// copy the address
- memcpy(&ipv6, &addr.ipv6.ip, sizeof(PRIPv6Addr));
+ memcpy(aAddr, &addr.ipv6.ip, sizeof(PRIPv6Addr));
} else {
return false;
}
@@ -289,8 +342,8 @@ static bool ConvertToIPV6Addr(const nsAC
return true;
}
-static bool GConfIgnoreHost(const nsACString& aIgnore,
- const nsACString& aHost)
+static bool HostIgnoredByProxy(const nsACString& aIgnore,
+ const nsACString& aHost)
{
if (aIgnore.Equals(aHost, nsCaseInsensitiveCStringComparator()))
return true;
@@ -321,8 +374,9 @@ static bool GConfIgnoreHost(const nsACSt
slash = end;
}
+ nsDependentCSubstring ignoreStripped(start, slash);
PRIPv6Addr ignoreAddr, hostAddr;
- if (!ConvertToIPV6Addr(aIgnore, &ignoreAddr) ||
+ if (!ConvertToIPV6Addr(ignoreStripped, &ignoreAddr) ||
!ConvertToIPV6Addr(aHost, &hostAddr))
return false;
@@ -355,7 +409,7 @@ nsUnixSystemProxySettings::GetProxyFromG
if (str) {
nsAutoString s;
if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) {
- if (GConfIgnoreHost(NS_ConvertUTF16toUTF8(s), aHost)) {
+ if (HostIgnoredByProxy(NS_ConvertUTF16toUTF8(s), aHost)) {
aResult.AppendLiteral("DIRECT");
return NS_OK;
}
@@ -392,6 +446,71 @@ nsUnixSystemProxySettings::GetProxyFromG
}
nsresult
+nsUnixSystemProxySettings::GetProxyFromGSettings(const nsACString& aScheme,
+ const nsACString& aHost,
+ PRInt32 aPort,
+ nsACString& aResult)
+{
+ nsCOMPtr<nsIGSettingsCollection> proxy_settings;
+ nsresult rv;
+
+ rv = mGSettings->GetCollectionForSchema(NS_LITERAL_CSTRING("org.gnome.system.proxy"),
+ getter_AddRefs(proxy_settings));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ nsCString proxyMode;
+ rv = proxy_settings->GetString(NS_LITERAL_CSTRING("mode"), proxyMode);
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ if (!proxyMode.Equals("manual")) {
+ aResult.AppendLiteral("DIRECT");
+ return NS_OK;
+ }
+
+ nsCOMPtr<nsIArray> ignoreList;
+ if (NS_SUCCEEDED(proxy_settings->GetStringList(NS_LITERAL_CSTRING("ignore-hosts"),
+ getter_AddRefs(ignoreList))) && ignoreList) {
+ PRUint32 len = 0;
+ ignoreList->GetLength(&len);
+ for (PRUint32 i = 0; i < len; ++i) {
+ nsCOMPtr<nsISupportsCString> str = do_QueryElementAt(ignoreList, i);
+ if (str) {
+ nsCString s;
+ if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) {
+ if (HostIgnoredByProxy(s, aHost)) {
+ aResult.AppendLiteral("DIRECT");
+ return NS_OK;
+ }
+ }
+ }
+ }
+ }
+
+ if (aScheme.LowerCaseEqualsLiteral("http")) {
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult);
+ } else if (aScheme.LowerCaseEqualsLiteral("https")) {
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.https", "PROXY", aResult);
+ /* Try to use HTTP proxy when HTTPS proxy is not explicitly defined */
+ if (rv != NS_OK)
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.http", "PROXY", aResult);
+ } else if (aScheme.LowerCaseEqualsLiteral("ftp")) {
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.ftp", "PROXY", aResult);
+ } else {
+ rv = NS_ERROR_FAILURE;
+ }
+ if (rv != NS_OK) {
+ /* If proxy for scheme is not specified, use SOCKS proxy for all schemes */
+ rv = SetProxyResultFromGSettings("org.gnome.system.proxy.socks", "SOCKS", aResult);
+ }
+
+ if (NS_FAILED(rv)) {
+ aResult.AppendLiteral("DIRECT");
+ }
+
+ return NS_OK;
+}
+
+nsresult
nsUnixSystemProxySettings::GetProxyForURI(nsIURI* aURI, nsACString& aResult)
{
nsCAutoString scheme;
@@ -406,10 +525,15 @@ nsUnixSystemProxySettings::GetProxyForUR
rv = aURI->GetPort(&port);
NS_ENSURE_SUCCESS(rv, rv);
- if (!mGConf)
- return GetProxyFromEnvironment(scheme, host, port, aResult);
+ if (mGSettings) {
+ rv = GetProxyFromGSettings(scheme, host, port, aResult);
+ if (rv == NS_OK)
+ return rv;
+ }
+ if (mGConf)
+ return GetProxyFromGConf(scheme, host, port, aResult);
- return GetProxyFromGConf(scheme, host, port, aResult);
+ return GetProxyFromEnvironment(scheme, host, port, aResult);
}
#define NS_UNIXSYSTEMPROXYSERVICE_CID /* 0fa3158c-d5a7-43de-9181-a285e74cf1d4 */\
diff -up xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl.682832 xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl
--- xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl.682832 2012-01-18 17:25:28.000000000 +0100
+++ xulrunner-10.0/mozilla-beta/xpcom/system/nsIGSettingsService.idl 2012-01-23 15:32:29.890186340 +0100
@@ -39,7 +39,7 @@
#include "nsISupports.idl"
#include "nsIArray.idl"
-[scriptable, uuid(09637d3c-3c07-40b4-aff9-1d2a0f046f3c)]
+[scriptable, uuid(16d5b0ed-e756-4f1b-a8ce-9132e869acd8)]
interface nsIGSettingsCollection : nsISupports
{
void setString(in AUTF8String key, in AUTF8String value);
@@ -48,6 +48,7 @@ interface nsIGSettingsCollection : nsISu
AUTF8String getString(in AUTF8String key);
boolean getBoolean(in AUTF8String key);
long getInt(in AUTF8String key);
+ nsIArray getStringList(in AUTF8String key);
};
[scriptable, uuid(849c088b-57d1-4f24-b7b2-3dc4acb04c0a)]

285
mozilla-691898.patch Normal file
View file

@ -0,0 +1,285 @@
From: Mike Hommey <mh@glandium.org>
Date: Sat, 24 Dec 2011 09:56:58 +0100
Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where
YARR JIT is not supported
---
js/src/Makefile.in | 21 +++++++++++++--------
js/src/vm/RegExpObject-inl.h | 28 ++++++----------------------
js/src/vm/RegExpObject.cpp | 36 ------------------------------------
js/src/vm/RegExpObject.h | 27 ++++++---------------------
js/src/yarr/wtfbridge.h | 2 --
5 files changed, 25 insertions(+), 89 deletions(-)
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
index fc48cbd..49f0bdc 100644
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \
ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
-VPATH += $(srcdir)/yarr/pcre \
+VPATH += $(srcdir)/assembler \
+ $(srcdir)/assembler/wtf \
+ $(srcdir)/yarr \
$(NULL)
CPPSRCS += \
- pcre_compile.cpp \
- pcre_exec.cpp \
- pcre_tables.cpp \
- pcre_xclass.cpp \
- pcre_ucp_searchfuncs.cpp \
+ Assertions.cpp \
+ OSAllocatorOS2.cpp \
+ OSAllocatorPosix.cpp \
+ OSAllocatorWin.cpp \
+ PageBlock.cpp \
+ YarrInterpreter.cpp \
+ YarrPattern.cpp \
+ YarrSyntaxChecker.cpp \
$(NULL)
else
@@ -1015,10 +1020,10 @@ endif
# Needed to "configure" it correctly. Unfortunately these
# flags wind up being applied to all code in js/src, not just
# the code in js/src/assembler.
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
-CXXFLAGS += -DENABLE_JIT=1
+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
endif
INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h
index 5f7817d..91108a7 100644
--- a/js/src/vm/RegExpObject-inl.h
+++ b/js/src/vm/RegExpObject-inl.h
@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt
return RetType(self);
}
+#if ENABLE_YARR_JIT
/* This function should be deleted once bad Android platforms phase out. See bug 604774. */
inline bool
RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
@@ -337,12 +338,12 @@ RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
return true;
#endif
}
+#endif
inline bool
RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts,
uintN *parenCount, RegExpFlag flags)
{
-#if ENABLE_YARR_JIT
/* Parse the pattern. */
ErrorCode yarrError;
YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag),
@@ -359,7 +360,7 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
* case we have to bytecode compile it.
*/
-#ifdef JS_METHODJIT
+#if ENABLE_YARR_JIT && defined(JS_METHODJIT)
if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) {
if (!cx->compartment->ensureJaegerCompartmentExists(cx))
return false;
@@ -371,21 +372,11 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
}
#endif
+#if ENABLE_YARR_JIT
codeBlock.setFallBack(true);
+#endif
byteCode = byteCompile(yarrPattern, cx->compartment->regExpAllocator).get();
return true;
-#else /* !defined(ENABLE_YARR_JIT) */
- int error = 0;
- compiled = jsRegExpCompile(pattern.chars(), pattern.length(),
- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase,
- multiline() ? JSRegExpMultiline : JSRegExpSingleLine,
- parenCount, &error);
- if (error) {
- reportPCREError(cx, error);
- return false;
- }
- return true;
-#endif
}
inline bool
@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz
else
result = JSC::Yarr::execute(codeBlock, chars, start, length, output);
#else
- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount);
+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output);
#endif
if (result == -1)
return Success_NotFound;
-#if !ENABLE_YARR_JIT
- if (result < 0) {
- reportPCREError(cx, result);
- return Error;
- }
-#endif
-
JS_ASSERT(result >= 0);
return Success;
}
diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
index f75c6a5..7631dd5 100644
--- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp
@@ -251,7 +251,6 @@ Class js::RegExpClass = {
NULL /* trace */
};
-#if ENABLE_YARR_JIT
void
RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
{
@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err
}
}
-#else /* !ENABLE_YARR_JIT */
-
-void
-RegExpPrivateCode::reportPCREError(JSContext *cx, int error)
-{
-#define REPORT(msg_) \
- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \
- return
- switch (error) {
- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred.");
- case 1: REPORT(JSMSG_TRAILING_SLASH);
- case 2: REPORT(JSMSG_TRAILING_SLASH);
- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- case 4: REPORT(JSMSG_BAD_QUANTIFIER);
- case 5: REPORT(JSMSG_BAD_QUANTIFIER);
- case 6: REPORT(JSMSG_BAD_CLASS_RANGE);
- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- case 8: REPORT(JSMSG_BAD_CLASS_RANGE);
- case 9: REPORT(JSMSG_BAD_QUANTIFIER);
- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- case 14: REPORT(JSMSG_MISSING_PAREN);
- case 15: REPORT(JSMSG_BAD_BACKREF);
- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
- default:
- JS_NOT_REACHED("Precondition violation: unknown PCRE error code.");
- }
-#undef REPORT
-}
-#endif /* ENABLE_YARR_JIT */
-
bool
js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut)
{
diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
index 1449d56..279f3c0 100644
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -49,8 +49,6 @@
#include "yarr/Yarr.h"
#if ENABLE_YARR_JIT
#include "yarr/YarrJIT.h"
-#else
-#include "yarr/pcre/pcre.h"
#endif
namespace js {
@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed<RegExpPrivate> rep);
/* Abstracts away the gross |RegExpPrivate| backend details. */
class RegExpPrivateCode
{
-#if ENABLE_YARR_JIT
typedef JSC::Yarr::BytecodePattern BytecodePattern;
typedef JSC::Yarr::ErrorCode ErrorCode;
+ typedef JSC::Yarr::YarrPattern YarrPattern;
+#if ENABLE_YARR_JIT
typedef JSC::Yarr::JSGlobalData JSGlobalData;
typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock;
- typedef JSC::Yarr::YarrPattern YarrPattern;
/* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
YarrCodeBlock codeBlock;
- BytecodePattern *byteCode;
-#else
- JSRegExp *compiled;
#endif
+ BytecodePattern *byteCode;
public:
RegExpPrivateCode()
:
#if ENABLE_YARR_JIT
codeBlock(),
- byteCode(NULL)
-#else
- compiled(NULL)
#endif
+ byteCode(NULL)
{ }
~RegExpPrivateCode() {
#if ENABLE_YARR_JIT
codeBlock.release();
+#endif
if (byteCode)
Foreground::delete_<BytecodePattern>(byteCode);
-#else
- if (compiled)
- jsRegExpFree(compiled);
-#endif
}
#if ENABLE_YARR_JIT
static inline bool isJITRuntimeEnabled(JSContext *cx);
- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
-#else
- void reportPCREError(JSContext *cx, int error);
#endif
+ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount,
RegExpFlag flags);
@@ -205,11 +194,7 @@ class RegExpPrivateCode
int *output, size_t outputCount);
static size_t getOutputSize(size_t pairCount) {
-#if ENABLE_YARR_JIT
return pairCount * 2;
-#else
- return pairCount * 3; /* Should be x2, but PCRE has... needs. */
-#endif
}
};
diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h
index ac41d08..fb8eb86 100644
--- a/js/src/yarr/wtfbridge.h
+++ b/js/src/yarr/wtfbridge.h
@@ -49,9 +49,7 @@
#include "jsprvtd.h"
#include "vm/String.h"
#include "assembler/wtf/Platform.h"
-#if ENABLE_YARR_JIT
#include "assembler/jit/ExecutableAllocator.h"
-#endif
namespace JSC { namespace Yarr {

68
mozilla-696393.patch Normal file
View file

@ -0,0 +1,68 @@
diff -up xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp
--- xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp.696393 2011-12-07 07:28:08.000000000 +0100
+++ xulrunner-9.0/mozilla-beta/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp 2011-12-09 15:07:07.609097348 +0100
@@ -194,55 +194,22 @@ invoke_copy_to_stack(PRUint32 paramCount
}
}
+typedef nsresult (*vtable_func)(nsISupports *, PRUint64, PRUint64, PRUint64, PRUint64, double, double, double, double);
+
EXPORT_XPCOM_API(nsresult)
NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
{
- PRUint64 *vtable = *(PRUint64 **)that;
- PRUint64 method = vtable[methodIndex];
+ vtable_func *vtable = *reinterpret_cast<vtable_func **>(that);
+ vtable_func method = vtable[methodIndex];
PRUint64 overflow = invoke_count_words (paramCount, params);
+ PRUint64 *stack_space = reinterpret_cast<PRUint64 *>(__builtin_alloca((overflow + 8 /* 4 64-bits gpr + 4 64-bits fpr */) * 8));
PRUint64 result;
- __asm__ __volatile__
- (
- "lgr 7,15\n\t"
- "aghi 7,-64\n\t"
-
- "lgr 3,%3\n\t"
- "sllg 3,3,3\n\t"
- "lcgr 3,3\n\t"
- "lg 2,0(15)\n\t"
- "la 15,0(3,7)\n\t"
- "stg 2,0(15)\n\t"
-
- "lgr 2,%1\n\t"
- "lgr 3,%2\n\t"
- "la 4,160(15)\n\t"
- "lgr 5,%3\n\t"
- "basr 14,%4\n\t"
+ invoke_copy_to_stack(paramCount, params, stack_space, overflow);
- "lgr 2,%5\n\t"
- "ld 0,192(7)\n\t"
- "ld 2,200(7)\n\t"
- "ld 4,208(7)\n\t"
- "ld 6,216(7)\n\t"
- "lmg 3,6,160(7)\n\t"
- "basr 14,%6\n\t"
+ PRUint64 *d_gpr = stack_space + overflow;
+ double *d_fpr = reinterpret_cast<double *>(d_gpr + 4);
- "la 15,64(7)\n\t"
-
- "lgr %0,2\n\t"
- : "=r" (result)
- : "r" ((PRUint64)paramCount),
- "r" (params),
- "r" (overflow),
- "a" (invoke_copy_to_stack),
- "a" (that),
- "a" (method)
- : "2", "3", "4", "5", "6", "7", "14", "cc", "memory",
- "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7"
- );
-
- return result;
+ return method(that, d_gpr[0], d_gpr[1], d_gpr[2], d_gpr[3], d_fpr[0], d_fpr[1], d_fpr[2], d_fpr[3]);
}
-

12
mozilla-706724.patch Normal file
View file

@ -0,0 +1,12 @@
diff -up mozilla-beta/ipc/chromium/src/base/file_util.cc.old mozilla-beta/ipc/chromium/src/base/file_util.cc
--- mozilla-beta/ipc/chromium/src/base/file_util.cc.old 2012-01-25 13:48:11.000000000 +0100
+++ mozilla-beta/ipc/chromium/src/base/file_util.cc 2012-01-25 13:52:25.096659244 +0100
@@ -8,7 +8,7 @@
#include <io.h>
#endif
#include <stdio.h>
-#if defined(ANDROID)
+#if defined(ANDROID) || defined(OS_POSIX)
#include <unistd.h>
#endif

74
mozilla-722127.patch Normal file
View file

@ -0,0 +1,74 @@
# HG changeset patch
# Parent 0a6f3638cdaba9d3b5ef2eef73a42b2a167dc52a
# User ojab <ojab@ojab.ru>
Bug 722127 - Build --with-system-libvpx is broken for libvpx-1.0.0
diff -up xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-10.0/mozilla-beta/configure.in
--- xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 2012-01-24 02:59:49.000000000 -0500
+++ xulrunner-10.0/mozilla-beta/configure.in 2012-01-30 13:11:22.303053551 -0500
@@ -5616,20 +5616,20 @@ if test -n "$MOZ_WEBM"; then
[MOZ_NATIVE_LIBVPX_DEC_TEST=1],
([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found]))
if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then
- AC_MSG_CHECKING([for libvpx version >= v0.9.7])
- dnl We need at least v0.9.7 to fix several crash bugs (for which we
- dnl had local patches prior to v0.9.7).
+ AC_MSG_CHECKING([for libvpx version >= v1.0.0])
+ dnl We need at least v1.0.0 to fix several crash bugs (for which we
+ dnl had local patches prior to v1.0.0).
dnl
dnl This is a terrible test for the library version, but we don't
dnl have a good one. There is no version number in a public header,
dnl and testing the headers still doesn't guarantee we link against
dnl the right version. While we could call vpx_codec_version() at
dnl run-time, that would break cross-compiling. There are no
- dnl additional exported symbols between the v0.9.7 release and the
- dnl v0.9.6 one to check for.
+ dnl additional exported decoder symbols between the v1.0.0 release
+ dnl and the v0.9.7 one to check for.
AC_TRY_COMPILE([
#include <vpx/vpx_decoder.h>
- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
+ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS)
#error "test failed."
#endif
],
@@ -5639,7 +5639,7 @@ if test -n "$MOZ_WEBM"; then
MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include"
MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"],
[AC_MSG_RESULT([no])
- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])])
+ AC_MSG_ERROR([--with-system-libvpx requested but it is not v1.0.0 or later])])
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
diff -up xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 xulrunner-10.0/mozilla-beta/configure
--- xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 2012-01-30 13:11:47.805847514 -0500
+++ xulrunner-10.0/mozilla-beta/configure 2012-01-30 13:14:07.818716354 -0500
@@ -17727,14 +17727,14 @@ else
fi
if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then
- echo $ac_n "checking for libvpx version >= v0.9.7""... $ac_c" 1>&6
-echo "configure:17732: checking for libvpx version >= v0.9.7" >&5
+ echo $ac_n "checking for libvpx version >= v1.0.0""... $ac_c" 1>&6
+echo "configure:17732: checking for libvpx version >= v1.0.0" >&5
cat > conftest.$ac_ext <<EOF
#line 17734 "configure"
#include "confdefs.h"
#include <vpx/vpx_decoder.h>
- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
+ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS)
#error "test failed."
#endif
@@ -17753,7 +17753,7 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
echo "$ac_t""no" 1>&6
- { echo "configure: error: --with-system-libvpx requested but it is not v0.9.7 or later" 1>&2; exit 1; }
+ { echo "configure: error: --with-system-libvpx requested but it is not v1.0.0 or later" 1>&2; exit 1; }
fi
rm -f conftest*
fi

24
mozilla-724615.patch Normal file
View file

@ -0,0 +1,24 @@
# HG changeset patch
# Parent 6292e55419d1730a2e88a56fd30b2440ce0b393a
# User Raúl Porcel <armin76@gentoo.org>
Bug XXXXXX - Fix TARGET_CPU usage on ARM
diff --git a/xpcom/glue/objs.mk b/xpcom/glue/objs.mk
--- a/xpcom/glue/objs.mk
+++ b/xpcom/glue/objs.mk
@@ -71,13 +71,13 @@ XPCOM_GLUENS_SRC_LCPPSRCS = \
SSE.cpp \
unused.cpp \
nsProxyRelease.cpp \
nsTextFormatter.cpp \
GenericFactory.cpp \
FileUtils.cpp \
$(NULL)
-ifeq (arm,$(TARGET_CPU))
+ifneq (,$(filter arm%,$(TARGET_CPU)))
XPCOM_GLUENS_SRC_LCPPSRCS += arm.cpp
endif
XPCOM_GLUENS_SRC_CPPSRCS = $(addprefix $(topsrcdir)/xpcom/glue/,$(XPCOM_GLUENS_SRC_LCPPSRCS))

38
mozilla-727401.patch Normal file
View file

@ -0,0 +1,38 @@
# HG changeset patch
# User Benjamin Smedberg <benjamin@smedbergs.us>
# Date 1329314881 18000
# Node ID 355163c56ea5ad5037ac6da754252aaea67d2217
# Parent 81f6b9cbb2a92ac08d1ccc0c1b44d6a5c28f6e2a
Bug 727401 - import libpng overflow patch from http://codereview.chromium.org/9363013
diff --git a/media/libpng/pngrutil.c b/media/libpng/pngrutil.c
--- a/media/libpng/pngrutil.c
+++ b/media/libpng/pngrutil.c
@@ -396,18 +396,25 @@ png_decompress_chunk(png_structp png_ptr
#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \
defined(PNG_USER_CHUNK_MALLOC_MAX)
else
#endif
if (expanded_size > 0)
{
/* Success (maybe) - really uncompress the chunk. */
png_size_t new_size = 0;
- png_charp text = png_malloc_warn(png_ptr,
- prefix_size + expanded_size + 1);
+ png_charp text = NULL;
+ /* Need to check for both truncation (64-bit platforms) and integer
+ * overflow.
+ */
+ if (prefix_size + expanded_size > prefix_size &&
+ prefix_size + expanded_size < 0xffffffffU)
+ {
+ text = png_malloc_warn(png_ptr, prefix_size + expanded_size + 1);
+ }
if (text != NULL)
{
png_memcpy(text, png_ptr->chunkdata, prefix_size);
new_size = png_inflate(png_ptr,
(png_bytep)(png_ptr->chunkdata + prefix_size),
chunklength - prefix_size,
(png_bytep)(text + prefix_size), expanded_size);

23
mozilla-build.patch Normal file
View file

@ -0,0 +1,23 @@
diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in
--- xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build 2010-08-06 03:09:27.000000000 +0200
+++ xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in 2010-08-16 10:49:10.000000000 +0200
@@ -181,7 +181,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
DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)"
ifndef MOZ_NATIVE_SQLITE
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in.build xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in
--- xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in.build 2010-08-06 03:09:17.000000000 +0200
+++ xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in 2010-08-16 10:46:22.000000000 +0200
@@ -113,8 +113,6 @@ CSRCS += md4.c
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)

26
mozilla-file.patch Normal file
View file

@ -0,0 +1,26 @@
diff -up mozilla-beta/ipc/chromium/src/base/file_util_linux.cc.file mozilla-beta/ipc/chromium/src/base/file_util_linux.cc
--- mozilla-beta/ipc/chromium/src/base/file_util_linux.cc.file 2012-01-24 09:00:00.000000000 +0100
+++ mozilla-beta/ipc/chromium/src/base/file_util_linux.cc 2012-01-25 15:30:43.707796295 +0100
@@ -5,6 +5,9 @@
#include "base/file_util.h"
#include <fcntl.h>
+#if defined(ANDROID) || defined(OS_POSIX)
+#include <unistd.h>
+#endif
#include <string>
#include <vector>
diff -up mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc
--- mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc.file 2012-01-24 09:00:00.000000000 +0100
+++ mozilla-beta/ipc/chromium/src/base/message_pump_libevent.cc 2012-01-25 15:13:11.947771212 +0100
@@ -6,6 +6,9 @@
#include <errno.h>
#include <fcntl.h>
+#if defined(ANDROID) || defined(OS_POSIX)
+#include <unistd.h>
+#endif
#include "eintr_wrapper.h"
#include "base/logging.h"

1
sources Normal file
View file

@ -0,0 +1 @@
265c53120fd923c742164b0002ebbf6c xulrunner-10.0.1.source.tar.bz2

29
wmclass.patch Normal file
View file

@ -0,0 +1,29 @@
#
# Online Desktop expects WMCLASS to match the .desktop file
# Since renaming the .desktop file is bad, work around this here
#
diff -up ./widget/src/gtk2/nsWindow.cpp.wmclass ./widget/src/gtk2/nsWindow.cpp
--- ./widget/src/gtk2/nsWindow.cpp.wmclass 2010-10-25 11:33:21.649433261 -0700
+++ ./widget/src/gtk2/nsWindow.cpp 2010-10-25 11:36:19.864431870 -0700
@@ -3738,6 +3738,10 @@ nsWindow::Create(nsIWidget *aPare
GetBrandName(brandName);
NS_ConvertUTF16toUTF8 cBrand(brandName);
+ if (brandName.EqualsLiteral("Minefield")) {
+ cBrand.Assign("Firefox");
+ }
+
if (mWindowType == eWindowType_dialog) {
mShell = gtk_window_new(GTK_WINDOW_TOPLEVEL);
SetDefaultIcon();
@@ -4109,6 +4113,9 @@ nsWindow::SetWindowClass(const nsAString
#ifdef MOZ_X11
nsXPIDLString brandName;
GetBrandName(brandName);
+ if (brandName.EqualsLiteral("Minefield")) {
+ brandName.AssignLiteral("Firefox");
+ }
XClassHint *class_hint = XAllocClassHint();
if (!class_hint)

View file

@ -0,0 +1,25 @@
diff -up mozilla-beta/ipc/chromium/src/base/time_posix.cc.gcc47 mozilla-beta/ipc/chromium/src/base/time_posix.cc
--- mozilla-beta/ipc/chromium/src/base/time_posix.cc.gcc47 2012-01-24 03:00:00.000000000 -0500
+++ mozilla-beta/ipc/chromium/src/base/time_posix.cc 2012-01-30 14:12:49.198472212 -0500
@@ -14,6 +14,8 @@
#include <time.h>
#endif
+#include <unistd.h>
+
#include <limits>
#include "base/basictypes.h"
diff -up mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-beta/toolkit/crashreporter/client/Makefile.in
--- mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-01-30 14:41:14.475441039 -0500
+++ mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-01-30 14:43:03.587646656 -0500
@@ -69,6 +69,9 @@ CPPSRCS = \
$(STDCXX_COMPAT) \
$(NULL)
+# Needed for moz_free
+LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc
+
ifeq ($(OS_ARCH),WINNT)
CPPSRCS += crashreporter_win.cpp
LIBS += \

View file

@ -0,0 +1,33 @@
Bug 627669 - add support for s390(x) and ppc(64)
diff -up mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types mozilla-release/gfx/ycbcr/chromium_types.h
--- mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2011-06-15 23:57:26.000000000 +0200
+++ mozilla-release/gfx/ycbcr/chromium_types.h 2011-06-30 10:04:25.105032221 +0200
@@ -61,7 +61,11 @@ typedef PRInt16 int16;
#define ARCH_CPU_ARM_FAMILY 1
#define ARCH_CPU_ARMEL 1
#define ARCH_CPU_32_BITS 1
-#elif defined(__ppc__) || defined(__powerpc) || defined(__PPC__)
+#elif defined(__ppc64__) || defined(__powerpc64__)
+#define ARCH_CPU_PPC_FAMILY 1
+#define ARCH_CPU_PPC 1
+#define ARCH_CPU_64_BITS 1
+#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__)
#define ARCH_CPU_PPC_FAMILY 1
#define ARCH_CPU_PPC 1
#define ARCH_CPU_32_BITS 1
@@ -73,6 +77,14 @@ typedef PRInt16 int16;
#define ARCH_CPU_SPARC_FAMILY 1
#define ARCH_CPU_SPARC 1
#define ARCH_CPU_64_BITS 1
+#elif defined(__s390x__)
+#define ARCH_CPU_S390_FAMILY 1
+#define ARCH_CPU_S390 1
+#define ARCH_CPU_64_BITS 1
+#elif defined(__s390__)
+#define ARCH_CPU_S390_FAMILY 1
+#define ARCH_CPU_S390 1
+#define ARCH_CPU_32_BITS 1
#else
#warning Please add support for your architecture in chromium_types.h
#endif

View file

@ -0,0 +1,21 @@
diff -up mozilla-release/dom/plugins/base/npapi.h.BAD mozilla-release/dom/plugins/base/npapi.h
--- mozilla-release/dom/plugins/base/npapi.h.BAD 2011-12-06 13:31:16.364405916 -0500
+++ mozilla-release/dom/plugins/base/npapi.h 2011-12-06 13:31:47.131109006 -0500
@@ -379,7 +379,7 @@ typedef enum {
, NPPVpluginCoreAnimationLayer = 1003
#endif
-#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
+#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6))
, NPPVpluginWindowlessLocalBool = 2002
#endif
} NPPVariable;
@@ -432,7 +432,7 @@ typedef enum {
, NPNVsupportsCompositingCoreAnimationPluginsBool = 74656 /* TRUE if the browser supports
CA model compositing */
#endif
-#if (MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6)
+#if defined(MOZ_PLATFORM_MAEMO) && ((MOZ_PLATFORM_MAEMO == 5) || (MOZ_PLATFORM_MAEMO == 6))
, NPNVSupportsWindowlessLocal = 2002
#endif
} NPNVariable;

View file

@ -0,0 +1,11 @@
diff -up xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp.orig xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp
--- xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp.orig 2012-01-04 11:06:39.000000000 +0100
+++ xulrunner-9.0.1/mozilla-release/js/src/jscompartment.cpp 2012-01-04 11:06:43.000000000 +0100
@@ -50,7 +50,6 @@
#include "jswatchpoint.h"
#include "jswrapper.h"
#include "assembler/wtf/Platform.h"
-#include "assembler/jit/ExecutableAllocator.h"
#include "yarr/BumpPointerAllocator.h"
#include "methodjit/MethodJIT.h"
#include "methodjit/PolyIC.h"

48
xulrunner-mozconfig Normal file
View file

@ -0,0 +1,48 @@
. $topsrcdir/xulrunner/config/mozconfig
# --with-system-png is disabled because Mozilla requires APNG support in libpng
#ac_add_options --with-system-png
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
ac_add_options --with-system-bz2
ac_add_options --with-system-libvpx
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-cairo
ac_add_options --with-pthreads
ac_add_options --disable-strip
ac_add_options --disable-tests
ac_add_options --disable-mochitest
ac_add_options --disable-installer
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-xinerama
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-pango
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --disable-javaxpcom
ac_add_options --disable-crashreporter
ac_add_options --enable-safe-browsing
ac_add_options --enable-extensions=default
ac_add_options --enable-libnotify
ac_add_options --disable-necko-wifi
ac_add_options --enable-startup-notification
ac_add_options --disable-cpp-exceptions
ac_add_options --enable-shared-js
ac_add_options --enable-url-classifier
ac_add_options --enable-gio
ac_add_options --disable-gnomevfs
ac_add_options --disable-updater
ac_add_options --enable-chrome-format=omni
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export MOZ_UA_BUILDID=20100101
mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@

View file

@ -0,0 +1,5 @@
# For mozilla's debuginfo:
export CFLAGS="$CFLAGS -gdwarf-2"
export CXXFLAGS="$CXXFLAGS -gdwarf-2"
export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-crashreporter

1324
xulrunner-omnijar-5.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,8 @@
pref("app.update.enabled", false);
pref("app.update.autoInstallEnabled", false);
pref("general.smoothScroll", true);
pref("intl.locale.matchOS", true);
pref("network.manage-offline-status", true);
pref("toolkit.storage.synchronous", 0);
pref("toolkit.networkmanager.disable", false);
pref("offline.autoDetect", true);

13
xulrunner-version.patch Normal file
View file

@ -0,0 +1,13 @@
diff -up mozilla/toolkit/mozapps/update/src/updater/module.ver mozilla/toolkit/mozapps/update/src/updater/module
diff -up mozilla/xulrunner/installer/Makefile.in.ver mozilla/xulrunner/installer/Makefile.in
--- mozilla/xulrunner/installer/Makefile.in.ver 2007-12-14 09:51:34.000000000 +0100
+++ mozilla/xulrunner/installer/Makefile.in 2007-12-14 09:52:03.000000000 +0100
@@ -44,6 +44,8 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
+MOZ_APP_VERSION="__RPM_VERSION_INTERNAL__"
+
NO_PKG_FILES = \
xulrunner-config \
regchrome* \

69
xulrunner.sh.in Normal file
View file

@ -0,0 +1,69 @@
#!/bin/sh
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
##
## Usage:
##
## $ xulrunner
##
## This script is meant to run a xulrunner program from the xulrunner
## rpm installation.
##
cmdname=`basename $0`
##
## Variables
##
XUL_ARCH=$(uname -m)
case $XUL_ARCH in
x86_64 | ia64 | s390 )
XUL_LIB_DIR="/usr/lib64"
SECONDARY_LIB_DIR="/usr/lib"
;;
* )
XUL_LIB_DIR="/usr/lib"
SECONDARY_LIB_DIR="/usr/lib64"
;;
esac
if [ ! -x $XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner ]; then
if [ ! -x $SECONDARY_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner ]; then
echo "Error: $XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner not found"
if [ -d $SECONDARY_LIB_DIR ]; then
echo " $SECONDARY_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner not found"
fi
exit 1
fi
XUL_LIB_DIR="$SECONDARY_LIB_DIR"
fi
XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION"
XUL_PROGRAM="$XUL_DIST_BIN/xulrunner"
##
## Enable WebGL
##
MOZ_GLX_IGNORE_BLACKLIST=1
export MOZ_GLX_IGNORE_BLACKLIST
exec $XUL_PROGRAM "$@"

1133
xulrunner.spec Normal file

File diff suppressed because it is too large Load diff