From fe9b61df01daa05906d2c1dfd265f8cc25210355 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 Mar 2012 17:26:29 +0100 Subject: [PATCH 001/239] Update to FF11B7, spec fixes, enabled debug builds --- ...d-10.0.patch => add-gtkmozembed-11.0.patch | 268 +++++++------ mozilla-682832-proxy.patch | 358 ------------------ mozilla-696393.patch | 68 ---- mozilla-722127.patch | 36 +- mozilla-727401.patch | 38 -- mozilla-build.patch | 27 +- xulrunner-9.0-secondary-build-fix.patch | 11 - xulrunner.spec | 79 ++-- 8 files changed, 218 insertions(+), 667 deletions(-) rename add-gtkmozembed-10.0.patch => add-gtkmozembed-11.0.patch (94%) delete mode 100644 mozilla-682832-proxy.patch delete mode 100644 mozilla-696393.patch delete mode 100644 mozilla-727401.patch delete mode 100644 xulrunner-9.0-secondary-build-fix.patch diff --git a/add-gtkmozembed-10.0.patch b/add-gtkmozembed-11.0.patch similarity index 94% rename from add-gtkmozembed-10.0.patch rename to add-gtkmozembed-11.0.patch index e5816dd..3747ebb 100644 --- a/add-gtkmozembed-10.0.patch +++ b/add-gtkmozembed-11.0.patch @@ -1,6 +1,6 @@ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2012-01-18 16:44:32.465289972 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2012-01-18 16:44:32.465289972 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2012-03-09 15:19:22.248678665 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2012-03-09 15:19:22.248678665 +0100 @@ -0,0 +1,54 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -56,9 +56,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozemb +endif + +include $(topsrcdir)/config/rules.mk -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2012-01-18 16:44:32.466289972 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2012-01-18 16:44:32.466289972 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2012-03-09 15:19:22.248678665 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2012-03-09 15:19:22.248678665 +0100 @@ -0,0 +1,253 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -313,9 +313,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates + return NS_OK; +} + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2012-01-18 16:44:32.467289972 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2012-01-18 16:44:32.467289972 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2012-03-09 15:19:22.249678670 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2012-03-09 15:19:22.249678670 +0100 @@ -0,0 +1,84 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -401,9 +401,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates + nsCOMPtr mPIPStringBundle; +}; +#endif /* __EmbedCertificates_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2012-01-18 16:44:32.468289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2012-01-19 10:10:40.325459303 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2012-03-09 15:19:22.249678670 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2012-03-09 15:19:22.249678670 +0100 @@ -0,0 +1,156 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -561,9 +561,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListe + return NS_ERROR_NOT_IMPLEMENTED; +} + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2012-01-18 16:44:32.469289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2012-01-18 16:44:32.469289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2012-03-09 15:19:22.250678675 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2012-03-09 15:19:22.250678675 +0100 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -631,9 +631,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListe +}; + +#endif /* __EmbedContentListener_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2012-01-18 16:44:32.471289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2012-01-18 16:44:32.471289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2012-03-09 15:19:22.251678680 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2012-03-09 15:19:22.251678680 +0100 @@ -0,0 +1,618 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1253,9 +1253,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuI + mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; + return NS_OK; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2012-01-18 16:44:32.472289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2012-01-18 16:44:32.472289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2012-03-09 15:19:22.251678680 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2012-03-09 15:19:22.251678680 +0100 @@ -0,0 +1,101 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ @@ -1358,9 +1358,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuI + nsString mCtxDocTitle; +}; // class EmbedContextMenuInfo +#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2012-01-18 16:44:32.473289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2012-01-18 16:44:32.473289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2012-03-09 15:19:22.252678684 +0100 @@ -0,0 +1,280 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1642,9 +1642,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListene + NS_ERROR("Unexpected event type"); + return NS_OK; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2012-01-18 16:44:32.474289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2012-01-18 16:44:32.474289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2012-03-09 15:19:22.252678684 +0100 @@ -0,0 +1,89 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -1735,9 +1735,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListene +}; + +#endif /* __EmbedEventListener_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2012-01-18 16:44:32.476289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2012-01-18 16:44:32.476289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2012-03-09 15:19:22.253678688 +0100 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ @@ -1827,9 +1827,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp + NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); + return docShell->GetContentViewer(aViewer); +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2012-01-18 16:44:32.476289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2012-01-18 16:44:32.477289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2012-03-09 15:19:22.253678688 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2012-03-09 15:19:22.253678688 +0100 @@ -0,0 +1,67 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ @@ -1898,9 +1898,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.g +GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); + +#endif /* __EmbedTools_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2012-01-18 16:44:32.478289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2012-01-19 10:08:33.847456417 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2012-03-09 15:19:22.254678693 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2012-03-09 15:19:22.254678693 +0100 @@ -0,0 +1,1016 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -2918,9 +2918,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp. + gtk_widget_destroy(sOffscreenWindow); + sOffscreenWindow = 0; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2012-01-18 16:44:32.479289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2012-01-18 16:44:32.480289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2012-03-09 15:19:22.255678699 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2012-03-09 15:19:22.255678699 +0100 @@ -0,0 +1,188 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3110,10 +3110,10 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gt +}; + +#endif /* __EmbedPrivate_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2012-01-18 16:44:32.481289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2012-01-18 16:44:32.481289973 +0100 -@@ -0,0 +1,215 @@ +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2012-03-09 15:19:22.255678699 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2012-03-09 15:48:33.580516368 +0100 +@@ -0,0 +1,216 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * @@ -3253,7 +3253,8 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp +NS_IMETHODIMP +EmbedProgress::OnLocationChange(nsIWebProgress *aWebProgress, + nsIRequest *aRequest, -+ nsIURI *aLocation) ++ nsIURI *aLocation, ++ PRUint32 aFlags) +{ + nsCAutoString newURI; + NS_ENSURE_ARG_POINTER(aLocation); @@ -3329,9 +3330,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp + + uri->GetSpec(aString); +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2012-01-18 16:44:32.483289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2012-01-18 16:44:32.483289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2012-03-09 15:19:22.256678705 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2012-03-09 15:19:22.256678705 +0100 @@ -0,0 +1,66 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -3399,9 +3400,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.g +}; + +#endif /* __EmbedProgress_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2012-01-18 16:44:32.484289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2012-01-19 10:42:07.334502360 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2012-03-09 15:19:22.256678705 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2012-03-09 15:19:22.256678705 +0100 @@ -0,0 +1,411 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3814,9 +3815,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp + } + } +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2012-01-18 16:44:32.485289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2012-01-19 10:42:24.478502751 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2012-03-09 15:19:22.257678710 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2012-03-09 15:19:22.257678710 +0100 @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -3931,9 +3932,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.g + GtkWidget *mComboBox; + GtkWidget *mCheckBox; +}; -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2012-01-18 16:44:32.487289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2012-01-19 10:09:43.082457998 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2012-03-09 15:19:22.258678715 +0100 @@ -0,0 +1,474 @@ +/* + * vim:ts=2:et:sw=2 @@ -4409,9 +4410,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.g + + return rv; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2012-01-18 16:44:32.488289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2012-01-18 16:44:32.488289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2012-03-09 15:19:22.258678715 +0100 @@ -0,0 +1,106 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4519,9 +4520,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreato + + return NS_ERROR_FAILURE; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2012-01-18 16:44:32.488289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2012-01-18 16:44:32.488289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2012-03-09 15:19:22.258678715 +0100 @@ -0,0 +1,54 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4577,9 +4578,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreato +}; + +#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2012-01-18 16:44:32.489289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2012-01-18 16:44:32.489289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2012-03-09 15:19:22.259678720 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2012-03-09 15:19:22.259678720 +0100 @@ -0,0 +1,101 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -4682,9 +4683,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtk + + +#endif /* __EmbedWindow_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2012-01-18 16:44:32.491289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2012-01-19 10:06:52.015454094 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2012-03-09 15:19:22.260678725 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2012-03-09 15:19:22.260678725 +0100 @@ -0,0 +1,1132 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5818,9 +5819,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp. + aNewEmbed, aChromeFlags); + +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2012-01-18 16:44:32.493289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2012-01-18 16:44:32.494289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2012-03-09 15:19:22.261678730 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2012-03-09 15:19:22.261678730 +0100 @@ -0,0 +1,116 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -5938,9 +5939,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue. + return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); +} + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2012-01-18 16:44:32.495289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2012-01-18 16:44:32.495289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2012-03-09 15:19:22.261678730 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2012-03-09 15:19:22.261678730 +0100 @@ -0,0 +1,287 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6229,9 +6230,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtk +#endif /* __cplusplus */ + +#endif /* gtkmozembed_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2012-01-18 16:44:32.495289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2012-01-18 16:44:32.495289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2012-03-09 15:19:22.262678735 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2012-03-09 15:19:22.262678735 +0100 @@ -0,0 +1,70 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6303,9 +6304,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_inter + +#endif /* gtkmozembed_internal_h */ + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2012-01-18 16:44:32.496289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2012-01-18 16:44:32.496289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2012-03-09 15:19:22.262678735 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2012-03-09 15:19:22.262678735 +0100 @@ -0,0 +1,34 @@ +BOOL:STRING +BOOL:STRING,STRING @@ -6341,9 +6342,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarsha +BOOL:POINTER +VOID:POINTER +BOOL:STRING,STRING,POINTER -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2012-01-18 16:44:32.498289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2012-01-18 16:44:32.498289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2012-03-09 15:19:22.263678740 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2012-03-09 15:19:22.263678740 +0100 @@ -0,0 +1,91 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -6436,9 +6437,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivat +#endif /* __cplusplus */ + +#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2012-01-18 16:44:32.499289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2012-01-19 10:43:20.021504018 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2012-03-09 15:19:22.263678740 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2012-03-09 15:19:22.263678740 +0100 @@ -0,0 +1,349 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6789,9 +6790,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService. + NS_WARNING("Unexpected button flags"); + } +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2012-01-18 16:44:32.500289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2012-01-18 16:44:32.500289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2012-03-09 15:19:22.264678745 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2012-03-09 15:19:22.264678745 +0100 @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: */ @@ -6852,9 +6853,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService. + void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, + const PRUnichar* aStringValue, nsAString &aLabel); +}; -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2012-01-18 16:44:32.501289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2012-01-18 16:44:32.501289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2012-03-09 15:19:22.264678745 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2012-03-09 15:19:22.264678745 +0100 @@ -0,0 +1,112 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -6968,9 +6969,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmo + +GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2012-01-18 16:44:32.502289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2012-01-18 16:44:32.502289973 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2012-03-09 15:19:22.265678750 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2012-03-09 15:19:22.265678750 +0100 @@ -0,0 +1,101 @@ +# +# ***** BEGIN LICENSE BLOCK ***** @@ -7073,9 +7074,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtk +DEFINES += -D_TIME_H=1 +endif +endif -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2012-01-18 16:44:32.504289973 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2012-01-18 16:44:32.716289979 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2012-03-09 15:19:22.265678750 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2012-03-09 15:19:22.265678750 +0100 @@ -0,0 +1,185 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -7262,9 +7263,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChi + gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); + g_free(text); +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2012-01-18 16:44:32.719289978 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2012-01-18 16:44:32.719289978 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2012-03-09 15:19:22.266678755 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2012-03-09 15:19:22.266678755 +0100 @@ -0,0 +1,1145 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8411,9 +8412,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cp + gtk_widget_set_sensitive(browser->forwardButton, FALSE); + } + -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2012-01-18 16:44:32.789289981 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2012-01-18 16:44:32.789289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2012-03-09 15:19:22.267678760 +0100 @@ -0,0 +1,142 @@ +/** simplemdi.c **/ +/* @@ -8557,9 +8558,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI + gtk_main_quit(); + return(0); +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2012-01-18 16:44:32.807289982 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2012-01-18 16:44:32.808289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2012-03-09 15:19:22.267678760 +0100 @@ -0,0 +1,86 @@ +#include +#include @@ -8647,9 +8648,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNot + + return 0; +} -diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2012-01-18 16:44:32.808289981 +0100 -+++ xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2012-01-18 16:44:32.808289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp +--- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 ++++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2012-03-09 15:19:22.267678760 +0100 @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 @@ -8760,9 +8761,9 @@ diff -up xulrunner-10.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSoc + fprintf(stderr, "Can't fork.\n"); + } +} -diff -up xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in ---- xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2012-01-11 18:15:04.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in 2012-01-18 16:44:32.809289980 +0100 +diff -up xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in +--- xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2012-03-09 01:40:05.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in 2012-03-09 15:19:22.268678765 +0100 @@ -73,6 +73,8 @@ CPPSRCS += dlldeps-xul.cpp endif @@ -8772,10 +8773,10 @@ diff -up xulrunner-10.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xul DEFINES += -DMOZ_ENABLE_GTK2 endif -diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh ---- xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2012-01-11 18:15:08.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2012-01-18 16:44:32.810289980 +0100 -@@ -554,6 +554,9 @@ MAKEFILES_embedding=" +diff -up xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh +--- xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2012-03-09 01:40:06.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2012-03-09 15:19:22.268678765 +0100 +@@ -438,6 +438,9 @@ MAKEFILES_embedding=" embedding/browser/Makefile embedding/browser/build/Makefile embedding/browser/webBrowser/Makefile @@ -8785,10 +8786,10 @@ diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xu embedding/components/Makefile embedding/components/appstartup/src/Makefile embedding/components/build/Makefile -diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk ---- xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2012-01-11 18:15:08.000000000 +0100 -+++ xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk 2012-01-18 16:44:32.811289981 +0100 -@@ -221,6 +221,12 @@ endif +diff -up xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk +--- xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2012-03-09 01:40:06.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk 2012-03-09 15:19:22.269678770 +0100 +@@ -220,6 +220,12 @@ endif tier_platform_dirs += services/crypto/component @@ -8801,15 +8802,10 @@ diff -up xulrunner-10.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrun tier_platform_dirs += startupcache tier_platform_dirs += js/ductwork/debugger -@@ -268,4 +274,3 @@ tier_platform_dirs += testing/mochitest - tier_platform_dirs += testing/xpcshell - tier_platform_dirs += testing/tools/screenshot - endif -- -diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in ---- xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2012-01-18 16:44:32.403289971 +0100 -+++ xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in 2012-01-18 16:44:32.817289981 +0100 -@@ -78,6 +78,8 @@ pkg_config_files = \ +diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in +--- xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2012-03-09 15:19:22.240678626 +0100 ++++ xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in 2012-03-09 15:19:22.275678799 +0100 +@@ -80,6 +80,8 @@ pkg_config_files = \ libxul-embedding.pc \ mozilla-js.pc \ mozilla-plugin.pc \ @@ -8818,9 +8814,9 @@ diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed $(NULL) ifdef MOZ_NATIVE_NSPR -diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2012-01-18 16:44:32.812289981 +0100 -+++ xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2012-01-18 16:44:32.812289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in +--- xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2012-03-09 15:19:22.270678775 +0100 ++++ xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2012-03-09 15:19:22.270678775 +0100 @@ -0,0 +1,9 @@ +prefix=%prefix% +sdkdir=%sdkdir% @@ -8831,9 +8827,9 @@ diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-emb +Description: Static version-independent Mozilla Embedding Widget for Gtk+ +Version: %MOZILLA_VERSION% +Requires: libxul-embedding = %MOZILLA_VERSION% -diff -up xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in ---- xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2012-01-18 16:44:32.813289981 +0100 -+++ xulrunner-10.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2012-01-18 16:44:32.813289981 +0100 +diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in +--- xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2012-03-09 15:19:22.270678775 +0100 ++++ xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2012-03-09 15:19:22.270678775 +0100 @@ -0,0 +1,9 @@ +prefix=%prefix% +sdkdir=%sdkdir% diff --git a/mozilla-682832-proxy.patch b/mozilla-682832-proxy.patch deleted file mode 100644 index 0f643f9..0000000 --- a/mozilla-682832-proxy.patch +++ /dev/null @@ -1,358 +0,0 @@ -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 - #include -@@ -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 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 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 mGConf; -+ nsCOMPtr 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 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 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 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 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 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)] diff --git a/mozilla-696393.patch b/mozilla-696393.patch deleted file mode 100644 index 26c558f..0000000 --- a/mozilla-696393.patch +++ /dev/null @@ -1,68 +0,0 @@ -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(that); -+ vtable_func method = vtable[methodIndex]; - PRUint64 overflow = invoke_count_words (paramCount, params); -+ PRUint64 *stack_space = reinterpret_cast(__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(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]); - } -- diff --git a/mozilla-722127.patch b/mozilla-722127.patch index 63a9e0a..f86fcae 100644 --- a/mozilla-722127.patch +++ b/mozilla-722127.patch @@ -1,12 +1,7 @@ -# HG changeset patch -# Parent 0a6f3638cdaba9d3b5ef2eef73a42b2a167dc52a -# User ojab -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 +diff -up xulrunner-11.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-11.0/mozilla-beta/configure.in +--- xulrunner-11.0/mozilla-beta/configure.in.vpx1.0.0 2012-03-09 01:39:31.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/configure.in 2012-03-09 15:03:51.246031329 +0100 +@@ -5710,20 +5710,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 @@ -33,7 +28,7 @@ diff -up xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-10.0/mozill #error "test failed." #endif ], -@@ -5639,7 +5639,7 @@ if test -n "$MOZ_WEBM"; then +@@ -5734,7 +5734,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]) @@ -42,19 +37,19 @@ diff -up xulrunner-10.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-10.0/mozill 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 +diff -up xulrunner-11.0/mozilla-beta/configure.vpx1.0.0 xulrunner-11.0/mozilla-beta/configure +--- xulrunner-11.0/mozilla-beta/configure.vpx1.0.0 2012-03-09 01:58:50.000000000 +0100 ++++ xulrunner-11.0/mozilla-beta/configure 2012-03-09 15:15:42.537585632 +0100 +@@ -17761,14 +17761,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 "configure:17766: 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 ++echo "configure:17766: checking for libvpx version >= v1.0.0" >&5 cat > conftest.$ac_ext < @@ -63,7 +58,7 @@ diff -up xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 xulrunner-10.0/mozilla-b #error "test failed." #endif -@@ -17753,7 +17753,7 @@ else +@@ -17791,7 +17791,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* echo "$ac_t""no" 1>&6 @@ -72,3 +67,8 @@ diff -up xulrunner-10.0/mozilla-beta/configure.vpx1.0.0 xulrunner-10.0/mozilla-b fi rm -f conftest* fi +@@ -25794,4 +25794,3 @@ if cmp -s config/autoconf.mk config/auto + else + rm -f config/autoconf.mk.orig 2> /dev/null + fi +- diff --git a/mozilla-727401.patch b/mozilla-727401.patch deleted file mode 100644 index df7ff6d..0000000 --- a/mozilla-727401.patch +++ /dev/null @@ -1,38 +0,0 @@ -# HG changeset patch -# User Benjamin Smedberg -# 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); diff --git a/mozilla-build.patch b/mozilla-build.patch index 065ca9f..be1ba4b 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,7 +1,7 @@ -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= +diff -up mozilla-beta/security/manager/Makefile.in.build mozilla-beta/security/manager/Makefile.in +--- mozilla-beta/security/manager/Makefile.in.build 2012-03-09 01:39:56.000000000 +0100 ++++ mozilla-beta/security/manager/Makefile.in 2012-03-09 13:56:28.612328083 +0100 +@@ -174,7 +174,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 @@ -9,15 +9,14 @@ diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build xu 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 - +diff -up mozilla-beta/security/manager/ssl/src/Makefile.in.build mozilla-beta/security/manager/ssl/src/Makefile.in +--- mozilla-beta/security/manager/ssl/src/Makefile.in.build 2012-03-09 01:39:56.000000000 +0100 ++++ mozilla-beta/security/manager/ssl/src/Makefile.in 2012-03-09 13:57:37.055657208 +0100 +@@ -116,7 +116,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) + DEFINES += \ +- -DNSS_ENABLE_ECC \ + -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ + -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \ + $(NULL) diff --git a/xulrunner-9.0-secondary-build-fix.patch b/xulrunner-9.0-secondary-build-fix.patch deleted file mode 100644 index fc1c1db..0000000 --- a/xulrunner-9.0-secondary-build-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ -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" diff --git a/xulrunner.spec b/xulrunner.spec index 511187a..b5ef968 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,3 +1,6 @@ +# Use system nspr/nss? +%define system_nss 1 + # Use system sqlite? %if 0%{?fedora} <= 15 %define system_sqlite 0 @@ -5,14 +8,20 @@ %define system_sqlite 1 %endif +# Build as a debug package? +%define debug_build 0 + # Minimal required versions -%global nspr_version 4.8.9 -%global nss_version 3.13.1 %global cairo_version 1.10.2 %global freetype_version 2.1.9 %global libnotify_version 0.7.0 %global libvpx_version 1.0.0 +%if %{?system_nss} +%global nspr_version 4.9 +%global nss_version 3.13.3 +%endif + %if %{?system_sqlite} %global sqlite_version 3.7.7.1 # The actual sqlite version (see #480989): @@ -25,11 +34,11 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 0 +%global beta_version 7 %global rc_version 0 -%global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} -%global tarballdir mozilla-release +%global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} +%global tarballdir mozilla-release # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -60,8 +69,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 10.0.1 -Release: 5%{?pre_tag}%{?dist} +Version: 11.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -77,9 +86,9 @@ Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch %if 0%{?fedora} <= 15 -Patch16: add-gtkmozembed-10.0.patch +Patch16: add-gtkmozembed-11.0.patch %endif -Patch17: xulrunner-10.0-gcc47.patch +Patch17: xulrunner-10.0-gcc47.patch # Fedora specific patches @@ -88,25 +97,22 @@ Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches -Patch38: mozilla-696393.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=707993 Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch -Patch40: mozilla-682832-proxy.patch -# cherry-picked from 13afcd4c097c -Patch41: xulrunner-9.0-secondary-build-fix.patch Patch42: mozilla-706724.patch Patch43: mozilla-file.patch # Needed to detect/use libvpx-1.0.0 # https://bugzilla.mozilla.org/show_bug.cgi?id=722127 -Patch44: mozilla-722127.patch -Patch45: mozilla-727401.patch -Patch46: mozilla-724615.patch -Patch47: mozilla-691898.patch +Patch44: mozilla-722127.patch +Patch46: mozilla-724615.patch +Patch47: mozilla-691898.patch # --------------------------------------------------- +%if %{?system_nss} BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} +%endif BuildRequires: cairo-devel >= %{cairo_version} BuildRequires: libpng-devel BuildRequires: libjpeg-devel @@ -129,8 +135,10 @@ BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} Requires: mozilla-filesystem +%if %{?system_nss} Requires: nspr >= %{nspr_version} Requires: nss >= %{nss_version} +%endif Provides: gecko-libs = %{gecko_verrel} Provides: gecko-libs%{?_isa} = %{gecko_verrel} Conflicts: firefox < 3.6 @@ -159,8 +167,10 @@ Provides: gecko-devel-unstable = %{gecko_verrel} Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} Requires: xulrunner = %{version}-%{release} +%if %{?system_nss} Requires: nspr-devel >= %{nspr_version} Requires: nss-devel >= %{nss_version} +%endif Requires: cairo-devel >= %{cairo_version} Requires: libjpeg-devel Requires: zip @@ -215,7 +225,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ > version.patch %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch -%patch1 -p2 -b .build +%patch1 -p1 -b .build %patch14 -p1 -b .chromium-types %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed @@ -226,16 +236,12 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch23 -p1 -b .wmclass %patch24 -p1 -b .static -%patch38 -p2 -b .696393 %patch39 -p1 -b .707993 -%patch40 -p2 -b .682832 -%patch41 -p2 -b .secondary-build %patch42 -p1 -b .706724 %patch43 -p1 -b .file %patch44 -p2 -b .vpx1.0.0 -%patch45 -p1 -b .727401 %patch46 -p1 -b .724615 -%patch47 -p1 -b .691898 +#%patch47 -p1 -b .691898 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -243,12 +249,28 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %{__cat} %{SOURCE11} >> .mozconfig %endif +%if %{?system_nss} +echo "ac_add_options --with-system-nspr" >> .mozconfig +echo "ac_add_options --with-system-nss" >> .mozconfig +%else +echo "ac_add_options --without-system-nspr" >> .mozconfig +echo "ac_add_options --without-system-nss" >> .mozconfig +%endif + %if %{?system_sqlite} echo "ac_add_options --enable-system-sqlite" >> .mozconfig %else echo "ac_add_options --disable-system-sqlite" >> .mozconfig %endif +%if %{?debug_build} +echo "ac_add_options --enable-debug" >> .mozconfig +echo "ac_add_options --disable-optimize" >> .mozconfig +%else +echo "ac_add_options --disable-debug" >> .mozconfig +echo "ac_add_options --enable-optimize" >> .mozconfig +%endif + # s390(x) fails to start with jemalloc enabled %ifarch s390 s390x echo "ac_add_options --disable-jemalloc" >> .mozconfig @@ -304,6 +326,9 @@ cd %{tarballdir} # MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') +%if %{?debug_build} +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') +%endif export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS @@ -318,6 +343,7 @@ MOZ_SMP_FLAGS=-j1 RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 [ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 +[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 %endif make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" @@ -446,7 +472,9 @@ fi %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %{mozappdir}/plugin-container - +%if !%{?system_nss} +%{mozappdir}/*.chk +%endif %if %{enable_mozilla_crashreporter} %{mozappdir}/crashreporter %{mozappdir}/crashreporter.ini @@ -465,6 +493,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Mar 9 2012 Martin Stransky - 11.0-1 +- Update to 11.0 Beta 7 + * Fri Mar 09 2012 Dan Horák - 10.0.1-5 - Add fix for secondary arches from mozb#691898 From 9997ea141fc04096bc75ce30d1d8409442373beb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 Mar 2012 17:37:58 +0100 Subject: [PATCH 002/239] uploaded sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 944f4cc..dd86c36 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-10.0b6.source.tar.bz2 /xulrunner-10.0.source.tar.bz2 /xulrunner-10.0.1.source.tar.bz2 +/xulrunner-11.0b7.source.tar.bz2 diff --git a/sources b/sources index 0c40318..d9db3ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -265c53120fd923c742164b0002ebbf6c xulrunner-10.0.1.source.tar.bz2 +d0eb493d47f16671b1641804d97f7de7 xulrunner-11.0b7.source.tar.bz2 From 59fb4d58f01f864e86fcfebca27230e573c5913d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Mar 2012 08:53:44 +0100 Subject: [PATCH 003/239] Update to 11.0 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index dd86c36..8f76403 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-10.0.source.tar.bz2 /xulrunner-10.0.1.source.tar.bz2 /xulrunner-11.0b7.source.tar.bz2 +/xulrunner-11.0.source.tar.bz2 diff --git a/sources b/sources index d9db3ba..af22379 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d0eb493d47f16671b1641804d97f7de7 xulrunner-11.0b7.source.tar.bz2 +4b07acf47857aff72776d805409cdd1b xulrunner-11.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index b5ef968..64ab629 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -34,7 +34,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 7 +%global beta_version 0 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} @@ -70,7 +70,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 11.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -493,6 +493,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 13 2012 Martin Stransky - 11.0-2 +- Update to 11.0 + * Fri Mar 9 2012 Martin Stransky - 11.0-1 - Update to 11.0 Beta 7 From abd4283f868f68bebba62181c5cf2f975a12f412 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Mar 2012 12:29:41 +0100 Subject: [PATCH 004/239] Added libvpx-devel dependency --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 64ab629..5dd02c1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -191,6 +191,7 @@ Requires: startup-notification-devel Requires: alsa-lib-devel Requires: libnotify-devel Requires: mesa-libGL-devel +Requires: libvpx-devel >= %{libvpx_version} %description devel This package contains the libraries amd header files that are needed From ec258c0766db21fd2eaeb3aa1c1baaacf6b994f1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Mar 2012 12:34:25 +0100 Subject: [PATCH 005/239] Added libvpx-devel dependency --- xulrunner.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 5dd02c1..53c3c0a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -70,7 +70,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 11.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -494,8 +494,9 @@ fi #--------------------------------------------------------------------- %changelog -* Tue Mar 13 2012 Martin Stransky - 11.0-2 +* Tue Mar 13 2012 Martin Stransky - 11.0-3 - Update to 11.0 +- Fixed libvpx-devel dependency * Fri Mar 9 2012 Martin Stransky - 11.0-1 - Update to 11.0 Beta 7 From 3ea068df02642e63371d2ad8c93c796aecd42216 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Mar 2012 13:12:27 +0100 Subject: [PATCH 006/239] system nss/nspr is set in spec now --- xulrunner-mozconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 3ec51d2..b58f39e 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -4,8 +4,6 @@ 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 From 88357e6d51ae35e96ee9715f6d2955c494adb0c0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Mar 2012 13:13:32 +0100 Subject: [PATCH 007/239] debug/optimize is set in spec now --- xulrunner-mozconfig | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index b58f39e..c9f0b8c 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -15,8 +15,6 @@ 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 From 4f0069f46427cca93756c4929d0e618794cabd11 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 28 Mar 2012 12:38:06 +0200 Subject: [PATCH 008/239] Fixed Source0 URL --- xulrunner.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 53c3c0a..40b6321 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,7 @@ Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -# You can get sources at ftp://ftp.mozilla.org/pub/firefox/releases/%{version}%{?pre_ver}/source -Source0: %{name}-%{version}%{?pre_version}.source.tar.bz2 +Source0: ftp://ftp.mozilla.org/pub/%{name}/releases/%{version}%{?pre_version}/source/%{name}-%{version}%{?pre_version}.source.tar.bz2 Source10: %{name}-mozconfig Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js From 7b2b7ae0ecdcbca0e53deff86b51cd974b1773d8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 09:59:07 +0200 Subject: [PATCH 009/239] Update to 12.0 --- .gitignore | 1 + sources | 2 +- wmclass.patch | 29 ----------------------------- xulrunner.spec | 9 +++++---- 4 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 wmclass.patch diff --git a/.gitignore b/.gitignore index 8f76403..1f743ac 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-10.0.1.source.tar.bz2 /xulrunner-11.0b7.source.tar.bz2 /xulrunner-11.0.source.tar.bz2 +/xulrunner-12.0.source.tar.bz2 diff --git a/sources b/sources index af22379..d040718 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b07acf47857aff72776d805409cdd1b xulrunner-11.0.source.tar.bz2 +80c3e5927274de7f181fb5f931ac5fd4 xulrunner-12.0.source.tar.bz2 diff --git a/wmclass.patch b/wmclass.patch deleted file mode 100644 index 5fe76ac..0000000 --- a/wmclass.patch +++ /dev/null @@ -1,29 +0,0 @@ -# -# 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) diff --git a/xulrunner.spec b/xulrunner.spec index 40b6321..42c7d1a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -69,8 +69,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 11.0 -Release: 3%{?pre_tag}%{?dist} +Version: 12.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -92,7 +92,6 @@ Patch17: xulrunner-10.0-gcc47.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch23: wmclass.patch Patch24: crashreporter-remove-static.patch # Upstream patches @@ -233,7 +232,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch17 -p1 -b .gcc47 %patch20 -p2 -b .pk -%patch23 -p1 -b .wmclass %patch24 -p1 -b .static %patch39 -p1 -b .707993 @@ -493,6 +491,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Apr 24 2012 Martin Stransky - 12.0-1 +- Update to 12.0 + * Tue Mar 13 2012 Martin Stransky - 11.0-3 - Update to 11.0 - Fixed libvpx-devel dependency From df71757668a22d9b672bdc7fa92d209a2ea42559 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 10:19:29 +0200 Subject: [PATCH 010/239] Added switch for system cairo --- xulrunner-mozconfig | 1 - xulrunner.spec | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index c9f0b8c..bed6ee5 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -9,7 +9,6 @@ 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 diff --git a/xulrunner.spec b/xulrunner.spec index 42c7d1a..9419930 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -8,6 +8,9 @@ %define system_sqlite 1 %endif +# Use system cairo? +%define system_cairo 1 + # Build as a debug package? %define debug_build 0 @@ -111,7 +114,9 @@ Patch47: mozilla-691898.patch BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} %endif +%if %{?system_cairo} BuildRequires: cairo-devel >= %{cairo_version} +%endif BuildRequires: libpng-devel BuildRequires: libjpeg-devel BuildRequires: zip @@ -169,7 +174,9 @@ Requires: xulrunner = %{version}-%{release} Requires: nspr-devel >= %{nspr_version} Requires: nss-devel >= %{nss_version} %endif +%if %{?system_cairo} Requires: cairo-devel >= %{cairo_version} +%endif Requires: libjpeg-devel Requires: zip Requires: bzip2-devel @@ -261,6 +268,12 @@ echo "ac_add_options --enable-system-sqlite" >> .mozconfig echo "ac_add_options --disable-system-sqlite" >> .mozconfig %endif +%if %{?system_cairo} +echo "ac_add_options --enable-system-cairo" >> .mozconfig +%else +echo "ac_add_options --disable-system-cairo" >> .mozconfig +%endif + %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig From 9d408492238d7bcc318b6548d8fa71ee03cb2b3b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 10:34:59 +0200 Subject: [PATCH 011/239] removed already merged patches --- mozilla-706724.patch | 12 ------- mozilla-722127.patch | 74 -------------------------------------------- xulrunner.spec | 6 ---- 3 files changed, 92 deletions(-) delete mode 100644 mozilla-706724.patch delete mode 100644 mozilla-722127.patch diff --git a/mozilla-706724.patch b/mozilla-706724.patch deleted file mode 100644 index b0792ed..0000000 --- a/mozilla-706724.patch +++ /dev/null @@ -1,12 +0,0 @@ -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 - #endif - #include --#if defined(ANDROID) -+#if defined(ANDROID) || defined(OS_POSIX) - #include - #endif - diff --git a/mozilla-722127.patch b/mozilla-722127.patch deleted file mode 100644 index f86fcae..0000000 --- a/mozilla-722127.patch +++ /dev/null @@ -1,74 +0,0 @@ -diff -up xulrunner-11.0/mozilla-beta/configure.in.vpx1.0.0 xulrunner-11.0/mozilla-beta/configure.in ---- xulrunner-11.0/mozilla-beta/configure.in.vpx1.0.0 2012-03-09 01:39:31.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/configure.in 2012-03-09 15:03:51.246031329 +0100 -@@ -5710,20 +5710,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 -- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) -+ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS) - #error "test failed." - #endif - ], -@@ -5734,7 +5734,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-11.0/mozilla-beta/configure.vpx1.0.0 xulrunner-11.0/mozilla-beta/configure ---- xulrunner-11.0/mozilla-beta/configure.vpx1.0.0 2012-03-09 01:58:50.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/configure 2012-03-09 15:15:42.537585632 +0100 -@@ -17761,14 +17761,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:17766: checking for libvpx version >= v0.9.7" >&5 -+ echo $ac_n "checking for libvpx version >= v1.0.0""... $ac_c" 1>&6 -+echo "configure:17766: checking for libvpx version >= v1.0.0" >&5 - cat > conftest.$ac_ext < -- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) -+ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS) - #error "test failed." - #endif - -@@ -17791,7 +17791,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 -@@ -25794,4 +25794,3 @@ if cmp -s config/autoconf.mk config/auto - else - rm -f config/autoconf.mk.orig 2> /dev/null - fi -- diff --git a/xulrunner.spec b/xulrunner.spec index 9419930..e589d6a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -100,11 +100,7 @@ Patch24: crashreporter-remove-static.patch # Upstream patches # https://bugzilla.mozilla.org/show_bug.cgi?id=707993 Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch -Patch42: mozilla-706724.patch Patch43: mozilla-file.patch -# Needed to detect/use libvpx-1.0.0 -# https://bugzilla.mozilla.org/show_bug.cgi?id=722127 -Patch44: mozilla-722127.patch Patch46: mozilla-724615.patch Patch47: mozilla-691898.patch @@ -242,9 +238,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch24 -p1 -b .static %patch39 -p1 -b .707993 -%patch42 -p1 -b .706724 %patch43 -p1 -b .file -%patch44 -p2 -b .vpx1.0.0 %patch46 -p1 -b .724615 #%patch47 -p1 -b .691898 From 07f2ed7a2f76565c6633b08c13308ae0942004a7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 10:51:07 +0200 Subject: [PATCH 012/239] without system cairo --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index e589d6a..94d7441 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -9,7 +9,7 @@ %endif # Use system cairo? -%define system_cairo 1 +%define system_cairo 0 # Build as a debug package? %define debug_build 0 From a74f3223d9720bb42ba7502085e56fc6efd9fc42 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 24 Apr 2012 11:29:38 +0200 Subject: [PATCH 013/239] Disable system sqlite for Fedora17 and older --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 94d7441..701000e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -2,7 +2,7 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} <= 15 +%if 0%{?fedora} <= 17 %define system_sqlite 0 %else %define system_sqlite 1 From 197f33837a316fb5966ec8dfa637a30bb2e0ecbb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 30 Apr 2012 15:44:19 +0200 Subject: [PATCH 014/239] Enable ppc(64) paralell builds (rhbz#816612) --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 701000e..00917f1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -343,7 +343,7 @@ export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 +%ifarch %{ix86} x86_64 ppc ppc64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -498,6 +498,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 30 2012 Martin Stransky - 12.0-2 +- Enable ppc(64) paralell builds (rhbz#816612) + * Tue Apr 24 2012 Martin Stransky - 12.0-1 - Update to 12.0 From 07e7918b8116ce14b69a28637f0b40d1f61745f2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 4 May 2012 15:58:37 +0200 Subject: [PATCH 015/239] Added requires for nss-static (rhbz#717247) --- xulrunner.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 00917f1..0e19672 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -109,6 +109,7 @@ Patch47: mozilla-691898.patch %if %{?system_nss} BuildRequires: nspr-devel >= %{nspr_version} BuildRequires: nss-devel >= %{nss_version} +BuildRequires: nss-static >= %{nss_version} %endif %if %{?system_cairo} BuildRequires: cairo-devel >= %{cairo_version} @@ -498,6 +499,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 4 2012 Martin Stransky - 12.0-3 +- Added requires for nss-static (rhbz#717247) + * Mon Apr 30 2012 Martin Stransky - 12.0-2 - Enable ppc(64) paralell builds (rhbz#816612) From d9f854b6c30094a3cd86f05aa71a11e95c4c7bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 4 May 2012 16:55:08 +0200 Subject: [PATCH 016/239] Added new patch for 691898 - backport from trunk - Added build fix for secondary arches --- mozilla-691898.patch | 304 ++++++++++++++++----------------- xulrunner-12.0-secondary.patch | 43 +++++ xulrunner.spec | 12 +- 3 files changed, 204 insertions(+), 155 deletions(-) create mode 100644 xulrunner-12.0-secondary.patch diff --git a/mozilla-691898.patch b/mozilla-691898.patch index dab2016..71220a7 100644 --- a/mozilla-691898.patch +++ b/mozilla-691898.patch @@ -1,153 +1,64 @@ -From: Mike Hommey -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 \ +diff -up xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h +--- xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-04-21 00:03:53.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-05-04 10:23:50.000000000 +0200 +@@ -445,8 +445,6 @@ public: + { + sync_instruction_memory((caddr_t)code, size); + } +-#else +- #error "The cacheFlush support is missing on this platform." + #endif - ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU))) + private: +diff -up xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-12.0/mozilla-release/js/src/Makefile.in +--- xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 2012-04-21 00:03:53.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/Makefile.in 2012-05-04 11:09:57.000000000 +0200 +@@ -349,20 +349,23 @@ CPPSRCS += checks.cc \ + # END enclude sources for V8 dtoa + ############################################# + +-# For architectures without YARR JIT, PCRE is faster than the YARR +-# interpreter (bug 684559). +- + ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) -VPATH += $(srcdir)/yarr/pcre \ -+VPATH += $(srcdir)/assembler \ -+ $(srcdir)/assembler/wtf \ -+ $(srcdir)/yarr \ ++VPATH += $(srcdir)/assembler \ ++ $(srcdir)/assembler/wtf \ ++ $(srcdir)/assembler/jit \ ++ $(srcdir)/yarr \ $(NULL) - CPPSRCS += \ +-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 \ ++CPPSRCS += ExecutableAllocator.cpp \ ++ ExecutableAllocatorPosix.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 */ +diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp +--- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-04-21 00:03:56.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp 2012-05-04 11:13:37.000000000 +0200 +@@ -392,7 +392,6 @@ Class js::RegExpClass = { + regexp_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 +@@ -424,42 +423,6 @@ RegExpPrivateCode::reportYarrError(JSCon } } @@ -161,9 +72,9 @@ index f75c6a5..7631dd5 100644 - return - switch (error) { - case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX); -- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred."); +- 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 2: REPORT(JSMSG_TRAILING_SLASH); - case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX); - case 4: REPORT(JSMSG_BAD_QUANTIFIER); - case 5: REPORT(JSMSG_BAD_QUANTIFIER); @@ -184,25 +95,28 @@ index f75c6a5..7631dd5 100644 - } -#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 @@ +diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h +--- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-04-21 00:03:56.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h 2012-05-04 11:20:17.000000000 +0200 +@@ -51,10 +51,8 @@ #include "yarr/Yarr.h" #if ENABLE_YARR_JIT #include "yarr/YarrJIT.h" +-#include "yarr/YarrSyntaxChecker.h" -#else -#include "yarr/pcre/pcre.h" #endif ++#include "yarr/YarrSyntaxChecker.h" namespace js { -@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed rep); + +@@ -242,68 +240,51 @@ static const jschar GreedyStarChars[] = /* Abstracts away the gross |RegExpPrivate| backend details. */ class RegExpPrivateCode { @@ -244,21 +158,29 @@ index 1449d56..279f3c0 100644 -#else - if (compiled) - jsRegExpFree(compiled); +-#endif + } + + static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { +-#if ENABLE_YARR_JIT + ErrorCode error = JSC::Yarr::checkSyntax(*source); + if (error == JSC::Yarr::NoError) + return true; + + reportYarrError(cx, tokenStream, error); + return false; +-#else +-# error "Syntax checking not implemented for !ENABLE_YARR_JIT" -#endif } #if ENABLE_YARR_JIT static inline bool isJITRuntimeEnabled(JSContext *cx); -- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); +- static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); -#else -- void reportPCREError(JSContext *cx, int error); +- static 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 void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); static size_t getOutputSize(size_t pairCount) { -#if ENABLE_YARR_JIT @@ -267,12 +189,90 @@ index 1449d56..279f3c0 100644 - 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 + inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, +diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h +--- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-04-21 00:03:56.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-05-04 11:17:01.000000000 +0200 +@@ -357,6 +357,7 @@ detail::RegExpPrivate::create(JSContext + return RetType(priv); + } + ++#if ENABLE_YARR_JIT + /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ + inline bool + detail::RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) +@@ -367,12 +368,12 @@ detail::RegExpPrivateCode::isJITRuntimeE + return true; + #endif + } ++#endif + + inline bool + detail::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), +@@ -389,7 +390,7 @@ detail::RegExpPrivateCode::compile(JSCon + * case we have to bytecode compile it. + */ + +-#ifdef JS_METHODJIT ++#if ENABLE_YARR_JIT && defined(JS_METHODJIT) + if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { + JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); + if (!execAlloc) { +@@ -410,21 +411,11 @@ detail::RegExpPrivateCode::compile(JSCon + return false; + } + ++#if ENABLE_YARR_JIT + codeBlock.setFallBack(true); ++#endif + byteCode = byteCompile(yarrPattern, bumpAlloc).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 +@@ -466,19 +457,12 @@ detail::RegExpPrivateCode::execute(JSCon + 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 RegExpRunStatus_Success_NotFound; + +-#if !ENABLE_YARR_JIT +- if (result < 0) { +- reportPCREError(cx, result); +- return RegExpRunStatus_Error; +- } +-#endif +- + JS_ASSERT(result >= 0); + return RegExpRunStatus_Success; + } +diff -up xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h +--- xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-04-21 00:03:56.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h 2012-05-04 10:23:50.000000000 +0200 @@ -49,9 +49,7 @@ #include "jsprvtd.h" #include "vm/String.h" diff --git a/xulrunner-12.0-secondary.patch b/xulrunner-12.0-secondary.patch new file mode 100644 index 0000000..e9b32d2 --- /dev/null +++ b/xulrunner-12.0-secondary.patch @@ -0,0 +1,43 @@ +diff -up xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h.secondary xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h +--- xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h.secondary 2012-05-04 14:56:50.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h 2012-05-04 14:59:27.000000000 +0200 +@@ -124,8 +124,12 @@ LinuxKernelMemoryBarrierFunc pLinuxKerne + # error "Memory clobber not supported for your compiler." + # endif + #else ++#ifdef __GNUC__ ++# define STORE_SEQUENCER() __sync_synchronize(); ++#else + # error "Memory clobber not supported for your platform." + #endif ++#endif + + // Returns a handdle to pass on exit. This can check that we are popping the + // correct callstack. +diff -up xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h.secondary xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h +--- xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h.secondary 2012-05-04 14:59:35.000000000 +0200 ++++ xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h 2012-05-04 14:59:49.000000000 +0200 +@@ -41,23 +41,11 @@ + #ifndef V8_SUPPORT_H_ + #define V8_SUPPORT_H_ + +-#if defined(_M_X64) || defined(__x86_64__) +-#define V8_HOST_ARCH_X64 1 +-#elif defined(_M_IX86) || defined(__i386__) || defined(__i386) +-#define V8_HOST_ARCH_IA32 1 +-#elif defined(__ARMEL__) +-#define V8_HOST_ARCH_ARM 1 +-#else +-#warning Please add support for your architecture in chromium_types.h +-#endif +- + typedef int32_t Atomic32; + +-#if defined(V8_HOST_ARCH_X64) || defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_ARM) + inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { + *ptr = value; + } +-#endif + + + const int kMaxInt = 0x7FFFFFFF; diff --git a/xulrunner.spec b/xulrunner.spec index 0e19672..d5c44da 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -91,6 +91,7 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch16: add-gtkmozembed-11.0.patch %endif Patch17: xulrunner-10.0-gcc47.patch +Patch18: xulrunner-12.0-secondary.patch # Fedora specific patches @@ -234,6 +235,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch16 -p2 -b .gtkmozembed %endif %patch17 -p1 -b .gcc47 +%patch18 -p2 -b .secondary %patch20 -p2 -b .pk %patch24 -p1 -b .static @@ -241,7 +243,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch39 -p1 -b .707993 %patch43 -p1 -b .file %patch46 -p1 -b .724615 -#%patch47 -p1 -b .691898 +%patch47 -p2 -b .691898 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -499,7 +501,11 @@ fi #--------------------------------------------------------------------- %changelog -* Mon May 4 2012 Martin Stransky - 12.0-3 +* Fri May 4 2012 Dan Horák - 12.0-4 +- Added new patch for 691898 - backport from trunk +- Added build fix for secondary arches + +* Fri May 4 2012 Martin Stransky - 12.0-3 - Added requires for nss-static (rhbz#717247) * Mon Apr 30 2012 Martin Stransky - 12.0-2 From bb57e42f22d1e459900ce8502703be674848d3ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 7 May 2012 13:26:43 +0200 Subject: [PATCH 017/239] Used backported upstream patch from mozb#734335 for fixing the sps profiler build - Fixed build of jemalloc on ppc (patch by Gustavo Luiz Duarte/IBM) --- mozilla-734335.patch | 212 ++++++++++++++++++++++++++++++ xulrunner-12.0-jemalloc-ppc.patch | 14 ++ xulrunner-12.0-secondary.patch | 43 ------ xulrunner.spec | 13 +- 4 files changed, 236 insertions(+), 46 deletions(-) create mode 100644 mozilla-734335.patch create mode 100644 xulrunner-12.0-jemalloc-ppc.patch delete mode 100644 xulrunner-12.0-secondary.patch diff --git a/mozilla-734335.patch b/mozilla-734335.patch new file mode 100644 index 0000000..1b7670b --- /dev/null +++ b/mozilla-734335.patch @@ -0,0 +1,212 @@ +diff -up xulrunner-12.0/mozilla-release/configure.in.734335 xulrunner-12.0/mozilla-release/configure.in +--- xulrunner-12.0/mozilla-release/configure.in.734335 2012-04-20 18:03:44.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/configure.in 2012-05-07 04:40:57.526363561 -0400 +@@ -2124,10 +2124,33 @@ fi + dnl ======================================================== + dnl SPS Profiler + dnl ======================================================== +-MOZ_ARG_ENABLE_BOOL(sps, +-[ --enable-sps Enable sps profiling tool.], +- MOZ_ENABLE_PROFILER_SPS=1, +- MOZ_ENABLE_PROFILER_SPS= ) ++MOZ_ENABLE_PROFILER_SPS=1 ++ ++case "${OS_TARGET}" in ++Android) ++ case "${CPU_ARCH}" in ++ x86 | arm) ;; ++ *) ++ MOZ_ENABLE_PROFILER_SPS= ++ esac ++ ;; ++Linux) ++ case "${CPU_ARCH}" in ++ x86 | x86_64) ;; ++ *) ++ MOZ_ENABLE_PROFILER_SPS= ++ esac ++ ;; ++WINNT|Darwin) ;; ++*) ++ MOZ_ENABLE_PROFILER_SPS= ++ ;; ++esac ++ ++MOZ_ARG_DISABLE_BOOL(sps, ++[ --disable-sps Disable sps profiling tool.], ++ MOZ_ENABLE_PROFILER_SPS=, ++ MOZ_ENABLE_PROFILER_SPS=1) + if test -n "$MOZ_ENABLE_PROFILER_SPS"; then + AC_DEFINE(MOZ_ENABLE_PROFILER_SPS) + fi +diff -up xulrunner-12.0/mozilla-release/configure.734335 xulrunner-12.0/mozilla-release/configure +--- xulrunner-12.0/mozilla-release/configure.734335 2012-05-07 04:49:48.696360057 -0400 ++++ xulrunner-12.0/mozilla-release/configure 2012-05-07 04:50:10.396360262 -0400 +@@ -119,7 +119,7 @@ ac_help="$ac_help + ac_help="$ac_help + --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof). Implies --enable-profiling." + ac_help="$ac_help +- --enable-sps Enable sps profiling tool." ++ --disable-sps Disable sps profiling tool." + ac_help="$ac_help + --enable-shark Enable shark remote profiling. Implies --enable-profiling." + ac_help="$ac_help +@@ -7255,13 +7255,36 @@ EOF + + fi + ++MOZ_ENABLE_PROFILER_SPS=1 ++ ++case "${OS_TARGET}" in ++Android) ++ case "${CPU_ARCH}" in ++ x86 | arm) ;; ++ *) ++ MOZ_ENABLE_PROFILER_SPS= ++ esac ++ ;; ++Linux) ++ case "${CPU_ARCH}" in ++ x86 | x86_64) ;; ++ *) ++ MOZ_ENABLE_PROFILER_SPS= ++ esac ++ ;; ++WINNT|Darwin) ;; ++*) ++ MOZ_ENABLE_PROFILER_SPS= ++ ;; ++esac ++ + # Check whether --enable-sps or --disable-sps was given. + if test "${enable_sps+set}" = set; then + enableval="$enable_sps" +- if test "$enableval" = "yes"; then ++ if test "$enableval" = "no"; then ++ MOZ_ENABLE_PROFILER_SPS= ++ elif test "$enableval" = "yes"; then + MOZ_ENABLE_PROFILER_SPS=1 +- elif test "$enableval" = "no"; then +- MOZ_ENABLE_PROFILER_SPS= + else + { echo "configure: error: Option, sps, does not take an argument ($enableval)." 1>&2; exit 1; } + fi +diff -up xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in.734335 xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in +--- xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in.734335 2012-04-20 18:04:09.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in 2012-05-07 04:40:57.526363561 -0400 +@@ -315,7 +315,9 @@ endif + + STATIC_LIBS += thebes gl ycbcr + ++ifdef MOZ_ENABLE_PROFILER_SPS + COMPONENT_LIBS += profiler ++endif + + ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) + COMPONENT_LIBS += widget_windows +diff -up xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp.734335 xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp +--- xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp.734335 2012-04-20 18:04:09.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp 2012-05-07 04:40:57.526363561 -0400 +@@ -198,6 +198,12 @@ + #endif + #endif + ++#if defined(MOZ_ENABLE_PROFILER_SPS) ++#define PROFILER_MODULE MODULE(nsProfilerModule) ++#else ++#define PROFILER_MODULE ++#endif ++ + #define XUL_MODULES \ + MODULE(nsUConvModule) \ + MODULE(nsI18nModule) \ +@@ -214,7 +220,7 @@ + MODULE(nsWindowDataSourceModule) \ + MODULE(nsParserModule) \ + MODULE(nsGfxModule) \ +- MODULE(nsProfilerModule) \ ++ PROFILER_MODULE \ + WIDGET_MODULES \ + MODULE(nsImageLib2Module) \ + ICON_MODULE \ +diff -up xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in.734335 xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in +--- xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in.734335 2012-04-20 18:04:10.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in 2012-05-07 04:40:57.526363561 -0400 +@@ -48,8 +48,10 @@ VPATH = \ + + include $(DEPTH)/config/autoconf.mk + +-EXPORTS = \ +- sampler.h \ ++EXPORTS = sampler.h ++ ++ifdef MOZ_ENABLE_PROFILER_SPS ++EXPORTS += \ + sps_sampler.h \ + thread_helper.h \ + $(NULL) +@@ -68,6 +70,7 @@ IS_COMPONENT = 1 + CPPSRCS = \ + nsProfilerFactory.cpp \ + nsProfiler.cpp \ ++ TableTicker.cpp \ + $(NULL) + + XPIDLSRCS = \ +@@ -79,42 +82,31 @@ EXTRA_JS_MODULES = \ + $(NULL) + + ifneq (,$(filter Android Linux,$(OS_TARGET))) +- +-DEFINES += -DMOZ_ENABLE_PROFILER_SPS +- + CPPSRCS += \ + shared-libraries-linux.cc \ + platform-linux.cc \ +- TableTicker.cpp \ + $(NULL) + endif ++ + ifeq ($(OS_TARGET),Darwin) + # For now we use platform-linux.cc because we can't unwind + # another thread on mac using backtrace(), the implementation + # for platform-macosx.cc is in the hg history and should be + # used when we can stackwalk using a thread handle. +- +-DEFINES += -DMOZ_ENABLE_PROFILER_SPS +- + CPPSRCS += \ + shared-libraries-macos.cc \ + platform-linux.cc \ +- TableTicker.cpp \ + $(NULL) + endif + + ifeq ($(OS_TARGET),WINNT) +- +-DEFINES += -DMOZ_ENABLE_PROFILER_SPS +- + CPPSRCS += \ + shared-libraries-win32.cc \ + platform-win32.cc \ +- TableTicker.cpp \ + $(NULL) + endif + +- ++endif + + include $(topsrcdir)/config/rules.mk + +diff -up xulrunner-12.0/mozilla-release/tools/profiler/sampler.h.734335 xulrunner-12.0/mozilla-release/tools/profiler/sampler.h +--- xulrunner-12.0/mozilla-release/tools/profiler/sampler.h.734335 2012-04-20 18:04:10.000000000 -0400 ++++ xulrunner-12.0/mozilla-release/tools/profiler/sampler.h 2012-05-07 04:40:57.526363561 -0400 +@@ -78,7 +78,7 @@ + #define SAMPLER_H + + // Redefine the macros for platforms where SPS is supported. +-#if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN) ++#ifdef MOZ_ENABLE_PROFILER_SPS + + #include "sps_sampler.h" + diff --git a/xulrunner-12.0-jemalloc-ppc.patch b/xulrunner-12.0-jemalloc-ppc.patch new file mode 100644 index 0000000..036f560 --- /dev/null +++ b/xulrunner-12.0-jemalloc-ppc.patch @@ -0,0 +1,14 @@ +Index: xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c +=================================================================== +--- xulrunner-11.0.orig/mozilla-release/memory/jemalloc/jemalloc.c ++++ xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c +@@ -1089,7 +1089,9 @@ static unsigned ncpus; + * controlling the malloc behavior are defined as compile-time constants + * for best performance and cannot be altered at runtime. + */ ++#if !(defined(__powerpc__)) + #define MALLOC_STATIC_SIZES 1 ++#endif + + #ifdef MALLOC_STATIC_SIZES + diff --git a/xulrunner-12.0-secondary.patch b/xulrunner-12.0-secondary.patch deleted file mode 100644 index e9b32d2..0000000 --- a/xulrunner-12.0-secondary.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h.secondary xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h ---- xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h.secondary 2012-05-04 14:56:50.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/tools/profiler/sps/sps_sampler.h 2012-05-04 14:59:27.000000000 +0200 -@@ -124,8 +124,12 @@ LinuxKernelMemoryBarrierFunc pLinuxKerne - # error "Memory clobber not supported for your compiler." - # endif - #else -+#ifdef __GNUC__ -+# define STORE_SEQUENCER() __sync_synchronize(); -+#else - # error "Memory clobber not supported for your platform." - #endif -+#endif - - // Returns a handdle to pass on exit. This can check that we are popping the - // correct callstack. -diff -up xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h.secondary xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h ---- xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h.secondary 2012-05-04 14:59:35.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/tools/profiler/sps/v8-support.h 2012-05-04 14:59:49.000000000 +0200 -@@ -41,23 +41,11 @@ - #ifndef V8_SUPPORT_H_ - #define V8_SUPPORT_H_ - --#if defined(_M_X64) || defined(__x86_64__) --#define V8_HOST_ARCH_X64 1 --#elif defined(_M_IX86) || defined(__i386__) || defined(__i386) --#define V8_HOST_ARCH_IA32 1 --#elif defined(__ARMEL__) --#define V8_HOST_ARCH_ARM 1 --#else --#warning Please add support for your architecture in chromium_types.h --#endif -- - typedef int32_t Atomic32; - --#if defined(V8_HOST_ARCH_X64) || defined(V8_HOST_ARCH_IA32) || defined(V8_HOST_ARCH_ARM) - inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { - *ptr = value; - } --#endif - - - const int kMaxInt = 0x7FFFFFFF; diff --git a/xulrunner.spec b/xulrunner.spec index d5c44da..51dd573 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -91,7 +91,8 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch16: add-gtkmozembed-11.0.patch %endif Patch17: xulrunner-10.0-gcc47.patch -Patch18: xulrunner-12.0-secondary.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 +Patch18: xulrunner-12.0-jemalloc-ppc.patch # Fedora specific patches @@ -104,6 +105,7 @@ Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch Patch43: mozilla-file.patch Patch46: mozilla-724615.patch Patch47: mozilla-691898.patch +Patch48: mozilla-734335.patch # --------------------------------------------------- @@ -235,7 +237,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch16 -p2 -b .gtkmozembed %endif %patch17 -p1 -b .gcc47 -%patch18 -p2 -b .secondary +%patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk %patch24 -p1 -b .static @@ -244,6 +246,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch43 -p1 -b .file %patch46 -p1 -b .724615 %patch47 -p2 -b .691898 +%patch48 -p2 -b .734335 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -501,6 +504,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 7 2012 Dan Horák - 12.0-5 +- Used backported upstream patch from mozb#734335 for fixing the sps profiler build +- Fixed build of jemalloc on ppc (patch by Gustavo Luiz Duarte/IBM) + * Fri May 4 2012 Dan Horák - 12.0-4 - Added new patch for 691898 - backport from trunk - Added build fix for secondary arches From 5d200586b75bb71c792c6b33110249c9d86581ca Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 8 May 2012 14:05:50 +0200 Subject: [PATCH 018/239] xulrunner-10 was the latest version that worked on PPC, need to bump release and rebuild --- xulrunner.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 511187a..e32882a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -61,7 +61,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 10.0.1 -Release: 5%{?pre_tag}%{?dist} +Release: 5.1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -465,6 +465,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 07 2012 Karsten Hopp 10.0.1-5.1 +- xulrunner-10 was the latest version that worked on PPC, need to + bump release and rebuild + * Fri Mar 09 2012 Dan Horák - 10.0.1-5 - Add fix for secondary arches from mozb#691898 From 9ccd78f5a81ca7c84a8381e99b473a39e0f07914 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 May 2012 09:25:02 +0200 Subject: [PATCH 019/239] Added workaround for ppc(64) - mozbz#746112 --- mozilla-746112.patch | 35 +++++++++++++++++++++++++++++++++++ xulrunner.spec | 11 ++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 mozilla-746112.patch diff --git a/mozilla-746112.patch b/mozilla-746112.patch new file mode 100644 index 0000000..765f993 --- /dev/null +++ b/mozilla-746112.patch @@ -0,0 +1,35 @@ +Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h +=================================================================== +--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h ++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h +@@ -167,7 +167,7 @@ struct ByteTerm { + inputPosition = inputPos; + } + +- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) ++ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(false) +@@ -188,7 +188,7 @@ struct ByteTerm { + atom.quantityCount = 1; + } + +- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) ++ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(invert) +Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h +=================================================================== +--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h ++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h +@@ -171,7 +171,7 @@ struct PatternTerm { + quantityCount = 1; + } + +- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) ++ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(invert) diff --git a/xulrunner.spec b/xulrunner.spec index 51dd573..86b9913 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -106,6 +106,9 @@ Patch43: mozilla-file.patch Patch46: mozilla-724615.patch Patch47: mozilla-691898.patch Patch48: mozilla-734335.patch +%ifarch ppc ppc64 +Patch49: mozilla-746112.patch +%endif # --------------------------------------------------- @@ -247,6 +250,9 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch46 -p1 -b .724615 %patch47 -p2 -b .691898 %patch48 -p2 -b .734335 +%ifarch ppc ppc64 +%patch49 -p2 -b .746112 +%endif %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -504,6 +510,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 28 2012 Martin Stransky - 12.0-6 +- Added workaround for ppc(64) - mozbz#746112 + * Mon May 7 2012 Dan Horák - 12.0-5 - Used backported upstream patch from mozb#734335 for fixing the sps profiler build - Fixed build of jemalloc on ppc (patch by Gustavo Luiz Duarte/IBM) From d88f0a6b832a12803c50e051d50c2b82577300cb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 31 May 2012 14:23:02 +0200 Subject: [PATCH 020/239] More ppc(64) fixes - mozbz#746112 --- mozilla-746112-1.patch | 18 ++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 mozilla-746112-1.patch diff --git a/mozilla-746112-1.patch b/mozilla-746112-1.patch new file mode 100644 index 0000000..928d775 --- /dev/null +++ b/mozilla-746112-1.patch @@ -0,0 +1,18 @@ +diff -up mozilla-esr10/js/src/jsgcchunk.cpp.old mozilla-esr10/js/src/jsgcchunk.cpp +--- mozilla-esr10/js/src/jsgcchunk.cpp.old 2012-03-03 04:28:25.000000000 +0100 ++++ mozilla-esr10/js/src/jsgcchunk.cpp 2012-04-18 10:11:55.123376498 +0200 +@@ -366,9 +366,14 @@ CommitMemory(void *addr, size_t size) + bool + DecommitMemory(void *addr, size_t size) + { ++// A workaround for Bug 746112 - endless loop on ppc64 ++#if !(defined(__powerpc__)) + JS_ASSERT(uintptr_t(addr) % 4096UL == 0); + int result = madvise(addr, size, MADV_DONTNEED); + return result != -1; ++#else ++ return true; ++#endif + } + #else + # error "No CommitMemory defined on this platform." diff --git a/xulrunner.spec b/xulrunner.spec index 86b9913..b0d47fa 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 12.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -108,6 +108,7 @@ Patch47: mozilla-691898.patch Patch48: mozilla-734335.patch %ifarch ppc ppc64 Patch49: mozilla-746112.patch +Patch50: mozilla-746112-1.patch %endif # --------------------------------------------------- @@ -252,6 +253,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch48 -p2 -b .734335 %ifarch ppc ppc64 %patch49 -p2 -b .746112 +%patch50 -p1 -b .746112-1 %endif %{__rm} -f .mozconfig @@ -510,6 +512,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 28 2012 Martin Stransky - 12.0-7 +- More ppc(64) fixes - mozbz#746112 + * Mon May 28 2012 Martin Stransky - 12.0-6 - Added workaround for ppc(64) - mozbz#746112 From fa53a9add9ee9e0131c3dcaa6930ba1fd59fac36 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 4 Jun 2012 10:55:40 +0200 Subject: [PATCH 021/239] Update to 13.0 --- .gitignore | 1 + mozilla-691898.patch | 201 +++++++++-------- mozilla-724615.patch | 24 -- mozilla-734335.patch | 212 ------------------ mozilla-746112-1.patch | 18 -- mozilla-file.patch | 26 --- sources | 2 +- xulrunner-10.0-gcc47.patch | 12 - xulrunner-8.0-fix-maemo-checks-in-npapi.patch | 21 -- xulrunner.spec | 18 +- 10 files changed, 109 insertions(+), 426 deletions(-) delete mode 100644 mozilla-724615.patch delete mode 100644 mozilla-734335.patch delete mode 100644 mozilla-746112-1.patch delete mode 100644 mozilla-file.patch delete mode 100644 xulrunner-8.0-fix-maemo-checks-in-npapi.patch diff --git a/.gitignore b/.gitignore index 1f743ac..6fe5798 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-11.0b7.source.tar.bz2 /xulrunner-11.0.source.tar.bz2 /xulrunner-12.0.source.tar.bz2 +/xulrunner-13.0.source.tar.bz2 diff --git a/mozilla-691898.patch b/mozilla-691898.patch index 71220a7..441862d 100644 --- a/mozilla-691898.patch +++ b/mozilla-691898.patch @@ -1,7 +1,7 @@ -diff -up xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h ---- xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-04-21 00:03:53.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-05-04 10:23:50.000000000 +0200 -@@ -445,8 +445,6 @@ public: +diff -up xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h +--- xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-06-01 14:04:02.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-06-04 10:43:23.694175924 +0200 +@@ -467,8 +467,6 @@ public: { sync_instruction_memory((caddr_t)code, size); } @@ -10,10 +10,10 @@ diff -up xulrunner-12.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator #endif private: -diff -up xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-12.0/mozilla-release/js/src/Makefile.in ---- xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 2012-04-21 00:03:53.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/Makefile.in 2012-05-04 11:09:57.000000000 +0200 -@@ -349,20 +349,23 @@ CPPSRCS += checks.cc \ +diff -up xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-13.0/mozilla-release/js/src/Makefile.in +--- xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 2012-06-01 14:04:02.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/Makefile.in 2012-06-04 10:45:57.023808537 +0200 +@@ -337,20 +337,23 @@ CPPSRCS += checks.cc \ # END enclude sources for V8 dtoa ############################################# @@ -47,25 +47,30 @@ diff -up xulrunner-12.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-12.0 $(NULL) else -diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp ---- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-04-21 00:03:56.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp 2012-05-04 11:13:37.000000000 +0200 -@@ -392,7 +392,6 @@ Class js::RegExpClass = { - regexp_trace - }; +@@ -918,4 +921,3 @@ endif + # + # END kludges for the Nitro assembler + ############################################### +- +diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp +--- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-06-01 14:04:05.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp 2012-06-04 10:43:23.695175928 +0200 +@@ -167,7 +167,6 @@ MatchPairs::checkAgainst(size_t inputLen + + /* detail::RegExpCode */ -#if ENABLE_YARR_JIT void - RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) + RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) { -@@ -424,42 +423,6 @@ RegExpPrivateCode::reportYarrError(JSCon +@@ -199,46 +198,9 @@ RegExpCode::reportYarrError(JSContext *c } } -#else /* !ENABLE_YARR_JIT */ - -void --RegExpPrivateCode::reportPCREError(JSContext *cx, int error) +-RegExpCode::reportPCREError(JSContext *cx, int error) -{ -#define REPORT(msg_) \ - JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \ @@ -99,11 +104,69 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun -#endif /* ENABLE_YARR_JIT */ - bool - js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut) + RegExpCode::compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags) { -diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h ---- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-04-21 00:03:56.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h 2012-05-04 11:20:17.000000000 +0200 +-#if ENABLE_YARR_JIT + /* Parse the pattern. */ + ErrorCode yarrError; + YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), +@@ -255,7 +217,7 @@ RegExpCode::compile(JSContext *cx, JSLin + * case we have to bytecode compile it. + */ + +-#ifdef JS_METHODJIT ++#if ENABLE_YARR_JIT && defined(JS_METHODJIT) + if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { + JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); + if (!execAlloc) { +@@ -276,21 +238,11 @@ RegExpCode::compile(JSContext *cx, JSLin + return false; + } + ++#if ENABLE_YARR_JIT + codeBlock.setFallBack(true); ++#endif + byteCode = byteCompile(yarrPattern, bumpAlloc).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 + } + + RegExpRunStatus +@@ -305,19 +257,12 @@ RegExpCode::execute(JSContext *cx, const + 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 RegExpRunStatus_Success_NotFound; + +-#if !ENABLE_YARR_JIT +- if (result < 0) { +- reportPCREError(cx, result); +- return RegExpRunStatus_Error; +- } +-#endif +- + JS_ASSERT(result >= 0); + return RegExpRunStatus_Success; + } +diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h +--- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-06-01 14:04:05.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h 2012-06-04 10:47:03.609081248 +0200 @@ -51,10 +51,8 @@ #include "yarr/Yarr.h" #if ENABLE_YARR_JIT @@ -114,11 +177,11 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne #endif +#include "yarr/YarrSyntaxChecker.h" - namespace js { + /* + * JavaScript Regular Expressions +@@ -112,68 +110,51 @@ namespace detail { -@@ -242,68 +240,51 @@ static const jschar GreedyStarChars[] = - /* Abstracts away the gross |RegExpPrivate| backend details. */ - class RegExpPrivateCode + class RegExpCode { -#if ENABLE_YARR_JIT typedef JSC::Yarr::BytecodePattern BytecodePattern; @@ -138,7 +201,7 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne + BytecodePattern *byteCode; public: - RegExpPrivateCode() + RegExpCode() : #if ENABLE_YARR_JIT codeBlock(), @@ -149,7 +212,7 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne + byteCode(NULL) { } - ~RegExpPrivateCode() { + ~RegExpCode() { #if ENABLE_YARR_JIT codeBlock.release(); +#endif @@ -190,89 +253,29 @@ diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne -#endif } - inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount, -diff -up xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h ---- xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-04-21 00:03:56.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-05-04 11:17:01.000000000 +0200 -@@ -357,6 +357,7 @@ detail::RegExpPrivate::create(JSContext - return RetType(priv); + bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); +diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h +--- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-06-01 14:04:05.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-06-04 10:43:23.695175928 +0200 +@@ -137,6 +137,7 @@ RegExpObject::setSticky(bool enabled) + setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled)); } +#if ENABLE_YARR_JIT /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ inline bool - detail::RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx) -@@ -367,12 +368,12 @@ detail::RegExpPrivateCode::isJITRuntimeE + detail::RegExpCode::isJITRuntimeEnabled(JSContext *cx) +@@ -147,6 +148,7 @@ detail::RegExpCode::isJITRuntimeEnabled( return true; #endif } +#endif inline bool - detail::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), -@@ -389,7 +390,7 @@ detail::RegExpPrivateCode::compile(JSCon - * case we have to bytecode compile it. - */ - --#ifdef JS_METHODJIT -+#if ENABLE_YARR_JIT && defined(JS_METHODJIT) - if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { - JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); - if (!execAlloc) { -@@ -410,21 +411,11 @@ detail::RegExpPrivateCode::compile(JSCon - return false; - } - -+#if ENABLE_YARR_JIT - codeBlock.setFallBack(true); -+#endif - byteCode = byteCompile(yarrPattern, bumpAlloc).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 -@@ -466,19 +457,12 @@ detail::RegExpPrivateCode::execute(JSCon - 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 RegExpRunStatus_Success_NotFound; - --#if !ENABLE_YARR_JIT -- if (result < 0) { -- reportPCREError(cx, result); -- return RegExpRunStatus_Error; -- } --#endif -- - JS_ASSERT(result >= 0); - return RegExpRunStatus_Success; - } -diff -up xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h ---- xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-04-21 00:03:56.000000000 +0200 -+++ xulrunner-12.0/mozilla-release/js/src/yarr/wtfbridge.h 2012-05-04 10:23:50.000000000 +0200 + RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g) +diff -up xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h +--- xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-06-01 14:04:05.000000000 +0200 ++++ xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h 2012-06-04 10:43:23.696175932 +0200 @@ -49,9 +49,7 @@ #include "jsprvtd.h" #include "vm/String.h" diff --git a/mozilla-724615.patch b/mozilla-724615.patch deleted file mode 100644 index cc78c1b..0000000 --- a/mozilla-724615.patch +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# Parent 6292e55419d1730a2e88a56fd30b2440ce0b393a -# User Raúl Porcel -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)) diff --git a/mozilla-734335.patch b/mozilla-734335.patch deleted file mode 100644 index 1b7670b..0000000 --- a/mozilla-734335.patch +++ /dev/null @@ -1,212 +0,0 @@ -diff -up xulrunner-12.0/mozilla-release/configure.in.734335 xulrunner-12.0/mozilla-release/configure.in ---- xulrunner-12.0/mozilla-release/configure.in.734335 2012-04-20 18:03:44.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/configure.in 2012-05-07 04:40:57.526363561 -0400 -@@ -2124,10 +2124,33 @@ fi - dnl ======================================================== - dnl SPS Profiler - dnl ======================================================== --MOZ_ARG_ENABLE_BOOL(sps, --[ --enable-sps Enable sps profiling tool.], -- MOZ_ENABLE_PROFILER_SPS=1, -- MOZ_ENABLE_PROFILER_SPS= ) -+MOZ_ENABLE_PROFILER_SPS=1 -+ -+case "${OS_TARGET}" in -+Android) -+ case "${CPU_ARCH}" in -+ x86 | arm) ;; -+ *) -+ MOZ_ENABLE_PROFILER_SPS= -+ esac -+ ;; -+Linux) -+ case "${CPU_ARCH}" in -+ x86 | x86_64) ;; -+ *) -+ MOZ_ENABLE_PROFILER_SPS= -+ esac -+ ;; -+WINNT|Darwin) ;; -+*) -+ MOZ_ENABLE_PROFILER_SPS= -+ ;; -+esac -+ -+MOZ_ARG_DISABLE_BOOL(sps, -+[ --disable-sps Disable sps profiling tool.], -+ MOZ_ENABLE_PROFILER_SPS=, -+ MOZ_ENABLE_PROFILER_SPS=1) - if test -n "$MOZ_ENABLE_PROFILER_SPS"; then - AC_DEFINE(MOZ_ENABLE_PROFILER_SPS) - fi -diff -up xulrunner-12.0/mozilla-release/configure.734335 xulrunner-12.0/mozilla-release/configure ---- xulrunner-12.0/mozilla-release/configure.734335 2012-05-07 04:49:48.696360057 -0400 -+++ xulrunner-12.0/mozilla-release/configure 2012-05-07 04:50:10.396360262 -0400 -@@ -119,7 +119,7 @@ ac_help="$ac_help - ac_help="$ac_help - --enable-jprof Enable jprof profiling tool (needs mozilla/tools/jprof). Implies --enable-profiling." - ac_help="$ac_help -- --enable-sps Enable sps profiling tool." -+ --disable-sps Disable sps profiling tool." - ac_help="$ac_help - --enable-shark Enable shark remote profiling. Implies --enable-profiling." - ac_help="$ac_help -@@ -7255,13 +7255,36 @@ EOF - - fi - -+MOZ_ENABLE_PROFILER_SPS=1 -+ -+case "${OS_TARGET}" in -+Android) -+ case "${CPU_ARCH}" in -+ x86 | arm) ;; -+ *) -+ MOZ_ENABLE_PROFILER_SPS= -+ esac -+ ;; -+Linux) -+ case "${CPU_ARCH}" in -+ x86 | x86_64) ;; -+ *) -+ MOZ_ENABLE_PROFILER_SPS= -+ esac -+ ;; -+WINNT|Darwin) ;; -+*) -+ MOZ_ENABLE_PROFILER_SPS= -+ ;; -+esac -+ - # Check whether --enable-sps or --disable-sps was given. - if test "${enable_sps+set}" = set; then - enableval="$enable_sps" -- if test "$enableval" = "yes"; then -+ if test "$enableval" = "no"; then -+ MOZ_ENABLE_PROFILER_SPS= -+ elif test "$enableval" = "yes"; then - MOZ_ENABLE_PROFILER_SPS=1 -- elif test "$enableval" = "no"; then -- MOZ_ENABLE_PROFILER_SPS= - else - { echo "configure: error: Option, sps, does not take an argument ($enableval)." 1>&2; exit 1; } - fi -diff -up xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in.734335 xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in ---- xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in.734335 2012-04-20 18:04:09.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/toolkit/library/Makefile.in 2012-05-07 04:40:57.526363561 -0400 -@@ -315,7 +315,9 @@ endif - - STATIC_LIBS += thebes gl ycbcr - -+ifdef MOZ_ENABLE_PROFILER_SPS - COMPONENT_LIBS += profiler -+endif - - ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) - COMPONENT_LIBS += widget_windows -diff -up xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp.734335 xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp ---- xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp.734335 2012-04-20 18:04:09.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/toolkit/library/nsStaticXULComponents.cpp 2012-05-07 04:40:57.526363561 -0400 -@@ -198,6 +198,12 @@ - #endif - #endif - -+#if defined(MOZ_ENABLE_PROFILER_SPS) -+#define PROFILER_MODULE MODULE(nsProfilerModule) -+#else -+#define PROFILER_MODULE -+#endif -+ - #define XUL_MODULES \ - MODULE(nsUConvModule) \ - MODULE(nsI18nModule) \ -@@ -214,7 +220,7 @@ - MODULE(nsWindowDataSourceModule) \ - MODULE(nsParserModule) \ - MODULE(nsGfxModule) \ -- MODULE(nsProfilerModule) \ -+ PROFILER_MODULE \ - WIDGET_MODULES \ - MODULE(nsImageLib2Module) \ - ICON_MODULE \ -diff -up xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in.734335 xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in ---- xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in.734335 2012-04-20 18:04:10.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/tools/profiler/Makefile.in 2012-05-07 04:40:57.526363561 -0400 -@@ -48,8 +48,10 @@ VPATH = \ - - include $(DEPTH)/config/autoconf.mk - --EXPORTS = \ -- sampler.h \ -+EXPORTS = sampler.h -+ -+ifdef MOZ_ENABLE_PROFILER_SPS -+EXPORTS += \ - sps_sampler.h \ - thread_helper.h \ - $(NULL) -@@ -68,6 +70,7 @@ IS_COMPONENT = 1 - CPPSRCS = \ - nsProfilerFactory.cpp \ - nsProfiler.cpp \ -+ TableTicker.cpp \ - $(NULL) - - XPIDLSRCS = \ -@@ -79,42 +82,31 @@ EXTRA_JS_MODULES = \ - $(NULL) - - ifneq (,$(filter Android Linux,$(OS_TARGET))) -- --DEFINES += -DMOZ_ENABLE_PROFILER_SPS -- - CPPSRCS += \ - shared-libraries-linux.cc \ - platform-linux.cc \ -- TableTicker.cpp \ - $(NULL) - endif -+ - ifeq ($(OS_TARGET),Darwin) - # For now we use platform-linux.cc because we can't unwind - # another thread on mac using backtrace(), the implementation - # for platform-macosx.cc is in the hg history and should be - # used when we can stackwalk using a thread handle. -- --DEFINES += -DMOZ_ENABLE_PROFILER_SPS -- - CPPSRCS += \ - shared-libraries-macos.cc \ - platform-linux.cc \ -- TableTicker.cpp \ - $(NULL) - endif - - ifeq ($(OS_TARGET),WINNT) -- --DEFINES += -DMOZ_ENABLE_PROFILER_SPS -- - CPPSRCS += \ - shared-libraries-win32.cc \ - platform-win32.cc \ -- TableTicker.cpp \ - $(NULL) - endif - -- -+endif - - include $(topsrcdir)/config/rules.mk - -diff -up xulrunner-12.0/mozilla-release/tools/profiler/sampler.h.734335 xulrunner-12.0/mozilla-release/tools/profiler/sampler.h ---- xulrunner-12.0/mozilla-release/tools/profiler/sampler.h.734335 2012-04-20 18:04:10.000000000 -0400 -+++ xulrunner-12.0/mozilla-release/tools/profiler/sampler.h 2012-05-07 04:40:57.526363561 -0400 -@@ -78,7 +78,7 @@ - #define SAMPLER_H - - // Redefine the macros for platforms where SPS is supported. --#if defined(ANDROID) || defined(__linux__) || defined(XP_MACOSX) || defined(XP_WIN) -+#ifdef MOZ_ENABLE_PROFILER_SPS - - #include "sps_sampler.h" - diff --git a/mozilla-746112-1.patch b/mozilla-746112-1.patch deleted file mode 100644 index 928d775..0000000 --- a/mozilla-746112-1.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up mozilla-esr10/js/src/jsgcchunk.cpp.old mozilla-esr10/js/src/jsgcchunk.cpp ---- mozilla-esr10/js/src/jsgcchunk.cpp.old 2012-03-03 04:28:25.000000000 +0100 -+++ mozilla-esr10/js/src/jsgcchunk.cpp 2012-04-18 10:11:55.123376498 +0200 -@@ -366,9 +366,14 @@ CommitMemory(void *addr, size_t size) - bool - DecommitMemory(void *addr, size_t size) - { -+// A workaround for Bug 746112 - endless loop on ppc64 -+#if !(defined(__powerpc__)) - JS_ASSERT(uintptr_t(addr) % 4096UL == 0); - int result = madvise(addr, size, MADV_DONTNEED); - return result != -1; -+#else -+ return true; -+#endif - } - #else - # error "No CommitMemory defined on this platform." diff --git a/mozilla-file.patch b/mozilla-file.patch deleted file mode 100644 index 14b0182..0000000 --- a/mozilla-file.patch +++ /dev/null @@ -1,26 +0,0 @@ -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 -+#if defined(ANDROID) || defined(OS_POSIX) -+#include -+#endif - - #include - #include -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 - #include -+#if defined(ANDROID) || defined(OS_POSIX) -+#include -+#endif - - #include "eintr_wrapper.h" - #include "base/logging.h" diff --git a/sources b/sources index d040718..3c6eae1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -80c3e5927274de7f181fb5f931ac5fd4 xulrunner-12.0.source.tar.bz2 +f50ca7656eec47030b396f39075fa980 xulrunner-13.0.source.tar.bz2 diff --git a/xulrunner-10.0-gcc47.patch b/xulrunner-10.0-gcc47.patch index 91a948a..093357b 100644 --- a/xulrunner-10.0-gcc47.patch +++ b/xulrunner-10.0-gcc47.patch @@ -1,15 +1,3 @@ -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 - #endif - -+#include -+ - #include - - #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 diff --git a/xulrunner-8.0-fix-maemo-checks-in-npapi.patch b/xulrunner-8.0-fix-maemo-checks-in-npapi.patch deleted file mode 100644 index 99c9b7f..0000000 --- a/xulrunner-8.0-fix-maemo-checks-in-npapi.patch +++ /dev/null @@ -1,21 +0,0 @@ -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; diff --git a/xulrunner.spec b/xulrunner.spec index b0d47fa..2dc9514 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 12.0 -Release: 7%{?pre_tag}%{?dist} +Version: 13.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -100,15 +100,9 @@ Patch20: mozilla-193-pkgconfig.patch Patch24: crashreporter-remove-static.patch # Upstream patches -# https://bugzilla.mozilla.org/show_bug.cgi?id=707993 -Patch39: xulrunner-8.0-fix-maemo-checks-in-npapi.patch -Patch43: mozilla-file.patch -Patch46: mozilla-724615.patch Patch47: mozilla-691898.patch -Patch48: mozilla-734335.patch %ifarch ppc ppc64 Patch49: mozilla-746112.patch -Patch50: mozilla-746112-1.patch %endif # --------------------------------------------------- @@ -246,14 +240,9 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch20 -p2 -b .pk %patch24 -p1 -b .static -%patch39 -p1 -b .707993 -%patch43 -p1 -b .file -%patch46 -p1 -b .724615 %patch47 -p2 -b .691898 -%patch48 -p2 -b .734335 %ifarch ppc ppc64 %patch49 -p2 -b .746112 -%patch50 -p1 -b .746112-1 %endif %{__rm} -f .mozconfig @@ -512,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jun 4 2012 Martin Stransky - 13.0-1 +- Update to 13.0 + * Mon May 28 2012 Martin Stransky - 12.0-7 - More ppc(64) fixes - mozbz#746112 From 1a4c9e57406a0ce866e18c1fa9f1ddaf1e8d3c05 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 4 Jun 2012 16:59:44 +0200 Subject: [PATCH 022/239] fixed build errors --- xulrunner-mozconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index bed6ee5..7852dd4 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -40,4 +40,4 @@ export MOZ_UA_BUILDID=20100101 mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 -mk_add_options MOZ_OBJDIR=@TOPSRCDIR@ +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir From 463948894493650faa8881628d16e1dec541c91b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 5 Jun 2012 11:03:04 +0200 Subject: [PATCH 023/239] build patch and fix --- mozilla-nspr-build.patch | 12 ++++++++++++ xulrunner.spec | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 mozilla-nspr-build.patch diff --git a/mozilla-nspr-build.patch b/mozilla-nspr-build.patch new file mode 100644 index 0000000..c3f285a --- /dev/null +++ b/mozilla-nspr-build.patch @@ -0,0 +1,12 @@ +diff -up mozilla-release/hal/sandbox/PHal.ipdl.old mozilla-release/hal/sandbox/PHal.ipdl +--- mozilla-release/hal/sandbox/PHal.ipdl.old 2012-06-01 14:04:00.000000000 +0200 ++++ mozilla-release/hal/sandbox/PHal.ipdl 2012-06-05 09:15:02.524408100 +0200 +@@ -39,7 +39,7 @@ + + include protocol PContent; + include protocol PBrowser; +-include "nspr/prtime.h"; ++include "prtime.h"; + include "mozilla/HalSensor.h"; + include "mozilla/HalTypes.h"; + diff --git a/xulrunner.spec b/xulrunner.spec index 2dc9514..81af527 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -93,6 +93,7 @@ Patch16: add-gtkmozembed-11.0.patch Patch17: xulrunner-10.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-12.0-jemalloc-ppc.patch +Patch19: mozilla-nspr-build.patch # Fedora specific patches @@ -236,6 +237,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %endif %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc +%patch19 -p1 -b .nspr %patch20 -p2 -b .pk %patch24 -p1 -b .static @@ -359,7 +361,7 @@ make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SE # create debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} #cd %{moz_objdir} -make buildsymbols +make -C objdir buildsymbols %endif #--------------------------------------------------------------------- From 549acf31d173ba1b21faff9404596c8732f5d70f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 5 Jun 2012 12:20:20 +0200 Subject: [PATCH 024/239] objdir build fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 81af527..d15128a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -370,7 +370,7 @@ make -C objdir buildsymbols cd %{tarballdir} # set up our prefs before install, so it gets pulled in to omni.jar -%{__cp} -p %{SOURCE12} dist/bin/defaults/pref/all-redhat.js +%{__cp} -p %{SOURCE12} objdir/dist/bin/defaults/pref/all-redhat.js DESTDIR=$RPM_BUILD_ROOT make install From 99112db19b2a099cd4cb80ca237018109486e9d4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 5 Jun 2012 13:10:07 +0200 Subject: [PATCH 025/239] more build fixed --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d15128a..6053824 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -372,7 +372,7 @@ cd %{tarballdir} # set up our prefs before install, so it gets pulled in to omni.jar %{__cp} -p %{SOURCE12} objdir/dist/bin/defaults/pref/all-redhat.js -DESTDIR=$RPM_BUILD_ROOT make install +DESTDIR=$RPM_BUILD_ROOT make -C objdir install # Start script install %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} @@ -441,7 +441,7 @@ touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat # Add debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} %{__mkdir_p} $RPM_BUILD_ROOT/%{moz_debug_dir} -%{__cp} dist/%{symbols_file_name} $RPM_BUILD_ROOT/%{moz_debug_dir} +%{__cp} objdir/dist/%{symbols_file_name} $RPM_BUILD_ROOT/%{moz_debug_dir} %endif #--------------------------------------------------------------------- From df3636d28e79d658c40c1599e3c15a248da88289 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 6 Jun 2012 09:44:48 +0200 Subject: [PATCH 026/239] src.rpm should include all patches --- xulrunner.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 6053824..92da823 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 13.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,9 +102,7 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch47: mozilla-691898.patch -%ifarch ppc ppc64 Patch49: mozilla-746112.patch -%endif # --------------------------------------------------- @@ -503,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 5 2012 Martin Stransky - 13.0-2 +- src.rpm should include all patches + * Mon Jun 4 2012 Martin Stransky - 13.0-1 - Update to 13.0 From a10f0bc4e5c80e16862c0b5e9da99d7110489967 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Sat, 16 Jun 2012 22:48:47 +0200 Subject: [PATCH 027/239] Update to 13.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6fe5798..9bc38c3 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-11.0.source.tar.bz2 /xulrunner-12.0.source.tar.bz2 /xulrunner-13.0.source.tar.bz2 +/xulrunner-13.0.1.source.tar.bz2 diff --git a/sources b/sources index 3c6eae1..24bac32 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f50ca7656eec47030b396f39075fa980 xulrunner-13.0.source.tar.bz2 +82deadb501c7fc0e9fa6b025f51f05a1 xulrunner-13.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 92da823..69e9bff 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 13.0 -Release: 2%{?pre_tag}%{?dist} +Version: 13.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -501,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Jun 16 2012 Jan Horak - 13.0.1-1 +- Update to 13.0.1 + * Wed Jun 5 2012 Martin Stransky - 13.0-2 - src.rpm should include all patches From c6ada0ca369f8bd0e41bb040c9e4984e3c86ea1d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 19 Jun 2012 15:18:56 +0200 Subject: [PATCH 028/239] Fixed changelog encoding --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 69e9bff..908b24e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -597,7 +597,7 @@ fi * Mon Nov 7 2011 Martin Stransky 8.0-1 - Updated to 8.0 -* Tue Oct 18 2011 Ville Skyttä - 7.0.1-5 +* Tue Oct 18 2011 Ville Skyttä - 7.0.1-5 - Avoid %%post/un shell invocations and dependencies (rhbz#736830). From 65af9bcf035ee869f290cb07ab0c1d7421dd9a8b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jul 2012 13:51:53 +0200 Subject: [PATCH 029/239] Update to 14.0.1 --- .gitignore | 1 + mozilla-691898.patch | 62 ++++++++++++++++++++-------------------- mozilla-nspr-build.patch | 12 -------- sources | 2 +- xulrunner.spec | 8 +++--- 5 files changed, 37 insertions(+), 48 deletions(-) delete mode 100644 mozilla-nspr-build.patch diff --git a/.gitignore b/.gitignore index 9bc38c3..2b12764 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-12.0.source.tar.bz2 /xulrunner-13.0.source.tar.bz2 /xulrunner-13.0.1.source.tar.bz2 +/xulrunner-14.0.1.source.tar.bz2 diff --git a/mozilla-691898.patch b/mozilla-691898.patch index 441862d..d138d84 100644 --- a/mozilla-691898.patch +++ b/mozilla-691898.patch @@ -1,7 +1,7 @@ -diff -up xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h ---- xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-06-01 14:04:02.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-06-04 10:43:23.694175924 +0200 -@@ -467,8 +467,6 @@ public: +diff -up xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h +--- xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-07-13 23:42:56.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-07-16 13:46:03.512655482 +0200 +@@ -468,8 +468,6 @@ public: { sync_instruction_memory((caddr_t)code, size); } @@ -10,12 +10,12 @@ diff -up xulrunner-13.0/mozilla-release/js/src/assembler/jit/ExecutableAllocator #endif private: -diff -up xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-13.0/mozilla-release/js/src/Makefile.in ---- xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 2012-06-01 14:04:02.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/Makefile.in 2012-06-04 10:45:57.023808537 +0200 -@@ -337,20 +337,23 @@ CPPSRCS += checks.cc \ - # END enclude sources for V8 dtoa - ############################################# +diff -up xulrunner-14.0.1/mozilla-release/js/src/Makefile.in.691898 xulrunner-14.0.1/mozilla-release/js/src/Makefile.in +--- xulrunner-14.0.1/mozilla-release/js/src/Makefile.in.691898 2012-07-13 23:42:56.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/Makefile.in 2012-07-16 13:48:34.039399155 +0200 +@@ -320,20 +320,22 @@ endif + + endif -# For architectures without YARR JIT, PCRE is faster than the YARR -# interpreter (bug 684559). @@ -23,11 +23,11 @@ diff -up xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-13.0 ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) -VPATH += $(srcdir)/yarr/pcre \ +- $(NULL) +VPATH += $(srcdir)/assembler \ + $(srcdir)/assembler/wtf \ + $(srcdir)/assembler/jit \ + $(srcdir)/yarr \ - $(NULL) -CPPSRCS += \ - pcre_compile.cpp \ @@ -47,15 +47,15 @@ diff -up xulrunner-13.0/mozilla-release/js/src/Makefile.in.691898 xulrunner-13.0 $(NULL) else -@@ -918,4 +921,3 @@ endif +@@ -903,4 +905,3 @@ endif # # END kludges for the Nitro assembler ############################################### - -diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp ---- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-06-01 14:04:05.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp 2012-06-04 10:43:23.695175928 +0200 -@@ -167,7 +167,6 @@ MatchPairs::checkAgainst(size_t inputLen +diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp +--- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-07-13 23:42:59.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp 2012-07-16 13:46:03.897657354 +0200 +@@ -168,7 +168,6 @@ MatchPairs::checkAgainst(size_t inputLen /* detail::RegExpCode */ @@ -63,7 +63,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun void RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) { -@@ -199,46 +198,9 @@ RegExpCode::reportYarrError(JSContext *c +@@ -200,46 +199,9 @@ RegExpCode::reportYarrError(JSContext *c } } @@ -110,7 +110,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun /* Parse the pattern. */ ErrorCode yarrError; YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), -@@ -255,7 +217,7 @@ RegExpCode::compile(JSContext *cx, JSLin +@@ -256,7 +218,7 @@ RegExpCode::compile(JSContext *cx, JSLin * case we have to bytecode compile it. */ @@ -119,7 +119,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); if (!execAlloc) { -@@ -276,21 +238,11 @@ RegExpCode::compile(JSContext *cx, JSLin +@@ -277,21 +239,11 @@ RegExpCode::compile(JSContext *cx, JSLin return false; } @@ -143,7 +143,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun } RegExpRunStatus -@@ -305,19 +257,12 @@ RegExpCode::execute(JSContext *cx, const +@@ -306,19 +258,12 @@ RegExpCode::execute(JSContext *cx, const else result = JSC::Yarr::execute(codeBlock, chars, start, length, output); #else @@ -164,10 +164,10 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrun JS_ASSERT(result >= 0); return RegExpRunStatus_Success; } -diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h ---- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-06-01 14:04:05.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h 2012-06-04 10:47:03.609081248 +0200 -@@ -51,10 +51,8 @@ +diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h +--- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-07-13 23:42:59.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h 2012-07-16 13:46:03.897657354 +0200 +@@ -52,10 +52,8 @@ #include "yarr/Yarr.h" #if ENABLE_YARR_JIT #include "yarr/YarrJIT.h" @@ -179,7 +179,7 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne /* * JavaScript Regular Expressions -@@ -112,68 +110,51 @@ namespace detail { +@@ -113,68 +111,51 @@ namespace detail { class RegExpCode { @@ -254,9 +254,9 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunne } bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); -diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h ---- xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-06-01 14:04:05.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-06-04 10:43:23.695175928 +0200 +diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h +--- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-07-13 23:42:59.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-07-16 13:46:03.898657360 +0200 @@ -137,6 +137,7 @@ RegExpObject::setSticky(bool enabled) setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled)); } @@ -273,9 +273,9 @@ diff -up xulrunner-13.0/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulr inline bool RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g) -diff -up xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h ---- xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-06-01 14:04:05.000000000 +0200 -+++ xulrunner-13.0/mozilla-release/js/src/yarr/wtfbridge.h 2012-06-04 10:43:23.696175932 +0200 +diff -up xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h +--- xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-07-13 23:42:59.000000000 +0200 ++++ xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h 2012-07-16 13:46:03.898657360 +0200 @@ -49,9 +49,7 @@ #include "jsprvtd.h" #include "vm/String.h" diff --git a/mozilla-nspr-build.patch b/mozilla-nspr-build.patch deleted file mode 100644 index c3f285a..0000000 --- a/mozilla-nspr-build.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-release/hal/sandbox/PHal.ipdl.old mozilla-release/hal/sandbox/PHal.ipdl ---- mozilla-release/hal/sandbox/PHal.ipdl.old 2012-06-01 14:04:00.000000000 +0200 -+++ mozilla-release/hal/sandbox/PHal.ipdl 2012-06-05 09:15:02.524408100 +0200 -@@ -39,7 +39,7 @@ - - include protocol PContent; - include protocol PBrowser; --include "nspr/prtime.h"; -+include "prtime.h"; - include "mozilla/HalSensor.h"; - include "mozilla/HalTypes.h"; - diff --git a/sources b/sources index 24bac32..d02897c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -82deadb501c7fc0e9fa6b025f51f05a1 xulrunner-13.0.1.source.tar.bz2 +c2f884f0f6c41c65cf20f678a1ee7191 xulrunner-14.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 908b24e..ba9086c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,7 +72,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 13.0.1 +Version: 14.0.1 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -93,8 +93,6 @@ Patch16: add-gtkmozembed-11.0.patch Patch17: xulrunner-10.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-12.0-jemalloc-ppc.patch -Patch19: mozilla-nspr-build.patch - # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -235,7 +233,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %endif %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc -%patch19 -p1 -b .nspr %patch20 -p2 -b .pk %patch24 -p1 -b .static @@ -501,6 +498,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 16 2012 Jan Horak - 14.0.1-1 +- Update to 14.0.1 + * Sat Jun 16 2012 Jan Horak - 13.0.1-1 - Update to 13.0.1 From fce8fe8fc97c886093cadd34d570ecd382258ec4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jul 2012 14:19:32 +0200 Subject: [PATCH 030/239] build fixes --- xulrunner.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index ba9086c..377917b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -456,7 +456,6 @@ fi %{_bindir}/xulrunner %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE -%doc %attr(644, root, root) %{mozappdir}/README.txt %{mozappdir}/chrome %{mozappdir}/chrome.manifest %{mozappdir}/dictionaries @@ -469,7 +468,6 @@ fi %{mozappdir}/plugins %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client -%{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub From c1548b50086691b3e00b54e406f2e7183c0ffb0a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jul 2012 15:20:59 +0200 Subject: [PATCH 031/239] build fixes --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 377917b..43ecebd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -491,12 +491,12 @@ fi %{_includedir}/%{name}*%{gecko_dir_ver} %{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc -%{mozappdir}/xpcshell +#%{mozappdir}/xpcshell #--------------------------------------------------------------------- %changelog -* Mon Jul 16 2012 Jan Horak - 14.0.1-1 +* Mon Jul 16 2012 Martin Stransky - 14.0.1-1 - Update to 14.0.1 * Sat Jun 16 2012 Jan Horak - 13.0.1-1 From 9e952990a788798c961de44e4af9eda36cf40078 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Jul 2012 15:39:40 +0200 Subject: [PATCH 032/239] Build fix --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 43ecebd..1a46056 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -456,6 +456,7 @@ fi %{_bindir}/xulrunner %dir %{mozappdir} %doc %attr(644, root, root) %{mozappdir}/LICENSE +%doc %attr(644, root, root) %{mozappdir}/README.xulrunner %{mozappdir}/chrome %{mozappdir}/chrome.manifest %{mozappdir}/dictionaries From b85c7e35ed25531dd9a40fdb720f124916945bf9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jul 2012 00:12:39 +0200 Subject: [PATCH 033/239] Ship xpcshell again --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 1a46056..533d16c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -424,6 +424,9 @@ EOF # Copy over the LICENSE %{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir} +# Install xpcshell +%{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} + # Use the system hunspell dictionaries %{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries @@ -492,7 +495,7 @@ fi %{_includedir}/%{name}*%{gecko_dir_ver} %{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc -#%{mozappdir}/xpcshell +%{mozappdir}/xpcshell #--------------------------------------------------------------------- From b9ad0d4eade562699cc88cbfc7421955557a9350 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jul 2012 00:15:36 +0200 Subject: [PATCH 034/239] release up --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 533d16c..2bdb8a2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -500,7 +500,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Jul 16 2012 Martin Stransky - 14.0.1-1 +* Mon Jul 16 2012 Martin Stransky - 14.0.1-2 - Update to 14.0.1 * Sat Jun 16 2012 Jan Horak - 13.0.1-1 From 06cf9cd3b78b65ec8475dabf4389fd7d6f4d414c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 17 Jul 2012 14:23:23 +0200 Subject: [PATCH 035/239] More build fixes --- xulrunner.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2bdb8a2..2235e2e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -427,6 +427,9 @@ EOF # Install xpcshell %{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} +# Install run-mozilla.sh +%{__cp} objdir/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{mozappdir} + # Use the system hunspell dictionaries %{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries @@ -472,6 +475,7 @@ fi %{mozappdir}/plugins %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client +%{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub @@ -500,7 +504,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Jul 16 2012 Martin Stransky - 14.0.1-2 +* Mon Jul 16 2012 Martin Stransky - 14.0.1-3 - Update to 14.0.1 * Sat Jun 16 2012 Jan Horak - 13.0.1-1 From 3aa28f2c42dd466bad418cae1cbbe64d94a73437 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 22 Jul 2012 02:23:43 -0500 Subject: [PATCH 036/239] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2235e2e..fd2d880 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -504,6 +504,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 14.0.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Mon Jul 16 2012 Martin Stransky - 14.0.1-3 - Update to 14.0.1 From e59ccef1abf5813a7b76b20c1c0181809ffa4b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 25 Jul 2012 13:24:16 +0200 Subject: [PATCH 037/239] Added fix for secondary arches - mozbz#750620 --- mozilla-750620.patch | 33 +++++++++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 mozilla-750620.patch diff --git a/mozilla-750620.patch b/mozilla-750620.patch new file mode 100644 index 0000000..c8c6d10 --- /dev/null +++ b/mozilla-750620.patch @@ -0,0 +1,33 @@ +# HG changeset patch +# User Mike Hommey +# Date 1337607752 -7200 +# Node ID 93093285af6065c441a806e97ca8f79225a158c6 +# Parent 87c452c6444eecd226a30458e735d0cfaad714fd +Bug 750620 - Declare double conversion correctness for more architectures + +diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h +--- a/mfbt/double-conversion/utils.h ++++ b/mfbt/double-conversion/utils.h +@@ -48,17 +48,21 @@ + // An easy way to test if the floating-point operations are correct is to + // evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then + // the result is equal to 89255e-22. + // The best way to test this, is to create a division-function and to compare + // the output of the division with the expected result. (Inlining must be + // disabled.) + // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) + #if defined(_M_X64) || defined(__x86_64__) || \ +- defined(__ARMEL__) || \ ++ defined(__ARMEL__) || defined(__avr32__) || \ ++ defined(__hppa__) || defined(__ia64__) || \ ++ defined(__mips__) || defined(__powerpc__) || \ ++ defined(__sparc__) || defined(__s390__) || \ ++ defined(__SH4__) || defined(__alpha__) || \ + defined(_MIPS_ARCH_MIPS32R2) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(_M_IX86) || defined(__i386__) + #if defined(_WIN32) + // Windows uses a 64bit wide floating point stack. + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #else + #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS diff --git a/xulrunner.spec b/xulrunner.spec index fd2d880..c41a56f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -101,6 +101,7 @@ Patch24: crashreporter-remove-static.patch # Upstream patches Patch47: mozilla-691898.patch Patch49: mozilla-746112.patch +Patch50: mozilla-750620.patch # --------------------------------------------------- @@ -241,6 +242,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %ifarch ppc ppc64 %patch49 -p2 -b .746112 %endif +%patch50 -p1 -b .750620 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -504,6 +506,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 25 2012 Dan Horák - 14.0.1-5 +- Added fix for secondary arches - mozbz#750620 + * Sun Jul 22 2012 Fedora Release Engineering - 14.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 050d36943a12dd20a73e874174cecedcd24c762d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 9 Aug 2012 15:39:55 +0200 Subject: [PATCH 038/239] Added fix for mozbz#709732 - color profiles --- mozilla-709732-gfx-icc-profile-fix.patch | 21 +++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 mozilla-709732-gfx-icc-profile-fix.patch diff --git a/mozilla-709732-gfx-icc-profile-fix.patch b/mozilla-709732-gfx-icc-profile-fix.patch new file mode 100644 index 0000000..7e268d0 --- /dev/null +++ b/mozilla-709732-gfx-icc-profile-fix.patch @@ -0,0 +1,21 @@ +diff -r dd29535bac5f gfx/thebes/gfxPlatformGtk.cpp +--- a/gfx/thebes/gfxPlatformGtk.cpp Sat May 05 20:22:53 2012 -0700 ++++ b/gfx/thebes/gfxPlatformGtk.cpp Wed May 09 11:42:21 2012 +0200 +@@ -538,16 +538,10 @@ + if (iccAtom) { + // read once to get size, once for the data + if (Success == XGetWindowProperty(dpy, root, iccAtom, +- 0, 0 /* length */, ++ 0, INT_MAX /* length */, + False, AnyPropertyType, + &retAtom, &retFormat, &retLength, + &retAfter, &retProperty)) { +- XGetWindowProperty(dpy, root, iccAtom, +- 0, retLength, +- False, AnyPropertyType, +- &retAtom, &retFormat, &retLength, +- &retAfter, &retProperty); +- + qcms_profile* profile = NULL; + + if (retLength > 0) diff --git a/xulrunner.spec b/xulrunner.spec index c41a56f..5f5dfd1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 14.0.1 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,6 +102,7 @@ Patch24: crashreporter-remove-static.patch Patch47: mozilla-691898.patch Patch49: mozilla-746112.patch Patch50: mozilla-750620.patch +Patch51: mozilla-709732-gfx-icc-profile-fix.patch # --------------------------------------------------- @@ -243,6 +244,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch49 -p2 -b .746112 %endif %patch50 -p1 -b .750620 +%patch51 -p1 -b .709732 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -506,6 +508,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Aug 9 2012 Jan Horak - 14.0.1-6 +- Added fix for mozbz#709732 + * Wed Jul 25 2012 Dan Horák - 14.0.1-5 - Added fix for secondary arches - mozbz#750620 From f86b2101162168629647a961e312fa4acf2f6452 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 Aug 2012 13:46:10 +0200 Subject: [PATCH 039/239] Update to xulrunner 15b6 --- crashreporter-remove-static.patch | 11 -- mozilla-691898.patch | 288 ------------------------------ mozilla-750620.patch | 33 ---- xulrunner-10.0-gcc47.patch | 13 -- xulrunner-15.0-gcc47.patch | 13 ++ xulrunner.spec | 20 +-- 6 files changed, 21 insertions(+), 357 deletions(-) delete mode 100644 crashreporter-remove-static.patch delete mode 100644 mozilla-691898.patch delete mode 100644 mozilla-750620.patch delete mode 100644 xulrunner-10.0-gcc47.patch create mode 100644 xulrunner-15.0-gcc47.patch diff --git a/crashreporter-remove-static.patch b/crashreporter-remove-static.patch deleted file mode 100644 index b94d165..0000000 --- a/crashreporter-remove-static.patch +++ /dev/null @@ -1,11 +0,0 @@ -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 diff --git a/mozilla-691898.patch b/mozilla-691898.patch deleted file mode 100644 index d138d84..0000000 --- a/mozilla-691898.patch +++ /dev/null @@ -1,288 +0,0 @@ -diff -up xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h ---- xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h.691898 2012-07-13 23:42:56.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h 2012-07-16 13:46:03.512655482 +0200 -@@ -468,8 +468,6 @@ public: - { - sync_instruction_memory((caddr_t)code, size); - } --#else -- #error "The cacheFlush support is missing on this platform." - #endif - - private: -diff -up xulrunner-14.0.1/mozilla-release/js/src/Makefile.in.691898 xulrunner-14.0.1/mozilla-release/js/src/Makefile.in ---- xulrunner-14.0.1/mozilla-release/js/src/Makefile.in.691898 2012-07-13 23:42:56.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/Makefile.in 2012-07-16 13:48:34.039399155 +0200 -@@ -320,20 +320,22 @@ endif - - endif - --# For architectures without YARR JIT, PCRE is faster than the YARR --# interpreter (bug 684559). -- - ifeq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU))) - --VPATH += $(srcdir)/yarr/pcre \ -- $(NULL) -+VPATH += $(srcdir)/assembler \ -+ $(srcdir)/assembler/wtf \ -+ $(srcdir)/assembler/jit \ -+ $(srcdir)/yarr \ - --CPPSRCS += \ -- pcre_compile.cpp \ -- pcre_exec.cpp \ -- pcre_tables.cpp \ -- pcre_xclass.cpp \ -- pcre_ucp_searchfuncs.cpp \ -+CPPSRCS += ExecutableAllocator.cpp \ -+ ExecutableAllocatorPosix.cpp \ -+ OSAllocatorOS2.cpp \ -+ OSAllocatorPosix.cpp \ -+ OSAllocatorWin.cpp \ -+ PageBlock.cpp \ -+ YarrInterpreter.cpp \ -+ YarrPattern.cpp \ -+ YarrSyntaxChecker.cpp \ - $(NULL) - else - -@@ -903,4 +905,3 @@ endif - # - # END kludges for the Nitro assembler - ############################################### -- -diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp ---- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp.691898 2012-07-13 23:42:59.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.cpp 2012-07-16 13:46:03.897657354 +0200 -@@ -168,7 +168,6 @@ MatchPairs::checkAgainst(size_t inputLen - - /* detail::RegExpCode */ - --#if ENABLE_YARR_JIT - void - RegExpCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error) - { -@@ -200,46 +199,9 @@ RegExpCode::reportYarrError(JSContext *c - } - } - --#else /* !ENABLE_YARR_JIT */ -- --void --RegExpCode::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 - RegExpCode::compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags) - { --#if ENABLE_YARR_JIT - /* Parse the pattern. */ - ErrorCode yarrError; - YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag), -@@ -256,7 +218,7 @@ RegExpCode::compile(JSContext *cx, JSLin - * case we have to bytecode compile it. - */ - --#ifdef JS_METHODJIT -+#if ENABLE_YARR_JIT && defined(JS_METHODJIT) - if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) { - JSC::ExecutableAllocator *execAlloc = cx->runtime->getExecutableAllocator(cx); - if (!execAlloc) { -@@ -277,21 +239,11 @@ RegExpCode::compile(JSContext *cx, JSLin - return false; - } - -+#if ENABLE_YARR_JIT - codeBlock.setFallBack(true); -+#endif - byteCode = byteCompile(yarrPattern, bumpAlloc).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 - } - - RegExpRunStatus -@@ -306,19 +258,12 @@ RegExpCode::execute(JSContext *cx, const - 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 RegExpRunStatus_Success_NotFound; - --#if !ENABLE_YARR_JIT -- if (result < 0) { -- reportPCREError(cx, result); -- return RegExpRunStatus_Error; -- } --#endif -- - JS_ASSERT(result >= 0); - return RegExpRunStatus_Success; - } -diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h ---- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h.691898 2012-07-13 23:42:59.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject.h 2012-07-16 13:46:03.897657354 +0200 -@@ -52,10 +52,8 @@ - #include "yarr/Yarr.h" - #if ENABLE_YARR_JIT - #include "yarr/YarrJIT.h" --#include "yarr/YarrSyntaxChecker.h" --#else --#include "yarr/pcre/pcre.h" - #endif -+#include "yarr/YarrSyntaxChecker.h" - - /* - * JavaScript Regular Expressions -@@ -113,68 +111,51 @@ namespace detail { - - class RegExpCode - { --#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: - RegExpCode() - : - #if ENABLE_YARR_JIT - codeBlock(), -- byteCode(NULL) --#else -- compiled(NULL) - #endif -+ byteCode(NULL) - { } - - ~RegExpCode() { - #if ENABLE_YARR_JIT - codeBlock.release(); -+#endif - if (byteCode) - Foreground::delete_(byteCode); --#else -- if (compiled) -- jsRegExpFree(compiled); --#endif - } - - static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { --#if ENABLE_YARR_JIT - ErrorCode error = JSC::Yarr::checkSyntax(*source); - if (error == JSC::Yarr::NoError) - return true; - - reportYarrError(cx, tokenStream, error); - return false; --#else --# error "Syntax checking not implemented for !ENABLE_YARR_JIT" --#endif - } - - #if ENABLE_YARR_JIT - static inline bool isJITRuntimeEnabled(JSContext *cx); -- static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); --#else -- static void reportPCREError(JSContext *cx, int error); - #endif -+ static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); - - 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 - } - - bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); -diff -up xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h ---- xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h.691898 2012-07-13 23:42:59.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/vm/RegExpObject-inl.h 2012-07-16 13:46:03.898657360 +0200 -@@ -137,6 +137,7 @@ RegExpObject::setSticky(bool enabled) - setSlot(STICKY_FLAG_SLOT, BooleanValue(enabled)); - } - -+#if ENABLE_YARR_JIT - /* This function should be deleted once bad Android platforms phase out. See bug 604774. */ - inline bool - detail::RegExpCode::isJITRuntimeEnabled(JSContext *cx) -@@ -147,6 +148,7 @@ detail::RegExpCode::isJITRuntimeEnabled( - return true; - #endif - } -+#endif - - inline bool - RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g) -diff -up xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h.691898 xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h ---- xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h.691898 2012-07-13 23:42:59.000000000 +0200 -+++ xulrunner-14.0.1/mozilla-release/js/src/yarr/wtfbridge.h 2012-07-16 13:46:03.898657360 +0200 -@@ -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 { - diff --git a/mozilla-750620.patch b/mozilla-750620.patch deleted file mode 100644 index c8c6d10..0000000 --- a/mozilla-750620.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset patch -# User Mike Hommey -# Date 1337607752 -7200 -# Node ID 93093285af6065c441a806e97ca8f79225a158c6 -# Parent 87c452c6444eecd226a30458e735d0cfaad714fd -Bug 750620 - Declare double conversion correctness for more architectures - -diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -48,17 +48,21 @@ - // An easy way to test if the floating-point operations are correct is to - // evaluate: 89255.0/1e22. If the floating-point stack is 64 bits wide then - // the result is equal to 89255e-22. - // The best way to test this, is to create a division-function and to compare - // the output of the division with the expected result. (Inlining must be - // disabled.) - // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) - #if defined(_M_X64) || defined(__x86_64__) || \ -- defined(__ARMEL__) || \ -+ defined(__ARMEL__) || defined(__avr32__) || \ -+ defined(__hppa__) || defined(__ia64__) || \ -+ defined(__mips__) || defined(__powerpc__) || \ -+ defined(__sparc__) || defined(__s390__) || \ -+ defined(__SH4__) || defined(__alpha__) || \ - defined(_MIPS_ARCH_MIPS32R2) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) - #if defined(_WIN32) - // Windows uses a 64bit wide floating point stack. - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #else - #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS diff --git a/xulrunner-10.0-gcc47.patch b/xulrunner-10.0-gcc47.patch deleted file mode 100644 index 093357b..0000000 --- a/xulrunner-10.0-gcc47.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 += \ diff --git a/xulrunner-15.0-gcc47.patch b/xulrunner-15.0-gcc47.patch new file mode 100644 index 0000000..0d44796 --- /dev/null +++ b/xulrunner-15.0-gcc47.patch @@ -0,0 +1,13 @@ +diff -up xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in +--- xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-08-15 07:48:31.000000000 +0200 ++++ xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-08-20 15:05:41.782947739 +0200 +@@ -34,6 +34,9 @@ CPPSRCS = \ + crashreporter.cpp \ + $(NULL) + ++# Needed for moz_free ++LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc ++ + ifeq ($(OS_ARCH),WINNT) + CPPSRCS += crashreporter_win.cpp + LIBS += \ diff --git a/xulrunner.spec b/xulrunner.spec index 5f5dfd1..b2f458c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -37,7 +37,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 0 +%global beta_version 6 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 14.0.1 -Release: 6%{?pre_tag}%{?dist} +Version: 15.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -90,18 +90,15 @@ Patch14: xulrunner-2.0-chromium-types.patch %if 0%{?fedora} <= 15 Patch16: add-gtkmozembed-11.0.patch %endif -Patch17: xulrunner-10.0-gcc47.patch +Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-12.0-jemalloc-ppc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch24: crashreporter-remove-static.patch # Upstream patches -Patch47: mozilla-691898.patch Patch49: mozilla-746112.patch -Patch50: mozilla-750620.patch Patch51: mozilla-709732-gfx-icc-profile-fix.patch # --------------------------------------------------- @@ -233,17 +230,14 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %if 0%{?fedora} <= 15 %patch16 -p2 -b .gtkmozembed %endif -%patch17 -p1 -b .gcc47 +%patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk -%patch24 -p1 -b .static -%patch47 -p2 -b .691898 %ifarch ppc ppc64 %patch49 -p2 -b .746112 %endif -%patch50 -p1 -b .750620 %patch51 -p1 -b .709732 %{__rm} -f .mozconfig @@ -481,7 +475,6 @@ fi %{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner -%{mozappdir}/xulrunner-bin %{mozappdir}/xulrunner-stub %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list @@ -508,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Aug 22 2012 Martin Stransky - 15.0-1 +- Update to 15.0 + * Thu Aug 9 2012 Jan Horak - 14.0.1-6 - Added fix for mozbz#709732 From 82b4e04984366d2df5b91b4a78a788f11b3805f6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 Aug 2012 14:01:43 +0200 Subject: [PATCH 040/239] Upload sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2b12764..1a12022 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-13.0.source.tar.bz2 /xulrunner-13.0.1.source.tar.bz2 /xulrunner-14.0.1.source.tar.bz2 +/xulrunner-15.0b6.source.tar.bz2 diff --git a/sources b/sources index d02897c..4aefc72 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c2f884f0f6c41c65cf20f678a1ee7191 xulrunner-14.0.1.source.tar.bz2 +d6d4a53d1d679fa938690d96489e502a xulrunner-15.0b6.source.tar.bz2 From 66f5e7a063ab0e656f39d59abde108c8aa4d32e7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 27 Aug 2012 14:02:51 +0200 Subject: [PATCH 041/239] Update to XL15 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1a12022..b6c7dcd 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-13.0.1.source.tar.bz2 /xulrunner-14.0.1.source.tar.bz2 /xulrunner-15.0b6.source.tar.bz2 +/xulrunner-15.0.source.tar.bz2 diff --git a/sources b/sources index 4aefc72..6beccc0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d6d4a53d1d679fa938690d96489e502a xulrunner-15.0b6.source.tar.bz2 +64220887a349515f16e5aa990acb4db3 xulrunner-15.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index b2f458c..8e41152 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -37,7 +37,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver 2 %global alpha_version 0 -%global beta_version 6 +%global beta_version 0 %global rc_version 0 %global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} From d91ee1f4f73da3a389c6724bd2326180c673128e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 27 Aug 2012 14:04:02 +0200 Subject: [PATCH 042/239] Update to XL15 --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 8e41152..09fe6f1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 15.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -501,7 +501,7 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Aug 22 2012 Martin Stransky - 15.0-1 +* Wed Aug 22 2012 Martin Stransky - 15.0-2 - Update to 15.0 * Thu Aug 9 2012 Jan Horak - 14.0.1-6 From 7d3b8c5fc25714241175a1db30cd46f55c9925a9 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 11 Sep 2012 17:27:00 +0200 Subject: [PATCH 043/239] Update to 15.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b6c7dcd..8e15dcd 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-14.0.1.source.tar.bz2 /xulrunner-15.0b6.source.tar.bz2 /xulrunner-15.0.source.tar.bz2 +/xulrunner-15.0.1.source.tar.bz2 diff --git a/sources b/sources index 6beccc0..a219e0f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -64220887a349515f16e5aa990acb4db3 xulrunner-15.0.source.tar.bz2 +743ba71fbce7b32023405db02d44143f xulrunner-15.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 09fe6f1..2a0a533 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 15.0 -Release: 2%{?pre_tag}%{?dist} +Version: 15.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -501,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Sep 11 2012 Jan Horak - 15.0.1-1 +- Update to 15.0.1 + * Wed Aug 22 2012 Martin Stransky - 15.0-2 - Update to 15.0 From 97e7825fe32632a8aa4ecb05e259b78b5fb44665 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 14 Sep 2012 22:04:41 +0200 Subject: [PATCH 044/239] Added build flags for second arches --- xulrunner.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2a0a533..6be9d8c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 15.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -332,8 +332,16 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif +%ifarch s390 +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') +%endif +%ifarch s390 %{arm} ppc +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" +%endif + export CFLAGS=$MOZ_OPT_FLAGS export CXXFLAGS=$MOZ_OPT_FLAGS +export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' export LIBDIR='%{_libdir}' @@ -501,6 +509,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 14 2012 Martin Stransky - 15.0.1-2 +- Added build flags for second arches + * Tue Sep 11 2012 Jan Horak - 15.0.1-1 - Update to 15.0.1 From 69e49742a5ab72108df259212cc999894666f120 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 17 Sep 2012 16:51:36 +0200 Subject: [PATCH 045/239] Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 --- add-gtkmozembed-11.0.patch | 8842 ------------------------------------ rhbz-855919.patch | 19 + xulrunner.spec | 13 +- 3 files changed, 25 insertions(+), 8849 deletions(-) delete mode 100644 add-gtkmozembed-11.0.patch create mode 100644 rhbz-855919.patch diff --git a/add-gtkmozembed-11.0.patch b/add-gtkmozembed-11.0.patch deleted file mode 100644 index 3747ebb..0000000 --- a/add-gtkmozembed-11.0.patch +++ /dev/null @@ -1,8842 +0,0 @@ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in.gtkmozembed 2012-03-09 15:19:22.248678665 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/Makefile.in 2012-03-09 15:19:22.248678665 +0100 -@@ -0,0 +1,54 @@ -+# -+# ***** 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 the Mozilla browser. -+# -+# The Initial Developer of the Original Code is -+# Christopher Blizzard. -+# Portions created by the Initial Developer are Copyright (C) 1999 -+# the Initial Developer. All Rights Reserved. -+# -+# Contributor(s): -+# Christopher Blizzard -+# -+# 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 ***** -+ -+DEPTH = ../../.. -+topsrcdir = @top_srcdir@ -+srcdir = @srcdir@ -+VPATH = @srcdir@ -+ -+include $(DEPTH)/config/autoconf.mk -+ -+MODULE = gtkembedmoz -+ -+DIRS=src -+ -+ifdef ENABLE_TESTS -+TOOL_DIRS += tests -+endif -+ -+include $(topsrcdir)/config/rules.mk -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp.gtkmozembed 2012-03-09 15:19:22.248678665 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.cpp 2012-03-09 15:19:22.248678665 +0100 -@@ -0,0 +1,253 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ -+/* ***** 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) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Terry Hayes -+ * Javier Delgadillo -+ * Oleg Romashin -+ * -+ * 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 ***** */ -+/** -+ * Derived from nsNSSDialogs http://landfill.mozilla.org/mxr-test/seamonkey/source/security/manager/pki/src/nsNSSDialogs.cpp -+ */ -+#include -+#include "nsIURI.h" -+#include "EmbedPrivate.h" -+#include "nsServiceManagerUtils.h" -+#include "nsIWebNavigationInfo.h" -+#include "nsDocShellCID.h" -+#include "nsCOMPtr.h" -+#ifdef MOZILLA_INTERNAL_API -+#include "nsString.h" -+#include "nsXPIDLString.h" -+#include "nsReadableUtils.h" -+#else -+#include "nsStringAPI.h" -+#endif -+#include "nsIPrompt.h" -+#include "nsIDOMWindow.h" -+#include "nsIComponentManager.h" -+#include "nsIServiceManager.h" -+#include "nsIStringBundle.h" -+#include "nsIInterfaceRequestor.h" -+#include "nsIInterfaceRequestorUtils.h" -+#include "nsIX509Cert.h" -+#include "nsIX509CertDB.h" -+#include "nsIDateTimeFormat.h" -+#include "nsDateTimeFormatCID.h" -+#include "EmbedCertificates.h" -+#include "nsIKeygenThread.h" -+#include "nsIX509CertValidity.h" -+#include "nsICRLInfo.h" -+#include "gtkmozembed.h" -+ -+#define PIPSTRING_BUNDLE_URL "chrome://pippki/locale/pippki.properties" -+ -+EmbedCertificates::EmbedCertificates(void) -+{ -+} -+ -+EmbedCertificates::~EmbedCertificates() -+{ -+} -+ -+NS_IMPL_THREADSAFE_ADDREF(EmbedCertificates) -+NS_IMPL_THREADSAFE_RELEASE(EmbedCertificates) -+NS_INTERFACE_MAP_BEGIN(EmbedCertificates) -+NS_INTERFACE_MAP_ENTRY(nsITokenPasswordDialogs) -+NS_INTERFACE_MAP_ENTRY(nsICertificateDialogs) -+NS_INTERFACE_MAP_ENTRY(nsIClientAuthDialogs) -+NS_INTERFACE_MAP_ENTRY(nsICertPickDialogs) -+NS_INTERFACE_MAP_ENTRY(nsITokenDialogs) -+NS_INTERFACE_MAP_ENTRY(nsIGeneratingKeypairInfoDialogs) -+NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMCryptoDialogs) -+NS_INTERFACE_MAP_END -+ -+nsresult -+EmbedCertificates::Init(void) -+{ -+ nsresult rv; -+ nsCOMPtr service = -+ do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv); -+ if (NS_FAILED(rv)) return NS_OK; -+ rv = service->CreateBundle(PIPSTRING_BUNDLE_URL, -+ getter_AddRefs(mPIPStringBundle)); -+ return NS_OK; -+} -+ -+nsresult -+EmbedCertificates::SetPassword(nsIInterfaceRequestor *ctx, -+ const PRUnichar *tokenName, PRBool* _canceled) -+{ -+ *_canceled = PR_FALSE; -+ return NS_OK; -+} -+ -+nsresult -+EmbedCertificates::GetPassword(nsIInterfaceRequestor *ctx, -+ const PRUnichar *tokenName, -+ PRUnichar **_password, -+ PRBool* _canceled) -+{ -+ *_canceled = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::CrlImportStatusDialog(nsIInterfaceRequestor *ctx, nsICRLInfo *crl) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx, -+ nsIX509Cert *cert, -+ PRUint32 *_trust, -+ PRBool *_retval) -+{ -+ // If an implementation chooses not to implement UI for displaying -+ // the cert and asking the user for confirmation, -+ // then this function must return PR_FALSE. -+ *_retval = PR_FALSE; -+ *_trust = nsIX509CertDB::UNTRUSTED; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::NotifyCACertExists(nsIInterfaceRequestor *ctx) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::ChooseCertificate( -+ nsIInterfaceRequestor *ctx, -+ const PRUnichar *cn, -+ const PRUnichar *organization, -+ const PRUnichar *issuer, -+ const PRUnichar **certNickList, -+ const PRUnichar **certDetailsList, -+ PRUint32 count, -+ PRInt32 *selectedIndex, -+ PRBool *canceled) -+{ -+ *canceled = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::PickCertificate( -+ nsIInterfaceRequestor *ctx, -+ const PRUnichar **certNickList, -+ const PRUnichar **certDetailsList, -+ PRUint32 count, -+ PRInt32 *selectedIndex, -+ PRBool *canceled) -+{ -+ *canceled = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::SetPKCS12FilePassword( -+ nsIInterfaceRequestor *ctx, -+ nsAString &_password, -+ PRBool *_retval) -+{ -+ /* The person who wrote this method implementation did -+ * not read the contract. -+ */ -+ *_retval = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::GetPKCS12FilePassword( -+ nsIInterfaceRequestor *ctx, -+ nsAString &_password, -+ PRBool *_retval) -+{ -+ /* The person who wrote this method implementation did -+ * not read the contract. -+ */ -+ *_retval = PR_FALSE; -+ return NS_OK; -+} -+ -+/* void viewCert (in nsIX509Cert cert); */ -+NS_IMETHODIMP -+EmbedCertificates::ViewCert( -+ nsIInterfaceRequestor *ctx, -+ nsIX509Cert *cert) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::DisplayGeneratingKeypairInfo(nsIInterfaceRequestor *aCtx, nsIKeygenThread *runnable) -+{ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::ChooseToken( -+ nsIInterfaceRequestor *aCtx, -+ const PRUnichar **aTokenList, -+ PRUint32 aCount, -+ PRUnichar **aTokenChosen, -+ PRBool *aCanceled) -+{ -+ *aCanceled = PR_FALSE; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedCertificates::DisplayProtectedAuth( -+ nsIInterfaceRequestor *aCtx, -+ nsIProtectedAuthThread *runnable) -+{ -+ return NS_OK; -+} -+ -+/* boolean ConfirmKeyEscrow (in nsIX509Cert escrowAuthority); */ -+NS_IMETHODIMP -+EmbedCertificates::ConfirmKeyEscrow(nsIX509Cert *escrowAuthority, PRBool *_retval) -+{ -+ // If an implementation chooses not to implement UI that asks the user for -+ // confirmation to hand out the private key, -+ // then this function must return PR_FALSE. -+ *_retval = PR_FALSE; -+ return NS_OK; -+} -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h.gtkmozembed 2012-03-09 15:19:22.249678670 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedCertificates.h 2012-03-09 15:19:22.249678670 +0100 -@@ -0,0 +1,84 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 et cindent: */ -+/* ***** 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) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Terry Hayes -+ * Javier Delgadillo -+ * Oleg Romashin -+ * -+ * 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 ***** */ -+/** -+ * Derived from nsNSSDialogs http://landfill.mozilla.org/mxr-test/seamonkey/source/security/manager/pki/src/nsNSSDialogs.h -+ */ -+#ifndef __EmbedCertificates_h -+#define __EmbedCertificates_h -+#include "nsITokenPasswordDialogs.h" -+#include "nsICertificateDialogs.h" -+#include "nsIClientAuthDialogs.h" -+#include "nsICertPickDialogs.h" -+#include "nsITokenDialogs.h" -+#include "nsIDOMCryptoDialogs.h" -+#include "nsIGenKeypairInfoDlg.h" -+#include "nsCOMPtr.h" -+#include "nsIStringBundle.h" -+#define EMBED_CERTIFICATES_CID \ -+ { 0x518e071f, 0x1dd2, 0x11b2, \ -+ { 0x93, 0x7e, 0xc4, 0x5f, 0x14, 0xde, 0xf7, 0x78 }} -+#define EMBED_CERTIFICATES_DESCRIPTION "Certificates Listener Impl" -+class EmbedPrivate; -+class EmbedCertificates -+: public nsITokenPasswordDialogs, -+ public nsICertificateDialogs, -+ public nsIClientAuthDialogs, -+ public nsICertPickDialogs, -+ public nsITokenDialogs, -+ public nsIDOMCryptoDialogs, -+ public nsIGeneratingKeypairInfoDialogs -+{ -+ public: -+ NS_DECL_ISUPPORTS -+ NS_DECL_NSITOKENPASSWORDDIALOGS -+ NS_DECL_NSICERTIFICATEDIALOGS -+ NS_DECL_NSICLIENTAUTHDIALOGS -+ NS_DECL_NSICERTPICKDIALOGS -+ NS_DECL_NSITOKENDIALOGS -+ NS_DECL_NSIDOMCRYPTODIALOGS -+ NS_DECL_NSIGENERATINGKEYPAIRINFODIALOGS -+ EmbedCertificates(); -+ virtual ~EmbedCertificates(); -+ nsresult Init(void); -+ protected: -+ nsCOMPtr mPIPStringBundle; -+}; -+#endif /* __EmbedCertificates_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp.gtkmozembed 2012-03-09 15:19:22.249678670 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.cpp 2012-03-09 15:19:22.249678670 +0100 -@@ -0,0 +1,156 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include "nsIURI.h" -+ -+#include "EmbedContentListener.h" -+#include "EmbedPrivate.h" -+ -+#include "nsServiceManagerUtils.h" -+#include "nsIWebNavigationInfo.h" -+#include "nsDocShellCID.h" -+ -+EmbedContentListener::EmbedContentListener(void) -+{ -+ mOwner = nsnull; -+} -+ -+EmbedContentListener::~EmbedContentListener() -+{ -+} -+ -+NS_IMPL_ISUPPORTS2(EmbedContentListener, -+ nsIURIContentListener, -+ nsISupportsWeakReference) -+ -+nsresult -+EmbedContentListener::Init(EmbedPrivate *aOwner) -+{ -+ mOwner = aOwner; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::OnStartURIOpen(nsIURI *aURI, -+ bool *aAbortOpen) -+{ -+ nsresult rv; -+ -+ nsCAutoString specString; -+ rv = aURI->GetSpec(specString); -+ -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[OPEN_URI], 0, -+ specString.get(), &return_val); -+ -+ *aAbortOpen = return_val; -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::DoContent(const char *aContentType, -+ bool aIsContentPreferred, -+ nsIRequest *aRequest, -+ nsIStreamListener **aContentHandler, -+ bool *aAbortProcess) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::IsPreferred(const char *aContentType, -+ char **aDesiredContentType, -+ bool *aCanHandleContent) -+{ -+ return CanHandleContent(aContentType, PR_TRUE, aDesiredContentType, -+ aCanHandleContent); -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::CanHandleContent(const char *aContentType, -+ bool aIsContentPreferred, -+ char **aDesiredContentType, -+ bool *_retval) -+{ -+ *_retval = PR_FALSE; -+ *aDesiredContentType = nsnull; -+ -+ if (aContentType) { -+ nsCOMPtr webNavInfo( -+ do_GetService(NS_WEBNAVIGATION_INFO_CONTRACTID)); -+ if (webNavInfo) { -+ PRUint32 canHandle; -+ nsresult rv = -+ webNavInfo->IsTypeSupported(nsDependentCString(aContentType), -+ mOwner ? mOwner->mNavigation.get() : nsnull, -+ &canHandle); -+ NS_ENSURE_SUCCESS(rv, rv); -+ *_retval = (canHandle != nsIWebNavigationInfo::UNSUPPORTED); -+ } -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::GetLoadCookie(nsISupports **aLoadCookie) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::SetLoadCookie(nsISupports *aLoadCookie) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::GetParentContentListener(nsIURIContentListener **aParent) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -+NS_IMETHODIMP -+EmbedContentListener::SetParentContentListener(nsIURIContentListener *aParent) -+{ -+ return NS_ERROR_NOT_IMPLEMENTED; -+} -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h.gtkmozembed 2012-03-09 15:19:22.250678675 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContentListener.h 2012-03-09 15:19:22.250678675 +0100 -@@ -0,0 +1,66 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#ifndef __EmbedContentListener_h -+#define __EmbedContentListener_h -+ -+#include "nsIURIContentListener.h" -+#include "nsWeakReference.h" -+ -+class EmbedPrivate; -+ -+class EmbedContentListener : public nsIURIContentListener, -+ public nsSupportsWeakReference -+{ -+ public: -+ -+ EmbedContentListener(); -+ virtual ~EmbedContentListener(); -+ -+ nsresult Init (EmbedPrivate *aOwner); -+ -+ NS_DECL_ISUPPORTS -+ -+ NS_DECL_NSIURICONTENTLISTENER -+ -+ private: -+ -+ EmbedPrivate *mOwner; -+ -+}; -+ -+#endif /* __EmbedContentListener_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp.gtkmozembed 2012-03-09 15:19:22.251678680 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.cpp 2012-03-09 15:19:22.251678680 +0100 -@@ -0,0 +1,618 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ -+/* ***** 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 -+ * Oleg Romashin. -+ * Portions created by the Initial Developer are Copyright (C) 2006 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Oleg Romashin -+ * -+ * 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 ***** */ -+#include "EmbedContextMenuInfo.h" -+#include "nsIImageLoadingContent.h" -+#include "imgILoader.h" -+#include "nsIDOMDocument.h" -+#include "nsIDOMHTMLDocument.h" -+#include "nsIDOMHTMLElement.h" -+#include "nsIDOMHTMLHtmlElement.h" -+#include "nsIDOMHTMLAnchorElement.h" -+#include "nsIDOMHTMLImageElement.h" -+#include "nsIDOMHTMLAreaElement.h" -+#include "nsIDOMHTMLLinkElement.h" -+#include "nsIDOMDocumentView.h" -+#include "nsIDOMAbstractView.h" -+#include "nsIDOMViewCSS.h" -+#include "nsIDOMCSSStyleDeclaration.h" -+#include "nsIDOMCSSValue.h" -+#include "nsIDOMCSSPrimitiveValue.h" -+#include "nsNetUtil.h" -+#include "nsUnicharUtils.h" -+#include "nsIDOMMouseEvent.h" -+#include "nsIDOMNSEvent.h" -+#include "nsIDOMWindow.h" -+#include "nsIDOMWindowCollection.h" -+#include "nsIWebBrowser.h" -+#include "nsIContent.h" -+#include "nsIPresShell.h" -+#include "nsIFormControl.h" -+#include "nsIDOMNSHTMLTextAreaElement.h" -+#include "nsIDOMHTMLInputElement.h" -+#include "nsIDOMHTMLTextAreaElement.h" -+#include "nsIDOMNSHTMLDocument.h" -+#include "nsIDOMNodeList.h" -+#include "nsISelection.h" -+#include "nsIDocument.h" -+#include "EmbedPrivate.h" -+#include -+#include -+#include -+#include -+#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) -+#include "nsIFrame.h" -+#endif -+ -+//***************************************************************************** -+// class EmbedContextMenuInfo -+//***************************************************************************** -+EmbedContextMenuInfo::EmbedContextMenuInfo(EmbedPrivate *aOwner) : mCtxFrameNum(-1), mEmbedCtxType(0) -+{ -+ mOwner = aOwner; -+ mEventNode = nsnull; -+ mCtxDocument = nsnull; -+ mNSHHTMLElement = nsnull; -+ mNSHHTMLElementSc = nsnull; -+ mCtxEvent = nsnull; -+ mEventNode = nsnull; -+ mFormRect = nsIntRect(0,0,0,0); -+} -+ -+EmbedContextMenuInfo::~EmbedContextMenuInfo(void) -+{ -+ mEventNode = nsnull; -+ mCtxDocument = nsnull; -+ mNSHHTMLElement = nsnull; -+ mNSHHTMLElementSc = nsnull; -+ mCtxEvent = nsnull; -+ mEventNode = nsnull; -+} -+ -+NS_IMPL_ADDREF(EmbedContextMenuInfo) -+NS_IMPL_RELEASE(EmbedContextMenuInfo) -+NS_INTERFACE_MAP_BEGIN(EmbedContextMenuInfo) -+NS_INTERFACE_MAP_ENTRY(nsISupports) -+NS_INTERFACE_MAP_END -+ -+nsresult -+EmbedContextMenuInfo::SetFrameIndex() -+{ -+ nsCOMPtr frames; -+ mCtxDomWindow->GetFrames(getter_AddRefs(frames)); -+ nsCOMPtr currentWindow; -+ PRUint32 frameCount = 0; -+ frames->GetLength(&frameCount); -+ for (unsigned int i= 0; i < frameCount; i++) { -+ frames->Item(i, getter_AddRefs(currentWindow)); -+ nsCOMPtr currentDoc; -+ currentWindow->GetDocument(getter_AddRefs(currentDoc)); -+ if (currentDoc == mCtxDocument) { -+ mCtxFrameNum = i; -+ mCtxDomWindow = currentWindow; -+ nsCOMPtr doc = do_QueryInterface(currentDoc); -+ if (doc) -+ doc->GetTitle(mCtxDocTitle); -+ return NS_OK; -+ } -+ } -+ return NS_ERROR_FAILURE; -+} -+ -+nsresult -+EmbedContextMenuInfo::GetFormControlType(nsIDOMEvent* aEvent) -+{ -+ if (!aEvent) -+ return NS_OK; -+ nsCOMPtr nsevent(do_QueryInterface(aEvent)); -+ nsCOMPtr target; -+ nsevent->GetOriginalTarget(getter_AddRefs(target)); -+ // mOrigTarget = target; -+ if (SetFormControlType(target)) { -+ nsCOMPtr eventNode = do_QueryInterface(target); -+ if (!eventNode) -+ return NS_OK; -+ //Frame Stuff -+ nsCOMPtr domDoc; -+ nsresult rv = eventNode->GetOwnerDocument(getter_AddRefs(domDoc)); -+ if (!NS_SUCCEEDED(rv) || !domDoc) { -+ return NS_OK; -+ } -+ mEventNode = eventNode; -+ mCtxDocument = domDoc; -+ nsCOMPtr doc = do_QueryInterface(mCtxDocument); -+ if (!doc) -+ return NS_OK; -+ nsIPresShell *presShell = doc->GetShell(); -+ if (!presShell) -+ return NS_OK; -+ nsCOMPtr tgContent = do_QueryInterface(mEventTarget); -+ nsIFrame* frame = nsnull; -+#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) -+ frame = tgContent->GetDocument() == presShell->GetDocument() ? -+ tgContent->GetPrimaryFrame() : nsnull; -+ if (frame) -+ mFormRect = frame->GetScreenRectExternal(); -+#endif -+ return NS_OK; -+ } -+ return NS_ERROR_FAILURE; -+} -+ -+nsresult -+EmbedContextMenuInfo::SetFormControlType(nsIDOMEventTarget *originalTarget) -+{ -+ nsresult rv = NS_ERROR_FAILURE; -+ nsCOMPtr targetContent = do_QueryInterface(originalTarget); -+ mCtxFormType = 0; -+ if (targetContent && targetContent->IsNodeOfType(nsIContent::eHTML_FORM_CONTROL)) { -+ nsCOMPtr formControl(do_QueryInterface(targetContent)); -+ if (formControl) { -+ mCtxFormType = formControl->GetType(); -+ rv = NS_OK; -+ //#ifdef MOZ_LOGGING -+ switch (mCtxFormType) { -+ case NS_FORM_BUTTON_BUTTON: -+ break; -+ case NS_FORM_BUTTON_RESET: -+ break; -+ case NS_FORM_BUTTON_SUBMIT: -+ break; -+ case NS_FORM_INPUT_BUTTON: -+ break; -+ case NS_FORM_INPUT_CHECKBOX: -+ break; -+ case NS_FORM_INPUT_FILE: -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ break; -+ case NS_FORM_INPUT_HIDDEN: -+ break; -+ case NS_FORM_INPUT_RESET: -+ break; -+ case NS_FORM_INPUT_IMAGE: -+ break; -+ case NS_FORM_INPUT_PASSWORD: -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IPASSWORD; -+ break; -+ case NS_FORM_INPUT_RADIO: -+ break; -+ case NS_FORM_INPUT_SUBMIT: -+ break; -+ case NS_FORM_INPUT_EMAIL: -+ case NS_FORM_INPUT_SEARCH: -+ case NS_FORM_INPUT_TEXT: -+ case NS_FORM_INPUT_TEL: -+ case NS_FORM_INPUT_URL: -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ break; -+ case NS_FORM_LABEL: -+ break; -+ case NS_FORM_SELECT: -+ break; -+ case NS_FORM_TEXTAREA: -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ break; -+ case NS_FORM_OBJECT: -+ break; -+ case NS_FORM_OUTPUT: -+ break; -+ default: -+ break; -+ } -+ if (mEmbedCtxType & GTK_MOZ_EMBED_CTX_INPUT) { -+ PRBool rdonly = PR_FALSE; -+ if (mCtxFormType == NS_FORM_TEXTAREA) { -+ nsCOMPtr input; -+ input = do_QueryInterface(mEventNode, &rv); -+ if (!NS_FAILED(rv) && input) -+ rv = input->GetReadOnly(&rdonly); -+ if (!NS_FAILED(rv) && rdonly) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_ROINPUT; -+ } -+ } else { -+ nsCOMPtr input; -+ input = do_QueryInterface(mEventNode, &rv); -+ if (!NS_FAILED(rv) && input) -+ rv = input->GetReadOnly(&rdonly); -+ if (!NS_FAILED(rv) && rdonly) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_ROINPUT; -+ } -+ } -+ } -+ //#endif -+ } -+ } -+ return rv; -+} -+ -+const char* -+EmbedContextMenuInfo::GetSelectedText() -+{ -+ nsString cString; -+ nsresult rv = NS_ERROR_FAILURE; -+ if (mCtxFormType != 0 && mEventNode) { -+ PRInt32 TextLength = 0, selStart = 0, selEnd = 0; -+ if (mCtxFormType == NS_FORM_INPUT_TEXT || mCtxFormType == NS_FORM_INPUT_FILE) { -+ nsCOMPtr nsinput = do_QueryInterface(mEventNode, &rv); -+ if (NS_SUCCEEDED(rv) && nsinput) -+ nsinput->GetTextLength(&TextLength); -+ if (TextLength > 0) { -+ nsinput->GetSelectionEnd(&selEnd); -+ nsinput->GetSelectionStart(&selStart); -+ if (selStart < selEnd || mCtxFormType == NS_FORM_INPUT_FILE) { -+ nsCOMPtr input = do_QueryInterface(mEventNode, &rv); -+ rv = input->GetValue(cString); -+ } -+ } -+ } else if (mCtxFormType == NS_FORM_TEXTAREA) { -+ nsCOMPtr nsinput = do_QueryInterface(mEventNode, &rv); -+ if (NS_SUCCEEDED(rv) && nsinput) -+ nsinput->GetTextLength(&TextLength); -+ if (TextLength > 0) { -+ nsinput->GetSelectionStart(&selStart); -+ nsinput->GetSelectionEnd(&selEnd); -+ if (selStart < selEnd) { -+ nsCOMPtr input = do_QueryInterface(mEventNode, &rv); -+ rv = input->GetValue(cString); -+ } -+ } -+ } -+ if (NS_SUCCEEDED(rv) && !cString.IsEmpty()) { -+ if (selStart < selEnd) { -+ cString.Cut(0, selStart); -+ cString.Cut(selEnd-selStart, TextLength); -+ } -+ rv = NS_OK; -+ } -+ } else if (mCtxDocument) { -+ nsCOMPtr htmlDoc = do_QueryInterface(mCtxDocument, &rv); -+ if (NS_FAILED(rv) || !htmlDoc) -+ return nsnull; -+ rv = htmlDoc->GetSelection(cString); -+ if (NS_FAILED(rv) || cString.IsEmpty()) -+ return nsnull; -+ rv = NS_OK; -+ } -+ if (rv == NS_OK) { -+ return NS_ConvertUTF16toUTF8(cString).get(); -+ } -+ return nsnull; -+} -+ -+nsresult -+EmbedContextMenuInfo::CheckDomImageElement(nsIDOMNode *node, nsString& aHref, -+ PRInt32 *aWidth, PRInt32 *aHeight) -+{ -+ nsresult rv = NS_ERROR_FAILURE; -+ nsCOMPtr image = -+ do_QueryInterface(node, &rv); -+ if (image) { -+ rv = image->GetSrc(aHref); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ rv = image->GetWidth(aWidth); -+ rv = image->GetHeight(aHeight); -+ rv = NS_OK; -+ } -+ return rv; -+} -+ -+nsresult -+EmbedContextMenuInfo::GetImageRequest(imgIRequest **aRequest, nsIDOMNode *aDOMNode) -+{ -+ NS_ENSURE_ARG(aDOMNode); -+ NS_ENSURE_ARG_POINTER(aRequest); -+ -+ // Get content -+ nsCOMPtr content(do_QueryInterface(aDOMNode)); -+ NS_ENSURE_TRUE(content, NS_ERROR_FAILURE); -+ -+ return content->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST, -+ aRequest); -+} -+ -+nsresult -+EmbedContextMenuInfo::CheckDomHtmlNode(nsIDOMNode *aNode) -+{ -+ nsresult rv = NS_ERROR_FAILURE; -+ nsString uTag; -+ PRUint16 dnode_type; -+ -+ nsCOMPtr node; -+ if (!aNode && mEventNode) -+ node = mEventNode; -+ nsCOMPtr element = do_QueryInterface(node, &rv); -+ if (!element) { -+ element = do_QueryInterface(mOrigNode, &rv); -+ if (element) { -+ node = mOrigNode; -+ element = do_QueryInterface(node, &rv); -+ } -+ } -+ -+ rv = node->GetNodeType(&dnode_type); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ -+ if (!((nsIDOMNode::ELEMENT_NODE == dnode_type) && element)) { -+ return rv; -+ } -+ nsCOMPtr nodeElement = do_QueryInterface(node, &rv); -+ if (NS_SUCCEEDED(rv) && nodeElement) { -+ mNSHHTMLElement = nodeElement; -+ } else { -+ mNSHHTMLElement = nsnull; -+ } -+ rv = element->GetLocalName(uTag); -+ if (NS_FAILED(rv)) { -+ return rv; -+ } -+ if (uTag.LowerCaseEqualsLiteral("object")) { -+ } -+ else if (uTag.LowerCaseEqualsLiteral("html")) { -+ } -+ else if (uTag.LowerCaseEqualsLiteral("a")) { -+ nsCOMPtr anchor = do_QueryInterface(node); -+ anchor->GetHref(mCtxHref); -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_LINK; -+ if (anchor && !mCtxHref.IsEmpty()) { -+ if (mCtxHref.LowerCaseEqualsLiteral("text/smartbookmark")) { -+ nsCOMPtr childNode; -+ node->GetFirstChild(getter_AddRefs(childNode)); -+ if (childNode) { -+ PRInt32 width, height; -+ rv = CheckDomImageElement(node, mCtxImgHref, &width, &height); -+ if (NS_SUCCEEDED(rv)) -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IMAGE; -+ } -+ } else if (StringBeginsWith(mCtxHref, NS_LITERAL_STRING("mailto:"))) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_EMAIL; -+ } -+ } -+ } -+ else if (uTag.LowerCaseEqualsLiteral("area")) { -+ nsCOMPtr area = do_QueryInterface(node, &rv); -+ if (NS_SUCCEEDED(rv) && area) { -+ PRBool aNoHref = PR_FALSE; -+ rv = area->GetNoHref(&aNoHref); -+ if (!aNoHref) -+ rv = area->GetHref(mCtxHref); -+ else -+ rv = area->GetTarget(mCtxHref); -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_LINK; -+ rv = NS_OK; -+ } -+ } -+ else if (uTag.LowerCaseEqualsLiteral("img")) { -+ PRInt32 width, height; -+ rv = CheckDomImageElement(node, mCtxImgHref, &width, &height); -+ if (NS_SUCCEEDED(rv)) -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IMAGE; -+ } else { -+ rv = NS_ERROR_FAILURE; -+ } -+ return rv; -+} -+ -+nsresult -+EmbedContextMenuInfo::UpdateContextData(void *aEvent) -+{ -+ NS_ENSURE_ARG_POINTER(aEvent); -+ nsresult rv; -+ nsCOMPtr event = do_QueryInterface((nsISupports*)aEvent, &rv); -+ if (NS_FAILED(rv) || !event) -+ return NS_ERROR_FAILURE; -+ return UpdateContextData(event); -+} -+ -+nsresult -+EmbedContextMenuInfo::GetElementForScroll(nsIDOMEvent *aEvent) -+{ -+ if (!aEvent) return NS_ERROR_UNEXPECTED; -+ nsCOMPtr nsevent(do_QueryInterface(aEvent)); -+ nsCOMPtr target; -+ nsevent->GetOriginalTarget(getter_AddRefs(target)); -+ if (!target) return NS_ERROR_UNEXPECTED; -+ nsCOMPtr targetDOMNode(do_QueryInterface(target)); -+ if (!targetDOMNode) return NS_ERROR_UNEXPECTED; -+ nsCOMPtr targetDOMDocument; -+ targetDOMNode->GetOwnerDocument(getter_AddRefs(targetDOMDocument)); -+ if (!targetDOMDocument) return NS_ERROR_UNEXPECTED; -+ return GetElementForScroll(targetDOMDocument); -+} -+ -+nsresult -+EmbedContextMenuInfo::GetElementForScroll(nsIDOMDocument *targetDOMDocument) -+{ -+ nsCOMPtr targetDOMElement; -+ targetDOMDocument->GetDocumentElement(getter_AddRefs(targetDOMElement)); -+ if (!targetDOMElement) return NS_ERROR_UNEXPECTED; -+ nsString bodyName(NS_LITERAL_STRING("body")); -+ nsCOMPtr bodyList; -+ targetDOMElement->GetElementsByTagName(bodyName, getter_AddRefs(bodyList)); -+ PRUint32 i = 0; -+ bodyList->GetLength(&i); -+ if (i) { -+ nsCOMPtr domBodyNode; -+ bodyList->Item(0, getter_AddRefs(domBodyNode)); -+ if (!domBodyNode) return NS_ERROR_UNEXPECTED; -+ mNSHHTMLElementSc = do_QueryInterface(domBodyNode); -+ if (!mNSHHTMLElementSc) return NS_ERROR_UNEXPECTED; -+ } -+ return NS_OK; -+} -+ -+nsresult -+EmbedContextMenuInfo::UpdateContextData(nsIDOMEvent *aDOMEvent) -+{ -+ if (mCtxEvent == aDOMEvent) -+ return NS_OK; -+ -+ nsresult rv = nsnull; -+ mCtxEvent = aDOMEvent; -+ NS_ENSURE_ARG_POINTER(mCtxEvent); -+ -+ PRUint16 eventphase; -+ mCtxEvent->GetEventPhase(&eventphase); -+ if (!eventphase) { -+ mCtxEvent = nsnull; -+ return NS_ERROR_FAILURE; -+ } -+ -+ nsCOMPtr originalTarget = nsnull; -+ nsCOMPtr originalNode = nsnull; -+ -+ nsCOMPtr aEvent = do_QueryInterface(mCtxEvent, &rv); -+ if (NS_FAILED(rv) || !aEvent) -+ return NS_OK; -+ -+ nsCOMPtr mouseEvent(do_QueryInterface(mCtxEvent, &rv)); -+ if (mouseEvent) { -+ ((nsIDOMMouseEvent*)mouseEvent)->GetClientX(&mX); -+ ((nsIDOMMouseEvent*)mouseEvent)->GetClientY(&mY); -+ } -+ -+ if (aEvent) -+ rv = aEvent->GetOriginalTarget(getter_AddRefs(originalTarget)); -+ originalNode = do_QueryInterface(originalTarget); -+ if (NS_FAILED(rv) || !originalNode) -+ return NS_ERROR_NULL_POINTER; -+ -+ // nsresult SelText = mOwner->ClipBoardAction(GTK_MOZ_EMBED_CAN_COPY); -+ if (originalNode == mOrigNode) -+ return NS_OK; -+ -+ mEmbedCtxType = GTK_MOZ_EMBED_CTX_NONE; -+ mOrigNode = originalNode; -+ if (mOrigNode) { -+ nsString SOrigNode; -+ mOrigNode->GetNodeName(SOrigNode); -+ if (SOrigNode.EqualsLiteral("#document")) -+ return NS_OK; -+ if (SOrigNode.EqualsLiteral("xul:thumb") -+ || SOrigNode.EqualsLiteral("xul:slider") -+ || SOrigNode.EqualsLiteral("xul:scrollbarbutton") -+ || SOrigNode.EqualsLiteral("xul:vbox") -+ || SOrigNode.EqualsLiteral("xul:spacer")) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_XUL; -+ return NS_OK; -+ } -+ } -+ if (mCtxEvent) -+ rv = mCtxEvent->GetTarget(getter_AddRefs(mEventTarget)); -+ if (NS_FAILED(rv) || !mEventTarget) { -+ return NS_OK; -+ } -+ nsCOMPtr eventNode = do_QueryInterface(mEventTarget, &rv); -+ mEventNode = eventNode; -+ //Frame Stuff -+ nsCOMPtr domDoc; -+ if (mEventNode) -+ rv = mEventNode->GetOwnerDocument(getter_AddRefs(domDoc)); -+ if (!NS_SUCCEEDED(rv) || !domDoc) { -+ // return NS_OK; -+ } -+ if (NS_SUCCEEDED(rv) && domDoc && mCtxDocument != domDoc) { -+ mCtxDocument = domDoc; -+ mNSHHTMLElementSc = nsnull; -+ mCtxDocument->GetDocumentURI(mCtxURI); -+ NS_ENSURE_ARG_POINTER(mOwner); -+ nsCOMPtr webBrowser; -+ mOwner->mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ webBrowser->GetContentDOMWindow(getter_AddRefs(mCtxDomWindow)); -+ nsCOMPtr mainDocument; -+ mCtxDomWindow->GetDocument(getter_AddRefs(mainDocument)); -+ if (!mainDocument) { -+ return NS_OK; -+ } -+ mCtxFrameNum = -1; -+ if (mainDocument != domDoc) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_IFRAME; -+ SetFrameIndex(); -+ } -+ } -+ nsCOMPtr targetDOMElement; -+ mCtxDocument->GetDocumentElement(getter_AddRefs(targetDOMElement)); -+ if (!targetDOMElement) return NS_ERROR_UNEXPECTED; -+ nsCOMPtr htmlDoc = do_QueryInterface(mCtxDocument); -+ if (htmlDoc) { -+ nsString DMode; -+ htmlDoc->GetDesignMode(DMode); -+ if (DMode.EqualsLiteral("on")) { -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_INPUT; -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_RICHEDIT; -+ } -+ } -+ nsCOMPtr doc = do_QueryInterface(mCtxDocument); -+ if (!doc) -+ return NS_OK; -+ nsIPresShell *presShell = doc->GetShell(); -+ if (!presShell) -+ return NS_OK; -+ nsCOMPtr tgContent = do_QueryInterface(mEventTarget); -+ nsIFrame* frame = nsnull; -+#if defined(FIXED_BUG347731) || !defined(MOZ_ENABLE_LIBXUL) -+ if (mEmbedCtxType & GTK_MOZ_EMBED_CTX_RICHEDIT) -+ frame = presShell->GetRootFrame(); -+ else if (tgContent->GetDocument() == presShell->GetDocument()) { -+ frame = tgContent->GetPrimaryFrame(); -+ } -+ if (frame) { -+ mFormRect = frame->GetScreenRectExternal(); -+ } -+#endif -+ if (NS_SUCCEEDED(SetFormControlType(mEventTarget))) { -+ return NS_OK; -+ } -+ CheckDomHtmlNode(); -+ nsCOMPtr node = mEventNode; -+ nsCOMPtr parentNode; -+ node->GetParentNode(getter_AddRefs(parentNode)); -+ node = parentNode; -+ while (node) { -+ if (NS_FAILED(CheckDomHtmlNode())) -+ break; -+ node->GetParentNode(getter_AddRefs(parentNode)); -+ node = parentNode; -+ } -+ mEmbedCtxType |= GTK_MOZ_EMBED_CTX_DOCUMENT; -+ return NS_OK; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h.gtkmozembed 2012-03-09 15:19:22.251678680 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedContextMenuInfo.h 2012-03-09 15:19:22.251678680 +0100 -@@ -0,0 +1,101 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 tw=80 et cindent: */ -+/* -+ * ***** 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 the Mozilla browser. -+ * -+ * The Original Code is mozilla.org code. -+ * -+ * The Initial Developer of the Original Code is -+ * Oleg Romashin. -+ * Portions created by the Initial Developer are Copyright (C) 2006 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Oleg Romashin -+ * -+ * 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 ***** */ -+#ifndef EmbedContextMenuInfo_h__ -+#define EmbedContextMenuInfo_h__ -+#include "nsCOMPtr.h" -+#include "nsIDOMNode.h" -+#include "nsIDOMEvent.h" -+#include "imgIContainer.h" -+#include "imgIRequest.h" -+#include "nsIDOMEventTarget.h" -+#include "nsRect.h" -+// for strings -+#ifdef MOZILLA_INTERNAL_API -+#include "nsXPIDLString.h" -+#include "nsReadableUtils.h" -+#endif -+#include "EmbedWindow.h" -+#include "nsIDOMNSHTMLElement.h" -+//***************************************************************************** -+// class EmbedContextMenuInfo -+// -+//***************************************************************************** -+class EmbedContextMenuInfo : public nsISupports -+{ -+public: -+ EmbedContextMenuInfo(EmbedPrivate *aOwner); -+ virtual ~EmbedContextMenuInfo(void); -+ NS_DECL_ISUPPORTS -+ nsresult GetFormControlType(nsIDOMEvent *aDOMEvent); -+ nsresult UpdateContextData(nsIDOMEvent *aDOMEvent); -+ nsresult UpdateContextData(void *aEvent); -+ const char* GetSelectedText(); -+ nsresult GetElementForScroll(nsIDOMDocument *targetDOMDocument); -+ nsresult GetElementForScroll(nsIDOMEvent *aEvent); -+ nsresult CheckDomImageElement(nsIDOMNode *node, nsString& aHref, -+ PRInt32 *aWidth, PRInt32 *aHeight); -+ nsresult GetImageRequest(imgIRequest **aRequest, nsIDOMNode *aDOMNode); -+ nsString GetCtxDocTitle(void) { return mCtxDocTitle; } -+ -+ -+ PRInt32 mX, mY, mObjWidth, mObjHeight, mCtxFrameNum; -+ nsString mCtxURI, mCtxHref, mCtxImgHref; -+ PRUint32 mEmbedCtxType; -+ PRInt32 mCtxFormType; -+ nsCOMPtr mEventNode; -+ nsCOMPtr mEventTarget; -+ nsCOMPtrmCtxDocument; -+ nsIntRect mFormRect; -+ nsCOMPtr mCtxDomWindow; -+ nsCOMPtr mCtxEvent; -+ nsCOMPtr mNSHHTMLElement; -+ nsCOMPtr mNSHHTMLElementSc; -+private: -+ nsresult SetFrameIndex(); -+ nsresult SetFormControlType(nsIDOMEventTarget *originalTarget); -+ nsresult CheckDomHtmlNode(nsIDOMNode *aNode = nsnull); -+ -+ EmbedPrivate *mOwner; -+ nsCOMPtr mOrigNode; -+ nsString mCtxDocTitle; -+}; // class EmbedContextMenuInfo -+#endif // EmbedContextMenuInfo_h__ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.cpp 2012-03-09 15:19:22.252678684 +0100 -@@ -0,0 +1,280 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include "nsCOMPtr.h" -+#include "nsIDOMMouseEvent.h" -+ -+#include "nsIDOMKeyEvent.h" -+#include "nsIDOMUIEvent.h" -+ -+#include "EmbedEventListener.h" -+#include "EmbedPrivate.h" -+ -+EmbedEventListener::EmbedEventListener(void) -+{ -+ mOwner = nsnull; -+} -+ -+EmbedEventListener::~EmbedEventListener() -+{ -+} -+ -+NS_IMPL_ISUPPORTS1(EmbedEventListener, nsIDOMEventListener) -+ -+nsresult -+EmbedEventListener::Init(EmbedPrivate *aOwner) -+{ -+ mOwner = aOwner; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::KeyDown(nsIDOMEvent* aDOMEvent) -+{ -+ // Return FALSE to this function to mark the event as not -+ // consumed... -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_KEY_DOWN], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::KeyUp(nsIDOMEvent* aDOMEvent) -+{ -+ // return FALSE to this function to mark this event as not -+ // consumed... -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_KEY_UP], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::KeyPress(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_KEY_PRESS], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseDown(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_DOWN], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseUp(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_UP], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseClick(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_CLICK], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseDblClick(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_DBL_CLICK], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseOver(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_OVER], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::MouseOut(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_MOUSE_OUT], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::Activate(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_ACTIVATE], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::FocusIn(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_FOCUS_IN], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::FocusOut(nsIDOMEvent* aDOMEvent) -+{ -+ // Return TRUE from your signal handler to mark the event as consumed. -+ gint return_val = FALSE; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DOM_FOCUS_OUT], 0, -+ (void *)aDOMEvent, &return_val); -+ if (return_val) { -+ aDOMEvent->StopPropagation(); -+ aDOMEvent->PreventDefault(); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedEventListener::HandleEvent(nsIDOMEvent* aDOMEvent) -+{ -+ nsAutoString eventType; -+ aDOMEvent->GetType(eventType); -+ -+ if (eventType.EqualsLiteral("keydown")) -+ return KeyDown(aDOMEvent); -+ else if (eventType.EqualsLiteral("keyup")) -+ return KeyUp(aDOMEvent); -+ else if (eventType.EqualsLiteral("keypress")) -+ return KeyPress(aDOMEvent); -+ else if (eventType.EqualsLiteral("mousedown")) -+ return MouseDown(aDOMEvent); -+ else if (eventType.EqualsLiteral("mouseup")) -+ return MouseUp(aDOMEvent); -+ else if (eventType.EqualsLiteral("click")) -+ return MouseClick(aDOMEvent); -+ else if (eventType.EqualsLiteral("dblclick")) -+ return MouseDblClick(aDOMEvent); -+ else if (eventType.EqualsLiteral("mouseover")) -+ return MouseOver(aDOMEvent); -+ else if (eventType.EqualsLiteral("mouseout")) -+ return MouseOut(aDOMEvent); -+ else if (eventType.EqualsLiteral("DOMActivate")) -+ return Activate(aDOMEvent); -+ else if (eventType.EqualsLiteral("DOMFocusIn")) -+ return FocusIn(aDOMEvent); -+ else if (eventType.EqualsLiteral("DOMFocusOut")) -+ return FocusOut(aDOMEvent); -+ -+ NS_ERROR("Unexpected event type"); -+ return NS_OK; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedEventListener.h 2012-03-09 15:19:22.252678684 +0100 -@@ -0,0 +1,89 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#ifndef __EmbedEventListener_h -+#define __EmbedEventListener_h -+ -+//#include "nsIDOMKeyListener.h" -+//#include "nsIDOMMouseListener.h" -+//#include "nsIDOMUIListener.h" -+#include "nsIDOMEventListener.h" -+ -+class EmbedPrivate; -+ -+class EmbedEventListener : public nsIDOMEventListener -+{ -+ public: -+ -+ EmbedEventListener(); -+ virtual ~EmbedEventListener(); -+ -+ nsresult Init(EmbedPrivate *aOwner); -+ -+ NS_DECL_ISUPPORTS -+ -+ // nsIDOMEventListener -+ -+ NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent); -+ -+ // nsIDOMKeyListener -+ -+ NS_IMETHOD KeyDown(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD KeyUp(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD KeyPress(nsIDOMEvent* aDOMEvent); -+ -+ // nsIDOMMouseListener -+ -+ NS_IMETHOD MouseDown(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseUp(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseClick(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseDblClick(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseOver(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD MouseOut(nsIDOMEvent* aDOMEvent); -+ -+ // nsIDOMUIListener -+ -+ NS_IMETHOD Activate(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD FocusIn(nsIDOMEvent* aDOMEvent); -+ NS_IMETHOD FocusOut(nsIDOMEvent* aDOMEvent); -+ -+ private: -+ -+ EmbedPrivate *mOwner; -+}; -+ -+#endif /* __EmbedEventListener_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp.gtkmozembed 2012-03-09 15:19:22.252678684 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.cpp 2012-03-09 15:19:22.253678688 +0100 -@@ -0,0 +1,88 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=4 sts=2 tw=80 et cindent: */ -+/* ***** 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 -+ * Oleg Romashin. -+ * Portions created by the Initial Developer are Copyright (C) 2006 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Oleg Romashin -+ * -+ * 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 ***** */ -+ -+#include "EmbedGtkTools.h" -+#ifndef MOZILLA_INTERNAL_API -+#include "nsServiceManagerUtils.h" -+#endif -+#include "EmbedPrivate.h" -+ -+GtkWidget * GetGtkWidgetForDOMWindow(nsIDOMWindow* aDOMWindow) -+{ -+ nsCOMPtr wwatch = do_GetService("@mozilla.org/embedcomp/window-watcher;1"); -+ if (!aDOMWindow) -+ return NULL; -+ nsCOMPtr chrome; -+ wwatch->GetChromeForWindow(aDOMWindow, getter_AddRefs(chrome)); -+ if (!chrome) { -+ return GTK_WIDGET(EmbedCommon::GetAnyLiveWidget()); -+ } -+ -+ nsCOMPtr siteWindow = nsnull; -+ siteWindow = do_QueryInterface(chrome); -+ -+ if (!siteWindow) { -+ return GTK_WIDGET(EmbedCommon::GetAnyLiveWidget()); -+ } -+ -+ GtkWidget* parentWidget; -+ siteWindow->GetSiteWindow((void**)&parentWidget); -+ if (GTK_IS_WIDGET(parentWidget)) -+ return parentWidget; -+ return NULL; -+} -+ -+GtkWindow * GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow) -+{ -+ GtkWidget* parentWidget = GetGtkWidgetForDOMWindow(aDOMWindow); -+ if (!parentWidget) -+ return NULL; -+ GtkWidget* gtkWin = gtk_widget_get_toplevel(parentWidget); -+ if (GTK_WIDGET_TOPLEVEL(gtkWin)) -+ return GTK_WINDOW(gtkWin); -+ return NULL; -+} -+ -+nsresult GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer) -+{ -+ g_return_val_if_fail(webBrowser, NS_ERROR_FAILURE); -+ nsCOMPtr docShell(do_GetInterface((nsISupports*)webBrowser)); -+ NS_ENSURE_TRUE(docShell, NS_ERROR_FAILURE); -+ return docShell->GetContentViewer(aViewer); -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h.gtkmozembed 2012-03-09 15:19:22.253678688 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedGtkTools.h 2012-03-09 15:19:22.253678688 +0100 -@@ -0,0 +1,67 @@ -+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* vim:set ts=2 sw=2 sts=2 et cindent: */ -+/* ***** 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 -+ * Oleg Romashin. -+ * Portions created by the Initial Developer are Copyright (C) 2006 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Oleg Romashin -+ * -+ * 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 ***** */ -+#ifndef __EmbedTools_h -+#define __EmbedTools_h -+ -+#include "nsCOMPtr.h" -+#ifdef MOZILLA_INTERNAL_API -+#include "nsString.h" -+#else -+#include "nsStringAPI.h" -+#endif -+#include "nsIDOMWindow.h" -+#include "nsIWindowWatcher.h" -+#include "nsIWebBrowserChrome.h" -+#include "nsIEmbeddingSiteWindow.h" -+#include "nsIServiceManager.h" -+#include "nsIContentViewer.h" -+#include "nsIDocShell.h" -+#include "nsIInterfaceRequestorUtils.h" -+#include -+ -+GtkWidget* -+GetGtkWidgetForDOMWindow(nsIDOMWindow* aDOMWindow); -+ -+GtkWindow* -+GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow); -+ -+nsresult -+GetContentViewer(nsIWebBrowser *webBrowser, nsIContentViewer **aViewer); -+ -+#endif /* __EmbedTools_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp.gtkmozembed 2012-03-09 15:19:22.254678693 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.cpp 2012-03-09 15:19:22.254678693 +0100 -@@ -0,0 +1,1016 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include "nsIDocShell.h" -+#include "nsIWebProgress.h" -+#include "nsIWidget.h" -+#include "nsCRT.h" -+#include "nsNetUtil.h" -+#include "nsIWebBrowserStream.h" -+#include "nsIWebBrowserFocus.h" -+#include "nsIDirectoryService.h" -+#include "nsAppDirectoryServiceDefs.h" -+ -+// for do_GetInterface -+#include "nsIInterfaceRequestor.h" -+// for do_CreateInstance -+#include "nsIComponentManager.h" -+#include "nsComponentManagerUtils.h" -+ -+// for initializing our window watcher service -+#include "nsIWindowWatcher.h" -+ -+#include "nsILocalFile.h" -+ -+#include "nsXULAppAPI.h" -+ -+// all of the crap that we need for event listeners -+// and when chrome windows finish loading -+#include "nsIDOMWindow.h" -+#include "nsPIDOMWindow.h" -+ -+ -+// For seting scrollbar visibilty -+#include "nsIDOMBarProp.h" -+ -+// all of our local includes -+#include "EmbedPrivate.h" -+#include "EmbedWindow.h" -+#include "EmbedProgress.h" -+#include "EmbedContentListener.h" -+#include "EmbedEventListener.h" -+#include "EmbedWindowCreator.h" -+#include "GtkPromptService.h" -+ -+#include "mozilla/ModuleUtils.h" -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+#include "nsIAccessibilityService.h" -+#include "nsIAccessible.h" -+#include "nsIDOMDocument.h" -+#endif -+ -+PRUint32 EmbedPrivate::sWidgetCount = 0; -+ -+char *EmbedPrivate::sPath = nsnull; -+char *EmbedPrivate::sCompPath = nsnull; -+nsTArray *EmbedPrivate::sWindowList = nsnull; -+nsILocalFile *EmbedPrivate::sProfileDir = nsnull; -+nsISupports *EmbedPrivate::sProfileLock = nsnull; -+GtkWidget *EmbedPrivate::sOffscreenWindow = 0; -+GtkWidget *EmbedPrivate::sOffscreenFixed = 0; -+ -+nsIDirectoryServiceProvider *EmbedPrivate::sAppFileLocProvider = nsnull; -+ -+class GTKEmbedDirectoryProvider : public nsIDirectoryServiceProvider2 -+{ -+public: -+ NS_DECL_ISUPPORTS_INHERITED -+ NS_DECL_NSIDIRECTORYSERVICEPROVIDER -+ NS_DECL_NSIDIRECTORYSERVICEPROVIDER2 -+}; -+ -+static const GTKEmbedDirectoryProvider kDirectoryProvider; -+ -+NS_IMPL_QUERY_INTERFACE2(GTKEmbedDirectoryProvider, -+ nsIDirectoryServiceProvider, -+ nsIDirectoryServiceProvider2) -+ -+NS_IMETHODIMP_(nsrefcnt) -+GTKEmbedDirectoryProvider::AddRef() -+{ -+ return 1; -+} -+ -+NS_IMETHODIMP_(nsrefcnt) -+GTKEmbedDirectoryProvider::Release() -+{ -+ return 1; -+} -+ -+NS_IMETHODIMP -+GTKEmbedDirectoryProvider::GetFile(const char *aKey, bool *aPersist, -+ nsIFile* *aResult) -+{ -+ if (EmbedPrivate::sAppFileLocProvider) { -+ nsresult rv = EmbedPrivate::sAppFileLocProvider->GetFile(aKey, aPersist, -+ aResult); -+ if (NS_SUCCEEDED(rv)) -+ return rv; -+ } -+ -+ if (EmbedPrivate::sProfileDir && (!strcmp(aKey, NS_APP_USER_PROFILE_50_DIR) -+ || !strcmp(aKey, NS_APP_PROFILE_DIR_STARTUP))) { -+ *aPersist = PR_TRUE; -+ return EmbedPrivate::sProfileDir->Clone(aResult); -+ } -+ -+ return NS_ERROR_FAILURE; -+} -+ -+NS_IMETHODIMP -+GTKEmbedDirectoryProvider::GetFiles(const char *aKey, -+ nsISimpleEnumerator* *aResult) -+{ -+ nsCOMPtr -+ dp2(do_QueryInterface(EmbedPrivate::sAppFileLocProvider)); -+ -+ if (!dp2) -+ return NS_ERROR_FAILURE; -+ -+ return dp2->GetFiles(aKey, aResult); -+} -+ -+#define NS_PROMPTSERVICE_CID \ -+ {0x95611356, 0xf583, 0x46f5, {0x81, 0xff, 0x4b, 0x3e, 0x01, 0x62, 0xc6, 0x19}} -+ -+NS_GENERIC_FACTORY_CONSTRUCTOR(GtkPromptService) -+NS_DEFINE_NAMED_CID(NS_PROMPTSERVICE_CID); -+ -+static const mozilla::Module::CIDEntry kDefaultPromptCIDs[] = { -+ { &kNS_PROMPTSERVICE_CID, false, NULL, GtkPromptServiceConstructor }, -+ { NULL } -+}; -+ -+static const mozilla::Module::ContractIDEntry kDefaultPromptContracts[] = { -+ { "@mozilla.org/embedcomp/prompt-service;1", &kNS_PROMPTSERVICE_CID }, -+ { NULL } -+}; -+ -+static const mozilla::Module kDefaultPromptModule = { -+ mozilla::Module::kVersion, -+ kDefaultPromptCIDs, -+ kDefaultPromptContracts -+}; -+ -+EmbedPrivate::EmbedPrivate(void) -+{ -+ mOwningWidget = nsnull; -+ mWindow = nsnull; -+ mProgress = nsnull; -+ mContentListener = nsnull; -+ mEventListener = nsnull; -+ mChromeMask = nsIWebBrowserChrome::CHROME_ALL; -+ mIsChrome = PR_FALSE; -+ mChromeLoaded = PR_FALSE; -+ mListenersAttached = PR_FALSE; -+ mMozWindowWidget = 0; -+ mIsDestroyed = PR_FALSE; -+ -+ PushStartup(); -+ if (!sWindowList) { -+ sWindowList = new nsTArray(); -+ } -+ sWindowList->AppendElement(this); -+} -+ -+EmbedPrivate::~EmbedPrivate() -+{ -+ sWindowList->RemoveElement(this); -+ PopStartup(); -+} -+ -+nsresult -+EmbedPrivate::Init(GtkMozEmbed *aOwningWidget) -+{ -+ // are we being re-initialized? -+ if (mOwningWidget) -+ return NS_OK; -+ -+ // hang on with a reference to the owning widget -+ mOwningWidget = aOwningWidget; -+ -+ // Create our embed window, and create an owning reference to it and -+ // initialize it. It is assumed that this window will be destroyed -+ // when we go out of scope. -+ mWindow = new EmbedWindow(); -+ mWindowGuard = static_cast(mWindow); -+ mWindow->Init(this); -+ -+ // Create our progress listener object, make an owning reference, -+ // and initialize it. It is assumed that this progress listener -+ // will be destroyed when we go out of scope. -+ mProgress = new EmbedProgress(); -+ mProgressGuard = static_cast -+ (mProgress); -+ mProgress->Init(this); -+ -+ // Create our content listener object, initialize it and attach it. -+ // It is assumed that this will be destroyed when we go out of -+ // scope. -+ mContentListener = new EmbedContentListener(); -+ mContentListenerGuard = static_cast(static_cast(mContentListener)); -+ mContentListener->Init(this); -+ -+ // Create our key listener object and initialize it. It is assumed -+ // that this will be destroyed before we go out of scope. -+ mEventListener = new EmbedEventListener(); -+ mEventListenerGuard = -+ static_cast(static_cast(mEventListener)); -+ mEventListener->Init(this); -+ -+ // has the window creator service been set up? -+ static int initialized = PR_FALSE; -+ // Set up our window creator ( only once ) -+ if (!initialized) { -+ // We set this flag here instead of on success. If it failed we -+ // don't want to keep trying and leaking window creator objects. -+ initialized = PR_TRUE; -+ -+ // create our local object -+ EmbedWindowCreator *creator = new EmbedWindowCreator(); -+ nsCOMPtr windowCreator; -+ windowCreator = static_cast(creator); -+ -+ // Attach it via the watcher service -+ nsCOMPtr watcher = do_GetService(NS_WINDOWWATCHER_CONTRACTID); -+ if (watcher) -+ watcher->SetWindowCreator(windowCreator); -+ } -+ return NS_OK; -+} -+ -+nsresult -+EmbedPrivate::Realize(PRBool *aAlreadyRealized) -+{ -+ -+ *aAlreadyRealized = PR_FALSE; -+ -+ // create the offscreen window if we have to -+ EnsureOffscreenWindow(); -+ -+ // Have we ever been initialized before? If so then just reparent -+ // from the offscreen window. -+ if (mMozWindowWidget) { -+ gtk_widget_reparent(mMozWindowWidget, GTK_WIDGET(mOwningWidget)); -+ *aAlreadyRealized = PR_TRUE; -+ return NS_OK; -+ } -+ -+ // Get the nsIWebBrowser object for our embedded window. -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // get a handle on the navigation object -+ mNavigation = do_QueryInterface(webBrowser); -+ -+ // Create our session history object and tell the navigation object -+ // to use it. We need to do this before we create the web browser -+ // window. -+ mSessionHistory = do_CreateInstance(NS_SHISTORY_CONTRACTID); -+ mNavigation->SetSessionHistory(mSessionHistory); -+ -+ // create the window -+ mWindow->CreateWindow(); -+ -+ // bind the progress listener to the browser object -+ nsCOMPtr supportsWeak; -+ supportsWeak = do_QueryInterface(mProgressGuard); -+ nsCOMPtr weakRef; -+ supportsWeak->GetWeakReference(getter_AddRefs(weakRef)); -+ webBrowser->AddWebBrowserListener(weakRef, -+ NS_GET_IID(nsIWebProgressListener)); -+ -+ // set ourselves as the parent uri content listener -+ nsCOMPtr uriListener; -+ uriListener = do_QueryInterface(mContentListenerGuard); -+ webBrowser->SetParentURIContentListener(uriListener); -+ -+ // save the window id of the newly created window -+ nsCOMPtr mozWidget; -+ mWindow->mBaseWindow->GetMainWidget(getter_AddRefs(mozWidget)); -+ // get the native drawing area -+ GdkWindow *tmp_window = -+ static_cast( -+ mozWidget->GetNativeData(NS_NATIVE_WINDOW)); -+ // and, thanks to superwin we actually need the parent of that. -+ tmp_window = gdk_window_get_parent(tmp_window); -+ // save the widget ID - it should be the mozarea of the window. -+ gpointer data = nsnull; -+ gdk_window_get_user_data(tmp_window, &data); -+ mMozWindowWidget = static_cast(data); -+ -+ // Apply the current chrome mask -+ ApplyChromeMask(); -+ -+ return NS_OK; -+} -+ -+void -+EmbedPrivate::Unrealize(void) -+{ -+ // reparent to our offscreen window -+ gtk_widget_reparent(mMozWindowWidget, sOffscreenFixed); -+} -+ -+void -+EmbedPrivate::Show(void) -+{ -+ // Get the nsIWebBrowser object for our embedded window. -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // and set the visibility on the thing -+ nsCOMPtr baseWindow = do_QueryInterface(webBrowser); -+ baseWindow->SetVisibility(PR_TRUE); -+} -+ -+void -+EmbedPrivate::Hide(void) -+{ -+ // Get the nsIWebBrowser object for our embedded window. -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // and set the visibility on the thing -+ nsCOMPtr baseWindow = do_QueryInterface(webBrowser); -+ baseWindow->SetVisibility(PR_FALSE); -+} -+ -+void -+EmbedPrivate::Resize(PRUint32 aWidth, PRUint32 aHeight) -+{ -+ mWindow->SetDimensions(nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER, -+ 0, 0, aWidth, aHeight); -+} -+ -+void -+EmbedPrivate::Destroy(void) -+{ -+ // This flag might have been set from -+ // EmbedWindow::DestroyBrowserWindow() as well if someone used a -+ // window.close() or something or some other script action to close -+ // the window. No harm setting it again. -+ mIsDestroyed = PR_TRUE; -+ -+ // Get the nsIWebBrowser object for our embedded window. -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // Release our progress listener -+ nsCOMPtr supportsWeak; -+ supportsWeak = do_QueryInterface(mProgressGuard); -+ nsCOMPtr weakRef; -+ supportsWeak->GetWeakReference(getter_AddRefs(weakRef)); -+ webBrowser->RemoveWebBrowserListener(weakRef, -+ NS_GET_IID(nsIWebProgressListener)); -+ weakRef = nsnull; -+ supportsWeak = nsnull; -+ -+ // Release our content listener -+ webBrowser->SetParentURIContentListener(nsnull); -+ mContentListenerGuard = nsnull; -+ mContentListener = nsnull; -+ -+ // Now that we have removed the listener, release our progress -+ // object -+ mProgressGuard = nsnull; -+ mProgress = nsnull; -+ -+ // detach our event listeners and release the event receiver -+ DetachListeners(); -+ if (mEventTarget) -+ mEventTarget = nsnull; -+ -+ // destroy our child window -+ mWindow->ReleaseChildren(); -+ -+ // release navigation -+ mNavigation = nsnull; -+ -+ // release session history -+ mSessionHistory = nsnull; -+ -+ mOwningWidget = nsnull; -+ -+ mMozWindowWidget = 0; -+} -+ -+void -+EmbedPrivate::SetURI(const char *aURI) -+{ -+ mURI.Assign(aURI); -+} -+ -+void -+EmbedPrivate::LoadCurrentURI(void) -+{ -+ if (mURI.Length()) { -+ nsCOMPtr piWin; -+ GetPIDOMWindow(getter_AddRefs(piWin)); -+ -+ nsAutoPopupStatePusher popupStatePusher(piWin, openAllowed); -+ -+ mNavigation->LoadURI(NS_ConvertUTF8toUTF16(mURI).get(), // URI string -+ nsIWebNavigation::LOAD_FLAGS_NONE | // Load flags -+ nsIWebNavigation::LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP, // Allow keyword.URL.. functionality -+ nsnull, // Referring URI -+ nsnull, // Post data -+ nsnull); // extra headers -+ } -+} -+ -+void -+EmbedPrivate::Reload(PRUint32 reloadFlags) -+{ -+ /* Use the session history if it is available, this -+ * allows framesets to reload correctly */ -+ nsCOMPtr wn; -+ -+ if (mSessionHistory) { -+ wn = do_QueryInterface(mSessionHistory); -+ } -+ if (!wn) -+ wn = mNavigation; -+ -+ if (wn) -+ wn->Reload(reloadFlags); -+} -+ -+ -+void -+EmbedPrivate::ApplyChromeMask() -+{ -+ if (mWindow) { -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ nsCOMPtr domWindow; -+ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); -+ if (domWindow) { -+ -+ nsCOMPtr scrollbars; -+ domWindow->GetScrollbars(getter_AddRefs(scrollbars)); -+ if (scrollbars) { -+ -+ scrollbars->SetVisible -+ (mChromeMask & nsIWebBrowserChrome::CHROME_SCROLLBARS ? -+ PR_TRUE : PR_FALSE); -+ } -+ } -+ } -+} -+ -+ -+void -+EmbedPrivate::SetChromeMask(PRUint32 aChromeMask) -+{ -+ mChromeMask = aChromeMask; -+ -+ ApplyChromeMask(); -+} -+ -+ -+/* static */ -+void -+EmbedPrivate::PushStartup(void) -+{ -+ // increment the number of widgets -+ sWidgetCount++; -+ -+ // if this is the first widget, fire up xpcom -+ if (sWidgetCount == 1) { -+ nsresult rv; -+ -+ nsCOMPtr binDir; -+ if (sCompPath) { -+ rv = NS_NewNativeLocalFile(nsDependentCString(sCompPath), 1, getter_AddRefs(binDir)); -+ if (NS_FAILED(rv)) -+ return; -+ } -+ -+ const char *grePath = sPath; -+ -+ if (!grePath) -+ grePath = getenv("MOZILLA_FIVE_HOME"); -+ -+ if (!grePath) -+ return; -+ -+ nsCOMPtr greDir; -+ rv = NS_NewNativeLocalFile(nsDependentCString(grePath), PR_TRUE, -+ getter_AddRefs(greDir)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ if (sProfileDir && !sProfileLock) { -+ rv = XRE_LockProfileDirectory(sProfileDir, -+ &sProfileLock); -+ if (NS_FAILED(rv)) return; -+ } -+ -+ rv = XRE_InitEmbedding2(greDir, binDir, -+ const_cast(&kDirectoryProvider)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ if (sProfileDir) -+ XRE_NotifyProfile(); -+ -+ RegisterAppComponents(); -+ } -+} -+ -+/* static */ -+void -+EmbedPrivate::PopStartup(void) -+{ -+ sWidgetCount--; -+ if (sWidgetCount == 0) { -+ -+ // destroy the offscreen window -+ DestroyOffscreenWindow(); -+ -+ // we no longer need a reference to the DirectoryServiceProvider -+ if (sAppFileLocProvider) { -+ NS_RELEASE(sAppFileLocProvider); -+ sAppFileLocProvider = nsnull; -+ } -+ -+ // shut down XPCOM/Embedding -+ XRE_TermEmbedding(); -+ -+ NS_IF_RELEASE(sProfileLock); -+ NS_IF_RELEASE(sProfileDir); -+ } -+} -+ -+/* static */ -+void EmbedPrivate::SetPath(const char *aPath) -+{ -+ if (sPath) -+ free(sPath); -+ if (aPath) -+ sPath = strdup(aPath); -+ else -+ sPath = nsnull; -+} -+ -+/* static */ -+void -+EmbedPrivate::SetCompPath(const char *aPath) -+{ -+ if (sCompPath) -+ free(sCompPath); -+ if (aPath) -+ sCompPath = strdup(aPath); -+ else -+ sCompPath = nsnull; -+} -+ -+/* static */ -+void -+EmbedPrivate::SetProfilePath(const char *aDir, const char *aName) -+{ -+ if (sProfileDir) { -+ if (sWidgetCount) { -+ NS_ERROR("Cannot change profile directory during run."); -+ return; -+ } -+ -+ NS_RELEASE(sProfileDir); -+ NS_RELEASE(sProfileLock); -+ } -+ -+ nsresult rv = -+ NS_NewNativeLocalFile(nsDependentCString(aDir), PR_TRUE, &sProfileDir); -+ -+ if (NS_SUCCEEDED(rv) && aName) -+ rv = sProfileDir->AppendNative(nsDependentCString(aName)); -+ -+ if (NS_SUCCEEDED(rv)) { -+ bool exists = PR_FALSE; -+ rv = sProfileDir->Exists(&exists); -+ if (!exists) -+ rv = sProfileDir->Create(nsIFile::DIRECTORY_TYPE, 0700); -+ rv = XRE_LockProfileDirectory(sProfileDir, &sProfileLock); -+ } -+ -+ if (NS_SUCCEEDED(rv)) { -+ if (sWidgetCount) -+ XRE_NotifyProfile(); -+ -+ return; -+ } -+ -+ NS_WARNING("Failed to lock profile."); -+ -+ // Failed -+ NS_IF_RELEASE(sProfileDir); -+ NS_IF_RELEASE(sProfileLock); -+} -+ -+void -+EmbedPrivate::SetDirectoryServiceProvider(nsIDirectoryServiceProvider * appFileLocProvider) -+{ -+ if (sAppFileLocProvider) -+ NS_RELEASE(sAppFileLocProvider); -+ -+ if (appFileLocProvider) { -+ sAppFileLocProvider = appFileLocProvider; -+ NS_ADDREF(sAppFileLocProvider); -+ } -+} -+ -+nsresult -+EmbedPrivate::OpenStream(const char *aBaseURI, const char *aContentType) -+{ -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ nsCOMPtr wbStream = do_QueryInterface(webBrowser); -+ if (!wbStream) return NS_ERROR_FAILURE; -+ -+ nsCOMPtr uri; -+ nsresult rv = NS_NewURI(getter_AddRefs(uri), aBaseURI); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ rv = wbStream->OpenStream(uri, nsDependentCString(aContentType)); -+ return rv; -+} -+ -+nsresult -+EmbedPrivate::AppendToStream(const PRUint8 *aData, PRUint32 aLen) -+{ -+ // Attach listeners to this document since in some cases we don't -+ // get updates for content added this way. -+ ContentStateChange(); -+ -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ nsCOMPtr wbStream = do_QueryInterface(webBrowser); -+ if (!wbStream) return NS_ERROR_FAILURE; -+ -+ return wbStream->AppendToStream(aData, aLen); -+} -+ -+nsresult -+EmbedPrivate::CloseStream(void) -+{ -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ nsCOMPtr wbStream = do_QueryInterface(webBrowser); -+ if (!wbStream) return NS_ERROR_FAILURE; -+ -+ return wbStream->CloseStream(); -+} -+ -+/* static */ -+EmbedPrivate * -+EmbedPrivate::FindPrivateForBrowser(nsIWebBrowserChrome *aBrowser) -+{ -+ if (!sWindowList) -+ return nsnull; -+ -+ // Get the number of browser windows. -+ PRInt32 count = sWindowList->Length(); -+ // This function doesn't get called very often at all ( only when -+ // creating a new window ) so it's OK to walk the list of open -+ // windows. -+ for (int i = 0; i < count; i++) { -+ EmbedPrivate *tmpPrivate = sWindowList->ElementAt(i); -+ // get the browser object for that window -+ nsIWebBrowserChrome *chrome = static_cast( -+ tmpPrivate->mWindow); -+ if (chrome == aBrowser) -+ return tmpPrivate; -+ } -+ -+ return nsnull; -+} -+ -+void -+EmbedPrivate::ContentStateChange(void) -+{ -+ -+ // we don't attach listeners to chrome -+ if (mListenersAttached && !mIsChrome) -+ return; -+ -+ GetListener(); -+ -+ if (!mEventTarget) -+ return; -+ -+ AttachListeners(); -+ -+} -+ -+void -+EmbedPrivate::ContentFinishedLoading(void) -+{ -+ if (mIsChrome) { -+ // We're done loading. -+ mChromeLoaded = PR_TRUE; -+ -+ // get the web browser -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // get the content DOM window for that web browser -+ nsCOMPtr domWindow; -+ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); -+ if (!domWindow) { -+ NS_WARNING("no dom window in content finished loading\n"); -+ return; -+ } -+ -+ // resize the content -+ domWindow->SizeToContent(); -+ -+ // and since we're done loading show the window, assuming that the -+ // visibility flag has been set. -+ bool visibility; -+ mWindow->GetVisibility(&visibility); -+ if (visibility) -+ mWindow->SetVisibility(PR_TRUE); -+ } -+} -+ -+void -+EmbedPrivate::ChildFocusIn(void) -+{ -+ if (mIsDestroyed) -+ return; -+ -+ nsresult rv; -+ nsCOMPtr webBrowser; -+ rv = mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ nsCOMPtr webBrowserFocus(do_QueryInterface(webBrowser)); -+ if (!webBrowserFocus) -+ return; -+ -+ webBrowserFocus->Activate(); -+} -+ -+void -+EmbedPrivate::ChildFocusOut(void) -+{ -+ if (mIsDestroyed) -+ return; -+ -+ nsresult rv; -+ nsCOMPtr webBrowser; -+ rv = mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ nsCOMPtr webBrowserFocus(do_QueryInterface(webBrowser)); -+ if (!webBrowserFocus) -+ return; -+ -+ webBrowserFocus->Deactivate(); -+} -+ -+// Get the event listener for the chrome event handler. -+ -+void -+EmbedPrivate::GetListener(void) -+{ -+ if (mEventTarget) -+ return; -+ -+ nsCOMPtr piWin; -+ GetPIDOMWindow(getter_AddRefs(piWin)); -+ -+ if (!piWin) -+ return; -+ -+ mEventTarget = do_QueryInterface(piWin->GetChromeEventHandler()); -+} -+ -+// attach key and mouse event listeners -+ -+void -+EmbedPrivate::AttachListeners(void) -+{ -+ if (!mEventTarget || mListenersAttached) -+ return; -+ -+ nsIDOMEventListener *eventListener = -+ static_cast(static_cast(mEventListener)); -+ -+ // add the key listener -+ nsresult rv; -+ -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keydown"), -+ eventListener, PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keyup"), -+ eventListener, PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("keypress"), -+ eventListener, PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mousedown"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseup"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("click"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("dblclick"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseover"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("mouseout"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMActivate"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMFocusIn"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ rv = mEventTarget->AddEventListener(NS_LITERAL_STRING("DOMFocusOut"), eventListener, -+ PR_FALSE, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv,); -+ -+ // ok, all set. -+ mListenersAttached = PR_TRUE; -+} -+ -+void -+EmbedPrivate::DetachListeners(void) -+{ -+ if (!mListenersAttached || !mEventTarget) -+ return; -+ -+ nsIDOMEventListener *eventListener = -+ static_cast(static_cast(mEventListener)); -+ -+ nsresult rv; -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keydown"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keyup"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("keypress"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mousedown"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseup"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("click"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("dblclick"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseover"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("mouseout"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMActivate"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMFocusIn"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ rv = mEventTarget->RemoveEventListener(NS_LITERAL_STRING("DOMFocusOut"), -+ eventListener, PR_FALSE); -+ NS_ENSURE_SUCCESS(rv, ); -+ -+ mListenersAttached = PR_FALSE; -+} -+ -+nsresult -+EmbedPrivate::GetPIDOMWindow(nsPIDOMWindow **aPIWin) -+{ -+ *aPIWin = nsnull; -+ -+ // get the web browser -+ nsCOMPtr webBrowser; -+ mWindow->GetWebBrowser(getter_AddRefs(webBrowser)); -+ -+ // get the content DOM window for that web browser -+ nsCOMPtr domWindow; -+ webBrowser->GetContentDOMWindow(getter_AddRefs(domWindow)); -+ if (!domWindow) -+ return NS_ERROR_FAILURE; -+ -+ // get the private DOM window -+ nsCOMPtr domWindowPrivate = do_QueryInterface(domWindow); -+ // and the root window for that DOM window -+ *aPIWin = domWindowPrivate->GetPrivateRoot(); -+ -+ if (*aPIWin) { -+ NS_ADDREF(*aPIWin); -+ return NS_OK; -+ } -+ -+ return NS_ERROR_FAILURE; -+ -+} -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+void * -+EmbedPrivate::GetAtkObjectForCurrentDocument() -+{ -+ if (!mNavigation) -+ return nsnull; -+ -+ nsCOMPtr accService = -+ do_GetService("@mozilla.org/accessibilityService;1"); -+ if (accService) { -+ //get current document -+ nsCOMPtr domDoc; -+ mNavigation->GetDocument(getter_AddRefs(domDoc)); -+ NS_ENSURE_TRUE(domDoc, nsnull); -+ -+ nsCOMPtr domNode(do_QueryInterface(domDoc)); -+ NS_ENSURE_TRUE(domNode, nsnull); -+ -+ nsCOMPtr acc; -+ accService->GetAccessibleFor(domNode, getter_AddRefs(acc)); -+ NS_ENSURE_TRUE(acc, nsnull); -+ -+ void *atkObj = nsnull; -+ if (NS_SUCCEEDED(acc->GetNativeInterface(&atkObj))) -+ return atkObj; -+ } -+ return nsnull; -+} -+#endif /* MOZ_ACCESSIBILITY_ATK */ -+ -+/* static */ -+void -+EmbedPrivate::RegisterAppComponents(void) -+{ -+ XRE_AddStaticComponent(&kDefaultPromptModule); -+} -+ -+/* static */ -+void -+EmbedPrivate::EnsureOffscreenWindow(void) -+{ -+ if (sOffscreenWindow) -+ return; -+ sOffscreenWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); -+ gtk_widget_realize(sOffscreenWindow); -+ sOffscreenFixed = gtk_fixed_new(); -+ gtk_container_add(GTK_CONTAINER(sOffscreenWindow), sOffscreenFixed); -+ gtk_widget_realize(sOffscreenFixed); -+} -+ -+/* static */ -+void -+EmbedPrivate::DestroyOffscreenWindow(void) -+{ -+ if (!sOffscreenWindow) -+ return; -+ gtk_widget_destroy(sOffscreenWindow); -+ sOffscreenWindow = 0; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h.gtkmozembed 2012-03-09 15:19:22.255678699 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrivate.h 2012-03-09 15:19:22.255678699 +0100 -@@ -0,0 +1,188 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#ifndef __EmbedPrivate_h -+#define __EmbedPrivate_h -+ -+#include "nsCOMPtr.h" -+#include "nsStringGlue.h" -+#include "nsIWebNavigation.h" -+#include "nsISHistory.h" -+// for our one function that gets the EmbedPrivate via the chrome -+// object. -+#include "nsIWebBrowserChrome.h" -+#include "nsIAppShell.h" -+#include "nsIDOMEventTarget.h" -+#include "nsTArray.h" -+ -+#include "gtkmozembedprivate.h" -+ -+class EmbedProgress; -+class EmbedWindow; -+class EmbedContentListener; -+class EmbedEventListener; -+ -+class nsPIDOMWindow; -+class nsIDirectoryServiceProvider; -+ -+class EmbedPrivate { -+ -+ public: -+ -+ EmbedPrivate(); -+ ~EmbedPrivate(); -+ -+ nsresult Init (GtkMozEmbed *aOwningWidget); -+ nsresult Realize (PRBool *aAlreadRealized); -+ void Unrealize (void); -+ void Show (void); -+ void Hide (void); -+ void Resize (PRUint32 aWidth, PRUint32 aHeight); -+ void Destroy (void); -+ void SetURI (const char *aURI); -+ void LoadCurrentURI (void); -+ void Reload (PRUint32 reloadFlags); -+ -+ void SetChromeMask (PRUint32 chromeMask); -+ void ApplyChromeMask (); -+ -+ static void PushStartup (void); -+ static void PopStartup (void); -+ static void SetPath (const char *aPath); -+ static void SetCompPath (const char *aPath); -+ static void SetProfilePath (const char *aDir, const char *aName); -+ static void SetDirectoryServiceProvider (nsIDirectoryServiceProvider * appFileLocProvider); -+ -+ nsresult OpenStream (const char *aBaseURI, const char *aContentType); -+ nsresult AppendToStream (const PRUint8 *aData, PRUint32 aLen); -+ nsresult CloseStream (void); -+ -+ // This function will find the specific EmbedPrivate object for a -+ // given nsIWebBrowserChrome. -+ static EmbedPrivate *FindPrivateForBrowser(nsIWebBrowserChrome *aBrowser); -+ -+ // This is an upcall that will come from the progress listener -+ // whenever there is a content state change. We need this so we can -+ // attach event listeners. -+ void ContentStateChange (void); -+ -+ // This is an upcall from the progress listener when content is -+ // finished loading. We have this so that if it's chrome content -+ // that we can size to content properly and show ourselves if -+ // visibility is set. -+ void ContentFinishedLoading(void); -+ -+ // these are when the widget itself gets focus in and focus out -+ // events -+ void ChildFocusIn (void); -+ void ChildFocusOut(void); -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+ void *GetAtkObjectForCurrentDocument(); -+#endif -+ -+ GtkMozEmbed *mOwningWidget; -+ -+ // all of the objects that we own -+ EmbedWindow *mWindow; -+ nsCOMPtr mWindowGuard; -+ EmbedProgress *mProgress; -+ nsCOMPtr mProgressGuard; -+ EmbedContentListener *mContentListener; -+ nsCOMPtr mContentListenerGuard; -+ EmbedEventListener *mEventListener; -+ nsCOMPtr mEventListenerGuard; -+ -+ nsCOMPtr mNavigation; -+ nsCOMPtr mSessionHistory; -+ -+ // our event receiver -+ nsCOMPtr mEventTarget; -+ -+ // the currently loaded uri -+ nsCString mURI; -+ -+ // the number of widgets that have been created -+ static PRUint32 sWidgetCount; -+ // the path to the GRE -+ static char *sPath; -+ // the path to components -+ static char *sCompPath; -+ // the appshell we have created -+ static nsIAppShell *sAppShell; -+ // the list of all open windows -+ static nsTArray *sWindowList; -+ // what is our profile path? -+ static nsILocalFile *sProfileDir; -+ static nsISupports *sProfileLock; -+ -+ static nsIDirectoryServiceProvider * sAppFileLocProvider; -+ -+ // chrome mask -+ PRUint32 mChromeMask; -+ // is this a chrome window? -+ PRBool mIsChrome; -+ // has the chrome finished loading? -+ PRBool mChromeLoaded; -+ // saved window ID for reparenting later -+ GtkWidget *mMozWindowWidget; -+ // has someone called Destroy() on us? -+ PRBool mIsDestroyed; -+ -+ private: -+ -+ // is the chrome listener attached yet? -+ PRBool mListenersAttached; -+ -+ void GetListener (void); -+ void AttachListeners(void); -+ void DetachListeners(void); -+ -+ // this will get the PIDOMWindow for this widget -+ nsresult GetPIDOMWindow (nsPIDOMWindow **aPIWin); -+ -+ static void RegisterAppComponents(); -+ -+ // offscreen window methods and the offscreen widget -+ static void EnsureOffscreenWindow(void); -+ static void DestroyOffscreenWindow(void); -+ static GtkWidget *sOffscreenWindow; -+ static GtkWidget *sOffscreenFixed; -+ -+}; -+ -+#endif /* __EmbedPrivate_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp.gtkmozembed 2012-03-09 15:19:22.255678699 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.cpp 2012-03-09 15:48:33.580516368 +0100 -@@ -0,0 +1,216 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include "EmbedProgress.h" -+ -+#include "nsIChannel.h" -+#include "nsIWebProgress.h" -+#include "nsIDOMWindow.h" -+ -+#include "nsIURI.h" -+ -+EmbedProgress::EmbedProgress(void) -+{ -+ mOwner = nsnull; -+} -+ -+EmbedProgress::~EmbedProgress() -+{ -+} -+ -+NS_IMPL_ISUPPORTS2(EmbedProgress, -+ nsIWebProgressListener, -+ nsISupportsWeakReference) -+ -+nsresult -+EmbedProgress::Init(EmbedPrivate *aOwner) -+{ -+ mOwner = aOwner; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnStateChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ PRUint32 aStateFlags, -+ nsresult aStatus) -+{ -+ // give the widget a chance to attach any listeners -+ mOwner->ContentStateChange(); -+ // if we've got the start flag, emit the signal -+ if ((aStateFlags & GTK_MOZ_EMBED_FLAG_IS_NETWORK) && -+ (aStateFlags & GTK_MOZ_EMBED_FLAG_START)) -+ { -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[NET_START], 0); -+ } -+ -+ // get the uri for this request -+ nsCAutoString uriString; -+ RequestToURIString(aRequest, uriString); -+ -+ // is it the same as the current URI? -+ if (mOwner->mURI.Equals(uriString)) -+ { -+ // for people who know what they are doing -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[NET_STATE], 0, -+ aStateFlags, aStatus); -+ } -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[NET_STATE_ALL], 0, -+ uriString.get(), -+ (gint)aStateFlags, (gint)aStatus); -+ // and for stop, too -+ if ((aStateFlags & GTK_MOZ_EMBED_FLAG_IS_NETWORK) && -+ (aStateFlags & GTK_MOZ_EMBED_FLAG_STOP)) -+ { -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[NET_STOP], 0); -+ // let our owner know that the load finished -+ mOwner->ContentFinishedLoading(); -+ } -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnProgressChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ PRInt32 aCurSelfProgress, -+ PRInt32 aMaxSelfProgress, -+ PRInt32 aCurTotalProgress, -+ PRInt32 aMaxTotalProgress) -+{ -+ -+ nsCAutoString uriString; -+ RequestToURIString(aRequest, uriString); -+ -+ // is it the same as the current uri? -+ if (mOwner->mURI.Equals(uriString)) { -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[PROGRESS], 0, -+ aCurTotalProgress, aMaxTotalProgress); -+ } -+ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[PROGRESS_ALL], 0, -+ uriString.get(), -+ aCurTotalProgress, aMaxTotalProgress); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnLocationChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ nsIURI *aLocation, -+ PRUint32 aFlags) -+{ -+ nsCAutoString newURI; -+ NS_ENSURE_ARG_POINTER(aLocation); -+ aLocation->GetSpec(newURI); -+ -+ // Make sure that this is the primary frame change and not -+ // just a subframe. -+ PRBool isSubFrameLoad = PR_FALSE; -+ if (aWebProgress) { -+ nsCOMPtr domWindow; -+ nsCOMPtr topDomWindow; -+ -+ aWebProgress->GetDOMWindow(getter_AddRefs(domWindow)); -+ -+ // get the root dom window -+ if (domWindow) -+ domWindow->GetTop(getter_AddRefs(topDomWindow)); -+ -+ if (domWindow != topDomWindow) -+ isSubFrameLoad = PR_TRUE; -+ } -+ -+ if (!isSubFrameLoad) { -+ mOwner->SetURI(newURI.get()); -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[LOCATION], 0); -+ } -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnStatusChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ nsresult aStatus, -+ const PRUnichar *aMessage) -+{ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[STATUS_CHANGE], 0, -+ static_cast(aRequest), -+ static_cast(aStatus), -+ static_cast(aMessage)); -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedProgress::OnSecurityChange(nsIWebProgress *aWebProgress, -+ nsIRequest *aRequest, -+ PRUint32 aState) -+{ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[SECURITY_CHANGE], 0, -+ static_cast(aRequest), -+ aState); -+ return NS_OK; -+} -+ -+/* static */ -+void -+EmbedProgress::RequestToURIString(nsIRequest *aRequest, nsACString &aString) -+{ -+ // is it a channel -+ nsCOMPtr channel; -+ channel = do_QueryInterface(aRequest); -+ if (!channel) -+ return; -+ -+ nsCOMPtr uri; -+ channel->GetURI(getter_AddRefs(uri)); -+ if (!uri) -+ return; -+ -+ uri->GetSpec(aString); -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h.gtkmozembed 2012-03-09 15:19:22.256678705 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedProgress.h 2012-03-09 15:19:22.256678705 +0100 -@@ -0,0 +1,66 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#ifndef __EmbedProgress_h -+#define __EmbedProgress_h -+ -+#include "nsIWebProgressListener.h" -+#include "nsWeakReference.h" -+#include "EmbedPrivate.h" -+ -+class EmbedProgress : public nsIWebProgressListener, -+ public nsSupportsWeakReference -+{ -+ public: -+ EmbedProgress(); -+ virtual ~EmbedProgress(); -+ -+ nsresult Init(EmbedPrivate *aOwner); -+ -+ NS_DECL_ISUPPORTS -+ -+ NS_DECL_NSIWEBPROGRESSLISTENER -+ -+ private: -+ -+ static void RequestToURIString (nsIRequest *aRequest, nsACString &aString); -+ -+ EmbedPrivate *mOwner; -+ -+}; -+ -+#endif /* __EmbedProgress_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp.gtkmozembed 2012-03-09 15:19:22.256678705 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.cpp 2012-03-09 15:19:22.256678705 +0100 -@@ -0,0 +1,411 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=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) 2003 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Brian Ryner -+ * -+ * 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 ***** */ -+ -+#include "EmbedPrompter.h" -+ -+enum { -+ INCLUDE_USERNAME = 1 << 0, -+ INCLUDE_PASSWORD = 1 << 1, -+ INCLUDE_CHECKBOX = 1 << 2, -+ INCLUDE_CANCEL = 1 << 3 -+}; -+ -+struct DialogDescription { -+ int flags; -+ const gchar* icon; -+}; -+ -+// This table contains the optional widgets and icons associated with -+// each type of dialog. -+ -+static const DialogDescription DialogTable[] = { -+ { 0, GTK_STOCK_DIALOG_WARNING }, // ALERT -+ { INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_WARNING }, // ALERT_CHECK -+ { INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // CONFIRM -+ { INCLUDE_CHECKBOX | -+ INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // CONFIRM_CHECK -+ { INCLUDE_CANCEL | -+ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT -+ { INCLUDE_CANCEL | -+ INCLUDE_USERNAME | -+ INCLUDE_PASSWORD | -+ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT_USER_PASS -+ { INCLUDE_CANCEL | -+ INCLUDE_PASSWORD | -+ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION }, // PROMPT_PASS -+ { INCLUDE_CANCEL, GTK_STOCK_DIALOG_QUESTION }, // SELECT -+ { INCLUDE_CANCEL | -+ INCLUDE_CHECKBOX, GTK_STOCK_DIALOG_QUESTION } // UNIVERSAL -+}; -+ -+EmbedPrompter::EmbedPrompter(void) -+ : mCheckValue(PR_FALSE), -+ mItemList(nsnull), -+ mItemCount(0), -+ mButtonPressed(0), -+ mConfirmResult(PR_FALSE), -+ mSelectedItem(0), -+ mWindow(NULL), -+ mUserField(NULL), -+ mPassField(NULL), -+ mTextField(NULL), -+ mComboBox(NULL), -+ mCheckBox(NULL) -+{ -+} -+ -+EmbedPrompter::~EmbedPrompter(void) -+{ -+ if (mItemList) -+ delete[] mItemList; -+} -+ -+nsresult -+EmbedPrompter::Create(PromptType aType, GtkWindow* aParentWindow) -+{ -+ mWindow = gtk_dialog_new_with_buttons(mTitle.get(), aParentWindow, -+ (GtkDialogFlags)0, -+ NULL); -+ -+ // only add the dialog to the window group if the parent already has a window group, -+ // so as not to break app's expectations about modal dialogs. -+ if (aParentWindow && aParentWindow->group) { -+ gtk_window_group_add_window (aParentWindow->group, GTK_WINDOW (mWindow)); -+ } -+ -+ // gtk will resize this for us as necessary -+ gtk_window_set_default_size(GTK_WINDOW(mWindow), 100, 50); -+ -+ // this HBox will contain the icon, and a vbox which contains the -+ // dialog text and other widgets. -+ GtkWidget* dialogHBox = gtk_hbox_new(FALSE, 12); -+ -+ -+ // Set up dialog properties according to the GNOME HIG -+ // (http://developer.gnome.org/projects/gup/hig/1.0/windows.html#alert-windows) -+ -+ gtk_container_set_border_width(GTK_CONTAINER(mWindow), 6); -+ gtk_dialog_set_has_separator(GTK_DIALOG(mWindow), FALSE); -+ gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(mWindow)->vbox), 12); -+ gtk_container_set_border_width(GTK_CONTAINER(dialogHBox), 6); -+ -+ -+ // This is the VBox which will contain the label and other controls. -+ GtkWidget* contentsVBox = gtk_vbox_new(FALSE, 12); -+ -+ // get the stock icon for this dialog and put it in the box -+ const gchar* iconDesc = DialogTable[aType].icon; -+ GtkWidget* icon = gtk_image_new_from_stock(iconDesc, GTK_ICON_SIZE_DIALOG); -+ gtk_misc_set_alignment(GTK_MISC(icon), 0.5, 0.0); -+ gtk_box_pack_start(GTK_BOX(dialogHBox), icon, FALSE, FALSE, 0); -+ -+ // now pack the label into the vbox -+ GtkWidget* label = gtk_label_new(mMessageText.get()); -+ gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); -+ gtk_label_set_selectable(GTK_LABEL(label), TRUE); -+ gtk_box_pack_start(GTK_BOX(contentsVBox), label, FALSE, FALSE, 0); -+ -+ int widgetFlags = DialogTable[aType].flags; -+ -+ if (widgetFlags & (INCLUDE_USERNAME | INCLUDE_PASSWORD)) { -+ -+ // If we're creating a username and/or password field, make an hbox -+ // which will contain two vboxes, one for the labels and one for the -+ // text fields. This will let us line up the textfields. -+ -+ GtkWidget* userPassHBox = gtk_hbox_new(FALSE, 12); -+ GtkWidget* userPassLabels = gtk_vbox_new(TRUE, 6); -+ GtkWidget* userPassFields = gtk_vbox_new(TRUE, 6); -+ -+ if (widgetFlags & INCLUDE_USERNAME) { -+ GtkWidget* userLabel = gtk_label_new("User Name:"); -+ gtk_box_pack_start(GTK_BOX(userPassLabels), userLabel, FALSE, -+ FALSE, 0); -+ -+ mUserField = gtk_entry_new(); -+ -+ if (!mUser.IsEmpty()) -+ gtk_entry_set_text(GTK_ENTRY(mUserField), mUser.get()); -+ -+ gtk_entry_set_activates_default(GTK_ENTRY(mUserField), TRUE); -+ -+ gtk_box_pack_start(GTK_BOX(userPassFields), mUserField, FALSE, -+ FALSE, 0); -+ } -+ if (widgetFlags & INCLUDE_PASSWORD) { -+ GtkWidget* passLabel = gtk_label_new("Password:"); -+ gtk_box_pack_start(GTK_BOX(userPassLabels), passLabel, FALSE, -+ FALSE, 0); -+ -+ mPassField = gtk_entry_new(); -+ -+ if (!mPass.IsEmpty()) -+ gtk_entry_set_text(GTK_ENTRY(mPassField), mPass.get()); -+ -+ gtk_entry_set_visibility(GTK_ENTRY(mPassField), FALSE); -+ gtk_entry_set_activates_default(GTK_ENTRY(mPassField), TRUE); -+ -+ gtk_box_pack_start(GTK_BOX(userPassFields), mPassField, FALSE, -+ FALSE, 0); -+ } -+ -+ gtk_box_pack_start(GTK_BOX(userPassHBox), userPassLabels, FALSE, -+ FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(userPassHBox), userPassFields, FALSE, -+ FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(contentsVBox), userPassHBox, FALSE, FALSE, 0); -+ } -+ -+ if (aType == TYPE_PROMPT) { -+ mTextField = gtk_entry_new(); -+ -+ if (!mTextValue.IsEmpty()) -+ gtk_entry_set_text(GTK_ENTRY(mTextField), mTextValue.get()); -+ -+ gtk_entry_set_activates_default(GTK_ENTRY(mTextField), TRUE); -+ -+ gtk_box_pack_start(GTK_BOX(contentsVBox), mTextField, FALSE, FALSE, 0); -+ } -+ -+ // Add a checkbox -+ if ((widgetFlags & INCLUDE_CHECKBOX) && !mCheckMessage.IsEmpty()) { -+ mCheckBox = gtk_check_button_new_with_label(mCheckMessage.get()); -+ -+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mCheckBox), -+ mCheckValue); -+ gtk_label_set_line_wrap(GTK_LABEL(gtk_bin_get_child(GTK_BIN(mCheckBox))), -+ TRUE); -+ -+ gtk_box_pack_start(GTK_BOX(contentsVBox), mCheckBox, FALSE, FALSE, 0); -+ } -+ -+ // Add a dropdown menu -+ if (aType == TYPE_SELECT) { -+ // Build up a GtkComboBox containing the items -+ GtkWidget* mComboBox = gtk_combo_box_new_text(); -+ for (PRUint32 i = 0; i < mItemCount; ++i) { -+ gtk_combo_box_append_text(GTK_COMBO_BOX(mComboBox), mItemList[i].get()); -+ } -+ gtk_box_pack_start(GTK_BOX(contentsVBox), mComboBox, FALSE, FALSE, 0); -+ } -+ -+ if (aType == TYPE_UNIVERSAL) { -+ // Create buttons based on the flags passed in. -+ for (PRUint32 i = EMBED_MAX_BUTTONS; i-- > 0; ) { -+ if (!mButtonLabels[i].IsEmpty()) -+ gtk_dialog_add_button(GTK_DIALOG(mWindow), -+ mButtonLabels[i].get(), i); -+ } -+ gtk_dialog_set_default_response(GTK_DIALOG(mWindow), 0); -+ } else { -+ // Create standard ok and cancel buttons -+ if (widgetFlags & INCLUDE_CANCEL) -+ gtk_dialog_add_button(GTK_DIALOG(mWindow), GTK_STOCK_CANCEL, -+ GTK_RESPONSE_CANCEL); -+ -+ GtkWidget* okButton = gtk_dialog_add_button(GTK_DIALOG(mWindow), -+ GTK_STOCK_OK, -+ GTK_RESPONSE_ACCEPT); -+ gtk_widget_grab_default(okButton); -+ } -+ -+ // Pack the contentsVBox into the dialogHBox and the dialog. -+ gtk_box_pack_start(GTK_BOX(dialogHBox), contentsVBox, FALSE, FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(mWindow)->vbox), dialogHBox, FALSE, -+ FALSE, 0); -+ -+ return NS_OK; -+} -+ -+void -+EmbedPrompter::SetTitle(const PRUnichar *aTitle) -+{ -+ mTitle.Assign(NS_ConvertUTF16toUTF8(aTitle)); -+} -+ -+void -+EmbedPrompter::SetTextValue(const PRUnichar *aTextValue) -+{ -+ mTextValue.Assign(NS_ConvertUTF16toUTF8(aTextValue)); -+} -+ -+void -+EmbedPrompter::SetCheckMessage(const PRUnichar *aMessage) -+{ -+ mCheckMessage.Assign(NS_ConvertUTF16toUTF8(aMessage)); -+} -+ -+void -+EmbedPrompter::SetMessageText(const PRUnichar *aMessageText) -+{ -+ mMessageText.Assign(NS_ConvertUTF16toUTF8(aMessageText)); -+} -+ -+void -+EmbedPrompter::SetUser(const PRUnichar *aUser) -+{ -+ mUser.Assign(NS_ConvertUTF16toUTF8(aUser)); -+} -+ -+void -+EmbedPrompter::SetPassword(const PRUnichar *aPass) -+{ -+ mPass.Assign(NS_ConvertUTF16toUTF8(aPass)); -+} -+ -+void -+EmbedPrompter::SetCheckValue(const PRBool aValue) -+{ -+ mCheckValue = aValue; -+} -+ -+void -+EmbedPrompter::SetItems(const PRUnichar** aItemArray, PRUint32 aCount) -+{ -+ if (mItemList) -+ delete[] mItemList; -+ -+ mItemCount = aCount; -+ mItemList = new nsCString[aCount]; -+ for (PRUint32 i = 0; i < aCount; ++i) -+ mItemList[i].Assign(NS_ConvertUTF16toUTF8(aItemArray[i])); -+} -+ -+void -+EmbedPrompter::SetButtons(const PRUnichar* aButton0Label, -+ const PRUnichar* aButton1Label, -+ const PRUnichar* aButton2Label) -+{ -+ mButtonLabels[0].Assign(NS_ConvertUTF16toUTF8(aButton0Label)); -+ mButtonLabels[1].Assign(NS_ConvertUTF16toUTF8(aButton1Label)); -+ mButtonLabels[2].Assign(NS_ConvertUTF16toUTF8(aButton2Label)); -+} -+ -+void -+EmbedPrompter::GetCheckValue(bool *aValue) -+{ -+ *aValue = (bool)mCheckValue; -+} -+ -+void -+EmbedPrompter::GetConfirmValue(bool *aConfirmValue) -+{ -+ *aConfirmValue = (bool)mConfirmResult; -+} -+ -+void -+EmbedPrompter::GetTextValue(PRUnichar **aTextValue) -+{ -+ *aTextValue = ToNewUnicode(NS_ConvertUTF8toUTF16(mTextValue)); -+} -+ -+void -+EmbedPrompter::GetUser(PRUnichar **aUser) -+{ -+ *aUser = ToNewUnicode(NS_ConvertUTF8toUTF16(mUser)); -+} -+ -+void -+EmbedPrompter::GetPassword(PRUnichar **aPass) -+{ -+ *aPass = ToNewUnicode(NS_ConvertUTF8toUTF16(mPass)); -+} -+ -+void -+EmbedPrompter::GetSelectedItem(PRInt32 *aIndex) -+{ -+ *aIndex = mSelectedItem; -+} -+ -+void -+EmbedPrompter::GetButtonPressed(PRInt32 *aButton) -+{ -+ *aButton = mButtonPressed; -+} -+ -+void -+EmbedPrompter::Run(void) -+{ -+ gtk_widget_show_all(mWindow); -+ gint response = gtk_dialog_run(GTK_DIALOG(mWindow)); -+ switch (response) { -+ case GTK_RESPONSE_NONE: -+ case GTK_RESPONSE_CANCEL: -+ case GTK_RESPONSE_DELETE_EVENT: -+ mConfirmResult = PR_FALSE; -+ break; -+ case GTK_RESPONSE_ACCEPT: -+ mConfirmResult = PR_TRUE; -+ SaveDialogValues(); -+ break; -+ default: -+ mButtonPressed = response; -+ SaveDialogValues(); -+ } -+ -+ gtk_widget_destroy(mWindow); -+} -+ -+void -+EmbedPrompter::SaveDialogValues() -+{ -+ if (mUserField) -+ mUser.Assign(gtk_entry_get_text(GTK_ENTRY(mUserField))); -+ -+ if (mPassField) -+ mPass.Assign(gtk_entry_get_text(GTK_ENTRY(mPassField))); -+ -+ if (mCheckBox) -+ mCheckValue = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mCheckBox)); -+ -+ if (mTextField) -+ mTextValue.Assign(gtk_entry_get_text(GTK_ENTRY(mTextField))); -+ -+ if (mComboBox) -+ { -+ gchar *str = gtk_combo_box_get_active_text(GTK_COMBO_BOX(mComboBox)); -+ for (PRUint32 i = 0; i < mItemCount; ++i) { -+ if(mItemList[i].Equals(str)) -+ { -+ mSelectedItem = i; -+ break; -+ } -+ } -+ } -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h.gtkmozembed 2012-03-09 15:19:22.257678710 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedPrompter.h 2012-03-09 15:19:22.257678710 +0100 -@@ -0,0 +1,113 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * Brian Ryner -+ * -+ * 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 ***** */ -+ -+#include "nsStringGlue.h" -+#include -+ -+#define EMBED_MAX_BUTTONS 3 -+ -+class EmbedPrompter { -+ -+public: -+ -+ EmbedPrompter(); -+ ~EmbedPrompter(); -+ -+ enum PromptType { -+ TYPE_ALERT, -+ TYPE_ALERT_CHECK, -+ TYPE_CONFIRM, -+ TYPE_CONFIRM_CHECK, -+ TYPE_PROMPT, -+ TYPE_PROMPT_USER_PASS, -+ TYPE_PROMPT_PASS, -+ TYPE_SELECT, -+ TYPE_UNIVERSAL -+ }; -+ -+ nsresult Create(PromptType aType, GtkWindow* aParentWindow); -+ void SetTitle(const PRUnichar *aTitle); -+ void SetTextValue (const PRUnichar *aTextValue); -+ void SetCheckMessage(const PRUnichar *aCheckMessage); -+ void SetCheckValue(const PRBool aValue); -+ void SetMessageText(const PRUnichar *aMessageText); -+ void SetUser(const PRUnichar *aUser); -+ void SetPassword(const PRUnichar *aPass); -+ void SetButtons(const PRUnichar* aButton0Label, -+ const PRUnichar* aButton1Label, -+ const PRUnichar* aButton2Label); -+ void SetItems(const PRUnichar **aItemArray, PRUint32 aCount); -+ -+ void GetCheckValue(bool *aValue); -+ void GetConfirmValue(bool *aConfirmValue); -+ void GetTextValue(PRUnichar **aTextValue); -+ void GetUser(PRUnichar **aUser); -+ void GetPassword(PRUnichar **aPass); -+ void GetButtonPressed(PRInt32 *aButton); -+ void GetSelectedItem(PRInt32 *aIndex); -+ -+ void Run(void); -+ -+private: -+ -+ void SaveDialogValues(); -+ -+ nsCString mTitle; -+ nsCString mMessageText; -+ nsCString mTextValue; -+ nsCString mCheckMessage; -+ PRBool mCheckValue; -+ nsCString mUser; -+ nsCString mPass; -+ nsCString mButtonLabels[EMBED_MAX_BUTTONS]; -+ nsCString *mItemList; -+ PRUint32 mItemCount; -+ -+ PRInt32 mButtonPressed; -+ PRBool mConfirmResult; -+ PRInt32 mSelectedItem; -+ -+ GtkWidget *mWindow; -+ GtkWidget *mUserField; -+ GtkWidget *mPassField; -+ GtkWidget *mTextField; -+ GtkWidget *mComboBox; -+ GtkWidget *mCheckBox; -+}; -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.cpp 2012-03-09 15:19:22.258678715 +0100 -@@ -0,0 +1,474 @@ -+/* -+ * vim:ts=2:et:sw=2 -+ * -+ * ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include "nsCWebBrowser.h" -+#include "nsIComponentManager.h" -+#include "nsComponentManagerUtils.h" -+#include "nsIDocShellTreeItem.h" -+#include "nsIWidget.h" -+ -+#include "EmbedWindow.h" -+#include "EmbedPrivate.h" -+#include "EmbedPrompter.h" -+ -+GtkWidget *EmbedWindow::sTipWindow = nsnull; -+ -+EmbedWindow::EmbedWindow(void) -+{ -+ mOwner = nsnull; -+ mVisibility = PR_FALSE; -+ mIsModal = PR_FALSE; -+} -+ -+EmbedWindow::~EmbedWindow(void) -+{ -+ ExitModalEventLoop(PR_FALSE); -+} -+ -+nsresult -+EmbedWindow::Init(EmbedPrivate *aOwner) -+{ -+ // save our owner for later -+ mOwner = aOwner; -+ -+ // create our nsIWebBrowser object and set up some basic defaults. -+ mWebBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID); -+ if (!mWebBrowser) -+ return NS_ERROR_FAILURE; -+ -+ mWebBrowser->SetContainerWindow(static_cast(this)); -+ -+ nsCOMPtr item = do_QueryInterface(mWebBrowser); -+ item->SetItemType(nsIDocShellTreeItem::typeContentWrapper); -+ -+ return NS_OK; -+} -+ -+nsresult -+EmbedWindow::CreateWindow(void) -+{ -+ nsresult rv; -+ GtkWidget *ownerAsWidget = GTK_WIDGET(mOwner->mOwningWidget); -+ -+ // Get the base window interface for the web browser object and -+ // create the window. -+ mBaseWindow = do_QueryInterface(mWebBrowser); -+ rv = mBaseWindow->InitWindow(GTK_WIDGET(mOwner->mOwningWidget), -+ nsnull, -+ 0, 0, -+ ownerAsWidget->allocation.width, -+ ownerAsWidget->allocation.height); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ rv = mBaseWindow->Create(); -+ if (NS_FAILED(rv)) -+ return rv; -+ -+ return NS_OK; -+} -+ -+void -+EmbedWindow::ReleaseChildren(void) -+{ -+ ExitModalEventLoop(PR_FALSE); -+ -+ mBaseWindow->Destroy(); -+ mBaseWindow = 0; -+ mWebBrowser = 0; -+} -+ -+// nsISupports -+ -+NS_IMPL_ADDREF(EmbedWindow) -+NS_IMPL_RELEASE(EmbedWindow) -+ -+NS_INTERFACE_MAP_BEGIN(EmbedWindow) -+ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIWebBrowserChrome) -+ NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome) -+ NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChromeFocus) -+ NS_INTERFACE_MAP_ENTRY(nsIEmbeddingSiteWindow) -+ NS_INTERFACE_MAP_ENTRY(nsITooltipListener) -+ NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) -+NS_INTERFACE_MAP_END -+ -+// nsIWebBrowserChrome -+ -+NS_IMETHODIMP -+EmbedWindow::SetStatus(PRUint32 aStatusType, const PRUnichar *aStatus) -+{ -+ switch (aStatusType) { -+ case STATUS_SCRIPT: -+ { -+ mJSStatus = aStatus; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[JS_STATUS], 0); -+ } -+ break; -+ case STATUS_SCRIPT_DEFAULT: -+ // Gee, that's nice. -+ break; -+ case STATUS_LINK: -+ { -+ mLinkMessage = aStatus; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[LINK_MESSAGE], 0); -+ } -+ break; -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetWebBrowser(nsIWebBrowser **aWebBrowser) -+{ -+ *aWebBrowser = mWebBrowser; -+ NS_IF_ADDREF(*aWebBrowser); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetWebBrowser(nsIWebBrowser *aWebBrowser) -+{ -+ mWebBrowser = aWebBrowser; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetChromeFlags(PRUint32 *aChromeFlags) -+{ -+ *aChromeFlags = mOwner->mChromeMask; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetChromeFlags(PRUint32 aChromeFlags) -+{ -+ mOwner->SetChromeMask(aChromeFlags); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::DestroyBrowserWindow(void) -+{ -+ // mark the owner as destroyed so it won't emit events anymore. -+ mOwner->mIsDestroyed = PR_TRUE; -+ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[DESTROY_BROWSER], 0); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) -+{ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[SIZE_TO], 0, aCX, aCY); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::ShowAsModal(void) -+{ -+ mIsModal = PR_TRUE; -+ GtkWidget *toplevel; -+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ gtk_grab_add(toplevel); -+ gtk_main(); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::IsWindowModal(bool *_retval) -+{ -+ *_retval = mIsModal; -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::ExitModalEventLoop(nsresult aStatus) -+{ -+ if (mIsModal) { -+ GtkWidget *toplevel; -+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ gtk_grab_remove(toplevel); -+ mIsModal = PR_FALSE; -+ gtk_main_quit(); -+ } -+ return NS_OK; -+} -+ -+// nsIWebBrowserChromeFocus -+ -+NS_IMETHODIMP -+EmbedWindow::FocusNextElement() -+{ -+ GtkWidget *toplevel; -+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ if (!GTK_WIDGET_TOPLEVEL(toplevel)) -+ return NS_OK; -+ -+ g_signal_emit_by_name(G_OBJECT(toplevel), "move_focus", -+ GTK_DIR_TAB_FORWARD); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::FocusPrevElement() -+{ -+ GtkWidget *toplevel; -+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ if (!GTK_WIDGET_TOPLEVEL(toplevel)) -+ return NS_OK; -+ -+ g_signal_emit_by_name(G_OBJECT(toplevel), "move_focus", -+ GTK_DIR_TAB_BACKWARD); -+ return NS_OK; -+} -+ -+// nsIEmbeddingSiteWindow -+ -+NS_IMETHODIMP -+EmbedWindow::SetDimensions(PRUint32 aFlags, PRInt32 aX, PRInt32 aY, -+ PRInt32 aCX, PRInt32 aCY) -+{ -+ if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION && -+ (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER))) { -+ return mBaseWindow->SetPositionAndSize(aX, aY, aCX, aCY, PR_TRUE); -+ } -+ else if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION) { -+ return mBaseWindow->SetPosition(aX, aY); -+ } -+ else if (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER)) { -+ return mBaseWindow->SetSize(aCX, aCY, PR_TRUE); -+ } -+ return NS_ERROR_INVALID_ARG; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetDimensions(PRUint32 aFlags, PRInt32 *aX, -+ PRInt32 *aY, PRInt32 *aCX, PRInt32 *aCY) -+{ -+ if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION && -+ (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER))) { -+ return mBaseWindow->GetPositionAndSize(aX, aY, aCX, aCY); -+ } -+ else if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION) { -+ return mBaseWindow->GetPosition(aX, aY); -+ } -+ else if (aFlags & (nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_INNER | -+ nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER)) { -+ return mBaseWindow->GetSize(aCX, aCY); -+ } -+ return NS_ERROR_INVALID_ARG; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetFocus(void) -+{ -+ // XXX might have to do more here. -+ return mBaseWindow->SetFocus(); -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetTitle(PRUnichar **aTitle) -+{ -+ *aTitle = ToNewUnicode(mTitle); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetTitle(const PRUnichar *aTitle) -+{ -+ mTitle = aTitle; -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[TITLE], 0); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetSiteWindow(void **aSiteWindow) -+{ -+ GtkWidget *ownerAsWidget (GTK_WIDGET(mOwner->mOwningWidget)); -+ *aSiteWindow = static_cast(ownerAsWidget); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::GetVisibility(bool *aVisibility) -+{ -+ // XXX See bug 312998 -+ // Work around the problem that sometimes the window -+ // is already visible even though mVisibility isn't true -+ // yet. -+ *aVisibility = mVisibility || -+ (!mOwner->mIsChrome && -+ mOwner->mOwningWidget && -+ GTK_WIDGET_MAPPED(mOwner->mOwningWidget)); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::SetVisibility(bool aVisibility) -+{ -+ // We always set the visibility so that if it's chrome and we finish -+ // the load we know that we have to show the window. -+ mVisibility = aVisibility; -+ -+ // if this is a chrome window and the chrome hasn't finished loading -+ // yet then don't show the window yet. -+ if (mOwner->mIsChrome && !mOwner->mChromeLoaded) -+ return NS_OK; -+ -+ g_signal_emit(G_OBJECT(mOwner->mOwningWidget), -+ moz_embed_signals[VISIBILITY], 0, -+ aVisibility); -+ return NS_OK; -+} -+ -+// nsITooltipListener -+ -+static gint -+tooltips_paint_window(GtkWidget *window) -+{ -+ // draw tooltip style border around the text -+ gtk_paint_flat_box(window->style, window->window, -+ GTK_STATE_NORMAL, GTK_SHADOW_OUT, -+ NULL, window, "tooltip", -+ 0, 0, -+ window->allocation.width, window->allocation.height); -+ -+ return FALSE; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, -+ const PRUnichar *aTipText) -+{ -+ nsAutoString tipText ( aTipText ); -+ -+ const char* tipString = ToNewUTF8String(tipText); -+ -+ if (sTipWindow) -+ gtk_widget_destroy(sTipWindow); -+ -+ // get the root origin for this content window -+ nsCOMPtr mainWidget; -+ mBaseWindow->GetMainWidget(getter_AddRefs(mainWidget)); -+ GdkWindow *window; -+ window = static_cast(mainWidget->GetNativeData(NS_NATIVE_WINDOW)); -+ gint root_x, root_y; -+ gdk_window_get_origin(window, &root_x, &root_y); -+ -+ // XXX work around until I can get pink to figure out why -+ // tooltips vanish if they show up right at the origin of the -+ // cursor. -+ root_y += 10; -+ -+ sTipWindow = gtk_window_new(GTK_WINDOW_POPUP); -+ gtk_widget_set_app_paintable(sTipWindow, TRUE); -+ gtk_window_set_resizable(GTK_WINDOW(sTipWindow), TRUE); -+ // needed to get colors + fonts etc correctly -+ gtk_widget_set_name(sTipWindow, "gtk-tooltips"); -+ gtk_window_set_type_hint(GTK_WINDOW(sTipWindow), GDK_WINDOW_TYPE_HINT_TOOLTIP); -+ -+ // set up the popup window as a transient of the widget. -+ GtkWidget *toplevel_window; -+ toplevel_window = gtk_widget_get_toplevel(GTK_WIDGET(mOwner->mOwningWidget)); -+ if (!GTK_WINDOW(toplevel_window)) { -+ NS_ERROR("no gtk window in hierarchy!"); -+ return NS_ERROR_FAILURE; -+ } -+ gtk_window_set_transient_for(GTK_WINDOW(sTipWindow), -+ GTK_WINDOW(toplevel_window)); -+ -+ // realize the widget -+ gtk_widget_realize(sTipWindow); -+ -+ g_signal_connect(G_OBJECT(sTipWindow), "expose_event", -+ G_CALLBACK(tooltips_paint_window), NULL); -+ -+ // set up the label for the tooltip -+ GtkWidget *label = gtk_label_new(tipString); -+ // wrap automatically -+ gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); -+ gtk_container_add(GTK_CONTAINER(sTipWindow), label); -+ gtk_container_set_border_width(GTK_CONTAINER(sTipWindow), 4); -+ // set the coords for the widget -+ gtk_widget_set_uposition(sTipWindow, aXCoords + root_x, -+ aYCoords + root_y); -+ -+ // and show it. -+ gtk_widget_show_all(sTipWindow); -+ -+ NS_Free( (void*)tipString ); -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+EmbedWindow::OnHideTooltip(void) -+{ -+ if (sTipWindow) -+ gtk_widget_destroy(sTipWindow); -+ sTipWindow = NULL; -+ return NS_OK; -+} -+ -+// nsIInterfaceRequestor -+ -+NS_IMETHODIMP -+EmbedWindow::GetInterface(const nsIID &aIID, void** aInstancePtr) -+{ -+ nsresult rv; -+ -+ rv = QueryInterface(aIID, aInstancePtr); -+ -+ // pass it up to the web browser object -+ if (NS_FAILED(rv) || !*aInstancePtr) { -+ nsCOMPtr ir = do_QueryInterface(mWebBrowser); -+ return ir->GetInterface(aIID, aInstancePtr); -+ } -+ -+ return rv; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.cpp 2012-03-09 15:19:22.258678715 +0100 -@@ -0,0 +1,106 @@ -+/* ***** 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 -+ * Christopher Blizzard. Portions created by Christopher Blizzard are Copyright (C) Christopher Blizzard. All Rights Reserved. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include "EmbedWindowCreator.h" -+#include "EmbedPrivate.h" -+#include "EmbedWindow.h" -+ -+// in order to create orphaned windows -+#include "gtkmozembedprivate.h" -+ -+EmbedWindowCreator::EmbedWindowCreator(void) -+{ -+} -+ -+EmbedWindowCreator::~EmbedWindowCreator() -+{ -+} -+ -+NS_IMPL_ISUPPORTS1(EmbedWindowCreator, nsIWindowCreator) -+ -+NS_IMETHODIMP -+EmbedWindowCreator::CreateChromeWindow(nsIWebBrowserChrome *aParent, -+ PRUint32 aChromeFlags, -+ nsIWebBrowserChrome **_retval) -+{ -+ NS_ENSURE_ARG_POINTER(_retval); -+ -+ GtkMozEmbed *newEmbed = nsnull; -+ -+ // No parent? Ask via the singleton object instead. -+ if (!aParent) { -+ gtk_moz_embed_single_create_window(&newEmbed, -+ (guint)aChromeFlags); -+ } -+ else { -+ // Find the EmbedPrivate object for this web browser chrome object. -+ EmbedPrivate *embedPrivate = EmbedPrivate::FindPrivateForBrowser(aParent); -+ -+ if (!embedPrivate) -+ return NS_ERROR_FAILURE; -+ -+ g_signal_emit(G_OBJECT(embedPrivate->mOwningWidget), -+ moz_embed_signals[NEW_WINDOW], 0, -+ &newEmbed, (guint)aChromeFlags); -+ -+ } -+ -+ // check to make sure that we made a new window -+ if (!newEmbed) -+ return NS_ERROR_FAILURE; -+ -+ // The window _must_ be realized before we pass it back to the -+ // function that created it. Functions that create new windows -+ // will do things like GetDocShell() and the widget has to be -+ // realized before that can happen. -+ gtk_widget_realize(GTK_WIDGET(newEmbed)); -+ -+ EmbedPrivate *newEmbedPrivate = static_cast(newEmbed->data); -+ -+ // set the chrome flag on the new window if it's a chrome open -+ if (aChromeFlags & nsIWebBrowserChrome::CHROME_OPENAS_CHROME) -+ newEmbedPrivate->mIsChrome = PR_TRUE; -+ -+ *_retval = static_cast(newEmbedPrivate->mWindow); -+ -+ if (*_retval) { -+ NS_ADDREF(*_retval); -+ return NS_OK; -+ } -+ -+ return NS_ERROR_FAILURE; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h.gtkmozembed 2012-03-09 15:19:22.258678715 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindowCreator.h 2012-03-09 15:19:22.258678715 +0100 -@@ -0,0 +1,54 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#ifndef __EmbedWindowCreator_h -+#define __EmbedWindowCreator_h -+ -+#include -+ -+class EmbedWindowCreator : public nsIWindowCreator -+{ -+ public: -+ EmbedWindowCreator(); -+ virtual ~EmbedWindowCreator(); -+ -+ NS_DECL_ISUPPORTS -+ NS_DECL_NSIWINDOWCREATOR -+ -+}; -+ -+#endif /* __EmbedWindowCreator_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h.gtkmozembed 2012-03-09 15:19:22.259678720 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/EmbedWindow.h 2012-03-09 15:19:22.259678720 +0100 -@@ -0,0 +1,101 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#ifndef __EmbedWindow_h -+#define __EmbedWindow_h -+ -+#include "nsIWebBrowserChrome.h" -+#include "nsIWebBrowserChromeFocus.h" -+#include "nsIEmbeddingSiteWindow.h" -+#include "nsITooltipListener.h" -+#include "nsISupports.h" -+#include "nsIWebBrowser.h" -+#include "nsIBaseWindow.h" -+#include "nsIInterfaceRequestor.h" -+#include "nsCOMPtr.h" -+#include "nsStringGlue.h" -+ -+#include -+ -+class EmbedPrivate; -+ -+class EmbedWindow : public nsIWebBrowserChrome, -+ public nsIWebBrowserChromeFocus, -+ public nsIEmbeddingSiteWindow, -+ public nsITooltipListener, -+ public nsIInterfaceRequestor -+{ -+ -+ public: -+ -+ EmbedWindow(); -+ virtual ~EmbedWindow(); -+ -+ nsresult Init (EmbedPrivate *aOwner); -+ nsresult CreateWindow (void); -+ void ReleaseChildren (void); -+ -+ NS_DECL_ISUPPORTS -+ -+ NS_DECL_NSIWEBBROWSERCHROME -+ -+ NS_DECL_NSIWEBBROWSERCHROMEFOCUS -+ -+ NS_DECL_NSIEMBEDDINGSITEWINDOW -+ -+ NS_DECL_NSITOOLTIPLISTENER -+ -+ NS_DECL_NSIINTERFACEREQUESTOR -+ -+ nsString mTitle; -+ nsString mJSStatus; -+ nsString mLinkMessage; -+ -+ nsCOMPtr mBaseWindow; // [OWNER] -+ -+private: -+ -+ EmbedPrivate *mOwner; -+ nsCOMPtr mWebBrowser; // [OWNER] -+ static GtkWidget *sTipWindow; -+ PRBool mVisibility; -+ PRBool mIsModal; -+ -+}; -+ -+ -+#endif /* __EmbedWindow_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp.gtkmozembed 2012-03-09 15:19:22.260678725 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed2.cpp 2012-03-09 15:19:22.260678725 +0100 -@@ -0,0 +1,1132 @@ -+/* ***** 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 -+ * Christopher Blizzard. Portions created by Christopher Blizzard are Copyright (C) Christopher Blizzard. All Rights Reserved. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * Ramiro Estrugo -+ * -+ * 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 ***** */ -+ -+#include -+ -+#include "gtkmozembed.h" -+#include "gtkmozembedprivate.h" -+#include "gtkmozembed_internal.h" -+ -+#include "EmbedPrivate.h" -+#include "EmbedWindow.h" -+ -+// so we can do our get_nsIWebBrowser later... -+#include "nsIWebBrowser.h" -+ -+#include "gtkmozembedmarshal.h" -+ -+#define NEW_TOOLKIT_STRING(x) g_strdup(NS_ConvertUTF16toUTF8(x).get()) -+#define GET_OBJECT_CLASS_TYPE(x) G_OBJECT_CLASS_TYPE(x) -+ -+class nsIDirectoryServiceProvider; -+ -+// class and instance initialization -+ -+static void -+gtk_moz_embed_class_init(GtkMozEmbedClass *klass); -+ -+static void -+gtk_moz_embed_init(GtkMozEmbed *embed); -+ -+// GtkObject methods -+ -+static void -+gtk_moz_embed_destroy(GtkObject *object); -+ -+// GtkWidget methods -+ -+static void -+gtk_moz_embed_realize(GtkWidget *widget); -+ -+static void -+gtk_moz_embed_unrealize(GtkWidget *widget); -+ -+static void -+gtk_moz_embed_size_allocate(GtkWidget *widget, GtkAllocation *allocation); -+ -+static void -+gtk_moz_embed_map(GtkWidget *widget); -+ -+static void -+gtk_moz_embed_unmap(GtkWidget *widget); -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+static AtkObject* gtk_moz_embed_get_accessible (GtkWidget *widget); -+#endif -+ -+static gint -+handle_child_focus_in(GtkWidget *aWidget, -+ GdkEventFocus *aGdkFocusEvent, -+ GtkMozEmbed *aEmbed); -+ -+static gint -+handle_child_focus_out(GtkWidget *aWidget, -+ GdkEventFocus *aGdkFocusEvent, -+ GtkMozEmbed *aEmbed); -+ -+// globals for this type of widget -+ -+static GtkBinClass *embed_parent_class; -+ -+guint moz_embed_signals[EMBED_LAST_SIGNAL] = { 0 }; -+ -+// GtkObject + class-related functions -+ -+GType -+gtk_moz_embed_get_type(void) -+{ -+ static GType moz_embed_type = 0; -+ if (moz_embed_type == 0) -+ { -+ const GTypeInfo our_info = -+ { -+ sizeof(GtkMozEmbedClass), -+ NULL, /* base_init */ -+ NULL, /* base_finalize */ -+ (GClassInitFunc)gtk_moz_embed_class_init, -+ NULL, -+ NULL, /* class_data */ -+ sizeof(GtkMozEmbed), -+ 0, /* n_preallocs */ -+ (GInstanceInitFunc)gtk_moz_embed_init, -+ }; -+ -+ moz_embed_type = g_type_register_static(GTK_TYPE_BIN, -+ "GtkMozEmbed", -+ &our_info, -+ (GTypeFlags)0); -+ } -+ -+ return moz_embed_type; -+} -+ -+static void -+gtk_moz_embed_class_init(GtkMozEmbedClass *klass) -+{ -+ GtkContainerClass *container_class; -+ GtkWidgetClass *widget_class; -+ GtkObjectClass *object_class; -+ -+ container_class = GTK_CONTAINER_CLASS(klass); -+ widget_class = GTK_WIDGET_CLASS(klass); -+ object_class = GTK_OBJECT_CLASS(klass); -+ -+ embed_parent_class = (GtkBinClass *)g_type_class_peek(gtk_bin_get_type()); -+ -+ widget_class->realize = gtk_moz_embed_realize; -+ widget_class->unrealize = gtk_moz_embed_unrealize; -+ widget_class->size_allocate = gtk_moz_embed_size_allocate; -+ widget_class->map = gtk_moz_embed_map; -+ widget_class->unmap = gtk_moz_embed_unmap; -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+ widget_class->get_accessible = gtk_moz_embed_get_accessible; -+#endif -+ -+ object_class->destroy = gtk_moz_embed_destroy; -+ -+ // set up our signals -+ -+ moz_embed_signals[LINK_MESSAGE] = -+ g_signal_new("link_message", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, link_message), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[JS_STATUS] = -+ g_signal_new("js_status", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, js_status), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[LOCATION] = -+ g_signal_new("location", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, location), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[TITLE] = -+ g_signal_new("title", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, title), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[PROGRESS] = -+ g_signal_new("progress", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, progress), -+ NULL, NULL, -+ gtkmozembed_VOID__INT_INT, -+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); -+ moz_embed_signals[PROGRESS_ALL] = -+ g_signal_new("progress_all", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, progress_all), -+ NULL, NULL, -+ gtkmozembed_VOID__STRING_INT_INT, -+ G_TYPE_NONE, 3, -+ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE, -+ G_TYPE_INT, G_TYPE_INT); -+ moz_embed_signals[NET_STATE] = -+ g_signal_new("net_state", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, net_state), -+ NULL, NULL, -+ gtkmozembed_VOID__INT_UINT, -+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT); -+ moz_embed_signals[NET_STATE_ALL] = -+ g_signal_new("net_state_all", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, net_state_all), -+ NULL, NULL, -+ gtkmozembed_VOID__STRING_INT_UINT, -+ G_TYPE_NONE, 3, -+ G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE, -+ G_TYPE_INT, G_TYPE_UINT); -+ moz_embed_signals[NET_START] = -+ g_signal_new("net_start", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, net_start), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[NET_STOP] = -+ g_signal_new("net_stop", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, net_stop), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[NEW_WINDOW] = -+ g_signal_new("new_window", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, new_window), -+ NULL, NULL, -+ gtkmozembed_VOID__POINTER_UINT, -+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); -+ moz_embed_signals[VISIBILITY] = -+ g_signal_new("visibility", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, visibility), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__BOOLEAN, -+ G_TYPE_NONE, 1, G_TYPE_BOOLEAN); -+ moz_embed_signals[DESTROY_BROWSER] = -+ g_signal_new("destroy_browser", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, destroy_brsr), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); -+ moz_embed_signals[OPEN_URI] = -+ g_signal_new("open_uri", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, open_uri), -+ NULL, NULL, -+ gtkmozembed_BOOL__STRING, -+ G_TYPE_BOOLEAN, 1, G_TYPE_STRING | -+ G_SIGNAL_TYPE_STATIC_SCOPE); -+ moz_embed_signals[SIZE_TO] = -+ g_signal_new("size_to", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, size_to), -+ NULL, NULL, -+ gtkmozembed_VOID__INT_INT, -+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); -+ moz_embed_signals[DOM_KEY_DOWN] = -+ g_signal_new("dom_key_down", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_down), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_KEY_PRESS] = -+ g_signal_new("dom_key_press", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_press), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_KEY_UP] = -+ g_signal_new("dom_key_up", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_key_up), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_DOWN] = -+ g_signal_new("dom_mouse_down", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_down), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_UP] = -+ g_signal_new("dom_mouse_up", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_up), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_CLICK] = -+ g_signal_new("dom_mouse_click", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_click), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_DBL_CLICK] = -+ g_signal_new("dom_mouse_dbl_click", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_dbl_click), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_OVER] = -+ g_signal_new("dom_mouse_over", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_over), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_MOUSE_OUT] = -+ g_signal_new("dom_mouse_out", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_mouse_out), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[SECURITY_CHANGE] = -+ g_signal_new("security_change", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, security_change), -+ NULL, NULL, -+ gtkmozembed_VOID__POINTER_UINT, -+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); -+ moz_embed_signals[STATUS_CHANGE] = -+ g_signal_new("status_change", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, status_change), -+ NULL, NULL, -+ gtkmozembed_VOID__POINTER_INT_POINTER, -+ G_TYPE_NONE, 3, -+ G_TYPE_POINTER, G_TYPE_INT, G_TYPE_POINTER); -+ moz_embed_signals[DOM_ACTIVATE] = -+ g_signal_new("dom_activate", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_activate), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_FOCUS_IN] = -+ g_signal_new("dom_focus_in", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_focus_in), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+ moz_embed_signals[DOM_FOCUS_OUT] = -+ g_signal_new("dom_focus_out", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET(GtkMozEmbedClass, dom_focus_out), -+ NULL, NULL, -+ gtkmozembed_BOOL__POINTER, -+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER); -+} -+ -+static void -+gtk_moz_embed_init(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *priv = new EmbedPrivate(); -+ embed->data = priv; -+ gtk_widget_set_name(GTK_WIDGET(embed), "gtkmozembed"); -+ -+ GTK_WIDGET_UNSET_FLAGS(GTK_WIDGET(embed), GTK_NO_WINDOW); -+} -+ -+GtkWidget * -+gtk_moz_embed_new(void) -+{ -+ return GTK_WIDGET(g_object_new(GTK_TYPE_MOZ_EMBED, NULL)); -+} -+ -+// GtkObject methods -+ -+static void -+gtk_moz_embed_destroy(GtkObject *object) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(object != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(object)); -+ -+ embed = GTK_MOZ_EMBED(object); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate) { -+ -+ // Destroy the widget only if it's been Init()ed. -+ if(embedPrivate->mMozWindowWidget != 0) { -+ embedPrivate->Destroy(); -+ } -+ -+ delete embedPrivate; -+ embed->data = NULL; -+ } -+} -+ -+// GtkWidget methods -+ -+static void -+gtk_moz_embed_realize(GtkWidget *widget) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ GdkWindowAttr attributes; -+ gint attributes_mask; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); -+ -+ attributes.window_type = GDK_WINDOW_CHILD; -+ attributes.x = widget->allocation.x; -+ attributes.y = widget->allocation.y; -+ attributes.width = widget->allocation.width; -+ attributes.height = widget->allocation.height; -+ attributes.wclass = GDK_INPUT_OUTPUT; -+ attributes.visual = gtk_widget_get_visual (widget); -+ attributes.colormap = gtk_widget_get_colormap (widget); -+ attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; -+ -+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; -+ -+ widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), -+ &attributes, attributes_mask); -+ gdk_window_set_user_data (widget->window, embed); -+ -+ widget->style = gtk_style_attach (widget->style, widget->window); -+ gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); -+ -+ // initialize the window -+ nsresult rv; -+ rv = embedPrivate->Init(embed); -+ g_return_if_fail(NS_SUCCEEDED(rv)); -+ -+ PRBool alreadyRealized = PR_FALSE; -+ rv = embedPrivate->Realize(&alreadyRealized); -+ g_return_if_fail(NS_SUCCEEDED(rv)); -+ -+ // if we're already realized we don't need to hook up to anything below -+ if (alreadyRealized) -+ return; -+ -+ if (embedPrivate->mURI.Length()) -+ embedPrivate->LoadCurrentURI(); -+ -+ // connect to the focus out event for the child -+ GtkWidget *child_widget = GTK_BIN(widget)->child; -+ g_signal_connect_object(G_OBJECT(child_widget), -+ "focus_out_event", -+ G_CALLBACK(handle_child_focus_out), -+ embed, -+ G_CONNECT_AFTER); -+ g_signal_connect_object(G_OBJECT(child_widget), -+ "focus_in_event", -+ G_CALLBACK(handle_child_focus_in), -+ embed, -+ G_CONNECT_AFTER); -+} -+ -+static void -+gtk_moz_embed_unrealize(GtkWidget *widget) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate) { -+ embedPrivate->Unrealize(); -+ } -+ -+ if (GTK_WIDGET_CLASS(embed_parent_class)->unrealize) -+ (* GTK_WIDGET_CLASS(embed_parent_class)->unrealize)(widget); -+} -+ -+static void -+gtk_moz_embed_size_allocate(GtkWidget *widget, GtkAllocation *allocation) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ widget->allocation = *allocation; -+ -+ if (GTK_WIDGET_REALIZED(widget)) -+ { -+ gdk_window_move_resize(widget->window, -+ allocation->x, allocation->y, -+ allocation->width, allocation->height); -+ embedPrivate->Resize(allocation->width, allocation->height); -+ } -+} -+ -+static void -+gtk_moz_embed_map(GtkWidget *widget) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ GTK_WIDGET_SET_FLAGS(widget, GTK_MAPPED); -+ -+ embedPrivate->Show(); -+ -+ gdk_window_show(widget->window); -+ -+} -+ -+static void -+gtk_moz_embed_unmap(GtkWidget *widget) -+{ -+ GtkMozEmbed *embed; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(widget != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(widget)); -+ -+ embed = GTK_MOZ_EMBED(widget); -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED); -+ -+ gdk_window_hide(widget->window); -+ -+ embedPrivate->Hide(); -+} -+ -+#ifdef MOZ_ACCESSIBILITY_ATK -+static AtkObject* -+gtk_moz_embed_get_accessible (GtkWidget *widget) -+{ -+ g_return_val_if_fail(widget != NULL, NULL); -+ g_return_val_if_fail(GTK_IS_MOZ_EMBED(widget), NULL); -+ -+ GtkMozEmbed *embed = GTK_MOZ_EMBED(widget);; -+ EmbedPrivate *embedPrivate = (EmbedPrivate *)embed->data; -+ return static_cast( -+ embedPrivate->GetAtkObjectForCurrentDocument()); -+} -+#endif /* MOZ_ACCESSIBILITY_ATK */ -+ -+static gint -+handle_child_focus_in(GtkWidget *aWidget, -+ GdkEventFocus *aGdkFocusEvent, -+ GtkMozEmbed *aEmbed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ embedPrivate = (EmbedPrivate *)aEmbed->data; -+ -+ embedPrivate->ChildFocusIn(); -+ -+ return FALSE; -+} -+ -+static gint -+handle_child_focus_out(GtkWidget *aWidget, -+ GdkEventFocus *aGdkFocusEvent, -+ GtkMozEmbed *aEmbed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ embedPrivate = (EmbedPrivate *)aEmbed->data; -+ -+ embedPrivate->ChildFocusOut(); -+ -+ return FALSE; -+} -+ -+// Widget methods -+ -+void -+gtk_moz_embed_push_startup(void) -+{ -+ EmbedPrivate::PushStartup(); -+} -+ -+void -+gtk_moz_embed_pop_startup(void) -+{ -+ EmbedPrivate::PopStartup(); -+} -+ -+void -+gtk_moz_embed_set_path(const char *aPath) -+{ -+ EmbedPrivate::SetPath(aPath); -+} -+ -+void -+gtk_moz_embed_set_comp_path(const char *aPath) -+{ -+ EmbedPrivate::SetCompPath(aPath); -+} -+ -+void -+gtk_moz_embed_set_profile_path(const char *aDir, const char *aName) -+{ -+ EmbedPrivate::SetProfilePath(aDir, aName); -+} -+ -+void -+gtk_moz_embed_set_directory_service_provider(nsIDirectoryServiceProvider *appFileLocProvider) { -+ EmbedPrivate::SetDirectoryServiceProvider(appFileLocProvider); -+} -+ -+void -+gtk_moz_embed_load_url(GtkMozEmbed *embed, const char *url) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(embed != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ embedPrivate->SetURI(url); -+ -+ // If the widget is realized, load the URI. If it isn't then we -+ // will load it later. -+ if (GTK_WIDGET_REALIZED(embed)) -+ embedPrivate->LoadCurrentURI(); -+} -+ -+void -+gtk_moz_embed_stop_load(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail(embed != NULL); -+ g_return_if_fail(GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->Stop(nsIWebNavigation::STOP_ALL); -+} -+ -+gboolean -+gtk_moz_embed_can_go_back(GtkMozEmbed *embed) -+{ -+ bool retval = PR_FALSE; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), FALSE); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), FALSE); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->GetCanGoBack(&retval); -+ return retval; -+} -+ -+gboolean -+gtk_moz_embed_can_go_forward(GtkMozEmbed *embed) -+{ -+ bool retval = PR_FALSE; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), FALSE); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), FALSE); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->GetCanGoForward(&retval); -+ return retval; -+} -+ -+void -+gtk_moz_embed_go_back(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->GoBack(); -+} -+ -+void -+gtk_moz_embed_go_forward(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mNavigation) -+ embedPrivate->mNavigation->GoForward(); -+} -+ -+void -+gtk_moz_embed_render_data(GtkMozEmbed *embed, const char *data, -+ guint32 len, const char *base_uri, -+ const char *mime_type) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ embedPrivate->OpenStream(base_uri, mime_type); -+ embedPrivate->AppendToStream((const PRUint8*)data, len); -+ embedPrivate->CloseStream(); -+} -+ -+void -+gtk_moz_embed_open_stream(GtkMozEmbed *embed, const char *base_uri, -+ const char *mime_type) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ embedPrivate->OpenStream(base_uri, mime_type); -+} -+ -+void gtk_moz_embed_append_data(GtkMozEmbed *embed, const char *data, -+ guint32 len) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ embedPrivate->AppendToStream((const PRUint8*)data, len); -+} -+ -+void -+gtk_moz_embed_close_stream(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ g_return_if_fail (GTK_WIDGET_REALIZED(GTK_WIDGET(embed))); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ embedPrivate->CloseStream(); -+} -+ -+char * -+gtk_moz_embed_get_link_message(GtkMozEmbed *embed) -+{ -+ char *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (char *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mLinkMessage); -+ -+ return retval; -+} -+ -+char * -+gtk_moz_embed_get_js_status(GtkMozEmbed *embed) -+{ -+ char *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (char *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mJSStatus); -+ -+ return retval; -+} -+ -+char * -+gtk_moz_embed_get_title(GtkMozEmbed *embed) -+{ -+ char *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (char *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = NEW_TOOLKIT_STRING(embedPrivate->mWindow->mTitle); -+ -+ return retval; -+} -+ -+char * -+gtk_moz_embed_get_location(GtkMozEmbed *embed) -+{ -+ char *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (char *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (char *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (!embedPrivate->mURI.IsEmpty()) -+ retval = g_strdup(embedPrivate->mURI.get()); -+ -+ return retval; -+} -+ -+void -+gtk_moz_embed_reload(GtkMozEmbed *embed, gint32 flags) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ PRUint32 reloadFlags = 0; -+ -+ // map the external API to the internal web navigation API. -+ switch (flags) { -+ case GTK_MOZ_EMBED_FLAG_RELOADNORMAL: -+ reloadFlags = 0; -+ break; -+ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE: -+ reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE; -+ break; -+ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXY: -+ reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY; -+ break; -+ case GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXYANDCACHE: -+ reloadFlags = (nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY | -+ nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE); -+ break; -+ case GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE: -+ reloadFlags = nsIWebNavigation::LOAD_FLAGS_CHARSET_CHANGE; -+ break; -+ default: -+ reloadFlags = 0; -+ break; -+ } -+ -+ embedPrivate->Reload(reloadFlags); -+} -+ -+void -+gtk_moz_embed_set_chrome_mask(GtkMozEmbed *embed, guint32 flags) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ embedPrivate->SetChromeMask(flags); -+} -+ -+guint32 -+gtk_moz_embed_get_chrome_mask(GtkMozEmbed *embed) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), 0); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), 0); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ return embedPrivate->mChromeMask; -+} -+ -+void -+gtk_moz_embed_get_nsIWebBrowser (GtkMozEmbed *embed, nsIWebBrowser **retval) -+{ -+ EmbedPrivate *embedPrivate; -+ -+ g_return_if_fail (embed != NULL); -+ g_return_if_fail (GTK_IS_MOZ_EMBED(embed)); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ embedPrivate->mWindow->GetWebBrowser(retval); -+} -+ -+PRUnichar * -+gtk_moz_embed_get_title_unichar (GtkMozEmbed *embed) -+{ -+ PRUnichar *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = ToNewUnicode(embedPrivate->mWindow->mTitle); -+ -+ return retval; -+} -+ -+PRUnichar * -+gtk_moz_embed_get_js_status_unichar (GtkMozEmbed *embed) -+{ -+ PRUnichar *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = ToNewUnicode(embedPrivate->mWindow->mJSStatus); -+ -+ return retval; -+} -+ -+PRUnichar * -+gtk_moz_embed_get_link_message_unichar (GtkMozEmbed *embed) -+{ -+ PRUnichar *retval = nsnull; -+ EmbedPrivate *embedPrivate; -+ -+ g_return_val_if_fail ((embed != NULL), (PRUnichar *)NULL); -+ g_return_val_if_fail (GTK_IS_MOZ_EMBED(embed), (PRUnichar *)NULL); -+ -+ embedPrivate = (EmbedPrivate *)embed->data; -+ -+ if (embedPrivate->mWindow) -+ retval = ToNewUnicode(embedPrivate->mWindow->mLinkMessage); -+ -+ return retval; -+} -+ -+// class and instance initialization -+ -+static void -+gtk_moz_embed_single_class_init(GtkMozEmbedSingleClass *klass); -+ -+static void -+gtk_moz_embed_single_init(GtkMozEmbedSingle *embed); -+ -+GtkMozEmbedSingle * -+gtk_moz_embed_single_new(void); -+ -+enum { -+ NEW_WINDOW_ORPHAN, -+ SINGLE_LAST_SIGNAL -+}; -+ -+guint moz_embed_single_signals[SINGLE_LAST_SIGNAL] = { 0 }; -+ -+// GtkObject + class-related functions -+ -+GType -+gtk_moz_embed_single_get_type(void) -+{ -+ static GType moz_embed_single_type = 0; -+ if (moz_embed_single_type == 0) -+ { -+ const GTypeInfo our_info = -+ { -+ sizeof(GtkMozEmbedClass), -+ NULL, /* base_init */ -+ NULL, /* base_finalize */ -+ (GClassInitFunc)gtk_moz_embed_single_class_init, -+ NULL, -+ NULL, /* class_data */ -+ sizeof(GtkMozEmbed), -+ 0, /* n_preallocs */ -+ (GInstanceInitFunc)gtk_moz_embed_single_init, -+ }; -+ -+ moz_embed_single_type = g_type_register_static(GTK_TYPE_OBJECT, -+ "GtkMozEmbedSingle", -+ &our_info, -+ (GTypeFlags)0); -+ } -+ -+ return moz_embed_single_type; -+} -+ -+static void -+gtk_moz_embed_single_class_init(GtkMozEmbedSingleClass *klass) -+{ -+ GtkObjectClass *object_class; -+ -+ object_class = GTK_OBJECT_CLASS(klass); -+ -+ // set up our signals -+ -+ moz_embed_single_signals[NEW_WINDOW_ORPHAN] = -+ g_signal_new("new_window_orphan", -+ G_TYPE_FROM_CLASS(klass), -+ G_SIGNAL_RUN_FIRST, -+ G_STRUCT_OFFSET(GtkMozEmbedSingleClass, new_window_orphan), -+ NULL, NULL, -+ gtkmozembed_VOID__POINTER_UINT, -+ G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); -+ -+} -+ -+static void -+gtk_moz_embed_single_init(GtkMozEmbedSingle *embed) -+{ -+ // this is a placeholder for later in case we need to stash data at -+ // a later data and maintain backwards compatibility. -+ embed->data = nsnull; -+} -+ -+GtkMozEmbedSingle * -+gtk_moz_embed_single_new(void) -+{ -+ return (GtkMozEmbedSingle *)g_object_new(GTK_TYPE_MOZ_EMBED_SINGLE, NULL); -+} -+ -+GtkMozEmbedSingle * -+gtk_moz_embed_single_get(void) -+{ -+ static GtkMozEmbedSingle *singleton_object = nsnull; -+ if (!singleton_object) -+ { -+ singleton_object = gtk_moz_embed_single_new(); -+ } -+ -+ return singleton_object; -+} -+ -+// our callback from the window creator service -+void -+gtk_moz_embed_single_create_window(GtkMozEmbed **aNewEmbed, -+ guint aChromeFlags) -+{ -+ GtkMozEmbedSingle *single = gtk_moz_embed_single_get(); -+ -+ *aNewEmbed = nsnull; -+ -+ if (!single) -+ return; -+ -+ g_signal_emit(G_OBJECT(single), -+ moz_embed_single_signals[NEW_WINDOW_ORPHAN], 0, -+ aNewEmbed, aChromeFlags); -+ -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp.gtkmozembed 2012-03-09 15:19:22.261678730 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_glue.cpp 2012-03-09 15:19:22.261678730 +0100 -@@ -0,0 +1,116 @@ -+/* ***** 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 embedding. -+ * -+ * The Initial Developer of the Original Code is -+ * Benjamin Smedberg . -+ * -+ * Portions created by the Initial Developer are Copyright (C) 2005 -+ * the Mozilla Foundation . 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 ***** */ -+ -+// This file is an implementation file, meant to be #included in a -+// single C++ file of an embedding application. It is called after -+// XPCOMGlueStartup to glue the gtkmozembed functions. -+ -+#include "gtkmozembed.h" -+#include "gtkmozembed_internal.h" -+#include "nsXPCOMGlue.h" -+ -+#ifndef XPCOM_GLUE -+#error This file only makes sense when XPCOM_GLUE is defined. -+#endif -+ -+#define GTKMOZEMBED_FUNCTIONS \ -+ GTKF(gtk_moz_embed_get_type) \ -+ GTKF(gtk_moz_embed_new) \ -+ GTKF(gtk_moz_embed_push_startup) \ -+ GTKF(gtk_moz_embed_pop_startup) \ -+ GTKF(gtk_moz_embed_set_path) \ -+ GTKF(gtk_moz_embed_set_comp_path) \ -+ GTKF(gtk_moz_embed_set_profile_path) \ -+ GTKF(gtk_moz_embed_load_url) \ -+ GTKF(gtk_moz_embed_stop_load) \ -+ GTKF(gtk_moz_embed_can_go_back) \ -+ GTKF(gtk_moz_embed_can_go_forward) \ -+ GTKF(gtk_moz_embed_go_back) \ -+ GTKF(gtk_moz_embed_go_forward) \ -+ GTKF(gtk_moz_embed_render_data) \ -+ GTKF(gtk_moz_embed_open_stream) \ -+ GTKF(gtk_moz_embed_append_data) \ -+ GTKF(gtk_moz_embed_close_stream) \ -+ GTKF(gtk_moz_embed_get_link_message) \ -+ GTKF(gtk_moz_embed_get_js_status) \ -+ GTKF(gtk_moz_embed_get_title) \ -+ GTKF(gtk_moz_embed_get_location) \ -+ GTKF(gtk_moz_embed_reload) \ -+ GTKF(gtk_moz_embed_set_chrome_mask) \ -+ GTKF(gtk_moz_embed_get_chrome_mask) \ -+ GTKF(gtk_moz_embed_single_get_type) \ -+ GTKF(gtk_moz_embed_single_get) -+ -+#define GTKMOZEMBED_FUNCTIONS_INTERNAL \ -+ GTKF(gtk_moz_embed_get_nsIWebBrowser) \ -+ GTKF(gtk_moz_embed_get_title_unichar) \ -+ GTKF(gtk_moz_embed_get_js_status_unichar) \ -+ GTKF(gtk_moz_embed_get_link_message_unichar) \ -+ GTKF(gtk_moz_embed_set_directory_service_provider) -+ -+#define GTKF(fname) fname##Type fname; -+ -+GTKMOZEMBED_FUNCTIONS -+GTKMOZEMBED_FUNCTIONS_INTERNAL -+ -+#undef GTKF -+ -+#define GTKF(fname) { #fname, (NSFuncPtr*) &fname }, -+ -+static const nsDynamicFunctionLoad GtkSymbols[] = { -+GTKMOZEMBED_FUNCTIONS -+ { nsnull, nsnull } -+}; -+ -+static const nsDynamicFunctionLoad GtkSymbolsInternal[] = { -+GTKMOZEMBED_FUNCTIONS_INTERNAL -+ { nsnull, nsnull } -+}; -+#undef GTKF -+ -+static nsresult -+GTKEmbedGlueStartup() -+{ -+ return XPCOMGlueLoadXULFunctions(GtkSymbols); -+} -+ -+static nsresult -+GTKEmbedGlueStartupInternal() -+{ -+ return XPCOMGlueLoadXULFunctions(GtkSymbolsInternal); -+} -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h.gtkmozembed 2012-03-09 15:19:22.261678730 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed.h 2012-03-09 15:19:22.261678730 +0100 -@@ -0,0 +1,287 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * Ramiro Estrugo -+ * -+ * 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 ***** */ -+ -+#ifndef gtkmozembed_h -+#define gtkmozembed_h -+ -+#include -+#include -+ -+#ifdef MOZILLA_CLIENT -+#include "nscore.h" -+#else /* MOZILLA_CLIENT */ -+#ifndef nscore_h__ -+/* Because this header may be included from files which not part of the mozilla -+ build system, define macros from nscore.h */ -+ -+#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) -+#define NS_HIDDEN __attribute__((visibility("hidden"))) -+#else -+#define NS_HIDDEN -+#endif -+ -+#define NS_FROZENCALL -+#define NS_EXPORT_(type) type -+#define NS_IMPORT_(type) type -+#endif /* nscore_h__ */ -+#endif /* MOZILLA_CLIENT */ -+ -+#ifdef XPCOM_GLUE -+ -+#define GTKMOZEMBED_API(type, name, params) \ -+ typedef type (NS_FROZENCALL * name##Type) params; \ -+ extern name##Type name NS_HIDDEN; -+ -+#else /* XPCOM_GLUE */ -+ -+#ifdef _IMPL_GTKMOZEMBED -+#define GTKMOZEMBED_API(type, name, params) NS_EXPORT_(type) name params; -+#else -+#define GTKMOZEMBED_API(type,name, params) NS_IMPORT_(type) name params; -+#endif -+ -+#endif /* XPCOM_GLUE */ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+#define GTK_TYPE_MOZ_EMBED (gtk_moz_embed_get_type()) -+#define GTK_MOZ_EMBED(obj) G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_MOZ_EMBED, GtkMozEmbed) -+#define GTK_MOZ_EMBED_CLASS(klass) G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_MOZ_EMBED, GtkMozEmbedClass) -+#define GTK_IS_MOZ_EMBED(obj) G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_MOZ_EMBED) -+#define GTK_IS_MOZ_EMBED_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_MOZ_EMBED) -+ -+typedef struct _GtkMozEmbed GtkMozEmbed; -+typedef struct _GtkMozEmbedClass GtkMozEmbedClass; -+ -+struct _GtkMozEmbed -+{ -+ GtkBin bin; -+ void *data; -+}; -+ -+struct _GtkMozEmbedClass -+{ -+ GtkBinClass parent_class; -+ -+ void (* link_message) (GtkMozEmbed *embed); -+ void (* js_status) (GtkMozEmbed *embed); -+ void (* location) (GtkMozEmbed *embed); -+ void (* title) (GtkMozEmbed *embed); -+ void (* progress) (GtkMozEmbed *embed, gint curprogress, -+ gint maxprogress); -+ void (* progress_all) (GtkMozEmbed *embed, const char *aURI, -+ gint curprogress, gint maxprogress); -+ void (* net_state) (GtkMozEmbed *embed, gint state, guint status); -+ void (* net_state_all) (GtkMozEmbed *embed, const char *aURI, -+ gint state, guint status); -+ void (* net_start) (GtkMozEmbed *embed); -+ void (* net_stop) (GtkMozEmbed *embed); -+ void (* new_window) (GtkMozEmbed *embed, GtkMozEmbed **newEmbed, -+ guint chromemask); -+ void (* visibility) (GtkMozEmbed *embed, gboolean visibility); -+ void (* destroy_brsr) (GtkMozEmbed *embed); -+ gint (* open_uri) (GtkMozEmbed *embed, const char *aURI); -+ void (* size_to) (GtkMozEmbed *embed, gint width, gint height); -+ gint (* dom_key_down) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_key_press) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_key_up) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_down) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_up) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_click) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_dbl_click) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_over) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_mouse_out) (GtkMozEmbed *embed, gpointer dom_event); -+ void (* security_change) (GtkMozEmbed *embed, gpointer request, -+ guint state); -+ void (* status_change) (GtkMozEmbed *embed, gpointer request, -+ gint status, gpointer message); -+ gint (* dom_activate) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_focus_in) (GtkMozEmbed *embed, gpointer dom_event); -+ gint (* dom_focus_out) (GtkMozEmbed *embed, gpointer dom_event); -+}; -+ -+GTKMOZEMBED_API(GType, gtk_moz_embed_get_type, (void)) -+GTKMOZEMBED_API(GtkWidget*, gtk_moz_embed_new, (void)) -+GTKMOZEMBED_API(void, gtk_moz_embed_push_startup, (void)) -+GTKMOZEMBED_API(void, gtk_moz_embed_pop_startup, (void)) -+ -+/* Tell gtkmozembed where the gtkmozembed libs live. If this is not specified, -+ The MOZILLA_FIVE_HOME environment variable is checked. */ -+GTKMOZEMBED_API(void, gtk_moz_embed_set_path, (const char *aPath)) -+ -+GTKMOZEMBED_API(void, gtk_moz_embed_set_comp_path, (const char *aPath)) -+GTKMOZEMBED_API(void, gtk_moz_embed_set_profile_path, (const char *aDir, -+ const char *aName)) -+GTKMOZEMBED_API(void, gtk_moz_embed_load_url, (GtkMozEmbed *embed, -+ const char *url)) -+GTKMOZEMBED_API(void, gtk_moz_embed_stop_load, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(gboolean, gtk_moz_embed_can_go_back, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(gboolean, gtk_moz_embed_can_go_forward, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(void, gtk_moz_embed_go_back, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(void, gtk_moz_embed_go_forward, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(void, gtk_moz_embed_render_data, (GtkMozEmbed *embed, -+ const char *data, -+ guint32 len, -+ const char *base_uri, -+ const char *mime_type)) -+GTKMOZEMBED_API(void, gtk_moz_embed_open_stream, (GtkMozEmbed *embed, -+ const char *base_uri, -+ const char *mime_type)) -+GTKMOZEMBED_API(void, gtk_moz_embed_append_data, (GtkMozEmbed *embed, -+ const char *data, -+ guint32 len)) -+GTKMOZEMBED_API(void, gtk_moz_embed_close_stream, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(char*, gtk_moz_embed_get_link_message, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(char*, gtk_moz_embed_get_js_status, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(char*, gtk_moz_embed_get_title, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(char*, gtk_moz_embed_get_location, (GtkMozEmbed *embed)) -+GTKMOZEMBED_API(void, gtk_moz_embed_reload, (GtkMozEmbed *embed, -+ gint32 flags)) -+GTKMOZEMBED_API(void, gtk_moz_embed_set_chrome_mask, (GtkMozEmbed *embed, -+ guint32 flags)) -+GTKMOZEMBED_API(guint32, gtk_moz_embed_get_chrome_mask, (GtkMozEmbed *embed)) -+ -+/* These are straight out of nsIWebProgressListener.h */ -+ -+typedef enum -+{ -+ GTK_MOZ_EMBED_FLAG_START = 1, -+ GTK_MOZ_EMBED_FLAG_REDIRECTING = 2, -+ GTK_MOZ_EMBED_FLAG_TRANSFERRING = 4, -+ GTK_MOZ_EMBED_FLAG_NEGOTIATING = 8, -+ GTK_MOZ_EMBED_FLAG_STOP = 16, -+ -+ GTK_MOZ_EMBED_FLAG_IS_REQUEST = 65536, -+ GTK_MOZ_EMBED_FLAG_IS_DOCUMENT = 131072, -+ GTK_MOZ_EMBED_FLAG_IS_NETWORK = 262144, -+ GTK_MOZ_EMBED_FLAG_IS_WINDOW = 524288, -+ -+ GTK_MOZ_EMBED_FLAG_RESTORING = 16777216 -+} GtkMozEmbedProgressFlags; -+ -+/* These are from various networking headers */ -+ -+typedef enum -+{ -+ /* NS_ERROR_UNKNOWN_HOST */ -+ GTK_MOZ_EMBED_STATUS_FAILED_DNS = 2152398878U, -+ /* NS_ERROR_CONNECTION_REFUSED */ -+ GTK_MOZ_EMBED_STATUS_FAILED_CONNECT = 2152398861U, -+ /* NS_ERROR_NET_TIMEOUT */ -+ GTK_MOZ_EMBED_STATUS_FAILED_TIMEOUT = 2152398862U, -+ /* NS_BINDING_ABORTED */ -+ GTK_MOZ_EMBED_STATUS_FAILED_USERCANCELED = 2152398850U -+} GtkMozEmbedStatusFlags; -+ -+/* These used to be straight out of nsIWebNavigation.h until the API -+ changed. Now there's a mapping table that maps these values to the -+ internal values. */ -+ -+typedef enum -+{ -+ GTK_MOZ_EMBED_FLAG_RELOADNORMAL = 0, -+ GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE = 1, -+ GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXY = 2, -+ GTK_MOZ_EMBED_FLAG_RELOADBYPASSPROXYANDCACHE = 3, -+ GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE = 4 -+} GtkMozEmbedReloadFlags; -+ -+/* These are straight out of nsIWebBrowserChrome.h */ -+ -+typedef enum -+{ -+ GTK_MOZ_EMBED_FLAG_DEFAULTCHROME = 1U, -+ GTK_MOZ_EMBED_FLAG_WINDOWBORDERSON = 2U, -+ GTK_MOZ_EMBED_FLAG_WINDOWCLOSEON = 4U, -+ GTK_MOZ_EMBED_FLAG_WINDOWRESIZEON = 8U, -+ GTK_MOZ_EMBED_FLAG_MENUBARON = 16U, -+ GTK_MOZ_EMBED_FLAG_TOOLBARON = 32U, -+ GTK_MOZ_EMBED_FLAG_LOCATIONBARON = 64U, -+ GTK_MOZ_EMBED_FLAG_STATUSBARON = 128U, -+ GTK_MOZ_EMBED_FLAG_PERSONALTOOLBARON = 256U, -+ GTK_MOZ_EMBED_FLAG_SCROLLBARSON = 512U, -+ GTK_MOZ_EMBED_FLAG_TITLEBARON = 1024U, -+ GTK_MOZ_EMBED_FLAG_EXTRACHROMEON = 2048U, -+ GTK_MOZ_EMBED_FLAG_ALLCHROME = 4094U, -+ GTK_MOZ_EMBED_FLAG_WINDOWRAISED = 33554432U, -+ GTK_MOZ_EMBED_FLAG_WINDOWLOWERED = 67108864U, -+ GTK_MOZ_EMBED_FLAG_CENTERSCREEN = 134217728U, -+ GTK_MOZ_EMBED_FLAG_DEPENDENT = 268435456U, -+ GTK_MOZ_EMBED_FLAG_MODAL = 536870912U, -+ GTK_MOZ_EMBED_FLAG_OPENASDIALOG = 1073741824U, -+ GTK_MOZ_EMBED_FLAG_OPENASCHROME = 2147483648U -+} GtkMozEmbedChromeFlags; -+ -+/* this is a singleton object that you can hook up to to get signals -+ that are not handed out on a per widget basis. */ -+ -+#define GTK_TYPE_MOZ_EMBED_SINGLE (gtk_moz_embed_single_get_type()) -+#define GTK_MOZ_EMBED_SINGLE(obj) GTK_CHECK_CAST((obj), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingle) -+#define GTK_MOZ_EMBED_SINGLE_CLASS(klass) GTK_CHEK_CLASS_CAST((klass), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingleClass) -+#define GTK_IS_MOZ_EMBED_SINGLE(obj) GTK_CHECK_TYPE((obj), GTK_TYPE_MOZ_EMBED_SINGLE) -+#define GTK_IS_MOZ_EMBED_SINGLE_CLASS(klass) GTK_CHECK_CLASS_TYPE((klass), GTK_TYPE_MOZ_EMBED) -+#define GTK_MOZ_EMBED_SINGLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MOZ_EMBED_SINGLE, GtkMozEmbedSingleClass)) -+ -+typedef struct _GtkMozEmbedSingle GtkMozEmbedSingle; -+typedef struct _GtkMozEmbedSingleClass GtkMozEmbedSingleClass; -+ -+struct _GtkMozEmbedSingle -+{ -+ GtkObject object; -+ void *data; -+}; -+ -+struct _GtkMozEmbedSingleClass -+{ -+ GtkObjectClass parent_class; -+ -+ void (* new_window_orphan) (GtkMozEmbedSingle *embed, -+ GtkMozEmbed **newEmbed, -+ guint chromemask); -+}; -+ -+GTKMOZEMBED_API(GType, gtk_moz_embed_single_get_type, (void)) -+GTKMOZEMBED_API(GtkMozEmbedSingle *, gtk_moz_embed_single_get, (void)) -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif /* gtkmozembed_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h.gtkmozembed 2012-03-09 15:19:22.262678735 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembed_internal.h 2012-03-09 15:19:22.262678735 +0100 -@@ -0,0 +1,70 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#ifndef gtkmozembed_internal_h -+#define gtkmozembed_internal_h -+ -+#include "nsIWebBrowser.h" -+#include "nsXPCOM.h" -+ -+struct nsModuleComponentInfo; -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+GTKMOZEMBED_API(void, -+ gtk_moz_embed_get_nsIWebBrowser, (GtkMozEmbed *embed, -+ nsIWebBrowser **retval)) -+GTKMOZEMBED_API(PRUnichar*, -+ gtk_moz_embed_get_title_unichar, (GtkMozEmbed *embed)) -+ -+GTKMOZEMBED_API(PRUnichar*, -+ gtk_moz_embed_get_js_status_unichar, (GtkMozEmbed *embed)) -+ -+GTKMOZEMBED_API(PRUnichar*, -+ gtk_moz_embed_get_link_message_unichar, (GtkMozEmbed *embed)) -+ -+GTKMOZEMBED_API(void, -+ gtk_moz_embed_set_directory_service_provider, (nsIDirectoryServiceProvider *appFileLocProvider)) -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif /* gtkmozembed_internal_h */ -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list.gtkmozembed 2012-03-09 15:19:22.262678735 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedmarshal.list 2012-03-09 15:19:22.262678735 +0100 -@@ -0,0 +1,34 @@ -+BOOL:STRING -+BOOL:STRING,STRING -+BOOL:STRING,STRING,POINTER -+BOOL:STRING,STRING,POINTER,INT -+BOOL:STRING,STRING,POINTER,POINTER,STRING,POINTER -+BOOL:STRING,STRING,POINTER,STRING,POINTER -+BOOL:STRING,STRING,STRING,POINTER -+INT:STRING,INT,INT,INT,INT,INT -+INT:STRING,STRING,INT,INT,INT,INT -+INT:STRING,STRING,UINT,STRING,STRING,STRING,STRING,POINTER -+INT:VOID -+STRING:STRING,STRING -+VOID:BOOL -+VOID:INT,INT -+VOID:INT,INT,BOOL -+VOID:INT,STRING -+VOID:INT,STRING,STRING -+VOID:INT,UINT -+VOID:POINTER,INT,POINTER -+VOID:POINTER,INT,STRING,STRING,STRING,STRING,STRING,BOOLEAN,INT -+VOID:POINTER,STRING,BOOL,BOOL -+VOID:STRING,INT,INT -+VOID:STRING,INT,UINT -+VOID:STRING,STRING -+VOID:STRING,STRING,POINTER -+VOID:STRING,STRING,STRING,ULONG,INT -+VOID:STRING,STRING,STRING,POINTER -+VOID:UINT,INT,INT,STRING,STRING,STRING,STRING -+VOID:ULONG,ULONG,ULONG -+VOID:POINTER,UINT -+BOOL:POINTER,UINT -+BOOL:POINTER -+VOID:POINTER -+BOOL:STRING,STRING,POINTER -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h.gtkmozembed 2012-03-09 15:19:22.263678740 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/gtkmozembedprivate.h 2012-03-09 15:19:22.263678740 +0100 -@@ -0,0 +1,91 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#ifndef gtkmozembedprivate_h -+#define gtkmozembedprivate_h -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+#include "gtkmozembed.h" -+ -+/* signals */ -+ -+enum { -+ LINK_MESSAGE, -+ JS_STATUS, -+ LOCATION, -+ TITLE, -+ PROGRESS, -+ PROGRESS_ALL, -+ NET_STATE, -+ NET_STATE_ALL, -+ NET_START, -+ NET_STOP, -+ NEW_WINDOW, -+ VISIBILITY, -+ DESTROY_BROWSER, -+ OPEN_URI, -+ SIZE_TO, -+ DOM_KEY_DOWN, -+ DOM_KEY_PRESS, -+ DOM_KEY_UP, -+ DOM_MOUSE_DOWN, -+ DOM_MOUSE_UP, -+ DOM_MOUSE_CLICK, -+ DOM_MOUSE_DBL_CLICK, -+ DOM_MOUSE_OVER, -+ DOM_MOUSE_OUT, -+ SECURITY_CHANGE, -+ STATUS_CHANGE, -+ DOM_ACTIVATE, -+ DOM_FOCUS_IN, -+ DOM_FOCUS_OUT, -+ EMBED_LAST_SIGNAL -+}; -+ -+extern guint moz_embed_signals[EMBED_LAST_SIGNAL]; -+ -+extern void gtk_moz_embed_single_create_window(GtkMozEmbed **aNewEmbed, -+ guint aChromeFlags); -+ -+#ifdef __cplusplus -+} -+#endif /* __cplusplus */ -+ -+#endif /* gtkmozembedprivate_h */ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp.gtkmozembed 2012-03-09 15:19:22.263678740 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.cpp 2012-03-09 15:19:22.263678740 +0100 -@@ -0,0 +1,349 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=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) 2003 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Brian Ryner -+ * -+ * 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 ***** */ -+ -+#include "GtkPromptService.h" -+#include "EmbedPrompter.h" -+#include "nsStringGlue.h" -+#include "nsIWindowWatcher.h" -+#include "nsIWebBrowserChrome.h" -+#include "nsIEmbeddingSiteWindow.h" -+#include "nsCOMPtr.h" -+#include "nsIServiceManager.h" -+#include "nsServiceManagerUtils.h" -+ -+GtkPromptService::GtkPromptService() -+{ -+} -+ -+GtkPromptService::~GtkPromptService() -+{ -+} -+ -+NS_IMPL_ISUPPORTS1(GtkPromptService, nsIPromptService) -+ -+NS_IMETHODIMP -+GtkPromptService::Alert(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Alert").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.Create(EmbedPrompter::TYPE_ALERT, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::AlertCheck(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ const PRUnichar* aCheckMsg, bool* aCheckValue) -+{ -+ NS_ENSURE_ARG_POINTER(aCheckValue); -+ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Alert").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetCheckMessage(aCheckMsg); -+ prompter.SetCheckValue(*aCheckValue); -+ prompter.Create(EmbedPrompter::TYPE_ALERT_CHECK, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ prompter.GetCheckValue(aCheckValue); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::Confirm(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.Create(EmbedPrompter::TYPE_CONFIRM, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ prompter.GetConfirmValue(aConfirm); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::ConfirmCheck(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ const PRUnichar* aCheckMsg, -+ bool* aCheckValue, bool* aConfirm) -+{ -+ NS_ENSURE_ARG_POINTER(aCheckValue); -+ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetCheckMessage(aCheckMsg); -+ prompter.SetCheckValue(*aCheckValue); -+ prompter.Create(EmbedPrompter::TYPE_CONFIRM_CHECK, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ prompter.GetCheckValue(aCheckValue); -+ prompter.GetConfirmValue(aConfirm); -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::ConfirmEx(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ PRUint32 aButtonFlags, -+ const PRUnichar* aButton0Title, -+ const PRUnichar* aButton1Title, -+ const PRUnichar* aButton2Title, -+ const PRUnichar* aCheckMsg, bool* aCheckValue, -+ PRInt32* aRetVal) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Confirm").get()); -+ prompter.SetMessageText(aDialogText); -+ -+ nsAutoString button0Label, button1Label, button2Label; -+ GetButtonLabel(aButtonFlags, BUTTON_POS_0, aButton0Title, button0Label); -+ GetButtonLabel(aButtonFlags, BUTTON_POS_1, aButton1Title, button1Label); -+ GetButtonLabel(aButtonFlags, BUTTON_POS_2, aButton2Title, button2Label); -+ prompter.SetButtons(button0Label.get(), button1Label.get(), -+ button2Label.get()); -+ -+ if (aCheckMsg) -+ prompter.SetCheckMessage(aCheckMsg); -+ if (aCheckValue) -+ prompter.SetCheckValue(*aCheckValue); -+ -+ prompter.Create(EmbedPrompter::TYPE_UNIVERSAL, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ -+ if (aCheckValue) -+ prompter.GetCheckValue(aCheckValue); -+ -+ prompter.GetButtonPressed(aRetVal); -+ -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::Prompt(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, PRUnichar** aValue, -+ const PRUnichar* aCheckMsg, bool* aCheckValue, -+ bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetTextValue(*aValue); -+ if (aCheckMsg) -+ prompter.SetCheckMessage(aCheckMsg); -+ if (aCheckValue) -+ prompter.SetCheckValue(*aCheckValue); -+ -+ prompter.Create(EmbedPrompter::TYPE_PROMPT, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ if (aCheckValue) -+ prompter.GetCheckValue(aCheckValue); -+ prompter.GetConfirmValue(aConfirm); -+ if (*aConfirm) { -+ if (*aValue) -+ NS_Free(*aValue); -+ prompter.GetTextValue(aValue); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::PromptUsernameAndPassword(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ PRUnichar** aUsername, -+ PRUnichar** aPassword, -+ const PRUnichar* aCheckMsg, -+ bool* aCheckValue, -+ bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetUser(*aUsername); -+ prompter.SetPassword(*aPassword); -+ if (aCheckMsg) -+ prompter.SetCheckMessage(aCheckMsg); -+ if (aCheckValue) -+ prompter.SetCheckValue(*aCheckValue); -+ -+ prompter.Create(EmbedPrompter::TYPE_PROMPT_USER_PASS, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ if (aCheckValue) -+ prompter.GetCheckValue(aCheckValue); -+ prompter.GetConfirmValue(aConfirm); -+ if (*aConfirm) { -+ if (*aUsername) -+ NS_Free(*aUsername); -+ prompter.GetUser(aUsername); -+ -+ if (*aPassword) -+ NS_Free(*aPassword); -+ prompter.GetPassword(aPassword); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::PromptPassword(nsIDOMWindow* aParent, -+ const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, -+ PRUnichar** aPassword, -+ const PRUnichar* aCheckMsg, -+ bool* aCheckValue, bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Prompt").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetPassword(*aPassword); -+ if (aCheckMsg) -+ prompter.SetCheckMessage(aCheckMsg); -+ if (aCheckValue) -+ prompter.SetCheckValue(*aCheckValue); -+ -+ prompter.Create(EmbedPrompter::TYPE_PROMPT_PASS, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ if (aCheckValue) -+ prompter.GetCheckValue(aCheckValue); -+ prompter.GetConfirmValue(aConfirm); -+ if (*aConfirm) { -+ if (*aPassword) -+ NS_Free(*aPassword); -+ prompter.GetPassword(aPassword); -+ } -+ return NS_OK; -+} -+ -+NS_IMETHODIMP -+GtkPromptService::Select(nsIDOMWindow* aParent, const PRUnichar* aDialogTitle, -+ const PRUnichar* aDialogText, PRUint32 aCount, -+ const PRUnichar** aSelectList, PRInt32* outSelection, -+ bool* aConfirm) -+{ -+ EmbedPrompter prompter; -+ prompter.SetTitle(aDialogTitle ? aDialogTitle : NS_LITERAL_STRING("Select").get()); -+ prompter.SetMessageText(aDialogText); -+ prompter.SetItems(aSelectList, aCount); -+ prompter.Create(EmbedPrompter::TYPE_SELECT, -+ GetGtkWindowForDOMWindow(aParent)); -+ prompter.Run(); -+ prompter.GetSelectedItem(outSelection); -+ prompter.GetConfirmValue(aConfirm); -+ return NS_OK; -+} -+ -+GtkWindow* -+GtkPromptService::GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow) -+{ -+ nsCOMPtr wwatch = do_GetService("@mozilla.org/embedcomp/window-watcher;1"); -+ -+ if (!aDOMWindow) -+ return NULL; -+ -+ nsCOMPtr chrome; -+ wwatch->GetChromeForWindow(aDOMWindow, getter_AddRefs(chrome)); -+ nsCOMPtr siteWindow = do_QueryInterface(chrome); -+ -+ if (!siteWindow) -+ return NULL; -+ -+ GtkWidget* parentWidget; -+ siteWindow->GetSiteWindow((void**)&parentWidget); -+ -+ if (!parentWidget) -+ return NULL; -+ -+ GtkWidget* gtkWin = gtk_widget_get_toplevel(parentWidget); -+ if (GTK_WIDGET_TOPLEVEL(gtkWin)) -+ return GTK_WINDOW(gtkWin); -+ -+ return NULL; -+} -+ -+void -+GtkPromptService::GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, -+ const PRUnichar* aStringValue, -+ nsAString& aLabel) -+{ -+ PRUint32 posFlag = (aFlags & (255 * aPos)) / aPos; -+ switch (posFlag) { -+ case 0: -+ break; -+ case BUTTON_TITLE_OK: -+ aLabel.AssignLiteral(GTK_STOCK_OK); -+ break; -+ case BUTTON_TITLE_CANCEL: -+ aLabel.AssignLiteral(GTK_STOCK_CANCEL); -+ break; -+ case BUTTON_TITLE_YES: -+ aLabel.AssignLiteral(GTK_STOCK_YES); -+ break; -+ case BUTTON_TITLE_NO: -+ aLabel.AssignLiteral(GTK_STOCK_NO); -+ break; -+ case BUTTON_TITLE_SAVE: -+ aLabel.AssignLiteral(GTK_STOCK_SAVE); -+ break; -+ case BUTTON_TITLE_DONT_SAVE: -+ aLabel.AssignLiteral("Don't Save"); -+ break; -+ case BUTTON_TITLE_REVERT: -+ aLabel.AssignLiteral("Revert"); -+ break; -+ case BUTTON_TITLE_IS_STRING: -+ aLabel = aStringValue; -+ break; -+ default: -+ NS_WARNING("Unexpected button flags"); -+ } -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h.gtkmozembed 2012-03-09 15:19:22.264678745 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/GtkPromptService.h 2012-03-09 15:19:22.264678745 +0100 -@@ -0,0 +1,59 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* vim:expandtab:shiftwidth=4:tabstop=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) 2003 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Brian Ryner -+ * -+ * 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 ***** */ -+ -+#include "nsIPromptService.h" -+#include "nsStringGlue.h" -+#include -+ -+class nsIDOMWindow; -+ -+class GtkPromptService : public nsIPromptService -+{ -+public: -+ GtkPromptService(); -+ virtual ~GtkPromptService(); -+ -+ NS_DECL_ISUPPORTS -+ NS_DECL_NSIPROMPTSERVICE -+ -+private: -+ GtkWindow* GetGtkWindowForDOMWindow(nsIDOMWindow* aDOMWindow); -+ void GetButtonLabel(PRUint32 aFlags, PRUint32 aPos, -+ const PRUnichar* aStringValue, nsAString &aLabel); -+}; -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in.gtkmozembed 2012-03-09 15:19:22.264678745 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/src/Makefile.in 2012-03-09 15:19:22.264678745 +0100 -@@ -0,0 +1,112 @@ -+# -+# ***** 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 the Mozilla browser. -+# -+# The Initial Developer of the Original Code is -+# Christopher Blizzard. -+# Portions created by the Initial Developer are Copyright (C) 1999 -+# the Initial Developer. All Rights Reserved. -+# -+# Contributor(s): -+# Christopher Blizzard -+# -+# 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 ***** -+ -+DEPTH = ../../../.. -+topsrcdir = @top_srcdir@ -+srcdir = @srcdir@ -+VPATH = @srcdir@ -+ -+include $(DEPTH)/config/autoconf.mk -+ -+MODULE = gtkembedmoz -+LIBRARY_NAME = gtkembedmoz -+LIBXUL_LIBRARY = 1 -+FORCE_STATIC_LIB = 1 -+DEFINES += -DIMPL_XREAPI -+ -+ -+ -+CPPSRCS = \ -+ gtkmozembed2.cpp \ -+ EmbedPrivate.cpp \ -+ EmbedWindow.cpp \ -+ EmbedProgress.cpp \ -+ EmbedContentListener.cpp \ -+ EmbedEventListener.cpp \ -+ EmbedWindowCreator.cpp \ -+ $(NULL) -+ -+ifdef MOZ_ENABLE_GTK2 -+CSRCS = \ -+ gtkmozembedmarshal.c -+CPPSRCS += \ -+ EmbedPrompter.cpp \ -+ GtkPromptService.cpp -+endif -+ -+LOCAL_INCLUDES += \ -+ -I. \ -+ $(NULL) -+ -+include $(topsrcdir)/config/config.mk -+ -+EXPORTS = \ -+ gtkmozembed.h \ -+ gtkmozembed_glue.cpp \ -+ gtkmozembed_internal.h -+ -+include $(topsrcdir)/config/rules.mk -+ -+ifeq ($(OS_ARCH), SunOS) -+ifndef GNU_CC -+# When using Sun's WorkShop compiler, including -+# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h -+# causes most of these compiles to fail with: -+# line 29: Error: Multiple declaration for std::tm. -+# So, this gets around the problem. -+DEFINES += -D_TIME_H=1 -+endif -+endif -+ -+CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) -+CFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) -+DEFINES += -D_IMPL_GTKMOZEMBED -+ -+MARSHAL_FILE = gtkmozembedmarshal -+MARSHAL_PREFIX = gtkmozembed -+ -+$(MARSHAL_FILE).h: $(MARSHAL_FILE).list -+ glib-genmarshal --prefix=$(MARSHAL_PREFIX) $(srcdir)/$(MARSHAL_FILE).list --skip-source --header > $@ -+ -+$(MARSHAL_FILE).c: $(MARSHAL_FILE).list $(MARSHAL_FILE).h -+ glib-genmarshal --prefix=$(MARSHAL_PREFIX) $(srcdir)/$(MARSHAL_FILE).list --skip-source --body > $@ -+ -+gtkmozembed2.$(OBJ_SUFFIX): $(MARSHAL_FILE).h -+ -+GARBAGE += $(MARSHAL_FILE).h $(MARSHAL_FILE).c -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in.gtkmozembed 2012-03-09 15:19:22.265678750 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/Makefile.in 2012-03-09 15:19:22.265678750 +0100 -@@ -0,0 +1,101 @@ -+# -+# ***** 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 the Mozilla browser. -+# -+# The Initial Developer of the Original Code is -+# Christopher Blizzard. -+# Portions created by the Initial Developer are Copyright (C) 1999 -+# the Initial Developer. All Rights Reserved. -+# -+# Contributor(s): -+# Christopher Blizzard -+# -+# 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 ***** -+ -+DEPTH = ../../../.. -+topsrcdir = @top_srcdir@ -+srcdir = @srcdir@ -+VPATH = @srcdir@ -+ -+include $(DEPTH)/config/autoconf.mk -+ -+MODULE = gtkembedmoz -+ -+CPPSRCS = \ -+ TestGtkEmbed.cpp \ -+ TestGtkEmbedNotebook.cpp -+ -+ifdef MOZ_X11 -+CPPSRCS += TestGtkEmbedSocket.cpp \ -+ TestGtkEmbedChild.cpp -+endif -+ -+SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=) -+ -+# ENABLE_GNOME=1 -+ -+ifdef ENABLE_GNOME -+CPPSRCS += TestGtkEmbedMDI.cpp -+endif -+ -+ifdef MOZ_ENABLE_GTK2 -+LIBS += \ -+ $(XLDFLAGS) \ -+ $(XLIBS) \ -+ $(NULL) -+endif -+ -+include $(topsrcdir)/config/config.mk -+ -+include $(topsrcdir)/config/rules.mk -+ -+LIBS += $(XPCOM_STANDALONE_GLUE_LDOPTS) -+ -+DEFINES += -DXPCOM_GLUE -+STL_FLAGS = -+ -+CXXFLAGS += $(MOZ_GTK2_CFLAGS) -+ -+ifdef ENABLE_GNOME -+CXXFLAGS += `gnome-config --cflags gnomeui` -+EXTRA_LIBS += `gnome-config --libs gnomeui` -+endif -+ -+EXTRA_LIBS += \ -+ $(TK_LIBS) \ -+ $(NULL) -+ -+ifeq ($(OS_ARCH), SunOS) -+ifndef GNU_CC -+# When using Sun's WorkShop compiler, including -+# /wherever/workshop-5.0/SC5.0/include/CC/std/time.h -+# causes most of these compiles to fail with: -+# line 29: Error: Multiple declaration for std::tm. -+# So, this gets around the problem. -+DEFINES += -D_TIME_H=1 -+endif -+endif -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp.gtkmozembed 2012-03-09 15:19:22.265678750 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedChild.cpp 2012-03-09 15:19:22.265678750 +0100 -@@ -0,0 +1,185 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include "gtkmozembed.h" -+#include -+#include -+#include -+#include -+ -+#include "nsStringAPI.h" -+#include "gtkmozembed_glue.cpp" -+ -+int (*old_handler) (Display *, XErrorEvent *); -+ -+int error_handler (Display *d, XErrorEvent *e) -+{ -+ if ((e->error_code == BadWindow) || (e->error_code == BadDrawable)) -+ { -+ XID resourceid = e->resourceid; -+ GdkWindow *window = gdk_window_lookup (resourceid); -+ -+ if (window) -+ { -+ if (!g_dataset_get_data (window, "bonobo-error")) -+ { -+ g_dataset_set_data_full (window, "bonobo-error", -+ g_new (gint, 1), -+ (GDestroyNotify)g_free); -+ -+ g_warning ("Error accessing window %ld", resourceid); -+ } -+ } -+ return 0; -+ } -+ else -+ { -+ return (*old_handler)(d, e); -+ } -+} -+ -+void -+load_page(gpointer data); -+ -+GtkWidget *embed = 0; -+GtkWidget *entry = 0; -+ -+int -+main(int argc, char **argv) -+{ -+ guint32 xid; -+ -+ GtkWidget *window; -+ GtkWidget *hbox; -+ GtkWidget *vbox; -+ GtkWidget *button; -+ -+ gtk_init(&argc, &argv); -+ -+ static const GREVersionRange greVersion = { -+ "1.9a", PR_TRUE, -+ "2", PR_TRUE -+ }; -+ -+ char xpcomPath[PATH_MAX]; -+ -+ nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, -+ xpcomPath, sizeof(xpcomPath)); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find a compatible GRE.\n"); -+ return 1; -+ } -+ -+ rv = XPCOMGlueStartup(xpcomPath); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't start XPCOM."); -+ return 1; -+ } -+ -+ rv = GTKEmbedGlueStartup(); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); -+ return 1; -+ } -+ -+ char *lastSlash = strrchr(xpcomPath, '/'); -+ if (lastSlash) -+ *lastSlash = '\0'; -+ -+ gtk_moz_embed_set_path(xpcomPath); -+ -+ old_handler = XSetErrorHandler (error_handler); -+ -+ if (argc < 2) { -+ fprintf(stderr, "Usage: TestGtkEmbedChild WINDOW_ID\n"); -+ exit(1); -+ } -+ -+ xid = strtol (argv[1], (char **)NULL, 0); -+ -+ if (xid == 0) { -+ fprintf(stderr, "Invalid window id '%s'\n", argv[1]); -+ exit(1); -+ } -+ -+ window = gtk_plug_new(xid); -+ -+ g_signal_connect(GTK_OBJECT(window), "destroy", -+ G_CALLBACK(gtk_main_quit), NULL); -+ -+ gtk_container_set_border_width(GTK_CONTAINER(window), 0); -+ -+ vbox = gtk_vbox_new (FALSE, 0); -+ gtk_container_add(GTK_CONTAINER(window), vbox); -+ gtk_widget_show(vbox); -+ -+ hbox = gtk_hbox_new (FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0); -+ gtk_widget_show (hbox); -+ -+ entry = gtk_entry_new (); -+ gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0); -+ gtk_widget_show (entry); -+ -+ button = gtk_button_new_with_label("Load"); -+ gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0); -+ gtk_widget_show(button); -+ -+ g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK(load_page), NULL); -+ -+ embed = gtk_moz_embed_new(); -+ gtk_box_pack_start(GTK_BOX(vbox), embed, TRUE, TRUE, 0); -+ gtk_widget_set_size_request(embed, 200, 200); -+ gtk_widget_show(embed); -+ -+ gtk_widget_show(window); -+ -+ gtk_main(); -+ -+ fprintf(stderr, "exiting.\n"); -+ -+ return 0; -+} -+ -+void -+load_page(gpointer data) -+{ -+ gchar *text = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); -+ g_print("load url %s\n", text); -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(embed), text); -+ g_free(text); -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp.gtkmozembed 2012-03-09 15:19:22.266678755 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbed.cpp 2012-03-09 15:19:22.266678755 +0100 -@@ -0,0 +1,1145 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include "gtkmozembed.h" -+#include -+#include -+#include -+#include -+ -+// mozilla specific headers -+#include "nsIDOMKeyEvent.h" -+#include "nsIDOMMouseEvent.h" -+#include "nsIDOMUIEvent.h" -+ -+#include "nsCOMPtr.h" -+#include "nsISupportsUtils.h" -+#include "nsServiceManagerUtils.h" -+#include "nsIObserverService.h" -+ -+#include "nsStringAPI.h" -+#include "gtkmozembed_glue.cpp" -+ -+typedef struct _TestGtkBrowser { -+ GtkWidget *topLevelWindow; -+ GtkWidget *topLevelVBox; -+ GtkWidget *menuBar; -+ GtkWidget *fileMenuItem; -+ GtkWidget *fileMenu; -+ GtkWidget *fileOpenNewBrowser; -+ GtkWidget *fileStream; -+ GtkWidget *fileMemory; -+ GtkWidget *fileClose; -+ GtkWidget *fileQuit; -+ GtkWidget *toolbarHBox; -+ GtkWidget *toolbar; -+ GtkWidget *backButton; -+ GtkWidget *stopButton; -+ GtkWidget *forwardButton; -+ GtkWidget *reloadButton; -+ GtkWidget *urlEntry; -+ GtkWidget *mozEmbed; -+ GtkWidget *progressAreaHBox; -+ GtkWidget *progressBar; -+ GtkWidget *statusAlign; -+ GtkWidget *statusBar; -+ const char *statusMessage; -+ int loadPercent; -+ int bytesLoaded; -+ int maxBytesLoaded; -+ char *tempMessage; -+ gboolean menuBarOn; -+ gboolean toolBarOn; -+ gboolean locationBarOn; -+ gboolean statusBarOn; -+ -+} TestGtkBrowser; -+ -+// the list of browser windows currently open -+GList *browser_list = g_list_alloc(); -+ -+static TestGtkBrowser *new_gtk_browser (guint32 chromeMask); -+static void set_browser_visibility (TestGtkBrowser *browser, -+ gboolean visibility); -+ -+static int num_browsers = 0; -+ -+// callbacks from the UI -+static void back_clicked_cb (GtkButton *button, -+ TestGtkBrowser *browser); -+static void stop_clicked_cb (GtkButton *button, -+ TestGtkBrowser *browser); -+static void forward_clicked_cb (GtkButton *button, -+ TestGtkBrowser *browser); -+static void reload_clicked_cb (GtkButton *button, -+ TestGtkBrowser *browser); -+static void url_activate_cb (GtkEditable *widget, -+ TestGtkBrowser *browser); -+static void menu_open_new_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static void menu_stream_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static void menu_memory_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static void menu_close_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static void menu_quit_cb (GtkMenuItem *menuitem, -+ TestGtkBrowser *browser); -+static gboolean delete_cb (GtkWidget *widget, GdkEventAny *event, -+ TestGtkBrowser *browser); -+static void destroy_cb (GtkWidget *widget, -+ TestGtkBrowser *browser); -+ -+// callbacks from the widget -+static void location_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void title_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void load_started_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void load_finished_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void net_state_change_cb (GtkMozEmbed *embed, gint flags, -+ guint status, TestGtkBrowser *browser); -+static void net_state_change_all_cb (GtkMozEmbed *embed, const char *uri, -+ gint flags, guint status, -+ TestGtkBrowser *browser); -+static void progress_change_cb (GtkMozEmbed *embed, gint cur, gint max, -+ TestGtkBrowser *browser); -+static void progress_change_all_cb (GtkMozEmbed *embed, const char *uri, -+ gint cur, gint max, -+ TestGtkBrowser *browser); -+static void link_message_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void js_status_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static void new_window_cb (GtkMozEmbed *embed, -+ GtkMozEmbed **retval, guint chromemask, -+ TestGtkBrowser *browser); -+static void visibility_cb (GtkMozEmbed *embed, -+ gboolean visibility, -+ TestGtkBrowser *browser); -+static void destroy_brsr_cb (GtkMozEmbed *embed, TestGtkBrowser *browser); -+static gint open_uri_cb (GtkMozEmbed *embed, const char *uri, -+ TestGtkBrowser *browser); -+static void size_to_cb (GtkMozEmbed *embed, gint width, -+ gint height, TestGtkBrowser *browser); -+static gint dom_key_down_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_key_press_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_key_up_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_down_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_up_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_dbl_click_cb (GtkMozEmbed *embed, -+ nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_over_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_mouse_out_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_activate_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_focus_in_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser); -+static gint dom_focus_out_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser); -+ -+// callbacks from the singleton object -+static void new_window_orphan_cb (GtkMozEmbedSingle *embed, -+ GtkMozEmbed **retval, guint chromemask, -+ gpointer data); -+ -+// some utility functions -+static void update_status_bar_text (TestGtkBrowser *browser); -+static void update_temp_message (TestGtkBrowser *browser, -+ const char *message); -+static void update_nav_buttons (TestGtkBrowser *browser); -+ -+int -+main(int argc, char **argv) -+{ -+ gtk_set_locale(); -+ gtk_init(&argc, &argv); -+ -+ static const GREVersionRange greVersion = { -+ "1.9a", PR_TRUE, -+ "2", PR_TRUE -+ }; -+ -+ char xpcomPath[PATH_MAX]; -+ -+ nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, -+ xpcomPath, sizeof(xpcomPath)); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find a compatible GRE.\n"); -+ return 1; -+ } -+ -+ rv = XPCOMGlueStartup(xpcomPath); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't start XPCOM."); -+ return 1; -+ } -+ -+ rv = GTKEmbedGlueStartup(); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); -+ return 1; -+ } -+ -+ char *lastSlash = strrchr(xpcomPath, '/'); -+ if (lastSlash) -+ *lastSlash = '\0'; -+ -+ gtk_moz_embed_set_path(xpcomPath); -+ -+ char *home_path; -+ char *full_path; -+ home_path = getenv("HOME"); -+ if (!home_path) { -+ fprintf(stderr, "Failed to get HOME\n"); -+ exit(1); -+ } -+ -+ full_path = g_strdup_printf("%s/%s", home_path, ".TestGtkEmbed"); -+ -+ gtk_moz_embed_set_profile_path(full_path, "TestGtkEmbed"); -+ -+ TestGtkBrowser *browser = new_gtk_browser(GTK_MOZ_EMBED_FLAG_DEFAULTCHROME); -+ -+ // set our minimum size -+ gtk_widget_set_size_request(browser->mozEmbed, 400, 400); -+ -+ set_browser_visibility(browser, TRUE); -+ -+ if (argc > 1) -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser->mozEmbed), argv[1]); -+ -+ // get the singleton object and hook up to its new window callback -+ // so we can create orphaned windows. -+ -+ GtkMozEmbedSingle *single; -+ -+ single = gtk_moz_embed_single_get(); -+ if (!single) { -+ fprintf(stderr, "Failed to get singleton embed object!\n"); -+ exit(1); -+ } -+ -+ g_signal_connect(GTK_OBJECT(single), "new_window_orphan", -+ G_CALLBACK(new_window_orphan_cb), NULL); -+ -+ gtk_moz_embed_push_startup(); -+ gtk_main(); -+ gtk_moz_embed_pop_startup(); -+} -+ -+static TestGtkBrowser * -+new_gtk_browser(guint32 chromeMask) -+{ -+ guint32 actualChromeMask = chromeMask; -+ TestGtkBrowser *browser = 0; -+ -+ num_browsers++; -+ -+ browser = g_new0(TestGtkBrowser, 1); -+ -+ browser_list = g_list_prepend(browser_list, browser); -+ -+ browser->menuBarOn = FALSE; -+ browser->toolBarOn = FALSE; -+ browser->locationBarOn = FALSE; -+ browser->statusBarOn = FALSE; -+ -+ g_print("new_gtk_browser\n"); -+ -+ if (chromeMask == GTK_MOZ_EMBED_FLAG_DEFAULTCHROME) -+ actualChromeMask = GTK_MOZ_EMBED_FLAG_ALLCHROME; -+ -+ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_MENUBARON) -+ { -+ browser->menuBarOn = TRUE; -+ g_print("\tmenu bar\n"); -+ } -+ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_TOOLBARON) -+ { -+ browser->toolBarOn = TRUE; -+ g_print("\ttool bar\n"); -+ } -+ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_LOCATIONBARON) -+ { -+ browser->locationBarOn = TRUE; -+ g_print("\tlocation bar\n"); -+ } -+ if (actualChromeMask & GTK_MOZ_EMBED_FLAG_STATUSBARON) -+ { -+ browser->statusBarOn = TRUE; -+ g_print("\tstatus bar\n"); -+ } -+ -+ // create our new toplevel window -+ browser->topLevelWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); -+ // new vbox -+ browser->topLevelVBox = gtk_vbox_new(FALSE, 0); -+ // add it to the toplevel window -+ gtk_container_add(GTK_CONTAINER(browser->topLevelWindow), -+ browser->topLevelVBox); -+ // create our menu bar -+ browser->menuBar = gtk_menu_bar_new(); -+ // create the file menu -+ browser->fileMenuItem = gtk_menu_item_new_with_label("File"); -+ browser->fileMenu = gtk_menu_new(); -+ gtk_menu_item_set_submenu (GTK_MENU_ITEM(browser->fileMenuItem), -+ browser->fileMenu); -+ -+ browser->fileOpenNewBrowser = -+ gtk_menu_item_new_with_label("Open New Browser"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileOpenNewBrowser); -+ -+ browser->fileStream = -+ gtk_menu_item_new_with_label("Test Stream"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileStream); -+ -+ browser->fileMemory = -+ gtk_menu_item_new_with_label("Release Memory"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileMemory); -+ -+ browser->fileClose = -+ gtk_menu_item_new_with_label("Close"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileClose); -+ -+ browser->fileQuit = -+ gtk_menu_item_new_with_label("Quit"); -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU(browser->fileMenu), -+ browser->fileQuit); -+ -+ // append it -+ gtk_menu_shell_append((GtkMenuShell *)GTK_MENU_BAR(browser->menuBar), -+ browser->fileMenuItem); -+ -+ // add it to the vbox -+ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), -+ browser->menuBar, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ // create the hbox that will contain the toolbar and the url text entry bar -+ browser->toolbarHBox = gtk_hbox_new(FALSE, 0); -+ // add that hbox to the vbox -+ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), -+ browser->toolbarHBox, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ // new horiz toolbar with buttons + icons -+ browser->toolbar = gtk_toolbar_new(); -+ gtk_toolbar_set_orientation(GTK_TOOLBAR(browser->toolbar), -+ GTK_ORIENTATION_HORIZONTAL); -+ gtk_toolbar_set_style(GTK_TOOLBAR(browser->toolbar), -+ GTK_TOOLBAR_BOTH); -+ -+ // add it to the hbox -+ gtk_box_pack_start(GTK_BOX(browser->toolbarHBox), browser->toolbar, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ // new back button -+ browser->backButton = -+ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), -+ "Back", -+ "Go Back", -+ "Go Back", -+ 0, // XXX replace with icon -+ G_CALLBACK(back_clicked_cb), -+ browser); -+ // new stop button -+ browser->stopButton = -+ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), -+ "Stop", -+ "Stop", -+ "Stop", -+ 0, // XXX replace with icon -+ G_CALLBACK(stop_clicked_cb), -+ browser); -+ // new forward button -+ browser->forwardButton = -+ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), -+ "Forward", -+ "Forward", -+ "Forward", -+ 0, // XXX replace with icon -+ G_CALLBACK(forward_clicked_cb), -+ browser); -+ // new reload button -+ browser->reloadButton = -+ gtk_toolbar_append_item(GTK_TOOLBAR(browser->toolbar), -+ "Reload", -+ "Reload", -+ "Reload", -+ 0, // XXX replace with icon -+ G_CALLBACK(reload_clicked_cb), -+ browser); -+ // create the url text entry -+ browser->urlEntry = gtk_entry_new(); -+ // add it to the hbox -+ gtk_box_pack_start(GTK_BOX(browser->toolbarHBox), browser->urlEntry, -+ TRUE, // expand -+ TRUE, // fill -+ 0); // padding -+ // create our new gtk moz embed widget -+ browser->mozEmbed = gtk_moz_embed_new(); -+ gtk_moz_embed_push_startup(); -+ // add it to the toplevel vbox -+ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->mozEmbed, -+ TRUE, // expand -+ TRUE, // fill -+ 0); // padding -+ // create the new hbox for the progress area -+ browser->progressAreaHBox = gtk_hbox_new(FALSE, 0); -+ // add it to the vbox -+ gtk_box_pack_start(GTK_BOX(browser->topLevelVBox), browser->progressAreaHBox, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ // create our new progress bar -+ browser->progressBar = gtk_progress_bar_new(); -+ // add it to the hbox -+ gtk_box_pack_start(GTK_BOX(browser->progressAreaHBox), browser->progressBar, -+ FALSE, // expand -+ FALSE, // fill -+ 0); // padding -+ -+ // create our status area and the alignment object that will keep it -+ // from expanding -+ browser->statusAlign = gtk_alignment_new(0, 0, 1, 1); -+ gtk_widget_set_size_request(browser->statusAlign, 1, -1); -+ // create the status bar -+ browser->statusBar = gtk_statusbar_new(); -+ gtk_container_add(GTK_CONTAINER(browser->statusAlign), browser->statusBar); -+ // add it to the hbox -+ gtk_box_pack_start(GTK_BOX(browser->progressAreaHBox), browser->statusAlign, -+ TRUE, // expand -+ TRUE, // fill -+ 0); // padding -+ // by default none of the buttons are marked as sensitive. -+ gtk_widget_set_sensitive(browser->backButton, FALSE); -+ gtk_widget_set_sensitive(browser->stopButton, FALSE); -+ gtk_widget_set_sensitive(browser->forwardButton, FALSE); -+ gtk_widget_set_sensitive(browser->reloadButton, FALSE); -+ -+ // catch the destruction of the toplevel window -+ g_signal_connect(GTK_OBJECT(browser->topLevelWindow), "delete_event", -+ G_CALLBACK(delete_cb), browser); -+ -+ // hook up the activate signal to the right callback -+ g_signal_connect(GTK_OBJECT(browser->urlEntry), "activate", -+ G_CALLBACK(url_activate_cb), browser); -+ -+ // hook up to the open new browser activation -+ g_signal_connect(GTK_OBJECT(browser->fileOpenNewBrowser), "activate", -+ G_CALLBACK(menu_open_new_cb), browser); -+ // hook up to the stream test -+ g_signal_connect(GTK_OBJECT(browser->fileStream), "activate", -+ G_CALLBACK(menu_stream_cb), browser); -+ // hook up the memory pressure release function -+ g_signal_connect(GTK_OBJECT(browser->fileMemory), "activate", -+ G_CALLBACK(menu_memory_cb), browser); -+ // close this window -+ g_signal_connect(GTK_OBJECT(browser->fileClose), "activate", -+ G_CALLBACK(menu_close_cb), browser); -+ // quit the application -+ g_signal_connect(GTK_OBJECT(browser->fileQuit), "activate", -+ G_CALLBACK(menu_quit_cb), browser); -+ -+ // hook up the location change to update the urlEntry -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "location", -+ G_CALLBACK(location_changed_cb), browser); -+ // hook up the title change to update the window title -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "title", -+ G_CALLBACK(title_changed_cb), browser); -+ // hook up the start and stop signals -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_start", -+ G_CALLBACK(load_started_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_stop", -+ G_CALLBACK(load_finished_cb), browser); -+ // hook up to the change in network status -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_state", -+ G_CALLBACK(net_state_change_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "net_state_all", -+ G_CALLBACK(net_state_change_all_cb), browser); -+ // hookup to changes in progress -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "progress", -+ G_CALLBACK(progress_change_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "progress_all", -+ G_CALLBACK(progress_change_all_cb), browser); -+ // hookup to changes in over-link message -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "link_message", -+ G_CALLBACK(link_message_cb), browser); -+ // hookup to changes in js status message -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "js_status", -+ G_CALLBACK(js_status_cb), browser); -+ // hookup to see whenever a new window is requested -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "new_window", -+ G_CALLBACK(new_window_cb), browser); -+ // hookup to any requested visibility changes -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "visibility", -+ G_CALLBACK(visibility_cb), browser); -+ // hookup to the signal that says that the browser requested to be -+ // destroyed -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "destroy_browser", -+ G_CALLBACK(destroy_brsr_cb), browser); -+ // hookup to the signal that is called when someone clicks on a link -+ // to load a new uri -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "open_uri", -+ G_CALLBACK(open_uri_cb), browser); -+ // this signal is emitted when there's a request to change the -+ // containing browser window to a certain height, like with width -+ // and height args for a window.open in javascript -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "size_to", -+ G_CALLBACK(size_to_cb), browser); -+ // key event signals -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_down", -+ G_CALLBACK(dom_key_down_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_press", -+ G_CALLBACK(dom_key_press_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_key_up", -+ G_CALLBACK(dom_key_up_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_down", -+ G_CALLBACK(dom_mouse_down_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_up", -+ G_CALLBACK(dom_mouse_up_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_click", -+ G_CALLBACK(dom_mouse_click_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_dbl_click", -+ G_CALLBACK(dom_mouse_dbl_click_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_over", -+ G_CALLBACK(dom_mouse_over_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_mouse_out", -+ G_CALLBACK(dom_mouse_out_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_activate", -+ G_CALLBACK(dom_activate_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_focus_in", -+ G_CALLBACK(dom_focus_in_cb), browser); -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "dom_focus_out", -+ G_CALLBACK(dom_focus_out_cb), browser); -+ // hookup to when the window is destroyed -+ g_signal_connect(GTK_OBJECT(browser->mozEmbed), "destroy", -+ G_CALLBACK(destroy_cb), browser); -+ -+ // set the chrome type so it's stored in the object -+ gtk_moz_embed_set_chrome_mask(GTK_MOZ_EMBED(browser->mozEmbed), -+ actualChromeMask); -+ -+ return browser; -+} -+ -+void -+set_browser_visibility (TestGtkBrowser *browser, gboolean visibility) -+{ -+ if (!visibility) -+ { -+ gtk_widget_hide(browser->topLevelWindow); -+ return; -+ } -+ -+ if (browser->menuBarOn) -+ gtk_widget_show_all(browser->menuBar); -+ else -+ gtk_widget_hide_all(browser->menuBar); -+ -+ // since they are on the same line here... -+ if (browser->toolBarOn || browser->locationBarOn) -+ gtk_widget_show_all(browser->toolbarHBox); -+ else -+ gtk_widget_hide_all(browser->toolbarHBox); -+ -+ if (browser->statusBarOn) -+ gtk_widget_show_all(browser->progressAreaHBox); -+ else -+ gtk_widget_hide_all(browser->progressAreaHBox); -+ -+ gtk_widget_show(browser->mozEmbed); -+ gtk_widget_show(browser->topLevelVBox); -+ gtk_widget_show(browser->topLevelWindow); -+} -+ -+void -+back_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ gtk_moz_embed_go_back(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+stop_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ g_print("stop_clicked_cb\n"); -+ gtk_moz_embed_stop_load(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+forward_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ g_print("forward_clicked_cb\n"); -+ gtk_moz_embed_go_forward(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+reload_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ g_print("reload_clicked_cb\n"); -+ GdkModifierType state = (GdkModifierType)0; -+ gint x, y; -+ gdk_window_get_pointer(NULL, &x, &y, &state); -+ -+ gtk_moz_embed_reload(GTK_MOZ_EMBED(browser->mozEmbed), -+ (state & GDK_SHIFT_MASK) ? -+ GTK_MOZ_EMBED_FLAG_RELOADBYPASSCACHE : -+ GTK_MOZ_EMBED_FLAG_RELOADNORMAL); -+} -+ -+void -+stream_clicked_cb (GtkButton *button, TestGtkBrowser *browser) -+{ -+ const char *data; -+ const char *data2; -+ data = "Hi"; -+ data2 = " there\n"; -+ g_print("stream_clicked_cb\n"); -+ gtk_moz_embed_open_stream(GTK_MOZ_EMBED(browser->mozEmbed), -+ "file://", "text/html"); -+ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), -+ data, strlen(data)); -+ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), -+ data2, strlen(data2)); -+ gtk_moz_embed_close_stream(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+url_activate_cb (GtkEditable *widget, TestGtkBrowser *browser) -+{ -+ gchar *text = gtk_editable_get_chars(widget, 0, -1); -+ g_print("loading url %s\n", text); -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser->mozEmbed), text); -+ g_free(text); -+} -+ -+void -+menu_open_new_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ g_print("opening new browser.\n"); -+ TestGtkBrowser *newBrowser = -+ new_gtk_browser(GTK_MOZ_EMBED_FLAG_DEFAULTCHROME); -+ gtk_widget_set_size_request(newBrowser->mozEmbed, 400, 400); -+ set_browser_visibility(newBrowser, TRUE); -+} -+ -+void -+menu_stream_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ g_print("menu_stream_cb\n"); -+ const char *data; -+ const char *data2; -+ data = "Hi"; -+ data2 = " there\n"; -+ g_print("stream_clicked_cb\n"); -+ gtk_moz_embed_open_stream(GTK_MOZ_EMBED(browser->mozEmbed), -+ "file://", "text/html"); -+ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), -+ data, strlen(data)); -+ gtk_moz_embed_append_data(GTK_MOZ_EMBED(browser->mozEmbed), -+ data2, strlen(data2)); -+ gtk_moz_embed_close_stream(GTK_MOZ_EMBED(browser->mozEmbed)); -+} -+ -+void -+menu_memory_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ g_print("menu_memory_cb\n"); -+ nsCOMPtr os = do_GetService("@mozilla.org/observer-service;1"); -+ if (!os) -+ return; -+ -+ // Compact like you mean it. We do this three times to give the -+ // cycle collector a chance to try and reclaim as much as we can. -+ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); -+ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); -+ os->NotifyObservers(nsnull, "memory-pressure", NS_LITERAL_STRING("heap-minimize").get()); -+} -+ -+void -+menu_close_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ gtk_widget_destroy(browser->topLevelWindow); -+} -+ -+void -+menu_quit_cb (GtkMenuItem *menuitem, TestGtkBrowser *browser) -+{ -+ TestGtkBrowser *tmpBrowser; -+ GList *tmp_list = browser_list; -+ tmpBrowser = (TestGtkBrowser *)tmp_list->data; -+ while (tmpBrowser) { -+ tmp_list = tmp_list->next; -+ gtk_widget_destroy(tmpBrowser->topLevelWindow); -+ tmpBrowser = (TestGtkBrowser *)tmp_list->data; -+ } -+} -+ -+gboolean -+delete_cb(GtkWidget *widget, GdkEventAny *event, TestGtkBrowser *browser) -+{ -+ g_print("delete_cb\n"); -+ gtk_widget_destroy(widget); -+ return TRUE; -+} -+ -+static gboolean -+idle_quit(void*) -+{ -+ gtk_main_quit(); -+ return FALSE; -+} -+ -+static gboolean -+idle_pop(void*) -+{ -+ gtk_moz_embed_pop_startup(); -+ return FALSE; -+} -+ -+void -+destroy_cb (GtkWidget *widget, TestGtkBrowser *browser) -+{ -+ GList *tmp_list; -+ g_print("destroy_cb\n"); -+ num_browsers--; -+ tmp_list = g_list_find(browser_list, browser); -+ browser_list = g_list_remove_link(browser_list, tmp_list); -+ if (browser->tempMessage) -+ g_free(browser->tempMessage); -+ g_idle_add(idle_pop, NULL); -+ if (num_browsers == 0) -+ g_idle_add (idle_quit, NULL); -+} -+ -+void -+location_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ char *newLocation; -+ int newPosition = 0; -+ g_print("location_changed_cb\n"); -+ newLocation = gtk_moz_embed_get_location(embed); -+ if (newLocation) -+ { -+ gtk_editable_delete_text(GTK_EDITABLE(browser->urlEntry), 0, -1); -+ gtk_editable_insert_text(GTK_EDITABLE(browser->urlEntry), -+ newLocation, strlen(newLocation), &newPosition); -+ g_free(newLocation); -+ } -+ else -+ g_print("failed to get location!\n"); -+ // always make sure to clear the tempMessage. it might have been -+ // set from the link before a click and we wouldn't have gotten the -+ // callback to unset it. -+ update_temp_message(browser, 0); -+ // update the nav buttons on a location change -+ update_nav_buttons(browser); -+} -+ -+void -+title_changed_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ char *newTitle; -+ g_print("title_changed_cb\n"); -+ newTitle = gtk_moz_embed_get_title(embed); -+ if (newTitle) -+ { -+ gtk_window_set_title(GTK_WINDOW(browser->topLevelWindow), newTitle); -+ g_free(newTitle); -+ } -+ -+} -+ -+void -+load_started_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ g_print("load_started_cb\n"); -+ gtk_widget_set_sensitive(browser->stopButton, TRUE); -+ gtk_widget_set_sensitive(browser->reloadButton, FALSE); -+ browser->loadPercent = 0; -+ browser->bytesLoaded = 0; -+ browser->maxBytesLoaded = 0; -+ update_status_bar_text(browser); -+} -+ -+void -+load_finished_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ g_print("load_finished_cb\n"); -+ gtk_widget_set_sensitive(browser->stopButton, FALSE); -+ gtk_widget_set_sensitive(browser->reloadButton, TRUE); -+ browser->loadPercent = 0; -+ browser->bytesLoaded = 0; -+ browser->maxBytesLoaded = 0; -+ update_status_bar_text(browser); -+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(browser->progressBar), 0); -+} -+ -+ -+void -+net_state_change_cb (GtkMozEmbed *embed, gint flags, guint status, -+ TestGtkBrowser *browser) -+{ -+ g_print("net_state_change_cb %d\n", flags); -+ if (flags & GTK_MOZ_EMBED_FLAG_IS_REQUEST) { -+ if (flags & GTK_MOZ_EMBED_FLAG_REDIRECTING) -+ browser->statusMessage = "Redirecting to site..."; -+ else if (flags & GTK_MOZ_EMBED_FLAG_TRANSFERRING) -+ browser->statusMessage = "Transferring data from site..."; -+ else if (flags & GTK_MOZ_EMBED_FLAG_NEGOTIATING) -+ browser->statusMessage = "Waiting for authorization..."; -+ } -+ -+ if (status == GTK_MOZ_EMBED_STATUS_FAILED_DNS) -+ browser->statusMessage = "Site not found."; -+ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_CONNECT) -+ browser->statusMessage = "Failed to connect to site."; -+ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_TIMEOUT) -+ browser->statusMessage = "Failed due to connection timeout."; -+ else if (status == GTK_MOZ_EMBED_STATUS_FAILED_USERCANCELED) -+ browser->statusMessage = "User canceled connecting to site."; -+ -+ if (flags & GTK_MOZ_EMBED_FLAG_IS_DOCUMENT) { -+ if (flags & GTK_MOZ_EMBED_FLAG_START) -+ browser->statusMessage = "Loading site..."; -+ else if (flags & GTK_MOZ_EMBED_FLAG_STOP) -+ browser->statusMessage = "Done."; -+ } -+ -+ update_status_bar_text(browser); -+ -+} -+ -+void net_state_change_all_cb (GtkMozEmbed *embed, const char *uri, -+ gint flags, guint status, -+ TestGtkBrowser *browser) -+{ -+ // g_print("net_state_change_all_cb %s %d %d\n", uri, flags, status); -+} -+ -+void progress_change_cb (GtkMozEmbed *embed, gint cur, gint max, -+ TestGtkBrowser *browser) -+{ -+ g_print("progress_change_cb cur %d max %d\n", cur, max); -+ -+ // avoid those pesky divide by zero errors -+ if (max < 1) -+ { -+ browser->loadPercent = 0; -+ browser->bytesLoaded = cur; -+ browser->maxBytesLoaded = 0; -+ update_status_bar_text(browser); -+ } -+ else -+ { -+ browser->bytesLoaded = cur; -+ browser->maxBytesLoaded = max; -+ if (cur > max) -+ browser->loadPercent = 100; -+ else -+ browser->loadPercent = (cur * 100) / max; -+ update_status_bar_text(browser); -+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(browser->progressBar), -+ browser->loadPercent / 100.0); -+ } -+ -+} -+ -+void progress_change_all_cb (GtkMozEmbed *embed, const char *uri, -+ gint cur, gint max, -+ TestGtkBrowser *browser) -+{ -+ //g_print("progress_change_all_cb %s cur %d max %d\n", uri, cur, max); -+} -+ -+void -+link_message_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ char *message; -+ g_print("link_message_cb\n"); -+ message = gtk_moz_embed_get_link_message(embed); -+ if (!message || !*message) -+ update_temp_message(browser, 0); -+ else -+ update_temp_message(browser, message); -+ if (message) -+ g_free(message); -+} -+ -+void -+js_status_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ char *message; -+ g_print("js_status_cb\n"); -+ message = gtk_moz_embed_get_js_status(embed); -+ if (!message || !*message) -+ update_temp_message(browser, 0); -+ else -+ update_temp_message(browser, message); -+ if (message) -+ g_free(message); -+} -+ -+void -+new_window_cb (GtkMozEmbed *embed, GtkMozEmbed **newEmbed, guint chromemask, TestGtkBrowser *browser) -+{ -+ g_print("new_window_cb\n"); -+ g_print("embed is %p chromemask is %d\n", (void *)embed, chromemask); -+ TestGtkBrowser *newBrowser = new_gtk_browser(chromemask); -+ gtk_widget_set_size_request(newBrowser->mozEmbed, 400, 400); -+ *newEmbed = GTK_MOZ_EMBED(newBrowser->mozEmbed); -+ g_print("new browser is %p\n", (void *)*newEmbed); -+} -+ -+void -+visibility_cb (GtkMozEmbed *embed, gboolean visibility, TestGtkBrowser *browser) -+{ -+ g_print("visibility_cb %d\n", visibility); -+ set_browser_visibility(browser, visibility); -+} -+ -+void -+destroy_brsr_cb (GtkMozEmbed *embed, TestGtkBrowser *browser) -+{ -+ g_print("destroy_brsr_cb\n"); -+ gtk_widget_destroy(browser->topLevelWindow); -+} -+ -+gint -+open_uri_cb (GtkMozEmbed *embed, const char *uri, TestGtkBrowser *browser) -+{ -+ g_print("open_uri_cb %s\n", uri); -+ -+ // interrupt this test load -+ if (!strcmp(uri, "http://people.redhat.com/blizzard/monkeys.txt")) -+ return TRUE; -+ // don't interrupt anything -+ return FALSE; -+} -+ -+void -+size_to_cb (GtkMozEmbed *embed, gint width, gint height, -+ TestGtkBrowser *browser) -+{ -+ g_print("*** size_to_cb %d %d\n", width, height); -+ gtk_widget_set_size_request(browser->mozEmbed, width, height); -+} -+ -+gint dom_key_down_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser) -+{ -+ PRUint32 keyCode = 0; -+ // g_print("dom_key_down_cb\n"); -+ event->GetKeyCode(&keyCode); -+ // g_print("key code is %d\n", keyCode); -+ return NS_OK; -+} -+ -+gint dom_key_press_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser) -+{ -+ PRUint32 keyCode = 0; -+ // g_print("dom_key_press_cb\n"); -+ event->GetCharCode(&keyCode); -+ // g_print("char code is %d\n", keyCode); -+ return NS_OK; -+} -+ -+gint dom_key_up_cb (GtkMozEmbed *embed, nsIDOMKeyEvent *event, -+ TestGtkBrowser *browser) -+{ -+ PRUint32 keyCode = 0; -+ // g_print("dom_key_up_cb\n"); -+ event->GetKeyCode(&keyCode); -+ // g_print("key code is %d\n", keyCode); -+ return NS_OK; -+} -+ -+gint dom_mouse_down_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ // g_print("dom_mouse_down_cb\n"); -+ return NS_OK; -+ } -+ -+gint dom_mouse_up_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ // g_print("dom_mouse_up_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_mouse_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ // g_print("dom_mouse_click_cb\n"); -+ PRUint16 button; -+ event->GetButton(&button); -+ printf("button was %d\n", button); -+ return NS_OK; -+} -+ -+gint dom_mouse_dbl_click_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ // g_print("dom_mouse_dbl_click_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_mouse_over_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_mouse_over_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_mouse_out_cb (GtkMozEmbed *embed, nsIDOMMouseEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_mouse_out_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_activate_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_activate_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_focus_in_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_focus_in_cb\n"); -+ return NS_OK; -+} -+ -+gint dom_focus_out_cb (GtkMozEmbed *embed, nsIDOMUIEvent *event, -+ TestGtkBrowser *browser) -+{ -+ //g_print("dom_focus_out_cb\n"); -+ return NS_OK; -+} -+ -+void new_window_orphan_cb (GtkMozEmbedSingle *embed, -+ GtkMozEmbed **retval, guint chromemask, -+ gpointer data) -+{ -+ g_print("new_window_orphan_cb\n"); -+ g_print("chromemask is %d\n", chromemask); -+ TestGtkBrowser *newBrowser = new_gtk_browser(chromemask); -+ *retval = GTK_MOZ_EMBED(newBrowser->mozEmbed); -+ g_print("new browser is %p\n", (void *)*retval); -+} -+ -+// utility functions -+ -+void -+update_status_bar_text(TestGtkBrowser *browser) -+{ -+ gchar message[256]; -+ -+ gtk_statusbar_pop(GTK_STATUSBAR(browser->statusBar), 1); -+ if (browser->tempMessage) -+ gtk_statusbar_push(GTK_STATUSBAR(browser->statusBar), 1, browser->tempMessage); -+ else -+ { -+ if (browser->loadPercent) -+ { -+ g_snprintf(message, 255, "%s (%d%% complete, %d bytes of %d loaded)", browser->statusMessage, browser->loadPercent, browser->bytesLoaded, browser->maxBytesLoaded); -+ } -+ else if (browser->bytesLoaded) -+ { -+ g_snprintf(message, 255, "%s (%d bytes loaded)", browser->statusMessage, browser->bytesLoaded); -+ } -+ else if (browser->statusMessage == NULL) -+ { -+ g_snprintf(message, 255, " "); -+ } -+ else -+ { -+ g_snprintf(message, 255, "%s", browser->statusMessage); -+ } -+ gtk_statusbar_push(GTK_STATUSBAR(browser->statusBar), 1, message); -+ } -+} -+ -+void -+update_temp_message(TestGtkBrowser *browser, const char *message) -+{ -+ if (browser->tempMessage) -+ g_free(browser->tempMessage); -+ if (message) -+ browser->tempMessage = g_strdup(message); -+ else -+ browser->tempMessage = 0; -+ // now that we've updated the temp message, redraw the status bar -+ update_status_bar_text(browser); -+} -+ -+ -+void -+update_nav_buttons (TestGtkBrowser *browser) -+{ -+ gboolean can_go_back; -+ gboolean can_go_forward; -+ can_go_back = gtk_moz_embed_can_go_back(GTK_MOZ_EMBED(browser->mozEmbed)); -+ can_go_forward = gtk_moz_embed_can_go_forward(GTK_MOZ_EMBED(browser->mozEmbed)); -+ if (can_go_back) -+ gtk_widget_set_sensitive(browser->backButton, TRUE); -+ else -+ gtk_widget_set_sensitive(browser->backButton, FALSE); -+ if (can_go_forward) -+ gtk_widget_set_sensitive(browser->forwardButton, TRUE); -+ else -+ gtk_widget_set_sensitive(browser->forwardButton, FALSE); -+ } -+ -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedMDI.cpp 2012-03-09 15:19:22.267678760 +0100 -@@ -0,0 +1,142 @@ -+/** simplemdi.c **/ -+/* -+ * Sample code from "GNOME/GTK+ Programming Bible" by Arthur Griffith -+ * Modified by Kevin Gibbs (kgibbs@stanford.edu) to provide sample of -+ * GtkMozEmbed realization/unrealization crashes. -+ * -+ * To get a fatal crash, simply run the program, click on the "Mozilla" -+ * tab to display the MozEmbed widget, and then try to drag that MDI tab -+ * off to a new window. -+ * -+ * Although this test might seem elaborate, it is really only a convenient -+ * to create a situation where the widget is realized, unrealized, and -+ * realized again at some point. (Dragging the MDI tab off to a new window -+ * causes all widgets to be unrealized in the old window, and then realized -+ * again in the new window.) -+ */ -+ -+#include -+#include "gtkmozembed.h" -+ -+// Testing flags -+// -+ -+// Define this flag to have the test program use the gtkmozembed widget. -+// Without this flag, mozilla is never loaded in the program, and a simple -+// widget is used in place of the mozembed widget. -+#define USE_MOZILLA_TEST -+ -+// Define this flag to have a simpler test than the usual one. The normal -+// test builds a notebook inside of each MDI view, with one page being a label -+// and the other page being a browser widget. The simpler test does not -+// build a notebook and simply puts the browser widget in the MDI view itself. -+// Currently, this test is not very interesting, since for some reason all -+// the webshells just create and destroy themselves. (???) -+//#define SIMPLER_TEST -+ -+// Define this flag to use a GnomePixmap instead of a GtkLabel as the -+// replacement for the gtkmozembed widget when USE_MOZILLA_TEST is -+// undefined. This is to stress test the program a bit more by providing a -+// replacement widget slightly more complex than GtkLabel. -+// (Has no effect when USE_MOZILLA_TEST is defined.) -+#define SAMPLE_PIXMAP -+ -+ -+gint eventDelete(GtkWidget *widget, -+ GdkEvent *event,gpointer data); -+gint eventDestroy(GtkWidget *widget, -+ GdkEvent *event,gpointer data); -+ -+static void addChild(GtkObject *mdi,gchar *name); -+static GtkWidget *setLabel(GnomeMDIChild *child, -+ GtkWidget *currentLabel,gpointer data); -+static GtkWidget *createView(GnomeMDIChild *child, -+ gpointer data); -+ -+int main(int argc,char *argv[]) -+{ -+ GtkObject *mdi; -+ -+ gnome_init("simplemdi","1.0",argc,argv); -+ mdi = gnome_mdi_new("simplemdi","Simple MDI"); -+ gtk_signal_connect(mdi,"destroy", -+ GTK_SIGNAL_FUNC(eventDestroy),NULL); -+ -+ addChild(mdi,"First"); -+ addChild(mdi,"Second"); -+ addChild(mdi,"Third"); -+ addChild(mdi,"Last"); -+ -+ gnome_mdi_set_mode(GNOME_MDI(mdi),GNOME_MDI_NOTEBOOK); -+ //gnome_mdi_open_toplevel(GNOME_MDI(mdi)); -+ -+ gtk_main(); -+ exit(0); -+} -+static void addChild(GtkObject *mdi,gchar *name) -+{ -+ GnomeMDIGenericChild *child; -+ -+ child = gnome_mdi_generic_child_new(name); -+ gnome_mdi_add_child(GNOME_MDI(mdi), -+ GNOME_MDI_CHILD(child)); -+ -+ gnome_mdi_generic_child_set_view_creator(child, -+ createView,name); -+ gnome_mdi_generic_child_set_label_func(child,setLabel, -+ NULL); -+ gnome_mdi_add_view(GNOME_MDI(mdi), -+ GNOME_MDI_CHILD(child)); -+} -+static GtkWidget *createView(GnomeMDIChild *child, -+ gpointer data) -+{ -+#ifdef USE_MOZILLA_TEST -+ GtkWidget *browser = gtk_moz_embed_new(); -+#else -+#ifndef SAMPLE_PIXMAP -+ GtkWidget *browser = gtk_label_new("lynx 0.01a"); -+#else -+ /* Another example -- */ -+ GtkWidget *browser = -+ gnome_pixmap_new_from_file("/usr/share/pixmaps/emacs.png"); -+#endif /* SAMPLE_PIXMAP */ -+#endif /* USE_MOZILLA_TEST */ -+ -+ GtkWidget *notebook = gtk_notebook_new(); -+ char str[80]; -+ -+ sprintf(str,"View of the\n%s widget",(gchar *)data); -+ -+#ifdef USE_MOZILLA_TEST -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(browser), "http://www.mozilla.org"); -+#endif /* USE_MOZILLA_TEST */ -+ -+#ifndef SIMPLER_TEST -+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), gtk_label_new(str), -+ gtk_label_new("Label")); -+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), browser, -+ gtk_label_new("Mozilla")); -+ gtk_widget_show_all(notebook); -+ return (notebook); -+#else -+ gtk_widget_show(browser); -+ return (browser); -+#endif /* SIMPLER_TEST */ -+} -+ -+static GtkWidget *setLabel(GnomeMDIChild *child, -+ GtkWidget *currentLabel,gpointer data) -+{ -+ if(currentLabel == NULL) -+ return(gtk_label_new(child->name)); -+ -+ gtk_label_set_text(GTK_LABEL(currentLabel), -+ child->name); -+ return(currentLabel); -+} -+gint eventDestroy(GtkWidget *widget, -+ GdkEvent *event,gpointer data) { -+ gtk_main_quit(); -+ return(0); -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedNotebook.cpp 2012-03-09 15:19:22.267678760 +0100 -@@ -0,0 +1,86 @@ -+#include -+#include -+#include -+#include "nsStringAPI.h" -+#include "gtkmozembed_glue.cpp" -+ -+int main(int argc, char *argv[]) -+{ -+ GtkWidget *window; -+ GtkWidget *label; -+ GtkWidget *mozembed; -+ GtkWidget *container; -+ char *url; -+ -+ gtk_init(&argc, &argv); -+ -+ static const GREVersionRange greVersion = { -+ "1.9a", PR_TRUE, -+ "2", PR_TRUE -+ }; -+ -+ char xpcomPath[PATH_MAX]; -+ -+ nsresult rv = -+ GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, -+ xpcomPath, sizeof(xpcomPath)); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find a compatible GRE.\n"); -+ return 1; -+ } -+ -+ rv = XPCOMGlueStartup(xpcomPath); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't start XPCOM."); -+ return 1; -+ } -+ -+ rv = GTKEmbedGlueStartup(); -+ if (NS_FAILED(rv)) { -+ fprintf(stderr, "Couldn't find GTKMozEmbed symbols."); -+ return 1; -+ } -+ -+ char *lastSlash = strrchr(xpcomPath, '/'); -+ if (lastSlash) -+ *lastSlash = '\0'; -+ -+ gtk_moz_embed_set_path(xpcomPath); -+ -+ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); -+ -+ container = gtk_notebook_new(); -+ mozembed = gtk_moz_embed_new(); -+ label = gtk_label_new("Can you see this message?\n" -+ "Once you switch to mozembed page " -+ "you never see this message."); -+ -+ g_signal_connect(GTK_OBJECT(mozembed), "destroy", -+ G_CALLBACK(gtk_main_quit), -+NULL); -+ -+ gtk_container_add(GTK_CONTAINER(window), container); -+ -+ gtk_notebook_append_page(GTK_NOTEBOOK(container), -+ label, -+ gtk_label_new("gtk label")); -+ -+ gtk_notebook_append_page(GTK_NOTEBOOK(container), -+ mozembed, -+ gtk_label_new("mozembed")); -+ -+ -+ -+ -+ gtk_widget_set_size_request(window, 400, 300); -+ gtk_widget_show(mozembed); -+ gtk_widget_show(label); -+ gtk_widget_show_all(window); -+ -+ url = (argc > 1) ? argv[1] : (char *)"localhost"; -+ gtk_moz_embed_load_url(GTK_MOZ_EMBED(mozembed), url); -+ -+ gtk_main(); -+ -+ return 0; -+} -diff -up xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp ---- xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp.gtkmozembed 2012-03-09 15:19:22.267678760 +0100 -+++ xulrunner-11.0/mozilla-beta/embedding/browser/gtk/tests/TestGtkEmbedSocket.cpp 2012-03-09 15:19:22.267678760 +0100 -@@ -0,0 +1,109 @@ -+/* ***** 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 -+ * Christopher Blizzard. -+ * Portions created by the Initial Developer are Copyright (C) 2001 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Christopher Blizzard -+ * -+ * 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 ***** */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+GtkWidget *toplevel_window = 0; -+GtkWidget *button = 0; -+GtkWidget *vbox = 0; -+GtkWidget *gtk_socket = 0; -+ -+void -+insert_mozilla(gpointer data); -+ -+int -+main(int argc, char **argv) -+{ -+ gtk_init(&argc, &argv); -+ -+ toplevel_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); -+ -+ g_signal_connect(GTK_OBJECT(toplevel_window), "destroy", -+ G_CALLBACK(exit), NULL); -+ -+ vbox = gtk_vbox_new(FALSE, 0); -+ gtk_container_add(GTK_CONTAINER(toplevel_window), vbox); -+ gtk_widget_show(vbox); -+ -+ button = gtk_button_new_with_label("Insert Mozilla"); -+ -+ gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); -+ gtk_widget_show(button); -+ -+ g_signal_connect(GTK_OBJECT(button), "clicked", -+ G_CALLBACK(insert_mozilla), NULL); -+ -+ gtk_widget_show(toplevel_window); -+ -+ gtk_main(); -+ -+ return 0; -+} -+ -+void -+insert_mozilla(gpointer data) -+{ -+ char buffer[20]; -+ int pid; -+ -+ if (gtk_socket) -+ return; -+ -+ gtk_socket = gtk_socket_new(); -+ gtk_box_pack_start(GTK_BOX(vbox), gtk_socket, TRUE, TRUE, 0); -+ gtk_widget_show(gtk_socket); -+ -+ sprintf(buffer, "%#lx", GDK_WINDOW_XWINDOW(gtk_socket->window)); -+ -+ gdk_flush(); -+ -+ if ((pid = fork()) == 0) { /* child */ -+ execl("./TestGtkEmbedChild", "./TestGtkEmbedChild", buffer, NULL); -+ fprintf(stderr, "can't exec child\n"); -+ _exit(1); -+ } -+ else if (pid > 0) { /* parent */ -+ } -+ else { -+ fprintf(stderr, "Can't fork.\n"); -+ } -+} -diff -up xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in ---- xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in.gtkmozembed 2012-03-09 01:40:05.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/toolkit/library/Makefile.in 2012-03-09 15:19:22.268678765 +0100 -@@ -73,6 +73,8 @@ CPPSRCS += dlldeps-xul.cpp - endif - - ifneq (,$(MOZ_ENABLE_GTK2)) -+SHARED_LIBRARY_LIBS += \ -+ $(DEPTH)/embedding/browser/gtk/src/$(LIB_PREFIX)gtkembedmoz.$(LIB_SUFFIX) - DEFINES += -DMOZ_ENABLE_GTK2 - endif - -diff -up xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh ---- xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh.gtkmozembed 2012-03-09 01:40:06.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/toolkit/toolkit-makefiles.sh 2012-03-09 15:19:22.268678765 +0100 -@@ -438,6 +438,9 @@ MAKEFILES_embedding=" - embedding/browser/Makefile - embedding/browser/build/Makefile - embedding/browser/webBrowser/Makefile -+ embedding/browser/gtk/Makefile -+ embedding/browser/gtk/src/Makefile -+ embedding/browser/gtk/tests/Makefile - embedding/components/Makefile - embedding/components/appstartup/src/Makefile - embedding/components/build/Makefile -diff -up xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk ---- xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk.gtkmozembed 2012-03-09 01:40:06.000000000 +0100 -+++ xulrunner-11.0/mozilla-beta/toolkit/toolkit-tiers.mk 2012-03-09 15:19:22.269678770 +0100 -@@ -220,6 +220,12 @@ endif - - tier_platform_dirs += services/crypto/component - -+ifndef BUILD_STATIC_LIBS -+ifneq (,$(MOZ_ENABLE_GTK2)) -+tier_platform_dirs += embedding/browser/gtk -+endif -+endif -+ - tier_platform_dirs += startupcache - - tier_platform_dirs += js/ductwork/debugger -diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in ---- xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in.gtkmozembed 2012-03-09 15:19:22.240678626 +0100 -+++ xulrunner-11.0/mozilla-beta/xulrunner/installer/Makefile.in 2012-03-09 15:19:22.275678799 +0100 -@@ -80,6 +80,8 @@ pkg_config_files = \ - libxul-embedding.pc \ - mozilla-js.pc \ - mozilla-plugin.pc \ -+ mozilla-gtkmozembed.pc \ -+ mozilla-gtkmozembed-embedding.pc \ - $(NULL) - - ifdef MOZ_NATIVE_NSPR -diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in ---- xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in.gtkmozembed 2012-03-09 15:19:22.270678775 +0100 -+++ xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2012-03-09 15:19:22.270678775 +0100 -@@ -0,0 +1,9 @@ -+prefix=%prefix% -+sdkdir=%sdkdir% -+includedir=%includedir% -+libdir=%libdir% -+ -+Name: mozilla-gtkembedmoz -+Description: Static version-independent Mozilla Embedding Widget for Gtk+ -+Version: %MOZILLA_VERSION% -+Requires: libxul-embedding = %MOZILLA_VERSION% -diff -up xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in ---- xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in.gtkmozembed 2012-03-09 15:19:22.270678775 +0100 -+++ xulrunner-11.0/mozilla-beta/xulrunner/installer/mozilla-gtkmozembed.pc.in 2012-03-09 15:19:22.270678775 +0100 -@@ -0,0 +1,9 @@ -+prefix=%prefix% -+sdkdir=%sdkdir% -+includedir=%includedir% -+libdir=%libdir% -+ -+Name: mozilla-gtkembedmoz -+Description: Mozilla Embedding Widget for Gtk+ -+Version: %MOZILLA_VERSION% -+Requires: libxul = %MOZILLA_VERSION% diff --git a/rhbz-855919.patch b/rhbz-855919.patch new file mode 100644 index 0000000..5315f57 --- /dev/null +++ b/rhbz-855919.patch @@ -0,0 +1,19 @@ +Index: mozilla-release/js/src/gc/Memory.cpp +=================================================================== +--- mozilla-release.orig/js/src/gc/Memory.cpp ++++ mozilla-release/js/src/gc/Memory.cpp +@@ -348,9 +348,14 @@ UnmapPages(void *p, size_t size) + bool + MarkPagesUnused(void *p, size_t size) + { ++// A workaround for Bug 746112 - endless loop on ppc64 ++#if !(defined(__powerpc__)) + JS_ASSERT(uintptr_t(p) % PageSize == 0); + int result = madvise(p, size, MADV_DONTNEED); + return result != -1; ++#else ++ return true; ++#endif + } + + bool diff --git a/xulrunner.spec b/xulrunner.spec index 6be9d8c..b9943d5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 15.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -87,9 +87,6 @@ Source21: %{name}.sh.in Patch0: xulrunner-version.patch Patch1: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch -%if 0%{?fedora} <= 15 -Patch16: add-gtkmozembed-11.0.patch -%endif Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-12.0-jemalloc-ppc.patch @@ -100,6 +97,7 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch49: mozilla-746112.patch Patch51: mozilla-709732-gfx-icc-profile-fix.patch +Patch52: rhbz-855919.patch # --------------------------------------------------- @@ -227,9 +225,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %patch1 -p1 -b .build %patch14 -p1 -b .chromium-types -%if 0%{?fedora} <= 15 -%patch16 -p2 -b .gtkmozembed -%endif %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc @@ -237,6 +232,7 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ %ifarch ppc ppc64 %patch49 -p2 -b .746112 +%patch52 -p1 -b .855919 %endif %patch51 -p1 -b .709732 @@ -509,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 17 2012 Martin Stransky - 15.0.1-3 +- Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 + * Fri Sep 14 2012 Martin Stransky - 15.0.1-2 - Added build flags for second arches From 00bca4036206c89cb5d2ad038be841fb92b0777f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 18 Sep 2012 13:15:45 +0200 Subject: [PATCH 046/239] removed unused patch --- xulrunner-omnijar-5.patch | 1324 ------------------------------------- 1 file changed, 1324 deletions(-) delete mode 100644 xulrunner-omnijar-5.patch diff --git a/xulrunner-omnijar-5.patch b/xulrunner-omnijar-5.patch deleted file mode 100644 index 4cf2ac2..0000000 --- a/xulrunner-omnijar-5.patch +++ /dev/null @@ -1,1324 +0,0 @@ -# HG changeset patch -# Parent a7dea879b4b445a23186f438900562155bb39e99 -Bug 620931 part 1 - Use chrome manifest to register resource://gre-resources/ - -diff -up xulrunner-5.0/mozilla-release/browser/locales/Makefile.in.omnijar xulrunner-5.0/mozilla-release/browser/locales/Makefile.in ---- xulrunner-5.0/mozilla-release/browser/locales/Makefile.in.omnijar 2011-06-15 23:57:18.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/browser/locales/Makefile.in 2011-06-21 13:16:56.434904620 +0200 -@@ -186,7 +186,7 @@ libs-%: - @$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1 - @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 - @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 -- @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1 -+ @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR) BOTH_MANIFESTS=1 - @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 - - -diff -up xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp.omnijar xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp ---- xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp.omnijar 2011-06-15 23:57:27.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/ipc/glue/GeckoChildProcessHost.cpp 2011-06-21 12:46:33.537167186 +0200 -@@ -492,16 +492,19 @@ GeckoChildProcessHost::PerformAsyncLaunc - - childArgv.insert(childArgv.end(), aExtraOpts.begin(), aExtraOpts.end()); - --#ifdef MOZ_OMNIJAR - // Make sure the child process can find the omnijar - // See XRE_InitCommandLine in nsAppRunner.cpp -- nsCAutoString omnijarPath; -- if (mozilla::OmnijarPath()) { -- mozilla::OmnijarPath()->GetNativePath(omnijarPath); -- childArgv.push_back("-omnijar"); -- childArgv.push_back(omnijarPath.get()); -+ nsCAutoString path; -+ nsCOMPtr file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE); -+ if (file && NS_SUCCEEDED(file->GetNativePath(path))) { -+ childArgv.push_back("-grebase"); -+ childArgv.push_back(path.get()); -+ } -+ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP); -+ if (file && NS_SUCCEEDED(file->GetNativePath(path))) { -+ childArgv.push_back("-appbase"); -+ childArgv.push_back(path.get()); - } --#endif - - childArgv.push_back(pidstring); - -@@ -604,16 +607,19 @@ GeckoChildProcessHost::PerformAsyncLaunc - - cmdLine.AppendLooseValue(std::wstring(mGroupId.get())); - --#ifdef MOZ_OMNIJAR - // Make sure the child process can find the omnijar - // See XRE_InitCommandLine in nsAppRunner.cpp -- nsAutoString omnijarPath; -- if (mozilla::OmnijarPath()) { -- mozilla::OmnijarPath()->GetPath(omnijarPath); -- cmdLine.AppendLooseValue(UTF8ToWide("-omnijar")); -- cmdLine.AppendLooseValue(omnijarPath.get()); -+ nsAutoString path; -+ nsCOMPtr file = mozilla::Omnijar::GetBase(mozilla::Omnijar::GRE); -+ if (file && NS_SUCCEEDED(file->GetPath(path))) { -+ cmdLine.AppendLooseValue(UTF8ToWide("-grebase")); -+ cmdLine.AppendLooseValue(path.get()); -+ } -+ file = mozilla::Omnijar::GetBase(mozilla::Omnijar::APP); -+ if (file && NS_SUCCEEDED(file->GetPath(path))) { -+ cmdLine.AppendLooseValue(UTF8ToWide("-appbase")); -+ cmdLine.AppendLooseValue(path.get()); - } --#endif - - cmdLine.AppendLooseValue(UTF8ToWide(pidstring)); - -diff -up xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp.omnijar xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp ---- xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp.omnijar 2011-06-15 23:57:31.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/js/src/xpconnect/loader/mozJSComponentLoader.cpp 2011-06-21 13:34:03.057293901 +0200 -@@ -86,6 +86,7 @@ - #include "nsILocalFileWin.h" - #endif - #include "xpcprivate.h" -+#include "nsIResProtocolHandler.h" - - #ifdef MOZ_ENABLE_LIBXUL - #include "mozilla/scache/StartupCache.h" -@@ -626,24 +627,11 @@ mozJSComponentLoader::LoadModuleFromJAR( - #if !defined(XPCONNECT_STANDALONE) - nsresult rv; - -- nsCAutoString fullSpec; -- --#ifdef MOZ_OMNIJAR -- PRBool equal; -- rv = aJarFile->Equals(mozilla::OmnijarPath(), &equal); -- if (NS_SUCCEEDED(rv) && equal) { -- fullSpec = "resource://gre/"; -- } else { --#endif -- nsCAutoString fileSpec; -- NS_GetURLSpecFromActualFile(aJarFile, fileSpec); -- fullSpec = "jar:"; -- fullSpec += fileSpec; -- fullSpec += "!/"; --#ifdef MOZ_OMNIJAR -- } --#endif -- -+ nsCAutoString fullSpec, fileSpec; -+ NS_GetURLSpecFromActualFile(aJarFile, fileSpec); -+ fullSpec = "jar:"; -+ fullSpec += fileSpec; -+ fullSpec += "!/"; - fullSpec += aComponentPath; - - nsCOMPtr uri; -@@ -827,47 +815,129 @@ class JSPrincipalsHolder - JSPrincipals *mPrincipals; - }; - -+static const char baseName[2][5] = { "gre/", "app/" }; -+ -+static inline PRBool -+canonicalizeBase(nsCAutoString &spec, nsACString &out, mozilla::Omnijar::Type aType) -+{ -+ nsCAutoString base; -+ nsresult rv = mozilla::Omnijar::GetURIString(aType, base); -+ -+ if (NS_FAILED(rv) || !base.Length()) -+ return PR_FALSE; -+ -+ if (base.Compare(spec.get(), PR_FALSE, base.Length())) -+ return PR_FALSE; -+ -+ out.Append("/resource/"); -+ out.Append(baseName[aType]); -+ out.Append(Substring(spec, base.Length())); -+ return PR_TRUE; -+} -+ - /** - * PathifyURI transforms mozilla .js uris into useful zip paths - * to make it makes it easier to manipulate startup cache entries - * using standard zip tools. - * Transformations applied: -- * * jsloader/ prefix is used to group mozJSComponentLoader cache entries in -+ * * jsloader/ prefix is used to group mozJSComponentLoader cache entries in - * a top-level zip directory. -- * * In MOZ_OMNIJAR case resource:/// and resource://gre/ URIs refer to the same path -- * so treat both of them as resource://gre/ -+ * * resource:// URIs are resolved to their corresponding file/jar URI to -+ * canonicalize resources URIs other than gre and app. -+ * * Paths under GRE or APP directory have their base path replaced with -+ * resource/gre or resource/app to avoid depending on install location. -+ * * jar:file:///path/to/file.jar!/sub/path urls are replaced with -+ * /path/to/file.jar/sub/path - * * .bin suffix is added to the end of the path to indicate that jsloader/ entries - * are binary representations of JS source. - * For example: -- * resource://gre/modules/XPCOMUtils.jsm becomes -- * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin -+ * resource://gre/modules/XPCOMUtils.jsm or -+ * file://$GRE_DIR/modules/XPCOMUtils.jsm or -+ * jar:file://$GRE_DIR/omni.jar!/modules/XPCOMUtils.jsm become -+ * jsloader/resource/gre/modules/XPCOMUtils.jsm.bin -+ * file://$PROFILE_DIR/extensions/{uuid}/components/component.js becomes -+ * jsloader/$PROFILE_DIR/extensions/%7Buuid%7D/components/component.js.bin -+ * jar:file://$PROFILE_DIR/extensions/some.xpi!/components/component.js becomes -+ * jsloader/$PROFILE_DIR/extensions/some.xpi/components/component.js.bin - */ - static nsresult - PathifyURI(nsIURI *in, nsACString &out) - { -- out = "jsloader/"; -- nsCAutoString scheme; -- nsresult rv = in->GetScheme(scheme); -- NS_ENSURE_SUCCESS(rv, rv); -- out.Append(scheme); -- nsCAutoString host; -- // OK for GetHost to fail since it's not implemented sometimes -- in->GetHost(host); --#ifdef MOZ_OMNIJAR -- if (scheme.Equals("resource") && host.Length() == 0){ -- host = "gre"; -- } --#endif -- if (host.Length()) { -- out.Append("/"); -- out.Append(host); -- } -- nsCAutoString path; -- rv = in->GetPath(path); -- NS_ENSURE_SUCCESS(rv, rv); -- out.Append(path); -- out.Append(".bin"); -- return NS_OK; -+ PRBool equals; -+ nsresult rv; -+ nsCOMPtr uri = in; -+ nsCAutoString spec; -+ -+ out = "jsloader"; -+ -+ // Resolve resource:// URIs. At the end of this if/else block, we -+ // have both spec and uri variables identifying the same URI. -+ if (NS_SUCCEEDED(in->SchemeIs("resource", &equals)) && equals) { -+ nsCOMPtr ioService = do_GetIOService(&rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCOMPtr ph; -+ rv = ioService->GetProtocolHandler("resource", getter_AddRefs(ph)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCOMPtr irph(do_QueryInterface(ph, &rv)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = irph->ResolveURI(in, spec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = ioService->NewURI(spec, nsnull, nsnull, getter_AddRefs(uri)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } else { -+ rv = in->GetSpec(spec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } -+ -+ if (!canonicalizeBase(spec, out, mozilla::Omnijar::GRE) && -+ !canonicalizeBase(spec, out, mozilla::Omnijar::APP)) { -+ if (NS_SUCCEEDED(uri->SchemeIs("file", &equals)) && equals) { -+ nsCOMPtr baseFileURL; -+ baseFileURL = do_QueryInterface(uri, &rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCAutoString path; -+ rv = baseFileURL->GetPath(path); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ out.Append(path); -+ } else if (NS_SUCCEEDED(uri->SchemeIs("jar", &equals)) && equals) { -+ nsCOMPtr jarURI = do_QueryInterface(uri, &rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCOMPtr jarFileURI; -+ rv = jarURI->GetJARFile(getter_AddRefs(jarFileURI)); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCOMPtr jarFileURL; -+ jarFileURL = do_QueryInterface(jarFileURI, &rv); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ nsCAutoString path; -+ rv = jarFileURL->GetPath(path); -+ NS_ENSURE_SUCCESS(rv, rv); -+ out.Append(path); -+ -+ rv = jarURI->GetJAREntry(path); -+ NS_ENSURE_SUCCESS(rv, rv); -+ out.Append("/"); -+ out.Append(path); -+ } else { // Very unlikely -+ nsCAutoString spec; -+ rv = uri->GetSpec(spec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ out.Append("/"); -+ out.Append(spec); -+ } -+ } -+ -+ out.Append(".bin"); -+ return NS_OK; - } - - /* static */ -diff -up xulrunner-5.0/mozilla-release/layout/style/jar.mn.omnijar xulrunner-5.0/mozilla-release/layout/style/jar.mn ---- xulrunner-5.0/mozilla-release/layout/style/jar.mn.omnijar 2011-06-15 23:57:39.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/layout/style/jar.mn 2011-06-21 12:46:33.530167305 +0200 -@@ -6,3 +6,5 @@ toolkit.jar: - * res/forms.css (forms.css) - res/arrow.gif (arrow.gif) - res/arrowd.gif (arrowd.gif) -+ -+% resource gre-resources %res/ -diff -up xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp.omnijar xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp ---- xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp.omnijar 2011-06-15 23:58:10.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/modules/libjar/nsJAR.cpp 2011-06-21 13:23:23.829895163 +0200 -@@ -177,16 +177,14 @@ nsJAR::Open(nsIFile* zipFile) - mOuterZipEntry.Truncate(); - mOpened = PR_TRUE; - --#ifdef MOZ_OMNIJAR - // The omnijar is special, it is opened early on and closed late - // this avoids reopening it -- PRBool equals; -- nsresult rv = zipFile->Equals(mozilla::OmnijarPath(), &equals); -- if (NS_SUCCEEDED(rv) && equals) { -- mZip = mozilla::OmnijarReader(); -+ nsZipArchive *zip = mozilla::Omnijar::GetReader(zipFile); -+ if (zip) { -+ mZip = zip; - return NS_OK; - } --#endif -+ - return mZip->OpenArchive(zipFile); - } - -@@ -235,13 +233,13 @@ nsJAR::Close() - mGlobalStatus = JAR_MANIFEST_NOT_PARSED; - mTotalItemsInManifest = 0; - --#ifdef MOZ_OMNIJAR -- if (mZip == mozilla::OmnijarReader()) { -+ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) || -+ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP))) { - mZip.forget(); - mZip = new nsZipArchive(); - return NS_OK; - } --#endif -+ - return mZip->CloseArchive(); - } - -@@ -392,12 +390,11 @@ nsJAR::GetCertificatePrincipal(const cha - return NS_ERROR_NULL_POINTER; - *aPrincipal = nsnull; - --#ifdef MOZ_OMNIJAR - // Don't check signatures in the omnijar - this is only - // interesting for extensions/XPIs. -- if (mZip == mozilla::OmnijarReader()) -+ if ((mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) || -+ (mZip == mozilla::Omnijar::GetReader(mozilla::Omnijar::APP))) - return NS_OK; --#endif - - //-- Parse the manifest - nsresult rv = ParseManifest(); -diff -up xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp.omnijar xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp ---- xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp.omnijar 2011-06-15 23:57:41.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/modules/libpref/src/nsPrefService.cpp 2011-06-21 12:46:33.545167043 +0200 -@@ -70,10 +70,8 @@ - - #include "nsITimelineService.h" - --#ifdef MOZ_OMNIJAR - #include "mozilla/Omnijar.h" - #include "nsZipArchive.h" --#endif - - // Definitions - #define INITIAL_PREF_FILES 10 -@@ -784,30 +782,6 @@ static nsresult pref_LoadPrefsInDirList( - return NS_OK; - } - --//---------------------------------------------------------------------------------------- --// Initialize default preference JavaScript buffers from --// appropriate TEXT resources --//---------------------------------------------------------------------------------------- --static nsresult pref_InitDefaults() --{ -- nsCOMPtr greprefsFile; -- nsresult rv; -- -- rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js")); -- NS_ENSURE_SUCCESS(rv, rv); -- -- rv = openPrefFile(greprefsFile); -- if (NS_FAILED(rv)) { -- NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?"); -- } -- -- return NS_OK; --} -- --#ifdef MOZ_OMNIJAR - static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name) - { - nsZipItemPtr manifest(jarReader, name, true); -@@ -821,77 +795,121 @@ static nsresult pref_ReadPrefFromJar(nsZ - return rv; - } - --static nsresult pref_InitAppDefaultsFromOmnijar() -+//---------------------------------------------------------------------------------------- -+// Initialize default preference JavaScript buffers from -+// appropriate TEXT resources -+//---------------------------------------------------------------------------------------- -+static nsresult pref_InitInitialObjects() - { - nsresult rv; - -- nsZipArchive* jarReader = mozilla::OmnijarReader(); -- if (!jarReader) -- return pref_InitDefaults(); -- -- rv = pref_ReadPrefFromJar(jarReader, "greprefs.js"); -- NS_ENSURE_SUCCESS(rv, rv); -+ // In omni.jar case, we load the following prefs: -+ // - jar:$gre/omni.jar!/greprefs.js -+ // - jar:$gre/omni.jar!/defaults/pref/*.js -+ // In non omni.jar case, we load: -+ // - $gre/greprefs.js -+ // -+ // When $app == $gre, we additionally load, in all cases: -+ // - $gre/defaults/pref/*.js -+ // This is kept for bug 591866 (channel-prefs.js should not be in omni.jar). -+ // We load all files instead of channel-prefs.js only to have the same -+ // behaviour as $app != $gre. -+ // -+ // When $app != $gre, we additionally load, in omni.jar case: -+ // - jar:$app/omni.jar!/defaults/preferences/*.js -+ // - $app/defaults/preferences/*.js -+ // and in non omni.jar case: -+ // - $app/defaults/preferences/*.js - - nsZipFind *findPtr; -- rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); -- NS_ENSURE_SUCCESS(rv, rv); -- -- nsAutoPtr find(findPtr); -- -+ nsAutoPtr find; - nsTArray prefEntries; - const char *entryName; - PRUint16 entryNameLen; -- while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { -- prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); -- } - -- prefEntries.Sort(); -- for (PRUint32 i = prefEntries.Length(); i--; ) { -- rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); -- if (NS_FAILED(rv)) -- NS_WARNING("Error parsing preferences."); -- } -+ nsZipArchive* jarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE); -+ if (jarReader) { -+ // Load jar:$gre/omni.jar!/greprefs.js -+ rv = pref_ReadPrefFromJar(jarReader, "greprefs.js"); -+ NS_ENSURE_SUCCESS(rv, rv); - -- return NS_OK; --} --#endif -+ // Load jar:$gre/omni.jar!/defaults/pref/*.js -+ rv = jarReader->FindInit("defaults/pref/*.js$", &findPtr); -+ NS_ENSURE_SUCCESS(rv, rv); - --static nsresult pref_InitInitialObjects() --{ -- nsresult rv; -+ find = findPtr; -+ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { -+ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); -+ } - -- // first we parse the GRE default prefs. This also works if we're not using a GRE, --#ifdef MOZ_OMNIJAR -- rv = pref_InitAppDefaultsFromOmnijar(); --#else -- rv = pref_InitDefaults(); --#endif -- NS_ENSURE_SUCCESS(rv, rv); -+ prefEntries.Sort(); -+ for (PRUint32 i = prefEntries.Length(); i--; ) { -+ rv = pref_ReadPrefFromJar(jarReader, prefEntries[i].get()); -+ if (NS_FAILED(rv)) -+ NS_WARNING("Error parsing preferences."); -+ } -+ } else { -+ // Load $gre/greprefs.js -+ nsCOMPtr greprefsFile; -+ rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile)); -+ NS_ENSURE_SUCCESS(rv, rv); - -- nsCOMPtr defaultPrefDir; -- // now parse the "application" default preferences -- rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); -- NS_ENSURE_SUCCESS(rv, rv); -+ rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js")); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ rv = openPrefFile(greprefsFile); -+ if (NS_FAILED(rv)) -+ NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?"); -+ } -+ -+ if (!mozilla::Omnijar::HasOmnijar(mozilla::Omnijar::APP)) { -+ // Load $gre/defaults/pref/*.js -+ nsCOMPtr defaultPrefDir; -+ -+ rv = NS_GetSpecialDirectory(NS_APP_PREF_DEFAULTS_50_DIR, getter_AddRefs(defaultPrefDir)); -+ NS_ENSURE_SUCCESS(rv, rv); - -- /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ -- static const char* specialFiles[] = { -+ /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */ -+ static const char* specialFiles[] = { - #if defined(XP_MAC) || defined(XP_MACOSX) - "macprefs.js" - #elif defined(XP_WIN) - "winpref.js" - #elif defined(XP_UNIX) - "unix.js" --#if defined(_AIX) -+#if defined(VMS) -+ , "openvms.js" -+#elif defined(_AIX) - , "aix.js" - #endif - #elif defined(XP_OS2) - "os2pref.js" -+#elif defined(XP_BEOS) -+ "beos.js" - #endif -- }; -+ }; - -- rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); -- if (NS_FAILED(rv)) { -- NS_WARNING("Error parsing application default preferences."); -+ rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles)); -+ if (NS_FAILED(rv)) -+ NS_WARNING("Error parsing application default preferences."); -+ } -+ -+ // Load jar:$app/omni.jar!/defaults/preferences/*.js -+ nsZipArchive *appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP); -+ if (appJarReader) { -+ rv = appJarReader->FindInit("defaults/preferences/*.js$", &findPtr); -+ NS_ENSURE_SUCCESS(rv, rv); -+ find = findPtr; -+ prefEntries.Clear(); -+ while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) { -+ prefEntries.AppendElement(Substring(entryName, entryName + entryNameLen)); -+ } -+ prefEntries.Sort(); -+ for (PRUint32 i = prefEntries.Length(); i--; ) { -+ rv = pref_ReadPrefFromJar(appJarReader, prefEntries[i].get()); -+ if (NS_FAILED(rv)) -+ NS_WARNING("Error parsing preferences."); -+ } - } - - rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST); -diff -up xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp.omnijar xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp ---- xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp.omnijar 2011-06-15 23:57:50.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/netwerk/protocol/res/nsResProtocolHandler.cpp 2011-06-21 13:30:07.167653046 +0200 -@@ -76,8 +76,8 @@ static nsResProtocolHandler *gResHandler - static PRLogModuleInfo *gResLog; - #endif - -+#define kAPP NS_LITERAL_CSTRING("app") - #define kGRE NS_LITERAL_CSTRING("gre") --#define kGRE_RESOURCES NS_LITERAL_CSTRING("gre-resources") - - //---------------------------------------------------------------------------- - // nsResURL : overrides nsStandardURL::GetFile to provide nsIFile resolution -@@ -155,20 +155,6 @@ nsResProtocolHandler::~nsResProtocolHand - } - - nsresult --nsResProtocolHandler::AddSpecialDir(const char* aSpecialDir, const nsACString& aSubstitution) --{ -- nsCOMPtr file; -- nsresult rv = NS_GetSpecialDirectory(aSpecialDir, getter_AddRefs(file)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- nsCOMPtr uri; -- rv = mIOService->NewFileURI(file, getter_AddRefs(uri)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- return SetSubstitution(aSubstitution, uri); --} -- --nsresult - nsResProtocolHandler::Init() - { - if (!mSubstitutions.Init(32)) -@@ -179,38 +165,39 @@ nsResProtocolHandler::Init() - mIOService = do_GetIOService(&rv); - NS_ENSURE_SUCCESS(rv, rv); - --#ifdef MOZ_OMNIJAR -- nsCOMPtr omniJar(mozilla::OmnijarPath()); -- if (omniJar) -- return Init(omniJar); --#endif -+ nsCAutoString appURI, greURI; -+ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::APP, appURI); -+ NS_ENSURE_SUCCESS(rv, rv); -+ rv = mozilla::Omnijar::GetURIString(mozilla::Omnijar::GRE, greURI); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ // -+ // make resource:/// point to the application directory or omnijar -+ // -+ nsCOMPtr uri; -+ rv = NS_NewURI(getter_AddRefs(uri), appURI.Length() ? appURI : greURI); -+ NS_ENSURE_SUCCESS(rv, rv); - -- // these entries should be kept in sync with the omnijar Init function -+ rv = SetSubstitution(EmptyCString(), uri); -+ NS_ENSURE_SUCCESS(rv, rv); - - // -- // make resource:/// point to the application directory -+ // make resource://app/ point to the application directory or omnijar - // -- rv = AddSpecialDir(NS_OS_CURRENT_PROCESS_DIR, EmptyCString()); -+ rv = SetSubstitution(kAPP, uri); - NS_ENSURE_SUCCESS(rv, rv); - - // - // make resource://gre/ point to the GRE directory - // -- rv = AddSpecialDir(NS_GRE_DIR, kGRE); -+ if (appURI.Length()) { // We already have greURI in uri if appURI.Length() is 0. -+ rv = NS_NewURI(getter_AddRefs(uri), greURI); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } -+ -+ rv = SetSubstitution(kGRE, uri); - NS_ENSURE_SUCCESS(rv, rv); - -- // make resource://gre-resources/ point to gre toolkit[.jar]/res -- nsCOMPtr greURI; -- nsCOMPtr greResURI; -- GetSubstitution(kGRE, getter_AddRefs(greURI)); --#ifdef MOZ_CHROME_FILE_FORMAT_JAR -- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "jar:chrome/toolkit.jar!/res/"); --#else -- NS_NAMED_LITERAL_CSTRING(strGRE_RES_URL, "chrome/toolkit/res/"); --#endif -- rv = mIOService->NewURI(strGRE_RES_URL, nsnull, greURI, -- getter_AddRefs(greResURI)); -- SetSubstitution(kGRE_RESOURCES, greResURI); - //XXXbsmedberg Neil wants a resource://pchrome/ for the profile chrome dir... - // but once I finish multiple chrome registration I'm not sure that it is needed - -@@ -220,40 +207,6 @@ nsResProtocolHandler::Init() - return rv; - } - --#ifdef MOZ_OMNIJAR --nsresult --nsResProtocolHandler::Init(nsIFile *aOmniJar) --{ -- nsresult rv; -- nsCOMPtr uri; -- nsCAutoString omniJarSpec; -- NS_GetURLSpecFromActualFile(aOmniJar, omniJarSpec, mIOService); -- -- nsCAutoString urlStr("jar:"); -- urlStr += omniJarSpec; -- urlStr += "!/"; -- -- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- // these entries should be kept in sync with the normal Init function -- -- // resource:/// points to jar:omni.jar!/ -- SetSubstitution(EmptyCString(), uri); -- -- // resource://gre/ points to jar:omni.jar!/ -- SetSubstitution(kGRE, uri); -- -- urlStr += "chrome/toolkit/res/"; -- rv = mIOService->NewURI(urlStr, nsnull, nsnull, getter_AddRefs(uri)); -- NS_ENSURE_SUCCESS(rv, rv); -- -- // resource://gre-resources/ points to jar:omni.jar!/chrome/toolkit/res/ -- SetSubstitution(kGRE_RESOURCES, uri); -- return NS_OK; --} --#endif -- - static PLDHashOperator - EnumerateSubstitution(const nsACString& aKey, - nsIURI* aURI, -diff -up xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp.omnijar xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp ---- xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp.omnijar 2011-06-15 23:57:54.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/startupcache/StartupCache.cpp 2011-06-21 13:10:46.687518879 +0200 -@@ -250,17 +250,26 @@ StartupCache::GetBuffer(const char* id, - } - } - --#ifdef MOZ_OMNIJAR -- if (mozilla::OmnijarReader()) { -+ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::APP)) { - // no need to checksum omnijarred entries -- nsZipItemPtr zipItem(mozilla::OmnijarReader(), id); -+ nsZipItemPtr zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::APP), id); - if (zipItem) { - *outbuf = zipItem.Forget(); - *length = zipItem.Length(); - return NS_OK; - } - } --#endif -+ -+ if (mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE)) { -+ // no need to checksum omnijarred entries -+ nsZipItemPtr zipItem(mozilla::Omnijar::GetReader(mozilla::Omnijar::GRE), id); -+ if (zipItem) { -+ *outbuf = zipItem.Forget(); -+ *length = zipItem.Length(); -+ return NS_OK; -+ } -+ } -+ - return NS_ERROR_NOT_AVAILABLE; - } - -diff -up xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk.omnijar xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk ---- xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk.omnijar 2011-06-15 23:58:10.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/mozapps/installer/packager.mk 2011-06-21 12:46:33.535167224 +0200 -@@ -397,7 +397,7 @@ OMNIJAR_FILES = \ - - NON_OMNIJAR_FILES += \ - chrome/icons/\* \ -- defaults/pref/channel-prefs.js \ -+ $(PREF_DIR)/channel-prefs.js \ - res/cursors/\* \ - res/MainMenu.nib/\* \ - $(NULL) -diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp ---- xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp.omnijar 2011-06-15 23:57:56.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/xre/nsAppRunner.cpp 2011-06-21 13:20:33.307973388 +0200 -@@ -3877,25 +3877,35 @@ XRE_InitCommandLine(int aArgc, char* aAr - delete[] canonArgs; - #endif - --#ifdef MOZ_OMNIJAR -- const char *omnijarPath = nsnull; -- ArgResult ar = CheckArg("omnijar", PR_FALSE, &omnijarPath); -+ const char *path = nsnull; -+ ArgResult ar = CheckArg("grebase", PR_FALSE, &path); - if (ar == ARG_BAD) { -- PR_fprintf(PR_STDERR, "Error: argument -omnijar requires an omnijar path\n"); -+ PR_fprintf(PR_STDERR, "Error: argument -grebase requires a path argument\n"); - return NS_ERROR_FAILURE; - } - -- if (!omnijarPath) -+ if (!path) - return rv; - -- nsCOMPtr omnijar; -- rv = NS_NewNativeLocalFile(nsDependentCString(omnijarPath), PR_TRUE, -- getter_AddRefs(omnijar)); -- if (NS_SUCCEEDED(rv)) -- mozilla::SetOmnijar(omnijar); --#endif -+ nsCOMPtr greBase; -+ rv = XRE_GetFileFromPath(path, getter_AddRefs(greBase)); -+ if (NS_FAILED(rv)) -+ return rv; - -- return rv; -+ ar = CheckArg("appbase", PR_FALSE, &path); -+ if (ar == ARG_BAD) { -+ PR_fprintf(PR_STDERR, "Error: argument -appbase requires a path argument\n"); -+ return NS_ERROR_FAILURE; -+ } -+ -+ nsCOMPtr appBase; -+ if (path) { -+ rv = XRE_GetFileFromPath(path, getter_AddRefs(appBase)); -+ if (NS_FAILED(rv)) -+ return rv; -+ } -+ -+ return mozilla::Omnijar::SetBase(greBase, appBase); - } - - nsresult -diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp ---- xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp.omnijar 2011-06-15 23:57:56.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/xre/nsEmbedFunctions.cpp 2011-06-21 12:46:33.558166809 +0200 -@@ -512,9 +512,7 @@ XRE_InitChildProcess(int aArgc, - // Allow ProcessChild to clean up after itself before going out of - // scope and being deleted - process->CleanUp(); --#ifdef MOZ_OMNIJAR -- mozilla::SetOmnijar(nsnull); --#endif -+ mozilla::Omnijar::SetBase(nsnull, nsnull); - } - } - -diff -up xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp.omnijar xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp ---- xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp.omnijar 2011-06-15 23:57:57.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/toolkit/xre/nsXREDirProvider.cpp 2011-06-21 12:46:33.575166505 +0200 -@@ -301,9 +301,6 @@ nsXREDirProvider::GetFile(const char* aP - if (NS_SUCCEEDED(rv)) - file = lf; - } -- else if (!strcmp(aProperty, "resource:app")) { -- rv = GetAppDir()->Clone(getter_AddRefs(file)); -- } - - else if (!strcmp(aProperty, NS_APP_PROFILE_DIR_STARTUP) && mProfileDir) { - return mProfileDir->Clone(aFile); -diff -up xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in ---- xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in.omnijar 2011-06-15 23:57:58.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/build/Makefile.in 2011-06-21 12:46:33.560166773 +0200 -@@ -69,6 +69,7 @@ CPPSRCS = \ - nsXPComInit.cpp \ - nsXPCOMStrings.cpp \ - Services.cpp \ -+ Omnijar.cpp \ - $(NULL) - - ifndef MOZ_ENABLE_LIBXUL -@@ -77,10 +78,6 @@ CPPSRCS += dlldeps.cpp - endif - endif - --ifdef MOZ_OMNIJAR --CPPSRCS += Omnijar.cpp --endif -- - SHARED_LIBRARY_LIBS = \ - $(DEPTH)/chrome/src/$(LIB_PREFIX)chrome_s.$(LIB_SUFFIX) \ - ../ds/$(LIB_PREFIX)xpcomds_s.$(LIB_SUFFIX) \ -diff -up xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp ---- xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp.omnijar 2011-06-15 23:58:00.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/build/nsXPComInit.cpp 2011-06-21 13:15:00.545014024 +0200 -@@ -457,25 +457,25 @@ NS_InitXPCOM2(nsIServiceManager* *result - if (NS_FAILED(rv)) return rv; - } - --#ifdef MOZ_OMNIJAR - NS_TIME_FUNCTION_MARK("Next: Omnijar init"); - -- if (!mozilla::OmnijarPath()) { -- nsCOMPtr omnijar; -+ if (!mozilla::Omnijar::IsInitialized()) { -+ nsCOMPtr greDir, appDir; - nsCOMPtr file; - -- rv = NS_ERROR_FAILURE; - nsDirectoryService::gService->Get(NS_GRE_DIR, - NS_GET_IID(nsIFile), -+ getter_AddRefs(file)); -+ greDir = do_QueryInterface(file); -+ -+ nsDirectoryService::gService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, -+ NS_GET_IID(nsIFile), - getter_AddRefs(file)); -- if (file) -- rv = file->Append(NS_LITERAL_STRING("omni.jar")); -- if (NS_SUCCEEDED(rv)) -- omnijar = do_QueryInterface(file); -- if (NS_SUCCEEDED(rv)) -- mozilla::SetOmnijar(omnijar); -+ appDir = do_QueryInterface(file); -+ -+ rv = mozilla::Omnijar::SetBase(greDir, appDir); -+ NS_ENSURE_SUCCESS(rv, rv); - } --#endif - - if ((sCommandLineWasInitialized = !CommandLine::IsInitialized())) { - NS_TIME_FUNCTION_MARK("Next: IPC command line init"); -@@ -755,9 +755,7 @@ ShutdownXPCOM(nsIServiceManager* servMgr - sExitManager = nsnull; - } - --#ifdef MOZ_OMNIJAR -- mozilla::SetOmnijar(nsnull); --#endif -+ mozilla::Omnijar::SetBase(nsnull, nsnull); - - NS_LogTerm(); - -diff -up xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp ---- xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp.omnijar 2011-06-15 23:57:58.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.cpp 2011-06-21 12:46:33.563166721 +0200 -@@ -21,6 +21,7 @@ - * - * Contributor(s): - * Michael Wu -+ * Mike Hommey - * - * 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 -@@ -38,64 +39,170 @@ - - #include "Omnijar.h" - --#include "nsILocalFile.h" --#include "nsXULAppAPI.h" -+#include "nsIFile.h" - #include "nsZipArchive.h" -+#include "nsNetUtil.h" - --static nsILocalFile* sOmnijarPath = nsnull; --static nsZipArchive* sOmnijarReader = nsnull; -+namespace mozilla { - --static void --SetupReader() -+nsIFile *Omnijar::sPath[2] = { nsnull, nsnull }; -+PRBool Omnijar::sIsOmnijar[2] = { PR_FALSE, PR_FALSE }; -+ -+#ifdef MOZ_ENABLE_LIBXUL -+nsZipArchive *Omnijar::sReader[2] = { nsnull, nsnull }; -+#endif -+ -+static already_AddRefed -+ComputePath(nsIFile *aPath, PRBool &aIsOmnijar) - { -- if (!sOmnijarPath) { -- return; -- } -+ PRBool isDir; -+ aIsOmnijar = PR_FALSE; -+ if (!aPath || NS_FAILED(aPath->IsDirectory(&isDir)) || !isDir) -+ return nsnull; -+ -+ nsCOMPtr path; -+#ifdef MOZ_ENABLE_LIBXUL -+ // Search for omni.jar in the given directory -+ if (!isDir || NS_FAILED(aPath->Clone(getter_AddRefs(path)))) -+ return nsnull; -+ -+ if (NS_FAILED(path->AppendNative(NS_LITERAL_CSTRING("omni.jar")))) -+ return nsnull; -+ -+ if (NS_FAILED(path->Exists(&aIsOmnijar))) -+ return nsnull; -+#endif - -- nsZipArchive* zipReader = new nsZipArchive(); -- if (!zipReader) { -- NS_IF_RELEASE(sOmnijarPath); -- return; -+ if (!aIsOmnijar && NS_FAILED(aPath->Clone(getter_AddRefs(path)))) -+ return nsnull; -+ -+ return path.forget(); -+} -+ -+nsresult -+Omnijar::SetBase(nsIFile *aGrePath, nsIFile *aAppPath) -+{ -+ NS_ABORT_IF_FALSE(aGrePath || !aAppPath, "Omnijar::SetBase(NULL, something) call forbidden"); -+ -+#ifdef MOZ_ENABLE_LIBXUL -+ if (sReader[GRE]) { -+ sReader[GRE]->CloseArchive(); -+ delete sReader[GRE]; -+ } -+ if (sReader[APP]) { -+ sReader[APP]->CloseArchive(); -+ delete sReader[APP]; - } -+ sReader[APP] = sReader[GRE] = nsnull; -+#endif - -- if (NS_FAILED(zipReader->OpenArchive(sOmnijarPath))) { -- delete zipReader; -- NS_IF_RELEASE(sOmnijarPath); -- return; -+ nsresult rv; -+ PRBool equals; -+ if (aAppPath) { -+ rv = aAppPath->Equals(aGrePath, &equals); -+ NS_ENSURE_SUCCESS(rv, rv); -+ } else { -+ equals = PR_TRUE; - } - -- sOmnijarReader = zipReader; -+ nsCOMPtr grePath = ComputePath(aGrePath, sIsOmnijar[GRE]); -+ nsCOMPtr appPath = ComputePath(equals ? nsnull : aAppPath, sIsOmnijar[APP]); -+ -+ NS_IF_RELEASE(sPath[GRE]); -+ sPath[GRE] = grePath; -+ NS_IF_ADDREF(sPath[GRE]); -+ -+ NS_IF_RELEASE(sPath[APP]); -+ sPath[APP] = appPath; -+ NS_IF_ADDREF(sPath[APP]); -+ -+ return NS_OK; - } - --nsILocalFile* --mozilla::OmnijarPath() -+already_AddRefed -+Omnijar::GetBase(Type aType) - { -- if (!sOmnijarReader) -- SetupReader(); -+ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); -+ -+ if (!sIsOmnijar[aType]) { -+ NS_IF_ADDREF(sPath[aType]); -+ return sPath[aType]; -+ } - -- return sOmnijarPath; -+ nsCOMPtr file, path; -+ if (NS_FAILED(sPath[aType]->Clone(getter_AddRefs(file)))) -+ return nsnull; -+ -+ if (NS_FAILED(file->GetParent(getter_AddRefs(path)))) -+ return nsnull; -+ return path.forget(); - } - --nsZipArchive* --mozilla::OmnijarReader() -+#ifdef MOZ_ENABLE_LIBXUL -+nsZipArchive * -+Omnijar::GetReader(Type aType) - { -- if (!sOmnijarReader) -- SetupReader(); -+ if (!sIsOmnijar[aType]) -+ return nsnull; - -- return sOmnijarReader; -+ if (sReader[aType]) -+ return sReader[aType]; -+ -+ nsZipArchive* zipReader = new nsZipArchive(); -+ if (!zipReader) -+ return nsnull; -+ -+ if (NS_FAILED(zipReader->OpenArchive(sPath[aType]))) { -+ delete zipReader; -+ return nsnull; -+ } -+ -+ return (sReader[aType] = zipReader); - } - --void --mozilla::SetOmnijar(nsILocalFile* aPath) -+nsZipArchive * -+Omnijar::GetReader(nsIFile *aPath) - { -- NS_IF_RELEASE(sOmnijarPath); -- if (sOmnijarReader) { -- sOmnijarReader->CloseArchive(); -- delete sOmnijarReader; -- sOmnijarReader = nsnull; -+ PRBool equals; -+ nsresult rv; -+ -+ if (sIsOmnijar[GRE]) { -+ rv = sPath[GRE]->Equals(aPath, &equals); -+ if (NS_SUCCEEDED(rv) && equals) -+ return GetReader(GRE); - } -+ if (sIsOmnijar[APP]) { -+ rv = sPath[APP]->Equals(aPath, &equals); -+ if (NS_SUCCEEDED(rv) && equals) -+ return GetReader(APP); -+ } -+ return nsnull; -+} -+#endif -+ -+nsresult -+Omnijar::GetURIString(Type aType, nsCString &result) -+{ -+ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); - -- sOmnijarPath = aPath; -- NS_IF_ADDREF(sOmnijarPath); -+ result = ""; -+ -+ if ((aType == APP) && (!sPath[APP])) -+ return NS_OK; -+ -+ nsCAutoString omniJarSpec; -+ nsresult rv = NS_GetURLSpecFromActualFile(sPath[aType], omniJarSpec); -+ NS_ENSURE_SUCCESS(rv, rv); -+ -+ if (sIsOmnijar[aType]) { -+ result = "jar:"; -+ result += omniJarSpec; -+ result += "!"; -+ } else { -+ result = omniJarSpec; -+ } -+ result += "/"; -+ return NS_OK; - } - -+} /* namespace mozilla */ -diff -up xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h.omnijar xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h ---- xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h.omnijar 2011-06-15 23:57:58.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/build/Omnijar.h 2011-06-21 12:46:33.564166703 +0200 -@@ -21,6 +21,7 @@ - * - * Contributor(s): - * Michael Wu -+ * Mike Hommey - * - * 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 -@@ -39,24 +40,132 @@ - #ifndef mozilla_Omnijar_h - #define mozilla_Omnijar_h - --class nsILocalFile; --class nsZipArchive; -+#include "nscore.h" -+#include "nsTArray.h" -+#include "nsCOMPtr.h" -+#include "nsString.h" - --#ifdef MOZ_OMNIJAR -+class nsIFile; -+class nsZipArchive; -+class nsIURI; - - namespace mozilla { - -+#ifdef MOZ_ENABLE_LIBXUL -+#define OMNIJAR_EXPORT -+#else -+#define OMNIJAR_EXPORT NS_EXPORT -+#endif -+ -+class OMNIJAR_EXPORT Omnijar { -+private: -+/** -+ * Store an nsIFile for either a base directory when there is no omni.jar, -+ * or omni.jar itself. We can store two paths here, one for GRE -+ * (corresponding to resource://gre/) and one for APP -+ * (corresponding to resource:/// and resource://app/), but only -+ * store one when both point to the same location (unified). -+ */ -+static nsIFile *sPath[2]; - /** -- * This returns the path to the omnijar. -- * If the omnijar isn't available, this function will return null. -- * Callers should fallback to flat packaging if null. -- */ --nsILocalFile *OmnijarPath(); --nsZipArchive *OmnijarReader(); --void SetOmnijar(nsILocalFile* aPath); -+ * Store whether the corresponding sPath is an omni.jar or a directory -+ */ -+static PRBool sIsOmnijar[2]; - --} /* namespace mozilla */ -+#ifdef MOZ_ENABLE_LIBXUL -+/** -+ * Cached nsZipArchives for the corresponding sPath -+ */ -+static nsZipArchive *sReader[2]; -+#endif -+ -+public: -+enum Type { -+ GRE = 0, -+ APP = 1 -+}; -+ -+/** -+ * Returns whether SetBase has been called at least once with -+ * a valid nsIFile -+ */ -+static PRBool -+IsInitialized() -+{ -+ // GRE path is always set after initialization. -+ return sPath[0] != nsnull; -+} -+ -+/** -+ * Sets the base directories for GRE and APP. APP base directory -+ * may be nsnull, in case the APP and GRE directories are the same. -+ */ -+static nsresult SetBase(nsIFile *aGrePath, nsIFile *aAppPath); -+ -+/** -+ * Returns an nsIFile pointing to the omni.jar file for GRE or APP. -+ * Returns nsnull when there is no corresponding omni.jar. -+ * Also returns nsnull for APP in the unified case. -+ */ -+static already_AddRefed -+GetPath(Type aType) -+{ -+ NS_ABORT_IF_FALSE(sPath[0], "Omnijar not initialized"); -+ -+ if (sIsOmnijar[aType]) { -+ NS_IF_ADDREF(sPath[aType]); -+ return sPath[aType]; -+ } -+ return nsnull; -+} -+ -+/** -+ * Returns whether GRE or APP use an omni.jar. Returns PR_False when -+ * using an omni.jar in the unified case. -+ */ -+static PRBool -+HasOmnijar(Type aType) -+{ -+ return sIsOmnijar[aType]; -+} -+ -+/** -+ * Returns the base directory for GRE or APP. In the unified case, -+ * returns nsnull for APP. -+ */ -+static already_AddRefed GetBase(Type aType); -+ -+/** -+ * Returns a nsZipArchive pointer for the omni.jar file for GRE or -+ * APP. Returns nsnull in the same cases GetPath() would. -+ */ -+#ifdef MOZ_ENABLE_LIBXUL -+static nsZipArchive *GetReader(Type aType); -+#else -+static nsZipArchive *GetReader(Type aType) { return nsnull; } -+#endif - --#endif /* MOZ_OMNIJAR */ -+/** -+ * Returns a nsZipArchive pointer for the given path IAOI the given -+ * path is the omni.jar for either GRE or APP. -+ */ -+#ifdef MOZ_ENABLE_LIBXUL -+static nsZipArchive *GetReader(nsIFile *aPath); -+#else -+static nsZipArchive *GetReader(nsIFile *aPath) { return nsnull; } -+#endif -+ -+/** -+ * Returns the URI string corresponding to the omni.jar or directory -+ * for GRE or APP. i.e. jar:/path/to/omni.jar!/ for omni.jar and -+ * /path/to/base/dir/ otherwise. Returns an empty string for APP in -+ * the unified case. -+ * The returned URI is guaranteed to end with a slash. -+ */ -+static nsresult GetURIString(Type aType, nsCString &result); -+ -+}; /* class Omnijar */ -+ -+} /* namespace mozilla */ - - #endif /* mozilla_Omnijar_h */ -diff -up xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp.omnijar xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp ---- xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp.omnijar 2011-06-15 23:58:01.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xpcom/components/nsComponentManager.cpp 2011-06-21 12:46:33.569166613 +0200 -@@ -174,8 +174,6 @@ NS_DEFINE_CID(kCategoryManagerCID, NS_CA - #define COMPMGR_TIME_FUNCTION_CONTRACTID(cid) do {} while (0) - #endif - --#define kOMNIJAR_PREFIX NS_LITERAL_CSTRING("resource:///") -- - nsresult - nsGetServiceFromCategory::operator()(const nsIID& aIID, void** aInstancePtr) const - { -@@ -385,14 +383,20 @@ nsresult nsComponentManagerImpl::Init() - for (PRUint32 i = 0; i < sStaticModules->Length(); ++i) - RegisterModule((*sStaticModules)[i], NULL); - --#ifdef MOZ_OMNIJAR -- if (mozilla::OmnijarPath()) { -- nsCOMPtr omnijarReader = new nsJAR(); -- rv = omnijarReader->Open(mozilla::OmnijarPath()); -- if (NS_SUCCEEDED(rv)) -- RegisterJarManifest(omnijarReader, "chrome.manifest", false); -+ nsCOMPtr appOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::APP); -+ if (appOmnijar) { -+ cl = sModuleLocations->InsertElementAt(1); // Insert after greDir -+ cl->type = NS_COMPONENT_LOCATION; -+ cl->location = do_QueryInterface(appOmnijar); -+ cl->jar = true; -+ } -+ nsCOMPtr greOmnijar = mozilla::Omnijar::GetPath(mozilla::Omnijar::GRE); -+ if (greOmnijar) { -+ cl = sModuleLocations->InsertElementAt(0); -+ cl->type = NS_COMPONENT_LOCATION; -+ cl->location = do_QueryInterface(greOmnijar); -+ cl->jar = true; - } --#endif - - for (PRUint32 i = 0; i < sModuleLocations->Length(); ++i) { - ComponentLocation& l = sModuleLocations->ElementAt(i); -@@ -407,15 +411,6 @@ nsresult nsComponentManagerImpl::Init() - RegisterJarManifest(reader, "chrome.manifest", false); - } - --#ifdef MOZ_OMNIJAR -- if (mozilla::OmnijarPath()) { -- cl = sModuleLocations->InsertElementAt(0); -- cl->type = NS_COMPONENT_LOCATION; -- cl->location = mozilla::OmnijarPath(); -- cl->jar = true; -- } --#endif -- - nsCategoryManager::GetSingleton()->SuppressNotifications(false); - - mStatus = NORMAL; -diff -up xulrunner-5.0/mozilla-release/xulrunner/confvars.sh.omnijar xulrunner-5.0/mozilla-release/xulrunner/confvars.sh ---- xulrunner-5.0/mozilla-release/xulrunner/confvars.sh.omnijar 2011-06-15 23:58:02.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/xulrunner/confvars.sh 2011-06-21 12:46:33.578166451 +0200 -@@ -41,6 +41,7 @@ MOZ_APP_DISPLAYNAME=XULRunner - MOZ_UPDATER=1 - MOZ_XULRUNNER=1 - MOZ_ENABLE_LIBXUL=1 -+MOZ_CHROME_FILE_FORMAT=omni - MOZ_STATIC_BUILD_UNSUPPORTED=1 - MOZ_APP_VERSION=$MOZILLA_VERSION - if test "$MOZ_STORAGE"; then From 0602e084761007f6cd2bb941b41c06b75c6cf720 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 27 Sep 2012 11:20:00 +0200 Subject: [PATCH 047/239] Rebuild with gcc to fix rhbz#830017 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index b9943d5..084125f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 15.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Sep 27 2012 Jan Horak - 15.0.1-4 +- Rebuild with latest gcc to fix rhbz#830017 + * Mon Sep 17 2012 Martin Stransky - 15.0.1-3 - Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 From 8e6cfdbad45a53d4878bf0fce7ba9ba553f0b79b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 8 Oct 2012 15:21:29 +0200 Subject: [PATCH 048/239] Update to 16.0 --- .gitignore | 1 + sources | 2 +- ...malloc-ppc.patch => xulrunner-16.0-jemalloc-ppc.patch | 4 ++-- xulrunner.spec | 9 ++++++--- 4 files changed, 10 insertions(+), 6 deletions(-) rename xulrunner-12.0-jemalloc-ppc.patch => xulrunner-16.0-jemalloc-ppc.patch (75%) diff --git a/.gitignore b/.gitignore index 8e15dcd..6c160f4 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-15.0b6.source.tar.bz2 /xulrunner-15.0.source.tar.bz2 /xulrunner-15.0.1.source.tar.bz2 +/xulrunner-16.0.source.tar.bz2 diff --git a/sources b/sources index a219e0f..b813249 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -743ba71fbce7b32023405db02d44143f xulrunner-15.0.1.source.tar.bz2 +04cbefaebaf77693bacd11145ece104f xulrunner-16.0.source.tar.bz2 diff --git a/xulrunner-12.0-jemalloc-ppc.patch b/xulrunner-16.0-jemalloc-ppc.patch similarity index 75% rename from xulrunner-12.0-jemalloc-ppc.patch rename to xulrunner-16.0-jemalloc-ppc.patch index 036f560..896a2c0 100644 --- a/xulrunner-12.0-jemalloc-ppc.patch +++ b/xulrunner-16.0-jemalloc-ppc.patch @@ -1,7 +1,7 @@ Index: xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c =================================================================== ---- xulrunner-11.0.orig/mozilla-release/memory/jemalloc/jemalloc.c -+++ xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c +--- xulrunner-11.0.orig/mozilla-release/memory/mozjemalloc/jemalloc.c ++++ xulrunner-11.0/mozilla-release/memory/mozjemalloc/jemalloc.c @@ -1089,7 +1089,9 @@ static unsigned ncpus; * controlling the malloc behavior are defined as compile-time constants * for best performance and cannot be altered at runtime. diff --git a/xulrunner.spec b/xulrunner.spec index b9943d5..e558412 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 15.0.1 -Release: 3%{?pre_tag}%{?dist} +Version: 16.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -89,7 +89,7 @@ Patch1: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 -Patch18: xulrunner-12.0-jemalloc-ppc.patch +Patch18: xulrunner-16.0-jemalloc-ppc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 1 2012 Martin Stransky - 16.1-1 +- Update to 16.0 + * Mon Sep 17 2012 Martin Stransky - 15.0.1-3 - Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 From 8518ced4d26139fdfc6cdc9532b024c32b27125e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 8 Oct 2012 15:42:57 +0200 Subject: [PATCH 049/239] changelog fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index e558412..3e861cc 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -505,7 +505,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Oct 1 2012 Martin Stransky - 16.1-1 +* Mon Oct 8 2012 Martin Stransky - 16.0-1 - Update to 16.0 * Mon Sep 17 2012 Martin Stransky - 15.0.1-3 From 18ce54b15db648c3dfa920a0e6081eb5d1d0e093 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 Oct 2012 11:50:05 +0200 Subject: [PATCH 050/239] build fixes --- xulrunner-install-dir.patch | 23 +++++++++++++++++++++++ xulrunner-version.patch | 13 ------------- xulrunner.spec | 11 ++++------- 3 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 xulrunner-install-dir.patch delete mode 100644 xulrunner-version.patch diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch new file mode 100644 index 0000000..e788fa0 --- /dev/null +++ b/xulrunner-install-dir.patch @@ -0,0 +1,23 @@ +diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/config/baseconfig.mk +--- mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/config/baseconfig.mk 2012-09-26 10:13:45.258240426 +0200 +@@ -2,7 +2,7 @@ INCLUDED_AUTOCONF_MK = 1 + + includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) + idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME) + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + DIST = $(DEPTH)/dist + +diff -up mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk +--- mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk 2012-09-26 10:14:07.353351833 +0200 +@@ -1,6 +1,6 @@ + INCLUDED_AUTOCONF_MK = 1 + +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME) + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + + ifneq (,$(filter /%,$(TOP_DIST))) diff --git a/xulrunner-version.patch b/xulrunner-version.patch deleted file mode 100644 index d08bde9..0000000 --- a/xulrunner-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -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* \ diff --git a/xulrunner.spec b/xulrunner.spec index 3e861cc..b04a358 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -35,12 +35,12 @@ # alpha_version should be set to the alpha number if using an alpha, 0 otherwise # beta_version should be set to the beta number if using a beta, 0 otherwise # rc_version should be set to the RC number if using an RC, 0 otherwise -%global gecko_dir_ver 2 +%global gecko_dir_ver %{version} %global alpha_version 0 %global beta_version 0 %global rc_version 0 -%global mozappdir %{_libdir}/%{name}-%{gecko_dir_ver} +%global mozappdir %{_libdir}/%{name} %global tarballdir mozilla-release # crash reporter work only on x86/x86_64 @@ -84,8 +84,8 @@ Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in # build patches -Patch0: xulrunner-version.patch Patch1: mozilla-build.patch +Patch2: xulrunner-install-dir.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 @@ -219,11 +219,8 @@ debug %{name}, you want to install %{name}-debuginfo instead. %setup -q -c cd %{tarballdir} -sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ - > version.patch -%{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch - %patch1 -p1 -b .build +%patch2 -p1 %patch14 -p1 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc From b8688eeff32afad3ac9bbd84dec40d9651d52a63 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 10 Oct 2012 11:00:08 +0200 Subject: [PATCH 051/239] Fixed xulrunner launch script --- xulrunner.sh.in | 10 +++++----- xulrunner.spec | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/xulrunner.sh.in b/xulrunner.sh.in index 8f76b27..534b840 100644 --- a/xulrunner.sh.in +++ b/xulrunner.sh.in @@ -46,17 +46,17 @@ case $XUL_ARCH in ;; 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 [ ! -x $XUL_LIB_DIR/xulrunner/xulrunner ]; then + if [ ! -x $SECONDARY_LIB_DIR/xulrunner/xulrunner ]; then + echo "Error: $XUL_LIB_DIR/xulrunner/xulrunner not found" if [ -d $SECONDARY_LIB_DIR ]; then - echo " $SECONDARY_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner not found" + echo " $SECONDARY_LIB_DIR/xulrunner/xulrunner not found" fi exit 1 fi XUL_LIB_DIR="$SECONDARY_LIB_DIR" fi -XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION" +XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner" XUL_PROGRAM="$XUL_DIST_BIN/xulrunner" ## diff --git a/xulrunner.spec b/xulrunner.spec index b04a358..d273c01 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 16.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -502,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Oct 10 2012 Martin Stransky - 16.0-2 +- Fixed xulrunner launch script + * Mon Oct 8 2012 Martin Stransky - 16.0-1 - Update to 16.0 From b2e14f89dfb9e52cfdfa3a800ab6fb69bf071743 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 11 Oct 2012 13:58:24 +0200 Subject: [PATCH 052/239] Update to 16.0.1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index b813249..e2b1e9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -04cbefaebaf77693bacd11145ece104f xulrunner-16.0.source.tar.bz2 +78e641c67dc4a40cb3f48fce3e782d41 xulrunner-16.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index d273c01..e7a4e06 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -72,8 +72,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 16.0 -Release: 2%{?pre_tag}%{?dist} +Version: 16.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -502,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tru Oct 11 2012 Martin Stransky - 16.0.1-1 +- Update to 16.0.1 + * Mon Oct 10 2012 Martin Stransky - 16.0-2 - Fixed xulrunner launch script From 7dba846d6daf85f4df585c44ca6385d1f04afc04 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 11 Oct 2012 14:00:29 +0200 Subject: [PATCH 053/239] Update to 16.0.1 --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index e7a4e06..ab60250 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -502,7 +502,7 @@ fi #--------------------------------------------------------------------- %changelog -* Tru Oct 11 2012 Martin Stransky - 16.0.1-1 +* Thu Oct 11 2012 Martin Stransky - 16.0.1-1 - Update to 16.0.1 * Mon Oct 10 2012 Martin Stransky - 16.0-2 From 9d9eab78e3cfb440b51b671f1af9bd92dd20e3bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 11 Oct 2012 22:15:12 +0200 Subject: [PATCH 054/239] fix sed expression --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ab60250..9433aa6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -326,7 +326,7 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" From bd4d14bb3f58958bcce4768009c69cb1540ab52b Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 16 Oct 2012 08:39:34 +0200 Subject: [PATCH 055/239] Fixed required nspr and nss version --- xulrunner.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 9433aa6..80af3ad 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,8 +21,8 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9 -%global nss_version 3.13.3 +%global nspr_version 4.9.2 +%global nss_version 3.13.5 %endif %if %{?system_sqlite} @@ -73,7 +73,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 16.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -502,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 16 2012 Jan Horak - 16.0.1-2 +- Fixed required nss and nspr version + * Thu Oct 11 2012 Martin Stransky - 16.0.1-1 - Update to 16.0.1 From 16f7721ec9acc7430180f362125a04e24e3d351d Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 16 Oct 2012 09:32:13 +0200 Subject: [PATCH 056/239] Use nss and nspr version from buildroot --- xulrunner.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 80af3ad..dbbfb32 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,12 +21,12 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9.2 -%global nss_version 3.13.5 +%global nspr_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) +%global nss_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif %if %{?system_sqlite} -%global sqlite_version 3.7.7.1 +%global sqlite_version 3.7.13 # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) %endif From ec23a95c1f74bdcbc31174e7b5d3bdcbe8d8dc71 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 16 Oct 2012 10:50:07 +0200 Subject: [PATCH 057/239] Use nss and nspr version from buildroot --- xulrunner.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index dbbfb32..580cb11 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,8 +21,10 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) +%global nspr_version 4.9.2 +%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) +%global nss_version 3.13.5 +%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif %if %{?system_sqlite} @@ -131,8 +133,8 @@ BuildRequires: libvpx-devel >= %{libvpx_version} Requires: mozilla-filesystem %if %{?system_nss} -Requires: nspr >= %{nspr_version} -Requires: nss >= %{nss_version} +Requires: nspr >= %{nspr_build_version} +Requires: nss >= %{nss_build_version} %endif Provides: gecko-libs = %{gecko_verrel} Provides: gecko-libs%{?_isa} = %{gecko_verrel} @@ -163,8 +165,8 @@ Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} Requires: xulrunner = %{version}-%{release} %if %{?system_nss} -Requires: nspr-devel >= %{nspr_version} -Requires: nss-devel >= %{nss_version} +Requires: nspr-devel >= %{nspr_build_version} +Requires: nss-devel >= %{nss_build_version} %endif %if %{?system_cairo} Requires: cairo-devel >= %{cairo_version} From 795c85db24166ff3817e92095378b4b9f715f8a0 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 26 Oct 2012 10:56:43 +0200 Subject: [PATCH 058/239] Update to 16.0.2 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6c160f4..03f3bec 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-15.0.source.tar.bz2 /xulrunner-15.0.1.source.tar.bz2 /xulrunner-16.0.source.tar.bz2 +/xulrunner-16.0.2.source.tar.bz2 diff --git a/sources b/sources index e2b1e9c..28f8d2b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -78e641c67dc4a40cb3f48fce3e782d41 xulrunner-16.0.1.source.tar.bz2 +1b360968ab05b2a59757d33514897915 xulrunner-16.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 580cb11..6957e32 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 16.0.1 -Release: 2%{?pre_tag}%{?dist} +Version: 16.0.2 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -504,6 +504,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Oct 26 2012 Jan Horak - 16.0.2-1 +- Update to 16.0.2 + * Tue Oct 16 2012 Jan Horak - 16.0.1-2 - Fixed required nss and nspr version From ef5d07b4dcb1b7f82ac970f330aae954cbb3b505 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 31 Oct 2012 12:47:10 +0100 Subject: [PATCH 059/239] * Wed Oct 31 2012 Martin Stransky - 16.0.2-1 - Updated mozilla-746112.patch for second arches - Removed unused one (rhbz#855919) --- mozilla-746112.patch | 115 +++++++++++++++++++++++++++++++------------ rhbz-855919.patch | 19 ------- xulrunner.spec | 12 ++--- 3 files changed, 89 insertions(+), 57 deletions(-) delete mode 100644 rhbz-855919.patch diff --git a/mozilla-746112.patch b/mozilla-746112.patch index 765f993..0370f3c 100644 --- a/mozilla-746112.patch +++ b/mozilla-746112.patch @@ -1,35 +1,86 @@ -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -@@ -167,7 +167,7 @@ struct ByteTerm { - inputPosition = inputPos; - } +diff -up mozilla-release/js/src/gc/Heap.h.746112 mozilla-release/js/src/gc/Heap.h +--- mozilla-release/js/src/gc/Heap.h.746112 2012-10-24 16:32:52.000000000 +0200 ++++ mozilla-release/js/src/gc/Heap.h 2012-10-31 12:44:02.400733198 +0100 +@@ -103,26 +103,31 @@ struct Cell + }; -- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(false) -@@ -188,7 +188,7 @@ struct ByteTerm { - atom.quantityCount = 1; - } + /* +- * Page size is 4096 by default, except for SPARC, where it is 8192. ++ * Page size must be static to support our arena pointer optimizations, so we ++ * are forced to support each platform with non-4096 pages as a special case. ++ * Note: The freelist supports a maximum arena shift of 15. + * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. + * Bug 692267: Move page size definition to gc/Memory.h and include it + * directly once jsgc.h is no longer an installed header. + */ + #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) + const size_t PageShift = 13; ++const size_t ArenaShift = PageShift; ++#elif defined(__powerpc__) ++const size_t PageShift = 16; ++const size_t ArenaShift = 12; + #else + const size_t PageShift = 12; ++const size_t ArenaShift = PageShift; + #endif + const size_t PageSize = size_t(1) << PageShift; ++const size_t ArenaSize = size_t(1) << ArenaShift; ++const size_t ArenaMask = ArenaSize - 1; -- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -@@ -171,7 +171,7 @@ struct PatternTerm { - quantityCount = 1; - } + const size_t ChunkShift = 20; + const size_t ChunkSize = size_t(1) << ChunkShift; + const size_t ChunkMask = ChunkSize - 1; -- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) -+ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) +-const size_t ArenaShift = PageShift; +-const size_t ArenaSize = PageSize; +-const size_t ArenaMask = ArenaSize - 1; +- + /* + * This is the maximum number of arenas we allow in the FreeCommitted state + * before we trigger a GC_SHRINK to release free arenas to the OS. +diff -up mozilla-release/js/src/jsgc.cpp.746112 mozilla-release/js/src/jsgc.cpp +--- mozilla-release/js/src/jsgc.cpp.746112 2012-10-24 16:32:54.000000000 +0200 ++++ mozilla-release/js/src/jsgc.cpp 2012-10-31 12:42:50.681735540 +0100 +@@ -194,6 +194,13 @@ const uint32_t Arena::FirstThingOffsets[ + + #undef OFFSET + ++/* Unused memory decommiting requires the arena size match the page size. */ ++static bool ++DecommitEnabled() ++{ ++ return PageSize == ArenaSize; ++} ++ + #ifdef DEBUG + void + ArenaHeader::checkSynchronizedWithFreeList() const +@@ -677,7 +684,8 @@ Chunk::fetchNextDecommittedArena() + decommittedArenas.unset(offset); + + Arena *arena = &arenas[offset]; +- MarkPagesInUse(arena, ArenaSize); ++ if (DecommitEnabled()) ++ MarkPagesInUse(arena, ArenaSize); + arena->aheader.setAsNotAllocated(); + + return &arena->aheader; +@@ -2634,7 +2642,7 @@ DecommitArenasFromAvailableList(JSRuntim + chunk->removeFromAvailableList(); + + size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); +- bool ok; ++ bool ok = true; + { + /* + * If the main thread waits for the decommit to finish, skip +@@ -2644,7 +2652,8 @@ DecommitArenasFromAvailableList(JSRuntim + Maybe maybeUnlock; + if (!rt->isHeapBusy()) + maybeUnlock.construct(rt); +- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); ++ if (DecommitEnabled()) ++ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); + } + + if (ok) { diff --git a/rhbz-855919.patch b/rhbz-855919.patch deleted file mode 100644 index 5315f57..0000000 --- a/rhbz-855919.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: mozilla-release/js/src/gc/Memory.cpp -=================================================================== ---- mozilla-release.orig/js/src/gc/Memory.cpp -+++ mozilla-release/js/src/gc/Memory.cpp -@@ -348,9 +348,14 @@ UnmapPages(void *p, size_t size) - bool - MarkPagesUnused(void *p, size_t size) - { -+// A workaround for Bug 746112 - endless loop on ppc64 -+#if !(defined(__powerpc__)) - JS_ASSERT(uintptr_t(p) % PageSize == 0); - int result = madvise(p, size, MADV_DONTNEED); - return result != -1; -+#else -+ return true; -+#endif - } - - bool diff --git a/xulrunner.spec b/xulrunner.spec index 6957e32..eb5d47d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 16.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,7 +99,6 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch49: mozilla-746112.patch Patch51: mozilla-709732-gfx-icc-profile-fix.patch -Patch52: rhbz-855919.patch # --------------------------------------------------- @@ -229,10 +228,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk -%ifarch ppc ppc64 -%patch49 -p2 -b .746112 -%patch52 -p1 -b .855919 -%endif +%patch49 -p1 -b .746112 %patch51 -p1 -b .709732 %{__rm} -f .mozconfig @@ -504,6 +500,10 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 31 2012 Martin Stransky - 16.0.2-1 +- Updated mozilla-746112.patch for second arches +- Removed unused one (rhbz#855919) + * Fri Oct 26 2012 Jan Horak - 16.0.2-1 - Update to 16.0.2 From b20671cea61761f9254ed68136dcc7e4ab7b129f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 6 Nov 2012 15:29:25 +0100 Subject: [PATCH 060/239] Added fix for rhbz#872752 --- rhbz-872752.patch | 22 ++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 rhbz-872752.patch diff --git a/rhbz-872752.patch b/rhbz-872752.patch new file mode 100644 index 0000000..86bfdd7 --- /dev/null +++ b/rhbz-872752.patch @@ -0,0 +1,22 @@ +diff -up mozilla-beta/xulrunner/installer/libxul-embedding.pc.in.embedlink mozilla-beta/xulrunner/installer/libxul-embedding.pc.in +--- mozilla-beta/xulrunner/installer/libxul-embedding.pc.in.embedlink 2012-11-06 14:51:44.000000000 +0100 ++++ mozilla-beta/xulrunner/installer/libxul-embedding.pc.in 2012-11-06 14:58:04.560608699 +0100 +@@ -7,5 +7,5 @@ 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 ++Libs: -L${sdkdir}/lib -lxpcomglue -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +diff -up mozilla-beta/xulrunner/installer/Makefile.in.embedlink mozilla-beta/xulrunner/installer/Makefile.in +--- mozilla-beta/xulrunner/installer/Makefile.in.embedlink 2012-11-06 14:51:44.528600028 +0100 ++++ mozilla-beta/xulrunner/installer/Makefile.in 2012-11-06 14:51:44.535600028 +0100 +@@ -64,7 +64,7 @@ FULL_NSPR_LIBS=$(subst $(prefix),\$${sdk + NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version) + endif + +-MOZ_XUL_LINK = -lxpcomglue_s -lxul -lxpcom -lmozalloc ++MOZ_XUL_LINK = -lxpcomglue_s -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -lxul -lxpcom -lmozalloc + ifdef JS_SHARED_LIBRARY + MOZ_JS_LINK = -lmozjs + else diff --git a/xulrunner.spec b/xulrunner.spec index eb5d47d..eb15807 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 16.0.2 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -95,6 +95,7 @@ Patch18: xulrunner-16.0-jemalloc-ppc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch +Patch21: rhbz-872752.patch # Upstream patches Patch49: mozilla-746112.patch @@ -227,6 +228,7 @@ cd %{tarballdir} %patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk +%patch21 -p1 -b .872752 %patch49 -p1 -b .746112 %patch51 -p1 -b .709732 @@ -500,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 6 2012 Martin Stransky - 16.0.2-2 +- Added fix for rhbz#872752 + * Wed Oct 31 2012 Martin Stransky - 16.0.2-1 - Updated mozilla-746112.patch for second arches - Removed unused one (rhbz#855919) From 106e8d0a7e42834637e16fff40b1d4bd6fcf2162 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Nov 2012 11:55:24 +0100 Subject: [PATCH 061/239] Update to 17.0 Beta 5 --- .gitignore | 1 + mozilla-709732-gfx-icc-profile-fix.patch | 21 ----- mozilla-746112.patch | 115 +++++++---------------- mozilla-build.patch | 17 ++-- rhbz-872752.patch | 58 +++++++----- sources | 2 +- xulrunner.spec | 35 ++++--- 7 files changed, 101 insertions(+), 148 deletions(-) delete mode 100644 mozilla-709732-gfx-icc-profile-fix.patch diff --git a/.gitignore b/.gitignore index 03f3bec..0ae7936 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-15.0.1.source.tar.bz2 /xulrunner-16.0.source.tar.bz2 /xulrunner-16.0.2.source.tar.bz2 +/xulrunner-17.0b5.source.tar.bz2 diff --git a/mozilla-709732-gfx-icc-profile-fix.patch b/mozilla-709732-gfx-icc-profile-fix.patch deleted file mode 100644 index 7e268d0..0000000 --- a/mozilla-709732-gfx-icc-profile-fix.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -r dd29535bac5f gfx/thebes/gfxPlatformGtk.cpp ---- a/gfx/thebes/gfxPlatformGtk.cpp Sat May 05 20:22:53 2012 -0700 -+++ b/gfx/thebes/gfxPlatformGtk.cpp Wed May 09 11:42:21 2012 +0200 -@@ -538,16 +538,10 @@ - if (iccAtom) { - // read once to get size, once for the data - if (Success == XGetWindowProperty(dpy, root, iccAtom, -- 0, 0 /* length */, -+ 0, INT_MAX /* length */, - False, AnyPropertyType, - &retAtom, &retFormat, &retLength, - &retAfter, &retProperty)) { -- XGetWindowProperty(dpy, root, iccAtom, -- 0, retLength, -- False, AnyPropertyType, -- &retAtom, &retFormat, &retLength, -- &retAfter, &retProperty); -- - qcms_profile* profile = NULL; - - if (retLength > 0) diff --git a/mozilla-746112.patch b/mozilla-746112.patch index 0370f3c..765f993 100644 --- a/mozilla-746112.patch +++ b/mozilla-746112.patch @@ -1,86 +1,35 @@ -diff -up mozilla-release/js/src/gc/Heap.h.746112 mozilla-release/js/src/gc/Heap.h ---- mozilla-release/js/src/gc/Heap.h.746112 2012-10-24 16:32:52.000000000 +0200 -+++ mozilla-release/js/src/gc/Heap.h 2012-10-31 12:44:02.400733198 +0100 -@@ -103,26 +103,31 @@ struct Cell - }; +Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h +=================================================================== +--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h ++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h +@@ -167,7 +167,7 @@ struct ByteTerm { + inputPosition = inputPos; + } - /* -- * Page size is 4096 by default, except for SPARC, where it is 8192. -+ * Page size must be static to support our arena pointer optimizations, so we -+ * are forced to support each platform with non-4096 pages as a special case. -+ * Note: The freelist supports a maximum arena shift of 15. - * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. - * Bug 692267: Move page size definition to gc/Memory.h and include it - * directly once jsgc.h is no longer an installed header. - */ - #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) - const size_t PageShift = 13; -+const size_t ArenaShift = PageShift; -+#elif defined(__powerpc__) -+const size_t PageShift = 16; -+const size_t ArenaShift = 12; - #else - const size_t PageShift = 12; -+const size_t ArenaShift = PageShift; - #endif - const size_t PageSize = size_t(1) << PageShift; -+const size_t ArenaSize = size_t(1) << ArenaShift; -+const size_t ArenaMask = ArenaSize - 1; +- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) ++ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(false) +@@ -188,7 +188,7 @@ struct ByteTerm { + atom.quantityCount = 1; + } - const size_t ChunkShift = 20; - const size_t ChunkSize = size_t(1) << ChunkShift; - const size_t ChunkMask = ChunkSize - 1; +- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) ++ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(invert) +Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h +=================================================================== +--- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h ++++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h +@@ -171,7 +171,7 @@ struct PatternTerm { + quantityCount = 1; + } --const size_t ArenaShift = PageShift; --const size_t ArenaSize = PageSize; --const size_t ArenaMask = ArenaSize - 1; -- - /* - * This is the maximum number of arenas we allow in the FreeCommitted state - * before we trigger a GC_SHRINK to release free arenas to the OS. -diff -up mozilla-release/js/src/jsgc.cpp.746112 mozilla-release/js/src/jsgc.cpp ---- mozilla-release/js/src/jsgc.cpp.746112 2012-10-24 16:32:54.000000000 +0200 -+++ mozilla-release/js/src/jsgc.cpp 2012-10-31 12:42:50.681735540 +0100 -@@ -194,6 +194,13 @@ const uint32_t Arena::FirstThingOffsets[ - - #undef OFFSET - -+/* Unused memory decommiting requires the arena size match the page size. */ -+static bool -+DecommitEnabled() -+{ -+ return PageSize == ArenaSize; -+} -+ - #ifdef DEBUG - void - ArenaHeader::checkSynchronizedWithFreeList() const -@@ -677,7 +684,8 @@ Chunk::fetchNextDecommittedArena() - decommittedArenas.unset(offset); - - Arena *arena = &arenas[offset]; -- MarkPagesInUse(arena, ArenaSize); -+ if (DecommitEnabled()) -+ MarkPagesInUse(arena, ArenaSize); - arena->aheader.setAsNotAllocated(); - - return &arena->aheader; -@@ -2634,7 +2642,7 @@ DecommitArenasFromAvailableList(JSRuntim - chunk->removeFromAvailableList(); - - size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); -- bool ok; -+ bool ok = true; - { - /* - * If the main thread waits for the decommit to finish, skip -@@ -2644,7 +2652,8 @@ DecommitArenasFromAvailableList(JSRuntim - Maybe maybeUnlock; - if (!rt->isHeapBusy()) - maybeUnlock.construct(rt); -- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); -+ if (DecommitEnabled()) -+ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); - } - - if (ok) { +- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) ++ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) + : type(type) + , m_capture(capture) + , m_invert(invert) diff --git a/mozilla-build.patch b/mozilla-build.patch index be1ba4b..9468e02 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,7 +1,7 @@ -diff -up mozilla-beta/security/manager/Makefile.in.build mozilla-beta/security/manager/Makefile.in ---- mozilla-beta/security/manager/Makefile.in.build 2012-03-09 01:39:56.000000000 +0100 -+++ mozilla-beta/security/manager/Makefile.in 2012-03-09 13:56:28.612328083 +0100 -@@ -174,7 +174,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +diff -up mozilla-aurora-7676a9a06403/security/build/Makefile.in.build mozilla-aurora-7676a9a06403/security/build/Makefile.in +--- mozilla-aurora-7676a9a06403/security/build/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/security/build/Makefile.in 2012-09-18 10:58:45.560063613 +0200 +@@ -139,7 +139,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 @@ -9,10 +9,11 @@ diff -up mozilla-beta/security/manager/Makefile.in.build mozilla-beta/security/m DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" ifndef MOZ_NATIVE_SQLITE DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3 -diff -up mozilla-beta/security/manager/ssl/src/Makefile.in.build mozilla-beta/security/manager/ssl/src/Makefile.in ---- mozilla-beta/security/manager/ssl/src/Makefile.in.build 2012-03-09 01:39:56.000000000 +0100 -+++ mozilla-beta/security/manager/ssl/src/Makefile.in 2012-03-09 13:57:37.055657208 +0100 -@@ -116,7 +116,6 @@ CSRCS += md4.c +diff -up mozilla-aurora-7676a9a06403/security/manager/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/Makefile.in +diff -up mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in +--- mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in 2012-09-18 10:54:16.310505794 +0200 +@@ -84,7 +84,6 @@ CSRCS += md4.c EXTRA_DEPS = $(NSS_DEP_LIBS) DEFINES += \ diff --git a/rhbz-872752.patch b/rhbz-872752.patch index 86bfdd7..63404c7 100644 --- a/rhbz-872752.patch +++ b/rhbz-872752.patch @@ -1,22 +1,38 @@ -diff -up mozilla-beta/xulrunner/installer/libxul-embedding.pc.in.embedlink mozilla-beta/xulrunner/installer/libxul-embedding.pc.in ---- mozilla-beta/xulrunner/installer/libxul-embedding.pc.in.embedlink 2012-11-06 14:51:44.000000000 +0100 -+++ mozilla-beta/xulrunner/installer/libxul-embedding.pc.in 2012-11-06 14:58:04.560608699 +0100 -@@ -7,5 +7,5 @@ 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 -+Libs: -L${sdkdir}/lib -lxpcomglue -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl - Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% -diff -up mozilla-beta/xulrunner/installer/Makefile.in.embedlink mozilla-beta/xulrunner/installer/Makefile.in ---- mozilla-beta/xulrunner/installer/Makefile.in.embedlink 2012-11-06 14:51:44.528600028 +0100 -+++ mozilla-beta/xulrunner/installer/Makefile.in 2012-11-06 14:51:44.535600028 +0100 -@@ -64,7 +64,7 @@ FULL_NSPR_LIBS=$(subst $(prefix),\$${sdk - NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version) - endif +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in.orig 2012-11-05 11:17:57.000000000 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in 2012-11-05 11:56:22.513385775 +0100 +@@ -46,6 +46,7 @@ --MOZ_XUL_LINK = -lxpcomglue_s -lxul -lxpcom -lmozalloc -+MOZ_XUL_LINK = -lxpcomglue_s -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -lxul -lxpcom -lmozalloc - ifdef JS_SHARED_LIBRARY - MOZ_JS_LINK = -lmozjs - else + pkg_config_files = \ + libxul.pc \ ++ libxul-embedding-lib.pc \ + libxul-embedding.pc \ + mozilla-js.pc \ + mozilla-plugin.pc \ +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in.orig 2012-11-05 11:59:31.493626458 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in 2012-11-05 12:01:03.547230893 +0100 +@@ -0,0 +1,11 @@ ++prefix=%prefix% ++sdkdir=%sdkdir% ++includedir=%includedir% ++idldir=%idldir% ++ ++Name: libxul-embedding-lib ++Description: Static library for version-independent embedding of the Mozilla runtime for libraries ++Version: %MOZILLA_VERSION% ++Requires: %NSPR_NAME% >= %NSPR_VERSION% ++Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% +--- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in.fixembed 2012-11-05 11:17:57.227491778 +0100 ++++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in 2012-11-05 12:01:56.140574788 +0100 +@@ -4,8 +4,8 @@ + idldir=%idldir% + + Name: libxul-embedding +-Description: Static library for version-independent embedding of the Mozilla runtime ++Description: Static library for version-independent embedding of the Mozilla runtime for applications + Version: %MOZILLA_VERSION% +-Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++Requires: %NSPR_NAME% >= %NSPR_VERSION% , libxul-embedding-lib = %MOZILLA_VERSION% ++Libs: -L${sdkdir}/lib -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl -rdynamic + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/sources b/sources index 28f8d2b..256857d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1b360968ab05b2a59757d33514897915 xulrunner-16.0.2.source.tar.bz2 +a8f85eeca782e1d0f8b784bd11638069 xulrunner-17.0b5.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index eb15807..053df17 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -39,7 +39,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver %{version} %global alpha_version 0 -%global beta_version 0 +%global beta_version 5 %global rc_version 0 %global mozappdir %{_libdir}/%{name} @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 16.0.2 -Release: 3%{?pre_tag}%{?dist} +Version: 17.0 +Release: 0.1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -86,8 +86,9 @@ Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in # build patches -Patch1: mozilla-build.patch -Patch2: xulrunner-install-dir.patch +Patch0: xulrunner-version.patch +Patch1: xulrunner-install-dir.patch +Patch2: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 @@ -95,11 +96,9 @@ Patch18: xulrunner-16.0-jemalloc-ppc.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch21: rhbz-872752.patch # Upstream patches Patch49: mozilla-746112.patch -Patch51: mozilla-709732-gfx-icc-profile-fix.patch # --------------------------------------------------- @@ -221,17 +220,19 @@ debug %{name}, you want to install %{name}-debuginfo instead. %setup -q -c cd %{tarballdir} -%patch1 -p1 -b .build -%patch2 -p1 +sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ + > version.patch +%{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch + +%patch1 -p1 +%patch2 -p1 -b .build %patch14 -p1 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk -%patch21 -p1 -b .872752 -%patch49 -p1 -b .746112 -%patch51 -p1 -b .709732 +%patch49 -p2 -b .746112 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -321,12 +322,12 @@ cd %{tarballdir} # Disable C++ exceptions since Mozilla code is not exception-safe # MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ - %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g') + %{__sed} -e 's/-Wall//') %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" @@ -489,6 +490,9 @@ fi %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif %endif +%exclude %{mozappdir}/components/.mkdir.done +%exclude %{mozappdir}/defaults/pref/.mkdir.done +%exclude %{mozappdir}/modules/.mkdir.done %files devel %defattr(-,root,root,-) @@ -502,6 +506,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 13 2012 Martin Stransky - 17.0-0.1b5 +- Update to 17.0 Beta 5 + * Tue Nov 6 2012 Martin Stransky - 16.0.2-2 - Added fix for rhbz#872752 From 918b77d5f94d9a3fe99d8a3608549960c701ef66 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 13 Nov 2012 12:27:03 +0100 Subject: [PATCH 062/239] removed unused patch --- xulrunner.spec | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 053df17..abcb3c6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -86,7 +86,6 @@ Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in # build patches -Patch0: xulrunner-version.patch Patch1: xulrunner-install-dir.patch Patch2: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch @@ -220,10 +219,6 @@ debug %{name}, you want to install %{name}-debuginfo instead. %setup -q -c cd %{tarballdir} -sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ - > version.patch -%{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch - %patch1 -p1 %patch2 -p1 -b .build %patch14 -p1 -b .chromium-types From 74228c06c1878b7a482d4c0b7c35f551391d468f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 14 Nov 2012 16:40:47 +0100 Subject: [PATCH 063/239] Update to 17.0 Beta 6 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0ae7936..1ad82ea 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-16.0.source.tar.bz2 /xulrunner-16.0.2.source.tar.bz2 /xulrunner-17.0b5.source.tar.bz2 +/xulrunner-17.0b6.source.tar.bz2 diff --git a/sources b/sources index 256857d..d815308 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a8f85eeca782e1d0f8b784bd11638069 xulrunner-17.0b5.source.tar.bz2 +95ee4ffd2520e2419b5e093bd5b7f5a2 xulrunner-17.0b6.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index abcb3c6..fc35a31 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -39,7 +39,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver %{version} %global alpha_version 0 -%global beta_version 5 +%global beta_version 6 %global rc_version 0 %global mozappdir %{_libdir}/%{name} @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 0.1%{?pre_tag}%{?dist} +Release: 0.2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -501,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Nov 14 2012 Martin Stransky - 17.0-0.2b6 +- Update to 17.0 Beta 6 + * Tue Nov 13 2012 Martin Stransky - 17.0-0.1b5 - Update to 17.0 Beta 5 From 93dc9b1f493da421b54d5527b098f3390c5a2b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Sun, 18 Nov 2012 13:39:00 +0100 Subject: [PATCH 064/239] fix sed expression --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index fc35a31..e2b717f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -322,7 +322,7 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" From cba7748c842bb5432a927cf8391e5a4f50e665b3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 Nov 2012 10:14:38 +0100 Subject: [PATCH 065/239] Update to 17.0 --- .gitignore | 2 ++ sources | 2 +- xulrunner.spec | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 1ad82ea..516cd0e 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,5 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-16.0.2.source.tar.bz2 /xulrunner-17.0b5.source.tar.bz2 /xulrunner-17.0b6.source.tar.bz2 +/firefox-17.0.source.tar.bz2 +/xulrunner-17.0.source.tar.bz2 diff --git a/sources b/sources index d815308..ebbc136 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -95ee4ffd2520e2419b5e093bd5b7f5a2 xulrunner-17.0b6.source.tar.bz2 +f40d59db4101b1d0b780aecb89994da2 xulrunner-17.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index fc35a31..d985ddb 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -39,7 +39,7 @@ # rc_version should be set to the RC number if using an RC, 0 otherwise %global gecko_dir_ver %{version} %global alpha_version 0 -%global beta_version 6 +%global beta_version 0 %global rc_version 0 %global mozappdir %{_libdir}/%{name} @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 0.2%{?pre_tag}%{?dist} +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -322,7 +322,7 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1') +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" @@ -501,6 +501,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 19 2012 Martin Stransky - 17.0-1 +- Update to 17.0 + * Wed Nov 14 2012 Martin Stransky - 17.0-0.2b6 - Update to 17.0 Beta 6 From 0a2c501637e9ccf75944b28250c91b4f6cff0448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 19 Nov 2012 14:28:32 +0100 Subject: [PATCH 066/239] webrtc is available only on selected arches --- xulrunner.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index d985ddb..6a0a3fb 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -293,6 +293,10 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif +%ifnarch %{ix86} x86_64 %{arm} +echo "ac_add_options --disable-webrtc" >> .mozconfig +%endif + #--------------------------------------------------------------------- %build @@ -501,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 19 2012 Dan Horák - 17.0-2 +- webrtc is available only on selected arches + * Mon Nov 19 2012 Martin Stransky - 17.0-1 - Update to 17.0 From 8fc9b34d912bd0b08a215876f8280ad453b1dcb8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 19 Nov 2012 15:57:33 +0100 Subject: [PATCH 067/239] updated second arch patches --- mozilla-746112.patch | 115 +++++++++++++++++++++-------- xulrunner-2.0-chromium-types.patch | 29 ++++---- xulrunner.spec | 5 +- 3 files changed, 102 insertions(+), 47 deletions(-) diff --git a/mozilla-746112.patch b/mozilla-746112.patch index 765f993..01f6e16 100644 --- a/mozilla-746112.patch +++ b/mozilla-746112.patch @@ -1,35 +1,86 @@ -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -@@ -167,7 +167,7 @@ struct ByteTerm { - inputPosition = inputPos; - } +diff -up xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h +--- xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 2012-10-17 16:32:43.000000000 +0200 ++++ xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h 2012-10-24 14:48:12.186640489 +0200 +@@ -103,26 +103,31 @@ struct Cell + }; -- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(false) -@@ -188,7 +188,7 @@ struct ByteTerm { - atom.quantityCount = 1; - } + /* +- * Page size is 4096 by default, except for SPARC, where it is 8192. ++ * Page size must be static to support our arena pointer optimizations, so we ++ * are forced to support each platform with non-4096 pages as a special case. ++ * Note: The freelist supports a maximum arena shift of 15. + * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. + * Bug 692267: Move page size definition to gc/Memory.h and include it + * directly once jsgc.h is no longer an installed header. + */ + #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) + const size_t PageShift = 13; ++const size_t ArenaShift = PageShift; ++#elif defined(__powerpc__) ++const size_t PageShift = 16; ++const size_t ArenaShift = 12; + #else + const size_t PageShift = 12; ++const size_t ArenaShift = PageShift; + #endif + const size_t PageSize = size_t(1) << PageShift; ++const size_t ArenaSize = size_t(1) << ArenaShift; ++const size_t ArenaMask = ArenaSize - 1; -- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -@@ -171,7 +171,7 @@ struct PatternTerm { - quantityCount = 1; - } + const size_t ChunkShift = 20; + const size_t ChunkSize = size_t(1) << ChunkShift; + const size_t ChunkMask = ChunkSize - 1; -- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) -+ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) +-const size_t ArenaShift = PageShift; +-const size_t ArenaSize = PageSize; +-const size_t ArenaMask = ArenaSize - 1; +- + /* + * This is the maximum number of arenas we allow in the FreeCommitted state + * before we trigger a GC_SHRINK to release free arenas to the OS. +diff -up xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp +--- xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 2012-10-17 16:32:44.000000000 +0200 ++++ xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp 2012-10-24 14:46:28.253638095 +0200 +@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[] + sizeof(BackgroundPhaseStrings) / sizeof(AllocKind) + }; + ++/* Unused memory decommiting requires the arena size match the page size. */ ++static bool ++DecommitEnabled() ++{ ++ return PageSize == ArenaSize; ++} ++ + #ifdef DEBUG + void + ArenaHeader::checkSynchronizedWithFreeList() const +@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena() + decommittedArenas.unset(offset); + + Arena *arena = &arenas[offset]; +- MarkPagesInUse(arena, ArenaSize); ++ if (DecommitEnabled()) ++ MarkPagesInUse(arena, ArenaSize); + arena->aheader.setAsNotAllocated(); + + return &arena->aheader; +@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntim + chunk->removeFromAvailableList(); + + size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); +- bool ok; ++ bool ok = true; + { + /* + * If the main thread waits for the decommit to finish, skip +@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntim + Maybe maybeUnlock; + if (!rt->isHeapBusy()) + maybeUnlock.construct(rt); +- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); ++ if (DecommitEnabled()) ++ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); + } + + if (ok) { diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch index dfc82cc..a350b41 100644 --- a/xulrunner-2.0-chromium-types.patch +++ b/xulrunner-2.0-chromium-types.patch @@ -1,33 +1,34 @@ -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; +diff -up xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h +--- xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2011-06-15 23:57:26.000000000 +0200 ++++ xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h 2011-06-29 08:23:46.807314175 +0200 +@@ -61,10 +61,14 @@ 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 ++#elif defined(__powerpc64__) ++#define ARCH_CPU_PPC_FAMILY 1 ++#define ARCH_CPU_PPC 1 ++#define ARCH_CPU_64_BITS 1 + #elif defined(__sparc) + #define ARCH_CPU_SPARC_FAMILY 1 + #define ARCH_CPU_SPARC 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 ++#elif defined(__s390x__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_64_BITS 1 #else #warning Please add support for your architecture in chromium_types.h #endif diff --git a/xulrunner.spec b/xulrunner.spec index 6a0a3fb..4e4aedd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Nov 19 2012 Martin Stransky - 17.0-3 +- Updated second arch patches + * Mon Nov 19 2012 Dan Horák - 17.0-2 - webrtc is available only on selected arches From 3196ef4d10276a464aef2876501df528717de329 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 20 Nov 2012 09:26:27 +0100 Subject: [PATCH 068/239] chromium patch fix --- xulrunner-2.0-chromium-types.patch | 29 +++++++++++++---------------- xulrunner.spec | 2 +- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch index a350b41..2b3db8c 100644 --- a/xulrunner-2.0-chromium-types.patch +++ b/xulrunner-2.0-chromium-types.patch @@ -1,34 +1,31 @@ -diff -up xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h ---- xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2011-06-15 23:57:26.000000000 +0200 -+++ xulrunner-5.0/mozilla-release/gfx/ycbcr/chromium_types.h 2011-06-29 08:23:46.807314175 +0200 -@@ -61,10 +61,14 @@ typedef PRInt16 int16; +diff -up xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h +--- xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2012-11-16 20:56:29.000000000 +0100 ++++ xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h 2012-11-20 09:19:14.843448418 +0100 +@@ -30,7 +30,11 @@ typedef int16_t 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(__ppc__) || defined(__powerpc__) || defined(__PPC__) - #define ARCH_CPU_PPC_FAMILY 1 - #define ARCH_CPU_PPC 1 - #define ARCH_CPU_32_BITS 1 +#elif defined(__powerpc64__) +#define ARCH_CPU_PPC_FAMILY 1 +#define ARCH_CPU_PPC 1 +#define ARCH_CPU_64_BITS 1 - #elif defined(__sparc) - #define ARCH_CPU_SPARC_FAMILY 1 - #define ARCH_CPU_SPARC 1 -@@ -73,6 +77,14 @@ typedef PRInt16 int16; ++#elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) + #define ARCH_CPU_PPC_FAMILY 1 + #define ARCH_CPU_PPC 1 + #define ARCH_CPU_32_BITS 1 +@@ -42,6 +46,14 @@ typedef int16_t int16; #define ARCH_CPU_SPARC_FAMILY 1 #define ARCH_CPU_SPARC 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 +#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 diff --git a/xulrunner.spec b/xulrunner.spec index 4e4aedd..62ce7d8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -221,7 +221,7 @@ cd %{tarballdir} %patch1 -p1 %patch2 -p1 -b .build -%patch14 -p1 -b .chromium-types +%patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc From 33cdb0601f5bdfe0542a31fdb4490ac16c562a2e Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 27 Nov 2012 12:21:48 +0100 Subject: [PATCH 069/239] Rebuild against older nss --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 62ce7d8..8d2406d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 27 2012 Jan Horak - 17.0-4 +- Rebuild agains older NSS + * Mon Nov 19 2012 Martin Stransky - 17.0-3 - Updated second arch patches From ae2817adefc6151866da32b4fb6c21dc214dd869 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 29 Nov 2012 15:16:03 +0100 Subject: [PATCH 070/239] Update to 17.0.1 --- .gitignore | 1 + sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 516cd0e..9a7dda8 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ xulrunner-1.9.3.0b3.source.tar.bz2 /xulrunner-17.0b6.source.tar.bz2 /firefox-17.0.source.tar.bz2 /xulrunner-17.0.source.tar.bz2 +/xulrunner-17.0.1.source.tar.bz2 diff --git a/sources b/sources index ebbc136..0a8294c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f40d59db4101b1d0b780aecb89994da2 xulrunner-17.0.source.tar.bz2 +13d616028eb77de927c29b6655c832c9 xulrunner-17.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 8d2406d..ddfd043 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 17.0 -Release: 4%{?pre_tag}%{?dist} +Version: 17.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 29 2012 Jan Horak - 17.0.1-1 +- Update to 17.0.1 + * Tue Nov 27 2012 Jan Horak - 17.0-4 - Rebuild agains older NSS From 3406c21cdf96282eca300320a03bf9338c8a6536 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 7 Dec 2012 13:55:38 +0100 Subject: [PATCH 071/239] Fixed rhbz#879595 --- mozilla-813997.patch | 154 +++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 9 ++- 2 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 mozilla-813997.patch diff --git a/mozilla-813997.patch b/mozilla-813997.patch new file mode 100644 index 0000000..c720789 --- /dev/null +++ b/mozilla-813997.patch @@ -0,0 +1,154 @@ +# HG changeset patch +# Parent 9224062dd65a142d9c02bcbacb4bd576dfafcd29 +b=813997 keep window max size to 16 bits r?roc + +diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp +--- a/widget/gtk2/nsWindow.cpp ++++ b/widget/gtk2/nsWindow.cpp +@@ -359,16 +359,17 @@ nsWindow::nsWindow() + mWindowGroup = nullptr; + mHasMappedToplevel = false; + mIsFullyObscured = false; + mRetryPointerGrab = false; + mTransientParent = nullptr; + mWindowType = eWindowType_child; + mSizeState = nsSizeMode_Normal; + mLastSizeMode = nsSizeMode_Normal; ++ mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize); + + #ifdef MOZ_X11 + mOldFocusWindow = 0; + #endif /* MOZ_X11 */ + mPluginType = PluginType_NONE; + + if (!gGlobalsInitialized) { + gGlobalsInitialized = true; +@@ -933,29 +934,30 @@ nsWindow::ConstrainPosition(bool aAllowS + *aY = screenHeight - mBounds.height; + } + } + return NS_OK; + } + + void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints) + { +- if (mShell) { +- GdkGeometry geometry; +- geometry.min_width = aConstraints.mMinSize.width; +- geometry.min_height = aConstraints.mMinSize.height; +- geometry.max_width = aConstraints.mMaxSize.width; +- geometry.max_height = aConstraints.mMaxSize.height; +- +- uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; +- gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, +- &geometry, GdkWindowHints(hints)); +- } +- +- nsBaseWidget::SetSizeConstraints(aConstraints); ++ mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize); ++ mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize); ++ ++ if (mShell) { ++ GdkGeometry geometry; ++ geometry.min_width = mSizeConstraints.mMinSize.width; ++ geometry.min_height = mSizeConstraints.mMinSize.height; ++ geometry.max_width = mSizeConstraints.mMaxSize.width; ++ geometry.max_height = mSizeConstraints.mMaxSize.height; ++ ++ uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; ++ gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, ++ &geometry, GdkWindowHints(hints)); ++ } + } + + NS_IMETHODIMP + nsWindow::Show(bool aState) + { + if (aState == mIsShown) + return NS_OK; + +@@ -1012,17 +1014,17 @@ NS_IMETHODIMP + nsWindow::Resize(int32_t aWidth, int32_t aHeight, bool aRepaint) + { + ConstrainSize(&aWidth, &aHeight); + + // For top-level windows, aWidth and aHeight should possibly be + // interpreted as frame bounds, but NativeResize treats these as window + // bounds (Bug 581866). + +- mBounds.SizeTo(GetSafeWindowSize(nsIntSize(aWidth, aHeight))); ++ mBounds.SizeTo(aWidth, aHeight); + + if (!mCreated) + return NS_OK; + + // There are several cases here that we need to handle, based on a + // matrix of the visibility of the widget, the sanity of this resize + // and whether or not the widget was previously sane. + +@@ -1087,17 +1089,17 @@ nsWindow::Resize(int32_t aWidth, int32_t + NS_IMETHODIMP + nsWindow::Resize(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight, + bool aRepaint) + { + ConstrainSize(&aWidth, &aHeight); + + mBounds.x = aX; + mBounds.y = aY; +- mBounds.SizeTo(GetSafeWindowSize(nsIntSize(aWidth, aHeight))); ++ mBounds.SizeTo(aWidth, aHeight); + + mNeedsMove = true; + + if (!mCreated) + return NS_OK; + + // There are several cases here that we need to handle, based on a + // matrix of the visibility of the widget, the sanity of this resize +@@ -3365,16 +3367,17 @@ nsWindow::Create(nsIWidget *aPare + if (aNativeParent || (aInitData && aInitData->mListenForResizes)) + listenForResizes = true; + + // and do our common creation + CommonCreate(aParent, listenForResizes); + + // save our bounds + mBounds = aRect; ++ ConstrainSize(&mBounds.width, &mBounds.height); + + // figure out our parent window + GtkWidget *parentMozContainer = nullptr; + GtkContainer *parentGtkContainer = nullptr; + GdkWindow *parentGdkWindow = nullptr; + GtkWindow *topLevelParent = nullptr; + nsWindow *parentnsWindow = nullptr; + GtkWidget *eventWidget = nullptr; +@@ -3971,24 +3974,26 @@ nsWindow::SetHasMappedToplevel(bool aSta + child->SetHasMappedToplevel(aState); + } + } + } + + nsIntSize + nsWindow::GetSafeWindowSize(nsIntSize aSize) + { ++ // The X protocol uses CARD32 for window sizes, but the server (1.11.3) ++ // reads it as CARD16. Sizes of pixmaps, used for drawing, are (unsigned) ++ // CARD16 in the protocol, but the server's ProcCreatePixmap returns ++ // BadAlloc if dimensions cannot be represented by signed shorts. + nsIntSize result = aSize; + const int32_t kInt16Max = 32767; + if (result.width > kInt16Max) { +- NS_WARNING("Clamping huge window width"); + result.width = kInt16Max; + } + if (result.height > kInt16Max) { +- NS_WARNING("Clamping huge window height"); + result.height = kInt16Max; + } + return result; + } + + void + nsWindow::EnsureGrabs(void) + { diff --git a/xulrunner.spec b/xulrunner.spec index ddfd043..7390bf7 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -5,7 +5,7 @@ %if 0%{?fedora} <= 17 %define system_sqlite 0 %else -%define system_sqlite 1 +%define system_sqlite 0 %endif # Use system cairo? @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -98,6 +98,7 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch49: mozilla-746112.patch +Patch50: mozilla-813997.patch # --------------------------------------------------- @@ -228,6 +229,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %patch49 -p2 -b .746112 +%patch50 -p1 -b 813997 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -505,6 +507,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 7 2012 Jan Horak - 17.0.1-2 +- Fixed rhbz#879595 + * Thu Nov 29 2012 Jan Horak - 17.0.1-1 - Update to 17.0.1 From 7b291c742e272d2226e49f457253f38d53266135 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 7 Dec 2012 17:15:28 +0100 Subject: [PATCH 072/239] Fixed 813997 patch --- mozilla-813997.patch | 83 ++++++-------------------------------------- xulrunner.spec | 2 +- 2 files changed, 12 insertions(+), 73 deletions(-) diff --git a/mozilla-813997.patch b/mozilla-813997.patch index c720789..0f63a8d 100644 --- a/mozilla-813997.patch +++ b/mozilla-813997.patch @@ -2,15 +2,10 @@ # Parent 9224062dd65a142d9c02bcbacb4bd576dfafcd29 b=813997 keep window max size to 16 bits r?roc -diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp ---- a/widget/gtk2/nsWindow.cpp -+++ b/widget/gtk2/nsWindow.cpp -@@ -359,16 +359,17 @@ nsWindow::nsWindow() - mWindowGroup = nullptr; - mHasMappedToplevel = false; - mIsFullyObscured = false; - mRetryPointerGrab = false; - mTransientParent = nullptr; +diff -up mozilla-release/widget/gtk2/nsWindow.cpp.813997 mozilla-release/widget/gtk2/nsWindow.cpp +--- mozilla-release/widget/gtk2/nsWindow.cpp.813997 2012-11-29 05:44:34.000000000 +0100 ++++ mozilla-release/widget/gtk2/nsWindow.cpp 2012-12-07 15:41:02.166873611 +0100 +@@ -358,6 +358,7 @@ nsWindow::nsWindow() mWindowType = eWindowType_child; mSizeState = nsSizeMode_Normal; mLastSizeMode = nsSizeMode_Normal; @@ -18,17 +13,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp #ifdef MOZ_X11 mOldFocusWindow = 0; - #endif /* MOZ_X11 */ - mPluginType = PluginType_NONE; - - if (!gGlobalsInitialized) { - gGlobalsInitialized = true; -@@ -933,29 +934,30 @@ nsWindow::ConstrainPosition(bool aAllowS - *aY = screenHeight - mBounds.height; - } - } - return NS_OK; - } +@@ -925,19 +926,20 @@ nsWindow::ConstrainPosition(bool aAllowS void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints) { @@ -43,11 +28,10 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp - gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, - &geometry, GdkWindowHints(hints)); - } -- -- nsBaseWidget::SetSizeConstraints(aConstraints); + mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize); + mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize); -+ + +- nsBaseWidget::SetSizeConstraints(aConstraints); + if (mShell) { + GdkGeometry geometry; + geometry.min_width = mSizeConstraints.mMinSize.width; @@ -62,17 +46,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp } NS_IMETHODIMP - nsWindow::Show(bool aState) - { - if (aState == mIsShown) - return NS_OK; - -@@ -1012,17 +1014,17 @@ NS_IMETHODIMP - nsWindow::Resize(int32_t aWidth, int32_t aHeight, bool aRepaint) - { - ConstrainSize(&aWidth, &aHeight); - - // For top-level windows, aWidth and aHeight should possibly be +@@ -1004,7 +1006,7 @@ nsWindow::Resize(int32_t aWidth, int32_t // interpreted as frame bounds, but NativeResize treats these as window // bounds (Bug 581866). @@ -81,17 +55,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp if (!mCreated) return NS_OK; - - // There are several cases here that we need to handle, based on a - // matrix of the visibility of the widget, the sanity of this resize - // and whether or not the widget was previously sane. - -@@ -1087,17 +1089,17 @@ nsWindow::Resize(int32_t aWidth, int32_t - NS_IMETHODIMP - nsWindow::Resize(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight, - bool aRepaint) - { - ConstrainSize(&aWidth, &aHeight); +@@ -1080,7 +1082,7 @@ nsWindow::Resize(int32_t aX, int32_t aY, mBounds.x = aX; mBounds.y = aY; @@ -100,17 +64,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp mNeedsMove = true; - if (!mCreated) - return NS_OK; - - // There are several cases here that we need to handle, based on a - // matrix of the visibility of the widget, the sanity of this resize -@@ -3365,16 +3367,17 @@ nsWindow::Create(nsIWidget *aPare - if (aNativeParent || (aInitData && aInitData->mListenForResizes)) - listenForResizes = true; - - // and do our common creation - CommonCreate(aParent, listenForResizes); +@@ -3373,6 +3375,7 @@ nsWindow::Create(nsIWidget *aPare // save our bounds mBounds = aRect; @@ -118,17 +72,7 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp // figure out our parent window GtkWidget *parentMozContainer = nullptr; - GtkContainer *parentGtkContainer = nullptr; - GdkWindow *parentGdkWindow = nullptr; - GtkWindow *topLevelParent = nullptr; - nsWindow *parentnsWindow = nullptr; - GtkWidget *eventWidget = nullptr; -@@ -3971,24 +3974,26 @@ nsWindow::SetHasMappedToplevel(bool aSta - child->SetHasMappedToplevel(aState); - } - } - } - +@@ -3964,14 +3967,16 @@ nsWindow::SetHasMappedToplevel(bool aSta nsIntSize nsWindow::GetSafeWindowSize(nsIntSize aSize) { @@ -147,8 +91,3 @@ diff --git a/widget/gtk2/nsWindow.cpp b/widget/gtk2/nsWindow.cpp result.height = kInt16Max; } return result; - } - - void - nsWindow::EnsureGrabs(void) - { diff --git a/xulrunner.spec b/xulrunner.spec index 7390bf7..040f2e2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -229,7 +229,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %patch49 -p2 -b .746112 -%patch50 -p1 -b 813997 +%patch50 -p1 -b .813997 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From fdefea87fa061b6ae03ee7fe9f4509c2aa5db6e6 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 7 Dec 2012 17:19:48 +0100 Subject: [PATCH 073/239] Enable system sqlite for F18+ --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 040f2e2..db1b39b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -5,7 +5,7 @@ %if 0%{?fedora} <= 17 %define system_sqlite 0 %else -%define system_sqlite 0 +%define system_sqlite 1 %endif # Use system cairo? From d571e82662777a223b6b2fe745087903db2e1f81 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 13 Dec 2012 17:31:55 +0000 Subject: [PATCH 074/239] Disable webrtc on ARM as it currently tries to build SSE on ARM (fix FTBFS), Enable methodjit/tracejit on ARMv7 for more speed :) Fixes RHBZ 870548 --- .gitignore | 44 ++------------------------------------------ xulrunner.spec | 10 +++++++--- 2 files changed, 9 insertions(+), 45 deletions(-) diff --git a/.gitignore b/.gitignore index 9a7dda8..0d88a9e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,2 @@ -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 -/xulrunner-11.0b7.source.tar.bz2 -/xulrunner-11.0.source.tar.bz2 -/xulrunner-12.0.source.tar.bz2 -/xulrunner-13.0.source.tar.bz2 -/xulrunner-13.0.1.source.tar.bz2 -/xulrunner-14.0.1.source.tar.bz2 -/xulrunner-15.0b6.source.tar.bz2 -/xulrunner-15.0.source.tar.bz2 -/xulrunner-15.0.1.source.tar.bz2 -/xulrunner-16.0.source.tar.bz2 -/xulrunner-16.0.2.source.tar.bz2 -/xulrunner-17.0b5.source.tar.bz2 -/xulrunner-17.0b6.source.tar.bz2 -/firefox-17.0.source.tar.bz2 -/xulrunner-17.0.source.tar.bz2 -/xulrunner-17.0.1.source.tar.bz2 +/firefox-*.source.tar.bz2 +/xulrunner-*.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index db1b39b..c86cb2d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 17.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -288,14 +288,14 @@ echo "ac_add_options --with-float-abi=soft" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 +%ifnarch %{ix86} x86_64 armv7hl armv7hnl echo "ac_add_options --disable-methodjit" >> .mozconfig echo "ac_add_options --disable-monoic" >> .mozconfig echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 %{arm} +%ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig %endif @@ -507,6 +507,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 13 2012 Peter Robinson 17.0.1-3 +- Disable webrtc on ARM as it currently tries to build SSE on ARM (fix FTBFS) +- Enable methodjit/tracejit on ARMv7 for more speed :) Fixes RHBZ 870548 + * Fri Dec 7 2012 Jan Horak - 17.0.1-2 - Fixed rhbz#879595 From 91316e0461a86428cba339d6170d47d195cf7e5c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 7 Jan 2013 15:20:09 +0100 Subject: [PATCH 075/239] Update to 18.0 --- mozilla-746112.patch | 86 ---------------------------------------- mozilla-813997.patch | 93 -------------------------------------------- sources | 3 +- xulrunner.spec | 12 +++--- 4 files changed, 7 insertions(+), 187 deletions(-) delete mode 100644 mozilla-746112.patch delete mode 100644 mozilla-813997.patch diff --git a/mozilla-746112.patch b/mozilla-746112.patch deleted file mode 100644 index 01f6e16..0000000 --- a/mozilla-746112.patch +++ /dev/null @@ -1,86 +0,0 @@ -diff -up xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h ---- xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 2012-10-17 16:32:43.000000000 +0200 -+++ xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h 2012-10-24 14:48:12.186640489 +0200 -@@ -103,26 +103,31 @@ struct Cell - }; - - /* -- * Page size is 4096 by default, except for SPARC, where it is 8192. -+ * Page size must be static to support our arena pointer optimizations, so we -+ * are forced to support each platform with non-4096 pages as a special case. -+ * Note: The freelist supports a maximum arena shift of 15. - * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. - * Bug 692267: Move page size definition to gc/Memory.h and include it - * directly once jsgc.h is no longer an installed header. - */ - #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) - const size_t PageShift = 13; -+const size_t ArenaShift = PageShift; -+#elif defined(__powerpc__) -+const size_t PageShift = 16; -+const size_t ArenaShift = 12; - #else - const size_t PageShift = 12; -+const size_t ArenaShift = PageShift; - #endif - const size_t PageSize = size_t(1) << PageShift; -+const size_t ArenaSize = size_t(1) << ArenaShift; -+const size_t ArenaMask = ArenaSize - 1; - - const size_t ChunkShift = 20; - const size_t ChunkSize = size_t(1) << ChunkShift; - const size_t ChunkMask = ChunkSize - 1; - --const size_t ArenaShift = PageShift; --const size_t ArenaSize = PageSize; --const size_t ArenaMask = ArenaSize - 1; -- - /* - * This is the maximum number of arenas we allow in the FreeCommitted state - * before we trigger a GC_SHRINK to release free arenas to the OS. -diff -up xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp ---- xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 2012-10-17 16:32:44.000000000 +0200 -+++ xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp 2012-10-24 14:46:28.253638095 +0200 -@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[] - sizeof(BackgroundPhaseStrings) / sizeof(AllocKind) - }; - -+/* Unused memory decommiting requires the arena size match the page size. */ -+static bool -+DecommitEnabled() -+{ -+ return PageSize == ArenaSize; -+} -+ - #ifdef DEBUG - void - ArenaHeader::checkSynchronizedWithFreeList() const -@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena() - decommittedArenas.unset(offset); - - Arena *arena = &arenas[offset]; -- MarkPagesInUse(arena, ArenaSize); -+ if (DecommitEnabled()) -+ MarkPagesInUse(arena, ArenaSize); - arena->aheader.setAsNotAllocated(); - - return &arena->aheader; -@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntim - chunk->removeFromAvailableList(); - - size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); -- bool ok; -+ bool ok = true; - { - /* - * If the main thread waits for the decommit to finish, skip -@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntim - Maybe maybeUnlock; - if (!rt->isHeapBusy()) - maybeUnlock.construct(rt); -- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); -+ if (DecommitEnabled()) -+ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); - } - - if (ok) { diff --git a/mozilla-813997.patch b/mozilla-813997.patch deleted file mode 100644 index 0f63a8d..0000000 --- a/mozilla-813997.patch +++ /dev/null @@ -1,93 +0,0 @@ -# HG changeset patch -# Parent 9224062dd65a142d9c02bcbacb4bd576dfafcd29 -b=813997 keep window max size to 16 bits r?roc - -diff -up mozilla-release/widget/gtk2/nsWindow.cpp.813997 mozilla-release/widget/gtk2/nsWindow.cpp ---- mozilla-release/widget/gtk2/nsWindow.cpp.813997 2012-11-29 05:44:34.000000000 +0100 -+++ mozilla-release/widget/gtk2/nsWindow.cpp 2012-12-07 15:41:02.166873611 +0100 -@@ -358,6 +358,7 @@ nsWindow::nsWindow() - mWindowType = eWindowType_child; - mSizeState = nsSizeMode_Normal; - mLastSizeMode = nsSizeMode_Normal; -+ mSizeConstraints.mMaxSize = GetSafeWindowSize(mSizeConstraints.mMaxSize); - - #ifdef MOZ_X11 - mOldFocusWindow = 0; -@@ -925,19 +926,20 @@ nsWindow::ConstrainPosition(bool aAllowS - - void nsWindow::SetSizeConstraints(const SizeConstraints& aConstraints) - { -- if (mShell) { -- GdkGeometry geometry; -- geometry.min_width = aConstraints.mMinSize.width; -- geometry.min_height = aConstraints.mMinSize.height; -- geometry.max_width = aConstraints.mMaxSize.width; -- geometry.max_height = aConstraints.mMaxSize.height; -- -- uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; -- gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, -- &geometry, GdkWindowHints(hints)); -- } -+ mSizeConstraints.mMinSize = GetSafeWindowSize(aConstraints.mMinSize); -+ mSizeConstraints.mMaxSize = GetSafeWindowSize(aConstraints.mMaxSize); - -- nsBaseWidget::SetSizeConstraints(aConstraints); -+ if (mShell) { -+ GdkGeometry geometry; -+ geometry.min_width = mSizeConstraints.mMinSize.width; -+ geometry.min_height = mSizeConstraints.mMinSize.height; -+ geometry.max_width = mSizeConstraints.mMaxSize.width; -+ geometry.max_height = mSizeConstraints.mMaxSize.height; -+ -+ uint32_t hints = GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE; -+ gtk_window_set_geometry_hints(GTK_WINDOW(mShell), nullptr, -+ &geometry, GdkWindowHints(hints)); -+ } - } - - NS_IMETHODIMP -@@ -1004,7 +1006,7 @@ nsWindow::Resize(int32_t aWidth, int32_t - // interpreted as frame bounds, but NativeResize treats these as window - // bounds (Bug 581866). - -- mBounds.SizeTo(GetSafeWindowSize(nsIntSize(aWidth, aHeight))); -+ mBounds.SizeTo(aWidth, aHeight); - - if (!mCreated) - return NS_OK; -@@ -1080,7 +1082,7 @@ nsWindow::Resize(int32_t aX, int32_t aY, - - mBounds.x = aX; - mBounds.y = aY; -- mBounds.SizeTo(GetSafeWindowSize(nsIntSize(aWidth, aHeight))); -+ mBounds.SizeTo(aWidth, aHeight); - - mNeedsMove = true; - -@@ -3373,6 +3375,7 @@ nsWindow::Create(nsIWidget *aPare - - // save our bounds - mBounds = aRect; -+ ConstrainSize(&mBounds.width, &mBounds.height); - - // figure out our parent window - GtkWidget *parentMozContainer = nullptr; -@@ -3964,14 +3967,16 @@ nsWindow::SetHasMappedToplevel(bool aSta - nsIntSize - nsWindow::GetSafeWindowSize(nsIntSize aSize) - { -+ // The X protocol uses CARD32 for window sizes, but the server (1.11.3) -+ // reads it as CARD16. Sizes of pixmaps, used for drawing, are (unsigned) -+ // CARD16 in the protocol, but the server's ProcCreatePixmap returns -+ // BadAlloc if dimensions cannot be represented by signed shorts. - nsIntSize result = aSize; - const int32_t kInt16Max = 32767; - if (result.width > kInt16Max) { -- NS_WARNING("Clamping huge window width"); - result.width = kInt16Max; - } - if (result.height > kInt16Max) { -- NS_WARNING("Clamping huge window height"); - result.height = kInt16Max; - } - return result; diff --git a/sources b/sources index 0a8294c..4f2cd6e 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -13d616028eb77de927c29b6655c832c9 xulrunner-17.0.1.source.tar.bz2 +485d02563854c20a3788d89db07b0687 firefox-18.0.source.tar.bz2 +485d02563854c20a3788d89db07b0687 xulrunner-18.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index c86cb2d..4c7efbe 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 17.0.1 -Release: 3%{?pre_tag}%{?dist} +Version: 18.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,8 +97,6 @@ Patch18: xulrunner-16.0-jemalloc-ppc.patch Patch20: mozilla-193-pkgconfig.patch # Upstream patches -Patch49: mozilla-746112.patch -Patch50: mozilla-813997.patch # --------------------------------------------------- @@ -228,9 +226,6 @@ cd %{tarballdir} %patch20 -p2 -b .pk -%patch49 -p2 -b .746112 -%patch50 -p1 -b .813997 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig %if %{enable_mozilla_crashreporter} @@ -507,6 +502,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jan 7 2013 Martin Stransky - 18.0-1 +- Update to 18.0 + * Thu Dec 13 2012 Peter Robinson 17.0.1-3 - Disable webrtc on ARM as it currently tries to build SSE on ARM (fix FTBFS) - Enable methodjit/tracejit on ARMv7 for more speed :) Fixes RHBZ 870548 From 8b21f12e615f54beac3d8b7c510a467f4df51ee8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 8 Jan 2013 12:30:24 +0100 Subject: [PATCH 076/239] Build fix --- xulrunner.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 4c7efbe..7cce99e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -317,8 +317,7 @@ cd %{tarballdir} # # Disable C++ exceptions since Mozilla code is not exception-safe # -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ - %{__sed} -e 's/-Wall//') +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-Wall//') %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif @@ -330,7 +329,7 @@ MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' From e14ae82aeba6d5605524780a9eb9083bd399a633 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 8 Jan 2013 23:29:31 +0100 Subject: [PATCH 077/239] Disabled debuginfo packages due to Bug #304121 --- xulrunner.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7cce99e..10fcae4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,3 +1,6 @@ +# Disabled debuginfo packages due to Bug #304121 +%global debug_package %{nil} + # Use system nspr/nss? %define system_nss 1 @@ -47,7 +50,8 @@ # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 -%global enable_mozilla_crashreporter 1 +# Disabled debuginfo packages due to Bug #304121 +%global enable_mozilla_crashreporter 0 %else %global enable_mozilla_crashreporter 0 %endif @@ -429,6 +433,9 @@ EOF %{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries +# Remove tmp files +find $RPM_BUILD_ROOT/%{mozappdir} -name '.mkdir.done' -exec rm -rf {} \; + # ghost files %{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components touch $RPM_BUILD_ROOT%{mozappdir}/components/compreg.dat @@ -485,9 +492,6 @@ fi %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif %endif -%exclude %{mozappdir}/components/.mkdir.done -%exclude %{mozappdir}/defaults/pref/.mkdir.done -%exclude %{mozappdir}/modules/.mkdir.done %files devel %defattr(-,root,root,-) From d667c3fbc8f3892fa004039323b1248b7f28f97e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 09:07:12 +0100 Subject: [PATCH 078/239] Disabled system sqlite on Fedora 18 --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 10fcae4..d7749e2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -5,7 +5,7 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} <= 17 +%if 0%{?fedora} <= 18 %define system_sqlite 0 %else %define system_sqlite 1 @@ -79,7 +79,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 9 2013 Martin Stransky - 18.0-2 +- Disabled system sqlite on Fedora 18 + * Mon Jan 7 2013 Martin Stransky - 18.0-1 - Update to 18.0 From 503a3b989608c1fcb02b5d9d4ba2e5d7f91ee135 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 11:06:56 +0100 Subject: [PATCH 079/239] Fixed source files --- sources | 1 - xulrunner.spec | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 4f2cd6e..d2c035d 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -485d02563854c20a3788d89db07b0687 firefox-18.0.source.tar.bz2 485d02563854c20a3788d89db07b0687 xulrunner-18.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index d7749e2..d1eac55 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -79,7 +79,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -505,6 +505,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 9 2013 Martin Stransky - 18.0-3 +- Fixed source files + * Wed Jan 9 2013 Martin Stransky - 18.0-2 - Disabled system sqlite on Fedora 18 From b260f32373eef70f72a169ba449372c055053155 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 12:21:15 +0100 Subject: [PATCH 080/239] Disabled WebRTC due to rhbz#304121, enabled debuginfo packages --- xulrunner.spec | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d1eac55..b34b305 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -1,6 +1,3 @@ -# Disabled debuginfo packages due to Bug #304121 -%global debug_package %{nil} - # Use system nspr/nss? %define system_nss 1 @@ -50,8 +47,7 @@ # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 -# Disabled debuginfo packages due to Bug #304121 -%global enable_mozilla_crashreporter 0 +%global enable_mozilla_crashreporter 1 %else %global enable_mozilla_crashreporter 0 %endif @@ -79,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -294,9 +290,10 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 +# Disable WebRTC because of Bug 304121 +#%ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig -%endif +#%endif #--------------------------------------------------------------------- @@ -505,8 +502,9 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Jan 9 2013 Martin Stransky - 18.0-3 +* Wed Jan 9 2013 Martin Stransky - 18.0-4 - Fixed source files +- Disabled WebRTC due to rhbz#304121 * Wed Jan 9 2013 Martin Stransky - 18.0-2 - Disabled system sqlite on Fedora 18 From 0f3792dfad499db6214c28c079907905c5d2baa3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 12:36:43 +0100 Subject: [PATCH 081/239] Updated NSS/NSPR versions --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index b34b305..500ddd7 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,9 +21,9 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9.2 +%global nspr_version 4.9.3 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.13.5 +%global nss_version 3.14.1 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif From 4228c3d2be418f9088a0f916c4b149111ae3964b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 12:54:46 +0100 Subject: [PATCH 082/239] Added fix for langpacks --- mozilla-677092-restartless-lang.patch | 698 ++++++++++++++++++++++++++ xulrunner.spec | 9 +- 2 files changed, 705 insertions(+), 2 deletions(-) create mode 100644 mozilla-677092-restartless-lang.patch diff --git a/mozilla-677092-restartless-lang.patch b/mozilla-677092-restartless-lang.patch new file mode 100644 index 0000000..a08de9b --- /dev/null +++ b/mozilla-677092-restartless-lang.patch @@ -0,0 +1,698 @@ +# HG changeset patch +# User Axel Hecht +# Date 1348128099 -7200 +# Node ID 38adce439c3c0b5fd7a035dc53ffd853e80f87ba +# Parent 08d435dedc7fc19bfad3d31c62daec9013525c6d +bug 677092, make language packs restartless, r=Unfocused +Make language packs just trigger the chrome registration hooks, and +disable picking up bootstrap.js, and declare them restartless. + +diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm +--- a/toolkit/mozapps/extensions/XPIProvider.jsm ++++ b/toolkit/mozapps/extensions/XPIProvider.jsm +@@ -740,8 +740,8 @@ + } + } + else { +- // spell check dictionaries never require a restart +- if (addon.type == "dictionary") ++ // spell check dictionaries and language packs never require a restart ++ if (addon.type == "dictionary" || addon.type == "locale") + addon.bootstrap = true; + + // Only extensions are allowed to provide an optionsURL, optionsType or aboutURL. For +@@ -3695,6 +3695,11 @@ + Components.manager.addBootstrappedManifestLocation(aFile); + + try { ++ // Don't call bootstrap.js methods for language packs, ++ // they only contain chrome. ++ if (aType == "locale") ++ return; ++ + // Load the scope if it hasn't already been loaded + if (!(aId in this.bootstrapScopes)) + this.loadBootstrapScope(aId, aFile, aVersion, aType); +diff --git a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest b/toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest +copy from toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest +copy to toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest +--- a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest ++++ b/toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest +@@ -1,6 +1,1 @@ +-content test-addon-1 chrome/content +-# comment! +- locale test-addon-1 en-US locale/en-US +- # commentaire! +- locale test-addon-1 fr-FR locale/fr-FR +-overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul ++locale test-langpack x-testing locale/x-testing +diff --git a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf +copy from toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf +copy to toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf +--- a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf ++++ b/toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf +@@ -4,12 +4,12 @@ + xmlns:em="http://www.mozilla.org/2004/em-rdf#"> + + +- addon1@tests.mozilla.org ++ langpack-x-testing@tests.mozilla.org ++ 8 + 1.0 + + +- Test 1 +- Test Description ++ Language Pack x-testing + + + +diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js b/toolkit/mozapps/extensions/test/xpcshell/test_langpack.js +copy from toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js +copy to toolkit/mozapps/extensions/test/xpcshell/test_langpack.js +--- a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js ++++ b/toolkit/mozapps/extensions/test/xpcshell/test_langpack.js +@@ -2,7 +2,7 @@ + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +-// This verifies that bootstrappable add-ons can be used without restarts. ++// This verifies that language packs can be used without restarts. + Components.utils.import("resource://gre/modules/Services.jsm"); + + // Enable loading extensions from the user scopes +@@ -18,91 +18,22 @@ + userExtDir.append(gAppInfo.ID); + registerDirectory("XREUSysExt", userExtDir.parent); + +-Components.utils.import("resource://testing-common/httpd.js"); +-var testserver; ++var chrome = Components.classes["@mozilla.org/chrome/chrome-registry;1"] ++ .getService(Components.interfaces.nsIXULChromeRegistry); + +-/** +- * This object is both a factory and an mozISpellCheckingEngine implementation (so, it +- * is de-facto a service). It's also an interface requestor that gives out +- * itself when asked for mozISpellCheckingEngine. +- */ +-var HunspellEngine = { +- dictionaryDirs: [], +- listener: null, +- +- QueryInterface: function hunspell_qi(iid) { +- if (iid.equals(Components.interfaces.nsISupports) || +- iid.equals(Components.interfaces.nsIFactory) || +- iid.equals(Components.interfaces.mozISpellCheckingEngine)) +- return this; +- throw Components.results.NS_ERROR_NO_INTERFACE; +- }, +- createInstance: function hunspell_ci(outer, iid) { +- if (outer) +- throw Components.results.NS_ERROR_NO_AGGREGATION; +- return this.QueryInterface(iid); +- }, +- lockFactory: function hunspell_lockf(lock) { +- throw Components.results.NS_ERROR_NOT_IMPLEMENTED; +- }, +- +- addDirectory: function hunspell_addDirectory(dir) { +- this.dictionaryDirs.push(dir); +- if (this.listener) +- this.listener("addDirectory"); +- }, +- +- removeDirectory: function hunspell_addDirectory(dir) { +- this.dictionaryDirs.splice(this.dictionaryDirs.indexOf(dir), 1); +- if (this.listener) +- this.listener("removeDirectory"); +- }, +- +- getInterface: function hunspell_gi(iid) { +- if (iid.equals(Components.interfaces.mozISpellCheckingEngine)) +- return this; +- throw Components.results.NS_ERROR_NO_INTERFACE; +- }, +- +- contractID: "@mozilla.org/spellchecker/engine;1", +- classID: Components.ID("{6f3c63bc-a4fd-449b-9a58-a2d9bd972cce}"), +- +- activate: function hunspell_activate() { +- this.origClassID = Components.manager.nsIComponentRegistrar +- .contractIDToCID(this.contractID); +- this.origFactory = Components.manager +- .getClassObject(Components.classes[this.contractID], +- Components.interfaces.nsIFactory); +- +- Components.manager.nsIComponentRegistrar +- .unregisterFactory(this.origClassID, this.origFactory); +- Components.manager.nsIComponentRegistrar.registerFactory(this.classID, +- "Test hunspell", this.contractID, this); +- }, +- +- deactivate: function hunspell_deactivate() { +- Components.manager.nsIComponentRegistrar.unregisterFactory(this.classID, this); +- Components.manager.nsIComponentRegistrar.registerFactory(this.origClassID, +- "Hunspell", this.contractID, this.origFactory); +- }, +- +- isDictionaryEnabled: function hunspell_isDictionaryEnabled(name) { +- return this.dictionaryDirs.some(function(dir) { +- var dic = dir.clone(); +- dic.append(name); +- return dic.exists(); +- }); ++function do_check_locale_not_registered(provider) { ++ let didThrow = false; ++ try { ++ chrome.getSelectedLocale(provider); ++ } catch (e) { ++ didThrow = true; + } +-}; ++ do_check_true(didThrow); ++} + + function run_test() { + do_test_pending(); + +- // Create and configure the HTTP server. +- testserver = new HttpServer(); +- testserver.registerDirectory("/addons/", do_get_file("addons")); +- testserver.start(4444); +- + startupManager(); + + run_test_1(); +@@ -114,25 +45,22 @@ + "onNewInstall" + ]); + +- HunspellEngine.activate(); +- +- AddonManager.getInstallForFile(do_get_addon("test_dictionary"), function(install) { ++ AddonManager.getInstallForFile(do_get_addon("test_langpack"), function(install) { + ensure_test_completed(); + + do_check_neq(install, null); +- do_check_eq(install.type, "dictionary"); ++ do_check_eq(install.type, "locale"); + do_check_eq(install.version, "1.0"); +- do_check_eq(install.name, "Test Dictionary"); ++ do_check_eq(install.name, "Language Pack x-testing"); + do_check_eq(install.state, AddonManager.STATE_DOWNLOADED); + do_check_true(install.addon.hasResource("install.rdf")); + do_check_false(install.addon.hasResource("bootstrap.js")); + do_check_eq(install.addon.operationsRequiringRestart & + AddonManager.OP_NEEDS_RESTART_INSTALL, 0); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); + + let addon = install.addon; + prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ ++ "langpack-x-testing@tests.mozilla.org": [ + ["onInstalling", false], + "onInstalled" + ] +@@ -141,11 +69,7 @@ + "onInstallEnded", + ], function() { + do_check_true(addon.hasResource("install.rdf")); +- HunspellEngine.listener = function(aEvent) { +- HunspellEngine.listener = null; +- do_check_eq(aEvent, "addDirectory"); +- check_test_1(); +- }; ++ check_test_1(); + }); + install.install(); + }); +@@ -157,18 +81,18 @@ + // doesn't require a restart. + do_check_eq(installs.length, 0); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + do_check_neq(b1, null); + do_check_eq(b1.version, "1.0"); + do_check_false(b1.appDisabled); + do_check_false(b1.userDisabled); + do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); ++ // check chrome reg that language pack is registered ++ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); + do_check_true(b1.hasResource("install.rdf")); + do_check_false(b1.hasResource("bootstrap.js")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); + +- let dir = do_get_addon_root_uri(profileDir, "ab-CD@dictionaries.addons.mozilla.org"); ++ let dir = do_get_addon_root_uri(profileDir, "langpack-x-testing@tests.mozilla.org"); + + AddonManager.getAddonsWithOperationsByTypes(null, function(list) { + do_check_eq(list.length, 0); +@@ -181,9 +105,9 @@ + + // Tests that disabling doesn't require a restart + function run_test_2() { +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ ++ "langpack-x-testing@tests.mozilla.org": [ + ["onDisabling", false], + "onDisabled" + ] +@@ -199,10 +123,10 @@ + do_check_false(b1.appDisabled); + do_check_true(b1.userDisabled); + do_check_false(b1.isActive); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is not registered ++ do_check_locale_not_registered("test-langpack"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { + do_check_neq(newb1, null); + do_check_eq(newb1.version, "1.0"); + do_check_false(newb1.appDisabled); +@@ -217,12 +141,11 @@ + // Test that restarting doesn't accidentally re-enable + function run_test_3() { + shutdownManager(); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); + startupManager(false); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is not registered ++ do_check_locale_not_registered("test-langpack"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + do_check_neq(b1, null); + do_check_eq(b1.version, "1.0"); + do_check_false(b1.appDisabled); +@@ -235,9 +158,9 @@ + + // Tests that enabling doesn't require a restart + function run_test_4() { +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ ++ "langpack-x-testing@tests.mozilla.org": [ + ["onEnabling", false], + "onEnabled" + ] +@@ -253,10 +176,10 @@ + do_check_false(b1.appDisabled); + do_check_false(b1.userDisabled); + do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is registered ++ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { + do_check_neq(newb1, null); + do_check_eq(newb1.version, "1.0"); + do_check_false(newb1.appDisabled); +@@ -271,13 +194,11 @@ + // Tests that a restart shuts down and restarts the add-on + function run_test_5() { + shutdownManager(); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); + startupManager(false); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is registered ++ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + do_check_neq(b1, null); + do_check_eq(b1.version, "1.0"); + do_check_false(b1.appDisabled); +@@ -291,9 +212,9 @@ + + // Tests that uninstalling doesn't require a restart + function run_test_7() { +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ ++ "langpack-x-testing@tests.mozilla.org": [ + ["onUninstalling", false], + "onUninstalled" + ] +@@ -309,333 +230,18 @@ + + function check_test_7() { + ensure_test_completed(); +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); ++ // check chrome reg that language pack is not registered ++ do_check_locale_not_registered("test-langpack"); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { + do_check_eq(b1, null); + + restartManager(); + +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { ++ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { + do_check_eq(newb1, null); + +- run_test_8(); ++ do_test_finished(); + }); + }); + } +- +-// Test that a bootstrapped extension dropped into the profile loads properly +-// on startup and doesn't cause an EM restart +-function run_test_8() { +- shutdownManager(); +- +- let dir = profileDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. +- createInstance(AM_Ci.nsIZipReader); +- zip.open(do_get_addon("test_dictionary")); +- dir.append("install.rdf"); +- zip.extract("install.rdf", dir); +- dir = dir.parent; +- dir.append("dictionaries"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- dir.append("ab-CD.dic"); +- zip.extract("dictionaries/ab-CD.dic", dir); +- zip.close(); +- +- startupManager(false); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_false(b1.appDisabled); +- do_check_false(b1.userDisabled); +- do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- run_test_9(); +- }); +-} +- +-// Test that items detected as removed during startup get removed properly +-function run_test_9() { +- shutdownManager(); +- +- let dir = profileDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.remove(true); +- startupManager(false); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_eq(b1, null); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- run_test_12(); +- }); +-} +- +- +-// Tests that bootstrapped extensions are correctly loaded even if the app is +-// upgraded at the same time +-function run_test_12() { +- shutdownManager(); +- +- let dir = profileDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. +- createInstance(AM_Ci.nsIZipReader); +- zip.open(do_get_addon("test_dictionary")); +- dir.append("install.rdf"); +- zip.extract("install.rdf", dir); +- dir = dir.parent; +- dir.append("dictionaries"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- dir.append("ab-CD.dic"); +- zip.extract("dictionaries/ab-CD.dic", dir); +- zip.close(); +- +- startupManager(true); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_false(b1.appDisabled); +- do_check_false(b1.userDisabled); +- do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- b1.uninstall(); +- restartManager(); +- +- run_test_16(); +- }); +-} +- +- +-// Tests that bootstrapped extensions don't get loaded when in safe mode +-function run_test_16() { +- installAllFiles([do_get_addon("test_dictionary")], function() { +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- // Should have installed and started +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- shutdownManager(); +- +- // Should have stopped +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- gAppInfo.inSafeMode = true; +- startupManager(false); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- // Should still be stopped +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_false(b1.isActive); +- +- shutdownManager(); +- gAppInfo.inSafeMode = false; +- startupManager(false); +- +- // Should have started +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- b1.uninstall(); +- +- run_test_17(); +- }); +- }); +- }); +- }); +-} +- +-// Check that a bootstrapped extension in a non-profile location is loaded +-function run_test_17() { +- shutdownManager(); +- +- let dir = userExtDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. +- createInstance(AM_Ci.nsIZipReader); +- zip.open(do_get_addon("test_dictionary")); +- dir.append("install.rdf"); +- zip.extract("install.rdf", dir); +- dir = dir.parent; +- dir.append("dictionaries"); +- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); +- dir.append("ab-CD.dic"); +- zip.extract("dictionaries/ab-CD.dic", dir); +- zip.close(); +- +- startupManager(); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- // Should have installed and started +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_true(b1.isActive); +- +- // From run_test_21 +- dir = userExtDir.clone(); +- dir.append("ab-CD@dictionaries.addons.mozilla.org"); +- dir.remove(true); +- +- restartManager(); +- +- run_test_23(); +- }); +-} +- +-// Tests that installing from a URL doesn't require a restart +-function run_test_23() { +- prepare_test({ }, [ +- "onNewInstall" +- ]); +- +- let url = "http://localhost:4444/addons/test_dictionary.xpi"; +- AddonManager.getInstallForURL(url, function(install) { +- ensure_test_completed(); +- +- do_check_neq(install, null); +- +- prepare_test({ }, [ +- "onDownloadStarted", +- "onDownloadEnded" +- ], function() { +- do_check_eq(install.type, "dictionary"); +- do_check_eq(install.version, "1.0"); +- do_check_eq(install.name, "Test Dictionary"); +- do_check_eq(install.state, AddonManager.STATE_DOWNLOADED); +- do_check_true(install.addon.hasResource("install.rdf")); +- do_check_false(install.addon.hasResource("bootstrap.js")); +- do_check_eq(install.addon.operationsRequiringRestart & +- AddonManager.OP_NEEDS_RESTART_INSTALL, 0); +- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- let addon = install.addon; +- prepare_test({ +- "ab-CD@dictionaries.addons.mozilla.org": [ +- ["onInstalling", false], +- "onInstalled" +- ] +- }, [ +- "onInstallStarted", +- "onInstallEnded", +- ], function() { +- do_check_true(addon.hasResource("install.rdf")); +- check_test_23(); +- }); +- }); +- install.install(); +- }, "application/x-xpinstall"); +-} +- +-function check_test_23() { +- AddonManager.getAllInstalls(function(installs) { +- // There should be no active installs now since the install completed and +- // doesn't require a restart. +- do_check_eq(installs.length, 0); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_false(b1.appDisabled); +- do_check_false(b1.userDisabled); +- do_check_true(b1.isActive); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- do_check_true(b1.hasResource("install.rdf")); +- do_check_false(b1.hasResource("bootstrap.js")); +- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); +- +- let dir = do_get_addon_root_uri(profileDir, "ab-CD@dictionaries.addons.mozilla.org"); +- +- AddonManager.getAddonsWithOperationsByTypes(null, function(list) { +- do_check_eq(list.length, 0); +- +- restartManager(); +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- b1.uninstall(); +- restartManager(); +- +- testserver.stop(run_test_25); +- }); +- }); +- }); +- }); +-} +- +-// Tests that updating from a bootstrappable add-on to a normal add-on calls +-// the uninstall method +-function run_test_25() { +- installAllFiles([do_get_addon("test_dictionary")], function() { +- HunspellEngine.listener = function(aEvent) { +- HunspellEngine.listener = null; +- do_check_eq(aEvent, "addDirectory"); +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- installAllFiles([do_get_addon("test_dictionary_2")], function() { +- // Needs a restart to complete this so the old version stays running +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_true(b1.isActive); +- do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE)); +- +- restartManager(); +- +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "2.0"); +- do_check_true(b1.isActive); +- do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE); +- +- run_test_26(); +- }); +- }); +- }); +- }; +- }); +-} +- +-// Tests that updating from a normal add-on to a bootstrappable add-on calls +-// the install method +-function run_test_26() { +- installAllFiles([do_get_addon("test_dictionary")], function() { +- // Needs a restart to complete this +- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "2.0"); +- do_check_true(b1.isActive); +- do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE)); +- +- restartManager(); +- +- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); +- +- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { +- do_check_neq(b1, null); +- do_check_eq(b1.version, "1.0"); +- do_check_true(b1.isActive); +- do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE); +- +- HunspellEngine.deactivate(); +- +- do_test_finished(); +- }); +- }); +- }); +-} +- +diff --git a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini +--- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini ++++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini +@@ -139,6 +139,7 @@ + [test_corrupt_strictcompat.js] + [test_db_sanity.js] + [test_dictionary.js] ++[test_langpack.js] + [test_disable.js] + [test_distribution.js] + [test_dss.js] diff --git a/xulrunner.spec b/xulrunner.spec index 500ddd7..7549c6d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,6 +97,7 @@ Patch18: xulrunner-16.0-jemalloc-ppc.patch Patch20: mozilla-193-pkgconfig.patch # Upstream patches +Patch100: mozilla-677092-restartless-lang.patch # --------------------------------------------------- @@ -224,7 +225,8 @@ cd %{tarballdir} %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc -%patch20 -p2 -b .pk +%patch20 -p2 -b .pk +%patch100 -p1 -R -b .restartless-lang %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -502,6 +504,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 9 2013 Martin Stransky - 18.0-5 +- Added fix for langpacks + * Wed Jan 9 2013 Martin Stransky - 18.0-4 - Fixed source files - Disabled WebRTC due to rhbz#304121 From 7df449fd97b41209ecc0e6dbaa5d43615e58c624 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 9 Jan 2013 15:10:47 +0100 Subject: [PATCH 083/239] Fixed missing libxpcom.so provides --- xulrunner.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7549c6d..9928674 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -425,6 +425,9 @@ EOF # Install xpcshell %{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} +# Fix libxpcom.so rights +chmod 755 $RPM_BUILD_ROOT/%{mozappdir}/libxpcom.so + # Install run-mozilla.sh %{__cp} objdir/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{mozappdir} @@ -504,6 +507,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jan 9 2013 Martin Stransky - 18.0-6 +- Fixed missing libxpcom.so provides + * Wed Jan 9 2013 Martin Stransky - 18.0-5 - Added fix for langpacks From b0f532378190f377576dbd3cefab2da8366df592 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 10 Jan 2013 14:59:37 +0100 Subject: [PATCH 084/239] Fixed Makefile generator (rhbz#304121) --- rhbz-304121.patch | 13 +++++++++++++ rhbz-872752.patch | 38 -------------------------------------- xulrunner.spec | 12 ++++++++---- 3 files changed, 21 insertions(+), 42 deletions(-) create mode 100644 rhbz-304121.patch delete mode 100644 rhbz-872752.patch diff --git a/rhbz-304121.patch b/rhbz-304121.patch new file mode 100644 index 0000000..941aca2 --- /dev/null +++ b/rhbz-304121.patch @@ -0,0 +1,13 @@ +diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile.old firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile +diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py +--- firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old 2013-01-05 00:44:41.000000000 +0100 ++++ firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-01-10 14:48:58.418321640 +0100 +@@ -376,7 +376,7 @@ class MakefileGenerator(object): + WriteMakefile(output_file, data, build_file, depth, top, + # we set srcdir up one directory, since the subdir + # doesn't actually exist in the source directory +- swapslashes(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0])), ++ swapslashes(os.path.normpath(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0]))), + self.relative_srcdir) + return True + diff --git a/rhbz-872752.patch b/rhbz-872752.patch deleted file mode 100644 index 63404c7..0000000 --- a/rhbz-872752.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in.orig 2012-11-05 11:17:57.000000000 +0100 -+++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/Makefile.in 2012-11-05 11:56:22.513385775 +0100 -@@ -46,6 +46,7 @@ - - pkg_config_files = \ - libxul.pc \ -+ libxul-embedding-lib.pc \ - libxul-embedding.pc \ - mozilla-js.pc \ - mozilla-plugin.pc \ ---- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in.orig 2012-11-05 11:59:31.493626458 +0100 -+++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding-lib.pc.in 2012-11-05 12:01:03.547230893 +0100 -@@ -0,0 +1,11 @@ -+prefix=%prefix% -+sdkdir=%sdkdir% -+includedir=%includedir% -+idldir=%idldir% -+ -+Name: libxul-embedding-lib -+Description: Static library for version-independent embedding of the Mozilla runtime for libraries -+Version: %MOZILLA_VERSION% -+Requires: %NSPR_NAME% >= %NSPR_VERSION% -+Libs: -L${sdkdir}/lib -lxpcomglue -ldl -+Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% ---- xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in.fixembed 2012-11-05 11:17:57.227491778 +0100 -+++ xulrunner-16.0.2/mozilla-release/xulrunner/installer/libxul-embedding.pc.in 2012-11-05 12:01:56.140574788 +0100 -@@ -4,8 +4,8 @@ - idldir=%idldir% - - Name: libxul-embedding --Description: Static library for version-independent embedding of the Mozilla runtime -+Description: Static library for version-independent embedding of the Mozilla runtime for applications - Version: %MOZILLA_VERSION% --Requires: %NSPR_NAME% >= %NSPR_VERSION% --Libs: -L${sdkdir}/lib -lxpcomglue -ldl -+Requires: %NSPR_NAME% >= %NSPR_VERSION% , libxul-embedding-lib = %MOZILLA_VERSION% -+Libs: -L${sdkdir}/lib -Wl,--whole-archive -lmozglue -lmemory -Wl,--no-whole-archive -ldl -rdynamic - Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/xulrunner.spec b/xulrunner.spec index 9928674..ecc5baf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -92,6 +92,7 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-16.0-jemalloc-ppc.patch +Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -224,6 +225,7 @@ cd %{tarballdir} %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc +%patch19 -p2 -b .rhbz-304121 %patch20 -p2 -b .pk %patch100 -p1 -R -b .restartless-lang @@ -292,10 +294,9 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif -# Disable WebRTC because of Bug 304121 -#%ifnarch %{ix86} x86_64 +%ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig -#%endif +%endif #--------------------------------------------------------------------- @@ -507,6 +508,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jan 10 2013 Martin Stransky - 18.0-7 +- Fixed Makefile generator (rhbz#304121) + * Wed Jan 9 2013 Martin Stransky - 18.0-6 - Fixed missing libxpcom.so provides From bcb4af0f84ab4be62ad349f180326b932c842cad Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 15 Jan 2013 12:23:03 +0100 Subject: [PATCH 085/239] Added fix for NM regression (mozbz#791626) --- xulrunner.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ecc5baf..ce21cf5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,7 +75,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 18.0 -Release: 7%{?pre_tag}%{?dist} +Release: 8%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,6 +99,7 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch100: mozilla-677092-restartless-lang.patch +Patch101: mozilla-791626.patch # --------------------------------------------------- @@ -229,6 +230,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %patch100 -p1 -R -b .restartless-lang +%patch101 -p1 -b .791626 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -508,6 +510,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 15 2013 Martin Stransky - 18.0-8 +- Added fix for NM regression (mozbz#791626) + * Thu Jan 10 2013 Martin Stransky - 18.0-7 - Fixed Makefile generator (rhbz#304121) From 3e7a82424be417514585e21dcc37e23b8d7cd4a7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 15 Jan 2013 12:28:48 +0100 Subject: [PATCH 086/239] Added patch --- mozilla-791626.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 mozilla-791626.patch diff --git a/mozilla-791626.patch b/mozilla-791626.patch new file mode 100644 index 0000000..c2e77ab --- /dev/null +++ b/mozilla-791626.patch @@ -0,0 +1,46 @@ +# HG changeset patch +# Parent 3523e7f7a89d7933c5f1dc8f5f22559b48ec44c4 +diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp +--- a/netwerk/base/src/nsIOService.cpp ++++ b/netwerk/base/src/nsIOService.cpp +@@ -818,17 +818,18 @@ nsIOService::PrefsChanged(nsIPrefBranch + if (NS_SUCCEEDED(rv)) { + if (mSocketTransportService) + mSocketTransportService->SetAutodialEnabled(enableAutodial); + } + } + + if (!pref || strcmp(pref, MANAGE_OFFLINE_STATUS_PREF) == 0) { + bool manage; +- if (NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, ++ if (mNetworkLinkServiceInitialized && ++ NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, + &manage))) + SetManageOfflineStatus(manage); + } + + if (!pref || strcmp(pref, NECKO_BUFFER_CACHE_COUNT_PREF) == 0) { + int32_t count; + if (NS_SUCCEEDED(prefs->GetIntPref(NECKO_BUFFER_CACHE_COUNT_PREF, + &count))) +@@ -928,16 +929,20 @@ nsIOService::Observe(nsISupports *subjec + } + else if (!strcmp(topic, kProfileDoChange)) { + if (data && NS_LITERAL_STRING("startup").Equals(data)) { + // Lazy initialization of network link service (see bug 620472) + InitializeNetworkLinkService(); + // Set up the initilization flag regardless the actuall result. + // If we fail here, we will fail always on. + mNetworkLinkServiceInitialized = true; ++ // And now reflect the preference setting ++ nsCOMPtr prefBranch; ++ GetPrefBranch(getter_AddRefs(prefBranch)); ++ PrefsChanged(prefBranch, MANAGE_OFFLINE_STATUS_PREF); + } + } + else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { + // Remember we passed XPCOM shutdown notification to prevent any + // changes of the offline status from now. We must not allow going + // online after this point. + mShutdown = true; + From 6762e5325f9e14e1685d8f4384215e94a462768a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 25 Jan 2013 15:11:06 +0100 Subject: [PATCH 087/239] Update to 18.0.1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index d2c035d..678e3d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -485d02563854c20a3788d89db07b0687 xulrunner-18.0.source.tar.bz2 +8b400555fc7063163e3b99472d0c92a1 xulrunner-18.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index ce21cf5..d6f54db 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -74,8 +74,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 18.0 -Release: 8%{?pre_tag}%{?dist} +Version: 18.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -510,6 +510,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 25 2013 Jan Horak - 18.0.1-1 +- Update to 18.0.1 + * Tue Jan 15 2013 Martin Stransky - 18.0-8 - Added fix for NM regression (mozbz#791626) From 0e39a6c1e24d44959d78e98e2df7b490be4eb096 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Fri, 25 Jan 2013 15:37:28 +0100 Subject: [PATCH 088/239] Removed mozilla-677092-restartless-lang.patch --- mozilla-677092-restartless-lang.patch | 698 -------------------------- xulrunner.spec | 2 - 2 files changed, 700 deletions(-) delete mode 100644 mozilla-677092-restartless-lang.patch diff --git a/mozilla-677092-restartless-lang.patch b/mozilla-677092-restartless-lang.patch deleted file mode 100644 index a08de9b..0000000 --- a/mozilla-677092-restartless-lang.patch +++ /dev/null @@ -1,698 +0,0 @@ -# HG changeset patch -# User Axel Hecht -# Date 1348128099 -7200 -# Node ID 38adce439c3c0b5fd7a035dc53ffd853e80f87ba -# Parent 08d435dedc7fc19bfad3d31c62daec9013525c6d -bug 677092, make language packs restartless, r=Unfocused -Make language packs just trigger the chrome registration hooks, and -disable picking up bootstrap.js, and declare them restartless. - -diff --git a/toolkit/mozapps/extensions/XPIProvider.jsm b/toolkit/mozapps/extensions/XPIProvider.jsm ---- a/toolkit/mozapps/extensions/XPIProvider.jsm -+++ b/toolkit/mozapps/extensions/XPIProvider.jsm -@@ -740,8 +740,8 @@ - } - } - else { -- // spell check dictionaries never require a restart -- if (addon.type == "dictionary") -+ // spell check dictionaries and language packs never require a restart -+ if (addon.type == "dictionary" || addon.type == "locale") - addon.bootstrap = true; - - // Only extensions are allowed to provide an optionsURL, optionsType or aboutURL. For -@@ -3695,6 +3695,11 @@ - Components.manager.addBootstrappedManifestLocation(aFile); - - try { -+ // Don't call bootstrap.js methods for language packs, -+ // they only contain chrome. -+ if (aType == "locale") -+ return; -+ - // Load the scope if it hasn't already been loaded - if (!(aId in this.bootstrapScopes)) - this.loadBootstrapScope(aId, aFile, aVersion, aType); -diff --git a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest b/toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest -copy from toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest -copy to toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest ---- a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/chrome.manifest -+++ b/toolkit/mozapps/extensions/test/addons/test_langpack/chrome.manifest -@@ -1,6 +1,1 @@ --content test-addon-1 chrome/content --# comment! -- locale test-addon-1 en-US locale/en-US -- # commentaire! -- locale test-addon-1 fr-FR locale/fr-FR --overlay chrome://browser/content/browser.xul chrome://test-addon-1/content/overlay.xul -+locale test-langpack x-testing locale/x-testing -diff --git a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf -copy from toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf -copy to toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf ---- a/toolkit/mozapps/extensions/test/addons/test_chromemanifest_1/install.rdf -+++ b/toolkit/mozapps/extensions/test/addons/test_langpack/install.rdf -@@ -4,12 +4,12 @@ - xmlns:em="http://www.mozilla.org/2004/em-rdf#"> - - -- addon1@tests.mozilla.org -+ langpack-x-testing@tests.mozilla.org -+ 8 - 1.0 - - -- Test 1 -- Test Description -+ Language Pack x-testing - - - -diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js b/toolkit/mozapps/extensions/test/xpcshell/test_langpack.js -copy from toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js -copy to toolkit/mozapps/extensions/test/xpcshell/test_langpack.js ---- a/toolkit/mozapps/extensions/test/xpcshell/test_dictionary.js -+++ b/toolkit/mozapps/extensions/test/xpcshell/test_langpack.js -@@ -2,7 +2,7 @@ - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - --// This verifies that bootstrappable add-ons can be used without restarts. -+// This verifies that language packs can be used without restarts. - Components.utils.import("resource://gre/modules/Services.jsm"); - - // Enable loading extensions from the user scopes -@@ -18,91 +18,22 @@ - userExtDir.append(gAppInfo.ID); - registerDirectory("XREUSysExt", userExtDir.parent); - --Components.utils.import("resource://testing-common/httpd.js"); --var testserver; -+var chrome = Components.classes["@mozilla.org/chrome/chrome-registry;1"] -+ .getService(Components.interfaces.nsIXULChromeRegistry); - --/** -- * This object is both a factory and an mozISpellCheckingEngine implementation (so, it -- * is de-facto a service). It's also an interface requestor that gives out -- * itself when asked for mozISpellCheckingEngine. -- */ --var HunspellEngine = { -- dictionaryDirs: [], -- listener: null, -- -- QueryInterface: function hunspell_qi(iid) { -- if (iid.equals(Components.interfaces.nsISupports) || -- iid.equals(Components.interfaces.nsIFactory) || -- iid.equals(Components.interfaces.mozISpellCheckingEngine)) -- return this; -- throw Components.results.NS_ERROR_NO_INTERFACE; -- }, -- createInstance: function hunspell_ci(outer, iid) { -- if (outer) -- throw Components.results.NS_ERROR_NO_AGGREGATION; -- return this.QueryInterface(iid); -- }, -- lockFactory: function hunspell_lockf(lock) { -- throw Components.results.NS_ERROR_NOT_IMPLEMENTED; -- }, -- -- addDirectory: function hunspell_addDirectory(dir) { -- this.dictionaryDirs.push(dir); -- if (this.listener) -- this.listener("addDirectory"); -- }, -- -- removeDirectory: function hunspell_addDirectory(dir) { -- this.dictionaryDirs.splice(this.dictionaryDirs.indexOf(dir), 1); -- if (this.listener) -- this.listener("removeDirectory"); -- }, -- -- getInterface: function hunspell_gi(iid) { -- if (iid.equals(Components.interfaces.mozISpellCheckingEngine)) -- return this; -- throw Components.results.NS_ERROR_NO_INTERFACE; -- }, -- -- contractID: "@mozilla.org/spellchecker/engine;1", -- classID: Components.ID("{6f3c63bc-a4fd-449b-9a58-a2d9bd972cce}"), -- -- activate: function hunspell_activate() { -- this.origClassID = Components.manager.nsIComponentRegistrar -- .contractIDToCID(this.contractID); -- this.origFactory = Components.manager -- .getClassObject(Components.classes[this.contractID], -- Components.interfaces.nsIFactory); -- -- Components.manager.nsIComponentRegistrar -- .unregisterFactory(this.origClassID, this.origFactory); -- Components.manager.nsIComponentRegistrar.registerFactory(this.classID, -- "Test hunspell", this.contractID, this); -- }, -- -- deactivate: function hunspell_deactivate() { -- Components.manager.nsIComponentRegistrar.unregisterFactory(this.classID, this); -- Components.manager.nsIComponentRegistrar.registerFactory(this.origClassID, -- "Hunspell", this.contractID, this.origFactory); -- }, -- -- isDictionaryEnabled: function hunspell_isDictionaryEnabled(name) { -- return this.dictionaryDirs.some(function(dir) { -- var dic = dir.clone(); -- dic.append(name); -- return dic.exists(); -- }); -+function do_check_locale_not_registered(provider) { -+ let didThrow = false; -+ try { -+ chrome.getSelectedLocale(provider); -+ } catch (e) { -+ didThrow = true; - } --}; -+ do_check_true(didThrow); -+} - - function run_test() { - do_test_pending(); - -- // Create and configure the HTTP server. -- testserver = new HttpServer(); -- testserver.registerDirectory("/addons/", do_get_file("addons")); -- testserver.start(4444); -- - startupManager(); - - run_test_1(); -@@ -114,25 +45,22 @@ - "onNewInstall" - ]); - -- HunspellEngine.activate(); -- -- AddonManager.getInstallForFile(do_get_addon("test_dictionary"), function(install) { -+ AddonManager.getInstallForFile(do_get_addon("test_langpack"), function(install) { - ensure_test_completed(); - - do_check_neq(install, null); -- do_check_eq(install.type, "dictionary"); -+ do_check_eq(install.type, "locale"); - do_check_eq(install.version, "1.0"); -- do_check_eq(install.name, "Test Dictionary"); -+ do_check_eq(install.name, "Language Pack x-testing"); - do_check_eq(install.state, AddonManager.STATE_DOWNLOADED); - do_check_true(install.addon.hasResource("install.rdf")); - do_check_false(install.addon.hasResource("bootstrap.js")); - do_check_eq(install.addon.operationsRequiringRestart & - AddonManager.OP_NEEDS_RESTART_INSTALL, 0); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); - - let addon = install.addon; - prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -+ "langpack-x-testing@tests.mozilla.org": [ - ["onInstalling", false], - "onInstalled" - ] -@@ -141,11 +69,7 @@ - "onInstallEnded", - ], function() { - do_check_true(addon.hasResource("install.rdf")); -- HunspellEngine.listener = function(aEvent) { -- HunspellEngine.listener = null; -- do_check_eq(aEvent, "addDirectory"); -- check_test_1(); -- }; -+ check_test_1(); - }); - install.install(); - }); -@@ -157,18 +81,18 @@ - // doesn't require a restart. - do_check_eq(installs.length, 0); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - do_check_neq(b1, null); - do_check_eq(b1.version, "1.0"); - do_check_false(b1.appDisabled); - do_check_false(b1.userDisabled); - do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -+ // check chrome reg that language pack is registered -+ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); - do_check_true(b1.hasResource("install.rdf")); - do_check_false(b1.hasResource("bootstrap.js")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); - -- let dir = do_get_addon_root_uri(profileDir, "ab-CD@dictionaries.addons.mozilla.org"); -+ let dir = do_get_addon_root_uri(profileDir, "langpack-x-testing@tests.mozilla.org"); - - AddonManager.getAddonsWithOperationsByTypes(null, function(list) { - do_check_eq(list.length, 0); -@@ -181,9 +105,9 @@ - - // Tests that disabling doesn't require a restart - function run_test_2() { -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -+ "langpack-x-testing@tests.mozilla.org": [ - ["onDisabling", false], - "onDisabled" - ] -@@ -199,10 +123,10 @@ - do_check_false(b1.appDisabled); - do_check_true(b1.userDisabled); - do_check_false(b1.isActive); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is not registered -+ do_check_locale_not_registered("test-langpack"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { - do_check_neq(newb1, null); - do_check_eq(newb1.version, "1.0"); - do_check_false(newb1.appDisabled); -@@ -217,12 +141,11 @@ - // Test that restarting doesn't accidentally re-enable - function run_test_3() { - shutdownManager(); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); - startupManager(false); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is not registered -+ do_check_locale_not_registered("test-langpack"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - do_check_neq(b1, null); - do_check_eq(b1.version, "1.0"); - do_check_false(b1.appDisabled); -@@ -235,9 +158,9 @@ - - // Tests that enabling doesn't require a restart - function run_test_4() { -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -+ "langpack-x-testing@tests.mozilla.org": [ - ["onEnabling", false], - "onEnabled" - ] -@@ -253,10 +176,10 @@ - do_check_false(b1.appDisabled); - do_check_false(b1.userDisabled); - do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is registered -+ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { - do_check_neq(newb1, null); - do_check_eq(newb1.version, "1.0"); - do_check_false(newb1.appDisabled); -@@ -271,13 +194,11 @@ - // Tests that a restart shuts down and restarts the add-on - function run_test_5() { - shutdownManager(); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); - startupManager(false); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is registered -+ do_check_eq(chrome.getSelectedLocale("test-langpack"), "x-testing"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - do_check_neq(b1, null); - do_check_eq(b1.version, "1.0"); - do_check_false(b1.appDisabled); -@@ -291,9 +212,9 @@ - - // Tests that uninstalling doesn't require a restart - function run_test_7() { -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -+ "langpack-x-testing@tests.mozilla.org": [ - ["onUninstalling", false], - "onUninstalled" - ] -@@ -309,333 +230,18 @@ - - function check_test_7() { - ensure_test_completed(); -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -+ // check chrome reg that language pack is not registered -+ do_check_locale_not_registered("test-langpack"); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(b1) { - do_check_eq(b1, null); - - restartManager(); - -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(newb1) { -+ AddonManager.getAddonByID("langpack-x-testing@tests.mozilla.org", function(newb1) { - do_check_eq(newb1, null); - -- run_test_8(); -+ do_test_finished(); - }); - }); - } -- --// Test that a bootstrapped extension dropped into the profile loads properly --// on startup and doesn't cause an EM restart --function run_test_8() { -- shutdownManager(); -- -- let dir = profileDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. -- createInstance(AM_Ci.nsIZipReader); -- zip.open(do_get_addon("test_dictionary")); -- dir.append("install.rdf"); -- zip.extract("install.rdf", dir); -- dir = dir.parent; -- dir.append("dictionaries"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- dir.append("ab-CD.dic"); -- zip.extract("dictionaries/ab-CD.dic", dir); -- zip.close(); -- -- startupManager(false); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_false(b1.appDisabled); -- do_check_false(b1.userDisabled); -- do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- run_test_9(); -- }); --} -- --// Test that items detected as removed during startup get removed properly --function run_test_9() { -- shutdownManager(); -- -- let dir = profileDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.remove(true); -- startupManager(false); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_eq(b1, null); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- run_test_12(); -- }); --} -- -- --// Tests that bootstrapped extensions are correctly loaded even if the app is --// upgraded at the same time --function run_test_12() { -- shutdownManager(); -- -- let dir = profileDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. -- createInstance(AM_Ci.nsIZipReader); -- zip.open(do_get_addon("test_dictionary")); -- dir.append("install.rdf"); -- zip.extract("install.rdf", dir); -- dir = dir.parent; -- dir.append("dictionaries"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- dir.append("ab-CD.dic"); -- zip.extract("dictionaries/ab-CD.dic", dir); -- zip.close(); -- -- startupManager(true); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_false(b1.appDisabled); -- do_check_false(b1.userDisabled); -- do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- b1.uninstall(); -- restartManager(); -- -- run_test_16(); -- }); --} -- -- --// Tests that bootstrapped extensions don't get loaded when in safe mode --function run_test_16() { -- installAllFiles([do_get_addon("test_dictionary")], function() { -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- // Should have installed and started -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- shutdownManager(); -- -- // Should have stopped -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- gAppInfo.inSafeMode = true; -- startupManager(false); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- // Should still be stopped -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_false(b1.isActive); -- -- shutdownManager(); -- gAppInfo.inSafeMode = false; -- startupManager(false); -- -- // Should have started -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- b1.uninstall(); -- -- run_test_17(); -- }); -- }); -- }); -- }); --} -- --// Check that a bootstrapped extension in a non-profile location is loaded --function run_test_17() { -- shutdownManager(); -- -- let dir = userExtDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- let zip = AM_Cc["@mozilla.org/libjar/zip-reader;1"]. -- createInstance(AM_Ci.nsIZipReader); -- zip.open(do_get_addon("test_dictionary")); -- dir.append("install.rdf"); -- zip.extract("install.rdf", dir); -- dir = dir.parent; -- dir.append("dictionaries"); -- dir.create(AM_Ci.nsIFile.DIRECTORY_TYPE, 0755); -- dir.append("ab-CD.dic"); -- zip.extract("dictionaries/ab-CD.dic", dir); -- zip.close(); -- -- startupManager(); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- // Should have installed and started -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_true(b1.isActive); -- -- // From run_test_21 -- dir = userExtDir.clone(); -- dir.append("ab-CD@dictionaries.addons.mozilla.org"); -- dir.remove(true); -- -- restartManager(); -- -- run_test_23(); -- }); --} -- --// Tests that installing from a URL doesn't require a restart --function run_test_23() { -- prepare_test({ }, [ -- "onNewInstall" -- ]); -- -- let url = "http://localhost:4444/addons/test_dictionary.xpi"; -- AddonManager.getInstallForURL(url, function(install) { -- ensure_test_completed(); -- -- do_check_neq(install, null); -- -- prepare_test({ }, [ -- "onDownloadStarted", -- "onDownloadEnded" -- ], function() { -- do_check_eq(install.type, "dictionary"); -- do_check_eq(install.version, "1.0"); -- do_check_eq(install.name, "Test Dictionary"); -- do_check_eq(install.state, AddonManager.STATE_DOWNLOADED); -- do_check_true(install.addon.hasResource("install.rdf")); -- do_check_false(install.addon.hasResource("bootstrap.js")); -- do_check_eq(install.addon.operationsRequiringRestart & -- AddonManager.OP_NEEDS_RESTART_INSTALL, 0); -- do_check_not_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- let addon = install.addon; -- prepare_test({ -- "ab-CD@dictionaries.addons.mozilla.org": [ -- ["onInstalling", false], -- "onInstalled" -- ] -- }, [ -- "onInstallStarted", -- "onInstallEnded", -- ], function() { -- do_check_true(addon.hasResource("install.rdf")); -- check_test_23(); -- }); -- }); -- install.install(); -- }, "application/x-xpinstall"); --} -- --function check_test_23() { -- AddonManager.getAllInstalls(function(installs) { -- // There should be no active installs now since the install completed and -- // doesn't require a restart. -- do_check_eq(installs.length, 0); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_false(b1.appDisabled); -- do_check_false(b1.userDisabled); -- do_check_true(b1.isActive); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- do_check_true(b1.hasResource("install.rdf")); -- do_check_false(b1.hasResource("bootstrap.js")); -- do_check_in_crash_annotation("ab-CD@dictionaries.addons.mozilla.org", "1.0"); -- -- let dir = do_get_addon_root_uri(profileDir, "ab-CD@dictionaries.addons.mozilla.org"); -- -- AddonManager.getAddonsWithOperationsByTypes(null, function(list) { -- do_check_eq(list.length, 0); -- -- restartManager(); -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- b1.uninstall(); -- restartManager(); -- -- testserver.stop(run_test_25); -- }); -- }); -- }); -- }); --} -- --// Tests that updating from a bootstrappable add-on to a normal add-on calls --// the uninstall method --function run_test_25() { -- installAllFiles([do_get_addon("test_dictionary")], function() { -- HunspellEngine.listener = function(aEvent) { -- HunspellEngine.listener = null; -- do_check_eq(aEvent, "addDirectory"); -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- installAllFiles([do_get_addon("test_dictionary_2")], function() { -- // Needs a restart to complete this so the old version stays running -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_true(b1.isActive); -- do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE)); -- -- restartManager(); -- -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "2.0"); -- do_check_true(b1.isActive); -- do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE); -- -- run_test_26(); -- }); -- }); -- }); -- }; -- }); --} -- --// Tests that updating from a normal add-on to a bootstrappable add-on calls --// the install method --function run_test_26() { -- installAllFiles([do_get_addon("test_dictionary")], function() { -- // Needs a restart to complete this -- do_check_false(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "2.0"); -- do_check_true(b1.isActive); -- do_check_true(hasFlag(b1.pendingOperations, AddonManager.PENDING_UPGRADE)); -- -- restartManager(); -- -- do_check_true(HunspellEngine.isDictionaryEnabled("ab-CD.dic")); -- -- AddonManager.getAddonByID("ab-CD@dictionaries.addons.mozilla.org", function(b1) { -- do_check_neq(b1, null); -- do_check_eq(b1.version, "1.0"); -- do_check_true(b1.isActive); -- do_check_eq(b1.pendingOperations, AddonManager.PENDING_NONE); -- -- HunspellEngine.deactivate(); -- -- do_test_finished(); -- }); -- }); -- }); --} -- -diff --git a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini ---- a/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini -+++ b/toolkit/mozapps/extensions/test/xpcshell/xpcshell.ini -@@ -139,6 +139,7 @@ - [test_corrupt_strictcompat.js] - [test_db_sanity.js] - [test_dictionary.js] -+[test_langpack.js] - [test_disable.js] - [test_distribution.js] - [test_dss.js] diff --git a/xulrunner.spec b/xulrunner.spec index d6f54db..e498bc1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -98,7 +98,6 @@ Patch19: rhbz-304121.patch Patch20: mozilla-193-pkgconfig.patch # Upstream patches -Patch100: mozilla-677092-restartless-lang.patch Patch101: mozilla-791626.patch # --------------------------------------------------- @@ -229,7 +228,6 @@ cd %{tarballdir} %patch19 -p2 -b .rhbz-304121 %patch20 -p2 -b .pk -%patch100 -p1 -R -b .restartless-lang %patch101 -p1 -b .791626 %{__rm} -f .mozconfig From 8b5d782447b8d13609f76464a2b6d1233dad58b9 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 6 Feb 2013 10:05:46 +0100 Subject: [PATCH 089/239] Update to 18.0.2 --- sources | 2 +- xulrunner.spec | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sources b/sources index 678e3d6..82ba768 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8b400555fc7063163e3b99472d0c92a1 xulrunner-18.0.1.source.tar.bz2 +a7a20f52a3ffdd8d2fafa8a1a1db49c7 xulrunner-18.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index e498bc1..9693110 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -2,10 +2,10 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} <= 18 -%define system_sqlite 0 -%else +%if 0%{?fedora} <= 19 %define system_sqlite 1 +%else +%define system_sqlite 0 %endif # Use system cairo? @@ -74,7 +74,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 18.0.1 +Version: 18.0.2 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -508,6 +508,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 6 2013 Jan Horak - 18.0.2-1 +- Update to 18.0.2 + * Fri Jan 25 2013 Jan Horak - 18.0.1-1 - Update to 18.0.1 From e5d27ba2df72d733543de8256e555dfbe4d25bef Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 6 Feb 2013 11:20:32 +0100 Subject: [PATCH 090/239] fixed system sqlite define --- xulrunner.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 9693110..0c4d9f2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -2,10 +2,10 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} <= 19 -%define system_sqlite 1 -%else +%if 0%{?fedora} < 19 %define system_sqlite 0 +%else +%define system_sqlite 1 %endif # Use system cairo? From c0a99a1b7111598765a691436d407e959d2b29dc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Feb 2013 13:24:36 +0100 Subject: [PATCH 091/239] Update to 19.0, added fix for mozbz#239254 --- sources | 2 +- xulrunner.spec | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 82ba768..d6896f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7a20f52a3ffdd8d2fafa8a1a1db49c7 xulrunner-18.0.2.source.tar.bz2 +3dc732b6ce177792b43324f4bc7164d8 firefox-19.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 0c4d9f2..c6fbf30 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -42,6 +42,7 @@ %global beta_version 0 %global rc_version 0 +%global tarballname firefox %global mozappdir %{_libdir}/%{name} %global tarballdir mozilla-release @@ -74,12 +75,12 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 18.0.2 +Version: 19.0 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -Source0: ftp://ftp.mozilla.org/pub/%{name}/releases/%{version}%{?pre_version}/source/%{name}-%{version}%{?pre_version}.source.tar.bz2 +Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.bz2 Source10: %{name}-mozconfig Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js @@ -99,6 +100,7 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch101: mozilla-791626.patch +Patch102: mozilla-239254.patch # --------------------------------------------------- @@ -229,6 +231,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %patch101 -p1 -b .791626 +%patch102 -p1 -b .239254 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -508,6 +511,10 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 18 2013 Martin Stransky - 19.0-1 +- Update to 19.0 +- Added fix for mozbz#239254 + * Wed Feb 6 2013 Jan Horak - 18.0.2-1 - Update to 18.0.2 From 161f3f6fddd556eb071cb84c56fa1db5399e90a1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 18 Feb 2013 16:23:39 +0100 Subject: [PATCH 092/239] added missing patch --- mozilla-239254.patch | 483 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 483 insertions(+) create mode 100644 mozilla-239254.patch diff --git a/mozilla-239254.patch b/mozilla-239254.patch new file mode 100644 index 0000000..9ce3838 --- /dev/null +++ b/mozilla-239254.patch @@ -0,0 +1,483 @@ +# HG changeset patch +# Parent cb34bd8957ec517c72d506f7c439e3af1950e38d +# User Martin Stransky +Bug 239254 - [Linux] Support disk cache on a local path, r=michal.novotny + +diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp +--- a/netwerk/cache/nsCacheService.cpp ++++ b/netwerk/cache/nsCacheService.cpp +@@ -712,27 +712,18 @@ nsCacheProfilePrefObserver::ReadPrefs(ns + nsCOMPtr profDir; + NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, + getter_AddRefs(profDir)); + NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR, + getter_AddRefs(directory)); + if (!directory) + directory = profDir; + else if (profDir) { +- bool same; +- if (NS_SUCCEEDED(profDir->Equals(directory, &same)) && !same) { +- // We no longer store the cache directory in the main +- // profile directory, so we should cleanup the old one. +- rv = profDir->AppendNative(NS_LITERAL_CSTRING("Cache")); +- if (NS_SUCCEEDED(rv)) { +- bool exists; +- if (NS_SUCCEEDED(profDir->Exists(&exists)) && exists) +- nsDeleteDir::DeleteDir(profDir, false); +- } +- } ++ nsCacheService::MoveOrRemoveDiskCache(profDir, directory, ++ "Cache"); + } + } + // use file cache in build tree only if asked, to avoid cache dir litter + if (!directory && PR_GetEnv("NECKO_DEV_ENABLE_DISK_CACHE")) { + rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, + getter_AddRefs(directory)); + } + if (directory) +@@ -788,16 +779,20 @@ nsCacheProfilePrefObserver::ReadPrefs(ns + // try to get the profile directory (there may not be a profile yet) + nsCOMPtr profDir; + NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, + getter_AddRefs(profDir)); + NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR, + getter_AddRefs(directory)); + if (!directory) + directory = profDir; ++ else if (profDir) { ++ nsCacheService::MoveOrRemoveDiskCache(profDir, directory, ++ "OfflineCache"); ++ } + } + #if DEBUG + if (!directory) { + // use current process directory during development + rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, + getter_AddRefs(directory)); + } + #endif +@@ -3012,16 +3007,67 @@ nsCacheService::SetDiskSmartSize_Locked( + DispatchToCacheIOThread(event); + } else { + return NS_ERROR_FAILURE; + } + + return NS_OK; + } + ++void ++nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, ++ nsIFile *aNewCacheDir, ++ const char *aCacheSubdir) ++{ ++ bool same; ++ if (NS_FAILED(aOldCacheDir->Equals(aNewCacheDir, &same)) || same) ++ return; ++ ++ nsCOMPtr aOldCacheSubdir; ++ aOldCacheDir->Clone(getter_AddRefs(aOldCacheSubdir)); ++ ++ nsresult rv = aOldCacheSubdir->AppendNative( ++ nsDependentCString(aCacheSubdir)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ bool exists; ++ if (NS_FAILED(aOldCacheSubdir->Exists(&exists)) || !exists) ++ return; ++ ++ nsCOMPtr aNewCacheSubdir; ++ aNewCacheDir->Clone(getter_AddRefs(aNewCacheSubdir)); ++ ++ rv = aNewCacheSubdir->AppendNative(nsDependentCString(aCacheSubdir)); ++ if (NS_FAILED(rv)) ++ return; ++ ++ nsAutoCString newPath; ++ rv = aNewCacheSubdir->GetNativePath(newPath); ++ if (NS_FAILED(rv)) ++ return; ++ ++ if (NS_SUCCEEDED(aNewCacheSubdir->Exists(&exists)) && !exists) { ++ // New cache directory does not exist, try to move the old one here ++ // rename needs an empty target directory ++ rv = aNewCacheSubdir->Create(nsIFile::DIRECTORY_TYPE, 0777); ++ if (NS_SUCCEEDED(rv)) { ++ nsAutoCString oldPath; ++ rv = aOldCacheSubdir->GetNativePath(oldPath); ++ if (NS_FAILED(rv)) ++ return; ++ if(rename(oldPath.get(), newPath.get()) == 0) ++ return; ++ } ++ } ++ ++ // Delay delete by 1 minute to avoid IO thrash on startup. ++ nsDeleteDir::DeleteDir(aOldCacheSubdir, false, 60000); ++} ++ + static bool + IsEntryPrivate(nsCacheEntry* entry) + { + return entry->IsPrivate(); + } + + void + nsCacheService::LeavePrivateBrowsing() +diff --git a/netwerk/cache/nsCacheService.h b/netwerk/cache/nsCacheService.h +--- a/netwerk/cache/nsCacheService.h ++++ b/netwerk/cache/nsCacheService.h +@@ -194,16 +194,20 @@ public: + + static void SetMemoryCache(); + + static void SetCacheCompressionLevel(int32_t level); + + // Starts smart cache size computation if disk device is available + static nsresult SetDiskSmartSize(); + ++ static void MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, ++ nsIFile *aNewCacheDir, ++ const char *aCacheSubdir); ++ + nsresult Init(); + void Shutdown(); + + static bool IsInitialized() + { + if (!gService) { + return false; + } +diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp +--- a/startupcache/StartupCache.cpp ++++ b/startupcache/StartupCache.cpp +@@ -168,16 +168,30 @@ StartupCache::Init() + nsCOMPtr file; + rv = NS_GetSpecialDirectory("ProfLDS", + getter_AddRefs(file)); + if (NS_FAILED(rv)) { + // return silently, this will fail in mochitests's xpcshell process. + return rv; + } + ++ nsCOMPtr profDir; ++ NS_GetSpecialDirectory("ProfDS", getter_AddRefs(profDir)); ++ if (profDir) { ++ bool same; ++ if (NS_SUCCEEDED(profDir->Equals(file, &same)) && !same) { ++ // We no longer store the startup cache in the main profile ++ // directory, so we should cleanup the old one. ++ if (NS_SUCCEEDED( ++ profDir->AppendNative(NS_LITERAL_CSTRING("startupCache")))) { ++ profDir->Remove(true); ++ } ++ } ++ } ++ + rv = file->AppendNative(NS_LITERAL_CSTRING("startupCache")); + NS_ENSURE_SUCCESS(rv, rv); + + // Try to create the directory if it's not there yet + rv = file->Create(nsIFile::DIRECTORY_TYPE, 0777); + if (NS_FAILED(rv) && rv != NS_ERROR_FILE_ALREADY_EXISTS) + return rv; + +diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp +--- a/toolkit/xre/nsXREDirProvider.cpp ++++ b/toolkit/xre/nsXREDirProvider.cpp +@@ -1170,18 +1170,32 @@ nsXREDirProvider::GetUserDataDirectoryHo + #elif defined(MOZ_WIDGET_GONK) + rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true, + getter_AddRefs(localDir)); + #elif defined(XP_UNIX) + const char* homeDir = getenv("HOME"); + if (!homeDir || !*homeDir) + return NS_ERROR_FAILURE; + +- rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, +- getter_AddRefs(localDir)); ++ if (aLocal) { ++ // If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache. ++ const char* cacheHome = getenv("XDG_CACHE_HOME"); ++ if (cacheHome && *cacheHome) { ++ rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true, ++ getter_AddRefs(localDir)); ++ } else { ++ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, ++ getter_AddRefs(localDir)); ++ if (NS_SUCCEEDED(rv)) ++ rv = localDir->AppendNative(NS_LITERAL_CSTRING(".cache")); ++ } ++ } else { ++ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, ++ getter_AddRefs(localDir)); ++ } + #else + #error "Don't know how to get product dir on your platform" + #endif + + NS_IF_ADDREF(*aFile = localDir); + return rv; + } + +@@ -1256,17 +1270,17 @@ nsXREDirProvider::GetUserDataDirectory(n + const nsACString* aProfileName, + const nsACString* aAppName, + const nsACString* aVendorName) + { + nsCOMPtr localDir; + nsresult rv = GetUserDataDirectoryHome(getter_AddRefs(localDir), aLocal); + NS_ENSURE_SUCCESS(rv, rv); + +- rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName); ++ rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName, aLocal); + NS_ENSURE_SUCCESS(rv, rv); + + #ifdef DEBUG_jungshik + nsAutoCString cwd; + localDir->GetNativePath(cwd); + printf("nsXREDirProvider::GetUserDataDirectory: %s\n", cwd.get()); + #endif + rv = EnsureDirectoryExists(localDir); +@@ -1377,17 +1391,18 @@ nsXREDirProvider::AppendSysUserExtension + return NS_OK; + } + + + nsresult + nsXREDirProvider::AppendProfilePath(nsIFile* aFile, + const nsACString* aProfileName, + const nsACString* aAppName, +- const nsACString* aVendorName) ++ const nsACString* aVendorName, ++ bool aLocal) + { + NS_ASSERTION(aFile, "Null pointer!"); + + if (!gAppData) { + return NS_ERROR_FAILURE; + } + + nsAutoCString profile; +@@ -1439,28 +1454,31 @@ nsXREDirProvider::AppendProfilePath(nsIF + // The parent of this directory is set in GetUserDataDirectoryHome + // XXX: handle gAppData->profile properly + // XXXsmaug ...and the rest of the profile creation! + MOZ_ASSERT(!aAppName, + "Profile creation for external applications is not implemented!"); + rv = aFile->AppendNative(nsDependentCString("mozilla")); + NS_ENSURE_SUCCESS(rv, rv); + #elif defined(XP_UNIX) +- // Make it hidden (i.e. using the ".") +- nsAutoCString folder("."); ++ nsAutoCString folder; ++ // Make it hidden (by starting with "."), except when local (the ++ // profile is already under ~/.cache or XDG_CACHE_HOME). ++ if (!aLocal) ++ folder.Assign('.'); + + if (!profile.IsEmpty()) { + // Skip any leading path characters + const char* profileStart = profile.get(); + while (*profileStart == '/' || *profileStart == '\\') + profileStart++; + + // On the off chance that someone wanted their folder to be hidden don't + // let it become ".." +- if (*profileStart == '.') ++ if (*profileStart == '.' && !aLocal) + profileStart++; + + folder.Append(profileStart); + ToLowerCase(folder); + + rv = AppendProfileString(aFile, folder.BeginReading()); + } + else { +diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h +--- a/toolkit/xre/nsXREDirProvider.h ++++ b/toolkit/xre/nsXREDirProvider.h +@@ -109,17 +109,18 @@ protected: + static nsresult EnsureDirectoryExists(nsIFile* aDirectory); + void EnsureProfileFileExists(nsIFile* aFile); + + // Determine the profile path within the UAppData directory. This is different + // on every major platform. + static nsresult AppendProfilePath(nsIFile* aFile, + const nsACString* aProfileName, + const nsACString* aAppName, +- const nsACString* aVendorName); ++ const nsACString* aVendorName, ++ bool aLocal); + + static nsresult AppendSysUserExtensionPath(nsIFile* aFile); + + // Internal helper that splits a path into components using the '/' and '\\' + // delimiters. + static inline nsresult AppendProfileString(nsIFile* aFile, const char* aPath); + + // Calculate and register extension and theme bundle directories. +# HG changeset patch +# User Tim Taubert +# Date 1360362227 -3600 +# Node ID 873170d2679ac23114f22543cee3214a940abef3 +Bug 239254 - [Linux] Migrate existing thumbnails to their new local path + +diff --git a/browser/components/thumbnails/PageThumbs.jsm b/browser/components/thumbnails/PageThumbs.jsm +--- a/browser/components/thumbnails/PageThumbs.jsm ++++ b/browser/components/thumbnails/PageThumbs.jsm +@@ -7,17 +7,17 @@ + this.EXPORTED_SYMBOLS = ["PageThumbs", "PageThumbsStorage"]; + + const Cu = Components.utils; + const Cc = Components.classes; + const Ci = Components.interfaces; + + const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; + const PREF_STORAGE_VERSION = "browser.pagethumbnails.storage_version"; +-const LATEST_STORAGE_VERSION = 2; ++const LATEST_STORAGE_VERSION = 3; + + const EXPIRATION_MIN_CHUNK_SIZE = 50; + const EXPIRATION_INTERVAL_SECS = 3600; + + /** + * Name of the directory in the profile that contains the thumbnails. + */ + const THUMBNAIL_DIRECTORY = "thumbnails"; +@@ -359,47 +359,51 @@ let PageThumbsStorageMigrator = { + + set currentVersion(aVersion) { + Services.prefs.setIntPref(PREF_STORAGE_VERSION, aVersion); + }, + + migrate: function Migrator_migrate() { + let version = this.currentVersion; + +- if (version < 1) { +- this.removeThumbnailsFromRoamingProfile(); +- } +- if (version < 2) { +- this.renameThumbnailsFolder(); ++ // Storage version 1 never made it to beta. ++ // At the time of writing only Windows had (ProfD != ProfLD) and we ++ // needed to move thumbnails from the roaming profile to the locale ++ // one so that they're not needlessly included in backups and/or ++ // written via SMB. ++ ++ // Storage version 2 also never made it to beta. ++ // The thumbnail folder structure has been changed and old thumbnails ++ // were not migrated. Instead, we just renamed the current folder to ++ // "-old" and will remove it later. ++ ++ if (version < 3) { ++ this.migrateToVersion3(); + } + + this.currentVersion = LATEST_STORAGE_VERSION; + }, + +- removeThumbnailsFromRoamingProfile: +- function Migrator_removeThumbnailsFromRoamingProfile() { +- let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]); ++ /** ++ * Bug 239254 added support for having the disk cache and thumbnail ++ * directories on a local path (i.e. ~/.cache/) under Linux. We'll first ++ * try to move the old thumbnails to their new location. If that's not ++ * possible (because ProfD might be on a different file system than ++ * ProfLD) we'll just discard them. ++ */ ++ migrateToVersion3: function Migrator_migrateToVersion3() { ++ let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY], true); + let roaming = FileUtils.getDir("ProfD", [THUMBNAIL_DIRECTORY]); + +- if (!roaming.equals(local) && roaming.exists()) { +- roaming.followLinks = false; +- try { +- roaming.remove(true); +- } catch (e) { +- // The directory might not exist or we're not permitted to remove it. +- } +- } +- }, +- +- renameThumbnailsFolder: function Migrator_renameThumbnailsFolder() { +- let dir = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]); +- try { +- dir.moveTo(null, dir.leafName + "-old"); +- } catch (e) { +- // The directory might not exist or we're not permitted to rename it. ++ if (!roaming.equals(local)) { ++ PageThumbsWorker.postMessage({ ++ type: "moveOrDeleteAllThumbnails", ++ from: roaming.path, ++ to: local.path ++ }); + } + } + }; + + let PageThumbsExpiration = { + _filters: [], + + init: function Expiration_init() { +diff --git a/browser/components/thumbnails/PageThumbsWorker.js b/browser/components/thumbnails/PageThumbsWorker.js +--- a/browser/components/thumbnails/PageThumbsWorker.js ++++ b/browser/components/thumbnails/PageThumbsWorker.js +@@ -20,16 +20,19 @@ let PageThumbsWorker = { + + switch (msg.type) { + case "removeFile": + data.result = this.removeFile(msg); + break; + case "expireFilesInDirectory": + data.result = this.expireFilesInDirectory(msg); + break; ++ case "moveOrDeleteAllThumbnails": ++ data.result = this.moveOrDeleteAllThumbnails(msg); ++ break; + default: + data.result = false; + data.detail = "message not understood"; + break; + } + + self.postMessage(data); + }, +@@ -62,12 +65,35 @@ let PageThumbsWorker = { + getFileEntriesInDirectory: + function Worker_getFileEntriesInDirectory(aPath, aSkipFiles) { + let skip = new Set(aSkipFiles); + let iter = new OS.File.DirectoryIterator(aPath); + + return [entry + for (entry in iter) + if (!entry.isDir && !entry.isSymLink && !skip.has(entry.name))]; ++ }, ++ ++ moveOrDeleteAllThumbnails: ++ function Worker_moveOrDeleteAllThumbnails(msg) { ++ if (!OS.File.exists(msg.from)) ++ return true; ++ ++ let iter = new OS.File.DirectoryIterator(msg.from); ++ for (let entry in iter) { ++ if (!entry.isDir && !entry.isSymLink) { ++ let from = OS.Path.join(msg.from, entry.name); ++ let to = OS.Path.join(msg.to, entry.name); ++ ++ try { ++ OS.File.move(from, to, {noOverwrite: true, noCopy: true}); ++ } catch (e) { ++ OS.File.remove(from); ++ } ++ } ++ } ++ ++ OS.File.removeEmptyDir(msg.from); ++ return true; + } + }; + + self.onmessage = PageThumbsWorker.handleMessage.bind(PageThumbsWorker); From 11886b8d73c39da65cbf5ddc2bd03c94522c8396 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 20 Feb 2013 16:22:37 +0100 Subject: [PATCH 093/239] Added fix for rhbz#911314 (ppc only) --- rhbz-911314.patch | 547 ++++++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 12 +- 2 files changed, 558 insertions(+), 1 deletion(-) create mode 100644 rhbz-911314.patch diff --git a/rhbz-911314.patch b/rhbz-911314.patch new file mode 100644 index 0000000..4f1cfa0 --- /dev/null +++ b/rhbz-911314.patch @@ -0,0 +1,547 @@ +Use the runtime page size to control arena decommit (RHBZ#911314) +Return success when decommit is disabled + +Author: Gustavo Luiz Duarte +Based on Terrence Cole's patch v0 on MOZ#840242 + +Index: mozilla-release/js/src/gc/Heap.h +=================================================================== +--- mozilla-release.orig/js/src/gc/Heap.h ++++ mozilla-release/js/src/gc/Heap.h +@@ -800,7 +800,7 @@ struct Chunk + + /* Search for a decommitted arena to allocate. */ + unsigned findDecommittedArenaOffset(); +- ArenaHeader* fetchNextDecommittedArena(); ++ ArenaHeader* fetchNextDecommittedArena(JSRuntime *rt); + + public: + /* Unlink and return the freeArenasHead. */ +Index: mozilla-release/js/src/gc/Memory.cpp +=================================================================== +--- mozilla-release.orig/js/src/gc/Memory.cpp ++++ mozilla-release/js/src/gc/Memory.cpp +@@ -8,6 +8,7 @@ + #include "mozilla/Assertions.h" + + #include "jstypes.h" ++#include "jscntxt.h" + + #include "js/Utility.h" + #include "gc/Memory.h" +@@ -19,39 +20,34 @@ namespace gc { + extern const size_t PageSize; + extern const size_t ArenaSize; + static bool +-DecommitEnabled() ++DecommitEnabled(JSRuntime *rt) + { +- return PageSize == ArenaSize; ++ return rt->gcSystemPageSize == ArenaSize; + } + + #if defined(XP_WIN) + #include "jswin.h" + #include + +-static size_t AllocationGranularity = 0; +- + void +-InitMemorySubsystem() ++InitMemorySubsystem(JSRuntime *rt) + { + SYSTEM_INFO sysinfo; + GetSystemInfo(&sysinfo); +- if (sysinfo.dwPageSize != PageSize) { +- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); +- MOZ_CRASH(); +- } +- AllocationGranularity = sysinfo.dwAllocationGranularity; ++ rt->gcSystemPageSize = sysinfo.dwPageSize; ++ rt->gcSystemAllocGranularity = sysinfo.dwAllocationGranularity; + } + + void * +-MapAlignedPages(size_t size, size_t alignment) ++MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) + { + JS_ASSERT(size >= alignment); + JS_ASSERT(size % alignment == 0); +- JS_ASSERT(size % PageSize == 0); +- JS_ASSERT(alignment % AllocationGranularity == 0); ++ JS_ASSERT(size % rt->gcSystemPageSize == 0); ++ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); + + /* Special case: If we want allocation alignment, no further work is needed. */ +- if (alignment == AllocationGranularity) { ++ if (alignment == rt->gcSystemAllocGranularity) { + return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + } + +@@ -75,7 +71,7 @@ MapAlignedPages(size_t size, size_t alig + if (!p) + return NULL; + void *chunkStart = (void *)(uintptr_t(p) + (alignment - (uintptr_t(p) % alignment))); +- UnmapPages(p, size * 2); ++ UnmapPages(rt, p, size * 2); + p = VirtualAlloc(chunkStart, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + + /* Failure here indicates a race with another thread, so try again. */ +@@ -86,26 +82,26 @@ MapAlignedPages(size_t size, size_t alig + } + + void +-UnmapPages(void *p, size_t size) ++UnmapPages(JSRuntime *rt, void *p, size_t size) + { + JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE)); + } + + bool +-MarkPagesUnused(void *p, size_t size) ++MarkPagesUnused(JSRuntime *rt, void *p, size_t size) + { +- if (!DecommitEnabled()) +- return false; ++ if (!DecommitEnabled(rt)) ++ return true; + +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + LPVOID p2 = VirtualAlloc(p, size, MEM_RESET, PAGE_READWRITE); + return p2 == p; + } + + bool +-MarkPagesInUse(void *p, size_t size) ++MarkPagesInUse(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + +@@ -127,12 +123,13 @@ GetPageFaultCount() + #define OS2_MAX_RECURSIONS 16 + + void +-InitMemorySubsystem() ++InitMemorySubsystem(JSRuntime *rt) + { ++ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = ArenaSize; + } + + void +-UnmapPages(void *addr, size_t size) ++UnmapPages(JSRuntime *rt, void *addr, size_t size) + { + if (!DosFreeMem(addr)) + return; +@@ -153,7 +150,7 @@ UnmapPages(void *addr, size_t size) + } + + static void * +-MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) ++MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) + { + if (++recursions >= OS2_MAX_RECURSIONS) + return NULL; +@@ -179,7 +176,7 @@ MapAlignedPagesRecursively(size_t size, + unsigned long rc = DosQueryMem(&(static_cast(tmp))[size], + &cb, &flags); + if (!rc && (flags & PAG_FREE) && cb >= filler) { +- UnmapPages(tmp, 0); ++ UnmapPages(rt, tmp, 0); + if (DosAllocMem(&tmp, filler, + OBJ_ANY | PAG_COMMIT | PAG_READ | PAG_WRITE)) { + JS_ALWAYS_TRUE(DosAllocMem(&tmp, filler, +@@ -187,19 +184,19 @@ MapAlignedPagesRecursively(size_t size, + } + } + +- void *p = MapAlignedPagesRecursively(size, alignment, recursions); +- UnmapPages(tmp, 0); ++ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); ++ UnmapPages(rt, tmp, 0); + + return p; + } + + void * +-MapAlignedPages(size_t size, size_t alignment) ++MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) + { + JS_ASSERT(size >= alignment); + JS_ASSERT(size % alignment == 0); +- JS_ASSERT(size % PageSize == 0); +- JS_ASSERT(alignment % PageSize == 0); ++ JS_ASSERT(size % rt->gcSystemPageSize == 0); ++ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); + + int recursions = -1; + +@@ -208,7 +205,7 @@ MapAlignedPages(size_t size, size_t alig + * of the right size by recursively allocating blocks of unaligned + * free memory until only an aligned allocation is possible. + */ +- void *p = MapAlignedPagesRecursively(size, alignment, recursions); ++ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); + if (p) + return p; + +@@ -230,16 +227,15 @@ MapAlignedPages(size_t size, size_t alig + } + + bool +-MarkPagesUnused(void *p, size_t size) +-{ +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + + bool +-MarkPagesInUse(void *p, size_t size) ++MarkPagesInUse(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + +@@ -259,17 +255,18 @@ GetPageFaultCount() + #endif + + void +-InitMemorySubsystem() ++InitMemorySubsystem(JSRuntime *rt) + { ++ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); + } + + void * +-MapAlignedPages(size_t size, size_t alignment) ++MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) + { + JS_ASSERT(size >= alignment); + JS_ASSERT(size % alignment == 0); +- JS_ASSERT(size % PageSize == 0); +- JS_ASSERT(alignment % PageSize == 0); ++ JS_ASSERT(size % rt->gcSystemPageSize == 0); ++ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); + + int prot = PROT_READ | PROT_WRITE; + int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC; +@@ -281,22 +278,22 @@ MapAlignedPages(size_t size, size_t alig + } + + void +-UnmapPages(void *p, size_t size) ++UnmapPages(JSRuntime *rt, void *p, size_t size) + { + JS_ALWAYS_TRUE(0 == munmap((caddr_t)p, size)); + } + + bool +-MarkPagesUnused(void *p, size_t size) ++MarkPagesUnused(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + + bool +-MarkPagesInUse(void *p, size_t size) ++MarkPagesInUse(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + +@@ -314,27 +311,24 @@ GetPageFaultCount() + #include + + void +-InitMemorySubsystem() ++InitMemorySubsystem(JSRuntime *rt) + { +- if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) { +- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); +- MOZ_CRASH(); +- } ++ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); + } + + void * +-MapAlignedPages(size_t size, size_t alignment) ++MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) + { + JS_ASSERT(size >= alignment); + JS_ASSERT(size % alignment == 0); +- JS_ASSERT(size % PageSize == 0); +- JS_ASSERT(alignment % PageSize == 0); ++ JS_ASSERT(size % rt->gcSystemPageSize == 0); ++ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); + + int prot = PROT_READ | PROT_WRITE; + int flags = MAP_PRIVATE | MAP_ANON; + + /* Special case: If we want page alignment, no further work is needed. */ +- if (alignment == PageSize) { ++ if (alignment == rt->gcSystemAllocGranularity) { + return mmap(NULL, size, prot, flags, -1, 0); + } + +@@ -360,26 +354,26 @@ MapAlignedPages(size_t size, size_t alig + } + + void +-UnmapPages(void *p, size_t size) ++UnmapPages(JSRuntime *rt, void *p, size_t size) + { + JS_ALWAYS_TRUE(0 == munmap(p, size)); + } + + bool +-MarkPagesUnused(void *p, size_t size) ++MarkPagesUnused(JSRuntime *rt, void *p, size_t size) + { +- if (!DecommitEnabled()) +- return false; ++ if (!DecommitEnabled(rt)) ++ return true; + +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + int result = madvise(p, size, MADV_DONTNEED); + return result != -1; + } + + bool +-MarkPagesInUse(void *p, size_t size) ++MarkPagesInUse(JSRuntime *rt, void *p, size_t size) + { +- JS_ASSERT(uintptr_t(p) % PageSize == 0); ++ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); + return true; + } + +Index: mozilla-release/js/src/gc/Memory.h +=================================================================== +--- mozilla-release.orig/js/src/gc/Memory.h ++++ mozilla-release/js/src/gc/Memory.h +@@ -16,20 +16,20 @@ namespace gc { + + // Sanity check that our compiled configuration matches the currently running + // instance and initialize any runtime data needed for allocation. +-void InitMemorySubsystem(); ++void InitMemorySubsystem(JSRuntime *rt); + + // Allocate or deallocate pages from the system with the given alignment. +-void *MapAlignedPages(size_t size, size_t alignment); +-void UnmapPages(void *p, size_t size); ++void *MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment); ++void UnmapPages(JSRuntime *rt, void *p, size_t size); + + // Tell the OS that the given pages are not in use, so they should not + // be written to a paging file. This may be a no-op on some platforms. +-bool MarkPagesUnused(void *p, size_t size); ++bool MarkPagesUnused(JSRuntime *rt, void *p, size_t size); + + // Undo |MarkPagesUnused|: tell the OS that the given pages are of interest + // and should be paged in and out normally. This may be a no-op on some + // platforms. +-bool MarkPagesInUse(void *p, size_t size); ++bool MarkPagesInUse(JSRuntime *rt, void *p, size_t size); + + // Returns #(hard faults) + #(soft faults) + size_t GetPageFaultCount(); +Index: mozilla-release/js/src/jsapi.cpp +=================================================================== +--- mozilla-release.orig/js/src/jsapi.cpp ++++ mozilla-release/js/src/jsapi.cpp +@@ -1105,8 +1105,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe + #undef MSG_DEF + #endif /* DEBUG */ + +- InitMemorySubsystem(); +- + if (!js::TlsPerThreadData.init()) + return NULL; + +Index: mozilla-release/js/src/jscntxt.h +=================================================================== +--- mozilla-release.orig/js/src/jscntxt.h ++++ mozilla-release/js/src/jscntxt.h +@@ -847,6 +847,15 @@ struct JSRuntime : js::RuntimeFriendFiel + /* Stack of thread-stack-allocated GC roots. */ + js::AutoGCRooter *autoGCRooters; + ++ /* ++ * The GC can only safely decommit memory when the page size of the ++ * running process matches the compiled arena size. ++ */ ++ size_t gcSystemPageSize; ++ ++ /* The OS allocation granularity may not match the page size. */ ++ size_t gcSystemAllocGranularity; ++ + /* Strong references on scripts held for PCCount profiling API. */ + js::ScriptAndCountsVector *scriptAndCountsVector; + +Index: mozilla-release/js/src/jsgc.cpp +=================================================================== +--- mozilla-release.orig/js/src/jsgc.cpp ++++ mozilla-release/js/src/jsgc.cpp +@@ -486,13 +486,13 @@ FinalizeArenas(FreeOp *fop, + } + + static inline Chunk * +-AllocChunk() { +- return static_cast(MapAlignedPages(ChunkSize, ChunkSize)); ++AllocChunk(JSRuntime *rt) { ++ return static_cast(MapAlignedPages(rt, ChunkSize, ChunkSize)); + } + + static inline void +-FreeChunk(Chunk *p) { +- UnmapPages(static_cast(p), ChunkSize); ++FreeChunk(JSRuntime *rt, Chunk *p) { ++ UnmapPages(rt, static_cast(p), ChunkSize); + } + + inline bool +@@ -582,25 +582,25 @@ ChunkPool::expire(JSRuntime *rt, bool re + } + + static void +-FreeChunkList(Chunk *chunkListHead) ++FreeChunkList(JSRuntime *rt, Chunk *chunkListHead) + { + while (Chunk *chunk = chunkListHead) { + JS_ASSERT(!chunk->info.numArenasFreeCommitted); + chunkListHead = chunk->info.next; +- FreeChunk(chunk); ++ FreeChunk(rt, chunk); + } + } + + void + ChunkPool::expireAndFree(JSRuntime *rt, bool releaseAll) + { +- FreeChunkList(expire(rt, releaseAll)); ++ FreeChunkList(rt, expire(rt, releaseAll)); + } + + /* static */ Chunk * + Chunk::allocate(JSRuntime *rt) + { +- Chunk *chunk = static_cast(AllocChunk()); ++ Chunk *chunk = static_cast(AllocChunk(rt)); + + #ifdef JSGC_ROOT_ANALYSIS + // Our poison pointers are not guaranteed to be invalid on 64-bit +@@ -613,7 +613,7 @@ Chunk::allocate(JSRuntime *rt) + // were marked as uncommitted, but it's a little complicated to avoid + // clobbering pre-existing unrelated mappings. + while (IsPoisonedPtr(chunk)) +- chunk = static_cast(AllocChunk()); ++ chunk = static_cast(AllocChunk(rt)); + #endif + + if (!chunk) +@@ -629,7 +629,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu + { + JS_ASSERT(chunk); + chunk->prepareToBeFreed(rt); +- FreeChunk(chunk); ++ FreeChunk(rt, chunk); + } + + inline void +@@ -745,7 +745,7 @@ Chunk::findDecommittedArenaOffset() + } + + ArenaHeader * +-Chunk::fetchNextDecommittedArena() ++Chunk::fetchNextDecommittedArena(JSRuntime *rt) + { + JS_ASSERT(info.numArenasFreeCommitted == 0); + JS_ASSERT(info.numArenasFree > 0); +@@ -756,7 +756,7 @@ Chunk::fetchNextDecommittedArena() + decommittedArenas.unset(offset); + + Arena *arena = &arenas[offset]; +- MarkPagesInUse(arena, ArenaSize); ++ MarkPagesInUse(rt, arena, ArenaSize); + arena->aheader.setAsNotAllocated(); + + return &arena->aheader; +@@ -790,7 +790,7 @@ Chunk::allocateArena(JSCompartment *comp + + ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0) + ? fetchNextFreeArena(rt) +- : fetchNextDecommittedArena(); ++ : fetchNextDecommittedArena(rt); + aheader->init(comp, thingKind); + if (JS_UNLIKELY(!hasAvailableArenas())) + removeFromAvailableList(); +@@ -893,6 +893,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ + JSBool + js_InitGC(JSRuntime *rt, uint32_t maxbytes) + { ++ InitMemorySubsystem(rt); ++ + if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) + return false; + +@@ -2745,7 +2747,7 @@ DecommitArenasFromAvailableList(JSRuntim + Maybe maybeUnlock; + if (!rt->isHeapBusy()) + maybeUnlock.construct(rt); +- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); ++ ok = MarkPagesUnused(rt, aheader->getArena(), ArenaSize); + } + + if (ok) { +@@ -2813,7 +2815,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo + { + if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { + AutoUnlockGC unlock(rt); +- FreeChunkList(toFree); ++ FreeChunkList(rt, toFree); + } + + if (shouldShrink) +Index: mozilla-release/js/public/HeapAPI.h +=================================================================== +--- mozilla-release.orig/js/public/HeapAPI.h ++++ mozilla-release/js/public/HeapAPI.h +@@ -11,24 +11,7 @@ + namespace js { + namespace gc { + +-/* +- * Page size must be static to support our arena pointer optimizations, so we +- * are forced to support each platform with non-4096 pages as a special case. +- * Note: The freelist supports a maximum arena shift of 15. +- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. +- */ +-#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ +- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) +-const size_t PageShift = 13; +-const size_t ArenaShift = PageShift; +-#elif defined(__powerpc64__) +-const size_t PageShift = 16; + const size_t ArenaShift = 12; +-#else +-const size_t PageShift = 12; +-const size_t ArenaShift = PageShift; +-#endif +-const size_t PageSize = size_t(1) << PageShift; + const size_t ArenaSize = size_t(1) << ArenaShift; + const size_t ArenaMask = ArenaSize - 1; + diff --git a/xulrunner.spec b/xulrunner.spec index c6fbf30..ffa4087 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,6 +97,9 @@ Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch +%ifarch ppc ppc64 +Patch21: rhbz-911314.patch +%endif # Upstream patches Patch101: mozilla-791626.patch @@ -230,6 +233,10 @@ cd %{tarballdir} %patch19 -p2 -b .rhbz-304121 %patch20 -p2 -b .pk +%ifarch ppc ppc64 +%patch21 -p1 -b .ppc +%endif + %patch101 -p1 -b .791626 %patch102 -p1 -b .239254 @@ -511,6 +518,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Feb 20 2013 Martin Stransky - 19.0-2 +- Added fix for rhbz#911314 (ppc only) + * Mon Feb 18 2013 Martin Stransky - 19.0-1 - Update to 19.0 - Added fix for mozbz#239254 From 4a06d2827ae2752600e46e40d8fe18b74e477bf6 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 11 Mar 2013 17:00:29 +0100 Subject: [PATCH 094/239] Update to 19.0.2 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index d6896f8..a9d71e1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3dc732b6ce177792b43324f4bc7164d8 firefox-19.0.source.tar.bz2 +de09d603c3b768a1698d90141f3b2644 firefox-19.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index ffa4087..1055d4a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,8 +75,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 19.0 -Release: 2%{?pre_tag}%{?dist} +Version: 19.0.2 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -518,6 +518,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Mar 11 2013 Martin Stransky - 19.0.2-1 +- Update to 19.0.2 + * Wed Feb 20 2013 Martin Stransky - 19.0-2 - Added fix for rhbz#911314 (ppc only) From 73a15815d23ea3a291a411aee76cd492f67334dc Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 14 Mar 2013 11:37:17 +0100 Subject: [PATCH 095/239] Include patch rhbz-911314.patch to all arches --- xulrunner.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 1055d4a..f565b8f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,9 +97,7 @@ Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -%ifarch ppc ppc64 Patch21: rhbz-911314.patch -%endif # Upstream patches Patch101: mozilla-791626.patch @@ -518,7 +516,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Mar 11 2013 Martin Stransky - 19.0.2-1 +* Mon Mar 11 2013 Martin Stransky - 19.0.2-2 - Update to 19.0.2 * Wed Feb 20 2013 Martin Stransky - 19.0-2 From d35150669e571de42d4fcc991df4c54b47517626 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Thu, 14 Mar 2013 14:01:07 +0100 Subject: [PATCH 096/239] package ppc patch in srpm even if srpm is built on other archs, otherwise koji will complain with 'file not found' --- xulrunner.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 1055d4a..6c5c75c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,9 +97,7 @@ Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -%ifarch ppc ppc64 Patch21: rhbz-911314.patch -%endif # Upstream patches Patch101: mozilla-791626.patch @@ -518,6 +516,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 13 2013 Karsten Hopp 19.0.2-2 +- package ppc specific patch file in srpm + * Mon Mar 11 2013 Martin Stransky - 19.0.2-1 - Update to 19.0.2 From c81a4e05464b12aa666774d7739637fdc0b2e09e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 19 Mar 2013 08:27:18 +0100 Subject: [PATCH 097/239] * Tue Mar 19 2013 Martin Stransky - 19.0.2-3 - Added fix for mozbz#826171/rhbz#922904 - strndup implementation in memory/build/mozmemory_wrap.c is broken --- mozilla-826171.patch | 33 +++++++++++++++++++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 mozilla-826171.patch diff --git a/mozilla-826171.patch b/mozilla-826171.patch new file mode 100644 index 0000000..e323573 --- /dev/null +++ b/mozilla-826171.patch @@ -0,0 +1,33 @@ +# HG changeset patch +# User Mike Hommey +# Date 1357203308 -3600 +# Node ID a7cd7d7d3fa7f2e9dbf2f603826731b81ad4c0a9 +# Parent 2158dce6ec174ce3723fba875c9531680c4ac1ed +Bug 826171 - Fix strndup in memory/build/mozmemory_wrap.c + +diff --git a/memory/build/mozmemory_wrap.c b/memory/build/mozmemory_wrap.c +--- a/memory/build/mozmemory_wrap.c ++++ b/memory/build/mozmemory_wrap.c +@@ -68,18 +68,20 @@ mozmem_malloc_impl(_ZdaPvRKSt9nothrow_t) + #undef strndup + #undef strdup + + #ifndef XP_DARWIN + MOZ_MEMORY_API char * + strndup_impl(const char *src, size_t len) + { + char* dst = (char*) malloc_impl(len + 1); +- if (dst) +- strncpy(dst, src, len + 1); ++ if (dst) { ++ strncpy(dst, src, len); ++ dst[len] = '\0'; ++ } + return dst; + } + + MOZ_MEMORY_API char * + strdup_impl(const char *src) + { + size_t len = strlen(src); + return strndup_impl(src, len); diff --git a/xulrunner.spec b/xulrunner.spec index f565b8f..ef39295 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0.2 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,6 +102,7 @@ Patch21: rhbz-911314.patch # Upstream patches Patch101: mozilla-791626.patch Patch102: mozilla-239254.patch +Patch103: mozilla-826171.patch # --------------------------------------------------- @@ -237,6 +238,7 @@ cd %{tarballdir} %patch101 -p1 -b .791626 %patch102 -p1 -b .239254 +%patch103 -p1 -b .826171 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -516,6 +518,10 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 19 2013 Martin Stransky - 19.0.2-3 +- Added fix for mozbz#826171/rhbz#922904 - strndup implementation + in memory/build/mozmemory_wrap.c is broken + * Mon Mar 11 2013 Martin Stransky - 19.0.2-2 - Update to 19.0.2 From 55bbfab739ac7b3c211ed1d88e89a00b3341ca18 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 19 Mar 2013 14:57:37 +0100 Subject: [PATCH 098/239] * Tue Mar 19 2013 Martin Stransky - 19.0.2-4 - Added fix for rhbz#913284 - Firefox segfaults in mozilla::gfx::AlphaBoxBlur::BoxBlur_C() on PPC64 --- mozilla-844883.patch | 17 +++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 mozilla-844883.patch diff --git a/mozilla-844883.patch b/mozilla-844883.patch new file mode 100644 index 0000000..9298d7d --- /dev/null +++ b/mozilla-844883.patch @@ -0,0 +1,17 @@ +# HG changeset patch +# Parent f8a3e008d03b538873a8d4f16fb97829f171517b +# User Steve Singer +bug 844883 use a signed value for the stride + +diff -r f8a3e008d03b -r a298fedfda70 gfx/2d/Blur.cpp +--- a/gfx/2d/Blur.cpp Sun Mar 17 00:55:23 2013 -0400 ++++ b/gfx/2d/Blur.cpp Sun Mar 17 01:28:39 2013 -0400 +@@ -650,7 +650,7 @@ + return; + } + +- uint32_t stride32bit = aIntegralImageStride / 4; ++ int32_t stride32bit = aIntegralImageStride / 4; + + int32_t leftInflation = RoundUpToMultipleOf4(aLeftLobe).value(); + diff --git a/xulrunner.spec b/xulrunner.spec index ef39295..cadd5e1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 19.0.2 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -103,6 +103,7 @@ Patch21: rhbz-911314.patch Patch101: mozilla-791626.patch Patch102: mozilla-239254.patch Patch103: mozilla-826171.patch +Patch104: mozilla-844883.patch # --------------------------------------------------- @@ -234,6 +235,7 @@ cd %{tarballdir} %patch20 -p2 -b .pk %ifarch ppc ppc64 %patch21 -p1 -b .ppc +%patch104 -p1 -b .844883 %endif %patch101 -p1 -b .791626 @@ -518,6 +520,10 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 19 2013 Martin Stransky - 19.0.2-4 +- Added fix for rhbz#913284 - Firefox segfaults + in mozilla::gfx::AlphaBoxBlur::BoxBlur_C() on PPC64 + * Tue Mar 19 2013 Martin Stransky - 19.0.2-3 - Added fix for mozbz#826171/rhbz#922904 - strndup implementation in memory/build/mozmemory_wrap.c is broken From 38dfdbf9ef24aa76f5f0170a2347c8a1b66be9a1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 1 Apr 2013 11:30:09 +0200 Subject: [PATCH 099/239] Update to 20.0 --- mozilla-826171.patch | 33 --------------------------------- rhbz-304121.patch | 13 ++++++------- sources | 2 +- xulrunner.spec | 9 +++++---- 4 files changed, 12 insertions(+), 45 deletions(-) delete mode 100644 mozilla-826171.patch diff --git a/mozilla-826171.patch b/mozilla-826171.patch deleted file mode 100644 index e323573..0000000 --- a/mozilla-826171.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset patch -# User Mike Hommey -# Date 1357203308 -3600 -# Node ID a7cd7d7d3fa7f2e9dbf2f603826731b81ad4c0a9 -# Parent 2158dce6ec174ce3723fba875c9531680c4ac1ed -Bug 826171 - Fix strndup in memory/build/mozmemory_wrap.c - -diff --git a/memory/build/mozmemory_wrap.c b/memory/build/mozmemory_wrap.c ---- a/memory/build/mozmemory_wrap.c -+++ b/memory/build/mozmemory_wrap.c -@@ -68,18 +68,20 @@ mozmem_malloc_impl(_ZdaPvRKSt9nothrow_t) - #undef strndup - #undef strdup - - #ifndef XP_DARWIN - MOZ_MEMORY_API char * - strndup_impl(const char *src, size_t len) - { - char* dst = (char*) malloc_impl(len + 1); -- if (dst) -- strncpy(dst, src, len + 1); -+ if (dst) { -+ strncpy(dst, src, len); -+ dst[len] = '\0'; -+ } - return dst; - } - - MOZ_MEMORY_API char * - strdup_impl(const char *src) - { - size_t len = strlen(src); - return strndup_impl(src, len); diff --git a/rhbz-304121.patch b/rhbz-304121.patch index 941aca2..d8d8ac3 100644 --- a/rhbz-304121.patch +++ b/rhbz-304121.patch @@ -1,13 +1,12 @@ -diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile.old firefox-18.0/mozilla-release/media/webrtc/trunk/Makefile -diff -up firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py ---- firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.old 2013-01-05 00:44:41.000000000 +0100 -+++ firefox-18.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-01-10 14:48:58.418321640 +0100 -@@ -376,7 +376,7 @@ class MakefileGenerator(object): +diff -up xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.rhbz-304121 xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py +--- xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.rhbz-304121 2013-03-26 23:17:58.000000000 +0100 ++++ xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-04-01 11:11:56.938411785 +0200 +@@ -377,7 +377,7 @@ class MakefileGenerator(object): WriteMakefile(output_file, data, build_file, depth, top, # we set srcdir up one directory, since the subdir # doesn't actually exist in the source directory - swapslashes(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0])), + swapslashes(os.path.normpath(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0]))), - self.relative_srcdir) + self.relative_srcdir, + self.common_mk_path) return True - diff --git a/sources b/sources index a9d71e1..1dbc77f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -de09d603c3b768a1698d90141f3b2644 firefox-19.0.2.source.tar.bz2 +e664416da2075f13089fe3e883cadb73 firefox-20.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index cadd5e1..2a1a056 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,8 +75,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 19.0.2 -Release: 4%{?pre_tag}%{?dist} +Version: 20.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,7 +102,6 @@ Patch21: rhbz-911314.patch # Upstream patches Patch101: mozilla-791626.patch Patch102: mozilla-239254.patch -Patch103: mozilla-826171.patch Patch104: mozilla-844883.patch # --------------------------------------------------- @@ -240,7 +239,6 @@ cd %{tarballdir} %patch101 -p1 -b .791626 %patch102 -p1 -b .239254 -%patch103 -p1 -b .826171 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -520,6 +518,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 19 2013 Martin Stransky - 20.0-1 +- Update to latest upstream (20.0) + * Tue Mar 19 2013 Martin Stransky - 19.0.2-4 - Added fix for rhbz#913284 - Firefox segfaults in mozilla::gfx::AlphaBoxBlur::BoxBlur_C() on PPC64 From faf2784516331313ac23e68becdfdf73f706678a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 1 Apr 2013 12:32:36 +0200 Subject: [PATCH 100/239] build fix --- xulrunner.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 2a1a056..90b20cf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -487,7 +487,6 @@ fi %{mozappdir}/components/*.so %{mozappdir}/components/*.manifest %{mozappdir}/omni.ja -%{mozappdir}/plugins %{mozappdir}/*.so %{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh @@ -514,6 +513,9 @@ fi %{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell +%{mozappdir}/js-gdb.py +%ghost %{mozappdir}/js-gdb.pyc +%ghost %{mozappdir}/js-gdb.pyo #--------------------------------------------------------------------- From 3b6649ae7efd1ffd2bd0acd5c960584eef1445c1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Apr 2013 09:56:22 +0200 Subject: [PATCH 101/239] A workaround for Bug 928353 - firefox i686 crashes for a number of web pages --- xulrunner.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 90b20cf..c681684 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -98,6 +98,7 @@ Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch +Patch22: rhbz-928353.patch # Upstream patches Patch101: mozilla-791626.patch @@ -237,6 +238,12 @@ cd %{tarballdir} %patch104 -p1 -b .844883 %endif +%if 0%{?fedora} >= 19 +%ifarch %{ix86} +%patch22 -p2 +%endif +%endif + %patch101 -p1 -b .791626 %patch102 -p1 -b .239254 From 163c167d1d169f7ac45dc6e08c038c6bfcd1c20f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Apr 2013 10:10:06 +0200 Subject: [PATCH 102/239] release up --- xulrunner.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index c681684..db0ada6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 20.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -527,6 +527,10 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 3 2013 Martin Stransky - 20.0-2 +- A workaround for Bug 928353 - firefox i686 crashes + for a number of web pages + * Tue Mar 19 2013 Martin Stransky - 20.0-1 - Update to latest upstream (20.0) From 76cde3aca777d99857bf2973734e70b55654d4c1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Apr 2013 10:58:24 +0200 Subject: [PATCH 103/239] Added missing patch --- rhbz-928353.patch | 114 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 rhbz-928353.patch diff --git a/rhbz-928353.patch b/rhbz-928353.patch new file mode 100644 index 0000000..14a5ba1 --- /dev/null +++ b/rhbz-928353.patch @@ -0,0 +1,114 @@ +diff -r -U2 xulrunner-20.0/mozilla-release/config/Makefile.in xulrunner-20.0.new/mozilla-release/config/Makefile.in +--- xulrunner-20.0/mozilla-release/config/Makefile.in 2013-03-26 18:17:37.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/config/Makefile.in 2013-03-30 01:50:11.109526990 -0400 +@@ -38,5 +38,5 @@ + + ifdef GNU_CC +-MODULE_OPTIMIZE_FLAGS = -O3 ++MODULE_OPTIMIZE_FLAGS = -Os + endif + +diff -r -U2 xulrunner-20.0/mozilla-release/configure.in xulrunner-20.0.new/mozilla-release/configure.in +--- xulrunner-20.0/mozilla-release/configure.in 2013-03-26 18:17:37.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/configure.in 2013-03-30 01:50:03.474547207 -0400 +@@ -1848,5 +1848,5 @@ + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" + HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" + ;; + +@@ -1854,5 +1854,5 @@ + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" + HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" + ;; + +@@ -1961,5 +1961,5 @@ + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' +- MOZ_OPTIMIZE_FLAGS="-O3" ++ MOZ_OPTIMIZE_FLAGS="-Os" + _PEDANTIC= + # Statically disable jemalloc on 10.5 and 32-bit 10.6. See bug 702250. +@@ -2106,5 +2106,5 @@ + MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" + esac +- MOZ_PGO_OPTIMIZE_FLAGS="-O3" ++ MOZ_PGO_OPTIMIZE_FLAGS="-Os" + MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" + MOZ_DEBUG_FLAGS="-g" +diff -r -U2 xulrunner-20.0/mozilla-release/js/src/config/Makefile.in xulrunner-20.0.new/mozilla-release/js/src/config/Makefile.in +--- xulrunner-20.0/mozilla-release/js/src/config/Makefile.in 2013-03-26 18:17:46.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/js/src/config/Makefile.in 2013-03-30 01:51:03.443862662 -0400 +@@ -27,5 +27,5 @@ + + ifdef GNU_CC +-MODULE_OPTIMIZE_FLAGS = -O3 ++MODULE_OPTIMIZE_FLAGS = -Os + endif + +diff -r -U2 xulrunner-20.0/mozilla-release/js/src/configure.in xulrunner-20.0.new/mozilla-release/js/src/configure.in +--- xulrunner-20.0/mozilla-release/js/src/configure.in 2013-03-26 18:17:46.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/js/src/configure.in 2013-03-30 01:50:46.254052920 -0400 +@@ -1443,5 +1443,5 @@ + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" + HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" + ;; + +@@ -1449,5 +1449,5 @@ + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" + HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" + ;; + +@@ -1554,5 +1554,5 @@ + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' +- MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector" ++ MOZ_OPTIMIZE_FLAGS="-Os -fno-stack-protector" + _PEDANTIC= + CFLAGS="$CFLAGS -fno-common" +@@ -1648,5 +1648,5 @@ + + MOZ_GFX_OPTIMIZE_MOBILE=1 +- MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks -fno-reorder-functions" ++ MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions" + # The Maemo builders don't know about this flag + MOZ_ARM_VFP_FLAGS="-mfpu=vfp" +@@ -1668,6 +1668,6 @@ + MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" + esac +- MOZ_PGO_OPTIMIZE_FLAGS="-O3" +- MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" ++ MOZ_PGO_OPTIMIZE_FLAGS="-Os" ++ MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" + MOZ_DEBUG_FLAGS="-g" + fi +diff -r -U2 xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure +--- xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure 2013-03-26 18:17:58.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure 2013-03-30 01:51:38.533133311 -0400 +@@ -5279,7 +5279,7 @@ + TCFLAGS="${CFLAGS}" + if test "x${CFLAGS}" = "x" ; then +- CFLAGS="-O3" ++ CFLAGS="-Os" + else +- CFLAGS="${CFLAGS} -O3" ++ CFLAGS="${CFLAGS} -Os" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +diff -r -U2 xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure.ac xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure.ac +--- xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure.ac 2013-03-26 18:17:58.000000000 -0400 ++++ xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure.ac 2013-03-30 01:51:15.753872639 -0400 +@@ -574,5 +574,5 @@ + if test "x${optimize}" = "xyes" ; then + if test "x$GCC" = "xyes" ; then +- JE_CFLAGS_APPEND([-O3]) ++ JE_CFLAGS_APPEND([-Os]) + JE_CFLAGS_APPEND([-funroll-loops]) + elif test "x$je_cv_msvc" = "xyes" ; then From d3cfadc7fab6764be9a12b3152f3c35f5184748b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 3 Apr 2013 12:20:24 +0200 Subject: [PATCH 104/239] build fix --- xulrunner.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index db0ada6..24831d1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 20.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -134,6 +134,7 @@ BuildRequires: libnotify-devel >= %{libnotify_version} BuildRequires: mesa-libGL-devel BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} +BuildRequires: autoconf213 Requires: mozilla-filesystem %if %{?system_nss} @@ -527,7 +528,7 @@ fi #--------------------------------------------------------------------- %changelog -* Wed Apr 3 2013 Martin Stransky - 20.0-2 +* Wed Apr 3 2013 Martin Stransky - 20.0-3 - A workaround for Bug 928353 - firefox i686 crashes for a number of web pages From 689d99011f7cf31063e8d2fdb9c427d735750dbe Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 5 Apr 2013 08:56:24 +0200 Subject: [PATCH 105/239] Updated rhbz-911314.patch for xulrunner 20 --- rhbz-911314.patch | 142 +++++++++++++++++++++++----------------------- xulrunner.spec | 5 +- 2 files changed, 75 insertions(+), 72 deletions(-) diff --git a/rhbz-911314.patch b/rhbz-911314.patch index 4f1cfa0..82f245a 100644 --- a/rhbz-911314.patch +++ b/rhbz-911314.patch @@ -24,14 +24,14 @@ Index: mozilla-release/js/src/gc/Memory.cpp @@ -8,6 +8,7 @@ #include "mozilla/Assertions.h" - #include "jstypes.h" + #include "jsapi.h" +#include "jscntxt.h" + #include "js/HeapAPI.h" #include "js/Utility.h" - #include "gc/Memory.h" -@@ -19,39 +20,34 @@ namespace gc { - extern const size_t PageSize; - extern const size_t ArenaSize; +@@ -18,39 +19,34 @@ using namespace js::gc; + + /* Unused memory decommiting requires the arena size match the page size. */ static bool -DecommitEnabled() +DecommitEnabled(JSRuntime *rt) @@ -47,8 +47,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp -static size_t AllocationGranularity = 0; - void --InitMemorySubsystem() -+InitMemorySubsystem(JSRuntime *rt) +-gc::InitMemorySubsystem() ++gc::InitMemorySubsystem(JSRuntime *rt) { SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); @@ -62,8 +62,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp } void * --MapAlignedPages(size_t size, size_t alignment) -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) +-gc::MapAlignedPages(size_t size, size_t alignment) ++gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) { JS_ASSERT(size >= alignment); JS_ASSERT(size % alignment == 0); @@ -78,7 +78,7 @@ Index: mozilla-release/js/src/gc/Memory.cpp return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); } -@@ -75,7 +71,7 @@ MapAlignedPages(size_t size, size_t alig +@@ -74,7 +70,7 @@ gc::MapAlignedPages(size_t size, size_t if (!p) return NULL; void *chunkStart = (void *)(uintptr_t(p) + (alignment - (uintptr_t(p) % alignment))); @@ -87,19 +87,19 @@ Index: mozilla-release/js/src/gc/Memory.cpp p = VirtualAlloc(chunkStart, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); /* Failure here indicates a race with another thread, so try again. */ -@@ -86,26 +82,26 @@ MapAlignedPages(size_t size, size_t alig +@@ -85,26 +81,26 @@ gc::MapAlignedPages(size_t size, size_t } void --UnmapPages(void *p, size_t size) -+UnmapPages(JSRuntime *rt, void *p, size_t size) +-gc::UnmapPages(void *p, size_t size) ++gc::UnmapPages(JSRuntime *rt, void *p, size_t size) { JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE)); } bool --MarkPagesUnused(void *p, size_t size) -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesUnused(void *p, size_t size) ++gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { - if (!DecommitEnabled()) - return false; @@ -113,40 +113,40 @@ Index: mozilla-release/js/src/gc/Memory.cpp } bool --MarkPagesInUse(void *p, size_t size) -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesInUse(void *p, size_t size) ++gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); return true; } -@@ -127,12 +123,13 @@ GetPageFaultCount() +@@ -126,12 +122,13 @@ gc::GetPageFaultCount() #define OS2_MAX_RECURSIONS 16 void --InitMemorySubsystem() -+InitMemorySubsystem(JSRuntime *rt) +-gc::InitMemorySubsystem() ++gc::InitMemorySubsystem(JSRuntime *rt) { + rt->gcSystemPageSize = rt->gcSystemAllocGranularity = ArenaSize; } void --UnmapPages(void *addr, size_t size) -+UnmapPages(JSRuntime *rt, void *addr, size_t size) +-gc::UnmapPages(void *addr, size_t size) ++gc::UnmapPages(JSRuntime *rt, void *addr, size_t size) { if (!DosFreeMem(addr)) return; -@@ -153,7 +150,7 @@ UnmapPages(void *addr, size_t size) +@@ -152,7 +149,7 @@ gc::UnmapPages(void *addr, size_t size) } static void * --MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) -+MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) +-gc::MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) ++gc::MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) { if (++recursions >= OS2_MAX_RECURSIONS) return NULL; -@@ -179,7 +176,7 @@ MapAlignedPagesRecursively(size_t size, +@@ -178,7 +175,7 @@ gc::MapAlignedPagesRecursively(size_t si unsigned long rc = DosQueryMem(&(static_cast(tmp))[size], &cb, &flags); if (!rc && (flags & PAG_FREE) && cb >= filler) { @@ -155,7 +155,7 @@ Index: mozilla-release/js/src/gc/Memory.cpp if (DosAllocMem(&tmp, filler, OBJ_ANY | PAG_COMMIT | PAG_READ | PAG_WRITE)) { JS_ALWAYS_TRUE(DosAllocMem(&tmp, filler, -@@ -187,19 +184,19 @@ MapAlignedPagesRecursively(size_t size, +@@ -186,19 +183,19 @@ gc::MapAlignedPagesRecursively(size_t si } } @@ -168,8 +168,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp } void * --MapAlignedPages(size_t size, size_t alignment) -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) +-gc::MapAlignedPages(size_t size, size_t alignment) ++gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) { JS_ASSERT(size >= alignment); JS_ASSERT(size % alignment == 0); @@ -180,7 +180,7 @@ Index: mozilla-release/js/src/gc/Memory.cpp int recursions = -1; -@@ -208,7 +205,7 @@ MapAlignedPages(size_t size, size_t alig +@@ -207,7 +204,7 @@ gc::MapAlignedPages(size_t size, size_t * of the right size by recursively allocating blocks of unaligned * free memory until only an aligned allocation is possible. */ @@ -189,11 +189,11 @@ Index: mozilla-release/js/src/gc/Memory.cpp if (p) return p; -@@ -230,16 +227,15 @@ MapAlignedPages(size_t size, size_t alig +@@ -229,16 +226,15 @@ gc::MapAlignedPages(size_t size, size_t } bool --MarkPagesUnused(void *p, size_t size) +-gc::MarkPagesUnused(void *p, size_t size) -{ - JS_ASSERT(uintptr_t(p) % PageSize == 0); +MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { @@ -202,27 +202,27 @@ Index: mozilla-release/js/src/gc/Memory.cpp } bool --MarkPagesInUse(void *p, size_t size) -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesInUse(void *p, size_t size) ++gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); return true; } -@@ -259,17 +255,18 @@ GetPageFaultCount() +@@ -258,17 +254,18 @@ gc::GetPageFaultCount() #endif void --InitMemorySubsystem() -+InitMemorySubsystem(JSRuntime *rt) +-gc::InitMemorySubsystem() ++gc::InitMemorySubsystem(JSRuntime *rt) { + rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); } void * --MapAlignedPages(size_t size, size_t alignment) -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) +-gc::MapAlignedPages(size_t size, size_t alignment) ++gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) { JS_ASSERT(size >= alignment); JS_ASSERT(size % alignment == 0); @@ -233,19 +233,19 @@ Index: mozilla-release/js/src/gc/Memory.cpp int prot = PROT_READ | PROT_WRITE; int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC; -@@ -281,22 +278,22 @@ MapAlignedPages(size_t size, size_t alig +@@ -280,22 +277,22 @@ gc::MapAlignedPages(size_t size, size_t } void --UnmapPages(void *p, size_t size) -+UnmapPages(JSRuntime *rt, void *p, size_t size) +-gc::UnmapPages(void *p, size_t size) ++gc::UnmapPages(JSRuntime *rt, void *p, size_t size) { JS_ALWAYS_TRUE(0 == munmap((caddr_t)p, size)); } bool --MarkPagesUnused(void *p, size_t size) -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesUnused(void *p, size_t size) ++gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); @@ -253,20 +253,20 @@ Index: mozilla-release/js/src/gc/Memory.cpp } bool --MarkPagesInUse(void *p, size_t size) -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesInUse(void *p, size_t size) ++gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); return true; } -@@ -314,27 +311,24 @@ GetPageFaultCount() +@@ -313,27 +310,24 @@ gc::GetPageFaultCount() #include void --InitMemorySubsystem() -+InitMemorySubsystem(JSRuntime *rt) +-gc::InitMemorySubsystem() ++gc::InitMemorySubsystem(JSRuntime *rt) { - if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) { - fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); @@ -276,8 +276,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp } void * --MapAlignedPages(size_t size, size_t alignment) -+MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) +-gc::MapAlignedPages(size_t size, size_t alignment) ++gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) { JS_ASSERT(size >= alignment); JS_ASSERT(size % alignment == 0); @@ -295,19 +295,19 @@ Index: mozilla-release/js/src/gc/Memory.cpp return mmap(NULL, size, prot, flags, -1, 0); } -@@ -360,26 +354,26 @@ MapAlignedPages(size_t size, size_t alig +@@ -359,26 +353,26 @@ gc::MapAlignedPages(size_t size, size_t } void --UnmapPages(void *p, size_t size) -+UnmapPages(JSRuntime *rt, void *p, size_t size) +-gc::UnmapPages(void *p, size_t size) ++gc::UnmapPages(JSRuntime *rt, void *p, size_t size) { JS_ALWAYS_TRUE(0 == munmap(p, size)); } bool --MarkPagesUnused(void *p, size_t size) -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesUnused(void *p, size_t size) ++gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { - if (!DecommitEnabled()) - return false; @@ -321,8 +321,8 @@ Index: mozilla-release/js/src/gc/Memory.cpp } bool --MarkPagesInUse(void *p, size_t size) -+MarkPagesInUse(JSRuntime *rt, void *p, size_t size) +-gc::MarkPagesInUse(void *p, size_t size) ++gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) { - JS_ASSERT(uintptr_t(p) % PageSize == 0); + JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); @@ -363,7 +363,7 @@ Index: mozilla-release/js/src/jsapi.cpp =================================================================== --- mozilla-release.orig/js/src/jsapi.cpp +++ mozilla-release/js/src/jsapi.cpp -@@ -1105,8 +1105,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe +@@ -1113,8 +1113,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe #undef MSG_DEF #endif /* DEBUG */ @@ -376,7 +376,7 @@ Index: mozilla-release/js/src/jscntxt.h =================================================================== --- mozilla-release.orig/js/src/jscntxt.h +++ mozilla-release/js/src/jscntxt.h -@@ -847,6 +847,15 @@ struct JSRuntime : js::RuntimeFriendFiel +@@ -873,6 +873,15 @@ struct JSRuntime : js::RuntimeFriendFiel /* Stack of thread-stack-allocated GC roots. */ js::AutoGCRooter *autoGCRooters; @@ -396,7 +396,7 @@ Index: mozilla-release/js/src/jsgc.cpp =================================================================== --- mozilla-release.orig/js/src/jsgc.cpp +++ mozilla-release/js/src/jsgc.cpp -@@ -486,13 +486,13 @@ FinalizeArenas(FreeOp *fop, +@@ -477,13 +477,13 @@ FinalizeArenas(FreeOp *fop, } static inline Chunk * @@ -414,7 +414,7 @@ Index: mozilla-release/js/src/jsgc.cpp } inline bool -@@ -582,25 +582,25 @@ ChunkPool::expire(JSRuntime *rt, bool re +@@ -573,25 +573,25 @@ ChunkPool::expire(JSRuntime *rt, bool re } static void @@ -444,7 +444,7 @@ Index: mozilla-release/js/src/jsgc.cpp #ifdef JSGC_ROOT_ANALYSIS // Our poison pointers are not guaranteed to be invalid on 64-bit -@@ -613,7 +613,7 @@ Chunk::allocate(JSRuntime *rt) +@@ -604,7 +604,7 @@ Chunk::allocate(JSRuntime *rt) // were marked as uncommitted, but it's a little complicated to avoid // clobbering pre-existing unrelated mappings. while (IsPoisonedPtr(chunk)) @@ -453,7 +453,7 @@ Index: mozilla-release/js/src/jsgc.cpp #endif if (!chunk) -@@ -629,7 +629,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu +@@ -620,7 +620,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu { JS_ASSERT(chunk); chunk->prepareToBeFreed(rt); @@ -462,7 +462,7 @@ Index: mozilla-release/js/src/jsgc.cpp } inline void -@@ -745,7 +745,7 @@ Chunk::findDecommittedArenaOffset() +@@ -736,7 +736,7 @@ Chunk::findDecommittedArenaOffset() } ArenaHeader * @@ -471,7 +471,7 @@ Index: mozilla-release/js/src/jsgc.cpp { JS_ASSERT(info.numArenasFreeCommitted == 0); JS_ASSERT(info.numArenasFree > 0); -@@ -756,7 +756,7 @@ Chunk::fetchNextDecommittedArena() +@@ -747,7 +747,7 @@ Chunk::fetchNextDecommittedArena() decommittedArenas.unset(offset); Arena *arena = &arenas[offset]; @@ -480,7 +480,7 @@ Index: mozilla-release/js/src/jsgc.cpp arena->aheader.setAsNotAllocated(); return &arena->aheader; -@@ -790,7 +790,7 @@ Chunk::allocateArena(JSCompartment *comp +@@ -781,7 +781,7 @@ Chunk::allocateArena(JSCompartment *comp ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0) ? fetchNextFreeArena(rt) @@ -489,7 +489,7 @@ Index: mozilla-release/js/src/jsgc.cpp aheader->init(comp, thingKind); if (JS_UNLIKELY(!hasAvailableArenas())) removeFromAvailableList(); -@@ -893,6 +893,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ +@@ -881,6 +881,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ JSBool js_InitGC(JSRuntime *rt, uint32_t maxbytes) { @@ -498,7 +498,7 @@ Index: mozilla-release/js/src/jsgc.cpp if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) return false; -@@ -2745,7 +2747,7 @@ DecommitArenasFromAvailableList(JSRuntim +@@ -1969,7 +1971,7 @@ DecommitArenasFromAvailableList(JSRuntim Maybe maybeUnlock; if (!rt->isHeapBusy()) maybeUnlock.construct(rt); @@ -507,7 +507,7 @@ Index: mozilla-release/js/src/jsgc.cpp } if (ok) { -@@ -2813,7 +2815,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo +@@ -2037,7 +2039,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo { if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { AutoUnlockGC unlock(rt); @@ -520,7 +520,7 @@ Index: mozilla-release/js/public/HeapAPI.h =================================================================== --- mozilla-release.orig/js/public/HeapAPI.h +++ mozilla-release/js/public/HeapAPI.h -@@ -11,24 +11,7 @@ +@@ -13,24 +13,7 @@ namespace js { namespace gc { diff --git a/xulrunner.spec b/xulrunner.spec index 24831d1..91c5e9d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 20.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -528,6 +528,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Apr 5 2013 Martin Stransky - 20.0-4 +- Updated rhbz-911314.patch for xulrunner 20 + * Wed Apr 3 2013 Martin Stransky - 20.0-3 - A workaround for Bug 928353 - firefox i686 crashes for a number of web pages From 0d5f644e5e9996a9fc5e1e90cfb7fcccfca8cef1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Sun, 12 May 2013 23:02:03 +0200 Subject: [PATCH 106/239] Update to latest upstream (21.0) --- mozilla-239254.patch | 483 ------------------------------------------- mozilla-791626.patch | 46 ----- rhbz-304121.patch | 12 -- sources | 2 +- xulrunner.spec | 14 +- 5 files changed, 6 insertions(+), 551 deletions(-) delete mode 100644 mozilla-239254.patch delete mode 100644 mozilla-791626.patch delete mode 100644 rhbz-304121.patch diff --git a/mozilla-239254.patch b/mozilla-239254.patch deleted file mode 100644 index 9ce3838..0000000 --- a/mozilla-239254.patch +++ /dev/null @@ -1,483 +0,0 @@ -# HG changeset patch -# Parent cb34bd8957ec517c72d506f7c439e3af1950e38d -# User Martin Stransky -Bug 239254 - [Linux] Support disk cache on a local path, r=michal.novotny - -diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp ---- a/netwerk/cache/nsCacheService.cpp -+++ b/netwerk/cache/nsCacheService.cpp -@@ -712,27 +712,18 @@ nsCacheProfilePrefObserver::ReadPrefs(ns - nsCOMPtr profDir; - NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, - getter_AddRefs(profDir)); - NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR, - getter_AddRefs(directory)); - if (!directory) - directory = profDir; - else if (profDir) { -- bool same; -- if (NS_SUCCEEDED(profDir->Equals(directory, &same)) && !same) { -- // We no longer store the cache directory in the main -- // profile directory, so we should cleanup the old one. -- rv = profDir->AppendNative(NS_LITERAL_CSTRING("Cache")); -- if (NS_SUCCEEDED(rv)) { -- bool exists; -- if (NS_SUCCEEDED(profDir->Exists(&exists)) && exists) -- nsDeleteDir::DeleteDir(profDir, false); -- } -- } -+ nsCacheService::MoveOrRemoveDiskCache(profDir, directory, -+ "Cache"); - } - } - // use file cache in build tree only if asked, to avoid cache dir litter - if (!directory && PR_GetEnv("NECKO_DEV_ENABLE_DISK_CACHE")) { - rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, - getter_AddRefs(directory)); - } - if (directory) -@@ -788,16 +779,20 @@ nsCacheProfilePrefObserver::ReadPrefs(ns - // try to get the profile directory (there may not be a profile yet) - nsCOMPtr profDir; - NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, - getter_AddRefs(profDir)); - NS_GetSpecialDirectory(NS_APP_USER_PROFILE_LOCAL_50_DIR, - getter_AddRefs(directory)); - if (!directory) - directory = profDir; -+ else if (profDir) { -+ nsCacheService::MoveOrRemoveDiskCache(profDir, directory, -+ "OfflineCache"); -+ } - } - #if DEBUG - if (!directory) { - // use current process directory during development - rv = NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR, - getter_AddRefs(directory)); - } - #endif -@@ -3012,16 +3007,67 @@ nsCacheService::SetDiskSmartSize_Locked( - DispatchToCacheIOThread(event); - } else { - return NS_ERROR_FAILURE; - } - - return NS_OK; - } - -+void -+nsCacheService::MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, -+ nsIFile *aNewCacheDir, -+ const char *aCacheSubdir) -+{ -+ bool same; -+ if (NS_FAILED(aOldCacheDir->Equals(aNewCacheDir, &same)) || same) -+ return; -+ -+ nsCOMPtr aOldCacheSubdir; -+ aOldCacheDir->Clone(getter_AddRefs(aOldCacheSubdir)); -+ -+ nsresult rv = aOldCacheSubdir->AppendNative( -+ nsDependentCString(aCacheSubdir)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ bool exists; -+ if (NS_FAILED(aOldCacheSubdir->Exists(&exists)) || !exists) -+ return; -+ -+ nsCOMPtr aNewCacheSubdir; -+ aNewCacheDir->Clone(getter_AddRefs(aNewCacheSubdir)); -+ -+ rv = aNewCacheSubdir->AppendNative(nsDependentCString(aCacheSubdir)); -+ if (NS_FAILED(rv)) -+ return; -+ -+ nsAutoCString newPath; -+ rv = aNewCacheSubdir->GetNativePath(newPath); -+ if (NS_FAILED(rv)) -+ return; -+ -+ if (NS_SUCCEEDED(aNewCacheSubdir->Exists(&exists)) && !exists) { -+ // New cache directory does not exist, try to move the old one here -+ // rename needs an empty target directory -+ rv = aNewCacheSubdir->Create(nsIFile::DIRECTORY_TYPE, 0777); -+ if (NS_SUCCEEDED(rv)) { -+ nsAutoCString oldPath; -+ rv = aOldCacheSubdir->GetNativePath(oldPath); -+ if (NS_FAILED(rv)) -+ return; -+ if(rename(oldPath.get(), newPath.get()) == 0) -+ return; -+ } -+ } -+ -+ // Delay delete by 1 minute to avoid IO thrash on startup. -+ nsDeleteDir::DeleteDir(aOldCacheSubdir, false, 60000); -+} -+ - static bool - IsEntryPrivate(nsCacheEntry* entry) - { - return entry->IsPrivate(); - } - - void - nsCacheService::LeavePrivateBrowsing() -diff --git a/netwerk/cache/nsCacheService.h b/netwerk/cache/nsCacheService.h ---- a/netwerk/cache/nsCacheService.h -+++ b/netwerk/cache/nsCacheService.h -@@ -194,16 +194,20 @@ public: - - static void SetMemoryCache(); - - static void SetCacheCompressionLevel(int32_t level); - - // Starts smart cache size computation if disk device is available - static nsresult SetDiskSmartSize(); - -+ static void MoveOrRemoveDiskCache(nsIFile *aOldCacheDir, -+ nsIFile *aNewCacheDir, -+ const char *aCacheSubdir); -+ - nsresult Init(); - void Shutdown(); - - static bool IsInitialized() - { - if (!gService) { - return false; - } -diff --git a/startupcache/StartupCache.cpp b/startupcache/StartupCache.cpp ---- a/startupcache/StartupCache.cpp -+++ b/startupcache/StartupCache.cpp -@@ -168,16 +168,30 @@ StartupCache::Init() - nsCOMPtr file; - rv = NS_GetSpecialDirectory("ProfLDS", - getter_AddRefs(file)); - if (NS_FAILED(rv)) { - // return silently, this will fail in mochitests's xpcshell process. - return rv; - } - -+ nsCOMPtr profDir; -+ NS_GetSpecialDirectory("ProfDS", getter_AddRefs(profDir)); -+ if (profDir) { -+ bool same; -+ if (NS_SUCCEEDED(profDir->Equals(file, &same)) && !same) { -+ // We no longer store the startup cache in the main profile -+ // directory, so we should cleanup the old one. -+ if (NS_SUCCEEDED( -+ profDir->AppendNative(NS_LITERAL_CSTRING("startupCache")))) { -+ profDir->Remove(true); -+ } -+ } -+ } -+ - rv = file->AppendNative(NS_LITERAL_CSTRING("startupCache")); - NS_ENSURE_SUCCESS(rv, rv); - - // Try to create the directory if it's not there yet - rv = file->Create(nsIFile::DIRECTORY_TYPE, 0777); - if (NS_FAILED(rv) && rv != NS_ERROR_FILE_ALREADY_EXISTS) - return rv; - -diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp ---- a/toolkit/xre/nsXREDirProvider.cpp -+++ b/toolkit/xre/nsXREDirProvider.cpp -@@ -1170,18 +1170,32 @@ nsXREDirProvider::GetUserDataDirectoryHo - #elif defined(MOZ_WIDGET_GONK) - rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true, - getter_AddRefs(localDir)); - #elif defined(XP_UNIX) - const char* homeDir = getenv("HOME"); - if (!homeDir || !*homeDir) - return NS_ERROR_FAILURE; - -- rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, -- getter_AddRefs(localDir)); -+ if (aLocal) { -+ // If $XDG_CACHE_HOME is defined use it, otherwise use $HOME/.cache. -+ const char* cacheHome = getenv("XDG_CACHE_HOME"); -+ if (cacheHome && *cacheHome) { -+ rv = NS_NewNativeLocalFile(nsDependentCString(cacheHome), true, -+ getter_AddRefs(localDir)); -+ } else { -+ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, -+ getter_AddRefs(localDir)); -+ if (NS_SUCCEEDED(rv)) -+ rv = localDir->AppendNative(NS_LITERAL_CSTRING(".cache")); -+ } -+ } else { -+ rv = NS_NewNativeLocalFile(nsDependentCString(homeDir), true, -+ getter_AddRefs(localDir)); -+ } - #else - #error "Don't know how to get product dir on your platform" - #endif - - NS_IF_ADDREF(*aFile = localDir); - return rv; - } - -@@ -1256,17 +1270,17 @@ nsXREDirProvider::GetUserDataDirectory(n - const nsACString* aProfileName, - const nsACString* aAppName, - const nsACString* aVendorName) - { - nsCOMPtr localDir; - nsresult rv = GetUserDataDirectoryHome(getter_AddRefs(localDir), aLocal); - NS_ENSURE_SUCCESS(rv, rv); - -- rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName); -+ rv = AppendProfilePath(localDir, aProfileName, aAppName, aVendorName, aLocal); - NS_ENSURE_SUCCESS(rv, rv); - - #ifdef DEBUG_jungshik - nsAutoCString cwd; - localDir->GetNativePath(cwd); - printf("nsXREDirProvider::GetUserDataDirectory: %s\n", cwd.get()); - #endif - rv = EnsureDirectoryExists(localDir); -@@ -1377,17 +1391,18 @@ nsXREDirProvider::AppendSysUserExtension - return NS_OK; - } - - - nsresult - nsXREDirProvider::AppendProfilePath(nsIFile* aFile, - const nsACString* aProfileName, - const nsACString* aAppName, -- const nsACString* aVendorName) -+ const nsACString* aVendorName, -+ bool aLocal) - { - NS_ASSERTION(aFile, "Null pointer!"); - - if (!gAppData) { - return NS_ERROR_FAILURE; - } - - nsAutoCString profile; -@@ -1439,28 +1454,31 @@ nsXREDirProvider::AppendProfilePath(nsIF - // The parent of this directory is set in GetUserDataDirectoryHome - // XXX: handle gAppData->profile properly - // XXXsmaug ...and the rest of the profile creation! - MOZ_ASSERT(!aAppName, - "Profile creation for external applications is not implemented!"); - rv = aFile->AppendNative(nsDependentCString("mozilla")); - NS_ENSURE_SUCCESS(rv, rv); - #elif defined(XP_UNIX) -- // Make it hidden (i.e. using the ".") -- nsAutoCString folder("."); -+ nsAutoCString folder; -+ // Make it hidden (by starting with "."), except when local (the -+ // profile is already under ~/.cache or XDG_CACHE_HOME). -+ if (!aLocal) -+ folder.Assign('.'); - - if (!profile.IsEmpty()) { - // Skip any leading path characters - const char* profileStart = profile.get(); - while (*profileStart == '/' || *profileStart == '\\') - profileStart++; - - // On the off chance that someone wanted their folder to be hidden don't - // let it become ".." -- if (*profileStart == '.') -+ if (*profileStart == '.' && !aLocal) - profileStart++; - - folder.Append(profileStart); - ToLowerCase(folder); - - rv = AppendProfileString(aFile, folder.BeginReading()); - } - else { -diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h ---- a/toolkit/xre/nsXREDirProvider.h -+++ b/toolkit/xre/nsXREDirProvider.h -@@ -109,17 +109,18 @@ protected: - static nsresult EnsureDirectoryExists(nsIFile* aDirectory); - void EnsureProfileFileExists(nsIFile* aFile); - - // Determine the profile path within the UAppData directory. This is different - // on every major platform. - static nsresult AppendProfilePath(nsIFile* aFile, - const nsACString* aProfileName, - const nsACString* aAppName, -- const nsACString* aVendorName); -+ const nsACString* aVendorName, -+ bool aLocal); - - static nsresult AppendSysUserExtensionPath(nsIFile* aFile); - - // Internal helper that splits a path into components using the '/' and '\\' - // delimiters. - static inline nsresult AppendProfileString(nsIFile* aFile, const char* aPath); - - // Calculate and register extension and theme bundle directories. -# HG changeset patch -# User Tim Taubert -# Date 1360362227 -3600 -# Node ID 873170d2679ac23114f22543cee3214a940abef3 -Bug 239254 - [Linux] Migrate existing thumbnails to their new local path - -diff --git a/browser/components/thumbnails/PageThumbs.jsm b/browser/components/thumbnails/PageThumbs.jsm ---- a/browser/components/thumbnails/PageThumbs.jsm -+++ b/browser/components/thumbnails/PageThumbs.jsm -@@ -7,17 +7,17 @@ - this.EXPORTED_SYMBOLS = ["PageThumbs", "PageThumbsStorage"]; - - const Cu = Components.utils; - const Cc = Components.classes; - const Ci = Components.interfaces; - - const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; - const PREF_STORAGE_VERSION = "browser.pagethumbnails.storage_version"; --const LATEST_STORAGE_VERSION = 2; -+const LATEST_STORAGE_VERSION = 3; - - const EXPIRATION_MIN_CHUNK_SIZE = 50; - const EXPIRATION_INTERVAL_SECS = 3600; - - /** - * Name of the directory in the profile that contains the thumbnails. - */ - const THUMBNAIL_DIRECTORY = "thumbnails"; -@@ -359,47 +359,51 @@ let PageThumbsStorageMigrator = { - - set currentVersion(aVersion) { - Services.prefs.setIntPref(PREF_STORAGE_VERSION, aVersion); - }, - - migrate: function Migrator_migrate() { - let version = this.currentVersion; - -- if (version < 1) { -- this.removeThumbnailsFromRoamingProfile(); -- } -- if (version < 2) { -- this.renameThumbnailsFolder(); -+ // Storage version 1 never made it to beta. -+ // At the time of writing only Windows had (ProfD != ProfLD) and we -+ // needed to move thumbnails from the roaming profile to the locale -+ // one so that they're not needlessly included in backups and/or -+ // written via SMB. -+ -+ // Storage version 2 also never made it to beta. -+ // The thumbnail folder structure has been changed and old thumbnails -+ // were not migrated. Instead, we just renamed the current folder to -+ // "-old" and will remove it later. -+ -+ if (version < 3) { -+ this.migrateToVersion3(); - } - - this.currentVersion = LATEST_STORAGE_VERSION; - }, - -- removeThumbnailsFromRoamingProfile: -- function Migrator_removeThumbnailsFromRoamingProfile() { -- let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]); -+ /** -+ * Bug 239254 added support for having the disk cache and thumbnail -+ * directories on a local path (i.e. ~/.cache/) under Linux. We'll first -+ * try to move the old thumbnails to their new location. If that's not -+ * possible (because ProfD might be on a different file system than -+ * ProfLD) we'll just discard them. -+ */ -+ migrateToVersion3: function Migrator_migrateToVersion3() { -+ let local = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY], true); - let roaming = FileUtils.getDir("ProfD", [THUMBNAIL_DIRECTORY]); - -- if (!roaming.equals(local) && roaming.exists()) { -- roaming.followLinks = false; -- try { -- roaming.remove(true); -- } catch (e) { -- // The directory might not exist or we're not permitted to remove it. -- } -- } -- }, -- -- renameThumbnailsFolder: function Migrator_renameThumbnailsFolder() { -- let dir = FileUtils.getDir("ProfLD", [THUMBNAIL_DIRECTORY]); -- try { -- dir.moveTo(null, dir.leafName + "-old"); -- } catch (e) { -- // The directory might not exist or we're not permitted to rename it. -+ if (!roaming.equals(local)) { -+ PageThumbsWorker.postMessage({ -+ type: "moveOrDeleteAllThumbnails", -+ from: roaming.path, -+ to: local.path -+ }); - } - } - }; - - let PageThumbsExpiration = { - _filters: [], - - init: function Expiration_init() { -diff --git a/browser/components/thumbnails/PageThumbsWorker.js b/browser/components/thumbnails/PageThumbsWorker.js ---- a/browser/components/thumbnails/PageThumbsWorker.js -+++ b/browser/components/thumbnails/PageThumbsWorker.js -@@ -20,16 +20,19 @@ let PageThumbsWorker = { - - switch (msg.type) { - case "removeFile": - data.result = this.removeFile(msg); - break; - case "expireFilesInDirectory": - data.result = this.expireFilesInDirectory(msg); - break; -+ case "moveOrDeleteAllThumbnails": -+ data.result = this.moveOrDeleteAllThumbnails(msg); -+ break; - default: - data.result = false; - data.detail = "message not understood"; - break; - } - - self.postMessage(data); - }, -@@ -62,12 +65,35 @@ let PageThumbsWorker = { - getFileEntriesInDirectory: - function Worker_getFileEntriesInDirectory(aPath, aSkipFiles) { - let skip = new Set(aSkipFiles); - let iter = new OS.File.DirectoryIterator(aPath); - - return [entry - for (entry in iter) - if (!entry.isDir && !entry.isSymLink && !skip.has(entry.name))]; -+ }, -+ -+ moveOrDeleteAllThumbnails: -+ function Worker_moveOrDeleteAllThumbnails(msg) { -+ if (!OS.File.exists(msg.from)) -+ return true; -+ -+ let iter = new OS.File.DirectoryIterator(msg.from); -+ for (let entry in iter) { -+ if (!entry.isDir && !entry.isSymLink) { -+ let from = OS.Path.join(msg.from, entry.name); -+ let to = OS.Path.join(msg.to, entry.name); -+ -+ try { -+ OS.File.move(from, to, {noOverwrite: true, noCopy: true}); -+ } catch (e) { -+ OS.File.remove(from); -+ } -+ } -+ } -+ -+ OS.File.removeEmptyDir(msg.from); -+ return true; - } - }; - - self.onmessage = PageThumbsWorker.handleMessage.bind(PageThumbsWorker); diff --git a/mozilla-791626.patch b/mozilla-791626.patch deleted file mode 100644 index c2e77ab..0000000 --- a/mozilla-791626.patch +++ /dev/null @@ -1,46 +0,0 @@ -# HG changeset patch -# Parent 3523e7f7a89d7933c5f1dc8f5f22559b48ec44c4 -diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp ---- a/netwerk/base/src/nsIOService.cpp -+++ b/netwerk/base/src/nsIOService.cpp -@@ -818,17 +818,18 @@ nsIOService::PrefsChanged(nsIPrefBranch - if (NS_SUCCEEDED(rv)) { - if (mSocketTransportService) - mSocketTransportService->SetAutodialEnabled(enableAutodial); - } - } - - if (!pref || strcmp(pref, MANAGE_OFFLINE_STATUS_PREF) == 0) { - bool manage; -- if (NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, -+ if (mNetworkLinkServiceInitialized && -+ NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, - &manage))) - SetManageOfflineStatus(manage); - } - - if (!pref || strcmp(pref, NECKO_BUFFER_CACHE_COUNT_PREF) == 0) { - int32_t count; - if (NS_SUCCEEDED(prefs->GetIntPref(NECKO_BUFFER_CACHE_COUNT_PREF, - &count))) -@@ -928,16 +929,20 @@ nsIOService::Observe(nsISupports *subjec - } - else if (!strcmp(topic, kProfileDoChange)) { - if (data && NS_LITERAL_STRING("startup").Equals(data)) { - // Lazy initialization of network link service (see bug 620472) - InitializeNetworkLinkService(); - // Set up the initilization flag regardless the actuall result. - // If we fail here, we will fail always on. - mNetworkLinkServiceInitialized = true; -+ // And now reflect the preference setting -+ nsCOMPtr prefBranch; -+ GetPrefBranch(getter_AddRefs(prefBranch)); -+ PrefsChanged(prefBranch, MANAGE_OFFLINE_STATUS_PREF); - } - } - else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { - // Remember we passed XPCOM shutdown notification to prevent any - // changes of the offline status from now. We must not allow going - // online after this point. - mShutdown = true; - diff --git a/rhbz-304121.patch b/rhbz-304121.patch deleted file mode 100644 index d8d8ac3..0000000 --- a/rhbz-304121.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.rhbz-304121 xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py ---- xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py.rhbz-304121 2013-03-26 23:17:58.000000000 +0100 -+++ xulrunner-20.0/mozilla-release/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py 2013-04-01 11:11:56.938411785 +0200 -@@ -377,7 +377,7 @@ class MakefileGenerator(object): - WriteMakefile(output_file, data, build_file, depth, top, - # we set srcdir up one directory, since the subdir - # doesn't actually exist in the source directory -- swapslashes(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0])), -+ swapslashes(os.path.normpath(os.path.join(top, self.relative_srcdir, os.path.split(rel_path)[0]))), - self.relative_srcdir, - self.common_mk_path) - return True diff --git a/sources b/sources index 1dbc77f..4ae848e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e664416da2075f13089fe3e883cadb73 firefox-20.0.source.tar.bz2 +6e2510e9466b280c367de0e4c05a8840 firefox-21.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 91c5e9d..5a456e8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,8 +75,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 20.0 -Release: 4%{?pre_tag}%{?dist} +Version: 21.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -93,7 +93,6 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-16.0-jemalloc-ppc.patch -Patch19: rhbz-304121.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -101,8 +100,6 @@ Patch21: rhbz-911314.patch Patch22: rhbz-928353.patch # Upstream patches -Patch101: mozilla-791626.patch -Patch102: mozilla-239254.patch Patch104: mozilla-844883.patch # --------------------------------------------------- @@ -231,7 +228,6 @@ cd %{tarballdir} %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc -%patch19 -p2 -b .rhbz-304121 %patch20 -p2 -b .pk %ifarch ppc ppc64 @@ -245,9 +241,6 @@ cd %{tarballdir} %endif %endif -%patch101 -p1 -b .791626 -%patch102 -p1 -b .239254 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig %if %{enable_mozilla_crashreporter} @@ -528,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun May 12 2013 Martin Stransky - 21.0-1 +- Update to latest upstream (21.0) + * Fri Apr 5 2013 Martin Stransky - 20.0-4 - Updated rhbz-911314.patch for xulrunner 20 From 1a886127f7f6c4e10cdda5b1e10e5f0d8be84441 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2013 08:24:17 +0200 Subject: [PATCH 107/239] Updated requested NSS/NSPR versions --- xulrunner.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 5a456e8..933822c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -21,9 +21,9 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9.3 +%global nspr_version 4.9.6 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.14.1 +%global nss_version 3.14.3 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 13 2013 Martin Stransky - 21.0-2 +- Updated requested NSS/NSPR versions + * Sun May 12 2013 Martin Stransky - 21.0-1 - Update to latest upstream (21.0) From b2577c78d8cbdd7a6977975600b0a2ae5c87c0cd Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2013 09:04:05 +0200 Subject: [PATCH 108/239] Updated gcc workaround patch --- rhbz-928353.patch | 108 ++++++++++++++++------------------------------ 1 file changed, 38 insertions(+), 70 deletions(-) diff --git a/rhbz-928353.patch b/rhbz-928353.patch index 14a5ba1..00d8e67 100644 --- a/rhbz-928353.patch +++ b/rhbz-928353.patch @@ -1,86 +1,62 @@ -diff -r -U2 xulrunner-20.0/mozilla-release/config/Makefile.in xulrunner-20.0.new/mozilla-release/config/Makefile.in ---- xulrunner-20.0/mozilla-release/config/Makefile.in 2013-03-26 18:17:37.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/config/Makefile.in 2013-03-30 01:50:11.109526990 -0400 -@@ -38,5 +38,5 @@ +diff -up xulrunner-21.0/mozilla-release/config/Makefile.in.old xulrunner-21.0/mozilla-release/config/Makefile.in +--- xulrunner-21.0/mozilla-release/config/Makefile.in.old 2013-05-11 21:19:23.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/config/Makefile.in 2013-05-13 08:53:03.351969145 +0200 +@@ -37,7 +37,7 @@ override NSBUILDROOT := + endif ifdef GNU_CC -MODULE_OPTIMIZE_FLAGS = -O3 +MODULE_OPTIMIZE_FLAGS = -Os endif -diff -r -U2 xulrunner-20.0/mozilla-release/configure.in xulrunner-20.0.new/mozilla-release/configure.in ---- xulrunner-20.0/mozilla-release/configure.in 2013-03-26 18:17:37.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/configure.in 2013-03-30 01:50:03.474547207 -0400 -@@ -1848,5 +1848,5 @@ - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" - HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" - ;; - -@@ -1854,5 +1854,5 @@ + include $(topsrcdir)/config/config.mk +diff -up xulrunner-21.0/mozilla-release/configure.in.old xulrunner-21.0/mozilla-release/configure.in +--- xulrunner-21.0/mozilla-release/configure.in.old 2013-05-11 21:19:23.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/configure.in 2013-05-13 09:02:12.931823544 +0200 +@@ -1791,7 +1791,7 @@ case "$host" in + *-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' - HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" ;; -@@ -1961,5 +1961,5 @@ - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' -- MOZ_OPTIMIZE_FLAGS="-O3" -+ MOZ_OPTIMIZE_FLAGS="-Os" - _PEDANTIC= - # Statically disable jemalloc on 10.5 and 32-bit 10.6. See bug 702250. -@@ -2106,5 +2106,5 @@ + *os2*) +@@ -2041,7 +2041,7 @@ ia64*-hpux*) + # -Os is broken on gcc 4.5.x we need to tweak it to get good results. MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" esac - MOZ_PGO_OPTIMIZE_FLAGS="-O3" + MOZ_PGO_OPTIMIZE_FLAGS="-Os" MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" MOZ_DEBUG_FLAGS="-g" -diff -r -U2 xulrunner-20.0/mozilla-release/js/src/config/Makefile.in xulrunner-20.0.new/mozilla-release/js/src/config/Makefile.in ---- xulrunner-20.0/mozilla-release/js/src/config/Makefile.in 2013-03-26 18:17:46.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/js/src/config/Makefile.in 2013-03-30 01:51:03.443862662 -0400 -@@ -27,5 +27,5 @@ + fi +diff -up xulrunner-21.0/mozilla-release/js/src/config/Makefile.in.old xulrunner-21.0/mozilla-release/js/src/config/Makefile.in +--- xulrunner-21.0/mozilla-release/js/src/config/Makefile.in.old 2013-05-11 21:19:32.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/config/Makefile.in 2013-05-13 08:53:03.353969129 +0200 +@@ -26,7 +26,7 @@ override NSBUILDROOT := + endif ifdef GNU_CC -MODULE_OPTIMIZE_FLAGS = -O3 +MODULE_OPTIMIZE_FLAGS = -Os endif -diff -r -U2 xulrunner-20.0/mozilla-release/js/src/configure.in xulrunner-20.0.new/mozilla-release/js/src/configure.in ---- xulrunner-20.0/mozilla-release/js/src/configure.in 2013-03-26 18:17:46.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/js/src/configure.in 2013-03-30 01:50:46.254052920 -0400 -@@ -1443,5 +1443,5 @@ - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX -DXP_MACOSX -DNO_X11" - HOST_NSPR_MDCPUCFG='\"md/_darwin.cfg\"' -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" - ;; - -@@ -1449,5 +1449,5 @@ + include $(topsrcdir)/config/config.mk +diff -up xulrunner-21.0/mozilla-release/js/src/configure.in.old xulrunner-21.0/mozilla-release/js/src/configure.in +--- xulrunner-21.0/mozilla-release/js/src/configure.in.old 2013-05-11 21:19:32.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/configure.in 2013-05-13 09:00:24.431225716 +0200 +@@ -1391,7 +1391,7 @@ case "$host" in + *-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' - HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" ;; -@@ -1554,5 +1554,5 @@ - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@' -- MOZ_OPTIMIZE_FLAGS="-O3 -fno-stack-protector" -+ MOZ_OPTIMIZE_FLAGS="-Os -fno-stack-protector" - _PEDANTIC= - CFLAGS="$CFLAGS -fno-common" -@@ -1648,5 +1648,5 @@ - - MOZ_GFX_OPTIMIZE_MOBILE=1 -- MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks -fno-reorder-functions" -+ MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions" - # The Maemo builders don't know about this flag - MOZ_ARM_VFP_FLAGS="-mfpu=vfp" -@@ -1668,6 +1668,6 @@ + *os2*) +@@ -1596,8 +1596,8 @@ ia64*-hpux*) + # -Os is broken on gcc 4.5.x we need to tweak it to get good results. MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" esac - MOZ_PGO_OPTIMIZE_FLAGS="-O3" @@ -89,26 +65,18 @@ diff -r -U2 xulrunner-20.0/mozilla-release/js/src/configure.in xulrunner-20.0.ne + MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" MOZ_DEBUG_FLAGS="-g" fi -diff -r -U2 xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure ---- xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure 2013-03-26 18:17:58.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure 2013-03-30 01:51:38.533133311 -0400 -@@ -5279,7 +5279,7 @@ - TCFLAGS="${CFLAGS}" - if test "x${CFLAGS}" = "x" ; then -- CFLAGS="-O3" -+ CFLAGS="-Os" - else -- CFLAGS="${CFLAGS} -O3" -+ CFLAGS="${CFLAGS} -Os" - fi - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -diff -r -U2 xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure.ac xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure.ac ---- xulrunner-20.0/mozilla-release/memory/jemalloc/src/configure.ac 2013-03-26 18:17:58.000000000 -0400 -+++ xulrunner-20.0.new/mozilla-release/memory/jemalloc/src/configure.ac 2013-03-30 01:51:15.753872639 -0400 -@@ -574,5 +574,5 @@ + +diff -up xulrunner-21.0/mozilla-release/media/webrtc/trunk/Makefile.old xulrunner-21.0/mozilla-release/media/webrtc/trunk/Makefile +diff -up xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac.old xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac +--- xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac.old 2013-05-11 21:19:46.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac 2013-05-13 08:53:03.355969113 +0200 +@@ -573,7 +573,7 @@ if test "x$enable_debug" = "x0" -a "x$no + echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes" if test "x${optimize}" = "xyes" ; then if test "x$GCC" = "xyes" ; then - JE_CFLAGS_APPEND([-O3]) + JE_CFLAGS_APPEND([-Os]) JE_CFLAGS_APPEND([-funroll-loops]) elif test "x$je_cv_msvc" = "xyes" ; then + JE_CFLAGS_APPEND([-O2]) +diff -up xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.old xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure From e404a52b7e7a3cb8a4ddeb02ec61766dd32fc54c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 13 May 2013 12:20:57 +0200 Subject: [PATCH 109/239] New upstream tarball (build 4) --- sources | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 4ae848e..ef565ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e2510e9466b280c367de0e4c05a8840 firefox-21.0.source.tar.bz2 +d3906a3033b4084cade8cb81fa984eb4 firefox-21.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 933822c..dcb2b8a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon May 13 2013 Martin Stransky - 21.0-3 +- New upstream tarball (build 4) + * Mon May 13 2013 Martin Stransky - 21.0-2 - Updated requested NSS/NSPR versions From 50bcf53640ce5d123973bead893bc0591177a30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 20 May 2013 21:47:28 +0200 Subject: [PATCH 110/239] fix inlining issue on s390 (32-bit) --- xulrunner-21.0-s390-inlines.patch | 12 ++++++++++++ xulrunner.spec | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 xulrunner-21.0-s390-inlines.patch diff --git a/xulrunner-21.0-s390-inlines.patch b/xulrunner-21.0-s390-inlines.patch new file mode 100644 index 0000000..cf2b0ca --- /dev/null +++ b/xulrunner-21.0-s390-inlines.patch @@ -0,0 +1,12 @@ +diff -up mozilla-release/js/src/vm/SPSProfiler.cpp.jscntxt mozilla-release/js/src/vm/SPSProfiler.cpp +--- mozilla-release/js/src/vm/SPSProfiler.cpp.jscntxt 2013-05-20 11:46:14.736790245 -0400 ++++ mozilla-release/js/src/vm/SPSProfiler.cpp 2013-05-20 11:38:20.696788904 -0400 +@@ -10,6 +10,8 @@ + #include "jsnum.h" + #include "jsscript.h" + ++#include "jscntxtinlines.h" ++ + #include "methodjit/MethodJIT.h" + #include "methodjit/Compiler.h" + diff --git a/xulrunner.spec b/xulrunner.spec index dcb2b8a..bde8301 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -93,6 +93,8 @@ Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-16.0-jemalloc-ppc.patch +# workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) +Patch19: xulrunner-21.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -228,6 +230,7 @@ cd %{tarballdir} %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc +%patch19 -p1 -b .s390-inlines %patch20 -p2 -b .pk %ifarch ppc ppc64 From e958266d9286302dac1c48ae004e7b4ba640fe33 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 May 2013 14:13:30 +0200 Subject: [PATCH 111/239] Added s390(x) patch --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index bde8301..03707d9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -524,6 +524,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 21 2013 Martin Stransky - 21.0-4 +- Added s390(x) patch + * Mon May 13 2013 Martin Stransky - 21.0-3 - New upstream tarball (build 4) From bd2669f723c47d6232e27a588a5b29fa68a7000b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 May 2013 23:26:47 +0200 Subject: [PATCH 112/239] Added ppc(64) patches (rhbz#963907) --- rhbz-911314.patch | 133 +++++++++++++++++++++------------------------- xulrunner.spec | 11 +++- 2 files changed, 69 insertions(+), 75 deletions(-) diff --git a/rhbz-911314.patch b/rhbz-911314.patch index 82f245a..9a28aaa 100644 --- a/rhbz-911314.patch +++ b/rhbz-911314.patch @@ -1,14 +1,35 @@ -Use the runtime page size to control arena decommit (RHBZ#911314) -Return success when decommit is disabled - -Author: Gustavo Luiz Duarte -Based on Terrence Cole's patch v0 on MOZ#840242 - -Index: mozilla-release/js/src/gc/Heap.h -=================================================================== ---- mozilla-release.orig/js/src/gc/Heap.h -+++ mozilla-release/js/src/gc/Heap.h -@@ -800,7 +800,7 @@ struct Chunk +diff -up xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc xulrunner-21.0/mozilla-release/js/public/HeapAPI.h +--- xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc 2013-05-12 23:56:19.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/public/HeapAPI.h 2013-05-21 23:14:04.698238150 +0200 +@@ -11,24 +11,7 @@ + namespace js { + namespace gc { + +-/* +- * Page size must be static to support our arena pointer optimizations, so we +- * are forced to support each platform with non-4096 pages as a special case. +- * Note: The freelist supports a maximum arena shift of 15. +- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. +- */ +-#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ +- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) +-const size_t PageShift = 13; +-const size_t ArenaShift = PageShift; +-#elif defined(__powerpc64__) +-const size_t PageShift = 16; + const size_t ArenaShift = 12; +-#else +-const size_t PageShift = 12; +-const size_t ArenaShift = PageShift; +-#endif +-const size_t PageSize = size_t(1) << PageShift; + const size_t ArenaSize = size_t(1) << ArenaShift; + const size_t ArenaMask = ArenaSize - 1; + +diff -up xulrunner-21.0/mozilla-release/js/src/gc/Heap.h.ppc xulrunner-21.0/mozilla-release/js/src/gc/Heap.h +--- xulrunner-21.0/mozilla-release/js/src/gc/Heap.h.ppc 2013-05-12 23:56:19.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/gc/Heap.h 2013-05-21 23:14:04.693238124 +0200 +@@ -812,7 +812,7 @@ struct Chunk /* Search for a decommitted arena to allocate. */ unsigned findDecommittedArenaOffset(); @@ -17,10 +38,9 @@ Index: mozilla-release/js/src/gc/Heap.h public: /* Unlink and return the freeArenasHead. */ -Index: mozilla-release/js/src/gc/Memory.cpp -=================================================================== ---- mozilla-release.orig/js/src/gc/Memory.cpp -+++ mozilla-release/js/src/gc/Memory.cpp +diff -up xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp.ppc xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp +--- xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp.ppc 2013-05-12 23:56:19.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp 2013-05-21 23:14:04.693238124 +0200 @@ -8,6 +8,7 @@ #include "mozilla/Assertions.h" @@ -329,10 +349,9 @@ Index: mozilla-release/js/src/gc/Memory.cpp return true; } -Index: mozilla-release/js/src/gc/Memory.h -=================================================================== ---- mozilla-release.orig/js/src/gc/Memory.h -+++ mozilla-release/js/src/gc/Memory.h +diff -up xulrunner-21.0/mozilla-release/js/src/gc/Memory.h.ppc xulrunner-21.0/mozilla-release/js/src/gc/Memory.h +--- xulrunner-21.0/mozilla-release/js/src/gc/Memory.h.ppc 2013-05-12 23:56:19.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/gc/Memory.h 2013-05-21 23:14:04.693238124 +0200 @@ -16,20 +16,20 @@ namespace gc { // Sanity check that our compiled configuration matches the currently running @@ -359,11 +378,10 @@ Index: mozilla-release/js/src/gc/Memory.h // Returns #(hard faults) + #(soft faults) size_t GetPageFaultCount(); -Index: mozilla-release/js/src/jsapi.cpp -=================================================================== ---- mozilla-release.orig/js/src/jsapi.cpp -+++ mozilla-release/js/src/jsapi.cpp -@@ -1113,8 +1113,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe +diff -up xulrunner-21.0/mozilla-release/js/src/jsapi.cpp.ppc xulrunner-21.0/mozilla-release/js/src/jsapi.cpp +--- xulrunner-21.0/mozilla-release/js/src/jsapi.cpp.ppc 2013-05-12 23:56:21.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/jsapi.cpp 2013-05-21 23:14:04.695238134 +0200 +@@ -1110,8 +1110,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe #undef MSG_DEF #endif /* DEBUG */ @@ -372,11 +390,10 @@ Index: mozilla-release/js/src/jsapi.cpp if (!js::TlsPerThreadData.init()) return NULL; -Index: mozilla-release/js/src/jscntxt.h -=================================================================== ---- mozilla-release.orig/js/src/jscntxt.h -+++ mozilla-release/js/src/jscntxt.h -@@ -873,6 +873,15 @@ struct JSRuntime : js::RuntimeFriendFiel +diff -up xulrunner-21.0/mozilla-release/js/src/jscntxt.h.ppc xulrunner-21.0/mozilla-release/js/src/jscntxt.h +--- xulrunner-21.0/mozilla-release/js/src/jscntxt.h.ppc 2013-05-12 23:56:21.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/jscntxt.h 2013-05-21 23:14:04.696238140 +0200 +@@ -1026,6 +1026,15 @@ struct JSRuntime : js::RuntimeFriendFiel /* Stack of thread-stack-allocated GC roots. */ js::AutoGCRooter *autoGCRooters; @@ -392,11 +409,10 @@ Index: mozilla-release/js/src/jscntxt.h /* Strong references on scripts held for PCCount profiling API. */ js::ScriptAndCountsVector *scriptAndCountsVector; -Index: mozilla-release/js/src/jsgc.cpp -=================================================================== ---- mozilla-release.orig/js/src/jsgc.cpp -+++ mozilla-release/js/src/jsgc.cpp -@@ -477,13 +477,13 @@ FinalizeArenas(FreeOp *fop, +diff -up xulrunner-21.0/mozilla-release/js/src/jsgc.cpp.ppc xulrunner-21.0/mozilla-release/js/src/jsgc.cpp +--- xulrunner-21.0/mozilla-release/js/src/jsgc.cpp.ppc 2013-05-12 23:56:21.000000000 +0200 ++++ xulrunner-21.0/mozilla-release/js/src/jsgc.cpp 2013-05-21 23:15:40.198740765 +0200 +@@ -465,13 +465,13 @@ FinalizeArenas(FreeOp *fop, } static inline Chunk * @@ -414,7 +430,7 @@ Index: mozilla-release/js/src/jsgc.cpp } inline bool -@@ -573,25 +573,25 @@ ChunkPool::expire(JSRuntime *rt, bool re +@@ -561,25 +561,25 @@ ChunkPool::expire(JSRuntime *rt, bool re } static void @@ -444,7 +460,7 @@ Index: mozilla-release/js/src/jsgc.cpp #ifdef JSGC_ROOT_ANALYSIS // Our poison pointers are not guaranteed to be invalid on 64-bit -@@ -604,7 +604,7 @@ Chunk::allocate(JSRuntime *rt) +@@ -592,7 +592,7 @@ Chunk::allocate(JSRuntime *rt) // were marked as uncommitted, but it's a little complicated to avoid // clobbering pre-existing unrelated mappings. while (IsPoisonedPtr(chunk)) @@ -453,7 +469,7 @@ Index: mozilla-release/js/src/jsgc.cpp #endif if (!chunk) -@@ -620,7 +620,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu +@@ -608,7 +608,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu { JS_ASSERT(chunk); chunk->prepareToBeFreed(rt); @@ -462,7 +478,7 @@ Index: mozilla-release/js/src/jsgc.cpp } inline void -@@ -736,7 +736,7 @@ Chunk::findDecommittedArenaOffset() +@@ -725,7 +725,7 @@ Chunk::findDecommittedArenaOffset() } ArenaHeader * @@ -471,7 +487,7 @@ Index: mozilla-release/js/src/jsgc.cpp { JS_ASSERT(info.numArenasFreeCommitted == 0); JS_ASSERT(info.numArenasFree > 0); -@@ -747,7 +747,7 @@ Chunk::fetchNextDecommittedArena() +@@ -736,7 +736,7 @@ Chunk::fetchNextDecommittedArena() decommittedArenas.unset(offset); Arena *arena = &arenas[offset]; @@ -480,16 +496,16 @@ Index: mozilla-release/js/src/jsgc.cpp arena->aheader.setAsNotAllocated(); return &arena->aheader; -@@ -781,7 +781,7 @@ Chunk::allocateArena(JSCompartment *comp +@@ -770,7 +770,7 @@ Chunk::allocateArena(Zone *zone, AllocKi ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0) ? fetchNextFreeArena(rt) - : fetchNextDecommittedArena(); + : fetchNextDecommittedArena(rt); - aheader->init(comp, thingKind); + aheader->init(zone, thingKind); if (JS_UNLIKELY(!hasAvailableArenas())) removeFromAvailableList(); -@@ -881,6 +881,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ +@@ -937,6 +937,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ JSBool js_InitGC(JSRuntime *rt, uint32_t maxbytes) { @@ -498,7 +514,7 @@ Index: mozilla-release/js/src/jsgc.cpp if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) return false; -@@ -1969,7 +1971,7 @@ DecommitArenasFromAvailableList(JSRuntim +@@ -2102,7 +2104,7 @@ DecommitArenasFromAvailableList(JSRuntim Maybe maybeUnlock; if (!rt->isHeapBusy()) maybeUnlock.construct(rt); @@ -507,7 +523,7 @@ Index: mozilla-release/js/src/jsgc.cpp } if (ok) { -@@ -2037,7 +2039,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo +@@ -2170,7 +2172,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo { if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { AutoUnlockGC unlock(rt); @@ -516,32 +532,3 @@ Index: mozilla-release/js/src/jsgc.cpp } if (shouldShrink) -Index: mozilla-release/js/public/HeapAPI.h -=================================================================== ---- mozilla-release.orig/js/public/HeapAPI.h -+++ mozilla-release/js/public/HeapAPI.h -@@ -13,24 +13,7 @@ - namespace js { - namespace gc { - --/* -- * Page size must be static to support our arena pointer optimizations, so we -- * are forced to support each platform with non-4096 pages as a special case. -- * Note: The freelist supports a maximum arena shift of 15. -- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. -- */ --#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ -- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) --const size_t PageShift = 13; --const size_t ArenaShift = PageShift; --#elif defined(__powerpc64__) --const size_t PageShift = 16; - const size_t ArenaShift = 12; --#else --const size_t PageShift = 12; --const size_t ArenaShift = PageShift; --#endif --const size_t PageSize = size_t(1) << PageShift; - const size_t ArenaSize = size_t(1) << ArenaShift; - const size_t ArenaMask = ArenaSize - 1; - diff --git a/xulrunner.spec b/xulrunner.spec index 03707d9..231246b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -100,6 +100,7 @@ Patch19: xulrunner-21.0-s390-inlines.patch Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch Patch22: rhbz-928353.patch +Patch23: mozilla-851850.patch # Upstream patches Patch104: mozilla-844883.patch @@ -233,11 +234,14 @@ cd %{tarballdir} %patch19 -p1 -b .s390-inlines %patch20 -p2 -b .pk + %ifarch ppc ppc64 -%patch21 -p1 -b .ppc +%patch21 -p2 -b .ppc +%patch23 -p1 -b .851850 %patch104 -p1 -b .844883 %endif + %if 0%{?fedora} >= 19 %ifarch %{ix86} %patch22 -p2 @@ -524,6 +528,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue May 21 2013 Martin Stransky - 21.0-5 +- Added ppc(64) patches (rhbz#963907) + * Tue May 21 2013 Martin Stransky - 21.0-4 - Added s390(x) patch From 052f8ddfeddec514b2a257618493cd70fabf9ff7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 21 May 2013 23:27:33 +0200 Subject: [PATCH 113/239] new line removal --- xulrunner.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 231246b..6edbc86 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -241,7 +241,6 @@ cd %{tarballdir} %patch104 -p1 -b .844883 %endif - %if 0%{?fedora} >= 19 %ifarch %{ix86} %patch22 -p2 From 2657453d6bfa6b5defc0ec5dad4dd11a8948bf4b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 22 May 2013 20:03:19 +0200 Subject: [PATCH 114/239] Added missing patch --- mozilla-851850.patch | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 mozilla-851850.patch diff --git a/mozilla-851850.patch b/mozilla-851850.patch new file mode 100644 index 0000000..04260b9 --- /dev/null +++ b/mozilla-851850.patch @@ -0,0 +1,31 @@ + +# HG changeset patch +# User Steve Singer +# Date 1363699875 14400 +# Node ID fe010206e5add13f4202113dcd74f54acb1e5b37 +# Parent 90c5dd3a2d1533ce2646a53c6ec84773e6f42d43 +Bug 851850 - Link in altivec on ppc64. r=jmuizelaar + +diff --git a/gfx/qcms/Makefile.in b/gfx/qcms/Makefile.in +--- a/gfx/qcms/Makefile.in ++++ b/gfx/qcms/Makefile.in +@@ -48,17 +48,17 @@ else + endif + else + SSE1_FLAGS= + SSE2_FLAGS= + endif + endif + endif + else +-ifeq (ppc,$(CPU_ARCH)) ++ifeq (ppc,$(findstring ppc,$(CPU_ARCH))) + ifdef GNU_CC + CSRCS += transform-altivec.c + ALTIVEC_FLAGS=-maltivec + endif + endif + endif + + FORCE_STATIC_LIB = 1 + From c8ab32f987e68e1f2697e5bbc6998e063321e12c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 29 May 2013 09:39:38 +0200 Subject: [PATCH 115/239] Removed the i686/f19 gcc hack (rhbz#928353) --- rhbz-928353.patch | 82 ----------------------------------------------- xulrunner.spec | 12 +++---- 2 files changed, 4 insertions(+), 90 deletions(-) delete mode 100644 rhbz-928353.patch diff --git a/rhbz-928353.patch b/rhbz-928353.patch deleted file mode 100644 index 00d8e67..0000000 --- a/rhbz-928353.patch +++ /dev/null @@ -1,82 +0,0 @@ -diff -up xulrunner-21.0/mozilla-release/config/Makefile.in.old xulrunner-21.0/mozilla-release/config/Makefile.in ---- xulrunner-21.0/mozilla-release/config/Makefile.in.old 2013-05-11 21:19:23.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/config/Makefile.in 2013-05-13 08:53:03.351969145 +0200 -@@ -37,7 +37,7 @@ override NSBUILDROOT := - endif - - ifdef GNU_CC --MODULE_OPTIMIZE_FLAGS = -O3 -+MODULE_OPTIMIZE_FLAGS = -Os - endif - - include $(topsrcdir)/config/config.mk -diff -up xulrunner-21.0/mozilla-release/configure.in.old xulrunner-21.0/mozilla-release/configure.in ---- xulrunner-21.0/mozilla-release/configure.in.old 2013-05-11 21:19:23.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/configure.in 2013-05-13 09:02:12.931823544 +0200 -@@ -1791,7 +1791,7 @@ case "$host" in - *-linux*|*-kfreebsd*-gnu|*-gnu*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" - ;; - - *os2*) -@@ -2041,7 +2041,7 @@ ia64*-hpux*) - # -Os is broken on gcc 4.5.x we need to tweak it to get good results. - MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" - esac -- MOZ_PGO_OPTIMIZE_FLAGS="-O3" -+ MOZ_PGO_OPTIMIZE_FLAGS="-Os" - MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" - MOZ_DEBUG_FLAGS="-g" - fi -diff -up xulrunner-21.0/mozilla-release/js/src/config/Makefile.in.old xulrunner-21.0/mozilla-release/js/src/config/Makefile.in ---- xulrunner-21.0/mozilla-release/js/src/config/Makefile.in.old 2013-05-11 21:19:32.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/config/Makefile.in 2013-05-13 08:53:03.353969129 +0200 -@@ -26,7 +26,7 @@ override NSBUILDROOT := - endif - - ifdef GNU_CC --MODULE_OPTIMIZE_FLAGS = -O3 -+MODULE_OPTIMIZE_FLAGS = -Os - endif - - include $(topsrcdir)/config/config.mk -diff -up xulrunner-21.0/mozilla-release/js/src/configure.in.old xulrunner-21.0/mozilla-release/js/src/configure.in ---- xulrunner-21.0/mozilla-release/js/src/configure.in.old 2013-05-11 21:19:32.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/configure.in 2013-05-13 09:00:24.431225716 +0200 -@@ -1391,7 +1391,7 @@ case "$host" in - *-linux*|*-kfreebsd*-gnu|*-gnu*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-Os}" - ;; - - *os2*) -@@ -1596,8 +1596,8 @@ ia64*-hpux*) - # -Os is broken on gcc 4.5.x we need to tweak it to get good results. - MOZ_OPTIMIZE_SIZE_TWEAK="-finline-limit=50" - esac -- MOZ_PGO_OPTIMIZE_FLAGS="-O3" -- MOZ_OPTIMIZE_FLAGS="-O3 -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" -+ MOZ_PGO_OPTIMIZE_FLAGS="-Os" -+ MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks $MOZ_OPTIMIZE_SIZE_TWEAK" - MOZ_DEBUG_FLAGS="-g" - fi - -diff -up xulrunner-21.0/mozilla-release/media/webrtc/trunk/Makefile.old xulrunner-21.0/mozilla-release/media/webrtc/trunk/Makefile -diff -up xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac.old xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac ---- xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac.old 2013-05-11 21:19:46.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.ac 2013-05-13 08:53:03.355969113 +0200 -@@ -573,7 +573,7 @@ if test "x$enable_debug" = "x0" -a "x$no - echo "$EXTRA_CFLAGS" | grep "\-O" >/dev/null || optimize="yes" - if test "x${optimize}" = "xyes" ; then - if test "x$GCC" = "xyes" ; then -- JE_CFLAGS_APPEND([-O3]) -+ JE_CFLAGS_APPEND([-Os]) - JE_CFLAGS_APPEND([-funroll-loops]) - elif test "x$je_cv_msvc" = "xyes" ; then - JE_CFLAGS_APPEND([-O2]) -diff -up xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure.old xulrunner-21.0/mozilla-release/memory/jemalloc/src/configure diff --git a/xulrunner.spec b/xulrunner.spec index 6edbc86..5017579 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,7 +99,6 @@ Patch19: xulrunner-21.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch -Patch22: rhbz-928353.patch Patch23: mozilla-851850.patch # Upstream patches @@ -241,12 +240,6 @@ cd %{tarballdir} %patch104 -p1 -b .844883 %endif -%if 0%{?fedora} >= 19 -%ifarch %{ix86} -%patch22 -p2 -%endif -%endif - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig %if %{enable_mozilla_crashreporter} @@ -527,6 +520,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed May 29 2013 Martin Stransky - 21.0-6 +- Removed the i686/f19 gcc hack (rhbz#928353) + * Tue May 21 2013 Martin Stransky - 21.0-5 - Added ppc(64) patches (rhbz#963907) From cf4d956b905e0c190ab373fb5c605486a9cfb967 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 3 Jun 2013 13:10:02 +0200 Subject: [PATCH 116/239] Crashreporter build flags changed --- xulrunner-mozconfig | 1 - xulrunner-mozconfig-debuginfo | 5 ----- xulrunner.spec | 9 ++++----- 3 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 xulrunner-mozconfig-debuginfo diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 7852dd4..9482fc9 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -20,7 +20,6 @@ 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 diff --git a/xulrunner-mozconfig-debuginfo b/xulrunner-mozconfig-debuginfo deleted file mode 100644 index 4dd2427..0000000 --- a/xulrunner-mozconfig-debuginfo +++ /dev/null @@ -1,5 +0,0 @@ -# For mozilla's debuginfo: -export CFLAGS="$CFLAGS -gdwarf-2" -export CXXFLAGS="$CXXFLAGS -gdwarf-2" -export MOZ_DEBUG_SYMBOLS=1 -ac_add_options --enable-crashreporter diff --git a/xulrunner.spec b/xulrunner.spec index 5017579..7b5de8a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,13 +76,12 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.bz2 Source10: %{name}-mozconfig -Source11: %{name}-mozconfig-debuginfo Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in @@ -242,9 +241,6 @@ cd %{tarballdir} %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig -%if %{enable_mozilla_crashreporter} -%{__cat} %{SOURCE11} >> .mozconfig -%endif %if %{?system_nss} echo "ac_add_options --with-system-nspr" >> .mozconfig @@ -520,6 +516,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jun 3 2013 Jan Horak - 21.0-7 +- Using upstream build flags for crashreporter + * Wed May 29 2013 Martin Stransky - 21.0-6 - Removed the i686/f19 gcc hack (rhbz#928353) From 06dfb191830baefb784531bdf3449a1c932e4059 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 12 Jun 2013 17:35:59 +0200 Subject: [PATCH 117/239] Fixed rhbz#966424 - unable to install addons --- rhbz-966424.patch | 24 ++++++++++++++++++++++++ xulrunner.spec | 9 ++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 rhbz-966424.patch diff --git a/rhbz-966424.patch b/rhbz-966424.patch new file mode 100644 index 0000000..37ddc6e --- /dev/null +++ b/rhbz-966424.patch @@ -0,0 +1,24 @@ +diff --git a/toolkit/mozapps/shared/CertUtils.jsm b/toolkit/toolkit/mozapps/shared/CertUtils.jsm +--- a/toolkit/mozapps/shared/CertUtils.jsm ++++ b/toolkit/mozapps/shared/CertUtils.jsm +@@ -170,17 +170,19 @@ this.checkCert = + issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3); + var tokenNames = issuerCert.getAllTokenNames({}); + + if (!tokenNames || !tokenNames.some(isBuiltinToken)) + throw new Ce(certNotBuiltInErr, Cr.NS_ERROR_ABORT); + } + + function isBuiltinToken(tokenName) { +- return tokenName == "Builtin Object Token"; ++ return tokenName == "Builtin Object Token" || ++ tokenName == "Default Trust" || ++ tokenName == "System Trust"; + } + + /** + * This class implements nsIBadCertListener. Its job is to prevent "bad cert" + * security dialogs from being shown to the user. It is better to simply fail + * if the certificate is bad. See bug 304286. + * + * @param aAllowNonBuiltInCerts (optional) diff --git a/xulrunner.spec b/xulrunner.spec index 7b5de8a..249c9d1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 21.0 -Release: 7%{?pre_tag}%{?dist} +Release: 8%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -99,6 +99,8 @@ Patch19: xulrunner-21.0-s390-inlines.patch Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch Patch23: mozilla-851850.patch +# Unable to install addons from https pages +Patch24: rhbz-966424.patch # Upstream patches Patch104: mozilla-844883.patch @@ -239,6 +241,8 @@ cd %{tarballdir} %patch104 -p1 -b .844883 %endif +%patch24 -p1 -b .966424 + %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -516,6 +520,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 12 2013 Jan Horak - 21.0-8 +- Fixed rhbz#966424 - unable to install addons + * Mon Jun 3 2013 Jan Horak - 21.0-7 - Using upstream build flags for crashreporter From 0a3e2842771f20f0be239048bb2b88221ed1589f Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 21 Jun 2013 13:03:16 +0200 Subject: [PATCH 118/239] Update to latest upstream (22.0) --- mozilla-build.patch | 21 +++++++++------------ sources | 2 +- xulrunner.spec | 7 +++++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/mozilla-build.patch b/mozilla-build.patch index 9468e02..1dd29d0 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,20 +1,17 @@ -diff -up mozilla-aurora-7676a9a06403/security/build/Makefile.in.build mozilla-aurora-7676a9a06403/security/build/Makefile.in ---- mozilla-aurora-7676a9a06403/security/build/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200 -+++ mozilla-aurora-7676a9a06403/security/build/Makefile.in 2012-09-18 10:58:45.560063613 +0200 -@@ -139,7 +139,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +--- mozilla-release/security/build/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 ++++ mozilla-release/security/build/Makefile.in 2013-06-18 14:01:41.940378194 +0200 +@@ -133,7 +133,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 mozilla-aurora-7676a9a06403/security/manager/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/Makefile.in -diff -up mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in ---- mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in.build 2012-09-13 14:18:35.000000000 +0200 -+++ mozilla-aurora-7676a9a06403/security/manager/ssl/src/Makefile.in 2012-09-18 10:54:16.310505794 +0200 -@@ -84,7 +84,6 @@ CSRCS += md4.c - EXTRA_DEPS = $(NSS_DEP_LIBS) + ifeq ($(OS_ARCH),WINNT) + DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t" +--- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 ++++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-06-18 14:01:18.659377663 +0200 +@@ -86,7 +86,6 @@ endif + CSRCS += md4.c DEFINES += \ - -DNSS_ENABLE_ECC \ diff --git a/sources b/sources index ef565ad..e8c6ff5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d3906a3033b4084cade8cb81fa984eb4 firefox-21.0.source.tar.bz2 +f5e67dc477e0d2f7b7d23b105047d37b firefox-22.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 249c9d1..c0fd93a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -75,8 +75,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 21.0 -Release: 8%{?pre_tag}%{?dist} +Version: 22.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -520,6 +520,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jun 21 2013 Martin Stransky - 22.0-1 +- Update to latest upstream (22.0) + * Wed Jun 12 2013 Jan Horak - 21.0-8 - Fixed rhbz#966424 - unable to install addons From c46ce8e0ff33e5f5f2233c7261604389b217e44c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 21 Jun 2013 14:24:16 +0200 Subject: [PATCH 119/239] removed libxpcom.so file --- xulrunner.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index c0fd93a..cfe6efd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -436,9 +436,6 @@ EOF # Install xpcshell %{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} -# Fix libxpcom.so rights -chmod 755 $RPM_BUILD_ROOT/%{mozappdir}/libxpcom.so - # Install run-mozilla.sh %{__cp} objdir/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{mozappdir} From 72979481631212d8c47565ee265da9389f8c84d4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 24 Jun 2013 13:26:24 +0200 Subject: [PATCH 120/239] Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index cfe6efd..727a526 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -517,6 +517,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jun 24 2013 Martin Stransky - 22.0-2 +- Rebuild + * Fri Jun 21 2013 Martin Stransky - 22.0-1 - Update to latest upstream (22.0) From 8f6b7dddbe790cff48cdc5d0a21dbf158ed2e641 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 1 Jul 2013 15:04:39 +0200 Subject: [PATCH 121/239] Added patch for proxy issues --- mozilla-817533.patch | 32 ++++++++++++++++++++++++++++++++ xulrunner.spec | 5 +++++ 2 files changed, 37 insertions(+) create mode 100644 mozilla-817533.patch diff --git a/mozilla-817533.patch b/mozilla-817533.patch new file mode 100644 index 0000000..11d1bb7 --- /dev/null +++ b/mozilla-817533.patch @@ -0,0 +1,32 @@ +# HG changeset patch +# Parent d09a5a5666baa44c817a4e1e463ef62eae0a1105 +# User Patrick McManus +bug 817533 - failed system proxy lookups should not fallback to manual configs r?jduell + +diff --git a/netwerk/base/src/nsProtocolProxyService.cpp b/netwerk/base/src/nsProtocolProxyService.cpp +--- a/netwerk/base/src/nsProtocolProxyService.cpp ++++ b/netwerk/base/src/nsProtocolProxyService.cpp +@@ -1553,17 +1553,22 @@ nsProtocolProxyService::Resolve_Internal + + // Proxy auto config magic... + if (mProxyConfig == PROXYCONFIG_PAC || mProxyConfig == PROXYCONFIG_WPAD) { + // Do not query PAC now. + *usePACThread = true; + return NS_OK; + } + +- // proxy info values ++ // If we aren't in manual proxy configuration mode then we don't ++ // want to honor any manual specific prefs that might be still set ++ if (mProxyConfig != PROXYCONFIG_MANUAL) ++ return NS_OK; ++ ++ // proxy info values for manual configuration mode + const char *type = nullptr; + const nsACString *host = nullptr; + int32_t port = -1; + + uint32_t proxyFlags = 0; + + if ((flags & RESOLVE_PREFER_SOCKS_PROXY) && + !mSOCKSProxyHost.IsEmpty() && mSOCKSProxyPort > 0) { diff --git a/xulrunner.spec b/xulrunner.spec index 727a526..7d3e21e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -104,6 +104,7 @@ Patch24: rhbz-966424.patch # Upstream patches Patch104: mozilla-844883.patch +Patch105: mozilla-817533.patch # --------------------------------------------------- @@ -242,6 +243,7 @@ cd %{tarballdir} %endif %patch24 -p1 -b .966424 +%patch105 -p1 -b .817533 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -517,6 +519,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 1 2013 Jan Horak - 22.0-3 +- Added fix from mozbz#817533 - fix issues with proxy settings + * Mon Jun 24 2013 Martin Stransky - 22.0-2 - Rebuild From 4d209f0963d4ab472b13eb4fe25d1246d157d1d8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 1 Jul 2013 15:08:15 +0200 Subject: [PATCH 122/239] Bump release --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7d3e21e..ebd3382 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet From 0ab4ac95f0bb0b43ce4752f31f7d1979437387ae Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 1 Jul 2013 17:25:21 +0200 Subject: [PATCH 123/239] Fixed healthreporter --- mozilla-831688.patch | 16 ++++++++++++++++ xulrunner.spec | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 mozilla-831688.patch diff --git a/mozilla-831688.patch b/mozilla-831688.patch new file mode 100644 index 0000000..4548be3 --- /dev/null +++ b/mozilla-831688.patch @@ -0,0 +1,16 @@ +# HG changeset patch +# Parent ae460fbc4d0e1768578b80b71bf2df8003c908ce +# User Jan Horak +diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh +--- a/xulrunner/confvars.sh ++++ b/xulrunner/confvars.sh +@@ -15,8 +15,9 @@ MOZ_URL_CLASSIFIER=1 + MOZ_SERVICES_COMMON=1 + MOZ_SERVICES_CRYPTO=1 + MOZ_SERVICES_METRICS=1 + MOZ_SERVICES_SYNC=1 + MOZ_MEDIA_NAVIGATOR=1 + if test "$OS_TARGET" = "WINNT" -o "$OS_TARGET" = "Darwin"; then + MOZ_FOLD_LIBS=1 + fi ++MOZ_SERVICES_HEALTHREPORT=1 diff --git a/xulrunner.spec b/xulrunner.spec index ebd3382..b81ec3c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -105,6 +105,7 @@ Patch24: rhbz-966424.patch # Upstream patches Patch104: mozilla-844883.patch Patch105: mozilla-817533.patch +Patch106: mozilla-831688.patch # --------------------------------------------------- @@ -244,6 +245,7 @@ cd %{tarballdir} %patch24 -p1 -b .966424 %patch105 -p1 -b .817533 +%patch106 -p1 -b .831688 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -519,8 +521,9 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Jul 1 2013 Jan Horak - 22.0-3 +* Mon Jul 1 2013 Jan Horak - 22.0-4 - Added fix from mozbz#817533 - fix issues with proxy settings +- Fixed missing about:healthreport * Mon Jun 24 2013 Martin Stransky - 22.0-2 - Rebuild From 5758cbe039a99b8c6ac3961366f270ef16de59fb Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 24 Jul 2013 09:55:00 +0100 Subject: [PATCH 124/239] Enable web-rtc on ARM now it's fixed upstream (RHBZ 886976) --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index b81ec3c..a994201 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -308,7 +308,7 @@ echo "ac_add_options --disable-polyic" >> .mozconfig echo "ac_add_options --disable-tracejit" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 +%ifnarch %{ix86} x86_64 armv7hl armv7hnl echo "ac_add_options --disable-webrtc" >> .mozconfig %endif @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 24 2013 Peter Robinson 22.0-5 +- Enable web-rtc on ARM now it's fixed upstream (RHBZ 886976) + * Mon Jul 1 2013 Jan Horak - 22.0-4 - Added fix from mozbz#817533 - fix issues with proxy settings - Fixed missing about:healthreport From 883ddfc115a075a962d368435ecb254d302a75bb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 25 Jul 2013 13:35:53 +0200 Subject: [PATCH 125/239] Removed already applied patches (rhbz#978123) --- mozilla-844883.patch | 17 ----------------- mozilla-851850.patch | 31 ------------------------------- xulrunner.spec | 9 ++++----- 3 files changed, 4 insertions(+), 53 deletions(-) delete mode 100644 mozilla-844883.patch delete mode 100644 mozilla-851850.patch diff --git a/mozilla-844883.patch b/mozilla-844883.patch deleted file mode 100644 index 9298d7d..0000000 --- a/mozilla-844883.patch +++ /dev/null @@ -1,17 +0,0 @@ -# HG changeset patch -# Parent f8a3e008d03b538873a8d4f16fb97829f171517b -# User Steve Singer -bug 844883 use a signed value for the stride - -diff -r f8a3e008d03b -r a298fedfda70 gfx/2d/Blur.cpp ---- a/gfx/2d/Blur.cpp Sun Mar 17 00:55:23 2013 -0400 -+++ b/gfx/2d/Blur.cpp Sun Mar 17 01:28:39 2013 -0400 -@@ -650,7 +650,7 @@ - return; - } - -- uint32_t stride32bit = aIntegralImageStride / 4; -+ int32_t stride32bit = aIntegralImageStride / 4; - - int32_t leftInflation = RoundUpToMultipleOf4(aLeftLobe).value(); - diff --git a/mozilla-851850.patch b/mozilla-851850.patch deleted file mode 100644 index 04260b9..0000000 --- a/mozilla-851850.patch +++ /dev/null @@ -1,31 +0,0 @@ - -# HG changeset patch -# User Steve Singer -# Date 1363699875 14400 -# Node ID fe010206e5add13f4202113dcd74f54acb1e5b37 -# Parent 90c5dd3a2d1533ce2646a53c6ec84773e6f42d43 -Bug 851850 - Link in altivec on ppc64. r=jmuizelaar - -diff --git a/gfx/qcms/Makefile.in b/gfx/qcms/Makefile.in ---- a/gfx/qcms/Makefile.in -+++ b/gfx/qcms/Makefile.in -@@ -48,17 +48,17 @@ else - endif - else - SSE1_FLAGS= - SSE2_FLAGS= - endif - endif - endif - else --ifeq (ppc,$(CPU_ARCH)) -+ifeq (ppc,$(findstring ppc,$(CPU_ARCH))) - ifdef GNU_CC - CSRCS += transform-altivec.c - ALTIVEC_FLAGS=-maltivec - endif - endif - endif - - FORCE_STATIC_LIB = 1 - diff --git a/xulrunner.spec b/xulrunner.spec index a994201..e1fd6a2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -98,12 +98,10 @@ Patch19: xulrunner-21.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch Patch21: rhbz-911314.patch -Patch23: mozilla-851850.patch # Unable to install addons from https pages Patch24: rhbz-966424.patch # Upstream patches -Patch104: mozilla-844883.patch Patch105: mozilla-817533.patch Patch106: mozilla-831688.patch @@ -239,8 +237,6 @@ cd %{tarballdir} %ifarch ppc ppc64 %patch21 -p2 -b .ppc -%patch23 -p1 -b .851850 -%patch104 -p1 -b .844883 %endif %patch24 -p1 -b .966424 @@ -521,6 +517,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jul 25 2013 Martin Stransky - 22.0-6 +- Removed already applied patches (rhbz#978123) + * Wed Jul 24 2013 Peter Robinson 22.0-5 - Enable web-rtc on ARM now it's fixed upstream (RHBZ 886976) From 5e7e915b14ee2a25baf6d664cb9bf82928dbe066 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 29 Jul 2013 12:13:57 +0200 Subject: [PATCH 126/239] Fixed mozbz#860213 --- xulrunner.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index e1fd6a2..9bd5e4d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -76,7 +76,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 22.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -104,6 +104,7 @@ Patch24: rhbz-966424.patch # Upstream patches Patch105: mozilla-817533.patch Patch106: mozilla-831688.patch +Patch107: mozilla-860213.patch # --------------------------------------------------- @@ -242,6 +243,7 @@ cd %{tarballdir} %patch24 -p1 -b .966424 %patch105 -p1 -b .817533 %patch106 -p1 -b .831688 +%patch107 -p1 -b .860213 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -517,6 +519,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Jul 29 2013 Jan Horak - 22.0-7 +- Added fix for mozbz#860213 + * Thu Jul 25 2013 Martin Stransky - 22.0-6 - Removed already applied patches (rhbz#978123) From e32431451116585c5bbdce81d4ad4c83576e2f88 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 29 Jul 2013 16:29:20 +0200 Subject: [PATCH 127/239] Enable system libefi --- mozilla-860213.patch | 69 ++++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 12 ++++++++ 2 files changed, 81 insertions(+) create mode 100644 mozilla-860213.patch diff --git a/mozilla-860213.patch b/mozilla-860213.patch new file mode 100644 index 0000000..5c25541 --- /dev/null +++ b/mozilla-860213.patch @@ -0,0 +1,69 @@ +# HG changeset patch +# Parent 9cf679827fae794995f0d35030ad3fb4c7a6e6a8 +# User Jan Horak +# Bug 860213 - Use async version of g_file_set_attribute to set file metadata, removes UI block when dbus timeout. + +diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp +--- a/toolkit/components/downloads/nsDownloadManager.cpp ++++ b/toolkit/components/downloads/nsDownloadManager.cpp +@@ -2520,16 +2520,30 @@ nsDownload::nsDownload() : mDownloadStat + mAutoResume(DONT_RESUME) + { + } + + nsDownload::~nsDownload() + { + } + ++#ifdef MOZ_ENABLE_GIO ++static void gio_set_metadata_done(GObject *source_obj, GAsyncResult *res, gpointer user_data) ++{ ++ GError *err = NULL; ++ g_file_set_attributes_finish(G_FILE(source_obj), res, NULL, &err); ++ if (err) { ++#ifdef DEBUG ++ NS_DebugBreak(NS_DEBUG_WARNING, "Set file metadata failed: ", err->message, __FILE__, __LINE__); ++#endif ++ g_error_free(err); ++ } ++} ++#endif ++ + nsresult + nsDownload::SetState(DownloadState aState) + { + NS_ASSERTION(mDownloadState != aState, + "Trying to set the download state to what it already is set to!"); + + int16_t oldState = mDownloadState; + mDownloadState = aState; +@@ -2665,21 +2679,24 @@ nsDownload::SetState(DownloadState aStat + } + #endif + } + #ifdef MOZ_ENABLE_GIO + // Use GIO to store the source URI for later display in the file manager. + GFile* gio_file = g_file_new_for_path(NS_ConvertUTF16toUTF8(path).get()); + nsCString source_uri; + mSource->GetSpec(source_uri); +- +- g_file_set_attribute(gio_file, "metadata::download-uri", +- G_FILE_ATTRIBUTE_TYPE_STRING, +- (gpointer)source_uri.get(), +- G_FILE_QUERY_INFO_NONE, NULL, NULL); ++ GFileInfo *file_info = g_file_info_new(); ++ g_file_info_set_attribute_string(file_info, "metadata::download-uri", source_uri.get()); ++ g_file_set_attributes_async(gio_file, ++ file_info, ++ G_FILE_QUERY_INFO_NONE, ++ G_PRIORITY_DEFAULT, ++ NULL, gio_set_metadata_done, NULL); ++ g_object_unref(file_info); + g_object_unref(gio_file); + #endif + } + #endif + #ifdef XP_MACOSX + // On OS X, make the downloads stack bounce. + CFStringRef observedObject = ::CFStringCreateWithCString(kCFAllocatorDefault, + NS_ConvertUTF16toUTF8(path).get(), diff --git a/xulrunner.spec b/xulrunner.spec index 9bd5e4d..31cf086 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -4,8 +4,10 @@ # Use system sqlite? %if 0%{?fedora} < 19 %define system_sqlite 0 +%define system_ffi 0 %else %define system_sqlite 1 +%define system_ffi 1 %endif # Use system cairo? @@ -151,6 +153,10 @@ BuildRequires: sqlite-devel >= %{sqlite_version} Requires: sqlite >= %{sqlite_build_version} %endif +%if %{?system_ffi} +BuildRequires: libffi-devel +%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 provides mechanisms @@ -268,6 +274,11 @@ echo "ac_add_options --enable-system-cairo" >> .mozconfig echo "ac_add_options --disable-system-cairo" >> .mozconfig %endif +%if %{?system_ffi} +echo "ac_add_options --enable-system-ffi" >> .mozconfig +%endif + + %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig @@ -520,6 +531,7 @@ fi %changelog * Mon Jul 29 2013 Jan Horak - 22.0-7 +- Use system libffi for Fedora 19+ - Added fix for mozbz#860213 * Thu Jul 25 2013 Martin Stransky - 22.0-6 From d4a72524efdfcee0ecbc7c998fff103d39ccd559 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 5 Aug 2013 14:31:15 +0200 Subject: [PATCH 128/239] Update to latest upstream (23.0) --- mozilla-817533.patch | 32 -------------------- mozilla-860213.patch | 69 -------------------------------------------- xulrunner.spec | 11 ++++--- 3 files changed, 5 insertions(+), 107 deletions(-) delete mode 100644 mozilla-817533.patch delete mode 100644 mozilla-860213.patch diff --git a/mozilla-817533.patch b/mozilla-817533.patch deleted file mode 100644 index 11d1bb7..0000000 --- a/mozilla-817533.patch +++ /dev/null @@ -1,32 +0,0 @@ -# HG changeset patch -# Parent d09a5a5666baa44c817a4e1e463ef62eae0a1105 -# User Patrick McManus -bug 817533 - failed system proxy lookups should not fallback to manual configs r?jduell - -diff --git a/netwerk/base/src/nsProtocolProxyService.cpp b/netwerk/base/src/nsProtocolProxyService.cpp ---- a/netwerk/base/src/nsProtocolProxyService.cpp -+++ b/netwerk/base/src/nsProtocolProxyService.cpp -@@ -1553,17 +1553,22 @@ nsProtocolProxyService::Resolve_Internal - - // Proxy auto config magic... - if (mProxyConfig == PROXYCONFIG_PAC || mProxyConfig == PROXYCONFIG_WPAD) { - // Do not query PAC now. - *usePACThread = true; - return NS_OK; - } - -- // proxy info values -+ // If we aren't in manual proxy configuration mode then we don't -+ // want to honor any manual specific prefs that might be still set -+ if (mProxyConfig != PROXYCONFIG_MANUAL) -+ return NS_OK; -+ -+ // proxy info values for manual configuration mode - const char *type = nullptr; - const nsACString *host = nullptr; - int32_t port = -1; - - uint32_t proxyFlags = 0; - - if ((flags & RESOLVE_PREFER_SOCKS_PROXY) && - !mSOCKSProxyHost.IsEmpty() && mSOCKSProxyPort > 0) { diff --git a/mozilla-860213.patch b/mozilla-860213.patch deleted file mode 100644 index 5c25541..0000000 --- a/mozilla-860213.patch +++ /dev/null @@ -1,69 +0,0 @@ -# HG changeset patch -# Parent 9cf679827fae794995f0d35030ad3fb4c7a6e6a8 -# User Jan Horak -# Bug 860213 - Use async version of g_file_set_attribute to set file metadata, removes UI block when dbus timeout. - -diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp ---- a/toolkit/components/downloads/nsDownloadManager.cpp -+++ b/toolkit/components/downloads/nsDownloadManager.cpp -@@ -2520,16 +2520,30 @@ nsDownload::nsDownload() : mDownloadStat - mAutoResume(DONT_RESUME) - { - } - - nsDownload::~nsDownload() - { - } - -+#ifdef MOZ_ENABLE_GIO -+static void gio_set_metadata_done(GObject *source_obj, GAsyncResult *res, gpointer user_data) -+{ -+ GError *err = NULL; -+ g_file_set_attributes_finish(G_FILE(source_obj), res, NULL, &err); -+ if (err) { -+#ifdef DEBUG -+ NS_DebugBreak(NS_DEBUG_WARNING, "Set file metadata failed: ", err->message, __FILE__, __LINE__); -+#endif -+ g_error_free(err); -+ } -+} -+#endif -+ - nsresult - nsDownload::SetState(DownloadState aState) - { - NS_ASSERTION(mDownloadState != aState, - "Trying to set the download state to what it already is set to!"); - - int16_t oldState = mDownloadState; - mDownloadState = aState; -@@ -2665,21 +2679,24 @@ nsDownload::SetState(DownloadState aStat - } - #endif - } - #ifdef MOZ_ENABLE_GIO - // Use GIO to store the source URI for later display in the file manager. - GFile* gio_file = g_file_new_for_path(NS_ConvertUTF16toUTF8(path).get()); - nsCString source_uri; - mSource->GetSpec(source_uri); -- -- g_file_set_attribute(gio_file, "metadata::download-uri", -- G_FILE_ATTRIBUTE_TYPE_STRING, -- (gpointer)source_uri.get(), -- G_FILE_QUERY_INFO_NONE, NULL, NULL); -+ GFileInfo *file_info = g_file_info_new(); -+ g_file_info_set_attribute_string(file_info, "metadata::download-uri", source_uri.get()); -+ g_file_set_attributes_async(gio_file, -+ file_info, -+ G_FILE_QUERY_INFO_NONE, -+ G_PRIORITY_DEFAULT, -+ NULL, gio_set_metadata_done, NULL); -+ g_object_unref(file_info); - g_object_unref(gio_file); - #endif - } - #endif - #ifdef XP_MACOSX - // On OS X, make the downloads stack bounce. - CFStringRef observedObject = ::CFStringCreateWithCString(kCFAllocatorDefault, - NS_ConvertUTF16toUTF8(path).get(), diff --git a/xulrunner.spec b/xulrunner.spec index 31cf086..5ce6b2f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 22.0 -Release: 7%{?pre_tag}%{?dist} +Version: 23.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -104,9 +104,7 @@ Patch21: rhbz-911314.patch Patch24: rhbz-966424.patch # Upstream patches -Patch105: mozilla-817533.patch Patch106: mozilla-831688.patch -Patch107: mozilla-860213.patch # --------------------------------------------------- @@ -247,9 +245,7 @@ cd %{tarballdir} %endif %patch24 -p1 -b .966424 -%patch105 -p1 -b .817533 %patch106 -p1 -b .831688 -%patch107 -p1 -b .860213 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -530,6 +526,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jul 25 2013 Martin Stransky - 23.0-1 +- Update to latest upstream (23.0) + * Mon Jul 29 2013 Jan Horak - 22.0-7 - Use system libffi for Fedora 19+ - Added fix for mozbz#860213 From 29350dbceb2d1cf853118c79f88d8d9a94be8143 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 5 Aug 2013 14:35:20 +0200 Subject: [PATCH 129/239] Update to latest upstream (23.0) - source upload --- sources | 2 +- xulrunner.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index e8c6ff5..50f1404 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f5e67dc477e0d2f7b7d23b105047d37b firefox-22.0.source.tar.bz2 +794e0139c4df0392146353c655d94bb9 firefox-23.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 5ce6b2f..5ca140d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -526,7 +526,7 @@ fi #--------------------------------------------------------------------- %changelog -* Thu Jul 25 2013 Martin Stransky - 23.0-1 +* Mon Aug 5 2013 Martin Stransky - 23.0-1 - Update to latest upstream (23.0) * Mon Jul 29 2013 Jan Horak - 22.0-7 From 480cf5fab940b0480d9b4cd1900c876a6269ef51 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 5 Aug 2013 15:02:14 +0200 Subject: [PATCH 130/239] Update to latest upstream (23.0 Build 2) --- sources | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 50f1404..f6a9fd4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -794e0139c4df0392146353c655d94bb9 firefox-23.0.source.tar.bz2 +059e2e0fdd0ebd98d62994762b25dfae firefox-23.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 5ca140d..af0f529 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 23.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -526,6 +526,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 5 2013 Martin Stransky - 23.0-2 +- Update to latest upstream (23.0 Build 2) + * Mon Aug 5 2013 Martin Stransky - 23.0-1 - Update to latest upstream (23.0) From c8142c6a9409550e36a39cefb548a17c6e0223ad Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 19 Aug 2013 13:53:18 +0200 Subject: [PATCH 131/239] Update to 23.0.1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index f6a9fd4..4362a68 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -059e2e0fdd0ebd98d62994762b25dfae firefox-23.0.source.tar.bz2 +f854095987b2a66e25c9bfd808e5eaeb firefox-23.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index af0f529..a997906 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 23.0 -Release: 2%{?pre_tag}%{?dist} +Version: 23.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -526,6 +526,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 19 2013 Jan Horak - 23.0.1-1 +- Update to 23.0.1 + * Mon Aug 5 2013 Martin Stransky - 23.0-2 - Update to latest upstream (23.0 Build 2) From b434782fd67014c52648f4aac4e3f3b194bdbab1 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 29 Aug 2013 16:04:07 +0200 Subject: [PATCH 132/239] Enabled dtrace for debug builds --- xulrunner.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index a997906..80baffd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 23.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -278,6 +278,7 @@ echo "ac_add_options --enable-system-ffi" >> .mozconfig %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig +echo "ac_add_options --enable-dtrace" >> .mozconfig %else echo "ac_add_options --disable-debug" >> .mozconfig echo "ac_add_options --enable-optimize" >> .mozconfig @@ -526,6 +527,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Aug 29 2013 Martin Stransky - 23.0.1-2 +- Enabled dtrace for debug builds + * Mon Aug 19 2013 Jan Horak - 23.0.1-1 - Update to 23.0.1 From f2b9d9294e297ad6d980bcb30fcf27c147d6feb6 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Sat, 31 Aug 2013 20:57:19 +0200 Subject: [PATCH 133/239] update rhbz-911314.patch (PPC* only) --- rhbz-911314.patch | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rhbz-911314.patch b/rhbz-911314.patch index 9a28aaa..3a62c8d 100644 --- a/rhbz-911314.patch +++ b/rhbz-911314.patch @@ -11,7 +11,7 @@ diff -up xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc xulrunner-21.0/m - * Note: The freelist supports a maximum arena shift of 15. - * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. - */ --#if (defined(SOLARIS) || defined(__FreeBSD__)) && \ +-#if (defined(SOLARIS) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ - (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) -const size_t PageShift = 13; -const size_t ArenaShift = PageShift; diff --git a/xulrunner.spec b/xulrunner.spec index 80baffd..95503a0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 23.0.1 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -527,6 +527,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Aug 31 2013 Karsten Hopp 23.0.1-3 +- update rhbz-911314.patch (PPC* only) + * Thu Aug 29 2013 Martin Stransky - 23.0.1-2 - Enabled dtrace for debug builds From bcd0b40902c0b482c693e1b492a6491ba662c419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 2 Sep 2013 11:32:05 +0200 Subject: [PATCH 134/239] Fix build on 64-bit big endian platforms (mozbz#618485) --- mozilla-618485.patch | 30 ++++++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 mozilla-618485.patch diff --git a/mozilla-618485.patch b/mozilla-618485.patch new file mode 100644 index 0000000..df08387 --- /dev/null +++ b/mozilla-618485.patch @@ -0,0 +1,30 @@ + +# HG changeset patch +# User Landry Breuil +# Date 1370688550 -7200 +# Node ID 82fab5c8a6d5a94c6a0f32a942976595b6e722a2 +# Parent 308462ba17bae57b9571fe397e0480b1c3217d01 +Bug 618485: Finally remove uintptr_t word payload union member on 64BE, it grows jsval_layout size and is unused. r=luke + +diff --git a/js/public/Value.h b/js/public/Value.h +--- a/js/public/Value.h ++++ b/js/public/Value.h +@@ -316,17 +316,16 @@ typedef union jsval_layout + uint64_t payload47 : 47; + } debugView; + struct { + uint32_t padding; + union { + int32_t i32; + uint32_t u32; + JSWhyMagic why; +- uintptr_t word; + } payload; + } s; + double asDouble; + void *asPtr; + size_t asWord; + uintptr_t asUIntPtr; + } JSVAL_ALIGNMENT jsval_layout; + # endif /* JS_BITS_PER_WORD */ + diff --git a/xulrunner.spec b/xulrunner.spec index 95503a0..1ea990c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 23.0.1 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -105,6 +105,7 @@ Patch24: rhbz-966424.patch # Upstream patches Patch106: mozilla-831688.patch +Patch107: mozilla-618485.patch # --------------------------------------------------- @@ -246,6 +247,7 @@ cd %{tarballdir} %patch24 -p1 -b .966424 %patch106 -p1 -b .831688 +%patch107 -p1 -b .618485 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -527,6 +529,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 2 2013 Dan Horák - 23.0.1-4 +- Fix build on 64-bit big endian platforms (mozbz#618485) + * Sat Aug 31 2013 Karsten Hopp 23.0.1-3 - update rhbz-911314.patch (PPC* only) From e1c89329dcf159a857511098a31032b0ff86a635 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Sep 2013 13:53:39 +0200 Subject: [PATCH 135/239] Update to 24.0 --- mozilla-618485.patch | 30 ------------------------------ mozilla-831688.patch | 16 ---------------- rhbz-966424.patch | 5 ++--- sources | 2 +- xulrunner-15.0-gcc47.patch | 13 ------------- xulrunner-16.0-jemalloc-ppc.patch | 14 -------------- xulrunner-21.0-s390-inlines.patch | 12 ------------ xulrunner-24.0-gcc47.patch | 13 +++++++++++++ xulrunner-24.0-jemalloc-ppc.patch | 12 ++++++++++++ xulrunner-24.0-s390-inlines.patch | 12 ++++++++++++ xulrunner.spec | 21 ++++++++++----------- 11 files changed, 50 insertions(+), 100 deletions(-) delete mode 100644 mozilla-618485.patch delete mode 100644 mozilla-831688.patch delete mode 100644 xulrunner-15.0-gcc47.patch delete mode 100644 xulrunner-16.0-jemalloc-ppc.patch delete mode 100644 xulrunner-21.0-s390-inlines.patch create mode 100644 xulrunner-24.0-gcc47.patch create mode 100644 xulrunner-24.0-jemalloc-ppc.patch create mode 100644 xulrunner-24.0-s390-inlines.patch diff --git a/mozilla-618485.patch b/mozilla-618485.patch deleted file mode 100644 index df08387..0000000 --- a/mozilla-618485.patch +++ /dev/null @@ -1,30 +0,0 @@ - -# HG changeset patch -# User Landry Breuil -# Date 1370688550 -7200 -# Node ID 82fab5c8a6d5a94c6a0f32a942976595b6e722a2 -# Parent 308462ba17bae57b9571fe397e0480b1c3217d01 -Bug 618485: Finally remove uintptr_t word payload union member on 64BE, it grows jsval_layout size and is unused. r=luke - -diff --git a/js/public/Value.h b/js/public/Value.h ---- a/js/public/Value.h -+++ b/js/public/Value.h -@@ -316,17 +316,16 @@ typedef union jsval_layout - uint64_t payload47 : 47; - } debugView; - struct { - uint32_t padding; - union { - int32_t i32; - uint32_t u32; - JSWhyMagic why; -- uintptr_t word; - } payload; - } s; - double asDouble; - void *asPtr; - size_t asWord; - uintptr_t asUIntPtr; - } JSVAL_ALIGNMENT jsval_layout; - # endif /* JS_BITS_PER_WORD */ - diff --git a/mozilla-831688.patch b/mozilla-831688.patch deleted file mode 100644 index 4548be3..0000000 --- a/mozilla-831688.patch +++ /dev/null @@ -1,16 +0,0 @@ -# HG changeset patch -# Parent ae460fbc4d0e1768578b80b71bf2df8003c908ce -# User Jan Horak -diff --git a/xulrunner/confvars.sh b/xulrunner/confvars.sh ---- a/xulrunner/confvars.sh -+++ b/xulrunner/confvars.sh -@@ -15,8 +15,9 @@ MOZ_URL_CLASSIFIER=1 - MOZ_SERVICES_COMMON=1 - MOZ_SERVICES_CRYPTO=1 - MOZ_SERVICES_METRICS=1 - MOZ_SERVICES_SYNC=1 - MOZ_MEDIA_NAVIGATOR=1 - if test "$OS_TARGET" = "WINNT" -o "$OS_TARGET" = "Darwin"; then - MOZ_FOLD_LIBS=1 - fi -+MOZ_SERVICES_HEALTHREPORT=1 diff --git a/rhbz-966424.patch b/rhbz-966424.patch index 37ddc6e..c4c332e 100644 --- a/rhbz-966424.patch +++ b/rhbz-966424.patch @@ -1,6 +1,5 @@ -diff --git a/toolkit/mozapps/shared/CertUtils.jsm b/toolkit/toolkit/mozapps/shared/CertUtils.jsm ---- a/toolkit/mozapps/shared/CertUtils.jsm -+++ b/toolkit/mozapps/shared/CertUtils.jsm +--- a/toolkit/modules/CertUtils.jsm ++++ b/toolkit/modules/CertUtils.jsm @@ -170,17 +170,19 @@ this.checkCert = issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3); var tokenNames = issuerCert.getAllTokenNames({}); diff --git a/sources b/sources index 4362a68..7b21845 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f854095987b2a66e25c9bfd808e5eaeb firefox-23.0.1.source.tar.bz2 +06a4c0fe8d3a979aea2fce8d0fdbf328 firefox-24.0.source.tar.bz2 diff --git a/xulrunner-15.0-gcc47.patch b/xulrunner-15.0-gcc47.patch deleted file mode 100644 index 0d44796..0000000 --- a/xulrunner-15.0-gcc47.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in ---- xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in.gcc47 2012-08-15 07:48:31.000000000 +0200 -+++ xulrunner-15.0/mozilla-beta/toolkit/crashreporter/client/Makefile.in 2012-08-20 15:05:41.782947739 +0200 -@@ -34,6 +34,9 @@ CPPSRCS = \ - crashreporter.cpp \ - $(NULL) - -+# Needed for moz_free -+LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc -+ - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += crashreporter_win.cpp - LIBS += \ diff --git a/xulrunner-16.0-jemalloc-ppc.patch b/xulrunner-16.0-jemalloc-ppc.patch deleted file mode 100644 index 896a2c0..0000000 --- a/xulrunner-16.0-jemalloc-ppc.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: xulrunner-11.0/mozilla-release/memory/jemalloc/jemalloc.c -=================================================================== ---- xulrunner-11.0.orig/mozilla-release/memory/mozjemalloc/jemalloc.c -+++ xulrunner-11.0/mozilla-release/memory/mozjemalloc/jemalloc.c -@@ -1089,7 +1089,9 @@ static unsigned ncpus; - * controlling the malloc behavior are defined as compile-time constants - * for best performance and cannot be altered at runtime. - */ -+#if !(defined(__powerpc__)) - #define MALLOC_STATIC_SIZES 1 -+#endif - - #ifdef MALLOC_STATIC_SIZES - diff --git a/xulrunner-21.0-s390-inlines.patch b/xulrunner-21.0-s390-inlines.patch deleted file mode 100644 index cf2b0ca..0000000 --- a/xulrunner-21.0-s390-inlines.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up mozilla-release/js/src/vm/SPSProfiler.cpp.jscntxt mozilla-release/js/src/vm/SPSProfiler.cpp ---- mozilla-release/js/src/vm/SPSProfiler.cpp.jscntxt 2013-05-20 11:46:14.736790245 -0400 -+++ mozilla-release/js/src/vm/SPSProfiler.cpp 2013-05-20 11:38:20.696788904 -0400 -@@ -10,6 +10,8 @@ - #include "jsnum.h" - #include "jsscript.h" - -+#include "jscntxtinlines.h" -+ - #include "methodjit/MethodJIT.h" - #include "methodjit/Compiler.h" - diff --git a/xulrunner-24.0-gcc47.patch b/xulrunner-24.0-gcc47.patch new file mode 100644 index 0000000..a6bff8e --- /dev/null +++ b/xulrunner-24.0-gcc47.patch @@ -0,0 +1,13 @@ +diff -up xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in +--- xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-09-11 01:15:24.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-09-13 13:33:49.866875578 +0200 +@@ -60,6 +60,9 @@ $(DIST)/bin/crashreporter.crt: $(topsrcd + $(PYTHON) $(srcdir)/certdata2pem.py < $< > $@ + endif + ++# Needed for moz_free ++LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc ++ + LIBS += \ + $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \ + $(NULL) diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch new file mode 100644 index 0000000..fe404ca --- /dev/null +++ b/xulrunner-24.0-jemalloc-ppc.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c +--- xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2013-09-11 01:15:18.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c 2013-09-13 13:36:34.171680919 +0200 +@@ -1104,7 +1104,7 @@ static unsigned ncpus; + * controlling the malloc behavior are defined as compile-time constants + * for best performance and cannot be altered at runtime. + */ +-#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) ++#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !(defined(__powerpc__)) + #define MALLOC_STATIC_SIZES 1 + #endif + diff --git a/xulrunner-24.0-s390-inlines.patch b/xulrunner-24.0-s390-inlines.patch new file mode 100644 index 0000000..92175a3 --- /dev/null +++ b/xulrunner-24.0-s390-inlines.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp +--- xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-09-11 01:15:09.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-09-13 13:39:16.908478613 +0200 +@@ -9,6 +9,8 @@ + #include "jsnum.h" + #include "jsscript.h" + ++#include "jscntxtinlines.h" ++ + #include "vm/SPSProfiler.h" + #include "vm/StringBuffer.h" + diff --git a/xulrunner.spec b/xulrunner.spec index 1ea990c..f3831d1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 23.0.1 -Release: 4%{?pre_tag}%{?dist} +Version: 24.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -91,11 +91,11 @@ Source21: %{name}.sh.in Patch1: xulrunner-install-dir.patch Patch2: mozilla-build.patch Patch14: xulrunner-2.0-chromium-types.patch -Patch17: xulrunner-15.0-gcc47.patch +Patch17: xulrunner-24.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 -Patch18: xulrunner-16.0-jemalloc-ppc.patch +Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) -Patch19: xulrunner-21.0-s390-inlines.patch +Patch19: xulrunner-24.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch @@ -104,8 +104,6 @@ Patch21: rhbz-911314.patch Patch24: rhbz-966424.patch # Upstream patches -Patch106: mozilla-831688.patch -Patch107: mozilla-618485.patch # --------------------------------------------------- @@ -237,17 +235,15 @@ cd %{tarballdir} %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc -%patch19 -p1 -b .s390-inlines +%patch19 -p2 -b .s390-inlines -%patch20 -p2 -b .pk +%patch20 -p2 -b .pk %ifarch ppc ppc64 %patch21 -p2 -b .ppc %endif %patch24 -p1 -b .966424 -%patch106 -p1 -b .831688 -%patch107 -p1 -b .618485 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -529,6 +525,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Sep 13 2013 Martin Stransky - 24.0.1-1 +- Update to 24.0 + * Mon Sep 2 2013 Dan Horák - 23.0.1-4 - Fix build on 64-bit big endian platforms (mozbz#618485) From f14bf576412ca140ecb6e1543963c81bc82240aa Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Sep 2013 14:05:42 +0200 Subject: [PATCH 136/239] Disabled gstreamer support --- xulrunner-mozconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 9482fc9..7fed6ad 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -32,6 +32,7 @@ ac_add_options --enable-gio ac_add_options --disable-gnomevfs ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni +ac_add_options --disable-gstreamer export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 From 8d501e5c5ef503123eae825331a06762e0daf9bf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 16 Sep 2013 11:30:44 +0200 Subject: [PATCH 137/239] Arm build fix --- mozilla-build-arm.patch | 12 ++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 mozilla-build-arm.patch diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch new file mode 100644 index 0000000..6e27f78 --- /dev/null +++ b/mozilla-build-arm.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build.neon xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build +--- xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build.neon 2013-09-11 01:15:02.000000000 +0200 ++++ xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build 2013-09-16 11:23:40.487028288 +0200 +@@ -61,7 +61,7 @@ else: + 'yuv_row_other.cpp', + ] + +-if CONFIG['OS_TEST'] == 'arm' and CONFIG['HAVE_ARM_NEON']: ++if CONFIG['HAVE_ARM_NEON']: + CPP_SOURCES += [ + 'yuv_convert_arm.cpp', + ] diff --git a/xulrunner.spec b/xulrunner.spec index f3831d1..5d66b79 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 24.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -90,6 +90,7 @@ Source21: %{name}.sh.in # build patches Patch1: xulrunner-install-dir.patch Patch2: mozilla-build.patch +Patch3: mozilla-build-arm.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-24.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 @@ -232,6 +233,7 @@ cd %{tarballdir} %patch1 -p1 %patch2 -p1 -b .build +%patch3 -p2 -b .arm %patch14 -p2 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc @@ -525,6 +527,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 16 2013 Martin Stransky - 24.0.1-2 +- Arm build fix + * Fri Sep 13 2013 Martin Stransky - 24.0.1-1 - Update to 24.0 From 7f16336b7fd7bb785522da4a538b06f48c4071e9 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Tue, 15 Oct 2013 13:59:19 +0200 Subject: [PATCH 138/239] drop PPC-only rhbz-911314.patch, fixed upstream --- rhbz-911314.patch | 534 ---------------------------------------------- xulrunner.spec | 10 +- 2 files changed, 4 insertions(+), 540 deletions(-) delete mode 100644 rhbz-911314.patch diff --git a/rhbz-911314.patch b/rhbz-911314.patch deleted file mode 100644 index 3a62c8d..0000000 --- a/rhbz-911314.patch +++ /dev/null @@ -1,534 +0,0 @@ -diff -up xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc xulrunner-21.0/mozilla-release/js/public/HeapAPI.h ---- xulrunner-21.0/mozilla-release/js/public/HeapAPI.h.ppc 2013-05-12 23:56:19.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/public/HeapAPI.h 2013-05-21 23:14:04.698238150 +0200 -@@ -11,24 +11,7 @@ - namespace js { - namespace gc { - --/* -- * Page size must be static to support our arena pointer optimizations, so we -- * are forced to support each platform with non-4096 pages as a special case. -- * Note: The freelist supports a maximum arena shift of 15. -- * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. -- */ --#if (defined(SOLARIS) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ -- (defined(__sparc) || defined(__sparcv9) || defined(__ia64)) --const size_t PageShift = 13; --const size_t ArenaShift = PageShift; --#elif defined(__powerpc64__) --const size_t PageShift = 16; - const size_t ArenaShift = 12; --#else --const size_t PageShift = 12; --const size_t ArenaShift = PageShift; --#endif --const size_t PageSize = size_t(1) << PageShift; - const size_t ArenaSize = size_t(1) << ArenaShift; - const size_t ArenaMask = ArenaSize - 1; - -diff -up xulrunner-21.0/mozilla-release/js/src/gc/Heap.h.ppc xulrunner-21.0/mozilla-release/js/src/gc/Heap.h ---- xulrunner-21.0/mozilla-release/js/src/gc/Heap.h.ppc 2013-05-12 23:56:19.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/gc/Heap.h 2013-05-21 23:14:04.693238124 +0200 -@@ -812,7 +812,7 @@ struct Chunk - - /* Search for a decommitted arena to allocate. */ - unsigned findDecommittedArenaOffset(); -- ArenaHeader* fetchNextDecommittedArena(); -+ ArenaHeader* fetchNextDecommittedArena(JSRuntime *rt); - - public: - /* Unlink and return the freeArenasHead. */ -diff -up xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp.ppc xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp ---- xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp.ppc 2013-05-12 23:56:19.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/gc/Memory.cpp 2013-05-21 23:14:04.693238124 +0200 -@@ -8,6 +8,7 @@ - #include "mozilla/Assertions.h" - - #include "jsapi.h" -+#include "jscntxt.h" - - #include "js/HeapAPI.h" - #include "js/Utility.h" -@@ -18,39 +19,34 @@ using namespace js::gc; - - /* Unused memory decommiting requires the arena size match the page size. */ - static bool --DecommitEnabled() -+DecommitEnabled(JSRuntime *rt) - { -- return PageSize == ArenaSize; -+ return rt->gcSystemPageSize == ArenaSize; - } - - #if defined(XP_WIN) - #include "jswin.h" - #include - --static size_t AllocationGranularity = 0; -- - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { - SYSTEM_INFO sysinfo; - GetSystemInfo(&sysinfo); -- if (sysinfo.dwPageSize != PageSize) { -- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); -- MOZ_CRASH(); -- } -- AllocationGranularity = sysinfo.dwAllocationGranularity; -+ rt->gcSystemPageSize = sysinfo.dwPageSize; -+ rt->gcSystemAllocGranularity = sysinfo.dwAllocationGranularity; - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % AllocationGranularity == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - /* Special case: If we want allocation alignment, no further work is needed. */ -- if (alignment == AllocationGranularity) { -+ if (alignment == rt->gcSystemAllocGranularity) { - return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - } - -@@ -74,7 +70,7 @@ gc::MapAlignedPages(size_t size, size_t - if (!p) - return NULL; - void *chunkStart = (void *)(uintptr_t(p) + (alignment - (uintptr_t(p) % alignment))); -- UnmapPages(p, size * 2); -+ UnmapPages(rt, p, size * 2); - p = VirtualAlloc(chunkStart, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); - - /* Failure here indicates a race with another thread, so try again. */ -@@ -85,26 +81,26 @@ gc::MapAlignedPages(size_t size, size_t - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(VirtualFree(p, 0, MEM_RELEASE)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- if (!DecommitEnabled()) -- return false; -+ if (!DecommitEnabled(rt)) -+ return true; - -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - LPVOID p2 = VirtualAlloc(p, size, MEM_RESET, PAGE_READWRITE); - return p2 == p; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -126,12 +122,13 @@ gc::GetPageFaultCount() - #define OS2_MAX_RECURSIONS 16 - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = ArenaSize; - } - - void --gc::UnmapPages(void *addr, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *addr, size_t size) - { - if (!DosFreeMem(addr)) - return; -@@ -152,7 +149,7 @@ gc::UnmapPages(void *addr, size_t size) - } - - static void * --gc::MapAlignedPagesRecursively(size_t size, size_t alignment, int& recursions) -+gc::MapAlignedPagesRecursively(JSRuntime *rt, size_t size, size_t alignment, int& recursions) - { - if (++recursions >= OS2_MAX_RECURSIONS) - return NULL; -@@ -178,7 +175,7 @@ gc::MapAlignedPagesRecursively(size_t si - unsigned long rc = DosQueryMem(&(static_cast(tmp))[size], - &cb, &flags); - if (!rc && (flags & PAG_FREE) && cb >= filler) { -- UnmapPages(tmp, 0); -+ UnmapPages(rt, tmp, 0); - if (DosAllocMem(&tmp, filler, - OBJ_ANY | PAG_COMMIT | PAG_READ | PAG_WRITE)) { - JS_ALWAYS_TRUE(DosAllocMem(&tmp, filler, -@@ -186,19 +183,19 @@ gc::MapAlignedPagesRecursively(size_t si - } - } - -- void *p = MapAlignedPagesRecursively(size, alignment, recursions); -- UnmapPages(tmp, 0); -+ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); -+ UnmapPages(rt, tmp, 0); - - return p; - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int recursions = -1; - -@@ -207,7 +204,7 @@ gc::MapAlignedPages(size_t size, size_t - * of the right size by recursively allocating blocks of unaligned - * free memory until only an aligned allocation is possible. - */ -- void *p = MapAlignedPagesRecursively(size, alignment, recursions); -+ void *p = MapAlignedPagesRecursively(rt, size, alignment, recursions); - if (p) - return p; - -@@ -229,16 +226,15 @@ gc::MapAlignedPages(size_t size, size_t - } - - bool --gc::MarkPagesUnused(void *p, size_t size) --{ -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+MarkPagesUnused(JSRuntime *rt, void *p, size_t size) { -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -258,17 +254,18 @@ gc::GetPageFaultCount() - #endif - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int prot = PROT_READ | PROT_WRITE; - int flags = MAP_PRIVATE | MAP_ANON | MAP_ALIGN | MAP_NOSYNC; -@@ -280,22 +277,22 @@ gc::MapAlignedPages(size_t size, size_t - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(0 == munmap((caddr_t)p, size)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -@@ -313,27 +310,24 @@ gc::GetPageFaultCount() - #include - - void --gc::InitMemorySubsystem() -+gc::InitMemorySubsystem(JSRuntime *rt) - { -- if (size_t(sysconf(_SC_PAGESIZE)) != PageSize) { -- fprintf(stderr,"SpiderMonkey compiled with incorrect page size; please update js/public/HeapAPI.h.\n"); -- MOZ_CRASH(); -- } -+ rt->gcSystemPageSize = rt->gcSystemAllocGranularity = size_t(sysconf(_SC_PAGESIZE)); - } - - void * --gc::MapAlignedPages(size_t size, size_t alignment) -+gc::MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment) - { - JS_ASSERT(size >= alignment); - JS_ASSERT(size % alignment == 0); -- JS_ASSERT(size % PageSize == 0); -- JS_ASSERT(alignment % PageSize == 0); -+ JS_ASSERT(size % rt->gcSystemPageSize == 0); -+ JS_ASSERT(alignment % rt->gcSystemAllocGranularity == 0); - - int prot = PROT_READ | PROT_WRITE; - int flags = MAP_PRIVATE | MAP_ANON; - - /* Special case: If we want page alignment, no further work is needed. */ -- if (alignment == PageSize) { -+ if (alignment == rt->gcSystemAllocGranularity) { - return mmap(NULL, size, prot, flags, -1, 0); - } - -@@ -359,26 +353,26 @@ gc::MapAlignedPages(size_t size, size_t - } - - void --gc::UnmapPages(void *p, size_t size) -+gc::UnmapPages(JSRuntime *rt, void *p, size_t size) - { - JS_ALWAYS_TRUE(0 == munmap(p, size)); - } - - bool --gc::MarkPagesUnused(void *p, size_t size) -+gc::MarkPagesUnused(JSRuntime *rt, void *p, size_t size) - { -- if (!DecommitEnabled()) -- return false; -+ if (!DecommitEnabled(rt)) -+ return true; - -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - int result = madvise(p, size, MADV_DONTNEED); - return result != -1; - } - - bool --gc::MarkPagesInUse(void *p, size_t size) -+gc::MarkPagesInUse(JSRuntime *rt, void *p, size_t size) - { -- JS_ASSERT(uintptr_t(p) % PageSize == 0); -+ JS_ASSERT(uintptr_t(p) % rt->gcSystemPageSize == 0); - return true; - } - -diff -up xulrunner-21.0/mozilla-release/js/src/gc/Memory.h.ppc xulrunner-21.0/mozilla-release/js/src/gc/Memory.h ---- xulrunner-21.0/mozilla-release/js/src/gc/Memory.h.ppc 2013-05-12 23:56:19.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/gc/Memory.h 2013-05-21 23:14:04.693238124 +0200 -@@ -16,20 +16,20 @@ namespace gc { - - // Sanity check that our compiled configuration matches the currently running - // instance and initialize any runtime data needed for allocation. --void InitMemorySubsystem(); -+void InitMemorySubsystem(JSRuntime *rt); - - // Allocate or deallocate pages from the system with the given alignment. --void *MapAlignedPages(size_t size, size_t alignment); --void UnmapPages(void *p, size_t size); -+void *MapAlignedPages(JSRuntime *rt, size_t size, size_t alignment); -+void UnmapPages(JSRuntime *rt, void *p, size_t size); - - // Tell the OS that the given pages are not in use, so they should not - // be written to a paging file. This may be a no-op on some platforms. --bool MarkPagesUnused(void *p, size_t size); -+bool MarkPagesUnused(JSRuntime *rt, void *p, size_t size); - - // Undo |MarkPagesUnused|: tell the OS that the given pages are of interest - // and should be paged in and out normally. This may be a no-op on some - // platforms. --bool MarkPagesInUse(void *p, size_t size); -+bool MarkPagesInUse(JSRuntime *rt, void *p, size_t size); - - // Returns #(hard faults) + #(soft faults) - size_t GetPageFaultCount(); -diff -up xulrunner-21.0/mozilla-release/js/src/jsapi.cpp.ppc xulrunner-21.0/mozilla-release/js/src/jsapi.cpp ---- xulrunner-21.0/mozilla-release/js/src/jsapi.cpp.ppc 2013-05-12 23:56:21.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/jsapi.cpp 2013-05-21 23:14:04.695238134 +0200 -@@ -1110,8 +1110,6 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHe - #undef MSG_DEF - #endif /* DEBUG */ - -- InitMemorySubsystem(); -- - if (!js::TlsPerThreadData.init()) - return NULL; - -diff -up xulrunner-21.0/mozilla-release/js/src/jscntxt.h.ppc xulrunner-21.0/mozilla-release/js/src/jscntxt.h ---- xulrunner-21.0/mozilla-release/js/src/jscntxt.h.ppc 2013-05-12 23:56:21.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/jscntxt.h 2013-05-21 23:14:04.696238140 +0200 -@@ -1026,6 +1026,15 @@ struct JSRuntime : js::RuntimeFriendFiel - /* Stack of thread-stack-allocated GC roots. */ - js::AutoGCRooter *autoGCRooters; - -+ /* -+ * The GC can only safely decommit memory when the page size of the -+ * running process matches the compiled arena size. -+ */ -+ size_t gcSystemPageSize; -+ -+ /* The OS allocation granularity may not match the page size. */ -+ size_t gcSystemAllocGranularity; -+ - /* Strong references on scripts held for PCCount profiling API. */ - js::ScriptAndCountsVector *scriptAndCountsVector; - -diff -up xulrunner-21.0/mozilla-release/js/src/jsgc.cpp.ppc xulrunner-21.0/mozilla-release/js/src/jsgc.cpp ---- xulrunner-21.0/mozilla-release/js/src/jsgc.cpp.ppc 2013-05-12 23:56:21.000000000 +0200 -+++ xulrunner-21.0/mozilla-release/js/src/jsgc.cpp 2013-05-21 23:15:40.198740765 +0200 -@@ -465,13 +465,13 @@ FinalizeArenas(FreeOp *fop, - } - - static inline Chunk * --AllocChunk() { -- return static_cast(MapAlignedPages(ChunkSize, ChunkSize)); -+AllocChunk(JSRuntime *rt) { -+ return static_cast(MapAlignedPages(rt, ChunkSize, ChunkSize)); - } - - static inline void --FreeChunk(Chunk *p) { -- UnmapPages(static_cast(p), ChunkSize); -+FreeChunk(JSRuntime *rt, Chunk *p) { -+ UnmapPages(rt, static_cast(p), ChunkSize); - } - - inline bool -@@ -561,25 +561,25 @@ ChunkPool::expire(JSRuntime *rt, bool re - } - - static void --FreeChunkList(Chunk *chunkListHead) -+FreeChunkList(JSRuntime *rt, Chunk *chunkListHead) - { - while (Chunk *chunk = chunkListHead) { - JS_ASSERT(!chunk->info.numArenasFreeCommitted); - chunkListHead = chunk->info.next; -- FreeChunk(chunk); -+ FreeChunk(rt, chunk); - } - } - - void - ChunkPool::expireAndFree(JSRuntime *rt, bool releaseAll) - { -- FreeChunkList(expire(rt, releaseAll)); -+ FreeChunkList(rt, expire(rt, releaseAll)); - } - - /* static */ Chunk * - Chunk::allocate(JSRuntime *rt) - { -- Chunk *chunk = static_cast(AllocChunk()); -+ Chunk *chunk = static_cast(AllocChunk(rt)); - - #ifdef JSGC_ROOT_ANALYSIS - // Our poison pointers are not guaranteed to be invalid on 64-bit -@@ -592,7 +592,7 @@ Chunk::allocate(JSRuntime *rt) - // were marked as uncommitted, but it's a little complicated to avoid - // clobbering pre-existing unrelated mappings. - while (IsPoisonedPtr(chunk)) -- chunk = static_cast(AllocChunk()); -+ chunk = static_cast(AllocChunk(rt)); - #endif - - if (!chunk) -@@ -608,7 +608,7 @@ Chunk::release(JSRuntime *rt, Chunk *chu - { - JS_ASSERT(chunk); - chunk->prepareToBeFreed(rt); -- FreeChunk(chunk); -+ FreeChunk(rt, chunk); - } - - inline void -@@ -725,7 +725,7 @@ Chunk::findDecommittedArenaOffset() - } - - ArenaHeader * --Chunk::fetchNextDecommittedArena() -+Chunk::fetchNextDecommittedArena(JSRuntime *rt) - { - JS_ASSERT(info.numArenasFreeCommitted == 0); - JS_ASSERT(info.numArenasFree > 0); -@@ -736,7 +736,7 @@ Chunk::fetchNextDecommittedArena() - decommittedArenas.unset(offset); - - Arena *arena = &arenas[offset]; -- MarkPagesInUse(arena, ArenaSize); -+ MarkPagesInUse(rt, arena, ArenaSize); - arena->aheader.setAsNotAllocated(); - - return &arena->aheader; -@@ -770,7 +770,7 @@ Chunk::allocateArena(Zone *zone, AllocKi - - ArenaHeader *aheader = JS_LIKELY(info.numArenasFreeCommitted > 0) - ? fetchNextFreeArena(rt) -- : fetchNextDecommittedArena(); -+ : fetchNextDecommittedArena(rt); - aheader->init(zone, thingKind); - if (JS_UNLIKELY(!hasAvailableArenas())) - removeFromAvailableList(); -@@ -937,6 +937,8 @@ static const int64_t JIT_SCRIPT_RELEASE_ - JSBool - js_InitGC(JSRuntime *rt, uint32_t maxbytes) - { -+ InitMemorySubsystem(rt); -+ - if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) - return false; - -@@ -2102,7 +2104,7 @@ DecommitArenasFromAvailableList(JSRuntim - Maybe maybeUnlock; - if (!rt->isHeapBusy()) - maybeUnlock.construct(rt); -- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); -+ ok = MarkPagesUnused(rt, aheader->getArena(), ArenaSize); - } - - if (ok) { -@@ -2170,7 +2172,7 @@ ExpireChunksAndArenas(JSRuntime *rt, boo - { - if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { - AutoUnlockGC unlock(rt); -- FreeChunkList(toFree); -+ FreeChunkList(rt, toFree); - } - - if (shouldShrink) diff --git a/xulrunner.spec b/xulrunner.spec index 5d66b79..7619a83 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 24.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -100,7 +100,6 @@ Patch19: xulrunner-24.0-s390-inlines.patch # Fedora specific patches Patch20: mozilla-193-pkgconfig.patch -Patch21: rhbz-911314.patch # Unable to install addons from https pages Patch24: rhbz-966424.patch @@ -241,10 +240,6 @@ cd %{tarballdir} %patch20 -p2 -b .pk -%ifarch ppc ppc64 -%patch21 -p2 -b .ppc -%endif - %patch24 -p1 -b .966424 %{__rm} -f .mozconfig @@ -527,6 +522,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Oct 15 2013 Karsten Hopp 24.0-3 +- drop PPC-only rhbz-911314.patch, fixed upstream + * Mon Sep 16 2013 Martin Stransky - 24.0.1-2 - Arm build fix From 435df8caa012051e4051ef6eab276aea3175ba53 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 23 Oct 2013 16:06:42 +0200 Subject: [PATCH 139/239] Update to Firefox 25 Build 2 --- mozilla-build-arm.patch | 12 +- sources | 2 +- xulrunner-24.0-s390-inlines.patch | 14 +- xulrunner.spec | 738 +----------------------------- 4 files changed, 19 insertions(+), 747 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 6e27f78..0fed214 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,12 +1,12 @@ -diff -up xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build.neon xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build ---- xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build.neon 2013-09-11 01:15:02.000000000 +0200 -+++ xulrunner-24.0/mozilla-release/gfx/ycbcr/moz.build 2013-09-16 11:23:40.487028288 +0200 +diff -up xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build.arm xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build +--- xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build.arm 2013-10-23 15:52:17.056493264 +0200 ++++ xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build 2013-10-23 16:03:04.496045050 +0200 @@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] --if CONFIG['OS_TEST'] == 'arm' and CONFIG['HAVE_ARM_NEON']: +-if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: +if CONFIG['HAVE_ARM_NEON']: - CPP_SOURCES += [ - 'yuv_convert_arm.cpp', + ASFILES += [ + 'yuv_row_arm.s', ] diff --git a/sources b/sources index 7b21845..568e0de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -06a4c0fe8d3a979aea2fce8d0fdbf328 firefox-24.0.source.tar.bz2 +355e61a3356ca3408a8eaee7d2ada132 firefox-25.0.source.tar.bz2 diff --git a/xulrunner-24.0-s390-inlines.patch b/xulrunner-24.0-s390-inlines.patch index 92175a3..074f8d9 100644 --- a/xulrunner-24.0-s390-inlines.patch +++ b/xulrunner-24.0-s390-inlines.patch @@ -1,12 +1,12 @@ -diff -up xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp ---- xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-09-11 01:15:09.000000000 +0200 -+++ xulrunner-24.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-09-13 13:39:16.908478613 +0200 -@@ -9,6 +9,8 @@ - #include "jsnum.h" - #include "jsscript.h" +diff -up xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp +--- xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-10-23 16:04:01.773093979 +0200 ++++ xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-10-23 16:04:44.551134551 +0200 +@@ -4,6 +4,8 @@ + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jscntxtinlines.h" + #include "vm/SPSProfiler.h" - #include "vm/StringBuffer.h" + #include "mozilla/DebugOnly.h" diff --git a/xulrunner.spec b/xulrunner.spec index 7619a83..9f5894e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 24.0 -Release: 3%{?pre_tag}%{?dist} +Version: 25.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -522,6 +522,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 23 2013 Martin Stransky - 25.0-1 +- Update to 25.0 Build 2 + * Tue Oct 15 2013 Karsten Hopp 24.0-3 - drop PPC-only rhbz-911314.patch, fixed upstream @@ -693,734 +696,3 @@ fi * Thu Oct 11 2012 Martin Stransky - 16.0.1-1 - Update to 16.0.1 -* Mon Oct 10 2012 Martin Stransky - 16.0-2 -- Fixed xulrunner launch script - -* Mon Oct 8 2012 Martin Stransky - 16.0-1 -- Update to 16.0 - -* Mon Sep 17 2012 Martin Stransky - 15.0.1-3 -- Added fix for rhbz#855919 - Firefox freezes on Fedora 18 for PPC64 - -* Fri Sep 14 2012 Martin Stransky - 15.0.1-2 -- Added build flags for second arches - -* Tue Sep 11 2012 Jan Horak - 15.0.1-1 -- Update to 15.0.1 - -* Wed Aug 22 2012 Martin Stransky - 15.0-2 -- Update to 15.0 - -* Thu Aug 9 2012 Jan Horak - 14.0.1-6 -- Added fix for mozbz#709732 - -* Wed Jul 25 2012 Dan Horák - 14.0.1-5 -- Added fix for secondary arches - mozbz#750620 - -* Sun Jul 22 2012 Fedora Release Engineering - 14.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jul 16 2012 Martin Stransky - 14.0.1-3 -- Update to 14.0.1 - -* Sat Jun 16 2012 Jan Horak - 13.0.1-1 -- Update to 13.0.1 - -* Wed Jun 5 2012 Martin Stransky - 13.0-2 -- src.rpm should include all patches - -* Mon Jun 4 2012 Martin Stransky - 13.0-1 -- Update to 13.0 - -* Mon May 28 2012 Martin Stransky - 12.0-7 -- More ppc(64) fixes - mozbz#746112 - -* Mon May 28 2012 Martin Stransky - 12.0-6 -- Added workaround for ppc(64) - mozbz#746112 - -* Mon May 7 2012 Dan Horák - 12.0-5 -- Used backported upstream patch from mozb#734335 for fixing the sps profiler build -- Fixed build of jemalloc on ppc (patch by Gustavo Luiz Duarte/IBM) - -* Fri May 4 2012 Dan Horák - 12.0-4 -- Added new patch for 691898 - backport from trunk -- Added build fix for secondary arches - -* Fri May 4 2012 Martin Stransky - 12.0-3 -- Added requires for nss-static (rhbz#717247) - -* Mon Apr 30 2012 Martin Stransky - 12.0-2 -- Enable ppc(64) paralell builds (rhbz#816612) - -* Tue Apr 24 2012 Martin Stransky - 12.0-1 -- Update to 12.0 - -* Tue Mar 13 2012 Martin Stransky - 11.0-3 -- Update to 11.0 -- Fixed libvpx-devel dependency - -* Fri Mar 9 2012 Martin Stransky - 11.0-1 -- Update to 11.0 Beta 7 - -* Fri Mar 09 2012 Dan Horák - 10.0.1-5 -- Add fix for secondary arches from mozb#691898 - -* Mon Feb 27 2012 Martin Stransky - 10.0.1-4 -- Added fix from rhbz#796929 - xulrunner doesn't compile on ARM - -* Tue Feb 16 2012 Martin Stransky - 10.0.1-3 -- Added fix for mozbz#727401 - -* Tue Feb 14 2012 Martin Stransky - 10.0.1-2 -- Allow network manager to handle the offline status - -* Thu Feb 9 2012 Jan Horak - 10.0.1-1 -- Update to 10.0.1 - -* Tue Jan 31 2012 Jan Horak - 10.0-1 -- Update to 10.0 - -* Mon Jan 30 2012 Tom Callaway 10.0-3 -- fix issues causing ftbfs in rawhide - -* Mon Jan 30 2012 Tom Callaway 10.0-2 -- rebuild against libvpx 1.0.0 (and BR 1.0.0 or greater) - -* Mon Jan 23 2012 Martin Stransky 10.0-1 -- Update to 10.0 Beta 6 - -* Thu Jan 19 2012 Dennis Gilmore - 9.0.1-4 -- add missing v from armv7hl and armv7hnl config options - -* Wed Jan 04 2012 Dan Horák - 9.0.1-3 -- fix build on secondary arches (cherry-picked from 13afcd4c097c) - -* Fri Dec 23 2011 Peter Robinson - 9.0.1-2 -- Add compile options for ARM hfp/sfp - RHBZ #738509 - -* Fri Dec 23 2011 Jan Horak - 9.0.1-1 -- Update to 9.0.1 - -* Tue Dec 20 2011 Jan Horak - 9.0-2 -- Update to 9.0 - -* Fri Dec 9 2011 Martin Stransky 9.0-1.beta5 -- Updated to 9.0 Beta 5 - -* Wed Dec 7 2011 Jan Horak - 8.0-5 -- Gnome 3 proxy settings are now honoured (mozbz#682832) - -* Tue Dec 6 2011 Tom Callaway 8.0-4 -- fix bug in npapi.h causing compile failures - -* Fri Nov 25 2011 Martin Stransky 8.0-3 -- s390 build fixes - -* Mon Nov 7 2011 Martin Stransky 8.0-1 -- Updated to 8.0 - -* Tue Oct 18 2011 Ville Skyttä - 7.0.1-5 -- Avoid %%post/un shell invocations - and dependencies (rhbz#736830). - -* Tue Oct 18 2011 Martin Stransky 7.0.1-4 -- Updated cairo dependency (rhbz#742853) - -* Tue Oct 11 2011 Dan Horák 7.0.1-3 -- fix build on secondary arches - -* Mon Oct 10 2011 Martin Stransky 7.0.1-2 -- Removed GRE stuff -- Removed xulrunner rpath (mozbz#686434) - -* Fri Sep 30 2011 Jan Horak - 7.0.1-1 -- Update to 7.0.1 - -* Tue Sep 27 2011 Jan Horak - 7.0-1 -- Update to 7.0 - -* Tue Sep 6 2011 Jan Horak - 6.0.2-1 -- Update to 6.0.2 - -* Wed Aug 31 2011 Jan Horak - 6.0-3 -- Distrust a specific Certificate Authority - -* Tue Aug 16 2011 Martin Stransky 6.0-2 -- Updated gtkmozembed patch - -* Tue Aug 16 2011 Martin Stransky 6.0-1 -- 6.0 - -* Thu Jun 30 2011 Martin Stransky 5.0-5 -- Fixed build on powerpc(64) - -* Tue Jun 28 2011 Dan Horák - 5.0-4 -- fix build on secondary arches with IPC enabled - -* Tue Jun 24 2011 Martin Stransky 5.0-3 -- libCurl build fix - -* Wed Jun 22 2011 Martin Stransky 5.0-2 -- Reverted mozbz#648156 - Remove gtkmozembed - -* Tue Jun 21 2011 Martin Stransky 5.0-1 -- 5.0 - -* Thu May 26 2011 Martin Stransky 2.0.1-2 -- Rebuild for new hunspell (rhbz#707760) - -* Thu Apr 28 2011 Christopher Aillon - 2.0.1-1 -- 2.0.1 - -* Thu Apr 21 2011 Christopher Aillon - 2.0-4 -- Split out mozilla crashreporter symbols to its own debuginfo package - -* Sun Apr 10 2011 Christopher Aillon - 2.0-3 -- Fix offline status issue on version upgrades -- Fix a hang with 20+ extensions - -* Mon Apr 4 2011 Christopher Aillon - 2.0-2 -- Fix SIGABRT in X_CloseDevice: XI_BadDevice -- Updates for NetworkManager 0.9 -- Updates for GNOME 3 - -* Tue Mar 22 2011 Christopher Aillon - 2.0-1 -- 2.0 - -* Fri Mar 18 2011 Christopher Aillon - 2.0-0.28 -- Update to 2.0 RC2 - -* Thu Mar 17 2011 Jan Horak - 2.0-0.27 -- Disabled gnomevfs -- Enabled gio -- Build with system libvpx - -* Wed Mar 9 2011 Christopher Aillon - 2.0-0.26 -- Update to 2.0 RC 1 - -* Sun Feb 27 2011 Christopher Aillon - 2.0-0.25 -- Make Firefox's User-Agent string match upstream's - -* Sat Feb 26 2011 Christopher Aillon - 2.0-0.24 -- Switch to using the omni chrome file format - -* Fri Feb 25 2011 Christopher Aillon - 2.0-0.23 -- Update to 2.0 Beta 12 - -* Sun Feb 13 2011 Dennis Gilmore 2.0-0.22 -- disable nanojit on sparc64 its not supported and doesnt get automatically switched off - -* Thu Feb 10 2011 Christopher Aillon - 2.0-0.21 -- Also provide arch-agnostic versions of gecko virtual provides - -* Thu Feb 10 2011 Christopher Aillon - 2.0-0.20 -- Introduce better versioning for our gecko virtual provides -- Now, the gecko-libs and gecko-devel virtual provides will be pinned - to an individual Gecko release, so packages can do things like - Requires: gecko-libs = 2.0-beta11 - BuildRequires: gecko-libs = 2.0-beta11 -- Final releases will be pinned to e.g. 2.0-1 regardless of %%{release} -- Also, make sure those virtual provides are arch-specific - -* Tue Feb 8 2011 Christopher Aillon - 2.0-0.19 -- Update to 2.0 Beta 11 - -* Wed Jan 26 2011 Christopher Aillon - 2.0-0.18 -- Fix issue with popup windows showing in the wrong place - -* Tue Jan 25 2011 Christopher Aillon - 2.0-0.17 -- Update to 2.0 Beta 10 - -* Fri Jan 21 2011 Dan Horák - 2.0-0.16.b9 -- updated the 64bit-big-endian patch (bmo#627664) -- added fix for build with --disable-methodjit (bmo#623277) - -* Fri Jan 14 2011 Christopher Aillon 2.0-0.15.b9 -- Update to 2.0 Beta 9 - -* Thu Jan 11 2011 Tom Callaway 2.0-0.14.b8 -- enable system sqlite (see https://fedorahosted.org/fpc/ticket/34) - -* Thu Dec 23 2010 Martin Stransky 2.0-0.13.b8 -- reverted fix for rhbz#658471 - -* Wed Dec 22 2010 Dan Horák - 2.0-0.11.b8 -- updated the 64bit-big-endian patch - -* Tue Dec 21 2010 Martin Stransky 2.0-0.11.b8 -- enable url-classifier and jar format for chrome files - -* Tue Dec 21 2010 Martin Stransky 2.0-0.10.b8 -- Update to 2.0b8 - -* Mon Dec 20 2010 Martin Stransky 2.0-0.9.b8 -- removed unused library path (rhbz#658471) - -* Fri Dec 17 2010 Dan Horák - 2.0-0.8.b7 -- disable the crash reporter on non-x86 arches -- add sparc64 as 64-bit arch - -* Tue Dec 14 2010 Jan Horak - 2.0-0.7.b7 -- Enable mozilla crash reporter - -* Thu Nov 11 2010 Dan Horák - 2.0-0.6.b7 -- The s390 patch is not needed anymore - -* Thu Nov 11 2010 Jan Horak - 2.0-0.5.b7 -- Update to 2.0b7 - -* Thu Nov 4 2010 Christopher Aillon 2.0-0.4.b6 -- Ensure that WM_CLASS matches the desktop file - -* Wed Nov 3 2010 Martin Stransky 2.0-0.3.b6 -- Libnotify rebuild (rhbz#649071) - -* Wed Sep 29 2010 jkeating - 2.0-0.2b6 -- Rebuilt for gcc bug 634757 - -* Tue Sep 21 2010 Martin Stransky 2.0-0.1.b6 -- Update to 2.0b6 - -* Tue Sep 7 2010 Tom "spot" Callaway 1.9.3.0-0.2.b4 -- spec file cleanup - -* Fri Aug 27 2010 Martin Stransky 1.9.3.0-0.1.b4 -- Update to 1.9.3.1 beta 4 - -* Mon Aug 16 2010 Martin Stransky 1.9.3.0-0.b3 -- Update to 1.9.3.1 beta 3 - -* Tue Jul 20 2010 Jan Horak - 1.9.2.7-1 -- Update to 1.9.2.7 - -* Wed Jul 1 2010 Martin Stransky 1.9.2.6-2 -- Disabled oopp on unsupported arches (rhbz#614363) - -* Wed Jun 30 2010 Jan Horak - 1.9.2.6-1 -- Update to 1.9.2.6 - -* Tue Jun 22 2010 Jan Horak - 1.9.2.4-1 -- Update to 1.9.2.4 - -* Tue Jun 15 2010 Dan Horák 1.9.2.3-2 -- Fixed build on s390 - -* Fri Apr 2 2010 Martin Stransky 1.9.2.3-1 -- Update to 1.9.2.3 - -* Tue Mar 23 2010 Jan Horak - 1.9.2.2-1 -- Update to 1.9.2.2 - -* Mon Mar 15 2010 Colin Walters - 1.9.2.1-4 -- Enable startup notification, closes #445543 - -* Thu Feb 18 2010 Jan Horak - 1.9.2.1-3 -- Added fix for mozbz#462919 - Override NSS database path - for xulrunner application - -* Wed Feb 17 2010 Martin Stransky 1.9.2.1-2 -- Added fix for #564184 - xulrunner-devel multilib conflict - -* Fri Jan 22 2010 Martin Stransky 1.9.2.1-1 -- Update to 1.9.2.1 - -* Wed Jan 18 2010 Martin Stransky 1.9.2.1-0.10.rc1 -- Update to 1.9.2.1 RC2 - -* Wed Jan 13 2010 Martin Stransky 1.9.2.1-0.9.rc1 -- Update to 1.9.2.1 RC1 - -* Mon Dec 21 2009 Martin Stransky 1.9.2.1-0.8.b5 -- Update to 1.9.2.1 Beta 5 - -* Thu Dec 17 2009 Martin Stransky 1.9.2.1-0.7.b4 -- Added fix for mozbz#543585 - jemalloc alignment assertion - and abort on Linux - -* Thu Dec 3 2009 Martin Stransky 1.9.2.1-0.6.b4 -- Added fix for #543585 - mozilla-plugin.pc contains incorrect CFLAGS - -* Fri Nov 27 2009 Martin Stransky 1.9.2.1-0.5.b4 -- Update to 1.9.2.1 Beta 4 - -* Mon Nov 23 2009 Martin Stransky 1.9.2.1-0.4.b3 -- added -unstable.pc files for compatibility with 1.9.1 - -* Fri Nov 20 2009 Martin Stransky 1.9.2.1-0.3.b3 -- Necko wifi monitor disabled -- fixed a dependency (#539261) -- added source URL (#521704) - -* Wed Nov 18 2009 Martin Stransky 1.9.2.1-0.2.b3 -- Rebase to 1.9.2.1 Beta 3 - -* Fri Nov 13 2009 Martin Stransky 1.9.2.1-0.1.beta2 -- Rebase to 1.9.2.1 Beta 2 -- fix the sqlite runtime requires again (#480989), add a check - that the sqlite requires is sane (by Stepan Kasal) - -* Thu Nov 5 2009 Jan Horak - 1.9.1.5-1 -- Update to 1.9.1.5 - -* Mon Oct 26 2009 Jan Horak - 1.9.1.4-1 -- Update to 1.9.1.4 - -* Mon Sep 7 2009 Jan Horak - 1.9.1.3-1 -- Update to 1.9.1.3 - -* Fri Aug 21 2009 Jan Horak - 1.9.1.2-4 -- Added libnotify support - -* Wed Aug 12 2009 Martin Stransky 1.9.1.2-3 -- Added fix from #516118 - Headers not C89 - -* Mon Aug 6 2009 Martin Stransky 1.9.1.2-2 -- Rebuilt - -* Mon Aug 3 2009 Martin Stransky 1.9.1.2-1 -- Update to 1.9.1.2 - -* Mon Jul 27 2009 Fedora Release Engineering - 1.9.1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Fri Jul 17 2009 Christopher Aillon - 1.9.1.1-1 -- Update to 1.9.1.1 - -* Mon Jul 13 2009 Jan Horak - 1.9.1-3 -- Fixed wrong version of Firefox when loading 'about:' as location -- Added patch to compile against latest GTK - -* Tue Jun 30 2009 Yanko Kaneti - 1.9.1-2 -- Build using system hunspell - -* Tue Jun 30 2009 Christopher Aillon 1.9.1-1 -- Update to 1.9.1 final release - -* Wed Jun 24 2009 Martin Stransky 1.9.1-0.23 -- Rebuilt because of gcc update (#506952) - -* Thu Jun 18 2009 Martin Stransky 1.9.1-0.22 -- Backed out last change, it does not work inside mock (koji) - -* Tue Jun 16 2009 Stepan Kasal 1.9.1-0.21 -- require sqlite of version >= what was used at buildtime (#480989) -- in devel subpackage, drop version from sqlite-devel require; that's - handled indirectly through the versioned require in main package - -* Mon Apr 27 2009 Christopher Aillon 1.9.1-0.20 -- 1.9.1 beta 4 - -* Fri Mar 27 2009 Christopher Aillon 1.9.1-0.11 -- Add patches for MFSA-2009-12, MFSA-2009-13 - -* Fri Mar 13 2009 Christopher Aillon 1.9.1-0.10 -- 1.9.1 beta 3 - -* Fri Feb 27 2009 Martin Stransky 1.9.1-0.9 -- Build fix for pango 1.23 -- Misc. build fixes - -* Thu Feb 26 2009 Fedora Release Engineering - 1.9.1-0.8.beta2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Jan 28 2009 Christopher Aillon 1.9.1-0.7 -- Re-enable NM by default - -* Wed Jan 7 2009 Martin Stransky 1.9.1-0.6 -- Copied mozilla-config.h to stable include dir (#478445) - -* Mon Dec 22 2008 Christopher Aillon 1.9.1-0.5 -- Typo fix - -* Sat Dec 20 2008 Christopher Aillon 1.9.1-0.4 -- 1.9.1 beta 2 - -* Tue Dec 9 2008 Christopher Aillon 1.9.1-0.3 -- Mark this as a pre-release - -* Tue Dec 9 2008 Christopher Aillon 1.9.1-0.2 -- Add needed -devel requires to the -devel package - -* Thu Dec 4 2008 Christopher Aillon 1.9.1-0.1 -- 1.9.1 beta 1 - -* Wed Nov 12 2008 Christopher Aillon 1.9.0.4-1 -- Update to 1.9.0.4 - -* Mon Oct 27 2008 Christopher Aillon 1.9.0.2-5 -- Password manager fixes from upstream - -* Tue Oct 7 2008 Marco Pesenti Gritti 1.9.0.2-4 -- Add missing dependency on python-devel - -* Sun Oct 5 2008 Christopher Aillon 1.9.0.2-3 -- Enable PyXPCOM - -* Thu Sep 25 2008 Martin Stransky 1.9.0.2-2 -- Build with system cairo (#463341) - -* Tue Sep 23 2008 Christopher Aillon 1.9.0.2-1 -- Update to 1.9.0.2 - -* Wed Jul 23 2008 Christopher Aillon 1.9.0.1-2 -- Disable system hunspell for now as it's causing some crashes (447444) - -* Wed Jul 16 2008 Christopher Aillon 1.9.0.1-1 -- Update to 1.9.0.1 - -* Tue Jun 17 2008 Christopher Aillon 1.9-1 -- Update to 1.9 final - -* Thu May 29 2008 Christopher Aillon 1.9-0.63 -- Simplify PS/PDF operators - -* Thu May 22 2008 Christopher Aillon 1.9-0.62 -- Upstream patch to fsync() less - -* Thu May 08 2008 Colin Walters 1.9-0.61 -- Ensure we enable startup notification; add BR and modify config - (bug #445543) - -* Wed Apr 30 2008 Christopher Aillon 1.9-0.60 -- Some files moved to mozilla-filesystem; kill them and add the Req - -* Mon Apr 28 2008 Christopher Aillon 1.9-0.59 -- Clean up the %%files list and get rid of the executable bit on some files - -* Sat Apr 26 2008 Christopher Aillon 1.9-0.58 -- Fix font scaling - -* Fri Apr 25 2008 Martin Stransky 1.9-0.57 -- Enabled phishing protection (#443403) - -* Wed Apr 23 2008 Martin Stransky 1.9-0.56 -- Changed "__ppc64__" to "__powerpc64__", - "__ppc64__" doesn't work anymore -- Added fix for #443725 - Critical hanging bug with fix - available upstream (mozbz#429903) - -* Fri Apr 18 2008 Martin Stransky 1.9-0.55 -- Fixed multilib issues, added starting script instead of a symlink - to binary (#436393) - -* Sat Apr 12 2008 Christopher Aillon 1.9-0.54 -- Add upstream patches for dpi, toolbar buttons, and invalid keys -- Re-enable system cairo - -* Mon Apr 7 2008 Christopher Aillon 1.9-0.53 -- Spec cleanups - -* Wed Apr 2 2008 Christopher Aillon 1.9-0.52 -- Beta 5 - -* Mon Mar 31 2008 Christopher Aillon 1.9-0.51 -- Beta 5 RC2 - -* Thu Mar 27 2008 Christopher Aillon 1.9-0.50 -- Update to latest trunk (2008-03-27) - -* Wed Mar 26 2008 Christopher Aillon 1.9-0.49 -- Update to latest trunk (2008-03-26) - -* Tue Mar 25 2008 Christopher Aillon 1.9-0.48 -- Update to latest trunk (2008-03-25) - -* Mon Mar 24 2008 Christopher Aillon 1.9-0.47 -- Update to latest trunk (2008-03-24) - -* Thu Mar 20 2008 Christopher Aillon 1.9-0.46 -- Update to latest trunk (2008-03-20) - -* Mon Mar 17 2008 Christopher Aillon 1.9-0.45 -- Update to latest trunk (2008-03-17) - -* Mon Mar 17 2008 Christopher Aillon 1.9-0.44 -- Revert to trunk from the 15th to fix crashes on HTTPS sites - -* Sun Mar 16 2008 Christopher Aillon 1.9-0.43 -- Update to latest trunk (2008-03-16) -- Add patch to negate a11y slowdown on some pages (#431162) - -* Sat Mar 15 2008 Christopher Aillon 1.9-0.42 -- Update to latest trunk (2008-03-15) - -* Sat Mar 15 2008 Christopher Aillon 1.9-0.41 -- Avoid conflicts between gecko debuginfo packages - -* Wed Mar 12 2008 Christopher Aillon 1.9-0.40 -- Update to latest trunk (2008-03-12) - -* Tue Mar 11 2008 Christopher Aillon 1.9-0.39 -- Update to latest trunk (2008-03-11) - -* Mon Mar 10 2008 Christopher Aillon 1.9-0.38 -- Update to latest trunk (2008-03-10) - -* Sun Mar 9 2008 Christopher Aillon 1.9-0.37 -- Update to latest trunk (2008-03-09) - -* Fri Mar 7 2008 Christopher Aillon 1.9-0.beta4.36 -- Update to latest trunk (2008-03-07) - -* Thu Mar 6 2008 Christopher Aillon 1.9-0.beta4.35 -- Update to latest trunk (2008-03-06) - -* Tue Mar 4 2008 Christopher Aillon 1.9-0.beta4.34 -- Update to latest trunk (2008-03-04) - -* Sun Mar 2 2008 Christopher Aillon 1.9-0.beta3.33 -- Update to latest trunk (2008-03-02) - -* Sat Mar 1 2008 Christopher Aillon 1.9-0.beta3.32 -- Update to latest trunk (2008-03-01) - -* Fri Feb 29 2008 Christopher Aillon 1.9-0.beta3.31 -- Update to latest trunk (2008-02-29) - -* Thu Feb 28 2008 Christopher Aillon 1.9-0.beta3.30 -- Update to latest trunk (2008-02-28) - -* Wed Feb 27 2008 Christopher Aillon 1.9-0.beta3.29 -- Update to latest trunk (2008-02-27) - -* Tue Feb 26 2008 Christopher Aillon 1.9-0.beta3.28 -- Update to latest trunk (2008-02-26) - -* Sat Feb 23 2008 Christopher Aillon 1.9-0.beta3.27 -- Update to latest trunk (2008-02-23) - -* Fri Feb 22 2008 Christopher Aillon 1.9-0.beta3.26 -- Update to latest trunk (2008-02-22) - -* Thu Feb 21 2008 Christopher Aillon 1.9-0.beta3.25 -- Update to latest trunk (2008-02-21) - -* Wed Feb 20 2008 Christopher Aillon 1.9-0.beta3.24 -- Update to latest trunk (2008-02-20) - -* Sun Feb 17 2008 Christopher Aillon 1.9-0.beta3.23 -- Update to latest trunk (2008-02-17) - -* Fri Feb 15 2008 Christopher Aillon 1.9-0.beta3.22 -- Update to latest trunk (2008-02-15) - -* Thu Feb 14 2008 Christopher Aillon 1.9-0.beta3.21 -- Update to latest trunk (2008-02-14) -- Use system hunspell - -* Mon Feb 11 2008 Christopher Aillon 1.9-0.beta2.19 -- Update to latest trunk (2008-02-11) - -* Mon Feb 11 2008 Adam Jackson 1.9-0.beta2.19 -- STRIP="/bin/true" on the %%make line so xulrunner-debuginfo contains, - you know, debuginfo. - -* Sun Feb 10 2008 Christopher Aillon 1.9-0.beta2.18 -- Update to latest trunk (2008-02-10) - -* Sat Feb 9 2008 Christopher Aillon 1.9-0.beta2.17 -- Update to latest trunk (2008-02-09) - -* Wed Feb 6 2008 Christopher Aillon 1.9-0.beta2.16 -- Update to latest trunk (2008-02-06) - -* Tue Jan 29 2008 Christopher Aillon 1.9-0.beta2.15 -- Update to latest trunk (2008-01-30) - -* Wed Jan 25 2008 Martin Stransky 1.9-0.beta2.14 -- rebuild agains new nss -- enabled gnome vfs - -* Wed Jan 23 2008 Martin Stransky 1.9-0.beta2.13 -- fixed stable pkg-config files (#429654) -- removed sqlite patch - -* Mon Jan 21 2008 Christopher Aillon 1.9-0.beta2.12 -- Update to latest trunk (2008-01-21) - -* Tue Jan 15 2008 Christopher Aillon 1.9-0.beta2.11 -- Update to latest trunk (2008-01-15) -- Now with system extensions directory support - -* Sat Jan 13 2008 Christopher Aillon 1.9-0.beta2.10 -- Update to latest trunk (2008-01-13) -- Use CFLAGS instead of configure arguments -- Random cleanups: BuildRequires, scriptlets, prefs, etc. - -* Sat Jan 12 2008 Christopher Aillon 1.9-0.beta2.9 -- Provide gecko-devel-unstable as well - -* Wed Jan 9 2008 Martin Stransky 1.9-0.beta2.8 -- divided devel package to devel and devel-unstable - -* Mon Jan 7 2008 Martin Stransky 1.9-0.beta2.7 -- removed fedora specific pkg-config files -- updated to the latest trunk (2008-01-07) -- removed unnecessary patches -- fixed idl dir (#427965) - -* Thu Jan 3 2008 Christopher Aillon 1.9-0.beta2.6 -- Re-enable camellia256 support now that NSS supports it - -* Thu Jan 3 2008 Martin Stransky 1.9-0.beta2.5 -- updated to the latest trunk (2008-01-03) - -* Mon Dec 24 2007 Christopher Aillon 1.9-0.beta2.4 -- Don't Provide webclient (xulrunner is not itself a webclient) -- Don't Obsolete old firefox, only firefox-devel -- Kill legacy obsoletes (phoenix, etc) that were never in rawhide - -* Thu Dec 21 2007 Martin Stransky 1.9-0.beta2.3 -- added java and plugin subdirs to plugin includes - -* Thu Dec 20 2007 Martin Stransky 1.9-0.beta2.2 -- dependency fixes, obsoletes firefox < 3 and firefox-devel now - -* Wed Dec 12 2007 Martin Stransky 1.9-0.beta2.1 -- updated to Beta 2. -- moved SDK to xulrunner-sdk - -* Thu Dec 06 2007 Martin Stransky 1.9-0.beta1.4 -- fixed mozilla-plugin.pc (#412971) - -* Tue Nov 27 2007 Martin Stransky 1.9-0.beta1.3 -- export /etc/gre.d/gre.conf (it's used by python gecko applications) - -* Mon Nov 26 2007 Martin Stransky 1.9-0.beta1.2 -- added xulrunner/js include dir to xulrunner-js - -* Tue Nov 20 2007 Martin Stransky 1.9-0.beta1.1 -- update to beta 1 - -* Mon Nov 19 2007 Martin Stransky 1.9-0.alpha9.6 -- packed all gecko libraries (#389391) - -* Thu Nov 15 2007 Martin Stransky 1.9-0.alpha9.5 -- registered xulrunner libs system-wide -- added xulrunner-gtkmozembed.pc - -* Wed Nov 14 2007 Martin Stransky 1.9-0.alpha9.4 -- added proper nss/nspr dependencies - -* Wed Nov 14 2007 Martin Stransky 1.9-0.alpha9.3 -- more build fixes, use system nss libraries - -* Tue Nov 6 2007 Martin Stransky 1.9-0.alpha9.2 -- build fixes - -* Tue Oct 30 2007 Martin Stransky 1.9-0.alpha9.1 -- updated to the latest trunk - -* Thu Sep 20 2007 David Woodhouse 1.9-0.alpha7.4 -- build fixes for ppc/ppc64 - -* Tue Sep 20 2007 Martin Stransky 1.9-0.alpha7.3 -- removed conflicts with the current gecko-based apps -- added updated ppc64 patch - -* Tue Sep 18 2007 Martin Stransky 1.9-0.alpha7.2 -- build fixes - -* Wed Sep 5 2007 Christopher Aillon 1.9-0.alpha7.1 -- Initial cut at XULRunner 1.9 Alpha 7 -- Temporarily revert camellia 256 support since our nss doesn't support it yet From 843eff4452d9f9eae0975cb9f7b36120f1d02d2d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 30 Oct 2013 09:05:02 +0100 Subject: [PATCH 140/239] Update to Firefox 25 Build 3 --- sources | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 568e0de..abe35c9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -355e61a3356ca3408a8eaee7d2ada132 firefox-25.0.source.tar.bz2 +90ac047e83079a9046192c732e195329 firefox-25.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 9f5894e..e0fdea3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 25.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -522,6 +522,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 30 2013 Martin Stransky - 25.0-2 +- Update to 25.0 Build 3 + * Wed Oct 23 2013 Martin Stransky - 25.0-1 - Update to 25.0 Build 2 From 9b39528c235888dfc1959e787c909a96aab4c083 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 8 Nov 2013 17:05:02 +0100 Subject: [PATCH 141/239] Fixed rhbz#974718 - Segfault in FileBlockCache::Run when playing a movie on ppc --- mozilla-885002.patch | 30 ++++++++++++++++++++++++++++++ xulrunner.spec | 17 +++++++++++------ 2 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 mozilla-885002.patch diff --git a/mozilla-885002.patch b/mozilla-885002.patch new file mode 100644 index 0000000..e48c89a --- /dev/null +++ b/mozilla-885002.patch @@ -0,0 +1,30 @@ +# HG changeset patch +# Parent d8fd5706493e19bcb85443316a4c180849f5d247 +# User Steve Singer +Bug 885002 - Fix casting on 64 bit Big Endian platforms. + + +diff --git a/content/media/FileBlockCache.h b/content/media/FileBlockCache.h +--- a/content/media/FileBlockCache.h ++++ b/content/media/FileBlockCache.h +@@ -138,19 +138,17 @@ public: + + bool IsEmpty() { + return nsDeque::GetSize() == 0; + } + + private: + int32_t ObjectAt(int32_t aIndex) { + void* v = nsDeque::ObjectAt(aIndex); +- // Ugly hack to work around "casting 64bit void* to 32bit int loses precision" +- // error on 64bit Linux. +- return *(reinterpret_cast(&v)); ++ return reinterpret_cast(v); + } + }; + + private: + int64_t BlockIndexToOffset(int32_t aBlockIndex) { + return static_cast(aBlockIndex) * BLOCK_SIZE; + } + diff --git a/xulrunner.spec b/xulrunner.spec index e0fdea3..b034763 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 25.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,11 +97,12 @@ Patch17: xulrunner-24.0-gcc47.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch +Patch20: mozilla-885002.patch # Fedora specific patches -Patch20: mozilla-193-pkgconfig.patch +Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages -Patch24: rhbz-966424.patch +Patch204: rhbz-966424.patch # Upstream patches @@ -237,10 +238,10 @@ cd %{tarballdir} %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines +%patch20 -p1 -b .885002 -%patch20 -p2 -b .pk - -%patch24 -p1 -b .966424 +%patch200 -p2 -b .pk +%patch204 -p1 -b .966424 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -522,6 +523,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Nov 8 2013 Martin Stransky - 25.0-3 +- Fixed rhbz#974718 - Segfault in FileBlockCache::Run + when playing a movie on ppc + * Wed Oct 30 2013 Martin Stransky - 25.0-2 - Update to 25.0 Build 3 From 3bf05d82030559830c17379a602bab5a179078f9 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 12 Nov 2013 11:45:43 +0100 Subject: [PATCH 142/239] rhbz#1010916 - enabled pluseaudio backend --- mozilla-837563.patch | 144 +++++++++++++++++++++++++++++++++++++++++++ xulrunner-mozconfig | 1 + xulrunner.spec | 8 ++- 3 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 mozilla-837563.patch diff --git a/mozilla-837563.patch b/mozilla-837563.patch new file mode 100644 index 0000000..40121a2 --- /dev/null +++ b/mozilla-837563.patch @@ -0,0 +1,144 @@ +# HG changeset patch +# User Matthew Gregan +# Date 1383172648 -46800 +# Thu Oct 31 11:37:28 2013 +1300 +# Node ID 2f6bd7da0756edaad53b601b18cf0c0e27f5f676 +# Parent 0f6219c6fb61f3f5e6775d269a6cf52305021024 +Bug 837563 - Enable libcubeb's PulseAudio backend. r=glandium + +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -5522,65 +5522,68 @@ fi + if test -n "$MOZ_TREMOR"; then + AC_DEFINE(MOZ_TREMOR) + fi + + if test -n "$MOZ_OPUS"; then + AC_DEFINE(MOZ_OPUS) + fi + +-dnl ======================================================== +-dnl = Check alsa availability on Linux if using sydneyaudio +-dnl ======================================================== +- +-dnl If using sydneyaudio with Linux, ensure that the alsa library is available ++dnl ==================================================== ++dnl = Check alsa availability on Linux if using libcubeb ++dnl ==================================================== ++ ++dnl If using libcubeb with Linux, ensure that the alsa library is available + if test -n "$MOZ_CUBEB" -a "$OS_TARGET" = "Linux"; then + MOZ_ALSA=1 + fi + + MOZ_ARG_ENABLE_BOOL(alsa, + [ --enable-alsa Enable Alsa support (default on Linux)], +-MOZ_ALSA=1, +-MOZ_ALSA=) ++ MOZ_ALSA=1, ++ MOZ_ALSA=) + + if test -n "$MOZ_ALSA"; then + AC_DEFINE(MOZ_CUBEB) + PKG_CHECK_MODULES(MOZ_ALSA, alsa, , + [echo "$MOZ_ALSA_PKG_ERRORS" + AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) + fi + + AC_SUBST(MOZ_ALSA) + AC_SUBST(MOZ_ALSA_CFLAGS) + AC_SUBST(MOZ_ALSA_LIBS) + + dnl ======================================================== +-dnl = Enable PulseAudio +-dnl ======================================================== +- +-MOZ_ARG_ENABLE_BOOL(pulseaudio, +-[ --enable-pulseaudio Enable PulseAudio support (experimental)], +-MOZ_PULSEAUDIO=1, +-MOZ_PULSEAUDIO=) ++dnl = Disable PulseAudio ++dnl ======================================================== ++ ++dnl If using libcubeb with Linux, ensure that the PA library is available ++if test -n "$MOZ_CUBEB" -a "$OS_TARGET" = "Linux" -a -z "$MOZ_B2G"; then ++ MOZ_PULSEAUDIO=1 ++fi ++ ++MOZ_ARG_DISABLE_BOOL(pulseaudio, ++[ --disable-pulseaudio Disable PulseAudio support], ++ MOZ_PULSEAUDIO=, ++ MOZ_PULSEAUDIO=1) + + if test -n "$MOZ_PULSEAUDIO"; then + AC_DEFINE(MOZ_CUBEB) + if test -z "$gonkdir"; then + PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , + [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" + AC_MSG_ERROR([pulseaudio audio backend requires libpulse development package])]) + else + MOZ_PULSEAUDIO_CFLAGS="-I$gonkdir/external/pulseaudio/pulseaudio/src" +- MOZ_PULSEAUDIO_LIBS="-lpulse" + fi + fi + + AC_SUBST(MOZ_PULSEAUDIO) + AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) +-AC_SUBST(MOZ_PULSEAUDIO_LIBS) + + dnl ======================================================== + dnl = Enable GStreamer + dnl ======================================================== + if test "$OS_TARGET" = "Linux"; then + MOZ_GSTREAMER=1 + fi + +diff --git a/media/webrtc/signaling/test/Makefile.in b/media/webrtc/signaling/test/Makefile.in +--- a/media/webrtc/signaling/test/Makefile.in ++++ b/media/webrtc/signaling/test/Makefile.in +@@ -18,21 +18,16 @@ LIBS = \ + $(NULL) + + ifdef MOZ_CUBEB + ifdef MOZ_ALSA + LIBS += \ + $(MOZ_ALSA_LIBS) \ + $(NULL) + endif +-ifdef MOZ_PULSEAUDIO +-LIBS += \ +- $(MOZ_PULSEAUDIO_LIBS) \ +- $(NULL) +-endif + endif + + ifeq ($(OS_TARGET),Android) + LIBS += \ + $(STLPORT_LDFLAGS) \ + $(STLPORT_LIBS) \ + $(NULL) + CPPFLAGS += \ +diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in +--- a/toolkit/library/Makefile.in ++++ b/toolkit/library/Makefile.in +@@ -428,19 +428,16 @@ OS_LIBS += $(call EXPAND_LIBNAME,secur32 + endif + endif + + + ifdef MOZ_CUBEB + ifdef MOZ_ALSA + EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) + endif +-ifdef MOZ_PULSEAUDIO +-EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) +-endif + endif + + ifdef HAVE_CLOCK_MONOTONIC + EXTRA_DSO_LDOPTS += $(REALTIME_LIBS) + endif + + ifeq (android,$(MOZ_WIDGET_TOOLKIT)) + OS_LIBS += -lGLESv2 diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 7fed6ad..1ceaaf2 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -33,6 +33,7 @@ ac_add_options --disable-gnomevfs ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer +ac_add_options --enable-pulseaudio export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index b034763..89af4c9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 25.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -105,6 +105,7 @@ Patch200: mozilla-193-pkgconfig.patch Patch204: rhbz-966424.patch # Upstream patches +Patch300: mozilla-837563.patch # --------------------------------------------------- @@ -243,6 +244,8 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 +%patch300 -p1 -b .837563 + %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -523,6 +526,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Nov 12 2013 Martin Stransky - 25.0-4 +- rhbz#1010916 - enabled pluseaudio backend + * Fri Nov 8 2013 Martin Stransky - 25.0-3 - Fixed rhbz#974718 - Segfault in FileBlockCache::Run when playing a movie on ppc From b70d8a4e5598acd04dba950b306131177314f34d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 12 Nov 2013 12:37:32 +0100 Subject: [PATCH 143/239] Added pulseaudio-libs-devel build dependency --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 89af4c9..6bf4306 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -137,6 +137,7 @@ BuildRequires: mesa-libGL-devel BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} BuildRequires: autoconf213 +BuildRequires: pulseaudio-libs-devel Requires: mozilla-filesystem %if %{?system_nss} From c37ce403ffa1561f6fb92d700940e9fc1049b41c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 21 Nov 2013 12:28:05 +0100 Subject: [PATCH 144/239] rhbz#1007603 - NSS and cert9 (sql): firefox crash on exit with https-everywhere installed --- mozilla-938730.patch | 36 ++++++++++++++++++++++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 mozilla-938730.patch diff --git a/mozilla-938730.patch b/mozilla-938730.patch new file mode 100644 index 0000000..53ff440 --- /dev/null +++ b/mozilla-938730.patch @@ -0,0 +1,36 @@ +diff --git a/storage/src/Makefile.in b/storage/src/Makefile.in +--- a/storage/src/Makefile.in ++++ b/storage/src/Makefile.in +@@ -11,24 +11,32 @@ VPATH = @srcdir@ + include $(DEPTH)/config/autoconf.mk + + MODULE_NAME = mozStorageModule + LIBXUL_LIBRARY = 1 + + # Don't use the jemalloc allocator on Android, because we can't guarantee + # that Gecko will configure sqlite before it is first used (bug 730495). + # ++# Don't use the jemalloc allocator when using system NSS. Linked in libraries ++# (such as NSS) might trigger an initialization of sqlite and allocation ++# of memory using the default allocator, prior to the storage service ++# registering its allocator, causing memory management failures (bug 938730). ++# + # Note: On Windows our sqlite build assumes we use jemalloc. If you disable + # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef + # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in. ++ ++ifndef _USE_SYSTEM_NSS + ifdef MOZ_MEMORY + ifneq ($(OS_TARGET), Android) + DEFINES += -DMOZ_STORAGE_MEMORY + endif + endif ++endif + + # For nsDependentJSString + LOCAL_INCLUDES = \ + $(SQLITE_CFLAGS) \ + -I$(topsrcdir)/db/sqlite3/src \ + -I$(topsrcdir)/dom/base \ + $(NULL) + diff --git a/xulrunner.spec b/xulrunner.spec index 6bf4306..c665024 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 25.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -106,6 +106,7 @@ Patch204: rhbz-966424.patch # Upstream patches Patch300: mozilla-837563.patch +Patch301: mozilla-938730.patch # --------------------------------------------------- @@ -246,6 +247,7 @@ cd %{tarballdir} %patch204 -p1 -b .966424 %patch300 -p1 -b .837563 +%patch301 -p1 -b .938730 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -527,6 +529,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Nov 21 2013 Martin Stransky - 25.0-5 +- Fixed rhbz#1007603 - NSS and cert9 (sql): firefox crash on exit + with https-everywhere installed + * Tue Nov 12 2013 Martin Stransky - 25.0-4 - rhbz#1010916 - enabled pluseaudio backend From 3883b0733b3347d3a7b85a66d9268aa364c8fb94 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 9 Dec 2013 14:50:04 +0100 Subject: [PATCH 145/239] Update to 26.0 Build 2 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index abe35c9..dde4bb6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -90ac047e83079a9046192c732e195329 firefox-25.0.source.tar.bz2 +91ce51cc6474f1269484e5327643a59c firefox-26.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index c665024..e2de779 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 25.0 -Release: 5%{?pre_tag}%{?dist} +Version: 26.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -529,6 +529,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Dec 9 2013 Martin Stransky - 26.0-1 +- Update to 26.0 Build 2 + * Thu Nov 21 2013 Martin Stransky - 25.0-5 - Fixed rhbz#1007603 - NSS and cert9 (sql): firefox crash on exit with https-everywhere installed From 4de5e6b42ed9b7824635020d69193b7c707a512e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 9 Dec 2013 15:21:46 +0100 Subject: [PATCH 146/239] Update patches to FF26 --- mozilla-938730.patch | 19 +++++-------------- mozilla-build.patch | 16 +++++++++------- xulrunner-24.0-gcc47.patch | 12 ++++++------ xulrunner-install-dir.patch | 19 ++++++++----------- xulrunner.spec | 4 ++-- 5 files changed, 30 insertions(+), 40 deletions(-) diff --git a/mozilla-938730.patch b/mozilla-938730.patch index 53ff440..3b84553 100644 --- a/mozilla-938730.patch +++ b/mozilla-938730.patch @@ -1,12 +1,7 @@ -diff --git a/storage/src/Makefile.in b/storage/src/Makefile.in ---- a/storage/src/Makefile.in -+++ b/storage/src/Makefile.in -@@ -11,24 +11,32 @@ VPATH = @srcdir@ - include $(DEPTH)/config/autoconf.mk - - MODULE_NAME = mozStorageModule - LIBXUL_LIBRARY = 1 - +diff -up mozilla-release/storage/src/Makefile.in.938730 mozilla-release/storage/src/Makefile.in +--- mozilla-release/storage/src/Makefile.in.938730 2013-12-09 15:15:44.708527295 +0100 ++++ mozilla-release/storage/src/Makefile.in 2013-12-09 15:17:16.119682503 +0100 +@@ -6,14 +6,23 @@ # Don't use the jemalloc allocator on Android, because we can't guarantee # that Gecko will configure sqlite before it is first used (bug 730495). # @@ -26,11 +21,7 @@ diff --git a/storage/src/Makefile.in b/storage/src/Makefile.in endif endif +endif ++ # For nsDependentJSString LOCAL_INCLUDES = \ - $(SQLITE_CFLAGS) \ - -I$(topsrcdir)/db/sqlite3/src \ - -I$(topsrcdir)/dom/base \ - $(NULL) - diff --git a/mozilla-build.patch b/mozilla-build.patch index 1dd29d0..be73cdf 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,6 +1,7 @@ ---- mozilla-release/security/build/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 -+++ mozilla-release/security/build/Makefile.in 2013-06-18 14:01:41.940378194 +0200 -@@ -133,7 +133,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +diff -up mozilla-release/security/build/Makefile.in.build mozilla-release/security/build/Makefile.in +--- mozilla-release/security/build/Makefile.in.build 2013-12-05 17:07:53.000000000 +0100 ++++ mozilla-release/security/build/Makefile.in 2013-12-09 15:10:17.177970414 +0100 +@@ -128,7 +128,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 @@ -8,11 +9,12 @@ DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)" ifeq ($(OS_ARCH),WINNT) DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t" ---- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-06-18 13:01:39.000000000 +0200 -+++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-06-18 14:01:18.659377663 +0200 -@@ -86,7 +86,6 @@ endif - CSRCS += md4.c +diff -up mozilla-release/security/manager/ssl/src/Makefile.in.build mozilla-release/security/manager/ssl/src/Makefile.in +--- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-12-09 15:10:17.177970414 +0100 ++++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-12-09 15:11:02.282047401 +0100 +@@ -6,7 +6,6 @@ + EXPORT_LIBRARY = 1 DEFINES += \ - -DNSS_ENABLE_ECC \ -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ diff --git a/xulrunner-24.0-gcc47.patch b/xulrunner-24.0-gcc47.patch index a6bff8e..28de75f 100644 --- a/xulrunner-24.0-gcc47.patch +++ b/xulrunner-24.0-gcc47.patch @@ -1,9 +1,9 @@ -diff -up xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in ---- xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-09-11 01:15:24.000000000 +0200 -+++ xulrunner-24.0/mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-09-13 13:33:49.866875578 +0200 -@@ -60,6 +60,9 @@ $(DIST)/bin/crashreporter.crt: $(topsrcd - $(PYTHON) $(srcdir)/certdata2pem.py < $< > $@ - endif +diff -up mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-release/toolkit/crashreporter/client/Makefile.in +--- mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-12-09 15:12:50.659231760 +0100 ++++ mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-12-09 15:13:45.448324783 +0100 +@@ -42,6 +42,9 @@ endif + + ifdef MOZ_WIDGET_GTK +# Needed for moz_free +LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch index e788fa0..9527700 100644 --- a/xulrunner-install-dir.patch +++ b/xulrunner-install-dir.patch @@ -1,8 +1,7 @@ -diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/config/baseconfig.mk ---- mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 -+++ mozilla-aurora-7676a9a06403/config/baseconfig.mk 2012-09-26 10:13:45.258240426 +0200 -@@ -2,7 +2,7 @@ INCLUDED_AUTOCONF_MK = 1 - +diff -up mozilla-release/config/baseconfig.mk.orig mozilla-release/config/baseconfig.mk +--- mozilla-release/config/baseconfig.mk.orig 2013-12-09 15:07:53.357724904 +0100 ++++ mozilla-release/config/baseconfig.mk 2013-12-09 15:08:35.819797392 +0100 +@@ -1,6 +1,6 @@ includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) @@ -10,12 +9,10 @@ diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-767 sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) DIST = $(DEPTH)/dist -diff -up mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk ---- mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 -+++ mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk 2012-09-26 10:14:07.353351833 +0200 -@@ -1,6 +1,6 @@ - INCLUDED_AUTOCONF_MK = 1 - +diff -up mozilla-release/js/src/config/baseconfig.mk.orig mozilla-release/js/src/config/baseconfig.mk +--- mozilla-release/js/src/config/baseconfig.mk.orig 2013-12-09 15:07:53.357724904 +0100 ++++ mozilla-release/js/src/config/baseconfig.mk 2013-12-09 15:09:06.906850462 +0100 +@@ -1,4 +1,4 @@ -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +installdir = $(libdir)/$(MOZ_APP_NAME) sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) diff --git a/xulrunner.spec b/xulrunner.spec index e2de779..1e7983b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -235,10 +235,10 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p1 -b .build +%patch2 -p1 -b .bld %patch3 -p2 -b .arm %patch14 -p2 -b .chromium-types -%patch17 -p2 -b .gcc47 +%patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .885002 From 8b10ed3072926f67c75cdc33cc924524f92cff4a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 10 Dec 2013 14:48:53 +0100 Subject: [PATCH 147/239] Arm build fix --- mozilla-build-arm.patch | 15 ++++++++++++--- xulrunner.spec | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 0fed214..f2885f8 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,6 +1,15 @@ -diff -up xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build.arm xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build ---- xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build.arm 2013-10-23 15:52:17.056493264 +0200 -+++ xulrunner-25.0/mozilla-release/gfx/ycbcr/moz.build 2013-10-23 16:03:04.496045050 +0200 +--- mozilla-release/gfx/layers/BufferUnrotate.cpp.old 2013-12-05 17:07:31.000000000 +0100 ++++ mozilla-release/gfx/layers/BufferUnrotate.cpp 2013-12-10 14:43:25.948164298 +0100 +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + void BufferUnrotate(uint8_t* aBuffer, int aByteWidth, int aHeight, + int aByteStride, int aXBoundary, int aYBoundary) +--- mozilla-release/gfx/ycbcr/moz.build.arm 2013-10-23 15:52:17.056493264 +0200 ++++ mozilla-release/gfx/ycbcr/moz.build 2013-10-23 16:03:04.496045050 +0200 @@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] diff --git a/xulrunner.spec b/xulrunner.spec index 1e7983b..ea7bf08 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -236,7 +236,7 @@ cd %{tarballdir} %patch1 -p1 %patch2 -p1 -b .bld -%patch3 -p2 -b .arm +%patch3 -p1 -b .arm %patch14 -p2 -b .chromium-types %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc From 7f1f78be59ffdfeb893eba03c9e9902c99536802 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 11 Dec 2013 18:14:17 +0100 Subject: [PATCH 148/239] Updated nspr/nss version --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index ea7bf08..d5d74f8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -23,9 +23,9 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.9.6 +%global nspr_version 4.10.2 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.14.3 +%global nss_version 3.15.2 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif From dbeface255d2bb18312bdcb1de1069674561bdc8 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 12 Dec 2013 11:47:29 +0100 Subject: [PATCH 149/239] Arm build fix --- mozilla-build-arm.patch | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index f2885f8..4f25113 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,5 +1,6 @@ ---- mozilla-release/gfx/layers/BufferUnrotate.cpp.old 2013-12-05 17:07:31.000000000 +0100 -+++ mozilla-release/gfx/layers/BufferUnrotate.cpp 2013-12-10 14:43:25.948164298 +0100 +diff -up mozilla-release/gfx/layers/BufferUnrotate.cpp.arm mozilla-release/gfx/layers/BufferUnrotate.cpp +--- mozilla-release/gfx/layers/BufferUnrotate.cpp.arm 2013-12-05 17:07:31.000000000 +0100 ++++ mozilla-release/gfx/layers/BufferUnrotate.cpp 2013-12-10 14:47:43.234182482 +0100 @@ -8,6 +8,7 @@ #include #include @@ -8,8 +9,9 @@ void BufferUnrotate(uint8_t* aBuffer, int aByteWidth, int aHeight, int aByteStride, int aXBoundary, int aYBoundary) ---- mozilla-release/gfx/ycbcr/moz.build.arm 2013-10-23 15:52:17.056493264 +0200 -+++ mozilla-release/gfx/ycbcr/moz.build 2013-10-23 16:03:04.496045050 +0200 +diff -up mozilla-release/gfx/ycbcr/moz.build.arm mozilla-release/gfx/ycbcr/moz.build +--- mozilla-release/gfx/ycbcr/moz.build.arm 2013-12-05 17:07:32.000000000 +0100 ++++ mozilla-release/gfx/ycbcr/moz.build 2013-12-10 14:47:43.235182479 +0100 @@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] @@ -19,3 +21,15 @@ ASFILES += [ 'yuv_row_arm.s', ] +diff -up mozilla-release/media/libtheora/lib/moz.build.arm mozilla-release/media/libtheora/lib/moz.build +--- mozilla-release/media/libtheora/lib/moz.build.arm 2013-12-05 17:07:48.000000000 +0100 ++++ mozilla-release/media/libtheora/lib/moz.build 2013-12-12 11:45:41.882119059 +0100 +@@ -8,7 +8,7 @@ MODULE = 'theora' + + LIBRARY_NAME = 'theora' + +-if CONFIG['OS_TEST'] == 'arm' and CONFIG['GNU_AS']: ++if CONFIG['HAVE_ARM_NEON'] and CONFIG['GNU_AS']: + asm_suffix = CONFIG['ASM_SUFFIX'] + ASFILES += [ + 'armbits-gnu.%s' % asm_suffix, From 3a484e7fcd48b204b14b76cb3852eba08c3c4022 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Dec 2013 13:50:02 +0100 Subject: [PATCH 150/239] rhbz#1037406 - xulrunner FTBFS if '-Werror=format-security' --- xulrunner.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d5d74f8..25fc83b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 26.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -354,8 +354,8 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" +export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat -Werror=format-security" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' @@ -529,6 +529,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 13 2013 Martin Stransky - 26.0-2 +- rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" + flag is used + * Mon Dec 9 2013 Martin Stransky - 26.0-1 - Update to 26.0 Build 2 From 017429f731c5e1dfae90da59437291592d2baefb Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Dec 2013 13:52:10 +0100 Subject: [PATCH 151/239] rhbz#1037406 - xulrunner FTBFS if -Werror=format-security flag is used --- xulrunner.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d5d74f8..25fc83b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 26.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -354,8 +354,8 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" +export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat -Werror=format-security" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' @@ -529,6 +529,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 13 2013 Martin Stransky - 26.0-2 +- rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" + flag is used + * Mon Dec 9 2013 Martin Stransky - 26.0-1 - Update to 26.0 Build 2 From 8ede93a5a45d6f69237f6b1b792e3adac9bb01cf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 13 Dec 2013 13:53:33 +0100 Subject: [PATCH 152/239] rhbz#1037406 - xulrunner FTBFS if -Werror=format-security flag is used --- xulrunner.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index d5d74f8..25fc83b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 26.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -354,8 +354,8 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" +export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat -Werror=format-security" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' @@ -529,6 +529,10 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Dec 13 2013 Martin Stransky - 26.0-2 +- rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" + flag is used + * Mon Dec 9 2013 Martin Stransky - 26.0-1 - Update to 26.0 Build 2 From 22b2e65bcf81e2d96021fdad571a83a9c77e1b93 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 3 Feb 2014 11:53:06 +0100 Subject: [PATCH 153/239] Update to 27.0 --- mozilla-build-arm.patch | 31 ++++--------------------------- mozilla-build.patch | 23 ++++++++++++----------- sources | 2 +- xulrunner.spec | 9 ++++++--- 4 files changed, 23 insertions(+), 42 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 4f25113..d61884e 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,35 +1,12 @@ -diff -up mozilla-release/gfx/layers/BufferUnrotate.cpp.arm mozilla-release/gfx/layers/BufferUnrotate.cpp ---- mozilla-release/gfx/layers/BufferUnrotate.cpp.arm 2013-12-05 17:07:31.000000000 +0100 -+++ mozilla-release/gfx/layers/BufferUnrotate.cpp 2013-12-10 14:47:43.234182482 +0100 -@@ -8,6 +8,7 @@ - #include - #include - #include -+#include - - void BufferUnrotate(uint8_t* aBuffer, int aByteWidth, int aHeight, - int aByteStride, int aXBoundary, int aYBoundary) -diff -up mozilla-release/gfx/ycbcr/moz.build.arm mozilla-release/gfx/ycbcr/moz.build ---- mozilla-release/gfx/ycbcr/moz.build.arm 2013-12-05 17:07:32.000000000 +0100 -+++ mozilla-release/gfx/ycbcr/moz.build 2013-12-10 14:47:43.235182479 +0100 +diff -up firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-27.0/mozilla-release/gfx/ycbcr/moz.build +--- firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-01-28 05:03:42.000000000 +0100 ++++ firefox-27.0/mozilla-release/gfx/ycbcr/moz.build 2014-02-03 11:14:34.062219509 +0100 @@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] -if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: +if CONFIG['HAVE_ARM_NEON']: - ASFILES += [ + SOURCES += [ 'yuv_row_arm.s', ] -diff -up mozilla-release/media/libtheora/lib/moz.build.arm mozilla-release/media/libtheora/lib/moz.build ---- mozilla-release/media/libtheora/lib/moz.build.arm 2013-12-05 17:07:48.000000000 +0100 -+++ mozilla-release/media/libtheora/lib/moz.build 2013-12-12 11:45:41.882119059 +0100 -@@ -8,7 +8,7 @@ MODULE = 'theora' - - LIBRARY_NAME = 'theora' - --if CONFIG['OS_TEST'] == 'arm' and CONFIG['GNU_AS']: -+if CONFIG['HAVE_ARM_NEON'] and CONFIG['GNU_AS']: - asm_suffix = CONFIG['ASM_SUFFIX'] - ASFILES += [ - 'armbits-gnu.%s' % asm_suffix, diff --git a/mozilla-build.patch b/mozilla-build.patch index be73cdf..5136563 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,22 +1,23 @@ -diff -up mozilla-release/security/build/Makefile.in.build mozilla-release/security/build/Makefile.in ---- mozilla-release/security/build/Makefile.in.build 2013-12-05 17:07:53.000000000 +0100 -+++ mozilla-release/security/build/Makefile.in 2013-12-09 15:10:17.177970414 +0100 +diff -up firefox-27.0/mozilla-release/security/build/Makefile.in.bld firefox-27.0/mozilla-release/security/build/Makefile.in +--- firefox-27.0/mozilla-release/security/build/Makefile.in.bld 2014-01-28 05:04:01.000000000 +0100 ++++ firefox-27.0/mozilla-release/security/build/Makefile.in 2014-02-03 10:56:16.010749049 +0100 @@ -128,7 +128,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)" - ifeq ($(OS_ARCH),WINNT) - DEFAULT_GMAKE_FLAGS += INSTALL="$(NSINSTALL) -t" -diff -up mozilla-release/security/manager/ssl/src/Makefile.in.build mozilla-release/security/manager/ssl/src/Makefile.in ---- mozilla-release/security/manager/ssl/src/Makefile.in.build 2013-12-09 15:10:17.177970414 +0100 -+++ mozilla-release/security/manager/ssl/src/Makefile.in 2013-12-09 15:11:02.282047401 +0100 -@@ -6,7 +6,6 @@ + ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1) + DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS="-static-libgcc" + endif +diff -up firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in.bld firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in +--- firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in.bld 2014-02-03 11:01:58.000000000 +0100 ++++ firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in 2014-02-03 11:02:05.941855059 +0100 +@@ -5,7 +5,6 @@ + # file, You can obtain one at http://mozilla.org/MPL/2.0/. - EXPORT_LIBRARY = 1 DEFINES += \ - -DNSS_ENABLE_ECC \ -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \ $(NULL) +diff -up firefox-27.0/mozilla-release/security/manager/ssl/src/moz.build.bld firefox-27.0/mozilla-release/security/manager/ssl/src/moz.build diff --git a/sources b/sources index dde4bb6..07453c3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -91ce51cc6474f1269484e5327643a59c firefox-26.0.source.tar.bz2 +212827908144b43e7c80ed9d56a08ca9 firefox-27.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 25fc83b..e5c4414 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ %if %{?system_nss} %global nspr_version 4.10.2 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.15.2 +%global nss_version 3.15.4 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 26.0 -Release: 2%{?pre_tag}%{?dist} +Version: 27.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -529,6 +529,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 3 2014 Martin Stransky - 27.0-1 +- Update to 27.0 + * Fri Dec 13 2013 Martin Stransky - 26.0-2 - rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" flag is used From cb8a01c56488d76f02e07910d3590854dd84b197 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 3 Feb 2014 12:35:56 +0100 Subject: [PATCH 154/239] Build fix - patches --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index e5c4414..f734c3c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -235,8 +235,8 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p1 -b .bld -%patch3 -p1 -b .arm +%patch2 -p2 -b .bld +%patch3 -p2 -b .arm %patch14 -p2 -b .chromium-types %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc From 03c0aed20de5217f460cb6b42ef00bc749ffb116 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 18 Mar 2014 13:58:56 +0100 Subject: [PATCH 155/239] Update to 28.0 --- sources | 1 + xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sources b/sources index 07453c3..ad70675 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 212827908144b43e7c80ed9d56a08ca9 firefox-27.0.source.tar.bz2 +db06b6da6b826cfc6a49c15bca115a6b firefox-28.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index f734c3c..531e8ad 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,7 +77,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 27.0 +Version: 28.0 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -529,6 +529,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Mar 18 2014 Martin Stransky - 28.0-1 +- Update to 28.0 + * Mon Feb 3 2014 Martin Stransky - 27.0-1 - Update to 27.0 From 814f8924c4a44b26a968a7150ed3f07ffc857a4b Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 14 Apr 2014 13:31:00 +0200 Subject: [PATCH 156/239] Fix build problems --- mozilla-837563.patch | 144 ------------------------------------------- mozilla-885002.patch | 30 --------- mozilla-938730.patch | 27 -------- mozilla-build.patch | 30 +++++---- xulrunner.spec | 8 +-- 5 files changed, 15 insertions(+), 224 deletions(-) delete mode 100644 mozilla-837563.patch delete mode 100644 mozilla-885002.patch delete mode 100644 mozilla-938730.patch diff --git a/mozilla-837563.patch b/mozilla-837563.patch deleted file mode 100644 index 40121a2..0000000 --- a/mozilla-837563.patch +++ /dev/null @@ -1,144 +0,0 @@ -# HG changeset patch -# User Matthew Gregan -# Date 1383172648 -46800 -# Thu Oct 31 11:37:28 2013 +1300 -# Node ID 2f6bd7da0756edaad53b601b18cf0c0e27f5f676 -# Parent 0f6219c6fb61f3f5e6775d269a6cf52305021024 -Bug 837563 - Enable libcubeb's PulseAudio backend. r=glandium - -diff --git a/configure.in b/configure.in ---- a/configure.in -+++ b/configure.in -@@ -5522,65 +5522,68 @@ fi - if test -n "$MOZ_TREMOR"; then - AC_DEFINE(MOZ_TREMOR) - fi - - if test -n "$MOZ_OPUS"; then - AC_DEFINE(MOZ_OPUS) - fi - --dnl ======================================================== --dnl = Check alsa availability on Linux if using sydneyaudio --dnl ======================================================== -- --dnl If using sydneyaudio with Linux, ensure that the alsa library is available -+dnl ==================================================== -+dnl = Check alsa availability on Linux if using libcubeb -+dnl ==================================================== -+ -+dnl If using libcubeb with Linux, ensure that the alsa library is available - if test -n "$MOZ_CUBEB" -a "$OS_TARGET" = "Linux"; then - MOZ_ALSA=1 - fi - - MOZ_ARG_ENABLE_BOOL(alsa, - [ --enable-alsa Enable Alsa support (default on Linux)], --MOZ_ALSA=1, --MOZ_ALSA=) -+ MOZ_ALSA=1, -+ MOZ_ALSA=) - - if test -n "$MOZ_ALSA"; then - AC_DEFINE(MOZ_CUBEB) - PKG_CHECK_MODULES(MOZ_ALSA, alsa, , - [echo "$MOZ_ALSA_PKG_ERRORS" - AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) - fi - - AC_SUBST(MOZ_ALSA) - AC_SUBST(MOZ_ALSA_CFLAGS) - AC_SUBST(MOZ_ALSA_LIBS) - - dnl ======================================================== --dnl = Enable PulseAudio --dnl ======================================================== -- --MOZ_ARG_ENABLE_BOOL(pulseaudio, --[ --enable-pulseaudio Enable PulseAudio support (experimental)], --MOZ_PULSEAUDIO=1, --MOZ_PULSEAUDIO=) -+dnl = Disable PulseAudio -+dnl ======================================================== -+ -+dnl If using libcubeb with Linux, ensure that the PA library is available -+if test -n "$MOZ_CUBEB" -a "$OS_TARGET" = "Linux" -a -z "$MOZ_B2G"; then -+ MOZ_PULSEAUDIO=1 -+fi -+ -+MOZ_ARG_DISABLE_BOOL(pulseaudio, -+[ --disable-pulseaudio Disable PulseAudio support], -+ MOZ_PULSEAUDIO=, -+ MOZ_PULSEAUDIO=1) - - if test -n "$MOZ_PULSEAUDIO"; then - AC_DEFINE(MOZ_CUBEB) - if test -z "$gonkdir"; then - PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, , - [echo "$MOZ_PULSEAUDIO_PKG_ERRORS" - AC_MSG_ERROR([pulseaudio audio backend requires libpulse development package])]) - else - MOZ_PULSEAUDIO_CFLAGS="-I$gonkdir/external/pulseaudio/pulseaudio/src" -- MOZ_PULSEAUDIO_LIBS="-lpulse" - fi - fi - - AC_SUBST(MOZ_PULSEAUDIO) - AC_SUBST(MOZ_PULSEAUDIO_CFLAGS) --AC_SUBST(MOZ_PULSEAUDIO_LIBS) - - dnl ======================================================== - dnl = Enable GStreamer - dnl ======================================================== - if test "$OS_TARGET" = "Linux"; then - MOZ_GSTREAMER=1 - fi - -diff --git a/media/webrtc/signaling/test/Makefile.in b/media/webrtc/signaling/test/Makefile.in ---- a/media/webrtc/signaling/test/Makefile.in -+++ b/media/webrtc/signaling/test/Makefile.in -@@ -18,21 +18,16 @@ LIBS = \ - $(NULL) - - ifdef MOZ_CUBEB - ifdef MOZ_ALSA - LIBS += \ - $(MOZ_ALSA_LIBS) \ - $(NULL) - endif --ifdef MOZ_PULSEAUDIO --LIBS += \ -- $(MOZ_PULSEAUDIO_LIBS) \ -- $(NULL) --endif - endif - - ifeq ($(OS_TARGET),Android) - LIBS += \ - $(STLPORT_LDFLAGS) \ - $(STLPORT_LIBS) \ - $(NULL) - CPPFLAGS += \ -diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in ---- a/toolkit/library/Makefile.in -+++ b/toolkit/library/Makefile.in -@@ -428,19 +428,16 @@ OS_LIBS += $(call EXPAND_LIBNAME,secur32 - endif - endif - - - ifdef MOZ_CUBEB - ifdef MOZ_ALSA - EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) - endif --ifdef MOZ_PULSEAUDIO --EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) --endif - endif - - ifdef HAVE_CLOCK_MONOTONIC - EXTRA_DSO_LDOPTS += $(REALTIME_LIBS) - endif - - ifeq (android,$(MOZ_WIDGET_TOOLKIT)) - OS_LIBS += -lGLESv2 diff --git a/mozilla-885002.patch b/mozilla-885002.patch deleted file mode 100644 index e48c89a..0000000 --- a/mozilla-885002.patch +++ /dev/null @@ -1,30 +0,0 @@ -# HG changeset patch -# Parent d8fd5706493e19bcb85443316a4c180849f5d247 -# User Steve Singer -Bug 885002 - Fix casting on 64 bit Big Endian platforms. - - -diff --git a/content/media/FileBlockCache.h b/content/media/FileBlockCache.h ---- a/content/media/FileBlockCache.h -+++ b/content/media/FileBlockCache.h -@@ -138,19 +138,17 @@ public: - - bool IsEmpty() { - return nsDeque::GetSize() == 0; - } - - private: - int32_t ObjectAt(int32_t aIndex) { - void* v = nsDeque::ObjectAt(aIndex); -- // Ugly hack to work around "casting 64bit void* to 32bit int loses precision" -- // error on 64bit Linux. -- return *(reinterpret_cast(&v)); -+ return reinterpret_cast(v); - } - }; - - private: - int64_t BlockIndexToOffset(int32_t aBlockIndex) { - return static_cast(aBlockIndex) * BLOCK_SIZE; - } - diff --git a/mozilla-938730.patch b/mozilla-938730.patch deleted file mode 100644 index 3b84553..0000000 --- a/mozilla-938730.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -up mozilla-release/storage/src/Makefile.in.938730 mozilla-release/storage/src/Makefile.in ---- mozilla-release/storage/src/Makefile.in.938730 2013-12-09 15:15:44.708527295 +0100 -+++ mozilla-release/storage/src/Makefile.in 2013-12-09 15:17:16.119682503 +0100 -@@ -6,14 +6,23 @@ - # Don't use the jemalloc allocator on Android, because we can't guarantee - # that Gecko will configure sqlite before it is first used (bug 730495). - # -+# Don't use the jemalloc allocator when using system NSS. Linked in libraries -+# (such as NSS) might trigger an initialization of sqlite and allocation -+# of memory using the default allocator, prior to the storage service -+# registering its allocator, causing memory management failures (bug 938730). -+# - # Note: On Windows our sqlite build assumes we use jemalloc. If you disable - # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef - # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in. -+ -+ifndef _USE_SYSTEM_NSS - ifdef MOZ_MEMORY - ifneq ($(OS_TARGET), Android) - DEFINES += -DMOZ_STORAGE_MEMORY - endif - endif -+endif -+ - - # For nsDependentJSString - LOCAL_INCLUDES = \ diff --git a/mozilla-build.patch b/mozilla-build.patch index 5136563..f04adf7 100644 --- a/mozilla-build.patch +++ b/mozilla-build.patch @@ -1,23 +1,21 @@ -diff -up firefox-27.0/mozilla-release/security/build/Makefile.in.bld firefox-27.0/mozilla-release/security/build/Makefile.in ---- firefox-27.0/mozilla-release/security/build/Makefile.in.bld 2014-01-28 05:04:01.000000000 +0100 -+++ firefox-27.0/mozilla-release/security/build/Makefile.in 2014-02-03 10:56:16.010749049 +0100 -@@ -128,7 +128,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR= +diff -up mozilla-release/security/build/Makefile.in.bld mozilla-release/security/build/Makefile.in +--- mozilla-release/security/build/Makefile.in.bld 2014-03-15 06:19:34.000000000 +0100 ++++ mozilla-release/security/build/Makefile.in 2014-04-14 11:22:17.678746446 +0200 +@@ -124,7 +124,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 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1) - DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS="-static-libgcc" + DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' endif -diff -up firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in.bld firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in ---- firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in.bld 2014-02-03 11:01:58.000000000 +0100 -+++ firefox-27.0/mozilla-release/security/manager/ssl/src/Makefile.in 2014-02-03 11:02:05.941855059 +0100 -@@ -5,7 +5,6 @@ - # file, You can obtain one at http://mozilla.org/MPL/2.0/. +diff -up mozilla-release/security/manager/ssl/src/moz.build.bld mozilla-release/security/manager/ssl/src/moz.build +--- mozilla-release/security/manager/ssl/src/moz.build.bld 2014-04-14 11:41:36.701779133 +0200 ++++ mozilla-release/security/manager/ssl/src/moz.build 2014-04-14 11:41:49.316833110 +0200 +@@ -93,6 +93,5 @@ UNIFIED_SOURCES += [ - DEFINES += \ -- -DNSS_ENABLE_ECC \ - -DDLL_PREFIX=\"$(DLL_PREFIX)\" \ - -DDLL_SUFFIX=\"$(DLL_SUFFIX)\" \ - $(NULL) -diff -up firefox-27.0/mozilla-release/security/manager/ssl/src/moz.build.bld firefox-27.0/mozilla-release/security/manager/ssl/src/moz.build + FINAL_LIBRARY = 'xul' + +-DEFINES['NSS_ENABLE_ECC'] = 'True' + for var in ('DLL_PREFIX', 'DLL_SUFFIX'): + DEFINES[var] = '"%s"' % CONFIG[var] diff --git a/xulrunner.spec b/xulrunner.spec index 531e8ad..204a87d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -97,7 +97,6 @@ Patch17: xulrunner-24.0-gcc47.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch -Patch20: mozilla-885002.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -105,8 +104,6 @@ Patch200: mozilla-193-pkgconfig.patch Patch204: rhbz-966424.patch # Upstream patches -Patch300: mozilla-837563.patch -Patch301: mozilla-938730.patch # --------------------------------------------------- @@ -235,19 +232,16 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p2 -b .bld +%patch2 -p1 -b .bld %patch3 -p2 -b .arm %patch14 -p2 -b .chromium-types %patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines -%patch20 -p1 -b .885002 %patch200 -p2 -b .pk %patch204 -p1 -b .966424 -%patch300 -p1 -b .837563 -%patch301 -p1 -b .938730 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig From 3662bd7cb21c41d4839c10a6e0f788e045f0a47c Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Tue, 15 Apr 2014 16:39:04 +0200 Subject: [PATCH 157/239] fixed arm patch --- mozilla-build-arm.patch | 20 ++++++++++++++++---- xulrunner.spec | 3 ++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index d61884e..1628018 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,7 +1,7 @@ -diff -up firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-27.0/mozilla-release/gfx/ycbcr/moz.build ---- firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-01-28 05:03:42.000000000 +0100 -+++ firefox-27.0/mozilla-release/gfx/ycbcr/moz.build 2014-02-03 11:14:34.062219509 +0100 -@@ -61,7 +61,7 @@ else: +diff -up firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-28.0/mozilla-release/gfx/ycbcr/moz.build +--- firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-03-11 01:54:04.000000000 +0100 ++++ firefox-28.0/mozilla-release/gfx/ycbcr/moz.build 2014-03-11 10:12:19.586220802 +0100 +@@ -59,7 +59,7 @@ else: 'yuv_row_other.cpp', ] @@ -10,3 +10,15 @@ diff -up firefox-27.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-27.0/mozil SOURCES += [ 'yuv_row_arm.s', ] +diff -up firefox-28.0/mozilla-release/media/libtheora/lib/moz.build.arm firefox-28.0/mozilla-release/media/libtheora/lib/moz.build +--- firefox-28.0/mozilla-release/media/libtheora/lib/moz.build.arm 2014-03-11 01:54:13.000000000 +0100 ++++ firefox-28.0/mozilla-release/media/libtheora/lib/moz.build 2014-03-19 12:00:57.491064764 +0100 +@@ -20,7 +20,7 @@ UNIFIED_SOURCES += [ + 'state.c', + ] + +-if CONFIG['OS_TEST'] == 'arm' and CONFIG['GNU_AS']: ++if CONFIG['GNU_AS']: + GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [ + 'armbits-gnu', + 'armfrag-gnu', diff --git a/xulrunner.spec b/xulrunner.spec index 204a87d..74edacd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 28.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -525,6 +525,7 @@ fi %changelog * Tue Mar 18 2014 Martin Stransky - 28.0-1 - Update to 28.0 +- Fixed arm patch * Mon Feb 3 2014 Martin Stransky - 27.0-1 - Update to 27.0 From 7b0dff95318cb00314c955f56d54409a0f5b4d52 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 Apr 2014 11:42:18 +0200 Subject: [PATCH 158/239] Update to 29.0 --- mozilla-build-arm.patch | 20 ++++--------------- mozilla-build.patch | 21 -------------------- sources | 3 +-- xulrunner-2.0-chromium-types.patch | 31 ------------------------------ xulrunner-24.0-gcc47.patch | 13 ------------- xulrunner-install-dir.patch | 22 +++++++-------------- xulrunner.spec | 13 +++++-------- 7 files changed, 17 insertions(+), 106 deletions(-) delete mode 100644 mozilla-build.patch delete mode 100644 xulrunner-2.0-chromium-types.patch delete mode 100644 xulrunner-24.0-gcc47.patch diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index 1628018..f98cbe3 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,7 +1,7 @@ -diff -up firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-28.0/mozilla-release/gfx/ycbcr/moz.build ---- firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-03-11 01:54:04.000000000 +0100 -+++ firefox-28.0/mozilla-release/gfx/ycbcr/moz.build 2014-03-11 10:12:19.586220802 +0100 -@@ -59,7 +59,7 @@ else: +diff -up firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-29.0/mozilla-release/gfx/ycbcr/moz.build +--- firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-04-22 07:27:47.000000000 +0200 ++++ firefox-29.0/mozilla-release/gfx/ycbcr/moz.build 2014-04-22 16:40:34.862849368 +0200 +@@ -61,7 +61,7 @@ else: 'yuv_row_other.cpp', ] @@ -10,15 +10,3 @@ diff -up firefox-28.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-28.0/mozil SOURCES += [ 'yuv_row_arm.s', ] -diff -up firefox-28.0/mozilla-release/media/libtheora/lib/moz.build.arm firefox-28.0/mozilla-release/media/libtheora/lib/moz.build ---- firefox-28.0/mozilla-release/media/libtheora/lib/moz.build.arm 2014-03-11 01:54:13.000000000 +0100 -+++ firefox-28.0/mozilla-release/media/libtheora/lib/moz.build 2014-03-19 12:00:57.491064764 +0100 -@@ -20,7 +20,7 @@ UNIFIED_SOURCES += [ - 'state.c', - ] - --if CONFIG['OS_TEST'] == 'arm' and CONFIG['GNU_AS']: -+if CONFIG['GNU_AS']: - GENERATED_SOURCES += [ '%s.%s' % (f, CONFIG['ASM_SUFFIX']) for f in [ - 'armbits-gnu', - 'armfrag-gnu', diff --git a/mozilla-build.patch b/mozilla-build.patch deleted file mode 100644 index f04adf7..0000000 --- a/mozilla-build.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up mozilla-release/security/build/Makefile.in.bld mozilla-release/security/build/Makefile.in ---- mozilla-release/security/build/Makefile.in.bld 2014-03-15 06:19:34.000000000 +0100 -+++ mozilla-release/security/build/Makefile.in 2014-04-14 11:22:17.678746446 +0200 -@@ -124,7 +124,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 - ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1) - DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' - endif -diff -up mozilla-release/security/manager/ssl/src/moz.build.bld mozilla-release/security/manager/ssl/src/moz.build ---- mozilla-release/security/manager/ssl/src/moz.build.bld 2014-04-14 11:41:36.701779133 +0200 -+++ mozilla-release/security/manager/ssl/src/moz.build 2014-04-14 11:41:49.316833110 +0200 -@@ -93,6 +93,5 @@ UNIFIED_SOURCES += [ - - FINAL_LIBRARY = 'xul' - --DEFINES['NSS_ENABLE_ECC'] = 'True' - for var in ('DLL_PREFIX', 'DLL_SUFFIX'): - DEFINES[var] = '"%s"' % CONFIG[var] diff --git a/sources b/sources index ad70675..891ef83 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -212827908144b43e7c80ed9d56a08ca9 firefox-27.0.source.tar.bz2 -db06b6da6b826cfc6a49c15bca115a6b firefox-28.0.source.tar.bz2 +07c515fc487824f107a947d23f420e9d firefox-29.0.source.tar.bz2 diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch deleted file mode 100644 index 2b3db8c..0000000 --- a/xulrunner-2.0-chromium-types.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h ---- xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h.chromium-types 2012-11-16 20:56:29.000000000 +0100 -+++ xulrunner-17.0/mozilla-release/gfx/ycbcr/chromium_types.h 2012-11-20 09:19:14.843448418 +0100 -@@ -30,7 +30,11 @@ typedef int16_t 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(__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 -@@ -42,6 +46,14 @@ typedef int16_t 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 diff --git a/xulrunner-24.0-gcc47.patch b/xulrunner-24.0-gcc47.patch deleted file mode 100644 index 28de75f..0000000 --- a/xulrunner-24.0-gcc47.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 mozilla-release/toolkit/crashreporter/client/Makefile.in ---- mozilla-release/toolkit/crashreporter/client/Makefile.in.gcc47 2013-12-09 15:12:50.659231760 +0100 -+++ mozilla-release/toolkit/crashreporter/client/Makefile.in 2013-12-09 15:13:45.448324783 +0100 -@@ -42,6 +42,9 @@ endif - - ifdef MOZ_WIDGET_GTK - -+# Needed for moz_free -+LIBS += -L$(LIBXUL_DIST)/lib -lmozalloc -+ - LIBS += \ - $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \ - $(NULL) diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch index 9527700..51fe4ba 100644 --- a/xulrunner-install-dir.patch +++ b/xulrunner-install-dir.patch @@ -1,20 +1,12 @@ -diff -up mozilla-release/config/baseconfig.mk.orig mozilla-release/config/baseconfig.mk ---- mozilla-release/config/baseconfig.mk.orig 2013-12-09 15:07:53.357724904 +0100 -+++ mozilla-release/config/baseconfig.mk 2013-12-09 15:08:35.819797392 +0100 -@@ -1,6 +1,6 @@ +diff -up firefox-29.0/mozilla-release/config/baseconfig.mk.orig firefox-29.0/mozilla-release/config/baseconfig.mk +--- mozilla-release/config/baseconfig.mk.orig 2014-04-22 15:38:52.948165295 +0200 ++++ mozilla-release/config/baseconfig.mk 2014-04-22 15:42:20.387481673 +0200 +@@ -4,7 +4,7 @@ + # whether a normal build is happening or whether the check is running. includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +installdir = $(libdir)/$(MOZ_APP_NAME) sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - DIST = $(DEPTH)/dist - -diff -up mozilla-release/js/src/config/baseconfig.mk.orig mozilla-release/js/src/config/baseconfig.mk ---- mozilla-release/js/src/config/baseconfig.mk.orig 2013-12-09 15:07:53.357724904 +0100 -+++ mozilla-release/js/src/config/baseconfig.mk 2013-12-09 15:09:06.906850462 +0100 -@@ -1,4 +1,4 @@ --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) - sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - - ifneq (,$(filter /%,$(TOP_DIST))) + ifndef TOP_DIST + TOP_DIST = dist diff --git a/xulrunner.spec b/xulrunner.spec index 74edacd..4541e6a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 28.0 -Release: 2%{?pre_tag}%{?dist} +Version: 29.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -89,10 +89,7 @@ Source21: %{name}.sh.in # build patches Patch1: xulrunner-install-dir.patch -Patch2: mozilla-build.patch Patch3: mozilla-build-arm.patch -Patch14: xulrunner-2.0-chromium-types.patch -Patch17: xulrunner-24.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) @@ -232,10 +229,7 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p1 -b .bld %patch3 -p2 -b .arm -%patch14 -p2 -b .chromium-types -%patch17 -p1 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines @@ -523,6 +517,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 28 2014 Martin Stransky - 29.0-1 +- Update to 29.0 + * Tue Mar 18 2014 Martin Stransky - 28.0-1 - Update to 28.0 - Fixed arm patch From d0375898df38b64b3dcc77c6267fa3e2cb97a3cd Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 28 Apr 2014 12:42:42 +0200 Subject: [PATCH 159/239] ARM build fixes --- xulrunner.spec | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 4541e6a..ef730b5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -284,24 +284,23 @@ echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig +echo "ac_add_options --disable-ion" >> .mozconfig +echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv7hnl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=neon" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig +echo "ac_add_options --disable-ion" >> .mozconfig +echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv5tel echo "ac_add_options --with-arch=armv5te" >> .mozconfig echo "ac_add_options --with-float-abi=soft" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig -%endif - -%ifnarch %{ix86} x86_64 armv7hl armv7hnl -echo "ac_add_options --disable-methodjit" >> .mozconfig -echo "ac_add_options --disable-monoic" >> .mozconfig -echo "ac_add_options --disable-polyic" >> .mozconfig -echo "ac_add_options --disable-tracejit" >> .mozconfig +echo "ac_add_options --disable-ion" >> .mozconfig +echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifnarch %{ix86} x86_64 armv7hl armv7hnl From b29fbba698c1d977ea4ee84bbbbb02262de36078 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 9 May 2014 17:49:48 +0200 Subject: [PATCH 160/239] An updated ppc64le patch (rhbz#1094378) --- mozilla-ppc64le.patch | 5061 +++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 14 +- 2 files changed, 5073 insertions(+), 2 deletions(-) create mode 100644 mozilla-ppc64le.patch diff --git a/mozilla-ppc64le.patch b/mozilla-ppc64le.patch new file mode 100644 index 0000000..bb340cb --- /dev/null +++ b/mozilla-ppc64le.patch @@ -0,0 +1,5061 @@ +# HG changeset patch +# Parent 007cf000fdf7c5048939a87f63165a67fd9db5f6 +# User Ulrich Weigand +Bug 976648 - powerpc64le-linux support - toplevel build/config + +Index: mozilla-release/build/autoconf/config.guess +=================================================================== +--- mozilla-release.orig/build/autoconf/config.guess ++++ mozilla-release/build/autoconf/config.guess +@@ -1,14 +1,12 @@ + #! /bin/sh + # Attempt to guess a canonical system name. +-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +-# Free Software Foundation, Inc. ++# Copyright 1992-2014 Free Software Foundation, Inc. + +-timestamp='2009-08-19' ++timestamp='2014-02-12' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +-# the Free Software Foundation; either version 2 of the License, or ++# the Free Software Foundation; either version 3 of the License, or + # (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, but +@@ -17,26 +15,22 @@ timestamp='2009-08-19' + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +-# 02110-1301, USA. ++# along with this program; if not, see . + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under +-# the same distribution terms that you use for the rest of that program. +- +- +-# Originally written by Per Bothner. Please send patches (context +-# diff format) to and include a ChangeLog +-# entry. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). + # +-# This script attempts to guess a canonical system name similar to +-# config.sub. If it succeeds, it prints the system name on stdout, and +-# exits with 0. Otherwise, it exits with 1. ++# Originally written by Per Bothner. + # + # You can get the latest version of this script from: + # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD ++# ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. ++ + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -56,8 +50,7 @@ version="\ + GNU config.guess ($timestamp) + + Originally written by Per Bothner. +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, +-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++Copyright 1992-2014 Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | + UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown + UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + ++case "${UNAME_SYSTEM}" in ++Linux|GNU|GNU/*) ++ # If the system lacks a compiler, then just pick glibc. ++ # We could probably try harder. ++ LIBC=gnu ++ ++ eval $set_cc_for_build ++ cat <<-EOF > $dummy.c ++ #include ++ #if defined(__UCLIBC__) ++ LIBC=uclibc ++ #elif defined(__dietlibc__) ++ LIBC=dietlibc ++ #else ++ LIBC=gnu ++ #endif ++ EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ++ ;; ++esac ++ + # Note: order is significant - the case branches are not exclusive. + + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or +- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward +@@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + fi + ;; + *) +- os=netbsd ++ os=netbsd + ;; + esac + # The OS release +@@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; ++ *:Bitrig:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} ++ exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} +@@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) +- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ++ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on +@@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- exit ;; ++ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ++ exitcode=$? ++ trap '' 0 ++ exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead +@@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) +- echo powerpc-ibm-os400 ++ echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; +- arm:riscos:*:*|arm:RISCOS:*:*) ++ arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) +@@ -333,6 +354,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" +@@ -391,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} ++ echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} +- exit ;; ++ exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) +- echo m68k-atari-mint${UNAME_RELEASE} ++ echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) +- echo m68k-milan-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-milan-mint${UNAME_RELEASE} ++ exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) +- echo m68k-hades-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-hades-mint${UNAME_RELEASE} ++ exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) +- echo m68k-unknown-mint${UNAME_RELEASE} +- exit ;; ++ echo m68k-unknown-mint${UNAME_RELEASE} ++ exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; +@@ -477,8 +501,8 @@ EOF + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) +- # DG/UX returns AViiON for all architectures +- UNAME_PROCESSOR=`/usr/bin/uname -p` ++ # DG/UX returns AViiON for all architectures ++ UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ +@@ -491,7 +515,7 @@ EOF + else + echo i586-dg-dgux${UNAME_RELEASE} + fi +- exit ;; ++ exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; +@@ -548,7 +572,7 @@ EOF + echo rs6000-ibm-aix3.2 + fi + exit ;; +- *:AIX:*:[456]) ++ *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 +@@ -591,52 +615,52 @@ EOF + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` +- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` +- case "${sc_cpu_version}" in +- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 +- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 +- 532) # CPU_PA_RISC2_0 +- case "${sc_kernel_bits}" in +- 32) HP_ARCH="hppa2.0n" ;; +- 64) HP_ARCH="hppa2.0w" ;; ++ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ++ case "${sc_cpu_version}" in ++ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ++ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ++ 532) # CPU_PA_RISC2_0 ++ case "${sc_kernel_bits}" in ++ 32) HP_ARCH="hppa2.0n" ;; ++ 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 +- esac ;; +- esac ++ esac ;; ++ esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c ++ sed 's/^ //' << EOF >$dummy.c ++ ++ #define _HPUX_SOURCE ++ #include ++ #include ++ ++ int main () ++ { ++ #if defined(_SC_KERNEL_BITS) ++ long bits = sysconf(_SC_KERNEL_BITS); ++ #endif ++ long cpu = sysconf (_SC_CPU_VERSION); + +- #define _HPUX_SOURCE +- #include +- #include +- +- int main () +- { +- #if defined(_SC_KERNEL_BITS) +- long bits = sysconf(_SC_KERNEL_BITS); +- #endif +- long cpu = sysconf (_SC_CPU_VERSION); +- +- switch (cpu) +- { +- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; +- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; +- case CPU_PA_RISC2_0: +- #if defined(_SC_KERNEL_BITS) +- switch (bits) +- { +- case 64: puts ("hppa2.0w"); break; +- case 32: puts ("hppa2.0n"); break; +- default: puts ("hppa2.0"); break; +- } break; +- #else /* !defined(_SC_KERNEL_BITS) */ +- puts ("hppa2.0"); break; +- #endif +- default: puts ("hppa1.0"); break; +- } +- exit (0); +- } ++ switch (cpu) ++ { ++ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ++ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ++ case CPU_PA_RISC2_0: ++ #if defined(_SC_KERNEL_BITS) ++ switch (bits) ++ { ++ case 64: puts ("hppa2.0w"); break; ++ case 32: puts ("hppa2.0n"); break; ++ default: puts ("hppa2.0"); break; ++ } break; ++ #else /* !defined(_SC_KERNEL_BITS) */ ++ puts ("hppa2.0"); break; ++ #endif ++ default: puts ("hppa1.0"); break; ++ } ++ exit (0); ++ } + EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa +@@ -727,22 +751,22 @@ EOF + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd +- exit ;; ++ exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi +- exit ;; ++ exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd +- exit ;; ++ exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd +- exit ;; ++ exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd +- exit ;; ++ exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; +@@ -766,14 +790,14 @@ EOF + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` +- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" +- exit ;; ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ++ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ exit ;; + 5000:UNIX_System_V:4.*:*) +- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` +- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` +- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ++ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ++ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ++ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} +@@ -785,34 +809,39 @@ EOF + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) +- case ${UNAME_MACHINE} in +- pc98) +- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ UNAME_PROCESSOR=`/usr/bin/uname -p` ++ case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) +- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; ++ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; ++ *:MINGW64*:*) ++ echo ${UNAME_MACHINE}-pc-mingw64 ++ exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; ++ i*:MSYS*:*) ++ echo ${UNAME_MACHINE}-pc-msys ++ exit ;; + i*:windows32*:*) +- # uname -m includes "-pc" on this system. +- echo ${UNAME_MACHINE}-mingw32 ++ # uname -m includes "-pc" on this system. ++ echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; +- *:Interix*:[3456]*) +- case ${UNAME_MACHINE} in ++ *:Interix*:*) ++ case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; +- EM64T | authenticamd | genuineintel) ++ authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) +@@ -845,45 +874,81 @@ EOF + exit ;; + *:GNU:*:*) + # the GNU system +- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` ++ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland +- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu ++ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ aarch64_be:Linux:*:*) ++ UNAME_MACHINE=aarch64_be ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ arc:Linux:*:* | arceb:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else +- echo ${UNAME_MACHINE}-unknown-linux-gnueabi ++ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ ++ | grep -q __ARM_PCS_VFP ++ then ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi ++ else ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf ++ fi + fi + exit ;; + avr32*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) +- echo cris-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) +- echo crisv32-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) +- echo frv-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ hexagon:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ i*86:Linux:*:*) ++ echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build +@@ -901,123 +966,65 @@ EOF + #endif + #endif + EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^CPU/{ +- s: ::g +- p +- }'`" +- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` ++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; +- or32:Linux:*:*) +- echo or32-unknown-linux-gnu +- exit ;; +- ppc:Linux:*:*) +- echo powerpc-unknown-linux-gnu +- exit ;; +- ppc64:Linux:*:*) +- echo powerpc64-unknown-linux-gnu ++ or1k:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep -q ld.so.1 +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ or32:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) +- echo sparc-unknown-linux-gnu ++ echo sparc-unknown-linux-${LIBC} ++ exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +- PA7*) echo hppa1.1-unknown-linux-gnu ;; +- PA8*) echo hppa2.0-unknown-linux-gnu ;; +- *) echo hppa-unknown-linux-gnu ;; ++ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; ++ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; ++ *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-${LIBC} ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-${LIBC} ++ exit ;; ++ ppc64le:Linux:*:*) ++ echo powerpc64le-unknown-linux-${LIBC} ++ exit ;; ++ ppcle:Linux:*:*) ++ echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) +- echo ${UNAME_MACHINE}-ibm-linux ++ echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} ++ exit ;; ++ tile*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) +- echo ${UNAME_MACHINE}-dec-linux-gnu ++ echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) +- echo x86_64-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) +- echo ${UNAME_MACHINE}-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +- #ifdef __dietlibc__ +- LIBC=dietlibc +- #endif +-EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^LIBC/{ +- s: ::g +- p +- }'`" +- test x"${LIBC}" != x && { +- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" +- exit +- } +- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } +- ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both +@@ -1025,11 +1032,11 @@ EOF + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) +- # Unixware is an offshoot of SVR4, but it has its own version +- # number series starting with 2... +- # I am not positive that other SVR4 systems won't match this, ++ # Unixware is an offshoot of SVR4, but it has its own version ++ # number series starting with 2... ++ # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. +- # Use sysv4.2uw... so that sysv4* matches it. ++ # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) +@@ -1061,7 +1068,7 @@ EOF + fi + exit ;; + i*86:*:5:[678]*) +- # UnixWare 7.x, OpenUNIX and OpenServer 6. ++ # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; +@@ -1089,13 +1096,13 @@ EOF + exit ;; + pc:*:*:*) + # Left here for compatibility: +- # uname -m prints for DJGPP always 'pc', but it prints nothing about +- # the processor, so we play safe by assuming i586. ++ # uname -m prints for DJGPP always 'pc', but it prints nothing about ++ # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp +- exit ;; ++ exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; +@@ -1130,8 +1137,8 @@ EOF + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) +- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ +- && { echo i486-ncr-sysv4; exit; } ;; ++ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ++ && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ +@@ -1174,10 +1181,10 @@ EOF + echo ns32k-sni-sysv + fi + exit ;; +- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort +- # says +- echo i586-unisys-sysv4 +- exit ;; ++ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ++ # says ++ echo i586-unisys-sysv4 ++ exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm +@@ -1203,11 +1210,11 @@ EOF + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then +- echo mips-nec-sysv${UNAME_RELEASE} ++ echo mips-nec-sysv${UNAME_RELEASE} + else +- echo mips-unknown-sysv${UNAME_RELEASE} ++ echo mips-unknown-sysv${UNAME_RELEASE} + fi +- exit ;; ++ exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; +@@ -1220,6 +1227,9 @@ EOF + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; ++ x86_64:Haiku:*:*) ++ echo x86_64-unknown-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; +@@ -1246,13 +1256,31 @@ EOF + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown +- case $UNAME_PROCESSOR in +- i386) eval $set_cc_for_build +- if $CC_FOR_BUILD -E -dM -x c /dev/null | grep __LP64__>/dev/null 2>&1 ; then +- UNAME_PROCESSOR=x86_64 +- fi ;; +- unknown) UNAME_PROCESSOR=powerpc ;; +- esac ++ eval $set_cc_for_build ++ if test "$UNAME_PROCESSOR" = unknown ; then ++ UNAME_PROCESSOR=powerpc ++ fi ++ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ case $UNAME_PROCESSOR in ++ i386) UNAME_PROCESSOR=x86_64 ;; ++ powerpc) UNAME_PROCESSOR=powerpc64 ;; ++ esac ++ fi ++ fi ++ elif test "$UNAME_PROCESSOR" = i386 ; then ++ # Avoid executing cc on OS X 10.9, as it ships with a stub ++ # that puts up a graphical alert prompting to install ++ # developer tools. Any system running Mac OS X 10.7 or ++ # later (Darwin 11 and later) is required to have a 64-bit ++ # processor. This is not true of the ARM version of Darwin ++ # that Apple uses in portable devices. ++ UNAME_PROCESSOR=x86_64 ++ fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) +@@ -1266,7 +1294,10 @@ EOF + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; +- NSE-?:NONSTOP_KERNEL:*:*) ++ NEO-?:NONSTOP_KERNEL:*:*) ++ echo neo-tandem-nsk${UNAME_RELEASE} ++ exit ;; ++ NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) +@@ -1311,13 +1342,13 @@ EOF + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) +- echo mips-sei-seiux${UNAME_RELEASE} ++ echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) +- UNAME_MACHINE=`(uname -p) 2>/dev/null` ++ UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; +@@ -1335,158 +1366,10 @@ EOF + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; +-esac +- +-#echo '(No uname command or uname output not recognized.)' 1>&2 +-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +- +-eval $set_cc_for_build +-cat >$dummy.c < +-# include +-#endif +-main () +-{ +-#if defined (sony) +-#if defined (MIPSEB) +- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, +- I don't know.... */ +- printf ("mips-sony-bsd\n"); exit (0); +-#else +-#include +- printf ("m68k-sony-newsos%s\n", +-#ifdef NEWSOS4 +- "4" +-#else +- "" +-#endif +- ); exit (0); +-#endif +-#endif +- +-#if defined (__arm) && defined (__acorn) && defined (__unix) +- printf ("arm-acorn-riscix\n"); exit (0); +-#endif +- +-#if defined (hp300) && !defined (hpux) +- printf ("m68k-hp-bsd\n"); exit (0); +-#endif +- +-#if defined (NeXT) +-#if !defined (__ARCHITECTURE__) +-#define __ARCHITECTURE__ "m68k" +-#endif +- int version; +- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; +- if (version < 4) +- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); +- else +- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); +- exit (0); +-#endif +- +-#if defined (MULTIMAX) || defined (n16) +-#if defined (UMAXV) +- printf ("ns32k-encore-sysv\n"); exit (0); +-#else +-#if defined (CMU) +- printf ("ns32k-encore-mach\n"); exit (0); +-#else +- printf ("ns32k-encore-bsd\n"); exit (0); +-#endif +-#endif +-#endif +- +-#if defined (__386BSD__) +- printf ("i386-pc-bsd\n"); exit (0); +-#endif +- +-#if defined (sequent) +-#if defined (i386) +- printf ("i386-sequent-dynix\n"); exit (0); +-#endif +-#if defined (ns32000) +- printf ("ns32k-sequent-dynix\n"); exit (0); +-#endif +-#endif +- +-#if defined (_SEQUENT_) +- struct utsname un; +- +- uname(&un); +- +- if (strncmp(un.version, "V2", 2) == 0) { +- printf ("i386-sequent-ptx2\n"); exit (0); +- } +- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ +- printf ("i386-sequent-ptx1\n"); exit (0); +- } +- printf ("i386-sequent-ptx\n"); exit (0); +- +-#endif +- +-#if defined (vax) +-# if !defined (ultrix) +-# include +-# if defined (BSD) +-# if BSD == 43 +- printf ("vax-dec-bsd4.3\n"); exit (0); +-# else +-# if BSD == 199006 +- printf ("vax-dec-bsd4.3reno\n"); exit (0); +-# else +- printf ("vax-dec-bsd\n"); exit (0); +-# endif +-# endif +-# else +- printf ("vax-dec-bsd\n"); exit (0); +-# endif +-# else +- printf ("vax-dec-ultrix\n"); exit (0); +-# endif +-#endif +- +-#if defined (alliant) && defined (i860) +- printf ("i860-alliant-bsd\n"); exit (0); +-#endif +- +- exit (1); +-} +-EOF +- +-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && +- { echo "$SYSTEM_NAME"; exit; } +- +-# Apollos put the system type in the environment. +- +-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } +- +-# Convex versions that predate uname can use getsysinfo(1) +- +-if [ -x /usr/convex/getsysinfo ] +-then +- case `getsysinfo -f cpu_type` in +- c1*) +- echo c1-convex-bsd ++ x86_64:VMkernel:*:*) ++ echo ${UNAME_MACHINE}-unknown-esx + exit ;; +- c2*) +- if getsysinfo -f scalar_acc +- then echo c32-convex-bsd +- else echo c2-convex-bsd +- fi +- exit ;; +- c34*) +- echo c34-convex-bsd +- exit ;; +- c38*) +- echo c38-convex-bsd +- exit ;; +- c4*) +- echo c4-convex-bsd +- exit ;; +- esac +-fi ++esac + + cat >&2 <. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a + # configuration script generated by Autoconf, you may include it under +-# the same distribution terms that you use for the rest of that program. ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). + + +-# Please send patches to . Submit a context +-# diff and a properly formatted GNU ChangeLog entry. ++# Please send patches with a ChangeLog entry to config-patches@gnu.org. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. +@@ -75,8 +68,7 @@ Report bugs and patches to conftest.$ac_ext +@@ -1296,7 +1296,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; +- ppc64-*linux*|powerpc64-*linux*) ++ powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; ++ powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) +@@ -1315,7 +1318,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) +Index: mozilla-release/js/src/ctypes/libffi/configure +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/configure ++++ mozilla-release/js/src/ctypes/libffi/configure +@@ -6298,7 +6298,7 @@ ia64-*-hpux*) + rm -rf conftest* + ;; + +-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ ++x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ + s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +@@ -6316,7 +6316,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; +- ppc64-*linux*|powerpc64-*linux*) ++ powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; ++ powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) +@@ -6335,7 +6338,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) +Index: mozilla-release/js/src/ctypes/libffi/m4/libtool.m4 +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/m4/libtool.m4 ++++ mozilla-release/js/src/ctypes/libffi/m4/libtool.m4 +@@ -1267,7 +1267,7 @@ ia64-*-hpux*) + rm -rf conftest* + ;; + +-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ ++x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ + s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext +@@ -1281,7 +1281,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; +- ppc64-*linux*|powerpc64-*linux*) ++ powerpc64le-*linux*) ++ LD="${LD-ld} -m elf32lppclinux" ++ ;; ++ powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) +@@ -1300,7 +1303,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; +- ppc*-*linux*|powerpc*-*linux*) ++ powerpcle-*linux*) ++ LD="${LD-ld} -m elf64lppc" ++ ;; ++ powerpc-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*|s390*-*tpf*) +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ffi.c +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ffi.c ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ffi.c +@@ -1,7 +1,9 @@ + /* ----------------------------------------------------------------------- +- ffi.c - Copyright (c) 1998 Geoffrey Keating +- Copyright (C) 2007, 2008 Free Software Foundation, Inc +- Copyright (C) 2008 Red Hat, Inc ++ ffi.c - Copyright (C) 2011 Anthony Green ++ Copyright (C) 2011 Kyle Moffett ++ Copyright (C) 2008 Red Hat, Inc ++ Copyright (C) 2007, 2008 Free Software Foundation, Inc ++ Copyright (c) 1998 Geoffrey Keating + + PowerPC Foreign Function Interface + +@@ -39,32 +41,29 @@ enum { + /* The assembly depends on these exact flags. */ + FLAG_RETURNS_SMST = 1 << (31-31), /* Used for FFI_SYSV small structs. */ + FLAG_RETURNS_NOTHING = 1 << (31-30), /* These go in cr7 */ ++#ifndef __NO_FPRS__ + FLAG_RETURNS_FP = 1 << (31-29), ++#endif + FLAG_RETURNS_64BITS = 1 << (31-28), + + FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */ +- FLAG_SYSV_SMST_R4 = 1 << (31-26), /* use r4 for FFI_SYSV 8 byte +- structs. */ +- FLAG_SYSV_SMST_R3 = 1 << (31-25), /* use r3 for FFI_SYSV 4 byte +- structs. */ +- /* Bits (31-24) through (31-19) store shift value for SMST */ + + FLAG_ARG_NEEDS_COPY = 1 << (31- 7), ++ FLAG_ARG_NEEDS_PSAVE = FLAG_ARG_NEEDS_COPY, /* Used by ELFv2 */ ++#ifndef __NO_FPRS__ + FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */ ++#endif + FLAG_4_GPR_ARGUMENTS = 1 << (31- 5), + FLAG_RETVAL_REFERENCE = 1 << (31- 4) + }; + + /* About the SYSV ABI. */ +-unsigned int NUM_GPR_ARG_REGISTERS = 8; ++#define ASM_NEEDS_REGISTERS 4 ++#define NUM_GPR_ARG_REGISTERS 8 + #ifndef __NO_FPRS__ +-unsigned int NUM_FPR_ARG_REGISTERS = 8; +-#else +-unsigned int NUM_FPR_ARG_REGISTERS = 0; ++# define NUM_FPR_ARG_REGISTERS 8 + #endif + +-enum { ASM_NEEDS_REGISTERS = 4 }; +- + /* ffi_prep_args_SYSV is called by the assembly routine once stack space + has been allocated for the function's arguments. + +@@ -113,10 +112,12 @@ ffi_prep_args_SYSV (extended_cif *ecif, + valp gpr_base; + int intarg_count; + ++#ifndef __NO_FPRS__ + /* 'fpr_base' points at the space for fpr1, and grows upwards as + we use FPR registers. */ + valp fpr_base; + int fparg_count; ++#endif + + /* 'copy_space' grows down as we put structures in it. It should + stay 16-byte aligned. */ +@@ -125,9 +126,11 @@ ffi_prep_args_SYSV (extended_cif *ecif, + /* 'next_arg' grows up as we put parameters in it. */ + valp next_arg; + +- int i, ii MAYBE_UNUSED; ++ int i; + ffi_type **ptr; ++#ifndef __NO_FPRS__ + double double_tmp; ++#endif + union { + void **v; + char **c; +@@ -143,21 +146,22 @@ ffi_prep_args_SYSV (extended_cif *ecif, + size_t struct_copy_size; + unsigned gprvalue; + +- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) +- NUM_FPR_ARG_REGISTERS = 0; +- + stacktop.c = (char *) stack + bytes; + gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS; + intarg_count = 0; ++#ifndef __NO_FPRS__ + fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS; + fparg_count = 0; + copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c); ++#else ++ copy_space.c = gpr_base.c; ++#endif + next_arg.u = stack + 2; + + /* Check that everything starts aligned properly. */ +- FFI_ASSERT (((unsigned) (char *) stack & 0xF) == 0); +- FFI_ASSERT (((unsigned) copy_space.c & 0xF) == 0); +- FFI_ASSERT (((unsigned) stacktop.c & 0xF) == 0); ++ FFI_ASSERT (((unsigned long) (char *) stack & 0xF) == 0); ++ FFI_ASSERT (((unsigned long) copy_space.c & 0xF) == 0); ++ FFI_ASSERT (((unsigned long) stacktop.c & 0xF) == 0); + FFI_ASSERT ((bytes & 0xF) == 0); + FFI_ASSERT (copy_space.c >= next_arg.c); + +@@ -174,12 +178,28 @@ ffi_prep_args_SYSV (extended_cif *ecif, + i > 0; + i--, ptr++, p_argv.v++) + { +- switch ((*ptr)->type) +- { ++ unsigned short typenum = (*ptr)->type; ++ ++ /* We may need to handle some values depending on ABI */ ++ if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) { ++ if (typenum == FFI_TYPE_FLOAT) ++ typenum = FFI_TYPE_UINT32; ++ if (typenum == FFI_TYPE_DOUBLE) ++ typenum = FFI_TYPE_UINT64; ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_UINT128; ++ } else if (ecif->cif->abi != FFI_LINUX) { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_STRUCT; ++#endif ++ } ++ ++ /* Now test the translated value */ ++ switch (typenum) { ++#ifndef __NO_FPRS__ + case FFI_TYPE_FLOAT: + /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ +- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_float_prep; + double_tmp = **p_argv.f; + if (fparg_count >= NUM_FPR_ARG_REGISTERS) + { +@@ -195,8 +215,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, + + case FFI_TYPE_DOUBLE: + /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ +- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_double_prep; + double_tmp = **p_argv.d; + + if (fparg_count >= NUM_FPR_ARG_REGISTERS) +@@ -218,43 +236,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, + + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if ((ecif->cif->abi != FFI_LINUX) +- && (ecif->cif->abi != FFI_LINUX_SOFT_FLOAT)) +- goto do_struct; +- /* The soft float ABI for long doubles works like this, +- a long double is passed in four consecutive gprs if available. +- A maximum of 2 long doubles can be passed in gprs. +- If we do not have 4 gprs left, the long double is passed on the +- stack, 4-byte aligned. */ +- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) +- { +- unsigned int int_tmp = (*p_argv.ui)[0]; +- if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) +- { +- if (intarg_count < NUM_GPR_ARG_REGISTERS) +- intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; +- *next_arg.u = int_tmp; +- next_arg.u++; +- for (ii = 1; ii < 4; ii++) +- { +- int_tmp = (*p_argv.ui)[ii]; +- *next_arg.u = int_tmp; +- next_arg.u++; +- } +- } +- else +- { +- *gpr_base.u++ = int_tmp; +- for (ii = 1; ii < 4; ii++) +- { +- int_tmp = (*p_argv.ui)[ii]; +- *gpr_base.u++ = int_tmp; +- } +- } +- intarg_count +=4; +- } +- else +- { + double_tmp = (*p_argv.d)[0]; + + if (fparg_count >= NUM_FPR_ARG_REGISTERS - 1) +@@ -280,13 +261,40 @@ ffi_prep_args_SYSV (extended_cif *ecif, + + fparg_count += 2; + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); +- } + break; + #endif ++#endif /* have FPRs */ ++ ++ /* ++ * The soft float ABI for long doubles works like this, a long double ++ * is passed in four consecutive GPRs if available. A maximum of 2 ++ * long doubles can be passed in gprs. If we do not have 4 GPRs ++ * left, the long double is passed on the stack, 4-byte aligned. ++ */ ++ case FFI_TYPE_UINT128: { ++ unsigned int int_tmp = (*p_argv.ui)[0]; ++ unsigned int ii; ++ if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) { ++ if (intarg_count < NUM_GPR_ARG_REGISTERS) ++ intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; ++ *(next_arg.u++) = int_tmp; ++ for (ii = 1; ii < 4; ii++) { ++ int_tmp = (*p_argv.ui)[ii]; ++ *(next_arg.u++) = int_tmp; ++ } ++ } else { ++ *(gpr_base.u++) = int_tmp; ++ for (ii = 1; ii < 4; ii++) { ++ int_tmp = (*p_argv.ui)[ii]; ++ *(gpr_base.u++) = int_tmp; ++ } ++ } ++ intarg_count += 4; ++ break; ++ } + + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: +- soft_double_prep: + if (intarg_count == NUM_GPR_ARG_REGISTERS-1) + intarg_count++; + if (intarg_count >= NUM_GPR_ARG_REGISTERS) +@@ -319,9 +327,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, + break; + + case FFI_TYPE_STRUCT: +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- do_struct: +-#endif + struct_copy_size = ((*ptr)->size + 15) & ~0xF; + copy_space.c -= struct_copy_size; + memcpy (copy_space.c, *p_argv.c, (*ptr)->size); +@@ -349,7 +354,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, + case FFI_TYPE_UINT32: + case FFI_TYPE_SINT32: + case FFI_TYPE_POINTER: +- soft_float_prep: + + gprvalue = **p_argv.ui; + +@@ -366,8 +370,16 @@ ffi_prep_args_SYSV (extended_cif *ecif, + /* Check that we didn't overrun the stack... */ + FFI_ASSERT (copy_space.c >= next_arg.c); + FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS); ++ /* The assert below is testing that the number of integer arguments agrees ++ with the number found in ffi_prep_cif_machdep(). However, intarg_count ++ is incremented whenever we place an FP arg on the stack, so account for ++ that before our assert test. */ ++#ifndef __NO_FPRS__ ++ if (fparg_count > NUM_FPR_ARG_REGISTERS) ++ intarg_count -= fparg_count - NUM_FPR_ARG_REGISTERS; + FFI_ASSERT (fpr_base.u + <= stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); ++#endif + FFI_ASSERT (flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); + } + +@@ -378,6 +390,45 @@ enum { + }; + enum { ASM_NEEDS_REGISTERS64 = 4 }; + ++#if _CALL_ELF == 2 ++static unsigned int ++discover_homogeneous_aggregate (const ffi_type *t, unsigned int *elnum) ++{ ++ switch (t->type) ++ { ++ case FFI_TYPE_FLOAT: ++ case FFI_TYPE_DOUBLE: ++ *elnum = 1; ++ return (int) t->type; ++ ++ case FFI_TYPE_STRUCT:; ++ { ++ unsigned int base_elt = 0, total_elnum = 0; ++ ffi_type **el = t->elements; ++ while (*el) ++ { ++ unsigned int el_elt, el_elnum = 0; ++ el_elt = discover_homogeneous_aggregate (*el, &el_elnum); ++ if (el_elt == 0 ++ || (base_elt && base_elt != el_elt)) ++ return 0; ++ base_elt = el_elt; ++ total_elnum += el_elnum; ++ if (total_elnum > 8) ++ return 0; ++ el++; ++ } ++ *elnum = total_elnum; ++ return base_elt; ++ } ++ ++ default: ++ return 0; ++ } ++} ++#endif ++ ++ + /* ffi_prep_args64 is called by the assembly routine once stack space + has been allocated for the function's arguments. + +@@ -423,6 +474,7 @@ ffi_prep_args64 (extended_cif *ecif, uns + unsigned long *ul; + float *f; + double *d; ++ size_t p; + } valp; + + /* 'stacktop' points at the previous backchain pointer. */ +@@ -438,9 +490,9 @@ ffi_prep_args64 (extended_cif *ecif, uns + /* 'fpr_base' points at the space for fpr3, and grows upwards as + we use FPR registers. */ + valp fpr_base; +- int fparg_count; ++ unsigned int fparg_count; + +- int i, words; ++ unsigned int i, words, nargs, nfixedargs; + ffi_type **ptr; + double double_tmp; + union { +@@ -457,11 +509,18 @@ ffi_prep_args64 (extended_cif *ecif, uns + double **d; + } p_argv; + unsigned long gprvalue; ++#ifdef __STRUCT_PARM_ALIGN__ ++ unsigned long align; ++#endif + + stacktop.c = (char *) stack + bytes; + gpr_base.ul = stacktop.ul - ASM_NEEDS_REGISTERS64 - NUM_GPR_ARG_REGISTERS64; + gpr_end.ul = gpr_base.ul + NUM_GPR_ARG_REGISTERS64; ++#if _CALL_ELF == 2 ++ rest.ul = stack + 4 + NUM_GPR_ARG_REGISTERS64; ++#else + rest.ul = stack + 6 + NUM_GPR_ARG_REGISTERS64; ++#endif + fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS64; + fparg_count = 0; + next_arg.ul = gpr_base.ul; +@@ -477,30 +536,36 @@ ffi_prep_args64 (extended_cif *ecif, uns + + /* Now for the arguments. */ + p_argv.v = ecif->avalue; +- for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs; +- i > 0; +- i--, ptr++, p_argv.v++) ++ nargs = ecif->cif->nargs; ++ nfixedargs = ecif->cif->nfixedargs; ++ for (ptr = ecif->cif->arg_types, i = 0; ++ i < nargs; ++ i++, ptr++, p_argv.v++) + { ++ unsigned int elt, elnum; ++ + switch ((*ptr)->type) + { + case FFI_TYPE_FLOAT: + double_tmp = **p_argv.f; +- *next_arg.f = (float) double_tmp; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.f = (float) double_tmp; + if (++next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; +- if (fparg_count < NUM_FPR_ARG_REGISTERS64) +- *fpr_base.d++ = double_tmp; + fparg_count++; + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); + break; + + case FFI_TYPE_DOUBLE: + double_tmp = **p_argv.d; +- *next_arg.d = double_tmp; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.d = double_tmp; + if (++next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; +- if (fparg_count < NUM_FPR_ARG_REGISTERS64) +- *fpr_base.d++ = double_tmp; + fparg_count++; + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); + break; +@@ -508,18 +573,20 @@ ffi_prep_args64 (extended_cif *ecif, uns + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: + double_tmp = (*p_argv.d)[0]; +- *next_arg.d = double_tmp; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.d = double_tmp; + if (++next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; +- if (fparg_count < NUM_FPR_ARG_REGISTERS64) +- *fpr_base.d++ = double_tmp; + fparg_count++; + double_tmp = (*p_argv.d)[1]; +- *next_arg.d = double_tmp; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.d = double_tmp; + if (++next_arg.ul == gpr_end.ul) + next_arg.ul = rest.ul; +- if (fparg_count < NUM_FPR_ARG_REGISTERS64) +- *fpr_base.d++ = double_tmp; + fparg_count++; + FFI_ASSERT (__LDBL_MANT_DIG__ == 106); + FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); +@@ -527,27 +594,86 @@ ffi_prep_args64 (extended_cif *ecif, uns + #endif + + case FFI_TYPE_STRUCT: +- words = ((*ptr)->size + 7) / 8; +- if (next_arg.ul >= gpr_base.ul && next_arg.ul + words > gpr_end.ul) ++#ifdef __STRUCT_PARM_ALIGN__ ++ align = (*ptr)->alignment; ++ if (align > __STRUCT_PARM_ALIGN__) ++ align = __STRUCT_PARM_ALIGN__; ++ if (align > 1) ++ next_arg.p = ALIGN (next_arg.p, align); ++#endif ++ elt = 0; ++#if _CALL_ELF == 2 ++ elt = discover_homogeneous_aggregate (*ptr, &elnum); ++#endif ++ if (elt) + { +- size_t first = gpr_end.c - next_arg.c; +- memcpy (next_arg.c, *p_argv.c, first); +- memcpy (rest.c, *p_argv.c + first, (*ptr)->size - first); +- next_arg.c = rest.c + words * 8 - first; ++ union { ++ void *v; ++ float *f; ++ double *d; ++ } arg; ++ ++ arg.v = *p_argv.v; ++ if (elt == FFI_TYPE_FLOAT) ++ { ++ do ++ { ++ double_tmp = *arg.f++; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 ++ && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.f = (float) double_tmp; ++ if (++next_arg.f == gpr_end.f) ++ next_arg.f = rest.f; ++ fparg_count++; ++ } ++ while (--elnum != 0); ++ if ((next_arg.p & 3) != 0) ++ { ++ if (++next_arg.f == gpr_end.f) ++ next_arg.f = rest.f; ++ } ++ } ++ else ++ do ++ { ++ double_tmp = *arg.d++; ++ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) ++ *fpr_base.d++ = double_tmp; ++ else ++ *next_arg.d = double_tmp; ++ if (++next_arg.d == gpr_end.d) ++ next_arg.d = rest.d; ++ fparg_count++; ++ } ++ while (--elnum != 0); + } + else + { +- char *where = next_arg.c; +- +- /* Structures with size less than eight bytes are passed +- left-padded. */ +- if ((*ptr)->size < 8) +- where += 8 - (*ptr)->size; ++ words = ((*ptr)->size + 7) / 8; ++ if (next_arg.ul >= gpr_base.ul && next_arg.ul + words > gpr_end.ul) ++ { ++ size_t first = gpr_end.c - next_arg.c; ++ memcpy (next_arg.c, *p_argv.c, first); ++ memcpy (rest.c, *p_argv.c + first, (*ptr)->size - first); ++ next_arg.c = rest.c + words * 8 - first; ++ } ++ else ++ { ++ char *where = next_arg.c; + +- memcpy (where, *p_argv.c, (*ptr)->size); +- next_arg.ul += words; +- if (next_arg.ul == gpr_end.ul) +- next_arg.ul = rest.ul; ++#ifndef __LITTLE_ENDIAN__ ++ /* Structures with size less than eight bytes are passed ++ left-padded. */ ++ if ((*ptr)->size < 8) ++ where += 8 - (*ptr)->size; ++#endif ++ memcpy (where, *p_argv.c, (*ptr)->size); ++ next_arg.ul += words; ++ if (next_arg.ul == gpr_end.ul) ++ next_arg.ul = rest.ul; ++ } + } + break; + +@@ -591,27 +717,22 @@ ffi_prep_args64 (extended_cif *ecif, uns + + + /* Perform machine dependent cif processing */ +-ffi_status +-ffi_prep_cif_machdep (ffi_cif *cif) ++static ffi_status ++ffi_prep_cif_machdep_core (ffi_cif *cif) + { + /* All this is for the SYSV and LINUX64 ABI. */ +- int i; + ffi_type **ptr; + unsigned bytes; +- int fparg_count = 0, intarg_count = 0; +- unsigned flags = 0; ++ unsigned i, fparg_count = 0, intarg_count = 0; ++ unsigned flags = cif->flags; + unsigned struct_copy_size = 0; + unsigned type = cif->rtype->type; + unsigned size = cif->rtype->size; + +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- NUM_FPR_ARG_REGISTERS = 0; +- ++ /* The machine-independent calculation of cif->bytes doesn't work ++ for us. Redo the calculation. */ + if (cif->abi != FFI_LINUX64) + { +- /* All the machine-independent calculation of cif->bytes will be wrong. +- Redo the calculation for SYSV. */ +- + /* Space for the frame pointer, callee's LR, and the asm's temp regs. */ + bytes = (2 + ASM_NEEDS_REGISTERS) * sizeof (int); + +@@ -621,13 +742,20 @@ ffi_prep_cif_machdep (ffi_cif *cif) + else + { + /* 64-bit ABI. */ ++#if _CALL_ELF == 2 ++ /* Space for backchain, CR, LR, TOC and the asm's temp regs. */ ++ bytes = (4 + ASM_NEEDS_REGISTERS64) * sizeof (long); + ++ /* Space for the general registers. */ ++ bytes += NUM_GPR_ARG_REGISTERS64 * sizeof (long); ++#else + /* Space for backchain, CR, LR, cc/ld doubleword, TOC and the asm's temp + regs. */ + bytes = (6 + ASM_NEEDS_REGISTERS64) * sizeof (long); + + /* Space for the mandatory parm save area and general registers. */ + bytes += 2 * NUM_GPR_ARG_REGISTERS64 * sizeof (long); ++#endif + } + + /* Return value handling. The rules for SYSV are as follows: +@@ -646,13 +774,30 @@ ffi_prep_cif_machdep (ffi_cif *cif) + - Single/double FP values in fpr1, long double in fpr1,fpr2. + - soft-float float/doubles are treated as UINT32/UINT64 respectivley. + - soft-float long doubles are returned in gpr3-gpr6. */ ++ /* First translate for softfloat/nonlinux */ ++ if (cif->abi == FFI_LINUX_SOFT_FLOAT) ++ { ++ if (type == FFI_TYPE_FLOAT) ++ type = FFI_TYPE_UINT32; ++ if (type == FFI_TYPE_DOUBLE) ++ type = FFI_TYPE_UINT64; ++ if (type == FFI_TYPE_LONGDOUBLE) ++ type = FFI_TYPE_UINT128; ++ } ++ else if (cif->abi != FFI_LINUX ++ && cif->abi != FFI_LINUX64) ++ { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (type == FFI_TYPE_LONGDOUBLE) ++ type = FFI_TYPE_STRUCT; ++#endif ++ } ++ + switch (type) + { ++#ifndef __NO_FPRS__ + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64 +- && cif->abi != FFI_LINUX_SOFT_FLOAT) +- goto byref; + flags |= FLAG_RETURNS_128BITS; + /* Fall through. */ + #endif +@@ -660,47 +805,52 @@ ffi_prep_cif_machdep (ffi_cif *cif) + flags |= FLAG_RETURNS_64BITS; + /* Fall through. */ + case FFI_TYPE_FLOAT: +- /* With FFI_LINUX_SOFT_FLOAT no fp registers are used. */ +- if (cif->abi != FFI_LINUX_SOFT_FLOAT) +- flags |= FLAG_RETURNS_FP; ++ flags |= FLAG_RETURNS_FP; + break; ++#endif + ++ case FFI_TYPE_UINT128: ++ flags |= FLAG_RETURNS_128BITS; ++ /* Fall through. */ + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: + flags |= FLAG_RETURNS_64BITS; + break; + + case FFI_TYPE_STRUCT: +- if (cif->abi == FFI_SYSV) ++ /* ++ * The final SYSV ABI says that structures smaller or equal 8 bytes ++ * are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them ++ * in memory. ++ * ++ * NOTE: The assembly code can safely assume that it just needs to ++ * store both r3 and r4 into a 8-byte word-aligned buffer, as ++ * we allocate a temporary buffer in ffi_call() if this flag is ++ * set. ++ */ ++ if (cif->abi == FFI_SYSV && size <= 8) + { +- /* The final SYSV ABI says that structures smaller or equal 8 bytes +- are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them +- in memory. */ +- +- /* Treat structs with size <= 8 bytes. */ +- if (size <= 8) ++ flags |= FLAG_RETURNS_SMST; ++ break; ++ } ++#if _CALL_ELF == 2 ++ if (cif->abi == FFI_LINUX64) ++ { ++ unsigned int elt, elnum; ++ elt = discover_homogeneous_aggregate (cif->rtype, &elnum); ++ if (elt) ++ { ++ if (elt == FFI_TYPE_DOUBLE) ++ flags |= FLAG_RETURNS_64BITS; ++ flags |= FLAG_RETURNS_FP | FLAG_RETURNS_SMST; ++ break; ++ } ++ if (size <= 16) + { + flags |= FLAG_RETURNS_SMST; +- /* These structs are returned in r3. We pack the type and the +- precalculated shift value (needed in the sysv.S) into flags. +- The same applies for the structs returned in r3/r4. */ +- if (size <= 4) +- { +- flags |= FLAG_SYSV_SMST_R3; +- flags |= 8 * (4 - size) << 8; +- break; +- } +- /* These structs are returned in r3 and r4. See above. */ +- if (size <= 8) +- { +- flags |= FLAG_SYSV_SMST_R3 | FLAG_SYSV_SMST_R4; +- flags |= 8 * (8 - size) << 8; +- break; +- } ++ break; + } + } +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- byref: + #endif + intarg_count++; + flags |= FLAG_RETVAL_REFERENCE; +@@ -722,39 +872,36 @@ ffi_prep_cif_machdep (ffi_cif *cif) + Stuff on the stack needs to keep proper alignment. */ + for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) + { +- switch ((*ptr)->type) +- { ++ unsigned short typenum = (*ptr)->type; ++ ++ /* We may need to handle some values depending on ABI */ ++ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { ++ if (typenum == FFI_TYPE_FLOAT) ++ typenum = FFI_TYPE_UINT32; ++ if (typenum == FFI_TYPE_DOUBLE) ++ typenum = FFI_TYPE_UINT64; ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_UINT128; ++ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_STRUCT; ++#endif ++ } ++ ++ switch (typenum) { ++#ifndef __NO_FPRS__ + case FFI_TYPE_FLOAT: +- /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_float_cif; + fparg_count++; + /* floating singles are not 8-aligned on stack */ + break; + + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) +- goto do_struct; +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- { +- if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 +- || intarg_count < NUM_GPR_ARG_REGISTERS) +- /* A long double in FFI_LINUX_SOFT_FLOAT can use only +- a set of four consecutive gprs. If we have not enough, +- we have to adjust the intarg_count value. */ +- intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; +- intarg_count += 4; +- break; +- } +- else +- fparg_count++; ++ fparg_count++; + /* Fall thru */ + #endif + case FFI_TYPE_DOUBLE: +- /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_double_cif; + fparg_count++; + /* If this FP arg is going on the stack, it must be + 8-byte-aligned. */ +@@ -763,10 +910,21 @@ ffi_prep_cif_machdep (ffi_cif *cif) + && intarg_count % 2 != 0) + intarg_count++; + break; ++#endif ++ case FFI_TYPE_UINT128: ++ /* ++ * A long double in FFI_LINUX_SOFT_FLOAT can use only a set ++ * of four consecutive gprs. If we do not have enough, we ++ * have to adjust the intarg_count value. ++ */ ++ if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 ++ && intarg_count < NUM_GPR_ARG_REGISTERS) ++ intarg_count = NUM_GPR_ARG_REGISTERS; ++ intarg_count += 4; ++ break; + + case FFI_TYPE_UINT64: + case FFI_TYPE_SINT64: +- soft_double_cif: + /* 'long long' arguments are passed as two words, but + either both words must fit in registers or both go + on the stack. If they go on the stack, they must +@@ -783,9 +941,6 @@ ffi_prep_cif_machdep (ffi_cif *cif) + break; + + case FFI_TYPE_STRUCT: +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- do_struct: +-#endif + /* We must allocate space for a copy of these to enforce + pass-by-value. Pad the space up to a multiple of 16 + bytes (the maximum alignment required for anything under +@@ -793,50 +948,100 @@ ffi_prep_cif_machdep (ffi_cif *cif) + struct_copy_size += ((*ptr)->size + 15) & ~0xF; + /* Fall through (allocate space for the pointer). */ + +- default: +- soft_float_cif: ++ case FFI_TYPE_POINTER: ++ case FFI_TYPE_INT: ++ case FFI_TYPE_UINT32: ++ case FFI_TYPE_SINT32: ++ case FFI_TYPE_UINT16: ++ case FFI_TYPE_SINT16: ++ case FFI_TYPE_UINT8: ++ case FFI_TYPE_SINT8: + /* Everything else is passed as a 4-byte word in a GPR, either + the object itself or a pointer to it. */ + intarg_count++; + break; ++ default: ++ FFI_ASSERT (0); + } + } + else + for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) + { ++ unsigned int elt, elnum; ++#ifdef __STRUCT_PARM_ALIGN__ ++ unsigned int align; ++#endif ++ + switch ((*ptr)->type) + { + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- intarg_count += 4; +- else +- { +- fparg_count += 2; +- intarg_count += 2; +- } ++ fparg_count += 2; ++ intarg_count += 2; ++ if (fparg_count > NUM_FPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; + break; + #endif + case FFI_TYPE_FLOAT: + case FFI_TYPE_DOUBLE: + fparg_count++; + intarg_count++; ++ if (fparg_count > NUM_FPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; + break; + + case FFI_TYPE_STRUCT: ++#ifdef __STRUCT_PARM_ALIGN__ ++ align = (*ptr)->alignment; ++ if (align > __STRUCT_PARM_ALIGN__) ++ align = __STRUCT_PARM_ALIGN__; ++ align = align / 8; ++ if (align > 1) ++ intarg_count = ALIGN (intarg_count, align); ++#endif + intarg_count += ((*ptr)->size + 7) / 8; ++ elt = 0; ++#if _CALL_ELF == 2 ++ elt = discover_homogeneous_aggregate (*ptr, &elnum); ++#endif ++ if (elt) ++ { ++ fparg_count += elnum; ++ if (fparg_count > NUM_FPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; ++ } ++ else ++ { ++ if (intarg_count > NUM_GPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; ++ } + break; + +- default: ++ case FFI_TYPE_POINTER: ++ case FFI_TYPE_UINT64: ++ case FFI_TYPE_SINT64: ++ case FFI_TYPE_INT: ++ case FFI_TYPE_UINT32: ++ case FFI_TYPE_SINT32: ++ case FFI_TYPE_UINT16: ++ case FFI_TYPE_SINT16: ++ case FFI_TYPE_UINT8: ++ case FFI_TYPE_SINT8: + /* Everything else is passed as a 8-byte word in a GPR, either + the object itself or a pointer to it. */ + intarg_count++; ++ if (intarg_count > NUM_GPR_ARG_REGISTERS64) ++ flags |= FLAG_ARG_NEEDS_PSAVE; + break; ++ default: ++ FFI_ASSERT (0); + } + } + ++#ifndef __NO_FPRS__ + if (fparg_count != 0) + flags |= FLAG_FP_ARGUMENTS; ++#endif + if (intarg_count > 4) + flags |= FLAG_4_GPR_ARGUMENTS; + if (struct_copy_size != 0) +@@ -844,25 +1049,36 @@ ffi_prep_cif_machdep (ffi_cif *cif) + + if (cif->abi != FFI_LINUX64) + { ++#ifndef __NO_FPRS__ + /* Space for the FPR registers, if needed. */ + if (fparg_count != 0) + bytes += NUM_FPR_ARG_REGISTERS * sizeof (double); ++#endif + + /* Stack space. */ + if (intarg_count > NUM_GPR_ARG_REGISTERS) + bytes += (intarg_count - NUM_GPR_ARG_REGISTERS) * sizeof (int); ++#ifndef __NO_FPRS__ + if (fparg_count > NUM_FPR_ARG_REGISTERS) + bytes += (fparg_count - NUM_FPR_ARG_REGISTERS) * sizeof (double); ++#endif + } + else + { ++#ifndef __NO_FPRS__ + /* Space for the FPR registers, if needed. */ + if (fparg_count != 0) + bytes += NUM_FPR_ARG_REGISTERS64 * sizeof (double); ++#endif + + /* Stack space. */ ++#if _CALL_ELF == 2 ++ if ((flags & FLAG_ARG_NEEDS_PSAVE) != 0) ++ bytes += intarg_count * sizeof (long); ++#else + if (intarg_count > NUM_GPR_ARG_REGISTERS64) + bytes += (intarg_count - NUM_GPR_ARG_REGISTERS64) * sizeof (long); ++#endif + } + + /* The stack space allocated needs to be a multiple of 16 bytes. */ +@@ -877,6 +1093,26 @@ ffi_prep_cif_machdep (ffi_cif *cif) + return FFI_OK; + } + ++ffi_status ++ffi_prep_cif_machdep (ffi_cif *cif) ++{ ++ cif->nfixedargs = cif->nargs; ++ return ffi_prep_cif_machdep_core (cif); ++} ++ ++ffi_status ++ffi_prep_cif_machdep_var (ffi_cif *cif, ++ unsigned int nfixedargs, ++ unsigned int ntotalargs MAYBE_UNUSED) ++{ ++ cif->nfixedargs = nfixedargs; ++#if _CALL_ELF == 2 ++ if (cif->abi == FFI_LINUX64) ++ cif->flags |= FLAG_ARG_NEEDS_PSAVE; ++#endif ++ return ffi_prep_cif_machdep_core (cif); ++} ++ + extern void ffi_call_SYSV(extended_cif *, unsigned, unsigned, unsigned *, + void (*fn)(void)); + extern void FFI_HIDDEN ffi_call_LINUX64(extended_cif *, unsigned long, +@@ -886,28 +1122,39 @@ extern void FFI_HIDDEN ffi_call_LINUX64( + void + ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) + { ++ /* ++ * The final SYSV ABI says that structures smaller or equal 8 bytes ++ * are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them ++ * in memory. ++ * ++ * We bounce-buffer SYSV small struct return values so that sysv.S ++ * can write r3 and r4 to memory without worrying about struct size. ++ * ++ * For ELFv2 ABI, use a bounce buffer for homogeneous structs too, ++ * for similar reasons. ++ */ ++ unsigned long smst_buffer[8]; + extended_cif ecif; + + ecif.cif = cif; + ecif.avalue = avalue; + +- /* If the return value is a struct and we don't have a return */ +- /* value address then we need to make one */ +- +- if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) +- { +- ecif.rvalue = alloca(cif->rtype->size); +- } +- else +- ecif.rvalue = rvalue; +- ++ ecif.rvalue = rvalue; ++ if ((cif->flags & FLAG_RETURNS_SMST) != 0) ++ ecif.rvalue = smst_buffer; ++ /* Ensure that we have a valid struct return value. ++ FIXME: Isn't this just papering over a user problem? */ ++ else if (!rvalue && cif->rtype->type == FFI_TYPE_STRUCT) ++ ecif.rvalue = alloca (cif->rtype->size); + + switch (cif->abi) + { + #ifndef POWERPC64 ++# ifndef __NO_FPRS__ + case FFI_SYSV: + case FFI_GCC_SYSV: + case FFI_LINUX: ++# endif + case FFI_LINUX_SOFT_FLOAT: + ffi_call_SYSV (&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn); + break; +@@ -920,10 +1167,29 @@ ffi_call(ffi_cif *cif, void (*fn)(void), + FFI_ASSERT (0); + break; + } ++ ++ /* Check for a bounce-buffered return value */ ++ if (rvalue && ecif.rvalue == smst_buffer) ++ { ++ unsigned int rsize = cif->rtype->size; ++#ifndef __LITTLE_ENDIAN__ ++ /* The SYSV ABI returns a structure of up to 4 bytes in size ++ left-padded in r3. */ ++ if (cif->abi == FFI_SYSV && rsize <= 4) ++ memcpy (rvalue, (char *) smst_buffer + 4 - rsize, rsize); ++ /* The SYSV ABI returns a structure of up to 8 bytes in size ++ left-padded in r3/r4, and the ELFv2 ABI similarly returns a ++ structure of up to 8 bytes in size left-padded in r3. */ ++ else if (rsize <= 8) ++ memcpy (rvalue, (char *) smst_buffer + 8 - rsize, rsize); ++ else ++#endif ++ memcpy (rvalue, smst_buffer, rsize); ++ } + } + + +-#ifndef POWERPC64 ++#if !defined POWERPC64 || _CALL_ELF == 2 + #define MIN_CACHE_LINE_SIZE 8 + + static void +@@ -947,16 +1213,38 @@ ffi_prep_closure_loc (ffi_closure *closu + void *codeloc) + { + #ifdef POWERPC64 ++# if _CALL_ELF == 2 ++ unsigned int *tramp = (unsigned int *) &closure->tramp[0]; ++ ++ if (cif->abi != FFI_LINUX64) ++ return FFI_BAD_ABI; ++ ++ tramp[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */ ++ tramp[1] = 0xe98c0010; /* ld 12,1f-0b(12) */ ++ tramp[2] = 0x7d8903a6; /* mtctr 12 */ ++ tramp[3] = 0x4e800420; /* bctr */ ++ /* 1: .quad function_addr */ ++ /* 2: .quad context */ ++ *(void **) &tramp[4] = (void *) ffi_closure_LINUX64; ++ *(void **) &tramp[6] = codeloc; ++ flush_icache ((char *)tramp, (char *)codeloc, FFI_TRAMPOLINE_SIZE); ++# else + void **tramp = (void **) &closure->tramp[0]; + +- FFI_ASSERT (cif->abi == FFI_LINUX64); ++ if (cif->abi != FFI_LINUX64) ++ return FFI_BAD_ABI; + /* Copy function address and TOC from ffi_closure_LINUX64. */ + memcpy (tramp, (char *) ffi_closure_LINUX64, 16); + tramp[2] = codeloc; ++# endif + #else + unsigned int *tramp; + +- FFI_ASSERT (cif->abi == FFI_GCC_SYSV || cif->abi == FFI_SYSV); ++ if (! (cif->abi == FFI_GCC_SYSV ++ || cif->abi == FFI_SYSV ++ || cif->abi == FFI_LINUX ++ || cif->abi == FFI_LINUX_SOFT_FLOAT)) ++ return FFI_BAD_ABI; + + tramp = (unsigned int *) &closure->tramp[0]; + tramp[0] = 0x7c0802a6; /* mflr r0 */ +@@ -1011,32 +1299,38 @@ ffi_closure_helper_SYSV (ffi_closure *cl + void ** avalue; + ffi_type ** arg_types; + long i, avn; +- long nf; /* number of floating registers already used */ +- long ng; /* number of general registers already used */ +- ffi_cif * cif; +- double temp; +- unsigned size; ++#ifndef __NO_FPRS__ ++ long nf = 0; /* number of floating registers already used */ ++#endif ++ long ng = 0; /* number of general registers already used */ ++ ++ ffi_cif *cif = closure->cif; ++ unsigned size = cif->rtype->size; ++ unsigned short rtypenum = cif->rtype->type; + +- cif = closure->cif; + avalue = alloca (cif->nargs * sizeof (void *)); +- size = cif->rtype->size; + +- nf = 0; +- ng = 0; ++ /* First translate for softfloat/nonlinux */ ++ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { ++ if (rtypenum == FFI_TYPE_FLOAT) ++ rtypenum = FFI_TYPE_UINT32; ++ if (rtypenum == FFI_TYPE_DOUBLE) ++ rtypenum = FFI_TYPE_UINT64; ++ if (rtypenum == FFI_TYPE_LONGDOUBLE) ++ rtypenum = FFI_TYPE_UINT128; ++ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (rtypenum == FFI_TYPE_LONGDOUBLE) ++ rtypenum = FFI_TYPE_STRUCT; ++#endif ++ } ++ + + /* Copy the caller's structure return value address so that the closure + returns the data directly to the caller. + For FFI_SYSV the result is passed in r3/r4 if the struct size is less + or equal 8 bytes. */ +- +- if ((cif->rtype->type == FFI_TYPE_STRUCT +- && !((cif->abi == FFI_SYSV) && (size <= 8))) +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- || (cif->rtype->type == FFI_TYPE_LONGDOUBLE +- && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) +-#endif +- ) +- { ++ if (rtypenum == FFI_TYPE_STRUCT && ((cif->abi != FFI_SYSV) || (size > 8))) { + rvalue = (void *) *pgr; + ng++; + pgr++; +@@ -1047,12 +1341,112 @@ ffi_closure_helper_SYSV (ffi_closure *cl + arg_types = cif->arg_types; + + /* Grab the addresses of the arguments from the stack frame. */ +- while (i < avn) +- { +- switch (arg_types[i]->type) +- { ++ while (i < avn) { ++ unsigned short typenum = arg_types[i]->type; ++ ++ /* We may need to handle some values depending on ABI */ ++ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { ++ if (typenum == FFI_TYPE_FLOAT) ++ typenum = FFI_TYPE_UINT32; ++ if (typenum == FFI_TYPE_DOUBLE) ++ typenum = FFI_TYPE_UINT64; ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_UINT128; ++ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ if (typenum == FFI_TYPE_LONGDOUBLE) ++ typenum = FFI_TYPE_STRUCT; ++#endif ++ } ++ ++ switch (typenum) { ++#ifndef __NO_FPRS__ ++ case FFI_TYPE_FLOAT: ++ /* unfortunately float values are stored as doubles ++ * in the ffi_closure_SYSV code (since we don't check ++ * the type in that routine). ++ */ ++ ++ /* there are 8 64bit floating point registers */ ++ ++ if (nf < 8) ++ { ++ double temp = pfr->d; ++ pfr->f = (float) temp; ++ avalue[i] = pfr; ++ nf++; ++ pfr++; ++ } ++ else ++ { ++ /* FIXME? here we are really changing the values ++ * stored in the original calling routines outgoing ++ * parameter stack. This is probably a really ++ * naughty thing to do but... ++ */ ++ avalue[i] = pst; ++ pst += 1; ++ } ++ break; ++ ++ case FFI_TYPE_DOUBLE: ++ /* On the outgoing stack all values are aligned to 8 */ ++ /* there are 8 64bit floating point registers */ ++ ++ if (nf < 8) ++ { ++ avalue[i] = pfr; ++ nf++; ++ pfr++; ++ } ++ else ++ { ++ if (((long) pst) & 4) ++ pst++; ++ avalue[i] = pst; ++ pst += 2; ++ } ++ break; ++ ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE ++ case FFI_TYPE_LONGDOUBLE: ++ if (nf < 7) ++ { ++ avalue[i] = pfr; ++ pfr += 2; ++ nf += 2; ++ } ++ else ++ { ++ if (((long) pst) & 4) ++ pst++; ++ avalue[i] = pst; ++ pst += 4; ++ nf = 8; ++ } ++ break; ++#endif ++#endif /* have FPRS */ ++ ++ case FFI_TYPE_UINT128: ++ /* ++ * Test if for the whole long double, 4 gprs are available. ++ * otherwise the stuff ends up on the stack. ++ */ ++ if (ng < 5) { ++ avalue[i] = pgr; ++ pgr += 4; ++ ng += 4; ++ } else { ++ avalue[i] = pst; ++ pst += 4; ++ ng = 8+4; ++ } ++ break; ++ + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: ++#ifndef __LITTLE_ENDIAN__ + /* there are 8 gpr registers used to pass values */ + if (ng < 8) + { +@@ -1066,9 +1460,11 @@ ffi_closure_helper_SYSV (ffi_closure *cl + pst++; + } + break; ++#endif + + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: ++#ifndef __LITTLE_ENDIAN__ + /* there are 8 gpr registers used to pass values */ + if (ng < 8) + { +@@ -1082,11 +1478,11 @@ ffi_closure_helper_SYSV (ffi_closure *cl + pst++; + } + break; ++#endif + + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: + case FFI_TYPE_POINTER: +- soft_float_closure: + /* there are 8 gpr registers used to pass values */ + if (ng < 8) + { +@@ -1102,9 +1498,6 @@ ffi_closure_helper_SYSV (ffi_closure *cl + break; + + case FFI_TYPE_STRUCT: +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- do_struct: +-#endif + /* Structs are passed by reference. The address will appear in a + gpr if it is one of the first 8 arguments. */ + if (ng < 8) +@@ -1122,7 +1515,6 @@ ffi_closure_helper_SYSV (ffi_closure *cl + + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: +- soft_double_closure: + /* passing long long ints are complex, they must + * be passed in suitable register pairs such as + * (r3,r4) or (r5,r6) or (r6,r7), or (r7,r8) or (r9,r10) +@@ -1154,99 +1546,8 @@ ffi_closure_helper_SYSV (ffi_closure *cl + } + break; + +- case FFI_TYPE_FLOAT: +- /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_float_closure; +- /* unfortunately float values are stored as doubles +- * in the ffi_closure_SYSV code (since we don't check +- * the type in that routine). +- */ +- +- /* there are 8 64bit floating point registers */ +- +- if (nf < 8) +- { +- temp = pfr->d; +- pfr->f = (float) temp; +- avalue[i] = pfr; +- nf++; +- pfr++; +- } +- else +- { +- /* FIXME? here we are really changing the values +- * stored in the original calling routines outgoing +- * parameter stack. This is probably a really +- * naughty thing to do but... +- */ +- avalue[i] = pst; +- pst += 1; +- } +- break; +- +- case FFI_TYPE_DOUBLE: +- /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- goto soft_double_closure; +- /* On the outgoing stack all values are aligned to 8 */ +- /* there are 8 64bit floating point registers */ +- +- if (nf < 8) +- { +- avalue[i] = pfr; +- nf++; +- pfr++; +- } +- else +- { +- if (((long) pst) & 4) +- pst++; +- avalue[i] = pst; +- pst += 2; +- } +- break; +- +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- case FFI_TYPE_LONGDOUBLE: +- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) +- goto do_struct; +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- { /* Test if for the whole long double, 4 gprs are available. +- otherwise the stuff ends up on the stack. */ +- if (ng < 5) +- { +- avalue[i] = pgr; +- pgr += 4; +- ng += 4; +- } +- else +- { +- avalue[i] = pst; +- pst += 4; +- ng = 8; +- } +- break; +- } +- if (nf < 7) +- { +- avalue[i] = pfr; +- pfr += 2; +- nf += 2; +- } +- else +- { +- if (((long) pst) & 4) +- pst++; +- avalue[i] = pst; +- pst += 4; +- nf = 8; +- } +- break; +-#endif +- + default: +- FFI_ASSERT (0); ++ FFI_ASSERT (0); + } + + i++; +@@ -1263,39 +1564,9 @@ ffi_closure_helper_SYSV (ffi_closure *cl + already used and we never have a struct with size zero. That is the reason + for the subtraction of 1. See the comment in ffitarget.h about ordering. + */ +- if (cif->abi == FFI_SYSV && cif->rtype->type == FFI_TYPE_STRUCT +- && size <= 8) ++ if (cif->abi == FFI_SYSV && rtypenum == FFI_TYPE_STRUCT && size <= 8) + return (FFI_SYSV_TYPE_SMALL_STRUCT - 1) + size; +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- else if (cif->rtype->type == FFI_TYPE_LONGDOUBLE +- && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) +- return FFI_TYPE_STRUCT; +-#endif +- /* With FFI_LINUX_SOFT_FLOAT floats and doubles are handled like UINT32 +- respectivley UINT64. */ +- if (cif->abi == FFI_LINUX_SOFT_FLOAT) +- { +- switch (cif->rtype->type) +- { +- case FFI_TYPE_FLOAT: +- return FFI_TYPE_UINT32; +- break; +- case FFI_TYPE_DOUBLE: +- return FFI_TYPE_UINT64; +- break; +-#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE +- case FFI_TYPE_LONGDOUBLE: +- return FFI_TYPE_UINT128; +- break; +-#endif +- default: +- return cif->rtype->type; +- } +- } +- else +- { +- return cif->rtype->type; +- } ++ return rtypenum; + } + + int FFI_HIDDEN ffi_closure_helper_LINUX64 (ffi_closure *, void *, +@@ -1312,16 +1583,20 @@ ffi_closure_helper_LINUX64 (ffi_closure + + void **avalue; + ffi_type **arg_types; +- long i, avn; ++ unsigned long i, avn, nfixedargs; + ffi_cif *cif; + ffi_dblfl *end_pfr = pfr + NUM_FPR_ARG_REGISTERS64; ++#ifdef __STRUCT_PARM_ALIGN__ ++ unsigned long align; ++#endif + + cif = closure->cif; + avalue = alloca (cif->nargs * sizeof (void *)); + +- /* Copy the caller's structure return value address so that the closure +- returns the data directly to the caller. */ +- if (cif->rtype->type == FFI_TYPE_STRUCT) ++ /* Copy the caller's structure return value address so that the ++ closure returns the data directly to the caller. */ ++ if (cif->rtype->type == FFI_TYPE_STRUCT ++ && (cif->flags & FLAG_RETURNS_SMST) == 0) + { + rvalue = (void *) *pst; + pst++; +@@ -1329,30 +1604,39 @@ ffi_closure_helper_LINUX64 (ffi_closure + + i = 0; + avn = cif->nargs; ++ nfixedargs = cif->nfixedargs; + arg_types = cif->arg_types; + + /* Grab the addresses of the arguments from the stack frame. */ + while (i < avn) + { ++ unsigned int elt, elnum; ++ + switch (arg_types[i]->type) + { + case FFI_TYPE_SINT8: + case FFI_TYPE_UINT8: ++#ifndef __LITTLE_ENDIAN__ + avalue[i] = (char *) pst + 7; + pst++; + break; ++#endif + + case FFI_TYPE_SINT16: + case FFI_TYPE_UINT16: ++#ifndef __LITTLE_ENDIAN__ + avalue[i] = (char *) pst + 6; + pst++; + break; ++#endif + + case FFI_TYPE_SINT32: + case FFI_TYPE_UINT32: ++#ifndef __LITTLE_ENDIAN__ + avalue[i] = (char *) pst + 4; + pst++; + break; ++#endif + + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: +@@ -1362,12 +1646,82 @@ ffi_closure_helper_LINUX64 (ffi_closure + break; + + case FFI_TYPE_STRUCT: +- /* Structures with size less than eight bytes are passed +- left-padded. */ +- if (arg_types[i]->size < 8) +- avalue[i] = (char *) pst + 8 - arg_types[i]->size; ++#ifdef __STRUCT_PARM_ALIGN__ ++ align = arg_types[i]->alignment; ++ if (align > __STRUCT_PARM_ALIGN__) ++ align = __STRUCT_PARM_ALIGN__; ++ if (align > 1) ++ pst = (unsigned long *) ALIGN ((size_t) pst, align); ++#endif ++ elt = 0; ++#if _CALL_ELF == 2 ++ elt = discover_homogeneous_aggregate (arg_types[i], &elnum); ++#endif ++ if (elt) ++ { ++ union { ++ void *v; ++ unsigned long *ul; ++ float *f; ++ double *d; ++ size_t p; ++ } to, from; ++ ++ /* Repackage the aggregate from its parts. The ++ aggregate size is not greater than the space taken by ++ the registers so store back to the register/parameter ++ save arrays. */ ++ if (pfr + elnum <= end_pfr) ++ to.v = pfr; ++ else ++ to.v = pst; ++ ++ avalue[i] = to.v; ++ from.ul = pst; ++ if (elt == FFI_TYPE_FLOAT) ++ { ++ do ++ { ++ if (pfr < end_pfr && i < nfixedargs) ++ { ++ *to.f = (float) pfr->d; ++ pfr++; ++ } ++ else ++ *to.f = *from.f; ++ to.f++; ++ from.f++; ++ } ++ while (--elnum != 0); ++ } ++ else ++ { ++ do ++ { ++ if (pfr < end_pfr && i < nfixedargs) ++ { ++ *to.d = pfr->d; ++ pfr++; ++ } ++ else ++ *to.d = *from.d; ++ to.d++; ++ from.d++; ++ } ++ while (--elnum != 0); ++ } ++ } + else +- avalue[i] = pst; ++ { ++#ifndef __LITTLE_ENDIAN__ ++ /* Structures with size less than eight bytes are passed ++ left-padded. */ ++ if (arg_types[i]->size < 8) ++ avalue[i] = (char *) pst + 8 - arg_types[i]->size; ++ else ++#endif ++ avalue[i] = pst; ++ } + pst += (arg_types[i]->size + 7) / 8; + break; + +@@ -1379,7 +1733,7 @@ ffi_closure_helper_LINUX64 (ffi_closure + + /* there are 13 64bit floating point registers */ + +- if (pfr < end_pfr) ++ if (pfr < end_pfr && i < nfixedargs) + { + double temp = pfr->d; + pfr->f = (float) temp; +@@ -1395,7 +1749,7 @@ ffi_closure_helper_LINUX64 (ffi_closure + /* On the outgoing stack all values are aligned to 8 */ + /* there are 13 64bit floating point registers */ + +- if (pfr < end_pfr) ++ if (pfr < end_pfr && i < nfixedargs) + { + avalue[i] = pfr; + pfr++; +@@ -1407,14 +1761,14 @@ ffi_closure_helper_LINUX64 (ffi_closure + + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE + case FFI_TYPE_LONGDOUBLE: +- if (pfr + 1 < end_pfr) ++ if (pfr + 1 < end_pfr && i + 1 < nfixedargs) + { + avalue[i] = pfr; + pfr += 2; + } + else + { +- if (pfr < end_pfr) ++ if (pfr < end_pfr && i < nfixedargs) + { + /* Passed partly in f13 and partly on the stack. + Move it all to the stack. */ +@@ -1438,5 +1792,14 @@ ffi_closure_helper_LINUX64 (ffi_closure + (closure->fun) (cif, rvalue, avalue, closure->user_data); + + /* Tell ffi_closure_LINUX64 how to perform return type promotions. */ ++ if ((cif->flags & FLAG_RETURNS_SMST) != 0) ++ { ++ if ((cif->flags & FLAG_RETURNS_FP) == 0) ++ return FFI_V2_TYPE_SMALL_STRUCT + cif->rtype->size - 1; ++ else if ((cif->flags & FLAG_RETURNS_64BITS) != 0) ++ return FFI_V2_TYPE_DOUBLE_HOMOG; ++ else ++ return FFI_V2_TYPE_FLOAT_HOMOG; ++ } + return cif->rtype->type; + } +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ffitarget.h +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ffitarget.h ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ffitarget.h +@@ -1,6 +1,8 @@ + /* -----------------------------------------------------------------*-C-*- +- ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. +- Copyright (C) 2007, 2008 Free Software Foundation, Inc ++ ffitarget.h - Copyright (c) 2012 Anthony Green ++ Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc ++ Copyright (c) 1996-2003 Red Hat, Inc. ++ + Target configuration macros for PowerPC. + + Permission is hereby granted, free of charge, to any person obtaining +@@ -28,6 +30,10 @@ + #ifndef LIBFFI_TARGET_H + #define LIBFFI_TARGET_H + ++#ifndef LIBFFI_H ++#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." ++#endif ++ + /* ---- System specific configurations ----------------------------------- */ + + #if defined (POWERPC) && defined (__powerpc64__) /* linux64 */ +@@ -57,18 +63,14 @@ typedef enum ffi_abi { + FFI_LINUX64, + FFI_LINUX, + FFI_LINUX_SOFT_FLOAT, +-# ifdef POWERPC64 ++# if defined(POWERPC64) + FFI_DEFAULT_ABI = FFI_LINUX64, +-# else +-# if (!defined(__NO_FPRS__) && (__LDBL_MANT_DIG__ == 106)) +- FFI_DEFAULT_ABI = FFI_LINUX, +-# else +-# ifdef __NO_FPRS__ ++# elif defined(__NO_FPRS__) + FFI_DEFAULT_ABI = FFI_LINUX_SOFT_FLOAT, +-# else ++# elif (__LDBL_MANT_DIG__ == 106) ++ FFI_DEFAULT_ABI = FFI_LINUX, ++# else + FFI_DEFAULT_ABI = FFI_GCC_SYSV, +-# endif +-# endif + # endif + #endif + +@@ -101,6 +103,10 @@ typedef enum ffi_abi { + + #define FFI_CLOSURES 1 + #define FFI_NATIVE_RAW_API 0 ++#if defined (POWERPC) || defined (POWERPC_FREEBSD) ++# define FFI_TARGET_SPECIFIC_VARIADIC 1 ++# define FFI_EXTRA_CIF_FIELDS unsigned nfixedargs ++#endif + + /* For additional types like the below, take care about the order in + ppc_closures.S. They must follow after the FFI_TYPE_LAST. */ +@@ -113,10 +119,19 @@ typedef enum ffi_abi { + defined in ffi.c, to determine the exact return type and its size. */ + #define FFI_SYSV_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 2) + +-#if defined(POWERPC64) || defined(POWERPC_AIX) +-#define FFI_TRAMPOLINE_SIZE 24 +-#else /* POWERPC || POWERPC_AIX */ +-#define FFI_TRAMPOLINE_SIZE 40 ++/* Used by ELFv2 for homogenous structure returns. */ ++#define FFI_V2_TYPE_FLOAT_HOMOG (FFI_TYPE_LAST + 1) ++#define FFI_V2_TYPE_DOUBLE_HOMOG (FFI_TYPE_LAST + 2) ++#define FFI_V2_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 3) ++ ++#if _CALL_ELF == 2 ++# define FFI_TRAMPOLINE_SIZE 32 ++#else ++# if defined(POWERPC64) || defined(POWERPC_AIX) ++# define FFI_TRAMPOLINE_SIZE 24 ++# else /* POWERPC || POWERPC_AIX */ ++# define FFI_TRAMPOLINE_SIZE 40 ++# endif + #endif + + #ifndef LIBFFI_ASM +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64.S +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/linux64.S ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64.S +@@ -30,16 +30,33 @@ + #include + + #ifdef __powerpc64__ +- .hidden ffi_call_LINUX64, .ffi_call_LINUX64 +- .globl ffi_call_LINUX64, .ffi_call_LINUX64 ++ .hidden ffi_call_LINUX64 ++ .globl ffi_call_LINUX64 ++# if _CALL_ELF == 2 ++ .text ++ffi_call_LINUX64: ++ addis %r2, %r12, .TOC.-ffi_call_LINUX64@ha ++ addi %r2, %r2, .TOC.-ffi_call_LINUX64@l ++ .localentry ffi_call_LINUX64, . - ffi_call_LINUX64 ++# else + .section ".opd","aw" + .align 3 + ffi_call_LINUX64: ++# ifdef _CALL_LINUX ++ .quad .L.ffi_call_LINUX64,.TOC.@tocbase,0 ++ .type ffi_call_LINUX64,@function ++ .text ++.L.ffi_call_LINUX64: ++# else ++ .hidden .ffi_call_LINUX64 ++ .globl .ffi_call_LINUX64 + .quad .ffi_call_LINUX64,.TOC.@tocbase,0 + .size ffi_call_LINUX64,24 + .type .ffi_call_LINUX64,@function + .text + .ffi_call_LINUX64: ++# endif ++# endif + .LFB1: + mflr %r0 + std %r28, -32(%r1) +@@ -54,22 +71,35 @@ ffi_call_LINUX64: + mr %r31, %r5 /* flags, */ + mr %r30, %r6 /* rvalue, */ + mr %r29, %r7 /* function address. */ ++/* Save toc pointer, not for the ffi_prep_args64 call, but for the later ++ bctrl function call. */ ++# if _CALL_ELF == 2 ++ std %r2, 24(%r1) ++# else + std %r2, 40(%r1) ++# endif + + /* Call ffi_prep_args64. */ + mr %r4, %r1 ++# if defined _CALL_LINUX || _CALL_ELF == 2 ++ bl ffi_prep_args64 ++# else + bl .ffi_prep_args64 ++# endif + +- ld %r0, 0(%r29) ++# if _CALL_ELF == 2 ++ mr %r12, %r29 ++# else ++ ld %r12, 0(%r29) + ld %r2, 8(%r29) + ld %r11, 16(%r29) +- ++# endif + /* Now do the call. */ + /* Set up cr1 with bits 4-7 of the flags. */ + mtcrf 0x40, %r31 + + /* Get the address to call into CTR. */ +- mtctr %r0 ++ mtctr %r12 + /* Load all those argument registers. */ + ld %r3, -32-(8*8)(%r28) + ld %r4, -32-(7*8)(%r28) +@@ -104,12 +134,17 @@ ffi_call_LINUX64: + + /* This must follow the call immediately, the unwinder + uses this to find out if r2 has been saved or not. */ ++# if _CALL_ELF == 2 ++ ld %r2, 24(%r1) ++# else + ld %r2, 40(%r1) ++# endif + + /* Now, deal with the return value. */ + mtcrf 0x01, %r31 +- bt- 30, .Ldone_return_value +- bt- 29, .Lfp_return_value ++ bt 31, .Lstruct_return_value ++ bt 30, .Ldone_return_value ++ bt 29, .Lfp_return_value + std %r3, 0(%r30) + /* Fall through... */ + +@@ -117,7 +152,7 @@ ffi_call_LINUX64: + /* Restore the registers we used and return. */ + mr %r1, %r28 + ld %r0, 16(%r28) +- ld %r28, -32(%r1) ++ ld %r28, -32(%r28) + mtlr %r0 + ld %r29, -24(%r1) + ld %r30, -16(%r1) +@@ -134,10 +169,48 @@ ffi_call_LINUX64: + .Lfloat_return_value: + stfs %f1, 0(%r30) + b .Ldone_return_value ++ ++.Lstruct_return_value: ++ bf 29, .Lsmall_struct ++ bf 28, .Lfloat_homog_return_value ++ stfd %f1, 0(%r30) ++ stfd %f2, 8(%r30) ++ stfd %f3, 16(%r30) ++ stfd %f4, 24(%r30) ++ stfd %f5, 32(%r30) ++ stfd %f6, 40(%r30) ++ stfd %f7, 48(%r30) ++ stfd %f8, 56(%r30) ++ b .Ldone_return_value ++ ++.Lfloat_homog_return_value: ++ stfs %f1, 0(%r30) ++ stfs %f2, 4(%r30) ++ stfs %f3, 8(%r30) ++ stfs %f4, 12(%r30) ++ stfs %f5, 16(%r30) ++ stfs %f6, 20(%r30) ++ stfs %f7, 24(%r30) ++ stfs %f8, 28(%r30) ++ b .Ldone_return_value ++ ++.Lsmall_struct: ++ std %r3, 0(%r30) ++ std %r4, 8(%r30) ++ b .Ldone_return_value ++ + .LFE1: + .long 0 + .byte 0,12,0,1,128,4,0,0 ++# if _CALL_ELF == 2 ++ .size ffi_call_LINUX64,.-ffi_call_LINUX64 ++# else ++# ifdef _CALL_LINUX ++ .size ffi_call_LINUX64,.-.L.ffi_call_LINUX64 ++# else + .size .ffi_call_LINUX64,.-.ffi_call_LINUX64 ++# endif ++# endif + + .section .eh_frame,EH_FRAME_FLAGS,@progbits + .Lframe1: +@@ -180,8 +253,8 @@ ffi_call_LINUX64: + .uleb128 0x4 + .align 3 + .LEFDE1: +-#endif + +-#if defined __ELF__ && defined __linux__ ++# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2 + .section .note.GNU-stack,"",@progbits ++# endif + #endif +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64_closure.S +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/linux64_closure.S ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64_closure.S +@@ -32,66 +32,125 @@ + + #ifdef __powerpc64__ + FFI_HIDDEN (ffi_closure_LINUX64) +- FFI_HIDDEN (.ffi_closure_LINUX64) +- .globl ffi_closure_LINUX64, .ffi_closure_LINUX64 ++ .globl ffi_closure_LINUX64 ++# if _CALL_ELF == 2 ++ .text ++ffi_closure_LINUX64: ++ addis %r2, %r12, .TOC.-ffi_closure_LINUX64@ha ++ addi %r2, %r2, .TOC.-ffi_closure_LINUX64@l ++ .localentry ffi_closure_LINUX64, . - ffi_closure_LINUX64 ++# else + .section ".opd","aw" + .align 3 + ffi_closure_LINUX64: ++# ifdef _CALL_LINUX ++ .quad .L.ffi_closure_LINUX64,.TOC.@tocbase,0 ++ .type ffi_closure_LINUX64,@function ++ .text ++.L.ffi_closure_LINUX64: ++# else ++ FFI_HIDDEN (.ffi_closure_LINUX64) ++ .globl .ffi_closure_LINUX64 + .quad .ffi_closure_LINUX64,.TOC.@tocbase,0 + .size ffi_closure_LINUX64,24 + .type .ffi_closure_LINUX64,@function + .text + .ffi_closure_LINUX64: ++# endif ++# endif ++ ++# if _CALL_ELF == 2 ++# 32 byte special reg save area + 64 byte parm save area ++# + 64 byte retval area + 13*8 fpr save area + round to 16 ++# define STACKFRAME 272 ++# define PARMSAVE 32 ++# define RETVAL PARMSAVE+64 ++# else ++# 48 bytes special reg save area + 64 bytes parm save area ++# + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 ++# define STACKFRAME 240 ++# define PARMSAVE 48 ++# define RETVAL PARMSAVE+64 ++# endif ++ + .LFB1: +- # save general regs into parm save area +- std %r3, 48(%r1) +- std %r4, 56(%r1) +- std %r5, 64(%r1) +- std %r6, 72(%r1) ++# if _CALL_ELF == 2 ++ ld %r12, FFI_TRAMPOLINE_SIZE(%r11) # closure->cif ++ mflr %r0 ++ lwz %r12, 28(%r12) # cif->flags ++ mtcrf 0x40, %r12 ++ addi %r12, %r1, PARMSAVE ++ bt 7, .Lparmsave ++ # Our caller has not allocated a parameter save area. ++ # We need to allocate one here and use it to pass gprs to ++ # ffi_closure_helper_LINUX64. ++ addi %r12, %r1, -STACKFRAME+PARMSAVE ++.Lparmsave: ++ std %r0, 16(%r1) ++ # Save general regs into parm save area ++ std %r3, 0(%r12) ++ std %r4, 8(%r12) ++ std %r5, 16(%r12) ++ std %r6, 24(%r12) ++ std %r7, 32(%r12) ++ std %r8, 40(%r12) ++ std %r9, 48(%r12) ++ std %r10, 56(%r12) ++ ++ # load up the pointer to the parm save area ++ mr %r5, %r12 ++# else + mflr %r0 ++ # Save general regs into parm save area ++ # This is the parameter save area set up by our caller. ++ std %r3, PARMSAVE+0(%r1) ++ std %r4, PARMSAVE+8(%r1) ++ std %r5, PARMSAVE+16(%r1) ++ std %r6, PARMSAVE+24(%r1) ++ std %r7, PARMSAVE+32(%r1) ++ std %r8, PARMSAVE+40(%r1) ++ std %r9, PARMSAVE+48(%r1) ++ std %r10, PARMSAVE+56(%r1) + +- std %r7, 80(%r1) +- std %r8, 88(%r1) +- std %r9, 96(%r1) +- std %r10, 104(%r1) + std %r0, 16(%r1) + +- # mandatory 48 bytes special reg save area + 64 bytes parm save area +- # + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 +- stdu %r1, -240(%r1) +-.LCFI0: ++ # load up the pointer to the parm save area ++ addi %r5, %r1, PARMSAVE ++# endif + + # next save fpr 1 to fpr 13 +- stfd %f1, 128+(0*8)(%r1) +- stfd %f2, 128+(1*8)(%r1) +- stfd %f3, 128+(2*8)(%r1) +- stfd %f4, 128+(3*8)(%r1) +- stfd %f5, 128+(4*8)(%r1) +- stfd %f6, 128+(5*8)(%r1) +- stfd %f7, 128+(6*8)(%r1) +- stfd %f8, 128+(7*8)(%r1) +- stfd %f9, 128+(8*8)(%r1) +- stfd %f10, 128+(9*8)(%r1) +- stfd %f11, 128+(10*8)(%r1) +- stfd %f12, 128+(11*8)(%r1) +- stfd %f13, 128+(12*8)(%r1) ++ stfd %f1, -104+(0*8)(%r1) ++ stfd %f2, -104+(1*8)(%r1) ++ stfd %f3, -104+(2*8)(%r1) ++ stfd %f4, -104+(3*8)(%r1) ++ stfd %f5, -104+(4*8)(%r1) ++ stfd %f6, -104+(5*8)(%r1) ++ stfd %f7, -104+(6*8)(%r1) ++ stfd %f8, -104+(7*8)(%r1) ++ stfd %f9, -104+(8*8)(%r1) ++ stfd %f10, -104+(9*8)(%r1) ++ stfd %f11, -104+(10*8)(%r1) ++ stfd %f12, -104+(11*8)(%r1) ++ stfd %f13, -104+(12*8)(%r1) + +- # set up registers for the routine that actually does the work +- # get the context pointer from the trampoline +- mr %r3, %r11 ++ # load up the pointer to the saved fpr registers */ ++ addi %r6, %r1, -104 + +- # now load up the pointer to the result storage +- addi %r4, %r1, 112 ++ # load up the pointer to the result storage ++ addi %r4, %r1, -STACKFRAME+RETVAL + +- # now load up the pointer to the parameter save area +- # in the previous frame +- addi %r5, %r1, 240 + 48 ++ stdu %r1, -STACKFRAME(%r1) ++.LCFI0: + +- # now load up the pointer to the saved fpr registers */ +- addi %r6, %r1, 128 ++ # get the context pointer from the trampoline ++ mr %r3, %r11 + + # make the call ++# if defined _CALL_LINUX || _CALL_ELF == 2 ++ bl ffi_closure_helper_LINUX64 ++# else + bl .ffi_closure_helper_LINUX64 ++# endif + .Lret: + + # now r3 contains the return type +@@ -100,10 +159,12 @@ ffi_closure_LINUX64: + + # look up the proper starting point in table + # by using return type as offset ++ ld %r0, STACKFRAME+16(%r1) ++ cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT ++ bge .Lsmall + mflr %r4 # move address of .Lret to r4 + sldi %r3, %r3, 4 # now multiply return type by 16 + addi %r4, %r4, .Lret_type0 - .Lret +- ld %r0, 240+16(%r1) + add %r3, %r3, %r4 # add contents of table to table address + mtctr %r3 + bctr # jump to it +@@ -116,85 +177,175 @@ ffi_closure_LINUX64: + .Lret_type0: + # case FFI_TYPE_VOID + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + nop + # case FFI_TYPE_INT +- lwa %r3, 112+4(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lwa %r3, RETVAL+0(%r1) ++# else ++ lwa %r3, RETVAL+4(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_FLOAT +- lfs %f1, 112+0(%r1) ++ lfs %f1, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_DOUBLE +- lfd %f1, 112+0(%r1) ++ lfd %f1, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_LONGDOUBLE +- lfd %f1, 112+0(%r1) ++ lfd %f1, RETVAL+0(%r1) + mtlr %r0 +- lfd %f2, 112+8(%r1) ++ lfd %f2, RETVAL+8(%r1) + b .Lfinish + # case FFI_TYPE_UINT8 +- lbz %r3, 112+7(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lbz %r3, RETVAL+0(%r1) ++# else ++ lbz %r3, RETVAL+7(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_SINT8 +- lbz %r3, 112+7(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lbz %r3, RETVAL+0(%r1) ++# else ++ lbz %r3, RETVAL+7(%r1) ++# endif + extsb %r3,%r3 + mtlr %r0 + b .Lfinish + # case FFI_TYPE_UINT16 +- lhz %r3, 112+6(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lhz %r3, RETVAL+0(%r1) ++# else ++ lhz %r3, RETVAL+6(%r1) ++# endif + mtlr %r0 + .Lfinish: +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_SINT16 +- lha %r3, 112+6(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lha %r3, RETVAL+0(%r1) ++# else ++ lha %r3, RETVAL+6(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_UINT32 +- lwz %r3, 112+4(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lwz %r3, RETVAL+0(%r1) ++# else ++ lwz %r3, RETVAL+4(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_SINT32 +- lwa %r3, 112+4(%r1) ++# ifdef __LITTLE_ENDIAN__ ++ lwa %r3, RETVAL+0(%r1) ++# else ++ lwa %r3, RETVAL+4(%r1) ++# endif + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_UINT64 +- ld %r3, 112+0(%r1) ++ ld %r3, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_SINT64 +- ld %r3, 112+0(%r1) ++ ld %r3, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + # case FFI_TYPE_STRUCT + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME + blr + nop + # case FFI_TYPE_POINTER +- ld %r3, 112+0(%r1) ++ ld %r3, RETVAL+0(%r1) + mtlr %r0 +- addi %r1, %r1, 240 ++ addi %r1, %r1, STACKFRAME ++ blr ++# case FFI_V2_TYPE_FLOAT_HOMOG ++ lfs %f1, RETVAL+0(%r1) ++ lfs %f2, RETVAL+4(%r1) ++ lfs %f3, RETVAL+8(%r1) ++ b .Lmorefloat ++# case FFI_V2_TYPE_DOUBLE_HOMOG ++ lfd %f1, RETVAL+0(%r1) ++ lfd %f2, RETVAL+8(%r1) ++ lfd %f3, RETVAL+16(%r1) ++ lfd %f4, RETVAL+24(%r1) ++ mtlr %r0 ++ lfd %f5, RETVAL+32(%r1) ++ lfd %f6, RETVAL+40(%r1) ++ lfd %f7, RETVAL+48(%r1) ++ lfd %f8, RETVAL+56(%r1) ++ addi %r1, %r1, STACKFRAME ++ blr ++.Lmorefloat: ++ lfs %f4, RETVAL+12(%r1) ++ mtlr %r0 ++ lfs %f5, RETVAL+16(%r1) ++ lfs %f6, RETVAL+20(%r1) ++ lfs %f7, RETVAL+24(%r1) ++ lfs %f8, RETVAL+28(%r1) ++ addi %r1, %r1, STACKFRAME ++ blr ++.Lsmall: ++# ifdef __LITTLE_ENDIAN__ ++ ld %r3,RETVAL+0(%r1) ++ mtlr %r0 ++ ld %r4,RETVAL+8(%r1) ++ addi %r1, %r1, STACKFRAME ++ blr ++# else ++ # A struct smaller than a dword is returned in the low bits of r3 ++ # ie. right justified. Larger structs are passed left justified ++ # in r3 and r4. The return value area on the stack will have ++ # the structs as they are usually stored in memory. ++ cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT + 7 # size 8 bytes? ++ neg %r5, %r3 ++ ld %r3,RETVAL+0(%r1) ++ blt .Lsmalldown ++ mtlr %r0 ++ ld %r4,RETVAL+8(%r1) ++ addi %r1, %r1, STACKFRAME ++ blr ++.Lsmalldown: ++ addi %r5, %r5, FFI_V2_TYPE_SMALL_STRUCT + 7 ++ mtlr %r0 ++ sldi %r5, %r5, 3 ++ addi %r1, %r1, STACKFRAME ++ srd %r3, %r3, %r5 + blr +-# esac ++# endif ++ + .LFE1: + .long 0 + .byte 0,12,0,1,128,0,0,0 ++# if _CALL_ELF == 2 ++ .size ffi_closure_LINUX64,.-ffi_closure_LINUX64 ++# else ++# ifdef _CALL_LINUX ++ .size ffi_closure_LINUX64,.-.L.ffi_closure_LINUX64 ++# else + .size .ffi_closure_LINUX64,.-.ffi_closure_LINUX64 ++# endif ++# endif + + .section .eh_frame,EH_FRAME_FLAGS,@progbits + .Lframe1: +@@ -223,14 +374,14 @@ ffi_closure_LINUX64: + .byte 0x2 # DW_CFA_advance_loc1 + .byte .LCFI0-.LFB1 + .byte 0xe # DW_CFA_def_cfa_offset +- .uleb128 240 ++ .uleb128 STACKFRAME + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x41 + .sleb128 -2 + .align 3 + .LEFDE1: +-#endif + +-#if defined __ELF__ && defined __linux__ ++# if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",@progbits ++# endif + #endif +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ppc_closure.S +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ppc_closure.S ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ppc_closure.S +@@ -122,43 +122,78 @@ ENTRY(ffi_closure_SYSV) + blr + + # case FFI_TYPE_FLOAT ++#ifndef __NO_FPRS__ + lfs %f1,112+0(%r1) + mtlr %r0 + addi %r1,%r1,144 ++#else ++ nop ++ nop ++ nop ++#endif + blr + + # case FFI_TYPE_DOUBLE ++#ifndef __NO_FPRS__ + lfd %f1,112+0(%r1) + mtlr %r0 + addi %r1,%r1,144 ++#else ++ nop ++ nop ++ nop ++#endif + blr + + # case FFI_TYPE_LONGDOUBLE ++#ifndef __NO_FPRS__ + lfd %f1,112+0(%r1) + lfd %f2,112+8(%r1) + mtlr %r0 + b .Lfinish ++#else ++ nop ++ nop ++ nop ++ blr ++#endif + + # case FFI_TYPE_UINT8 ++#ifdef __LITTLE_ENDIAN__ ++ lbz %r3,112+0(%r1) ++#else + lbz %r3,112+3(%r1) ++#endif + mtlr %r0 + addi %r1,%r1,144 + blr + + # case FFI_TYPE_SINT8 ++#ifdef __LITTLE_ENDIAN__ ++ lbz %r3,112+0(%r1) ++#else + lbz %r3,112+3(%r1) ++#endif + extsb %r3,%r3 + mtlr %r0 + b .Lfinish + + # case FFI_TYPE_UINT16 ++#ifdef __LITTLE_ENDIAN__ ++ lhz %r3,112+0(%r1) ++#else + lhz %r3,112+2(%r1) ++#endif + mtlr %r0 + addi %r1,%r1,144 + blr + + # case FFI_TYPE_SINT16 ++#ifdef __LITTLE_ENDIAN__ ++ lha %r3,112+0(%r1) ++#else + lha %r3,112+2(%r1) ++#endif + mtlr %r0 + addi %r1,%r1,144 + blr +@@ -203,7 +238,7 @@ ENTRY(ffi_closure_SYSV) + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) + lwz %r5,112+8(%r1) +- bl .Luint128 ++ b .Luint128 + + # The return types below are only used when the ABI type is FFI_SYSV. + # case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct. +@@ -220,9 +255,15 @@ ENTRY(ffi_closure_SYSV) + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct. + lwz %r3,112+0(%r1) ++#ifdef __LITTLE_ENDIAN__ ++ mtlr %r0 ++ addi %r1,%r1,144 ++ blr ++#else + srwi %r3,%r3,8 + mtlr %r0 + b .Lfinish ++#endif + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct. + lwz %r3,112+0(%r1) +@@ -233,20 +274,35 @@ ENTRY(ffi_closure_SYSV) + # case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct. + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) ++#ifdef __LITTLE_ENDIAN__ ++ mtlr %r0 ++ b .Lfinish ++#else + li %r5,24 + b .Lstruct567 ++#endif + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct. + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) ++#ifdef __LITTLE_ENDIAN__ ++ mtlr %r0 ++ b .Lfinish ++#else + li %r5,16 + b .Lstruct567 ++#endif + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct. + lwz %r3,112+0(%r1) + lwz %r4,112+4(%r1) ++#ifdef __LITTLE_ENDIAN__ ++ mtlr %r0 ++ b .Lfinish ++#else + li %r5,8 + b .Lstruct567 ++#endif + + # case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct. + lwz %r3,112+0(%r1) +@@ -254,6 +310,7 @@ ENTRY(ffi_closure_SYSV) + mtlr %r0 + b .Lfinish + ++#ifndef __LITTLE_ENDIAN__ + .Lstruct567: + subfic %r6,%r5,32 + srw %r4,%r4,%r5 +@@ -263,6 +320,7 @@ ENTRY(ffi_closure_SYSV) + mtlr %r0 + addi %r1,%r1,144 + blr ++#endif + + .Luint128: + lwz %r6,112+12(%r1) +Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/sysv.S +=================================================================== +--- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/sysv.S ++++ mozilla-release/js/src/ctypes/libffi/src/powerpc/sysv.S +@@ -83,6 +83,7 @@ ENTRY(ffi_call_SYSV) + nop + 1: + ++#ifndef __NO_FPRS__ + /* Load all the FP registers. */ + bf- 6,2f + lfd %f1,-16-(8*4)-(8*8)(%r28) +@@ -94,6 +95,7 @@ ENTRY(ffi_call_SYSV) + lfd %f6,-16-(8*4)-(3*8)(%r28) + lfd %f7,-16-(8*4)-(2*8)(%r28) + lfd %f8,-16-(8*4)-(1*8)(%r28) ++#endif + 2: + + /* Make the call. */ +@@ -103,7 +105,9 @@ ENTRY(ffi_call_SYSV) + mtcrf 0x01,%r31 /* cr7 */ + bt- 31,L(small_struct_return_value) + bt- 30,L(done_return_value) ++#ifndef __NO_FPRS__ + bt- 29,L(fp_return_value) ++#endif + stw %r3,0(%r30) + bf+ 28,L(done_return_value) + stw %r4,4(%r30) +@@ -124,6 +128,7 @@ L(done_return_value): + lwz %r1,0(%r1) + blr + ++#ifndef __NO_FPRS__ + L(fp_return_value): + bf 28,L(float_return_value) + stfd %f1,0(%r30) +@@ -134,21 +139,17 @@ L(fp_return_value): + L(float_return_value): + stfs %f1,0(%r30) + b L(done_return_value) ++#endif + + L(small_struct_return_value): +- extrwi %r6,%r31,2,19 /* number of bytes padding = shift/8 */ +- mtcrf 0x02,%r31 /* copy flags to cr[24:27] (cr6) */ +- extrwi %r5,%r31,5,19 /* r5 <- number of bits of padding */ +- subfic %r6,%r6,4 /* r6 <- number of useful bytes in r3 */ +- bf- 25,L(done_return_value) /* struct in r3 ? if not, done. */ +-/* smst_one_register: */ +- slw %r3,%r3,%r5 /* Left-justify value in r3 */ +- mtxer %r6 /* move byte count to XER ... */ +- stswx %r3,0,%r30 /* ... and store that many bytes */ +- bf+ 26,L(done_return_value) /* struct in r3:r4 ? */ +- add %r6,%r6,%r30 /* adjust pointer */ +- stswi %r4,%r6,4 /* store last four bytes */ +- b L(done_return_value) ++ /* ++ * The C code always allocates a properly-aligned 8-byte bounce ++ * buffer to make this assembly code very simple. Just write out ++ * r3 and r4 to the buffer to allow the C code to handle the rest. ++ */ ++ stw %r3, 0(%r30) ++ stw %r4, 4(%r30) ++ b L(done_return_value) + + .LFE1: + END(ffi_call_SYSV) +Index: mozilla-release/mfbt/Endian.h +=================================================================== +--- mozilla-release.orig/mfbt/Endian.h ++++ mozilla-release/mfbt/Endian.h +@@ -91,7 +91,7 @@ + # else + # error "CPU type is unknown" + # endif +-#elif defined(__APPLE__) ++#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__) + # if __LITTLE_ENDIAN__ + # define MOZ_LITTLE_ENDIAN 1 + # elif __BIG_ENDIAN__ +@@ -119,8 +119,7 @@ + * cases. + */ + #elif defined(__sparc) || defined(__sparc__) || \ +- defined(_POWER) || defined(__powerpc__) || \ +- defined(__ppc__) || defined(__hppa) || \ ++ defined(_POWER) || defined(__hppa) || \ + defined(_MIPSEB) || defined(__ARMEB__) || \ + defined(__s390__) || defined(__AARCH64EB__) || \ + (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \ +Index: mozilla-release/media/webrtc/trunk/webrtc/typedefs.h +=================================================================== +--- mozilla-release.orig/media/webrtc/trunk/webrtc/typedefs.h ++++ mozilla-release/media/webrtc/trunk/webrtc/typedefs.h +@@ -52,13 +52,23 @@ + #elif defined(__powerpc64__) + #define WEBRTC_ARCH_PPC64 1 + #define WEBRTC_ARCH_64_BITS 1 ++#ifdef __LITTLE_ENDIAN__ ++#define WEBRTC_ARCH_LITTLE_ENDIAN ++#define WEBRTC_LITTLE_ENDIAN ++#else + #define WEBRTC_ARCH_BIG_ENDIAN + #define WEBRTC_BIG_ENDIAN ++#endif + #elif defined(__ppc__) || defined(__powerpc__) + #define WEBRTC_ARCH_PPC 1 + #define WEBRTC_ARCH_32_BITS 1 ++#ifdef __LITTLE_ENDIAN__ ++#define WEBRTC_ARCH_LITTLE_ENDIAN ++#define WEBRTC_LITTLE_ENDIAN ++#else + #define WEBRTC_ARCH_BIG_ENDIAN + #define WEBRTC_BIG_ENDIAN ++#endif + #elif defined(__sparc64__) + #define WEBRTC_ARCH_SPARC 1 + #define WEBRTC_ARCH_64_BITS 1 +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/moz.build +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/moz.build ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/moz.build +@@ -206,12 +206,12 @@ if CONFIG['OS_TEST'] == 'powerpc': + 'xptcstubs_ppc_linux.cpp', + ] + +-if CONFIG['OS_TEST'] == 'powerpc64': ++if CONFIG['OS_TEST'] in ('powerpc64', 'powerpc64le'): + if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'): + SOURCES += [ +- 'xptcinvoke_asm_ppc64_linux.s', ++ 'xptcinvoke_asm_ppc64_linux.S', + 'xptcinvoke_ppc64_linux.cpp', +- 'xptcstubs_asm_ppc64_linux.s', ++ 'xptcstubs_asm_ppc64_linux.S', + 'xptcstubs_ppc64_linux.cpp', + ] + +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s ++++ /dev/null +@@ -1,132 +0,0 @@ +-# This Source Code Form is subject to the terms of the Mozilla Public +-# License, v. 2.0. If a copy of the MPL was not distributed with this +-# file, You can obtain one at http://mozilla.org/MPL/2.0/. +- +-.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(nsISupports* that, uint32_t methodIndex, +-# uint32_t paramCount, nsXPTCVariant* params) +-# +- +- .section ".toc","aw" +- .section ".text" +- .align 2 +- .globl NS_InvokeByIndex +- .section ".opd","aw" +- .align 3 +-NS_InvokeByIndex: +- .quad .NS_InvokeByIndex,.TOC.@tocbase +- .previous +- .type NS_InvokeByIndex,@function +-.NS_InvokeByIndex: +- 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(uint64_t* gpregs, double* fpregs, +- # uint32_t paramCount, nsXPTCVariant* s, +- # uint64_t* 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,.-.NS_InvokeByIndex +- +- # Magic indicating no need for an executable stack +- .section .note.GNU-stack, "", @progbits ; .previous +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.S +=================================================================== +--- /dev/null ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.S +@@ -0,0 +1,167 @@ ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++ ++.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 ++ ++# The ABI defines a fixed stack frame area of 4 doublewords (ELFv2) ++# or 6 doublewords (ELFv1); the last of these doublewords is used ++# as TOC pointer save area. The fixed area is followed by a parameter ++# save area of 8 doublewords (used for vararg routines), followed ++# by space for parameters passed on the stack. ++# ++# We set STACK_TOC to the offset of the TOC pointer save area, and ++# STACK_PARAMS to the offset of the first on-stack parameter. ++ ++#if _CALL_ELF == 2 ++#define STACK_TOC 24 ++#define STACK_PARAMS 96 ++#else ++#define STACK_TOC 40 ++#define STACK_PARAMS 112 ++#endif ++ ++# ++# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, ++# uint32_t paramCount, nsXPTCVariant* params) ++# ++ ++#if _CALL_ELF == 2 ++ .section ".text" ++ .type NS_InvokeByIndex,@function ++ .globl NS_InvokeByIndex ++ .align 2 ++NS_InvokeByIndex: ++0: addis 2,12,(.TOC.-0b)@ha ++ addi 2,2,(.TOC.-0b)@l ++ .localentry NS_InvokeByIndex,.-NS_InvokeByIndex ++#else ++ .section ".toc","aw" ++ .section ".text" ++ .align 2 ++ .globl NS_InvokeByIndex ++ .section ".opd","aw" ++ .align 3 ++NS_InvokeByIndex: ++ .quad .NS_InvokeByIndex,.TOC.@tocbase ++ .previous ++ .type NS_InvokeByIndex,@function ++.NS_InvokeByIndex: ++#endif ++ 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. ++ # ++ # | (fixed area + | | 7 GP | 13 FP | 3 NV | ++ # | param. save) |(params)........| regs | regs | regs | ++ # (r1)......(+STACK_PARAMS)... (-23*8).(-16*8).(-3*8)..(r31) ++ ++ # +stack frame, -unused stack params, +regs storage, +1 for alignment ++ addi r7,r5,((STACK_PARAMS/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(uint64_t* gpregs, double* fpregs, ++ # uint32_t paramCount, nsXPTCVariant* s, ++ # uint64_t* d)) ++ ++ # r5, r6 are passed through intact (paramCount, params) ++ # r7 (d) has to be r1+STACK_PARAMS ++ # -- 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,STACK_PARAMS # 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 r12,0(r9) ++ ++ std r2,STACK_TOC(r1) # Save r2 (TOC pointer) ++ ++#if _CALL_ELF == 2 ++ mtctr r12 ++#else ++ ld r0,0(r12) # Actual address from fd. ++ mtctr 0 ++ ld r11,16(r12) # Environment pointer from fd. ++ ld r2,8(r12) # TOC pointer from fd. ++#endif ++ ++ # 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,STACK_TOC(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 ++ ++#if _CALL_ELF == 2 ++ .size NS_InvokeByIndex,.-NS_InvokeByIndex ++#else ++ .size NS_InvokeByIndex,.-.NS_InvokeByIndex ++#endif ++ ++ # Magic indicating no need for an executable stack ++ .section .note.GNU-stack, "", @progbits ; .previous +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp +@@ -74,7 +74,9 @@ invoke_copy_to_stack(uint64_t* gpregs, + fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles + } else { + float *p = (float *)d; ++#ifndef __LITTLE_ENDIAN__ + p++; ++#endif + *p = s->val.f; + } + } +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s ++++ /dev/null +@@ -1,81 +0,0 @@ +-# This Source Code Form is subject to the terms of the Mozilla Public +-# License, v. 2.0. If a copy of the MPL was not distributed with this +-# file, You can obtain one at http://mozilla.org/MPL/2.0/. +- +-.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.@tocbase +- .previous +- .type SharedStub,@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 +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.S +=================================================================== +--- /dev/null ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.S +@@ -0,0 +1,107 @@ ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++ ++.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 ++ ++#if _CALL_ELF == 2 ++#define STACK_PARAMS 96 ++#else ++#define STACK_PARAMS 112 ++#endif ++ ++#if _CALL_ELF == 2 ++ .section ".text" ++ .type SharedStub,@function ++ .globl SharedStub ++ # Make the symbol hidden so that the branch from the stub does ++ # not go via a PLT. This is not only better for performance, ++ # but may be necessary to avoid linker errors since there is ++ # no place to restore the TOC register in a sibling call. ++ .hidden SharedStub ++ .align 2 ++SharedStub: ++0: addis 2,12,(.TOC.-0b)@ha ++ addi 2,2,(.TOC.-0b)@l ++ .localentry SharedStub,.-SharedStub ++#else ++ .section ".text" ++ .align 2 ++ .globl SharedStub ++ .section ".opd","aw" ++ .align 3 ++ ++SharedStub: ++ .quad .SharedStub,.TOC.@tocbase ++ .previous ++ .type SharedStub,@function ++ ++.SharedStub: ++#endif ++ 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,STACK_PARAMS # 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 ++ ++#if _CALL_ELF == 2 ++ .size SharedStub,.-SharedStub ++#else ++ .size SharedStub,.-.SharedStub ++#endif ++ ++ # Magic indicating no need for an executable stack ++ .section .note.GNU-stack, "", @progbits ; .previous +Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp +=================================================================== +--- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp ++++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp +@@ -83,7 +83,9 @@ PrepareAndDispatch(nsXPTCStubBase* self, + dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles + else { + float *p = (float *)ap; ++#ifndef __LITTLE_ENDIAN__ + p++; ++#endif + dp->val.f = *p; + } + } else { /* integer type or pointer */ +@@ -153,6 +155,43 @@ PrepareAndDispatch(nsXPTCStubBase* self, + // etc. + // Use assembler directives to get the names right... + ++#if _CALL_ELF == 2 ++# define STUB_ENTRY(n) \ ++__asm__ ( \ ++ ".section \".text\" \n\t" \ ++ ".align 2 \n\t" \ ++ ".if "#n" < 10 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ ++ "0: addis 2,12,.TOC.-0b@ha \n\t" \ ++ "addi 2,2,.TOC.-0b@l \n\t" \ ++ ".localentry _ZN14nsXPTCStubBase5Stub"#n"Ev,.-_ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ \ ++ ".elseif "#n" < 100 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ ++ "0: addis 2,12,.TOC.-0b@ha \n\t" \ ++ "addi 2,2,.TOC.-0b@l \n\t" \ ++ ".localentry _ZN14nsXPTCStubBase6Stub"#n"Ev,.-_ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ \ ++ ".elseif "#n" < 1000 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ ++ "0: addis 2,12,.TOC.-0b@ha \n\t" \ ++ "addi 2,2,.TOC.-0b@l \n\t" \ ++ ".localentry _ZN14nsXPTCStubBase7Stub"#n"Ev,.-_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" \ ++); ++#else + # define STUB_ENTRY(n) \ + __asm__ ( \ + ".section \".toc\",\"aw\" \n\t" \ +@@ -195,6 +234,7 @@ __asm__ ( + "li 11,"#n" \n\t" \ + "b SharedStub \n" \ + ); ++#endif + + #define SENTINEL_ENTRY(n) \ + nsresult nsXPTCStubBase::Sentinel##n() \ diff --git a/xulrunner.spec b/xulrunner.spec index ef730b5..9721234 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 29.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -101,6 +101,7 @@ Patch200: mozilla-193-pkgconfig.patch Patch204: rhbz-966424.patch # Upstream patches +Patch300: mozilla-ppc64le.patch # --------------------------------------------------- @@ -236,6 +237,12 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 +# Upstream patches +%ifarch ppc64le +%if 0%{?fedora} > 20 +%patch300 -p1 -b .ppc64le +%endif +%endif %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -351,7 +358,7 @@ export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -516,6 +523,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 28 2014 Martin Stransky - 29.0-2 +- An updated ppc64le patch (rhbz#1091054) + * Mon Apr 28 2014 Martin Stransky - 29.0-1 - Update to 29.0 From be48b2ad622479ef421230eddd9c3abff0131ff9 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 15 May 2014 13:31:06 +0100 Subject: [PATCH 161/239] Add upstream patches for aarch64 support --- firefox-aarch64-double-convertsion.patch | 80 ++++ firefox-aarch64-libevent.patch | 115 +++++ firefox-aarch64-xpcom.patch | 517 +++++++++++++++++++++++ xulrunner.spec | 18 +- 4 files changed, 727 insertions(+), 3 deletions(-) create mode 100644 firefox-aarch64-double-convertsion.patch create mode 100644 firefox-aarch64-libevent.patch create mode 100644 firefox-aarch64-xpcom.patch diff --git a/firefox-aarch64-double-convertsion.patch b/firefox-aarch64-double-convertsion.patch new file mode 100644 index 0000000..06320be --- /dev/null +++ b/firefox-aarch64-double-convertsion.patch @@ -0,0 +1,80 @@ + +# HG changeset patch +# User Marcin Juszkiewicz +# Date 1393440196 18000 +# Node ID 6a46f53ad944b44385398822d7bcf7621a785d91 +# Parent 0aa56e2a5f816a30da48701f73d03060ee9692b2 +Bug 962488 - Update double-conversion for proper AArch64 support. r=froydnj + +Fix imported from upstream repository: +https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561 + +diff --git a/mfbt/double-conversion/fix-aarch64-macro.patch b/mfbt/double-conversion/fix-aarch64-macro.patch +new file mode 100644 +--- /dev/null ++++ b/mfbt/double-conversion/fix-aarch64-macro.patch +@@ -0,0 +1,23 @@ ++Backport from upstream. ++ ++https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561 ++ ++--- ++ mfbt/double-conversion/utils.h | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++--- a/mfbt/double-conversion/utils.h +++++ b/mfbt/double-conversion/utils.h ++@@ -58,11 +58,11 @@ ++ defined(__mips__) || \ ++ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ ++ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ ++ defined(__SH4__) || defined(__alpha__) || \ ++ defined(_MIPS_ARCH_MIPS32R2) || \ ++- defined(_AARCH64EL_) +++ defined(__AARCH64EL__) ++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 ++ #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) ++ #if defined(_WIN32) ++ // Windows uses a 64bit wide floating point stack. ++ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 +diff --git a/mfbt/double-conversion/update.sh b/mfbt/double-conversion/update.sh +--- a/mfbt/double-conversion/update.sh ++++ b/mfbt/double-conversion/update.sh +@@ -15,9 +15,12 @@ cp $1/src/*.h ./ + + # Source + cp $1/src/*.cc ./ + + patch -p3 < add-mfbt-api-markers.patch + patch -p3 < use-StandardInteger.patch + patch -p3 < use-mozilla-assertions.patch + patch -p3 < use-static_assert.patch +-patch -p3 < ToPrecision-exponential.patch +\ No newline at end of file ++patch -p3 < ToPrecision-exponential.patch ++ ++# Merged upstream, part of 2.0.1 version ++patch -p3 < fix-aarch64-macro.patch +diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h +--- a/mfbt/double-conversion/utils.h ++++ b/mfbt/double-conversion/utils.h +@@ -55,17 +55,17 @@ + #if defined(_M_X64) || defined(__x86_64__) || \ + defined(__ARMEL__) || defined(__avr32__) || \ + defined(__hppa__) || defined(__ia64__) || \ + defined(__mips__) || \ + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ + defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ + defined(__SH4__) || defined(__alpha__) || \ + defined(_MIPS_ARCH_MIPS32R2) || \ +- defined(_AARCH64EL_) ++ defined(__AARCH64EL__) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) + #if defined(_WIN32) + // Windows uses a 64bit wide floating point stack. + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #else + #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS + #endif // _WIN32 + diff --git a/firefox-aarch64-libevent.patch b/firefox-aarch64-libevent.patch new file mode 100644 index 0000000..6f9d02a --- /dev/null +++ b/firefox-aarch64-libevent.patch @@ -0,0 +1,115 @@ + +# HG changeset patch +# User Marcin Juszkiewicz +# Date 1392217668 18000 +# Node ID 4e9b713f435ade266a68a8d7ba08aad65c3fa6c5 +# Parent 282b6e88f9d4c2367a72836f6f9efeab2aadaa58 +Bug 963023 - AArch64 support for libevent. r=froydnj + +diff --git a/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch +new file mode 100644 +--- /dev/null ++++ b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch +@@ -0,0 +1,43 @@ ++--- ++ ipc/chromium/src/third_party/libevent/epoll_sub.c | 13 +++++++++++++ ++ 1 file changed, 13 insertions(+) ++ ++--- mozilla-central.orig/ipc/chromium/src/third_party/libevent/epoll_sub.c +++++ mozilla-central/ipc/chromium/src/third_party/libevent/epoll_sub.c ++@@ -29,15 +29,24 @@ ++ #include ++ #include ++ #include ++ #include ++ #include +++#include ++ ++ int ++ epoll_create(int size) ++ { +++#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) +++ if (size <= 0) { +++ errno = EINVAL; +++ return -1; +++ } +++ return (syscall(__NR_epoll_create1, 0)); +++#else ++ return (syscall(__NR_epoll_create, size)); +++#endif ++ } ++ ++ int ++ epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) ++ { ++@@ -46,7 +55,11 @@ epoll_ctl(int epfd, int op, int fd, stru ++ } ++ ++ int ++ epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) ++ { +++#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) +++ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); +++#else ++ return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); +++#endif ++ } +diff --git a/ipc/chromium/src/third_party/libevent/README.mozilla b/ipc/chromium/src/third_party/libevent/README.mozilla +--- a/ipc/chromium/src/third_party/libevent/README.mozilla ++++ b/ipc/chromium/src/third_party/libevent/README.mozilla +@@ -8,8 +8,10 @@ android/event2/event-config.h + + These files are taken from libevent-2.0.21-stable built on the development environment indicated by the first path component. You have to run "./configure" and "make" to get all of the pre-processing done. The file can then be found in "include/event2/". + + 2. This is ugly, prepare yourself. OS X has a weird problem with how the "TAILQ_END(head)" is used, causing a linking error. Just replace all use of the "TAILQ_END(head)" macro with "NULL". + + 3. Apply "add mac-arc4random-buf.patch", which removes some bad OS X compatibility code. This will allow libevent to compile on all supported versions of OS X. + + 4. Apply "openbsd-no-arc4random_addrandom.patch", which fixes the build on OpenBSD (which doesnt provide arc4random_addrandom anymore, see #931354) ++ ++5. Apply "libevent-use-non-deprecated-syscalls.patch", which fixes the build on AArch64 architecture (which does not provide deprecated syscalls) +diff --git a/ipc/chromium/src/third_party/libevent/epoll_sub.c b/ipc/chromium/src/third_party/libevent/epoll_sub.c +--- a/ipc/chromium/src/third_party/libevent/epoll_sub.c ++++ b/ipc/chromium/src/third_party/libevent/epoll_sub.c +@@ -26,27 +26,40 @@ + */ + #include + + #include + #include + #include + #include + #include ++#include + + int + epoll_create(int size) + { ++#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) ++ if (size <= 0) { ++ errno = EINVAL; ++ return -1; ++ } ++ return (syscall(__NR_epoll_create1, 0)); ++#else + return (syscall(__NR_epoll_create, size)); ++#endif + } + + int + epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) + { + + return (syscall(__NR_epoll_ctl, epfd, op, fd, event)); + } + + int + epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) + { ++#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) ++ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); ++#else + return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); ++#endif + } + diff --git a/firefox-aarch64-xpcom.patch b/firefox-aarch64-xpcom.patch new file mode 100644 index 0000000..5f70003 --- /dev/null +++ b/firefox-aarch64-xpcom.patch @@ -0,0 +1,517 @@ + +# HG changeset patch +# User Marcin Juszkiewicz +# Date 1393440196 18000 +# Node ID d56b5c1a557348d4ac14a4d1ea7a5b5d240e3647 +# Parent 6a46f53ad944b44385398822d7bcf7621a785d91 +Bug 963024 - AArch64 support for XPCOM. r=froydnj + +diff --git a/xpcom/reflect/xptcall/src/md/unix/moz.build b/xpcom/reflect/xptcall/src/md/unix/moz.build +--- a/xpcom/reflect/xptcall/src/md/unix/moz.build ++++ b/xpcom/reflect/xptcall/src/md/unix/moz.build +@@ -144,16 +144,23 @@ if CONFIG['OS_ARCH'] == 'NetBSD': + if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k', + 'next68k', 'sun3', 'sun3x', 'x68k'): + SOURCES += [ + 'xptcinvoke_netbsd_m68k.cpp', + 'xptcstubs_netbsd_m68k.cpp' + ] + + if CONFIG['OS_ARCH'] == 'Linux': ++ if CONFIG['OS_TEST'] == 'aarch64': ++ SOURCES += [ ++ 'xptcinvoke_aarch64.cpp', ++ 'xptcinvoke_asm_aarch64.s', ++ 'xptcstubs_aarch64.cpp', ++ 'xptcstubs_asm_aarch64.s', ++ ] + if CONFIG['OS_TEST'] == 'm68k': + SOURCES += [ + 'xptcinvoke_linux_m68k.cpp', + 'xptcstubs_linux_m68k.cpp', + ] + if CONFIG['OS_TEST'].find('mips') != -1: + if CONFIG['OS_TEST'].find('mips64') != -1: + SOURCES += [ +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp +new file mode 100644 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp +@@ -0,0 +1,136 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++/* Platform specific code to invoke XPCOM methods on native objects */ ++ ++#include "xptcprivate.h" ++ ++#if !defined(__aarch64__) ++#error "This code is for Linux AArch64 only." ++#endif ++ ++ ++/* "Procedure Call Standard for the ARM 64-bit Architecture" document, sections ++ * "5.4 Parameter Passing" and "6.1.2 Procedure Calling" contain all the ++ * needed information. ++ * ++ * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf ++ */ ++ ++#ifndef __AARCH64EL__ ++#error "Only little endian compatibility was tested" ++#endif ++ ++/* ++ * Allocation of integer function arguments initially to registers r1-r7 ++ * and then to stack. Handling of 'that' argument which goes to register r0 ++ * is handled separately and does not belong here. ++ * ++ * 'ireg_args' - pointer to the current position in the buffer, ++ * corresponding to the register arguments ++ * 'stack_args' - pointer to the current position in the buffer, ++ * corresponding to the arguments on stack ++ * 'end' - pointer to the end of the registers argument ++ * buffer. ++ */ ++static inline void alloc_word(uint64_t* &ireg_args, ++ uint64_t* &stack_args, ++ uint64_t* end, ++ uint64_t data) ++{ ++ if (ireg_args < end) { ++ *ireg_args = data; ++ ireg_args++; ++ } else { ++ *stack_args = data; ++ stack_args++; ++ } ++} ++ ++static inline void alloc_double(double* &freg_args, ++ uint64_t* &stack_args, ++ double* end, ++ double data) ++{ ++ if (freg_args < end) { ++ *freg_args = data; ++ freg_args++; ++ } else { ++ memcpy(stack_args, &data, sizeof(data)); ++ stack_args++; ++ } ++} ++ ++static inline void alloc_float(double* &freg_args, ++ uint64_t* &stack_args, ++ double* end, ++ float data) ++{ ++ if (freg_args < end) { ++ memcpy(freg_args, &data, sizeof(data)); ++ freg_args++; ++ } else { ++ memcpy(stack_args, &data, sizeof(data)); ++ stack_args++; ++ } ++} ++ ++ ++extern "C" void ++invoke_copy_to_stack(uint64_t* stk, uint64_t *end, ++ uint32_t paramCount, nsXPTCVariant* s) ++{ ++ uint64_t *ireg_args = stk; ++ uint64_t *ireg_end = ireg_args + 8; ++ double *freg_args = (double *)ireg_end; ++ double *freg_end = freg_args + 8; ++ uint64_t *stack_args = (uint64_t *)freg_end; ++ ++ // leave room for 'that' argument in x0 ++ ++ireg_args; ++ ++ for (uint32_t i = 0; i < paramCount; i++, s++) { ++ if (s->IsPtrData()) { ++ alloc_word(ireg_args, stack_args, ireg_end, (uint64_t)s->ptr); ++ continue; ++ } ++ // According to the ABI, integral types that are smaller than 8 bytes ++ // are to be passed in 8-byte registers or 8-byte stack slots. ++ switch (s->type) { ++ case nsXPTType::T_FLOAT: ++ alloc_float(freg_args, stack_args, freg_end, s->val.f); ++ break; ++ case nsXPTType::T_DOUBLE: ++ alloc_double(freg_args, stack_args, freg_end, s->val.d); ++ break; ++ case nsXPTType::T_I8: alloc_word(ireg_args, stk, end, s->val.i8); break; ++ case nsXPTType::T_I16: alloc_word(ireg_args, stk, end, s->val.i16); break; ++ case nsXPTType::T_I32: alloc_word(ireg_args, stk, end, s->val.i32); break; ++ case nsXPTType::T_I64: alloc_word(ireg_args, stk, end, s->val.i64); break; ++ case nsXPTType::T_U8: alloc_word(ireg_args, stk, end, s->val.u8); break; ++ case nsXPTType::T_U16: alloc_word(ireg_args, stk, end, s->val.u16); break; ++ case nsXPTType::T_U32: alloc_word(ireg_args, stk, end, s->val.u32); break; ++ case nsXPTType::T_U64: alloc_word(ireg_args, stk, end, s->val.u64); break; ++ case nsXPTType::T_BOOL: alloc_word(ireg_args, stk, end, s->val.b); break; ++ case nsXPTType::T_CHAR: alloc_word(ireg_args, stk, end, s->val.c); break; ++ case nsXPTType::T_WCHAR: alloc_word(ireg_args, stk, end, s->val.wc); break; ++ default: ++ // all the others are plain pointer types ++ alloc_word(ireg_args, stack_args, ireg_end, ++ reinterpret_cast(s->val.p)); ++ break; ++ } ++ } ++} ++ ++extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, ++ uint32_t paramCount, nsXPTCVariant* params); ++ ++EXPORT_XPCOM_API(nsresult) ++NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, ++ uint32_t paramCount, nsXPTCVariant* params) ++{ ++ return _NS_InvokeByIndex(that, methodIndex, paramCount, params); ++} +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s +new file mode 100644 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s +@@ -0,0 +1,67 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++ .section ".text" ++ .globl _NS_InvokeByIndex ++ .type _NS_InvokeByIndex,@function ++ ++/* ++ * _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, ++ * uint32_t paramCount, nsXPTCVariant* params) ++ */ ++ ++_NS_InvokeByIndex: ++ # set up frame ++ stp x29, x30, [sp,#-32]! ++ mov x29, sp ++ stp x19, x20, [sp,#16] ++ ++ # save methodIndex across function calls ++ mov w20, w1 ++ ++ # end of stack area passed to invoke_copy_to_stack ++ mov x1, sp ++ ++ # assume 8 bytes of stack for each argument with 16-byte alignment ++ add w19, w2, #1 ++ and w19, w19, #0xfffffffe ++ sub sp, sp, w19, uxth #3 ++ ++ # temporary place to store args passed in r0-r7,v0-v7 ++ sub sp, sp, #128 ++ ++ # save 'that' on stack ++ str x0, [sp] ++ ++ # start of stack area passed to invoke_copy_to_stack ++ mov x0, sp ++ bl invoke_copy_to_stack ++ ++ # load arguments passed in r0-r7 ++ ldp x6, x7, [sp, #48] ++ ldp x4, x5, [sp, #32] ++ ldp x2, x3, [sp, #16] ++ ldp x0, x1, [sp],#64 ++ ++ # load arguments passed in v0-v7 ++ ldp d6, d7, [sp, #48] ++ ldp d4, d5, [sp, #32] ++ ldp d2, d3, [sp, #16] ++ ldp d0, d1, [sp],#64 ++ ++ # call the method ++ ldr x16, [x0] ++ add x16, x16, w20, uxth #3 ++ ldr x16, [x16] ++ blr x16 ++ ++ add sp, sp, w19, uxth #3 ++ ldp x19, x20, [sp,#16] ++ ldp x29, x30, [sp],#32 ++ ret ++ ++ .size _NS_InvokeByIndex, . - _NS_InvokeByIndex ++ ++ +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp +new file mode 100644 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp +@@ -0,0 +1,219 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ ++/* This Source Code Form is subject to the terms of the Mozilla Public ++ * License, v. 2.0. If a copy of the MPL was not distributed with this ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ ++ ++#include "xptcprivate.h" ++#include "xptiprivate.h" ++ ++#ifndef __AARCH64EL__ ++#error "Only little endian compatibility was tested" ++#endif ++ ++/* ++ * This is for AArch64 ABI ++ * ++ * When we're called, the "gp" registers are stored in gprData and ++ * the "fp" registers are stored in fprData. Each array has 8 regs ++ * but first reg in gprData is a placeholder for 'self'. ++ */ ++extern "C" nsresult ++PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args, ++ uint64_t *gprData, double *fprData) ++{ ++#define PARAM_BUFFER_COUNT 16 ++#define PARAM_GPR_COUNT 8 ++#define PARAM_FPR_COUNT 8 ++ ++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; ++ nsXPTCMiniVariant* dispatchParams = NULL; ++ const nsXPTMethodInfo* info; ++ nsresult result = NS_ERROR_FAILURE; ++ ++ NS_ASSERTION(self,"no self"); ++ ++ self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info); ++ NS_ASSERTION(info,"no method info"); ++ ++ uint32_t 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"); ++ ++ uint64_t* ap = args; ++ uint32_t next_gpr = 1; // skip first arg which is 'self' ++ uint32_t next_fpr = 0; ++ for (uint32_t i = 0; i < paramCount; i++) { ++ const nsXPTParamInfo& param = info->GetParam(i); ++ const nsXPTType& type = param.GetType(); ++ nsXPTCMiniVariant* dp = &dispatchParams[i]; ++ ++ if (param.IsOut() || !type.IsArithmetic()) { ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.p = (void*)gprData[next_gpr++]; ++ } else { ++ dp->val.p = (void*)*ap++; ++ } ++ continue; ++ } ++ ++ switch (type) { ++ case nsXPTType::T_I8: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.i8 = (int8_t)gprData[next_gpr++]; ++ } else { ++ dp->val.i8 = (int8_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_I16: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.i16 = (int16_t)gprData[next_gpr++]; ++ } else { ++ dp->val.i16 = (int16_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_I32: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.i32 = (int32_t)gprData[next_gpr++]; ++ } else { ++ dp->val.i32 = (int32_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_I64: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.i64 = (int64_t)gprData[next_gpr++]; ++ } else { ++ dp->val.i64 = (int64_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_U8: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.u8 = (uint8_t)gprData[next_gpr++]; ++ } else { ++ dp->val.u8 = (uint8_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_U16: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.u16 = (uint16_t)gprData[next_gpr++]; ++ } else { ++ dp->val.u16 = (uint16_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_U32: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.u32 = (uint32_t)gprData[next_gpr++]; ++ } else { ++ dp->val.u32 = (uint32_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_U64: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.u64 = (uint64_t)gprData[next_gpr++]; ++ } else { ++ dp->val.u64 = (uint64_t)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_FLOAT: ++ if (next_fpr < PARAM_FPR_COUNT) { ++ memcpy(&dp->val.f, &fprData[next_fpr++], sizeof(dp->val.f)); ++ } else { ++ memcpy(&dp->val.f, ap++, sizeof(dp->val.f)); ++ } ++ break; ++ ++ case nsXPTType::T_DOUBLE: ++ if (next_fpr < PARAM_FPR_COUNT) { ++ memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d)); ++ } else { ++ memcpy(&dp->val.d, ap++, sizeof(dp->val.d)); ++ } ++ break; ++ ++ case nsXPTType::T_BOOL: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.b = (bool)gprData[next_gpr++]; ++ } else { ++ dp->val.b = (bool)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_CHAR: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.c = (char)gprData[next_gpr++]; ++ } else { ++ dp->val.c = (char)*ap++; ++ } ++ break; ++ ++ case nsXPTType::T_WCHAR: ++ if (next_gpr < PARAM_GPR_COUNT) { ++ dp->val.wc = (wchar_t)gprData[next_gpr++]; ++ } else { ++ dp->val.wc = (wchar_t)*ap++; ++ } ++ break; ++ ++ default: ++ NS_ASSERTION(0, "bad type"); ++ break; ++ } ++ } ++ ++ result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams); ++ ++ if (dispatchParams != paramBuffer) { ++ delete [] dispatchParams; ++ } ++ ++ return result; ++} ++ ++// Load w17 with the constant 'n' and branch to SharedStub(). ++# define STUB_ENTRY(n) \ ++ __asm__ ( \ ++ ".section \".text\" \n\t" \ ++ ".align 2\n\t" \ ++ ".if "#n" < 10 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ ".hidden _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ ++ "_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ ++ ".elseif "#n" < 100 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ ".hidden _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ ++ "_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ ++ ".elseif "#n" < 1000 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ ".hidden _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ ++ "_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ ++ ".else \n\t" \ ++ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ ++ ".endif \n\t" \ ++ "mov w17,#"#n" \n\t" \ ++ "b SharedStub \n" \ ++); ++ ++#define SENTINEL_ENTRY(n) \ ++ nsresult nsXPTCStubBase::Sentinel##n() \ ++{ \ ++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ ++ return NS_ERROR_NOT_IMPLEMENTED; \ ++} ++ ++#include "xptcstubsdef.inc" +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s +new file mode 100644 +--- /dev/null ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s +@@ -0,0 +1,39 @@ ++# This Source Code Form is subject to the terms of the Mozilla Public ++# License, v. 2.0. If a copy of the MPL was not distributed with this ++# file, You can obtain one at http://mozilla.org/MPL/2.0/. ++ ++ .set NGPREGS,8 ++ .set NFPREGS,8 ++ ++ .section ".text" ++ .globl SharedStub ++ .hidden SharedStub ++ .type SharedStub,@function ++SharedStub: ++ stp x29, x30, [sp,#-16]! ++ mov x29, sp ++ ++ sub sp, sp, #8*(NGPREGS+NFPREGS) ++ stp x0, x1, [sp, #64+(0*8)] ++ stp x2, x3, [sp, #64+(2*8)] ++ stp x4, x5, [sp, #64+(4*8)] ++ stp x6, x7, [sp, #64+(6*8)] ++ stp d0, d1, [sp, #(0*8)] ++ stp d2, d3, [sp, #(2*8)] ++ stp d4, d5, [sp, #(4*8)] ++ stp d6, d7, [sp, #(6*8)] ++ ++ # methodIndex passed from stub ++ mov w1, w17 ++ ++ add x2, sp, #16+(8*(NGPREGS+NFPREGS)) ++ add x3, sp, #8*NFPREGS ++ add x4, sp, #0 ++ ++ bl PrepareAndDispatch ++ ++ add sp, sp, #8*(NGPREGS+NFPREGS) ++ ldp x29, x30, [sp],#16 ++ ret ++ ++ .size SharedStub, . - SharedStub + diff --git a/xulrunner.spec b/xulrunner.spec index 9721234..b828e5f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 29.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,6 +102,12 @@ Patch204: rhbz-966424.patch # Upstream patches Patch300: mozilla-ppc64le.patch +# mbo 962488 +Patch301: firefox-aarch64-double-convertsion.patch +# mbo 963023 +Patch302: firefox-aarch64-libevent.patch +# mbo 963024 +Patch303: firefox-aarch64-xpcom.patch # --------------------------------------------------- @@ -243,6 +249,9 @@ cd %{tarballdir} %patch300 -p1 -b .ppc64le %endif %endif +%patch301 -p1 -b .aarch64-dbl +%patch302 -p1 -b .aarch64-libevent +%patch303 -p1 -b .aarch64-xpcom %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -344,7 +353,7 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %ifarch s390 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif -%ifarch s390 %{arm} ppc +%ifarch s390 %{arm} ppc aarch64 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif @@ -358,7 +367,7 @@ export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -523,6 +532,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 15 2014 Peter Robinson 29.0-3 +- Add upstream patches for aarch64 support + * Mon Apr 28 2014 Martin Stransky - 29.0-2 - An updated ppc64le patch (rhbz#1091054) From 82c583ffad111011fb95c25e23d6dcc879429713 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 15 May 2014 23:21:10 +0100 Subject: [PATCH 162/239] Update aarch64 bits --- xulrunner.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index b828e5f..58c5855 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 29.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -339,6 +339,9 @@ esac cd %{tarballdir} +# Update the various config.guess to upstream release for aarch64 support +find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' + # -fpermissive is needed to build with gcc 4.6+ which has become stricter # # Mozilla builds with -Wall with exception of a few warnings which show up @@ -367,7 +370,7 @@ export LIBDIR='%{_libdir}' MOZ_SMP_FLAGS=-j1 # On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, # however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 %{arm} [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -532,6 +535,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 15 2014 Peter Robinson 29.0-4 +- Update aarch64 bits + * Thu May 15 2014 Peter Robinson 29.0-3 - Add upstream patches for aarch64 support From 9fb1131d7509123b0fe333f154bab7439bbab2b3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 23 May 2014 17:47:08 +0200 Subject: [PATCH 163/239] Added a build fix for ppc64 - rhbz#1100495 --- mozilla-973977.patch | 31 +++++++++++++++++++++++++++++++ xulrunner.spec | 9 ++++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 mozilla-973977.patch diff --git a/mozilla-973977.patch b/mozilla-973977.patch new file mode 100644 index 0000000..d8ec932 --- /dev/null +++ b/mozilla-973977.patch @@ -0,0 +1,31 @@ +# HG changeset patch +# Parent c2172c2aaa693e00c989f76c83b83a2be97afaab +# User Ulrich Weigand +Bug 973977 - Mark SharedStub hidden to fix ppc64 build failure + + +diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s +--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s ++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s +@@ -15,16 +15,21 @@ + .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 ++ # Make the symbol hidden so that the branch from the stub does ++ # not go via a PLT. This is not only better for performance, ++ # but may be necessary to avoid linker errors since there is ++ # no place to restore the TOC register in a sibling call. ++ .hidden SharedStub + .section ".opd","aw" + .align 3 + + SharedStub: + .quad .SharedStub,.TOC.@tocbase + .previous + .type SharedStub,@function + diff --git a/xulrunner.spec b/xulrunner.spec index 58c5855..da3fb6d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 29.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -108,6 +108,7 @@ Patch301: firefox-aarch64-double-convertsion.patch Patch302: firefox-aarch64-libevent.patch # mbo 963024 Patch303: firefox-aarch64-xpcom.patch +Patch304: mozilla-973977.patch # --------------------------------------------------- @@ -252,6 +253,9 @@ cd %{tarballdir} %patch301 -p1 -b .aarch64-dbl %patch302 -p1 -b .aarch64-libevent %patch303 -p1 -b .aarch64-xpcom +%ifarch ppc64 +%patch304 -p1 -b .973977 +%endif %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -535,6 +539,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri May 23 2014 Martin Stransky - 29.0-5 +- Added a build fix for ppc64 - rhbz#1100495 + * Thu May 15 2014 Peter Robinson 29.0-4 - Update aarch64 bits From 4efab6c15bfc99ce8c5cf917831f46c597cdd3cc Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Jun 2014 09:37:31 +0200 Subject: [PATCH 164/239] Update to 30.0 build 1, disabled shared js --- firefox-aarch64-double-convertsion.patch | 80 - firefox-aarch64-libevent.patch | 115 - firefox-aarch64-xpcom.patch | 517 --- mozilla-973977.patch | 31 - mozilla-ppc64le.patch | 5061 ---------------------- xulrunner-mozconfig | 1 - xulrunner.spec | 28 +- 7 files changed, 7 insertions(+), 5826 deletions(-) delete mode 100644 firefox-aarch64-double-convertsion.patch delete mode 100644 firefox-aarch64-libevent.patch delete mode 100644 firefox-aarch64-xpcom.patch delete mode 100644 mozilla-973977.patch delete mode 100644 mozilla-ppc64le.patch diff --git a/firefox-aarch64-double-convertsion.patch b/firefox-aarch64-double-convertsion.patch deleted file mode 100644 index 06320be..0000000 --- a/firefox-aarch64-double-convertsion.patch +++ /dev/null @@ -1,80 +0,0 @@ - -# HG changeset patch -# User Marcin Juszkiewicz -# Date 1393440196 18000 -# Node ID 6a46f53ad944b44385398822d7bcf7621a785d91 -# Parent 0aa56e2a5f816a30da48701f73d03060ee9692b2 -Bug 962488 - Update double-conversion for proper AArch64 support. r=froydnj - -Fix imported from upstream repository: -https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561 - -diff --git a/mfbt/double-conversion/fix-aarch64-macro.patch b/mfbt/double-conversion/fix-aarch64-macro.patch -new file mode 100644 ---- /dev/null -+++ b/mfbt/double-conversion/fix-aarch64-macro.patch -@@ -0,0 +1,23 @@ -+Backport from upstream. -+ -+https://code.google.com/p/double-conversion/source/detail?r=4e24bb31bcc76d6d218f3056b4c24a109d367561 -+ -+--- -+ mfbt/double-conversion/utils.h | 2 +- -+ 1 file changed, 1 insertion(+), 1 deletion(-) -+ -+--- a/mfbt/double-conversion/utils.h -++++ b/mfbt/double-conversion/utils.h -+@@ -58,11 +58,11 @@ -+ defined(__mips__) || \ -+ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ -+ defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ -+ defined(__SH4__) || defined(__alpha__) || \ -+ defined(_MIPS_ARCH_MIPS32R2) || \ -+- defined(_AARCH64EL_) -++ defined(__AARCH64EL__) -+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 -+ #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) -+ #if defined(_WIN32) -+ // Windows uses a 64bit wide floating point stack. -+ #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 -diff --git a/mfbt/double-conversion/update.sh b/mfbt/double-conversion/update.sh ---- a/mfbt/double-conversion/update.sh -+++ b/mfbt/double-conversion/update.sh -@@ -15,9 +15,12 @@ cp $1/src/*.h ./ - - # Source - cp $1/src/*.cc ./ - - patch -p3 < add-mfbt-api-markers.patch - patch -p3 < use-StandardInteger.patch - patch -p3 < use-mozilla-assertions.patch - patch -p3 < use-static_assert.patch --patch -p3 < ToPrecision-exponential.patch -\ No newline at end of file -+patch -p3 < ToPrecision-exponential.patch -+ -+# Merged upstream, part of 2.0.1 version -+patch -p3 < fix-aarch64-macro.patch -diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -55,17 +55,17 @@ - #if defined(_M_X64) || defined(__x86_64__) || \ - defined(__ARMEL__) || defined(__avr32__) || \ - defined(__hppa__) || defined(__ia64__) || \ - defined(__mips__) || \ - defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ - defined(__SH4__) || defined(__alpha__) || \ - defined(_MIPS_ARCH_MIPS32R2) || \ -- defined(_AARCH64EL_) -+ defined(__AARCH64EL__) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) - #if defined(_WIN32) - // Windows uses a 64bit wide floating point stack. - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #else - #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS - #endif // _WIN32 - diff --git a/firefox-aarch64-libevent.patch b/firefox-aarch64-libevent.patch deleted file mode 100644 index 6f9d02a..0000000 --- a/firefox-aarch64-libevent.patch +++ /dev/null @@ -1,115 +0,0 @@ - -# HG changeset patch -# User Marcin Juszkiewicz -# Date 1392217668 18000 -# Node ID 4e9b713f435ade266a68a8d7ba08aad65c3fa6c5 -# Parent 282b6e88f9d4c2367a72836f6f9efeab2aadaa58 -Bug 963023 - AArch64 support for libevent. r=froydnj - -diff --git a/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch -new file mode 100644 ---- /dev/null -+++ b/ipc/chromium/src/third_party/libevent-use-non-deprecated-syscalls.patch -@@ -0,0 +1,43 @@ -+--- -+ ipc/chromium/src/third_party/libevent/epoll_sub.c | 13 +++++++++++++ -+ 1 file changed, 13 insertions(+) -+ -+--- mozilla-central.orig/ipc/chromium/src/third_party/libevent/epoll_sub.c -++++ mozilla-central/ipc/chromium/src/third_party/libevent/epoll_sub.c -+@@ -29,15 +29,24 @@ -+ #include -+ #include -+ #include -+ #include -+ #include -++#include -+ -+ int -+ epoll_create(int size) -+ { -++#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) -++ if (size <= 0) { -++ errno = EINVAL; -++ return -1; -++ } -++ return (syscall(__NR_epoll_create1, 0)); -++#else -+ return (syscall(__NR_epoll_create, size)); -++#endif -+ } -+ -+ int -+ epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) -+ { -+@@ -46,7 +55,11 @@ epoll_ctl(int epfd, int op, int fd, stru -+ } -+ -+ int -+ epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) -+ { -++#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) -++ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); -++#else -+ return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); -++#endif -+ } -diff --git a/ipc/chromium/src/third_party/libevent/README.mozilla b/ipc/chromium/src/third_party/libevent/README.mozilla ---- a/ipc/chromium/src/third_party/libevent/README.mozilla -+++ b/ipc/chromium/src/third_party/libevent/README.mozilla -@@ -8,8 +8,10 @@ android/event2/event-config.h - - These files are taken from libevent-2.0.21-stable built on the development environment indicated by the first path component. You have to run "./configure" and "make" to get all of the pre-processing done. The file can then be found in "include/event2/". - - 2. This is ugly, prepare yourself. OS X has a weird problem with how the "TAILQ_END(head)" is used, causing a linking error. Just replace all use of the "TAILQ_END(head)" macro with "NULL". - - 3. Apply "add mac-arc4random-buf.patch", which removes some bad OS X compatibility code. This will allow libevent to compile on all supported versions of OS X. - - 4. Apply "openbsd-no-arc4random_addrandom.patch", which fixes the build on OpenBSD (which doesnt provide arc4random_addrandom anymore, see #931354) -+ -+5. Apply "libevent-use-non-deprecated-syscalls.patch", which fixes the build on AArch64 architecture (which does not provide deprecated syscalls) -diff --git a/ipc/chromium/src/third_party/libevent/epoll_sub.c b/ipc/chromium/src/third_party/libevent/epoll_sub.c ---- a/ipc/chromium/src/third_party/libevent/epoll_sub.c -+++ b/ipc/chromium/src/third_party/libevent/epoll_sub.c -@@ -26,27 +26,40 @@ - */ - #include - - #include - #include - #include - #include - #include -+#include - - int - epoll_create(int size) - { -+#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1) -+ if (size <= 0) { -+ errno = EINVAL; -+ return -1; -+ } -+ return (syscall(__NR_epoll_create1, 0)); -+#else - return (syscall(__NR_epoll_create, size)); -+#endif - } - - int - epoll_ctl(int epfd, int op, int fd, struct epoll_event *event) - { - - return (syscall(__NR_epoll_ctl, epfd, op, fd, event)); - } - - int - epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout) - { -+#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait) -+ return (syscall(__NR_epoll_pwait, epfd, events, maxevents, timeout, NULL, 0)); -+#else - return (syscall(__NR_epoll_wait, epfd, events, maxevents, timeout)); -+#endif - } - diff --git a/firefox-aarch64-xpcom.patch b/firefox-aarch64-xpcom.patch deleted file mode 100644 index 5f70003..0000000 --- a/firefox-aarch64-xpcom.patch +++ /dev/null @@ -1,517 +0,0 @@ - -# HG changeset patch -# User Marcin Juszkiewicz -# Date 1393440196 18000 -# Node ID d56b5c1a557348d4ac14a4d1ea7a5b5d240e3647 -# Parent 6a46f53ad944b44385398822d7bcf7621a785d91 -Bug 963024 - AArch64 support for XPCOM. r=froydnj - -diff --git a/xpcom/reflect/xptcall/src/md/unix/moz.build b/xpcom/reflect/xptcall/src/md/unix/moz.build ---- a/xpcom/reflect/xptcall/src/md/unix/moz.build -+++ b/xpcom/reflect/xptcall/src/md/unix/moz.build -@@ -144,16 +144,23 @@ if CONFIG['OS_ARCH'] == 'NetBSD': - if CONFIG['OS_TEST'] in ('amiga', 'atari', 'hp300', 'mac68k', 'mvme68k', - 'next68k', 'sun3', 'sun3x', 'x68k'): - SOURCES += [ - 'xptcinvoke_netbsd_m68k.cpp', - 'xptcstubs_netbsd_m68k.cpp' - ] - - if CONFIG['OS_ARCH'] == 'Linux': -+ if CONFIG['OS_TEST'] == 'aarch64': -+ SOURCES += [ -+ 'xptcinvoke_aarch64.cpp', -+ 'xptcinvoke_asm_aarch64.s', -+ 'xptcstubs_aarch64.cpp', -+ 'xptcstubs_asm_aarch64.s', -+ ] - if CONFIG['OS_TEST'] == 'm68k': - SOURCES += [ - 'xptcinvoke_linux_m68k.cpp', - 'xptcstubs_linux_m68k.cpp', - ] - if CONFIG['OS_TEST'].find('mips') != -1: - if CONFIG['OS_TEST'].find('mips64') != -1: - SOURCES += [ -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp -new file mode 100644 ---- /dev/null -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_aarch64.cpp -@@ -0,0 +1,136 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+/* Platform specific code to invoke XPCOM methods on native objects */ -+ -+#include "xptcprivate.h" -+ -+#if !defined(__aarch64__) -+#error "This code is for Linux AArch64 only." -+#endif -+ -+ -+/* "Procedure Call Standard for the ARM 64-bit Architecture" document, sections -+ * "5.4 Parameter Passing" and "6.1.2 Procedure Calling" contain all the -+ * needed information. -+ * -+ * http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf -+ */ -+ -+#ifndef __AARCH64EL__ -+#error "Only little endian compatibility was tested" -+#endif -+ -+/* -+ * Allocation of integer function arguments initially to registers r1-r7 -+ * and then to stack. Handling of 'that' argument which goes to register r0 -+ * is handled separately and does not belong here. -+ * -+ * 'ireg_args' - pointer to the current position in the buffer, -+ * corresponding to the register arguments -+ * 'stack_args' - pointer to the current position in the buffer, -+ * corresponding to the arguments on stack -+ * 'end' - pointer to the end of the registers argument -+ * buffer. -+ */ -+static inline void alloc_word(uint64_t* &ireg_args, -+ uint64_t* &stack_args, -+ uint64_t* end, -+ uint64_t data) -+{ -+ if (ireg_args < end) { -+ *ireg_args = data; -+ ireg_args++; -+ } else { -+ *stack_args = data; -+ stack_args++; -+ } -+} -+ -+static inline void alloc_double(double* &freg_args, -+ uint64_t* &stack_args, -+ double* end, -+ double data) -+{ -+ if (freg_args < end) { -+ *freg_args = data; -+ freg_args++; -+ } else { -+ memcpy(stack_args, &data, sizeof(data)); -+ stack_args++; -+ } -+} -+ -+static inline void alloc_float(double* &freg_args, -+ uint64_t* &stack_args, -+ double* end, -+ float data) -+{ -+ if (freg_args < end) { -+ memcpy(freg_args, &data, sizeof(data)); -+ freg_args++; -+ } else { -+ memcpy(stack_args, &data, sizeof(data)); -+ stack_args++; -+ } -+} -+ -+ -+extern "C" void -+invoke_copy_to_stack(uint64_t* stk, uint64_t *end, -+ uint32_t paramCount, nsXPTCVariant* s) -+{ -+ uint64_t *ireg_args = stk; -+ uint64_t *ireg_end = ireg_args + 8; -+ double *freg_args = (double *)ireg_end; -+ double *freg_end = freg_args + 8; -+ uint64_t *stack_args = (uint64_t *)freg_end; -+ -+ // leave room for 'that' argument in x0 -+ ++ireg_args; -+ -+ for (uint32_t i = 0; i < paramCount; i++, s++) { -+ if (s->IsPtrData()) { -+ alloc_word(ireg_args, stack_args, ireg_end, (uint64_t)s->ptr); -+ continue; -+ } -+ // According to the ABI, integral types that are smaller than 8 bytes -+ // are to be passed in 8-byte registers or 8-byte stack slots. -+ switch (s->type) { -+ case nsXPTType::T_FLOAT: -+ alloc_float(freg_args, stack_args, freg_end, s->val.f); -+ break; -+ case nsXPTType::T_DOUBLE: -+ alloc_double(freg_args, stack_args, freg_end, s->val.d); -+ break; -+ case nsXPTType::T_I8: alloc_word(ireg_args, stk, end, s->val.i8); break; -+ case nsXPTType::T_I16: alloc_word(ireg_args, stk, end, s->val.i16); break; -+ case nsXPTType::T_I32: alloc_word(ireg_args, stk, end, s->val.i32); break; -+ case nsXPTType::T_I64: alloc_word(ireg_args, stk, end, s->val.i64); break; -+ case nsXPTType::T_U8: alloc_word(ireg_args, stk, end, s->val.u8); break; -+ case nsXPTType::T_U16: alloc_word(ireg_args, stk, end, s->val.u16); break; -+ case nsXPTType::T_U32: alloc_word(ireg_args, stk, end, s->val.u32); break; -+ case nsXPTType::T_U64: alloc_word(ireg_args, stk, end, s->val.u64); break; -+ case nsXPTType::T_BOOL: alloc_word(ireg_args, stk, end, s->val.b); break; -+ case nsXPTType::T_CHAR: alloc_word(ireg_args, stk, end, s->val.c); break; -+ case nsXPTType::T_WCHAR: alloc_word(ireg_args, stk, end, s->val.wc); break; -+ default: -+ // all the others are plain pointer types -+ alloc_word(ireg_args, stack_args, ireg_end, -+ reinterpret_cast(s->val.p)); -+ break; -+ } -+ } -+} -+ -+extern "C" nsresult _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+ uint32_t paramCount, nsXPTCVariant* params); -+ -+EXPORT_XPCOM_API(nsresult) -+NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+ uint32_t paramCount, nsXPTCVariant* params) -+{ -+ return _NS_InvokeByIndex(that, methodIndex, paramCount, params); -+} -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s -new file mode 100644 ---- /dev/null -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_aarch64.s -@@ -0,0 +1,67 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+ .section ".text" -+ .globl _NS_InvokeByIndex -+ .type _NS_InvokeByIndex,@function -+ -+/* -+ * _NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+ * uint32_t paramCount, nsXPTCVariant* params) -+ */ -+ -+_NS_InvokeByIndex: -+ # set up frame -+ stp x29, x30, [sp,#-32]! -+ mov x29, sp -+ stp x19, x20, [sp,#16] -+ -+ # save methodIndex across function calls -+ mov w20, w1 -+ -+ # end of stack area passed to invoke_copy_to_stack -+ mov x1, sp -+ -+ # assume 8 bytes of stack for each argument with 16-byte alignment -+ add w19, w2, #1 -+ and w19, w19, #0xfffffffe -+ sub sp, sp, w19, uxth #3 -+ -+ # temporary place to store args passed in r0-r7,v0-v7 -+ sub sp, sp, #128 -+ -+ # save 'that' on stack -+ str x0, [sp] -+ -+ # start of stack area passed to invoke_copy_to_stack -+ mov x0, sp -+ bl invoke_copy_to_stack -+ -+ # load arguments passed in r0-r7 -+ ldp x6, x7, [sp, #48] -+ ldp x4, x5, [sp, #32] -+ ldp x2, x3, [sp, #16] -+ ldp x0, x1, [sp],#64 -+ -+ # load arguments passed in v0-v7 -+ ldp d6, d7, [sp, #48] -+ ldp d4, d5, [sp, #32] -+ ldp d2, d3, [sp, #16] -+ ldp d0, d1, [sp],#64 -+ -+ # call the method -+ ldr x16, [x0] -+ add x16, x16, w20, uxth #3 -+ ldr x16, [x16] -+ blr x16 -+ -+ add sp, sp, w19, uxth #3 -+ ldp x19, x20, [sp,#16] -+ ldp x29, x30, [sp],#32 -+ ret -+ -+ .size _NS_InvokeByIndex, . - _NS_InvokeByIndex -+ -+ -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp -new file mode 100644 ---- /dev/null -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_aarch64.cpp -@@ -0,0 +1,219 @@ -+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -+/* This Source Code Form is subject to the terms of the Mozilla Public -+ * License, v. 2.0. If a copy of the MPL was not distributed with this -+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -+ -+#include "xptcprivate.h" -+#include "xptiprivate.h" -+ -+#ifndef __AARCH64EL__ -+#error "Only little endian compatibility was tested" -+#endif -+ -+/* -+ * This is for AArch64 ABI -+ * -+ * When we're called, the "gp" registers are stored in gprData and -+ * the "fp" registers are stored in fprData. Each array has 8 regs -+ * but first reg in gprData is a placeholder for 'self'. -+ */ -+extern "C" nsresult -+PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args, -+ uint64_t *gprData, double *fprData) -+{ -+#define PARAM_BUFFER_COUNT 16 -+#define PARAM_GPR_COUNT 8 -+#define PARAM_FPR_COUNT 8 -+ -+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; -+ nsXPTCMiniVariant* dispatchParams = NULL; -+ const nsXPTMethodInfo* info; -+ nsresult result = NS_ERROR_FAILURE; -+ -+ NS_ASSERTION(self,"no self"); -+ -+ self->mEntry->GetMethodInfo(uint16_t(methodIndex), &info); -+ NS_ASSERTION(info,"no method info"); -+ -+ uint32_t 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"); -+ -+ uint64_t* ap = args; -+ uint32_t next_gpr = 1; // skip first arg which is 'self' -+ uint32_t next_fpr = 0; -+ for (uint32_t i = 0; i < paramCount; i++) { -+ const nsXPTParamInfo& param = info->GetParam(i); -+ const nsXPTType& type = param.GetType(); -+ nsXPTCMiniVariant* dp = &dispatchParams[i]; -+ -+ if (param.IsOut() || !type.IsArithmetic()) { -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.p = (void*)gprData[next_gpr++]; -+ } else { -+ dp->val.p = (void*)*ap++; -+ } -+ continue; -+ } -+ -+ switch (type) { -+ case nsXPTType::T_I8: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.i8 = (int8_t)gprData[next_gpr++]; -+ } else { -+ dp->val.i8 = (int8_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_I16: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.i16 = (int16_t)gprData[next_gpr++]; -+ } else { -+ dp->val.i16 = (int16_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_I32: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.i32 = (int32_t)gprData[next_gpr++]; -+ } else { -+ dp->val.i32 = (int32_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_I64: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.i64 = (int64_t)gprData[next_gpr++]; -+ } else { -+ dp->val.i64 = (int64_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_U8: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.u8 = (uint8_t)gprData[next_gpr++]; -+ } else { -+ dp->val.u8 = (uint8_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_U16: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.u16 = (uint16_t)gprData[next_gpr++]; -+ } else { -+ dp->val.u16 = (uint16_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_U32: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.u32 = (uint32_t)gprData[next_gpr++]; -+ } else { -+ dp->val.u32 = (uint32_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_U64: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.u64 = (uint64_t)gprData[next_gpr++]; -+ } else { -+ dp->val.u64 = (uint64_t)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_FLOAT: -+ if (next_fpr < PARAM_FPR_COUNT) { -+ memcpy(&dp->val.f, &fprData[next_fpr++], sizeof(dp->val.f)); -+ } else { -+ memcpy(&dp->val.f, ap++, sizeof(dp->val.f)); -+ } -+ break; -+ -+ case nsXPTType::T_DOUBLE: -+ if (next_fpr < PARAM_FPR_COUNT) { -+ memcpy(&dp->val.d, &fprData[next_fpr++], sizeof(dp->val.d)); -+ } else { -+ memcpy(&dp->val.d, ap++, sizeof(dp->val.d)); -+ } -+ break; -+ -+ case nsXPTType::T_BOOL: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.b = (bool)gprData[next_gpr++]; -+ } else { -+ dp->val.b = (bool)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_CHAR: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.c = (char)gprData[next_gpr++]; -+ } else { -+ dp->val.c = (char)*ap++; -+ } -+ break; -+ -+ case nsXPTType::T_WCHAR: -+ if (next_gpr < PARAM_GPR_COUNT) { -+ dp->val.wc = (wchar_t)gprData[next_gpr++]; -+ } else { -+ dp->val.wc = (wchar_t)*ap++; -+ } -+ break; -+ -+ default: -+ NS_ASSERTION(0, "bad type"); -+ break; -+ } -+ } -+ -+ result = self->mOuter->CallMethod((uint16_t)methodIndex, info, dispatchParams); -+ -+ if (dispatchParams != paramBuffer) { -+ delete [] dispatchParams; -+ } -+ -+ return result; -+} -+ -+// Load w17 with the constant 'n' and branch to SharedStub(). -+# define STUB_ENTRY(n) \ -+ __asm__ ( \ -+ ".section \".text\" \n\t" \ -+ ".align 2\n\t" \ -+ ".if "#n" < 10 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ -+ ".hidden _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ -+ "_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ -+ ".elseif "#n" < 100 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ -+ ".hidden _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ -+ "_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ -+ ".elseif "#n" < 1000 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ -+ ".hidden _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ -+ "_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ -+ ".else \n\t" \ -+ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ -+ ".endif \n\t" \ -+ "mov w17,#"#n" \n\t" \ -+ "b SharedStub \n" \ -+); -+ -+#define SENTINEL_ENTRY(n) \ -+ nsresult nsXPTCStubBase::Sentinel##n() \ -+{ \ -+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ -+ return NS_ERROR_NOT_IMPLEMENTED; \ -+} -+ -+#include "xptcstubsdef.inc" -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s -new file mode 100644 ---- /dev/null -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_aarch64.s -@@ -0,0 +1,39 @@ -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this -+# file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ -+ .set NGPREGS,8 -+ .set NFPREGS,8 -+ -+ .section ".text" -+ .globl SharedStub -+ .hidden SharedStub -+ .type SharedStub,@function -+SharedStub: -+ stp x29, x30, [sp,#-16]! -+ mov x29, sp -+ -+ sub sp, sp, #8*(NGPREGS+NFPREGS) -+ stp x0, x1, [sp, #64+(0*8)] -+ stp x2, x3, [sp, #64+(2*8)] -+ stp x4, x5, [sp, #64+(4*8)] -+ stp x6, x7, [sp, #64+(6*8)] -+ stp d0, d1, [sp, #(0*8)] -+ stp d2, d3, [sp, #(2*8)] -+ stp d4, d5, [sp, #(4*8)] -+ stp d6, d7, [sp, #(6*8)] -+ -+ # methodIndex passed from stub -+ mov w1, w17 -+ -+ add x2, sp, #16+(8*(NGPREGS+NFPREGS)) -+ add x3, sp, #8*NFPREGS -+ add x4, sp, #0 -+ -+ bl PrepareAndDispatch -+ -+ add sp, sp, #8*(NGPREGS+NFPREGS) -+ ldp x29, x30, [sp],#16 -+ ret -+ -+ .size SharedStub, . - SharedStub - diff --git a/mozilla-973977.patch b/mozilla-973977.patch deleted file mode 100644 index d8ec932..0000000 --- a/mozilla-973977.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# Parent c2172c2aaa693e00c989f76c83b83a2be97afaab -# User Ulrich Weigand -Bug 973977 - Mark SharedStub hidden to fix ppc64 build failure - - -diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s ---- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s -+++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s -@@ -15,16 +15,21 @@ - .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 -+ # Make the symbol hidden so that the branch from the stub does -+ # not go via a PLT. This is not only better for performance, -+ # but may be necessary to avoid linker errors since there is -+ # no place to restore the TOC register in a sibling call. -+ .hidden SharedStub - .section ".opd","aw" - .align 3 - - SharedStub: - .quad .SharedStub,.TOC.@tocbase - .previous - .type SharedStub,@function - diff --git a/mozilla-ppc64le.patch b/mozilla-ppc64le.patch deleted file mode 100644 index bb340cb..0000000 --- a/mozilla-ppc64le.patch +++ /dev/null @@ -1,5061 +0,0 @@ -# HG changeset patch -# Parent 007cf000fdf7c5048939a87f63165a67fd9db5f6 -# User Ulrich Weigand -Bug 976648 - powerpc64le-linux support - toplevel build/config - -Index: mozilla-release/build/autoconf/config.guess -=================================================================== ---- mozilla-release.orig/build/autoconf/config.guess -+++ mozilla-release/build/autoconf/config.guess -@@ -1,14 +1,12 @@ - #! /bin/sh - # Attempt to guess a canonical system name. --# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 --# Free Software Foundation, Inc. -+# Copyright 1992-2014 Free Software Foundation, Inc. - --timestamp='2009-08-19' -+timestamp='2014-02-12' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or -+# the Free Software Foundation; either version 3 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but -@@ -17,26 +15,22 @@ timestamp='2009-08-19' - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA --# 02110-1301, USA. -+# along with this program; if not, see . - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -- -- --# Originally written by Per Bothner. Please send patches (context --# diff format) to and include a ChangeLog --# entry. -+# the same distribution terms that you use for the rest of that -+# program. This Exception is an additional permission under section 7 -+# of the GNU General Public License, version 3 ("GPLv3"). - # --# This script attempts to guess a canonical system name similar to --# config.sub. If it succeeds, it prints the system name on stdout, and --# exits with 0. Otherwise, it exits with 1. -+# Originally written by Per Bothner. - # - # You can get the latest version of this script from: - # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+# -+# Please send patches with a ChangeLog entry to config-patches@gnu.org. -+ - - me=`echo "$0" | sed -e 's,.*/,,'` - -@@ -56,8 +50,7 @@ version="\ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, --2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -+Copyright 1992-2014 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` | - UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown - UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -+case "${UNAME_SYSTEM}" in -+Linux|GNU|GNU/*) -+ # If the system lacks a compiler, then just pick glibc. -+ # We could probably try harder. -+ LIBC=gnu -+ -+ eval $set_cc_for_build -+ cat <<-EOF > $dummy.c -+ #include -+ #if defined(__UCLIBC__) -+ LIBC=uclibc -+ #elif defined(__dietlibc__) -+ LIBC=dietlibc -+ #else -+ LIBC=gnu -+ #endif -+ EOF -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` -+ ;; -+esac -+ - # Note: order is significant - the case branches are not exclusive. - - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or -- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, -+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward -@@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - fi - ;; - *) -- os=netbsd -+ os=netbsd - ;; - esac - # The OS release -@@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; -+ *:Bitrig:*:*) -+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} -+ exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -@@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) -- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on -@@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit ;; -+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code. -+ exitcode=$? -+ trap '' 0 -+ exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead -@@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) -- echo powerpc-ibm-os400 -+ echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; -- arm:riscos:*:*|arm:RISCOS:*:*) -+ arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) -@@ -333,6 +354,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; -+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) -+ echo i386-pc-auroraux${UNAME_RELEASE} -+ exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" -@@ -391,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) -- echo m68k-atari-mint${UNAME_RELEASE} -+ echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) -- echo m68k-atari-mint${UNAME_RELEASE} -+ echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) -- echo m68k-milan-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-milan-mint${UNAME_RELEASE} -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) -- echo m68k-hades-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-hades-mint${UNAME_RELEASE} -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) -- echo m68k-unknown-mint${UNAME_RELEASE} -- exit ;; -+ echo m68k-unknown-mint${UNAME_RELEASE} -+ exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; -@@ -477,8 +501,8 @@ EOF - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) -- # DG/UX returns AViiON for all architectures -- UNAME_PROCESSOR=`/usr/bin/uname -p` -+ # DG/UX returns AViiON for all architectures -+ UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ -@@ -491,7 +515,7 @@ EOF - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; -@@ -548,7 +572,7 @@ EOF - echo rs6000-ibm-aix3.2 - fi - exit ;; -- *:AIX:*:[456]) -+ *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -591,52 +615,52 @@ EOF - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -- case "${sc_cpu_version}" in -- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -- 532) # CPU_PA_RISC2_0 -- case "${sc_kernel_bits}" in -- 32) HP_ARCH="hppa2.0n" ;; -- 64) HP_ARCH="hppa2.0w" ;; -+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` -+ case "${sc_cpu_version}" in -+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 -+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 -+ 532) # CPU_PA_RISC2_0 -+ case "${sc_kernel_bits}" in -+ 32) HP_ARCH="hppa2.0n" ;; -+ 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 -- esac ;; -- esac -+ esac ;; -+ esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -+ sed 's/^ //' << EOF >$dummy.c -+ -+ #define _HPUX_SOURCE -+ #include -+ #include -+ -+ int main () -+ { -+ #if defined(_SC_KERNEL_BITS) -+ long bits = sysconf(_SC_KERNEL_BITS); -+ #endif -+ long cpu = sysconf (_SC_CPU_VERSION); - -- #define _HPUX_SOURCE -- #include -- #include -- -- int main () -- { -- #if defined(_SC_KERNEL_BITS) -- long bits = sysconf(_SC_KERNEL_BITS); -- #endif -- long cpu = sysconf (_SC_CPU_VERSION); -- -- switch (cpu) -- { -- case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -- case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -- case CPU_PA_RISC2_0: -- #if defined(_SC_KERNEL_BITS) -- switch (bits) -- { -- case 64: puts ("hppa2.0w"); break; -- case 32: puts ("hppa2.0n"); break; -- default: puts ("hppa2.0"); break; -- } break; -- #else /* !defined(_SC_KERNEL_BITS) */ -- puts ("hppa2.0"); break; -- #endif -- default: puts ("hppa1.0"); break; -- } -- exit (0); -- } -+ switch (cpu) -+ { -+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break; -+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break; -+ case CPU_PA_RISC2_0: -+ #if defined(_SC_KERNEL_BITS) -+ switch (bits) -+ { -+ case 64: puts ("hppa2.0w"); break; -+ case 32: puts ("hppa2.0n"); break; -+ default: puts ("hppa2.0"); break; -+ } break; -+ #else /* !defined(_SC_KERNEL_BITS) */ -+ puts ("hppa2.0"); break; -+ #endif -+ default: puts ("hppa1.0"); break; -+ } -+ exit (0); -+ } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa -@@ -727,22 +751,22 @@ EOF - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; -@@ -766,14 +790,14 @@ EOF - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit ;; -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` -+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - 5000:UNIX_System_V:4.*:*) -- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -@@ -785,34 +809,39 @@ EOF - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) -- case ${UNAME_MACHINE} in -- pc98) -- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ UNAME_PROCESSOR=`/usr/bin/uname -p` -+ case ${UNAME_PROCESSOR} in - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -+ *:MINGW64*:*) -+ echo ${UNAME_MACHINE}-pc-mingw64 -+ exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; -+ i*:MSYS*:*) -+ echo ${UNAME_MACHINE}-pc-msys -+ exit ;; - i*:windows32*:*) -- # uname -m includes "-pc" on this system. -- echo ${UNAME_MACHINE}-mingw32 -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; -- *:Interix*:[3456]*) -- case ${UNAME_MACHINE} in -+ *:Interix*:*) -+ case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; -- EM64T | authenticamd | genuineintel) -+ authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) -@@ -845,45 +874,81 @@ EOF - exit ;; - *:GNU:*:*) - # the GNU system -- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland -- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; -+ aarch64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ aarch64_be:Linux:*:*) -+ UNAME_MACHINE=aarch64_be -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ alpha:Linux:*:*) -+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -+ EV5) UNAME_MACHINE=alphaev5 ;; -+ EV56) UNAME_MACHINE=alphaev56 ;; -+ PCA56) UNAME_MACHINE=alphapca56 ;; -+ PCA57) UNAME_MACHINE=alphapca56 ;; -+ EV6) UNAME_MACHINE=alphaev6 ;; -+ EV67) UNAME_MACHINE=alphaev67 ;; -+ EV68*) UNAME_MACHINE=alphaev68 ;; -+ esac -+ objdump --private-headers /bin/sh | grep -q ld.so.1 -+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ arc:Linux:*:* | arceb:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - else -- echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_PCS_VFP -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf -+ fi - fi - exit ;; - avr32*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - cris:Linux:*:*) -- echo cris-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - crisv32:Linux:*:*) -- echo crisv32-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-${LIBC} - exit ;; - frv:Linux:*:*) -- echo frv-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ hexagon:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ i*86:Linux:*:*) -+ echo ${UNAME_MACHINE}-pc-linux-${LIBC} - exit ;; - ia64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m32r*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build -@@ -901,123 +966,65 @@ EOF - #endif - #endif - EOF -- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -- /^CPU/{ -- s: ::g -- p -- }'`" -- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } -+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } - ;; -- or32:Linux:*:*) -- echo or32-unknown-linux-gnu -- exit ;; -- ppc:Linux:*:*) -- echo powerpc-unknown-linux-gnu -- exit ;; -- ppc64:Linux:*:*) -- echo powerpc64-unknown-linux-gnu -+ or1k:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -- alpha:Linux:*:*) -- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in -- EV5) UNAME_MACHINE=alphaev5 ;; -- EV56) UNAME_MACHINE=alphaev56 ;; -- PCA56) UNAME_MACHINE=alphapca56 ;; -- PCA57) UNAME_MACHINE=alphapca56 ;; -- EV6) UNAME_MACHINE=alphaev6 ;; -- EV67) UNAME_MACHINE=alphaev67 ;; -- EV68*) UNAME_MACHINE=alphaev68 ;; -- esac -- objdump --private-headers /bin/sh | grep -q ld.so.1 -- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi -- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -+ or32:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - padre:Linux:*:*) -- echo sparc-unknown-linux-gnu -+ echo sparc-unknown-linux-${LIBC} -+ exit ;; -+ parisc64:Linux:*:* | hppa64:Linux:*:*) -+ echo hppa64-unknown-linux-${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -- PA7*) echo hppa1.1-unknown-linux-gnu ;; -- PA8*) echo hppa2.0-unknown-linux-gnu ;; -- *) echo hppa-unknown-linux-gnu ;; -+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; -+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; -+ *) echo hppa-unknown-linux-${LIBC} ;; - esac - exit ;; -- parisc64:Linux:*:* | hppa64:Linux:*:*) -- echo hppa64-unknown-linux-gnu -+ ppc64:Linux:*:*) -+ echo powerpc64-unknown-linux-${LIBC} -+ exit ;; -+ ppc:Linux:*:*) -+ echo powerpc-unknown-linux-${LIBC} -+ exit ;; -+ ppc64le:Linux:*:*) -+ echo powerpc64le-unknown-linux-${LIBC} -+ exit ;; -+ ppcle:Linux:*:*) -+ echo powerpcle-unknown-linux-${LIBC} - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) -- echo ${UNAME_MACHINE}-ibm-linux -+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC} - exit ;; - sh64*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} -+ exit ;; -+ tile*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - vax:Linux:*:*) -- echo ${UNAME_MACHINE}-dec-linux-gnu -+ echo ${UNAME_MACHINE}-dec-linux-${LIBC} - exit ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - xtensa*:Linux:*:*) -- echo ${UNAME_MACHINE}-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; -- i*86:Linux:*:*) -- # The BFD linker knows what the default object file format is, so -- # first see if it will tell us. cd to the root directory to prevent -- # problems with other programs or directories called `ld' in the path. -- # Set LC_ALL=C to ensure ld outputs messages in English. -- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ -- | sed -ne '/supported targets:/!d -- s/[ ][ ]*/ /g -- s/.*supported targets: *// -- s/ .*// -- p'` -- case "$ld_supported_targets" in -- elf32-i386) -- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" -- ;; -- esac -- # Determine whether the default compiler is a.out or elf -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #ifdef __ELF__ -- # ifdef __GLIBC__ -- # if __GLIBC__ >= 2 -- LIBC=gnu -- # else -- LIBC=gnulibc1 -- # endif -- # else -- LIBC=gnulibc1 -- # endif -- #else -- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) -- LIBC=gnu -- #else -- LIBC=gnuaout -- #endif -- #endif -- #ifdef __dietlibc__ -- LIBC=dietlibc -- #endif --EOF -- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -- /^LIBC/{ -- s: ::g -- p -- }'`" -- test x"${LIBC}" != x && { -- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -- exit -- } -- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } -- ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both -@@ -1025,11 +1032,11 @@ EOF - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) -- # Unixware is an offshoot of SVR4, but it has its own version -- # number series starting with 2... -- # I am not positive that other SVR4 systems won't match this, -+ # Unixware is an offshoot of SVR4, but it has its own version -+ # number series starting with 2... -+ # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. -- # Use sysv4.2uw... so that sysv4* matches it. -+ # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) -@@ -1061,7 +1068,7 @@ EOF - fi - exit ;; - i*86:*:5:[678]*) -- # UnixWare 7.x, OpenUNIX and OpenServer 6. -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; -@@ -1089,13 +1096,13 @@ EOF - exit ;; - pc:*:*:*) - # Left here for compatibility: -- # uname -m prints for DJGPP always 'pc', but it prints nothing about -- # the processor, so we play safe by assuming i586. -+ # uname -m prints for DJGPP always 'pc', but it prints nothing about -+ # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp -- exit ;; -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; -@@ -1130,8 +1137,8 @@ EOF - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) -- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && { echo i486-ncr-sysv4; exit; } ;; -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ -@@ -1174,10 +1181,10 @@ EOF - echo ns32k-sni-sysv - fi - exit ;; -- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -- # says -- echo i586-unisys-sysv4 -- exit ;; -+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort -+ # says -+ echo i586-unisys-sysv4 -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm -@@ -1203,11 +1210,11 @@ EOF - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then -- echo mips-nec-sysv${UNAME_RELEASE} -+ echo mips-nec-sysv${UNAME_RELEASE} - else -- echo mips-unknown-sysv${UNAME_RELEASE} -+ echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; -@@ -1220,6 +1227,9 @@ EOF - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; -+ x86_64:Haiku:*:*) -+ echo x86_64-unknown-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; -@@ -1246,13 +1256,31 @@ EOF - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -- case $UNAME_PROCESSOR in -- i386) eval $set_cc_for_build -- if $CC_FOR_BUILD -E -dM -x c /dev/null | grep __LP64__>/dev/null 2>&1 ; then -- UNAME_PROCESSOR=x86_64 -- fi ;; -- unknown) UNAME_PROCESSOR=powerpc ;; -- esac -+ eval $set_cc_for_build -+ if test "$UNAME_PROCESSOR" = unknown ; then -+ UNAME_PROCESSOR=powerpc -+ fi -+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ case $UNAME_PROCESSOR in -+ i386) UNAME_PROCESSOR=x86_64 ;; -+ powerpc) UNAME_PROCESSOR=powerpc64 ;; -+ esac -+ fi -+ fi -+ elif test "$UNAME_PROCESSOR" = i386 ; then -+ # Avoid executing cc on OS X 10.9, as it ships with a stub -+ # that puts up a graphical alert prompting to install -+ # developer tools. Any system running Mac OS X 10.7 or -+ # later (Darwin 11 and later) is required to have a 64-bit -+ # processor. This is not true of the ARM version of Darwin -+ # that Apple uses in portable devices. -+ UNAME_PROCESSOR=x86_64 -+ fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) -@@ -1266,7 +1294,10 @@ EOF - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; -- NSE-?:NONSTOP_KERNEL:*:*) -+ NEO-?:NONSTOP_KERNEL:*:*) -+ echo neo-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) -@@ -1311,13 +1342,13 @@ EOF - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) -- echo mips-sei-seiux${UNAME_RELEASE} -+ echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) -- UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; -@@ -1335,158 +1366,10 @@ EOF - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; --esac -- --#echo '(No uname command or uname output not recognized.)' 1>&2 --#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -- --eval $set_cc_for_build --cat >$dummy.c < --# include --#endif --main () --{ --#if defined (sony) --#if defined (MIPSEB) -- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, -- I don't know.... */ -- printf ("mips-sony-bsd\n"); exit (0); --#else --#include -- printf ("m68k-sony-newsos%s\n", --#ifdef NEWSOS4 -- "4" --#else -- "" --#endif -- ); exit (0); --#endif --#endif -- --#if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix\n"); exit (0); --#endif -- --#if defined (hp300) && !defined (hpux) -- printf ("m68k-hp-bsd\n"); exit (0); --#endif -- --#if defined (NeXT) --#if !defined (__ARCHITECTURE__) --#define __ARCHITECTURE__ "m68k" --#endif -- int version; -- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; -- if (version < 4) -- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); -- else -- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); -- exit (0); --#endif -- --#if defined (MULTIMAX) || defined (n16) --#if defined (UMAXV) -- printf ("ns32k-encore-sysv\n"); exit (0); --#else --#if defined (CMU) -- printf ("ns32k-encore-mach\n"); exit (0); --#else -- printf ("ns32k-encore-bsd\n"); exit (0); --#endif --#endif --#endif -- --#if defined (__386BSD__) -- printf ("i386-pc-bsd\n"); exit (0); --#endif -- --#if defined (sequent) --#if defined (i386) -- printf ("i386-sequent-dynix\n"); exit (0); --#endif --#if defined (ns32000) -- printf ("ns32k-sequent-dynix\n"); exit (0); --#endif --#endif -- --#if defined (_SEQUENT_) -- struct utsname un; -- -- uname(&un); -- -- if (strncmp(un.version, "V2", 2) == 0) { -- printf ("i386-sequent-ptx2\n"); exit (0); -- } -- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ -- printf ("i386-sequent-ptx1\n"); exit (0); -- } -- printf ("i386-sequent-ptx\n"); exit (0); -- --#endif -- --#if defined (vax) --# if !defined (ultrix) --# include --# if defined (BSD) --# if BSD == 43 -- printf ("vax-dec-bsd4.3\n"); exit (0); --# else --# if BSD == 199006 -- printf ("vax-dec-bsd4.3reno\n"); exit (0); --# else -- printf ("vax-dec-bsd\n"); exit (0); --# endif --# endif --# else -- printf ("vax-dec-bsd\n"); exit (0); --# endif --# else -- printf ("vax-dec-ultrix\n"); exit (0); --# endif --#endif -- --#if defined (alliant) && defined (i860) -- printf ("i860-alliant-bsd\n"); exit (0); --#endif -- -- exit (1); --} --EOF -- --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -- { echo "$SYSTEM_NAME"; exit; } -- --# Apollos put the system type in the environment. -- --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } -- --# Convex versions that predate uname can use getsysinfo(1) -- --if [ -x /usr/convex/getsysinfo ] --then -- case `getsysinfo -f cpu_type` in -- c1*) -- echo c1-convex-bsd -+ x86_64:VMkernel:*:*) -+ echo ${UNAME_MACHINE}-unknown-esx - exit ;; -- c2*) -- if getsysinfo -f scalar_acc -- then echo c32-convex-bsd -- else echo c2-convex-bsd -- fi -- exit ;; -- c34*) -- echo c34-convex-bsd -- exit ;; -- c38*) -- echo c38-convex-bsd -- exit ;; -- c4*) -- echo c4-convex-bsd -- exit ;; -- esac --fi -+esac - - cat >&2 <. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under --# the same distribution terms that you use for the rest of that program. -+# the same distribution terms that you use for the rest of that -+# program. This Exception is an additional permission under section 7 -+# of the GNU General Public License, version 3 ("GPLv3"). - - --# Please send patches to . Submit a context --# diff and a properly formatted GNU ChangeLog entry. -+# Please send patches with a ChangeLog entry to config-patches@gnu.org. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. -@@ -75,8 +68,7 @@ Report bugs and patches to conftest.$ac_ext -@@ -1296,7 +1296,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; -- ppc64-*linux*|powerpc64-*linux*) -+ powerpc64le-*linux*) -+ LD="${LD-ld} -m elf32lppclinux" -+ ;; -+ powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) -@@ -1315,7 +1318,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- ppc*-*linux*|powerpc*-*linux*) -+ powerpcle-*linux*) -+ LD="${LD-ld} -m elf64lppc" -+ ;; -+ powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) -Index: mozilla-release/js/src/ctypes/libffi/configure -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/configure -+++ mozilla-release/js/src/ctypes/libffi/configure -@@ -6298,7 +6298,7 @@ ia64-*-hpux*) - rm -rf conftest* - ;; - --x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ - s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext -@@ -6316,7 +6316,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; -- ppc64-*linux*|powerpc64-*linux*) -+ powerpc64le-*linux*) -+ LD="${LD-ld} -m elf32lppclinux" -+ ;; -+ powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) -@@ -6335,7 +6338,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- ppc*-*linux*|powerpc*-*linux*) -+ powerpcle-*linux*) -+ LD="${LD-ld} -m elf64lppc" -+ ;; -+ powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) -Index: mozilla-release/js/src/ctypes/libffi/m4/libtool.m4 -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/m4/libtool.m4 -+++ mozilla-release/js/src/ctypes/libffi/m4/libtool.m4 -@@ -1267,7 +1267,7 @@ ia64-*-hpux*) - rm -rf conftest* - ;; - --x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ -+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ - s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext -@@ -1281,7 +1281,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; -- ppc64-*linux*|powerpc64-*linux*) -+ powerpc64le-*linux*) -+ LD="${LD-ld} -m elf32lppclinux" -+ ;; -+ powerpc64-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) -@@ -1300,7 +1303,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; -- ppc*-*linux*|powerpc*-*linux*) -+ powerpcle-*linux*) -+ LD="${LD-ld} -m elf64lppc" -+ ;; -+ powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ffi.c -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ffi.c -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ffi.c -@@ -1,7 +1,9 @@ - /* ----------------------------------------------------------------------- -- ffi.c - Copyright (c) 1998 Geoffrey Keating -- Copyright (C) 2007, 2008 Free Software Foundation, Inc -- Copyright (C) 2008 Red Hat, Inc -+ ffi.c - Copyright (C) 2011 Anthony Green -+ Copyright (C) 2011 Kyle Moffett -+ Copyright (C) 2008 Red Hat, Inc -+ Copyright (C) 2007, 2008 Free Software Foundation, Inc -+ Copyright (c) 1998 Geoffrey Keating - - PowerPC Foreign Function Interface - -@@ -39,32 +41,29 @@ enum { - /* The assembly depends on these exact flags. */ - FLAG_RETURNS_SMST = 1 << (31-31), /* Used for FFI_SYSV small structs. */ - FLAG_RETURNS_NOTHING = 1 << (31-30), /* These go in cr7 */ -+#ifndef __NO_FPRS__ - FLAG_RETURNS_FP = 1 << (31-29), -+#endif - FLAG_RETURNS_64BITS = 1 << (31-28), - - FLAG_RETURNS_128BITS = 1 << (31-27), /* cr6 */ -- FLAG_SYSV_SMST_R4 = 1 << (31-26), /* use r4 for FFI_SYSV 8 byte -- structs. */ -- FLAG_SYSV_SMST_R3 = 1 << (31-25), /* use r3 for FFI_SYSV 4 byte -- structs. */ -- /* Bits (31-24) through (31-19) store shift value for SMST */ - - FLAG_ARG_NEEDS_COPY = 1 << (31- 7), -+ FLAG_ARG_NEEDS_PSAVE = FLAG_ARG_NEEDS_COPY, /* Used by ELFv2 */ -+#ifndef __NO_FPRS__ - FLAG_FP_ARGUMENTS = 1 << (31- 6), /* cr1.eq; specified by ABI */ -+#endif - FLAG_4_GPR_ARGUMENTS = 1 << (31- 5), - FLAG_RETVAL_REFERENCE = 1 << (31- 4) - }; - - /* About the SYSV ABI. */ --unsigned int NUM_GPR_ARG_REGISTERS = 8; -+#define ASM_NEEDS_REGISTERS 4 -+#define NUM_GPR_ARG_REGISTERS 8 - #ifndef __NO_FPRS__ --unsigned int NUM_FPR_ARG_REGISTERS = 8; --#else --unsigned int NUM_FPR_ARG_REGISTERS = 0; -+# define NUM_FPR_ARG_REGISTERS 8 - #endif - --enum { ASM_NEEDS_REGISTERS = 4 }; -- - /* ffi_prep_args_SYSV is called by the assembly routine once stack space - has been allocated for the function's arguments. - -@@ -113,10 +112,12 @@ ffi_prep_args_SYSV (extended_cif *ecif, - valp gpr_base; - int intarg_count; - -+#ifndef __NO_FPRS__ - /* 'fpr_base' points at the space for fpr1, and grows upwards as - we use FPR registers. */ - valp fpr_base; - int fparg_count; -+#endif - - /* 'copy_space' grows down as we put structures in it. It should - stay 16-byte aligned. */ -@@ -125,9 +126,11 @@ ffi_prep_args_SYSV (extended_cif *ecif, - /* 'next_arg' grows up as we put parameters in it. */ - valp next_arg; - -- int i, ii MAYBE_UNUSED; -+ int i; - ffi_type **ptr; -+#ifndef __NO_FPRS__ - double double_tmp; -+#endif - union { - void **v; - char **c; -@@ -143,21 +146,22 @@ ffi_prep_args_SYSV (extended_cif *ecif, - size_t struct_copy_size; - unsigned gprvalue; - -- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) -- NUM_FPR_ARG_REGISTERS = 0; -- - stacktop.c = (char *) stack + bytes; - gpr_base.u = stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS; - intarg_count = 0; -+#ifndef __NO_FPRS__ - fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS; - fparg_count = 0; - copy_space.c = ((flags & FLAG_FP_ARGUMENTS) ? fpr_base.c : gpr_base.c); -+#else -+ copy_space.c = gpr_base.c; -+#endif - next_arg.u = stack + 2; - - /* Check that everything starts aligned properly. */ -- FFI_ASSERT (((unsigned) (char *) stack & 0xF) == 0); -- FFI_ASSERT (((unsigned) copy_space.c & 0xF) == 0); -- FFI_ASSERT (((unsigned) stacktop.c & 0xF) == 0); -+ FFI_ASSERT (((unsigned long) (char *) stack & 0xF) == 0); -+ FFI_ASSERT (((unsigned long) copy_space.c & 0xF) == 0); -+ FFI_ASSERT (((unsigned long) stacktop.c & 0xF) == 0); - FFI_ASSERT ((bytes & 0xF) == 0); - FFI_ASSERT (copy_space.c >= next_arg.c); - -@@ -174,12 +178,28 @@ ffi_prep_args_SYSV (extended_cif *ecif, - i > 0; - i--, ptr++, p_argv.v++) - { -- switch ((*ptr)->type) -- { -+ unsigned short typenum = (*ptr)->type; -+ -+ /* We may need to handle some values depending on ABI */ -+ if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) { -+ if (typenum == FFI_TYPE_FLOAT) -+ typenum = FFI_TYPE_UINT32; -+ if (typenum == FFI_TYPE_DOUBLE) -+ typenum = FFI_TYPE_UINT64; -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_UINT128; -+ } else if (ecif->cif->abi != FFI_LINUX) { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_STRUCT; -+#endif -+ } -+ -+ /* Now test the translated value */ -+ switch (typenum) { -+#ifndef __NO_FPRS__ - case FFI_TYPE_FLOAT: - /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ -- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_float_prep; - double_tmp = **p_argv.f; - if (fparg_count >= NUM_FPR_ARG_REGISTERS) - { -@@ -195,8 +215,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, - - case FFI_TYPE_DOUBLE: - /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ -- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_double_prep; - double_tmp = **p_argv.d; - - if (fparg_count >= NUM_FPR_ARG_REGISTERS) -@@ -218,43 +236,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, - - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if ((ecif->cif->abi != FFI_LINUX) -- && (ecif->cif->abi != FFI_LINUX_SOFT_FLOAT)) -- goto do_struct; -- /* The soft float ABI for long doubles works like this, -- a long double is passed in four consecutive gprs if available. -- A maximum of 2 long doubles can be passed in gprs. -- If we do not have 4 gprs left, the long double is passed on the -- stack, 4-byte aligned. */ -- if (ecif->cif->abi == FFI_LINUX_SOFT_FLOAT) -- { -- unsigned int int_tmp = (*p_argv.ui)[0]; -- if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) -- { -- if (intarg_count < NUM_GPR_ARG_REGISTERS) -- intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; -- *next_arg.u = int_tmp; -- next_arg.u++; -- for (ii = 1; ii < 4; ii++) -- { -- int_tmp = (*p_argv.ui)[ii]; -- *next_arg.u = int_tmp; -- next_arg.u++; -- } -- } -- else -- { -- *gpr_base.u++ = int_tmp; -- for (ii = 1; ii < 4; ii++) -- { -- int_tmp = (*p_argv.ui)[ii]; -- *gpr_base.u++ = int_tmp; -- } -- } -- intarg_count +=4; -- } -- else -- { - double_tmp = (*p_argv.d)[0]; - - if (fparg_count >= NUM_FPR_ARG_REGISTERS - 1) -@@ -280,13 +261,40 @@ ffi_prep_args_SYSV (extended_cif *ecif, - - fparg_count += 2; - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); -- } - break; - #endif -+#endif /* have FPRs */ -+ -+ /* -+ * The soft float ABI for long doubles works like this, a long double -+ * is passed in four consecutive GPRs if available. A maximum of 2 -+ * long doubles can be passed in gprs. If we do not have 4 GPRs -+ * left, the long double is passed on the stack, 4-byte aligned. -+ */ -+ case FFI_TYPE_UINT128: { -+ unsigned int int_tmp = (*p_argv.ui)[0]; -+ unsigned int ii; -+ if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3) { -+ if (intarg_count < NUM_GPR_ARG_REGISTERS) -+ intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; -+ *(next_arg.u++) = int_tmp; -+ for (ii = 1; ii < 4; ii++) { -+ int_tmp = (*p_argv.ui)[ii]; -+ *(next_arg.u++) = int_tmp; -+ } -+ } else { -+ *(gpr_base.u++) = int_tmp; -+ for (ii = 1; ii < 4; ii++) { -+ int_tmp = (*p_argv.ui)[ii]; -+ *(gpr_base.u++) = int_tmp; -+ } -+ } -+ intarg_count += 4; -+ break; -+ } - - case FFI_TYPE_UINT64: - case FFI_TYPE_SINT64: -- soft_double_prep: - if (intarg_count == NUM_GPR_ARG_REGISTERS-1) - intarg_count++; - if (intarg_count >= NUM_GPR_ARG_REGISTERS) -@@ -319,9 +327,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, - break; - - case FFI_TYPE_STRUCT: --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- do_struct: --#endif - struct_copy_size = ((*ptr)->size + 15) & ~0xF; - copy_space.c -= struct_copy_size; - memcpy (copy_space.c, *p_argv.c, (*ptr)->size); -@@ -349,7 +354,6 @@ ffi_prep_args_SYSV (extended_cif *ecif, - case FFI_TYPE_UINT32: - case FFI_TYPE_SINT32: - case FFI_TYPE_POINTER: -- soft_float_prep: - - gprvalue = **p_argv.ui; - -@@ -366,8 +370,16 @@ ffi_prep_args_SYSV (extended_cif *ecif, - /* Check that we didn't overrun the stack... */ - FFI_ASSERT (copy_space.c >= next_arg.c); - FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS); -+ /* The assert below is testing that the number of integer arguments agrees -+ with the number found in ffi_prep_cif_machdep(). However, intarg_count -+ is incremented whenever we place an FP arg on the stack, so account for -+ that before our assert test. */ -+#ifndef __NO_FPRS__ -+ if (fparg_count > NUM_FPR_ARG_REGISTERS) -+ intarg_count -= fparg_count - NUM_FPR_ARG_REGISTERS; - FFI_ASSERT (fpr_base.u - <= stacktop.u - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); -+#endif - FFI_ASSERT (flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); - } - -@@ -378,6 +390,45 @@ enum { - }; - enum { ASM_NEEDS_REGISTERS64 = 4 }; - -+#if _CALL_ELF == 2 -+static unsigned int -+discover_homogeneous_aggregate (const ffi_type *t, unsigned int *elnum) -+{ -+ switch (t->type) -+ { -+ case FFI_TYPE_FLOAT: -+ case FFI_TYPE_DOUBLE: -+ *elnum = 1; -+ return (int) t->type; -+ -+ case FFI_TYPE_STRUCT:; -+ { -+ unsigned int base_elt = 0, total_elnum = 0; -+ ffi_type **el = t->elements; -+ while (*el) -+ { -+ unsigned int el_elt, el_elnum = 0; -+ el_elt = discover_homogeneous_aggregate (*el, &el_elnum); -+ if (el_elt == 0 -+ || (base_elt && base_elt != el_elt)) -+ return 0; -+ base_elt = el_elt; -+ total_elnum += el_elnum; -+ if (total_elnum > 8) -+ return 0; -+ el++; -+ } -+ *elnum = total_elnum; -+ return base_elt; -+ } -+ -+ default: -+ return 0; -+ } -+} -+#endif -+ -+ - /* ffi_prep_args64 is called by the assembly routine once stack space - has been allocated for the function's arguments. - -@@ -423,6 +474,7 @@ ffi_prep_args64 (extended_cif *ecif, uns - unsigned long *ul; - float *f; - double *d; -+ size_t p; - } valp; - - /* 'stacktop' points at the previous backchain pointer. */ -@@ -438,9 +490,9 @@ ffi_prep_args64 (extended_cif *ecif, uns - /* 'fpr_base' points at the space for fpr3, and grows upwards as - we use FPR registers. */ - valp fpr_base; -- int fparg_count; -+ unsigned int fparg_count; - -- int i, words; -+ unsigned int i, words, nargs, nfixedargs; - ffi_type **ptr; - double double_tmp; - union { -@@ -457,11 +509,18 @@ ffi_prep_args64 (extended_cif *ecif, uns - double **d; - } p_argv; - unsigned long gprvalue; -+#ifdef __STRUCT_PARM_ALIGN__ -+ unsigned long align; -+#endif - - stacktop.c = (char *) stack + bytes; - gpr_base.ul = stacktop.ul - ASM_NEEDS_REGISTERS64 - NUM_GPR_ARG_REGISTERS64; - gpr_end.ul = gpr_base.ul + NUM_GPR_ARG_REGISTERS64; -+#if _CALL_ELF == 2 -+ rest.ul = stack + 4 + NUM_GPR_ARG_REGISTERS64; -+#else - rest.ul = stack + 6 + NUM_GPR_ARG_REGISTERS64; -+#endif - fpr_base.d = gpr_base.d - NUM_FPR_ARG_REGISTERS64; - fparg_count = 0; - next_arg.ul = gpr_base.ul; -@@ -477,30 +536,36 @@ ffi_prep_args64 (extended_cif *ecif, uns - - /* Now for the arguments. */ - p_argv.v = ecif->avalue; -- for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs; -- i > 0; -- i--, ptr++, p_argv.v++) -+ nargs = ecif->cif->nargs; -+ nfixedargs = ecif->cif->nfixedargs; -+ for (ptr = ecif->cif->arg_types, i = 0; -+ i < nargs; -+ i++, ptr++, p_argv.v++) - { -+ unsigned int elt, elnum; -+ - switch ((*ptr)->type) - { - case FFI_TYPE_FLOAT: - double_tmp = **p_argv.f; -- *next_arg.f = (float) double_tmp; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.f = (float) double_tmp; - if (++next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; -- if (fparg_count < NUM_FPR_ARG_REGISTERS64) -- *fpr_base.d++ = double_tmp; - fparg_count++; - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); - break; - - case FFI_TYPE_DOUBLE: - double_tmp = **p_argv.d; -- *next_arg.d = double_tmp; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.d = double_tmp; - if (++next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; -- if (fparg_count < NUM_FPR_ARG_REGISTERS64) -- *fpr_base.d++ = double_tmp; - fparg_count++; - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); - break; -@@ -508,18 +573,20 @@ ffi_prep_args64 (extended_cif *ecif, uns - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: - double_tmp = (*p_argv.d)[0]; -- *next_arg.d = double_tmp; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.d = double_tmp; - if (++next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; -- if (fparg_count < NUM_FPR_ARG_REGISTERS64) -- *fpr_base.d++ = double_tmp; - fparg_count++; - double_tmp = (*p_argv.d)[1]; -- *next_arg.d = double_tmp; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.d = double_tmp; - if (++next_arg.ul == gpr_end.ul) - next_arg.ul = rest.ul; -- if (fparg_count < NUM_FPR_ARG_REGISTERS64) -- *fpr_base.d++ = double_tmp; - fparg_count++; - FFI_ASSERT (__LDBL_MANT_DIG__ == 106); - FFI_ASSERT (flags & FLAG_FP_ARGUMENTS); -@@ -527,27 +594,86 @@ ffi_prep_args64 (extended_cif *ecif, uns - #endif - - case FFI_TYPE_STRUCT: -- words = ((*ptr)->size + 7) / 8; -- if (next_arg.ul >= gpr_base.ul && next_arg.ul + words > gpr_end.ul) -+#ifdef __STRUCT_PARM_ALIGN__ -+ align = (*ptr)->alignment; -+ if (align > __STRUCT_PARM_ALIGN__) -+ align = __STRUCT_PARM_ALIGN__; -+ if (align > 1) -+ next_arg.p = ALIGN (next_arg.p, align); -+#endif -+ elt = 0; -+#if _CALL_ELF == 2 -+ elt = discover_homogeneous_aggregate (*ptr, &elnum); -+#endif -+ if (elt) - { -- size_t first = gpr_end.c - next_arg.c; -- memcpy (next_arg.c, *p_argv.c, first); -- memcpy (rest.c, *p_argv.c + first, (*ptr)->size - first); -- next_arg.c = rest.c + words * 8 - first; -+ union { -+ void *v; -+ float *f; -+ double *d; -+ } arg; -+ -+ arg.v = *p_argv.v; -+ if (elt == FFI_TYPE_FLOAT) -+ { -+ do -+ { -+ double_tmp = *arg.f++; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 -+ && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.f = (float) double_tmp; -+ if (++next_arg.f == gpr_end.f) -+ next_arg.f = rest.f; -+ fparg_count++; -+ } -+ while (--elnum != 0); -+ if ((next_arg.p & 3) != 0) -+ { -+ if (++next_arg.f == gpr_end.f) -+ next_arg.f = rest.f; -+ } -+ } -+ else -+ do -+ { -+ double_tmp = *arg.d++; -+ if (fparg_count < NUM_FPR_ARG_REGISTERS64 && i < nfixedargs) -+ *fpr_base.d++ = double_tmp; -+ else -+ *next_arg.d = double_tmp; -+ if (++next_arg.d == gpr_end.d) -+ next_arg.d = rest.d; -+ fparg_count++; -+ } -+ while (--elnum != 0); - } - else - { -- char *where = next_arg.c; -- -- /* Structures with size less than eight bytes are passed -- left-padded. */ -- if ((*ptr)->size < 8) -- where += 8 - (*ptr)->size; -+ words = ((*ptr)->size + 7) / 8; -+ if (next_arg.ul >= gpr_base.ul && next_arg.ul + words > gpr_end.ul) -+ { -+ size_t first = gpr_end.c - next_arg.c; -+ memcpy (next_arg.c, *p_argv.c, first); -+ memcpy (rest.c, *p_argv.c + first, (*ptr)->size - first); -+ next_arg.c = rest.c + words * 8 - first; -+ } -+ else -+ { -+ char *where = next_arg.c; - -- memcpy (where, *p_argv.c, (*ptr)->size); -- next_arg.ul += words; -- if (next_arg.ul == gpr_end.ul) -- next_arg.ul = rest.ul; -+#ifndef __LITTLE_ENDIAN__ -+ /* Structures with size less than eight bytes are passed -+ left-padded. */ -+ if ((*ptr)->size < 8) -+ where += 8 - (*ptr)->size; -+#endif -+ memcpy (where, *p_argv.c, (*ptr)->size); -+ next_arg.ul += words; -+ if (next_arg.ul == gpr_end.ul) -+ next_arg.ul = rest.ul; -+ } - } - break; - -@@ -591,27 +717,22 @@ ffi_prep_args64 (extended_cif *ecif, uns - - - /* Perform machine dependent cif processing */ --ffi_status --ffi_prep_cif_machdep (ffi_cif *cif) -+static ffi_status -+ffi_prep_cif_machdep_core (ffi_cif *cif) - { - /* All this is for the SYSV and LINUX64 ABI. */ -- int i; - ffi_type **ptr; - unsigned bytes; -- int fparg_count = 0, intarg_count = 0; -- unsigned flags = 0; -+ unsigned i, fparg_count = 0, intarg_count = 0; -+ unsigned flags = cif->flags; - unsigned struct_copy_size = 0; - unsigned type = cif->rtype->type; - unsigned size = cif->rtype->size; - -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- NUM_FPR_ARG_REGISTERS = 0; -- -+ /* The machine-independent calculation of cif->bytes doesn't work -+ for us. Redo the calculation. */ - if (cif->abi != FFI_LINUX64) - { -- /* All the machine-independent calculation of cif->bytes will be wrong. -- Redo the calculation for SYSV. */ -- - /* Space for the frame pointer, callee's LR, and the asm's temp regs. */ - bytes = (2 + ASM_NEEDS_REGISTERS) * sizeof (int); - -@@ -621,13 +742,20 @@ ffi_prep_cif_machdep (ffi_cif *cif) - else - { - /* 64-bit ABI. */ -+#if _CALL_ELF == 2 -+ /* Space for backchain, CR, LR, TOC and the asm's temp regs. */ -+ bytes = (4 + ASM_NEEDS_REGISTERS64) * sizeof (long); - -+ /* Space for the general registers. */ -+ bytes += NUM_GPR_ARG_REGISTERS64 * sizeof (long); -+#else - /* Space for backchain, CR, LR, cc/ld doubleword, TOC and the asm's temp - regs. */ - bytes = (6 + ASM_NEEDS_REGISTERS64) * sizeof (long); - - /* Space for the mandatory parm save area and general registers. */ - bytes += 2 * NUM_GPR_ARG_REGISTERS64 * sizeof (long); -+#endif - } - - /* Return value handling. The rules for SYSV are as follows: -@@ -646,13 +774,30 @@ ffi_prep_cif_machdep (ffi_cif *cif) - - Single/double FP values in fpr1, long double in fpr1,fpr2. - - soft-float float/doubles are treated as UINT32/UINT64 respectivley. - - soft-float long doubles are returned in gpr3-gpr6. */ -+ /* First translate for softfloat/nonlinux */ -+ if (cif->abi == FFI_LINUX_SOFT_FLOAT) -+ { -+ if (type == FFI_TYPE_FLOAT) -+ type = FFI_TYPE_UINT32; -+ if (type == FFI_TYPE_DOUBLE) -+ type = FFI_TYPE_UINT64; -+ if (type == FFI_TYPE_LONGDOUBLE) -+ type = FFI_TYPE_UINT128; -+ } -+ else if (cif->abi != FFI_LINUX -+ && cif->abi != FFI_LINUX64) -+ { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (type == FFI_TYPE_LONGDOUBLE) -+ type = FFI_TYPE_STRUCT; -+#endif -+ } -+ - switch (type) - { -+#ifndef __NO_FPRS__ - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64 -- && cif->abi != FFI_LINUX_SOFT_FLOAT) -- goto byref; - flags |= FLAG_RETURNS_128BITS; - /* Fall through. */ - #endif -@@ -660,47 +805,52 @@ ffi_prep_cif_machdep (ffi_cif *cif) - flags |= FLAG_RETURNS_64BITS; - /* Fall through. */ - case FFI_TYPE_FLOAT: -- /* With FFI_LINUX_SOFT_FLOAT no fp registers are used. */ -- if (cif->abi != FFI_LINUX_SOFT_FLOAT) -- flags |= FLAG_RETURNS_FP; -+ flags |= FLAG_RETURNS_FP; - break; -+#endif - -+ case FFI_TYPE_UINT128: -+ flags |= FLAG_RETURNS_128BITS; -+ /* Fall through. */ - case FFI_TYPE_UINT64: - case FFI_TYPE_SINT64: - flags |= FLAG_RETURNS_64BITS; - break; - - case FFI_TYPE_STRUCT: -- if (cif->abi == FFI_SYSV) -+ /* -+ * The final SYSV ABI says that structures smaller or equal 8 bytes -+ * are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them -+ * in memory. -+ * -+ * NOTE: The assembly code can safely assume that it just needs to -+ * store both r3 and r4 into a 8-byte word-aligned buffer, as -+ * we allocate a temporary buffer in ffi_call() if this flag is -+ * set. -+ */ -+ if (cif->abi == FFI_SYSV && size <= 8) - { -- /* The final SYSV ABI says that structures smaller or equal 8 bytes -- are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them -- in memory. */ -- -- /* Treat structs with size <= 8 bytes. */ -- if (size <= 8) -+ flags |= FLAG_RETURNS_SMST; -+ break; -+ } -+#if _CALL_ELF == 2 -+ if (cif->abi == FFI_LINUX64) -+ { -+ unsigned int elt, elnum; -+ elt = discover_homogeneous_aggregate (cif->rtype, &elnum); -+ if (elt) -+ { -+ if (elt == FFI_TYPE_DOUBLE) -+ flags |= FLAG_RETURNS_64BITS; -+ flags |= FLAG_RETURNS_FP | FLAG_RETURNS_SMST; -+ break; -+ } -+ if (size <= 16) - { - flags |= FLAG_RETURNS_SMST; -- /* These structs are returned in r3. We pack the type and the -- precalculated shift value (needed in the sysv.S) into flags. -- The same applies for the structs returned in r3/r4. */ -- if (size <= 4) -- { -- flags |= FLAG_SYSV_SMST_R3; -- flags |= 8 * (4 - size) << 8; -- break; -- } -- /* These structs are returned in r3 and r4. See above. */ -- if (size <= 8) -- { -- flags |= FLAG_SYSV_SMST_R3 | FLAG_SYSV_SMST_R4; -- flags |= 8 * (8 - size) << 8; -- break; -- } -+ break; - } - } --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- byref: - #endif - intarg_count++; - flags |= FLAG_RETVAL_REFERENCE; -@@ -722,39 +872,36 @@ ffi_prep_cif_machdep (ffi_cif *cif) - Stuff on the stack needs to keep proper alignment. */ - for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) - { -- switch ((*ptr)->type) -- { -+ unsigned short typenum = (*ptr)->type; -+ -+ /* We may need to handle some values depending on ABI */ -+ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { -+ if (typenum == FFI_TYPE_FLOAT) -+ typenum = FFI_TYPE_UINT32; -+ if (typenum == FFI_TYPE_DOUBLE) -+ typenum = FFI_TYPE_UINT64; -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_UINT128; -+ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_STRUCT; -+#endif -+ } -+ -+ switch (typenum) { -+#ifndef __NO_FPRS__ - case FFI_TYPE_FLOAT: -- /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_float_cif; - fparg_count++; - /* floating singles are not 8-aligned on stack */ - break; - - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) -- goto do_struct; -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- { -- if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 -- || intarg_count < NUM_GPR_ARG_REGISTERS) -- /* A long double in FFI_LINUX_SOFT_FLOAT can use only -- a set of four consecutive gprs. If we have not enough, -- we have to adjust the intarg_count value. */ -- intarg_count += NUM_GPR_ARG_REGISTERS - intarg_count; -- intarg_count += 4; -- break; -- } -- else -- fparg_count++; -+ fparg_count++; - /* Fall thru */ - #endif - case FFI_TYPE_DOUBLE: -- /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_double_cif; - fparg_count++; - /* If this FP arg is going on the stack, it must be - 8-byte-aligned. */ -@@ -763,10 +910,21 @@ ffi_prep_cif_machdep (ffi_cif *cif) - && intarg_count % 2 != 0) - intarg_count++; - break; -+#endif -+ case FFI_TYPE_UINT128: -+ /* -+ * A long double in FFI_LINUX_SOFT_FLOAT can use only a set -+ * of four consecutive gprs. If we do not have enough, we -+ * have to adjust the intarg_count value. -+ */ -+ if (intarg_count >= NUM_GPR_ARG_REGISTERS - 3 -+ && intarg_count < NUM_GPR_ARG_REGISTERS) -+ intarg_count = NUM_GPR_ARG_REGISTERS; -+ intarg_count += 4; -+ break; - - case FFI_TYPE_UINT64: - case FFI_TYPE_SINT64: -- soft_double_cif: - /* 'long long' arguments are passed as two words, but - either both words must fit in registers or both go - on the stack. If they go on the stack, they must -@@ -783,9 +941,6 @@ ffi_prep_cif_machdep (ffi_cif *cif) - break; - - case FFI_TYPE_STRUCT: --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- do_struct: --#endif - /* We must allocate space for a copy of these to enforce - pass-by-value. Pad the space up to a multiple of 16 - bytes (the maximum alignment required for anything under -@@ -793,50 +948,100 @@ ffi_prep_cif_machdep (ffi_cif *cif) - struct_copy_size += ((*ptr)->size + 15) & ~0xF; - /* Fall through (allocate space for the pointer). */ - -- default: -- soft_float_cif: -+ case FFI_TYPE_POINTER: -+ case FFI_TYPE_INT: -+ case FFI_TYPE_UINT32: -+ case FFI_TYPE_SINT32: -+ case FFI_TYPE_UINT16: -+ case FFI_TYPE_SINT16: -+ case FFI_TYPE_UINT8: -+ case FFI_TYPE_SINT8: - /* Everything else is passed as a 4-byte word in a GPR, either - the object itself or a pointer to it. */ - intarg_count++; - break; -+ default: -+ FFI_ASSERT (0); - } - } - else - for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++) - { -+ unsigned int elt, elnum; -+#ifdef __STRUCT_PARM_ALIGN__ -+ unsigned int align; -+#endif -+ - switch ((*ptr)->type) - { - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- intarg_count += 4; -- else -- { -- fparg_count += 2; -- intarg_count += 2; -- } -+ fparg_count += 2; -+ intarg_count += 2; -+ if (fparg_count > NUM_FPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; - break; - #endif - case FFI_TYPE_FLOAT: - case FFI_TYPE_DOUBLE: - fparg_count++; - intarg_count++; -+ if (fparg_count > NUM_FPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; - break; - - case FFI_TYPE_STRUCT: -+#ifdef __STRUCT_PARM_ALIGN__ -+ align = (*ptr)->alignment; -+ if (align > __STRUCT_PARM_ALIGN__) -+ align = __STRUCT_PARM_ALIGN__; -+ align = align / 8; -+ if (align > 1) -+ intarg_count = ALIGN (intarg_count, align); -+#endif - intarg_count += ((*ptr)->size + 7) / 8; -+ elt = 0; -+#if _CALL_ELF == 2 -+ elt = discover_homogeneous_aggregate (*ptr, &elnum); -+#endif -+ if (elt) -+ { -+ fparg_count += elnum; -+ if (fparg_count > NUM_FPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; -+ } -+ else -+ { -+ if (intarg_count > NUM_GPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; -+ } - break; - -- default: -+ case FFI_TYPE_POINTER: -+ case FFI_TYPE_UINT64: -+ case FFI_TYPE_SINT64: -+ case FFI_TYPE_INT: -+ case FFI_TYPE_UINT32: -+ case FFI_TYPE_SINT32: -+ case FFI_TYPE_UINT16: -+ case FFI_TYPE_SINT16: -+ case FFI_TYPE_UINT8: -+ case FFI_TYPE_SINT8: - /* Everything else is passed as a 8-byte word in a GPR, either - the object itself or a pointer to it. */ - intarg_count++; -+ if (intarg_count > NUM_GPR_ARG_REGISTERS64) -+ flags |= FLAG_ARG_NEEDS_PSAVE; - break; -+ default: -+ FFI_ASSERT (0); - } - } - -+#ifndef __NO_FPRS__ - if (fparg_count != 0) - flags |= FLAG_FP_ARGUMENTS; -+#endif - if (intarg_count > 4) - flags |= FLAG_4_GPR_ARGUMENTS; - if (struct_copy_size != 0) -@@ -844,25 +1049,36 @@ ffi_prep_cif_machdep (ffi_cif *cif) - - if (cif->abi != FFI_LINUX64) - { -+#ifndef __NO_FPRS__ - /* Space for the FPR registers, if needed. */ - if (fparg_count != 0) - bytes += NUM_FPR_ARG_REGISTERS * sizeof (double); -+#endif - - /* Stack space. */ - if (intarg_count > NUM_GPR_ARG_REGISTERS) - bytes += (intarg_count - NUM_GPR_ARG_REGISTERS) * sizeof (int); -+#ifndef __NO_FPRS__ - if (fparg_count > NUM_FPR_ARG_REGISTERS) - bytes += (fparg_count - NUM_FPR_ARG_REGISTERS) * sizeof (double); -+#endif - } - else - { -+#ifndef __NO_FPRS__ - /* Space for the FPR registers, if needed. */ - if (fparg_count != 0) - bytes += NUM_FPR_ARG_REGISTERS64 * sizeof (double); -+#endif - - /* Stack space. */ -+#if _CALL_ELF == 2 -+ if ((flags & FLAG_ARG_NEEDS_PSAVE) != 0) -+ bytes += intarg_count * sizeof (long); -+#else - if (intarg_count > NUM_GPR_ARG_REGISTERS64) - bytes += (intarg_count - NUM_GPR_ARG_REGISTERS64) * sizeof (long); -+#endif - } - - /* The stack space allocated needs to be a multiple of 16 bytes. */ -@@ -877,6 +1093,26 @@ ffi_prep_cif_machdep (ffi_cif *cif) - return FFI_OK; - } - -+ffi_status -+ffi_prep_cif_machdep (ffi_cif *cif) -+{ -+ cif->nfixedargs = cif->nargs; -+ return ffi_prep_cif_machdep_core (cif); -+} -+ -+ffi_status -+ffi_prep_cif_machdep_var (ffi_cif *cif, -+ unsigned int nfixedargs, -+ unsigned int ntotalargs MAYBE_UNUSED) -+{ -+ cif->nfixedargs = nfixedargs; -+#if _CALL_ELF == 2 -+ if (cif->abi == FFI_LINUX64) -+ cif->flags |= FLAG_ARG_NEEDS_PSAVE; -+#endif -+ return ffi_prep_cif_machdep_core (cif); -+} -+ - extern void ffi_call_SYSV(extended_cif *, unsigned, unsigned, unsigned *, - void (*fn)(void)); - extern void FFI_HIDDEN ffi_call_LINUX64(extended_cif *, unsigned long, -@@ -886,28 +1122,39 @@ extern void FFI_HIDDEN ffi_call_LINUX64( - void - ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) - { -+ /* -+ * The final SYSV ABI says that structures smaller or equal 8 bytes -+ * are returned in r3/r4. The FFI_GCC_SYSV ABI instead returns them -+ * in memory. -+ * -+ * We bounce-buffer SYSV small struct return values so that sysv.S -+ * can write r3 and r4 to memory without worrying about struct size. -+ * -+ * For ELFv2 ABI, use a bounce buffer for homogeneous structs too, -+ * for similar reasons. -+ */ -+ unsigned long smst_buffer[8]; - extended_cif ecif; - - ecif.cif = cif; - ecif.avalue = avalue; - -- /* If the return value is a struct and we don't have a return */ -- /* value address then we need to make one */ -- -- if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) -- { -- ecif.rvalue = alloca(cif->rtype->size); -- } -- else -- ecif.rvalue = rvalue; -- -+ ecif.rvalue = rvalue; -+ if ((cif->flags & FLAG_RETURNS_SMST) != 0) -+ ecif.rvalue = smst_buffer; -+ /* Ensure that we have a valid struct return value. -+ FIXME: Isn't this just papering over a user problem? */ -+ else if (!rvalue && cif->rtype->type == FFI_TYPE_STRUCT) -+ ecif.rvalue = alloca (cif->rtype->size); - - switch (cif->abi) - { - #ifndef POWERPC64 -+# ifndef __NO_FPRS__ - case FFI_SYSV: - case FFI_GCC_SYSV: - case FFI_LINUX: -+# endif - case FFI_LINUX_SOFT_FLOAT: - ffi_call_SYSV (&ecif, -cif->bytes, cif->flags, ecif.rvalue, fn); - break; -@@ -920,10 +1167,29 @@ ffi_call(ffi_cif *cif, void (*fn)(void), - FFI_ASSERT (0); - break; - } -+ -+ /* Check for a bounce-buffered return value */ -+ if (rvalue && ecif.rvalue == smst_buffer) -+ { -+ unsigned int rsize = cif->rtype->size; -+#ifndef __LITTLE_ENDIAN__ -+ /* The SYSV ABI returns a structure of up to 4 bytes in size -+ left-padded in r3. */ -+ if (cif->abi == FFI_SYSV && rsize <= 4) -+ memcpy (rvalue, (char *) smst_buffer + 4 - rsize, rsize); -+ /* The SYSV ABI returns a structure of up to 8 bytes in size -+ left-padded in r3/r4, and the ELFv2 ABI similarly returns a -+ structure of up to 8 bytes in size left-padded in r3. */ -+ else if (rsize <= 8) -+ memcpy (rvalue, (char *) smst_buffer + 8 - rsize, rsize); -+ else -+#endif -+ memcpy (rvalue, smst_buffer, rsize); -+ } - } - - --#ifndef POWERPC64 -+#if !defined POWERPC64 || _CALL_ELF == 2 - #define MIN_CACHE_LINE_SIZE 8 - - static void -@@ -947,16 +1213,38 @@ ffi_prep_closure_loc (ffi_closure *closu - void *codeloc) - { - #ifdef POWERPC64 -+# if _CALL_ELF == 2 -+ unsigned int *tramp = (unsigned int *) &closure->tramp[0]; -+ -+ if (cif->abi != FFI_LINUX64) -+ return FFI_BAD_ABI; -+ -+ tramp[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */ -+ tramp[1] = 0xe98c0010; /* ld 12,1f-0b(12) */ -+ tramp[2] = 0x7d8903a6; /* mtctr 12 */ -+ tramp[3] = 0x4e800420; /* bctr */ -+ /* 1: .quad function_addr */ -+ /* 2: .quad context */ -+ *(void **) &tramp[4] = (void *) ffi_closure_LINUX64; -+ *(void **) &tramp[6] = codeloc; -+ flush_icache ((char *)tramp, (char *)codeloc, FFI_TRAMPOLINE_SIZE); -+# else - void **tramp = (void **) &closure->tramp[0]; - -- FFI_ASSERT (cif->abi == FFI_LINUX64); -+ if (cif->abi != FFI_LINUX64) -+ return FFI_BAD_ABI; - /* Copy function address and TOC from ffi_closure_LINUX64. */ - memcpy (tramp, (char *) ffi_closure_LINUX64, 16); - tramp[2] = codeloc; -+# endif - #else - unsigned int *tramp; - -- FFI_ASSERT (cif->abi == FFI_GCC_SYSV || cif->abi == FFI_SYSV); -+ if (! (cif->abi == FFI_GCC_SYSV -+ || cif->abi == FFI_SYSV -+ || cif->abi == FFI_LINUX -+ || cif->abi == FFI_LINUX_SOFT_FLOAT)) -+ return FFI_BAD_ABI; - - tramp = (unsigned int *) &closure->tramp[0]; - tramp[0] = 0x7c0802a6; /* mflr r0 */ -@@ -1011,32 +1299,38 @@ ffi_closure_helper_SYSV (ffi_closure *cl - void ** avalue; - ffi_type ** arg_types; - long i, avn; -- long nf; /* number of floating registers already used */ -- long ng; /* number of general registers already used */ -- ffi_cif * cif; -- double temp; -- unsigned size; -+#ifndef __NO_FPRS__ -+ long nf = 0; /* number of floating registers already used */ -+#endif -+ long ng = 0; /* number of general registers already used */ -+ -+ ffi_cif *cif = closure->cif; -+ unsigned size = cif->rtype->size; -+ unsigned short rtypenum = cif->rtype->type; - -- cif = closure->cif; - avalue = alloca (cif->nargs * sizeof (void *)); -- size = cif->rtype->size; - -- nf = 0; -- ng = 0; -+ /* First translate for softfloat/nonlinux */ -+ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { -+ if (rtypenum == FFI_TYPE_FLOAT) -+ rtypenum = FFI_TYPE_UINT32; -+ if (rtypenum == FFI_TYPE_DOUBLE) -+ rtypenum = FFI_TYPE_UINT64; -+ if (rtypenum == FFI_TYPE_LONGDOUBLE) -+ rtypenum = FFI_TYPE_UINT128; -+ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (rtypenum == FFI_TYPE_LONGDOUBLE) -+ rtypenum = FFI_TYPE_STRUCT; -+#endif -+ } -+ - - /* Copy the caller's structure return value address so that the closure - returns the data directly to the caller. - For FFI_SYSV the result is passed in r3/r4 if the struct size is less - or equal 8 bytes. */ -- -- if ((cif->rtype->type == FFI_TYPE_STRUCT -- && !((cif->abi == FFI_SYSV) && (size <= 8))) --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- || (cif->rtype->type == FFI_TYPE_LONGDOUBLE -- && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) --#endif -- ) -- { -+ if (rtypenum == FFI_TYPE_STRUCT && ((cif->abi != FFI_SYSV) || (size > 8))) { - rvalue = (void *) *pgr; - ng++; - pgr++; -@@ -1047,12 +1341,112 @@ ffi_closure_helper_SYSV (ffi_closure *cl - arg_types = cif->arg_types; - - /* Grab the addresses of the arguments from the stack frame. */ -- while (i < avn) -- { -- switch (arg_types[i]->type) -- { -+ while (i < avn) { -+ unsigned short typenum = arg_types[i]->type; -+ -+ /* We may need to handle some values depending on ABI */ -+ if (cif->abi == FFI_LINUX_SOFT_FLOAT) { -+ if (typenum == FFI_TYPE_FLOAT) -+ typenum = FFI_TYPE_UINT32; -+ if (typenum == FFI_TYPE_DOUBLE) -+ typenum = FFI_TYPE_UINT64; -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_UINT128; -+ } else if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX64) { -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ if (typenum == FFI_TYPE_LONGDOUBLE) -+ typenum = FFI_TYPE_STRUCT; -+#endif -+ } -+ -+ switch (typenum) { -+#ifndef __NO_FPRS__ -+ case FFI_TYPE_FLOAT: -+ /* unfortunately float values are stored as doubles -+ * in the ffi_closure_SYSV code (since we don't check -+ * the type in that routine). -+ */ -+ -+ /* there are 8 64bit floating point registers */ -+ -+ if (nf < 8) -+ { -+ double temp = pfr->d; -+ pfr->f = (float) temp; -+ avalue[i] = pfr; -+ nf++; -+ pfr++; -+ } -+ else -+ { -+ /* FIXME? here we are really changing the values -+ * stored in the original calling routines outgoing -+ * parameter stack. This is probably a really -+ * naughty thing to do but... -+ */ -+ avalue[i] = pst; -+ pst += 1; -+ } -+ break; -+ -+ case FFI_TYPE_DOUBLE: -+ /* On the outgoing stack all values are aligned to 8 */ -+ /* there are 8 64bit floating point registers */ -+ -+ if (nf < 8) -+ { -+ avalue[i] = pfr; -+ nf++; -+ pfr++; -+ } -+ else -+ { -+ if (((long) pst) & 4) -+ pst++; -+ avalue[i] = pst; -+ pst += 2; -+ } -+ break; -+ -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -+ case FFI_TYPE_LONGDOUBLE: -+ if (nf < 7) -+ { -+ avalue[i] = pfr; -+ pfr += 2; -+ nf += 2; -+ } -+ else -+ { -+ if (((long) pst) & 4) -+ pst++; -+ avalue[i] = pst; -+ pst += 4; -+ nf = 8; -+ } -+ break; -+#endif -+#endif /* have FPRS */ -+ -+ case FFI_TYPE_UINT128: -+ /* -+ * Test if for the whole long double, 4 gprs are available. -+ * otherwise the stuff ends up on the stack. -+ */ -+ if (ng < 5) { -+ avalue[i] = pgr; -+ pgr += 4; -+ ng += 4; -+ } else { -+ avalue[i] = pst; -+ pst += 4; -+ ng = 8+4; -+ } -+ break; -+ - case FFI_TYPE_SINT8: - case FFI_TYPE_UINT8: -+#ifndef __LITTLE_ENDIAN__ - /* there are 8 gpr registers used to pass values */ - if (ng < 8) - { -@@ -1066,9 +1460,11 @@ ffi_closure_helper_SYSV (ffi_closure *cl - pst++; - } - break; -+#endif - - case FFI_TYPE_SINT16: - case FFI_TYPE_UINT16: -+#ifndef __LITTLE_ENDIAN__ - /* there are 8 gpr registers used to pass values */ - if (ng < 8) - { -@@ -1082,11 +1478,11 @@ ffi_closure_helper_SYSV (ffi_closure *cl - pst++; - } - break; -+#endif - - case FFI_TYPE_SINT32: - case FFI_TYPE_UINT32: - case FFI_TYPE_POINTER: -- soft_float_closure: - /* there are 8 gpr registers used to pass values */ - if (ng < 8) - { -@@ -1102,9 +1498,6 @@ ffi_closure_helper_SYSV (ffi_closure *cl - break; - - case FFI_TYPE_STRUCT: --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- do_struct: --#endif - /* Structs are passed by reference. The address will appear in a - gpr if it is one of the first 8 arguments. */ - if (ng < 8) -@@ -1122,7 +1515,6 @@ ffi_closure_helper_SYSV (ffi_closure *cl - - case FFI_TYPE_SINT64: - case FFI_TYPE_UINT64: -- soft_double_closure: - /* passing long long ints are complex, they must - * be passed in suitable register pairs such as - * (r3,r4) or (r5,r6) or (r6,r7), or (r7,r8) or (r9,r10) -@@ -1154,99 +1546,8 @@ ffi_closure_helper_SYSV (ffi_closure *cl - } - break; - -- case FFI_TYPE_FLOAT: -- /* With FFI_LINUX_SOFT_FLOAT floats are handled like UINT32. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_float_closure; -- /* unfortunately float values are stored as doubles -- * in the ffi_closure_SYSV code (since we don't check -- * the type in that routine). -- */ -- -- /* there are 8 64bit floating point registers */ -- -- if (nf < 8) -- { -- temp = pfr->d; -- pfr->f = (float) temp; -- avalue[i] = pfr; -- nf++; -- pfr++; -- } -- else -- { -- /* FIXME? here we are really changing the values -- * stored in the original calling routines outgoing -- * parameter stack. This is probably a really -- * naughty thing to do but... -- */ -- avalue[i] = pst; -- pst += 1; -- } -- break; -- -- case FFI_TYPE_DOUBLE: -- /* With FFI_LINUX_SOFT_FLOAT doubles are handled like UINT64. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- goto soft_double_closure; -- /* On the outgoing stack all values are aligned to 8 */ -- /* there are 8 64bit floating point registers */ -- -- if (nf < 8) -- { -- avalue[i] = pfr; -- nf++; -- pfr++; -- } -- else -- { -- if (((long) pst) & 4) -- pst++; -- avalue[i] = pst; -- pst += 2; -- } -- break; -- --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- case FFI_TYPE_LONGDOUBLE: -- if (cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) -- goto do_struct; -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- { /* Test if for the whole long double, 4 gprs are available. -- otherwise the stuff ends up on the stack. */ -- if (ng < 5) -- { -- avalue[i] = pgr; -- pgr += 4; -- ng += 4; -- } -- else -- { -- avalue[i] = pst; -- pst += 4; -- ng = 8; -- } -- break; -- } -- if (nf < 7) -- { -- avalue[i] = pfr; -- pfr += 2; -- nf += 2; -- } -- else -- { -- if (((long) pst) & 4) -- pst++; -- avalue[i] = pst; -- pst += 4; -- nf = 8; -- } -- break; --#endif -- - default: -- FFI_ASSERT (0); -+ FFI_ASSERT (0); - } - - i++; -@@ -1263,39 +1564,9 @@ ffi_closure_helper_SYSV (ffi_closure *cl - already used and we never have a struct with size zero. That is the reason - for the subtraction of 1. See the comment in ffitarget.h about ordering. - */ -- if (cif->abi == FFI_SYSV && cif->rtype->type == FFI_TYPE_STRUCT -- && size <= 8) -+ if (cif->abi == FFI_SYSV && rtypenum == FFI_TYPE_STRUCT && size <= 8) - return (FFI_SYSV_TYPE_SMALL_STRUCT - 1) + size; --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- else if (cif->rtype->type == FFI_TYPE_LONGDOUBLE -- && cif->abi != FFI_LINUX && cif->abi != FFI_LINUX_SOFT_FLOAT) -- return FFI_TYPE_STRUCT; --#endif -- /* With FFI_LINUX_SOFT_FLOAT floats and doubles are handled like UINT32 -- respectivley UINT64. */ -- if (cif->abi == FFI_LINUX_SOFT_FLOAT) -- { -- switch (cif->rtype->type) -- { -- case FFI_TYPE_FLOAT: -- return FFI_TYPE_UINT32; -- break; -- case FFI_TYPE_DOUBLE: -- return FFI_TYPE_UINT64; -- break; --#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE -- case FFI_TYPE_LONGDOUBLE: -- return FFI_TYPE_UINT128; -- break; --#endif -- default: -- return cif->rtype->type; -- } -- } -- else -- { -- return cif->rtype->type; -- } -+ return rtypenum; - } - - int FFI_HIDDEN ffi_closure_helper_LINUX64 (ffi_closure *, void *, -@@ -1312,16 +1583,20 @@ ffi_closure_helper_LINUX64 (ffi_closure - - void **avalue; - ffi_type **arg_types; -- long i, avn; -+ unsigned long i, avn, nfixedargs; - ffi_cif *cif; - ffi_dblfl *end_pfr = pfr + NUM_FPR_ARG_REGISTERS64; -+#ifdef __STRUCT_PARM_ALIGN__ -+ unsigned long align; -+#endif - - cif = closure->cif; - avalue = alloca (cif->nargs * sizeof (void *)); - -- /* Copy the caller's structure return value address so that the closure -- returns the data directly to the caller. */ -- if (cif->rtype->type == FFI_TYPE_STRUCT) -+ /* Copy the caller's structure return value address so that the -+ closure returns the data directly to the caller. */ -+ if (cif->rtype->type == FFI_TYPE_STRUCT -+ && (cif->flags & FLAG_RETURNS_SMST) == 0) - { - rvalue = (void *) *pst; - pst++; -@@ -1329,30 +1604,39 @@ ffi_closure_helper_LINUX64 (ffi_closure - - i = 0; - avn = cif->nargs; -+ nfixedargs = cif->nfixedargs; - arg_types = cif->arg_types; - - /* Grab the addresses of the arguments from the stack frame. */ - while (i < avn) - { -+ unsigned int elt, elnum; -+ - switch (arg_types[i]->type) - { - case FFI_TYPE_SINT8: - case FFI_TYPE_UINT8: -+#ifndef __LITTLE_ENDIAN__ - avalue[i] = (char *) pst + 7; - pst++; - break; -+#endif - - case FFI_TYPE_SINT16: - case FFI_TYPE_UINT16: -+#ifndef __LITTLE_ENDIAN__ - avalue[i] = (char *) pst + 6; - pst++; - break; -+#endif - - case FFI_TYPE_SINT32: - case FFI_TYPE_UINT32: -+#ifndef __LITTLE_ENDIAN__ - avalue[i] = (char *) pst + 4; - pst++; - break; -+#endif - - case FFI_TYPE_SINT64: - case FFI_TYPE_UINT64: -@@ -1362,12 +1646,82 @@ ffi_closure_helper_LINUX64 (ffi_closure - break; - - case FFI_TYPE_STRUCT: -- /* Structures with size less than eight bytes are passed -- left-padded. */ -- if (arg_types[i]->size < 8) -- avalue[i] = (char *) pst + 8 - arg_types[i]->size; -+#ifdef __STRUCT_PARM_ALIGN__ -+ align = arg_types[i]->alignment; -+ if (align > __STRUCT_PARM_ALIGN__) -+ align = __STRUCT_PARM_ALIGN__; -+ if (align > 1) -+ pst = (unsigned long *) ALIGN ((size_t) pst, align); -+#endif -+ elt = 0; -+#if _CALL_ELF == 2 -+ elt = discover_homogeneous_aggregate (arg_types[i], &elnum); -+#endif -+ if (elt) -+ { -+ union { -+ void *v; -+ unsigned long *ul; -+ float *f; -+ double *d; -+ size_t p; -+ } to, from; -+ -+ /* Repackage the aggregate from its parts. The -+ aggregate size is not greater than the space taken by -+ the registers so store back to the register/parameter -+ save arrays. */ -+ if (pfr + elnum <= end_pfr) -+ to.v = pfr; -+ else -+ to.v = pst; -+ -+ avalue[i] = to.v; -+ from.ul = pst; -+ if (elt == FFI_TYPE_FLOAT) -+ { -+ do -+ { -+ if (pfr < end_pfr && i < nfixedargs) -+ { -+ *to.f = (float) pfr->d; -+ pfr++; -+ } -+ else -+ *to.f = *from.f; -+ to.f++; -+ from.f++; -+ } -+ while (--elnum != 0); -+ } -+ else -+ { -+ do -+ { -+ if (pfr < end_pfr && i < nfixedargs) -+ { -+ *to.d = pfr->d; -+ pfr++; -+ } -+ else -+ *to.d = *from.d; -+ to.d++; -+ from.d++; -+ } -+ while (--elnum != 0); -+ } -+ } - else -- avalue[i] = pst; -+ { -+#ifndef __LITTLE_ENDIAN__ -+ /* Structures with size less than eight bytes are passed -+ left-padded. */ -+ if (arg_types[i]->size < 8) -+ avalue[i] = (char *) pst + 8 - arg_types[i]->size; -+ else -+#endif -+ avalue[i] = pst; -+ } - pst += (arg_types[i]->size + 7) / 8; - break; - -@@ -1379,7 +1733,7 @@ ffi_closure_helper_LINUX64 (ffi_closure - - /* there are 13 64bit floating point registers */ - -- if (pfr < end_pfr) -+ if (pfr < end_pfr && i < nfixedargs) - { - double temp = pfr->d; - pfr->f = (float) temp; -@@ -1395,7 +1749,7 @@ ffi_closure_helper_LINUX64 (ffi_closure - /* On the outgoing stack all values are aligned to 8 */ - /* there are 13 64bit floating point registers */ - -- if (pfr < end_pfr) -+ if (pfr < end_pfr && i < nfixedargs) - { - avalue[i] = pfr; - pfr++; -@@ -1407,14 +1761,14 @@ ffi_closure_helper_LINUX64 (ffi_closure - - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE - case FFI_TYPE_LONGDOUBLE: -- if (pfr + 1 < end_pfr) -+ if (pfr + 1 < end_pfr && i + 1 < nfixedargs) - { - avalue[i] = pfr; - pfr += 2; - } - else - { -- if (pfr < end_pfr) -+ if (pfr < end_pfr && i < nfixedargs) - { - /* Passed partly in f13 and partly on the stack. - Move it all to the stack. */ -@@ -1438,5 +1792,14 @@ ffi_closure_helper_LINUX64 (ffi_closure - (closure->fun) (cif, rvalue, avalue, closure->user_data); - - /* Tell ffi_closure_LINUX64 how to perform return type promotions. */ -+ if ((cif->flags & FLAG_RETURNS_SMST) != 0) -+ { -+ if ((cif->flags & FLAG_RETURNS_FP) == 0) -+ return FFI_V2_TYPE_SMALL_STRUCT + cif->rtype->size - 1; -+ else if ((cif->flags & FLAG_RETURNS_64BITS) != 0) -+ return FFI_V2_TYPE_DOUBLE_HOMOG; -+ else -+ return FFI_V2_TYPE_FLOAT_HOMOG; -+ } - return cif->rtype->type; - } -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ffitarget.h -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ffitarget.h -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ffitarget.h -@@ -1,6 +1,8 @@ - /* -----------------------------------------------------------------*-C-*- -- ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. -- Copyright (C) 2007, 2008 Free Software Foundation, Inc -+ ffitarget.h - Copyright (c) 2012 Anthony Green -+ Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc -+ Copyright (c) 1996-2003 Red Hat, Inc. -+ - Target configuration macros for PowerPC. - - Permission is hereby granted, free of charge, to any person obtaining -@@ -28,6 +30,10 @@ - #ifndef LIBFFI_TARGET_H - #define LIBFFI_TARGET_H - -+#ifndef LIBFFI_H -+#error "Please do not include ffitarget.h directly into your source. Use ffi.h instead." -+#endif -+ - /* ---- System specific configurations ----------------------------------- */ - - #if defined (POWERPC) && defined (__powerpc64__) /* linux64 */ -@@ -57,18 +63,14 @@ typedef enum ffi_abi { - FFI_LINUX64, - FFI_LINUX, - FFI_LINUX_SOFT_FLOAT, --# ifdef POWERPC64 -+# if defined(POWERPC64) - FFI_DEFAULT_ABI = FFI_LINUX64, --# else --# if (!defined(__NO_FPRS__) && (__LDBL_MANT_DIG__ == 106)) -- FFI_DEFAULT_ABI = FFI_LINUX, --# else --# ifdef __NO_FPRS__ -+# elif defined(__NO_FPRS__) - FFI_DEFAULT_ABI = FFI_LINUX_SOFT_FLOAT, --# else -+# elif (__LDBL_MANT_DIG__ == 106) -+ FFI_DEFAULT_ABI = FFI_LINUX, -+# else - FFI_DEFAULT_ABI = FFI_GCC_SYSV, --# endif --# endif - # endif - #endif - -@@ -101,6 +103,10 @@ typedef enum ffi_abi { - - #define FFI_CLOSURES 1 - #define FFI_NATIVE_RAW_API 0 -+#if defined (POWERPC) || defined (POWERPC_FREEBSD) -+# define FFI_TARGET_SPECIFIC_VARIADIC 1 -+# define FFI_EXTRA_CIF_FIELDS unsigned nfixedargs -+#endif - - /* For additional types like the below, take care about the order in - ppc_closures.S. They must follow after the FFI_TYPE_LAST. */ -@@ -113,10 +119,19 @@ typedef enum ffi_abi { - defined in ffi.c, to determine the exact return type and its size. */ - #define FFI_SYSV_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 2) - --#if defined(POWERPC64) || defined(POWERPC_AIX) --#define FFI_TRAMPOLINE_SIZE 24 --#else /* POWERPC || POWERPC_AIX */ --#define FFI_TRAMPOLINE_SIZE 40 -+/* Used by ELFv2 for homogenous structure returns. */ -+#define FFI_V2_TYPE_FLOAT_HOMOG (FFI_TYPE_LAST + 1) -+#define FFI_V2_TYPE_DOUBLE_HOMOG (FFI_TYPE_LAST + 2) -+#define FFI_V2_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 3) -+ -+#if _CALL_ELF == 2 -+# define FFI_TRAMPOLINE_SIZE 32 -+#else -+# if defined(POWERPC64) || defined(POWERPC_AIX) -+# define FFI_TRAMPOLINE_SIZE 24 -+# else /* POWERPC || POWERPC_AIX */ -+# define FFI_TRAMPOLINE_SIZE 40 -+# endif - #endif - - #ifndef LIBFFI_ASM -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64.S -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/linux64.S -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64.S -@@ -30,16 +30,33 @@ - #include - - #ifdef __powerpc64__ -- .hidden ffi_call_LINUX64, .ffi_call_LINUX64 -- .globl ffi_call_LINUX64, .ffi_call_LINUX64 -+ .hidden ffi_call_LINUX64 -+ .globl ffi_call_LINUX64 -+# if _CALL_ELF == 2 -+ .text -+ffi_call_LINUX64: -+ addis %r2, %r12, .TOC.-ffi_call_LINUX64@ha -+ addi %r2, %r2, .TOC.-ffi_call_LINUX64@l -+ .localentry ffi_call_LINUX64, . - ffi_call_LINUX64 -+# else - .section ".opd","aw" - .align 3 - ffi_call_LINUX64: -+# ifdef _CALL_LINUX -+ .quad .L.ffi_call_LINUX64,.TOC.@tocbase,0 -+ .type ffi_call_LINUX64,@function -+ .text -+.L.ffi_call_LINUX64: -+# else -+ .hidden .ffi_call_LINUX64 -+ .globl .ffi_call_LINUX64 - .quad .ffi_call_LINUX64,.TOC.@tocbase,0 - .size ffi_call_LINUX64,24 - .type .ffi_call_LINUX64,@function - .text - .ffi_call_LINUX64: -+# endif -+# endif - .LFB1: - mflr %r0 - std %r28, -32(%r1) -@@ -54,22 +71,35 @@ ffi_call_LINUX64: - mr %r31, %r5 /* flags, */ - mr %r30, %r6 /* rvalue, */ - mr %r29, %r7 /* function address. */ -+/* Save toc pointer, not for the ffi_prep_args64 call, but for the later -+ bctrl function call. */ -+# if _CALL_ELF == 2 -+ std %r2, 24(%r1) -+# else - std %r2, 40(%r1) -+# endif - - /* Call ffi_prep_args64. */ - mr %r4, %r1 -+# if defined _CALL_LINUX || _CALL_ELF == 2 -+ bl ffi_prep_args64 -+# else - bl .ffi_prep_args64 -+# endif - -- ld %r0, 0(%r29) -+# if _CALL_ELF == 2 -+ mr %r12, %r29 -+# else -+ ld %r12, 0(%r29) - ld %r2, 8(%r29) - ld %r11, 16(%r29) -- -+# endif - /* Now do the call. */ - /* Set up cr1 with bits 4-7 of the flags. */ - mtcrf 0x40, %r31 - - /* Get the address to call into CTR. */ -- mtctr %r0 -+ mtctr %r12 - /* Load all those argument registers. */ - ld %r3, -32-(8*8)(%r28) - ld %r4, -32-(7*8)(%r28) -@@ -104,12 +134,17 @@ ffi_call_LINUX64: - - /* This must follow the call immediately, the unwinder - uses this to find out if r2 has been saved or not. */ -+# if _CALL_ELF == 2 -+ ld %r2, 24(%r1) -+# else - ld %r2, 40(%r1) -+# endif - - /* Now, deal with the return value. */ - mtcrf 0x01, %r31 -- bt- 30, .Ldone_return_value -- bt- 29, .Lfp_return_value -+ bt 31, .Lstruct_return_value -+ bt 30, .Ldone_return_value -+ bt 29, .Lfp_return_value - std %r3, 0(%r30) - /* Fall through... */ - -@@ -117,7 +152,7 @@ ffi_call_LINUX64: - /* Restore the registers we used and return. */ - mr %r1, %r28 - ld %r0, 16(%r28) -- ld %r28, -32(%r1) -+ ld %r28, -32(%r28) - mtlr %r0 - ld %r29, -24(%r1) - ld %r30, -16(%r1) -@@ -134,10 +169,48 @@ ffi_call_LINUX64: - .Lfloat_return_value: - stfs %f1, 0(%r30) - b .Ldone_return_value -+ -+.Lstruct_return_value: -+ bf 29, .Lsmall_struct -+ bf 28, .Lfloat_homog_return_value -+ stfd %f1, 0(%r30) -+ stfd %f2, 8(%r30) -+ stfd %f3, 16(%r30) -+ stfd %f4, 24(%r30) -+ stfd %f5, 32(%r30) -+ stfd %f6, 40(%r30) -+ stfd %f7, 48(%r30) -+ stfd %f8, 56(%r30) -+ b .Ldone_return_value -+ -+.Lfloat_homog_return_value: -+ stfs %f1, 0(%r30) -+ stfs %f2, 4(%r30) -+ stfs %f3, 8(%r30) -+ stfs %f4, 12(%r30) -+ stfs %f5, 16(%r30) -+ stfs %f6, 20(%r30) -+ stfs %f7, 24(%r30) -+ stfs %f8, 28(%r30) -+ b .Ldone_return_value -+ -+.Lsmall_struct: -+ std %r3, 0(%r30) -+ std %r4, 8(%r30) -+ b .Ldone_return_value -+ - .LFE1: - .long 0 - .byte 0,12,0,1,128,4,0,0 -+# if _CALL_ELF == 2 -+ .size ffi_call_LINUX64,.-ffi_call_LINUX64 -+# else -+# ifdef _CALL_LINUX -+ .size ffi_call_LINUX64,.-.L.ffi_call_LINUX64 -+# else - .size .ffi_call_LINUX64,.-.ffi_call_LINUX64 -+# endif -+# endif - - .section .eh_frame,EH_FRAME_FLAGS,@progbits - .Lframe1: -@@ -180,8 +253,8 @@ ffi_call_LINUX64: - .uleb128 0x4 - .align 3 - .LEFDE1: --#endif - --#if defined __ELF__ && defined __linux__ -+# if (defined __ELF__ && defined __linux__) || _CALL_ELF == 2 - .section .note.GNU-stack,"",@progbits -+# endif - #endif -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64_closure.S -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/linux64_closure.S -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/linux64_closure.S -@@ -32,66 +32,125 @@ - - #ifdef __powerpc64__ - FFI_HIDDEN (ffi_closure_LINUX64) -- FFI_HIDDEN (.ffi_closure_LINUX64) -- .globl ffi_closure_LINUX64, .ffi_closure_LINUX64 -+ .globl ffi_closure_LINUX64 -+# if _CALL_ELF == 2 -+ .text -+ffi_closure_LINUX64: -+ addis %r2, %r12, .TOC.-ffi_closure_LINUX64@ha -+ addi %r2, %r2, .TOC.-ffi_closure_LINUX64@l -+ .localentry ffi_closure_LINUX64, . - ffi_closure_LINUX64 -+# else - .section ".opd","aw" - .align 3 - ffi_closure_LINUX64: -+# ifdef _CALL_LINUX -+ .quad .L.ffi_closure_LINUX64,.TOC.@tocbase,0 -+ .type ffi_closure_LINUX64,@function -+ .text -+.L.ffi_closure_LINUX64: -+# else -+ FFI_HIDDEN (.ffi_closure_LINUX64) -+ .globl .ffi_closure_LINUX64 - .quad .ffi_closure_LINUX64,.TOC.@tocbase,0 - .size ffi_closure_LINUX64,24 - .type .ffi_closure_LINUX64,@function - .text - .ffi_closure_LINUX64: -+# endif -+# endif -+ -+# if _CALL_ELF == 2 -+# 32 byte special reg save area + 64 byte parm save area -+# + 64 byte retval area + 13*8 fpr save area + round to 16 -+# define STACKFRAME 272 -+# define PARMSAVE 32 -+# define RETVAL PARMSAVE+64 -+# else -+# 48 bytes special reg save area + 64 bytes parm save area -+# + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 -+# define STACKFRAME 240 -+# define PARMSAVE 48 -+# define RETVAL PARMSAVE+64 -+# endif -+ - .LFB1: -- # save general regs into parm save area -- std %r3, 48(%r1) -- std %r4, 56(%r1) -- std %r5, 64(%r1) -- std %r6, 72(%r1) -+# if _CALL_ELF == 2 -+ ld %r12, FFI_TRAMPOLINE_SIZE(%r11) # closure->cif -+ mflr %r0 -+ lwz %r12, 28(%r12) # cif->flags -+ mtcrf 0x40, %r12 -+ addi %r12, %r1, PARMSAVE -+ bt 7, .Lparmsave -+ # Our caller has not allocated a parameter save area. -+ # We need to allocate one here and use it to pass gprs to -+ # ffi_closure_helper_LINUX64. -+ addi %r12, %r1, -STACKFRAME+PARMSAVE -+.Lparmsave: -+ std %r0, 16(%r1) -+ # Save general regs into parm save area -+ std %r3, 0(%r12) -+ std %r4, 8(%r12) -+ std %r5, 16(%r12) -+ std %r6, 24(%r12) -+ std %r7, 32(%r12) -+ std %r8, 40(%r12) -+ std %r9, 48(%r12) -+ std %r10, 56(%r12) -+ -+ # load up the pointer to the parm save area -+ mr %r5, %r12 -+# else - mflr %r0 -+ # Save general regs into parm save area -+ # This is the parameter save area set up by our caller. -+ std %r3, PARMSAVE+0(%r1) -+ std %r4, PARMSAVE+8(%r1) -+ std %r5, PARMSAVE+16(%r1) -+ std %r6, PARMSAVE+24(%r1) -+ std %r7, PARMSAVE+32(%r1) -+ std %r8, PARMSAVE+40(%r1) -+ std %r9, PARMSAVE+48(%r1) -+ std %r10, PARMSAVE+56(%r1) - -- std %r7, 80(%r1) -- std %r8, 88(%r1) -- std %r9, 96(%r1) -- std %r10, 104(%r1) - std %r0, 16(%r1) - -- # mandatory 48 bytes special reg save area + 64 bytes parm save area -- # + 16 bytes retval area + 13*8 bytes fpr save area + round to 16 -- stdu %r1, -240(%r1) --.LCFI0: -+ # load up the pointer to the parm save area -+ addi %r5, %r1, PARMSAVE -+# endif - - # next save fpr 1 to fpr 13 -- stfd %f1, 128+(0*8)(%r1) -- stfd %f2, 128+(1*8)(%r1) -- stfd %f3, 128+(2*8)(%r1) -- stfd %f4, 128+(3*8)(%r1) -- stfd %f5, 128+(4*8)(%r1) -- stfd %f6, 128+(5*8)(%r1) -- stfd %f7, 128+(6*8)(%r1) -- stfd %f8, 128+(7*8)(%r1) -- stfd %f9, 128+(8*8)(%r1) -- stfd %f10, 128+(9*8)(%r1) -- stfd %f11, 128+(10*8)(%r1) -- stfd %f12, 128+(11*8)(%r1) -- stfd %f13, 128+(12*8)(%r1) -+ stfd %f1, -104+(0*8)(%r1) -+ stfd %f2, -104+(1*8)(%r1) -+ stfd %f3, -104+(2*8)(%r1) -+ stfd %f4, -104+(3*8)(%r1) -+ stfd %f5, -104+(4*8)(%r1) -+ stfd %f6, -104+(5*8)(%r1) -+ stfd %f7, -104+(6*8)(%r1) -+ stfd %f8, -104+(7*8)(%r1) -+ stfd %f9, -104+(8*8)(%r1) -+ stfd %f10, -104+(9*8)(%r1) -+ stfd %f11, -104+(10*8)(%r1) -+ stfd %f12, -104+(11*8)(%r1) -+ stfd %f13, -104+(12*8)(%r1) - -- # set up registers for the routine that actually does the work -- # get the context pointer from the trampoline -- mr %r3, %r11 -+ # load up the pointer to the saved fpr registers */ -+ addi %r6, %r1, -104 - -- # now load up the pointer to the result storage -- addi %r4, %r1, 112 -+ # load up the pointer to the result storage -+ addi %r4, %r1, -STACKFRAME+RETVAL - -- # now load up the pointer to the parameter save area -- # in the previous frame -- addi %r5, %r1, 240 + 48 -+ stdu %r1, -STACKFRAME(%r1) -+.LCFI0: - -- # now load up the pointer to the saved fpr registers */ -- addi %r6, %r1, 128 -+ # get the context pointer from the trampoline -+ mr %r3, %r11 - - # make the call -+# if defined _CALL_LINUX || _CALL_ELF == 2 -+ bl ffi_closure_helper_LINUX64 -+# else - bl .ffi_closure_helper_LINUX64 -+# endif - .Lret: - - # now r3 contains the return type -@@ -100,10 +159,12 @@ ffi_closure_LINUX64: - - # look up the proper starting point in table - # by using return type as offset -+ ld %r0, STACKFRAME+16(%r1) -+ cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT -+ bge .Lsmall - mflr %r4 # move address of .Lret to r4 - sldi %r3, %r3, 4 # now multiply return type by 16 - addi %r4, %r4, .Lret_type0 - .Lret -- ld %r0, 240+16(%r1) - add %r3, %r3, %r4 # add contents of table to table address - mtctr %r3 - bctr # jump to it -@@ -116,85 +177,175 @@ ffi_closure_LINUX64: - .Lret_type0: - # case FFI_TYPE_VOID - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - nop - # case FFI_TYPE_INT -- lwa %r3, 112+4(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lwa %r3, RETVAL+0(%r1) -+# else -+ lwa %r3, RETVAL+4(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_FLOAT -- lfs %f1, 112+0(%r1) -+ lfs %f1, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_DOUBLE -- lfd %f1, 112+0(%r1) -+ lfd %f1, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_LONGDOUBLE -- lfd %f1, 112+0(%r1) -+ lfd %f1, RETVAL+0(%r1) - mtlr %r0 -- lfd %f2, 112+8(%r1) -+ lfd %f2, RETVAL+8(%r1) - b .Lfinish - # case FFI_TYPE_UINT8 -- lbz %r3, 112+7(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lbz %r3, RETVAL+0(%r1) -+# else -+ lbz %r3, RETVAL+7(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_SINT8 -- lbz %r3, 112+7(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lbz %r3, RETVAL+0(%r1) -+# else -+ lbz %r3, RETVAL+7(%r1) -+# endif - extsb %r3,%r3 - mtlr %r0 - b .Lfinish - # case FFI_TYPE_UINT16 -- lhz %r3, 112+6(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lhz %r3, RETVAL+0(%r1) -+# else -+ lhz %r3, RETVAL+6(%r1) -+# endif - mtlr %r0 - .Lfinish: -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_SINT16 -- lha %r3, 112+6(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lha %r3, RETVAL+0(%r1) -+# else -+ lha %r3, RETVAL+6(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_UINT32 -- lwz %r3, 112+4(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lwz %r3, RETVAL+0(%r1) -+# else -+ lwz %r3, RETVAL+4(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_SINT32 -- lwa %r3, 112+4(%r1) -+# ifdef __LITTLE_ENDIAN__ -+ lwa %r3, RETVAL+0(%r1) -+# else -+ lwa %r3, RETVAL+4(%r1) -+# endif - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_UINT64 -- ld %r3, 112+0(%r1) -+ ld %r3, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_SINT64 -- ld %r3, 112+0(%r1) -+ ld %r3, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - # case FFI_TYPE_STRUCT - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME - blr - nop - # case FFI_TYPE_POINTER -- ld %r3, 112+0(%r1) -+ ld %r3, RETVAL+0(%r1) - mtlr %r0 -- addi %r1, %r1, 240 -+ addi %r1, %r1, STACKFRAME -+ blr -+# case FFI_V2_TYPE_FLOAT_HOMOG -+ lfs %f1, RETVAL+0(%r1) -+ lfs %f2, RETVAL+4(%r1) -+ lfs %f3, RETVAL+8(%r1) -+ b .Lmorefloat -+# case FFI_V2_TYPE_DOUBLE_HOMOG -+ lfd %f1, RETVAL+0(%r1) -+ lfd %f2, RETVAL+8(%r1) -+ lfd %f3, RETVAL+16(%r1) -+ lfd %f4, RETVAL+24(%r1) -+ mtlr %r0 -+ lfd %f5, RETVAL+32(%r1) -+ lfd %f6, RETVAL+40(%r1) -+ lfd %f7, RETVAL+48(%r1) -+ lfd %f8, RETVAL+56(%r1) -+ addi %r1, %r1, STACKFRAME -+ blr -+.Lmorefloat: -+ lfs %f4, RETVAL+12(%r1) -+ mtlr %r0 -+ lfs %f5, RETVAL+16(%r1) -+ lfs %f6, RETVAL+20(%r1) -+ lfs %f7, RETVAL+24(%r1) -+ lfs %f8, RETVAL+28(%r1) -+ addi %r1, %r1, STACKFRAME -+ blr -+.Lsmall: -+# ifdef __LITTLE_ENDIAN__ -+ ld %r3,RETVAL+0(%r1) -+ mtlr %r0 -+ ld %r4,RETVAL+8(%r1) -+ addi %r1, %r1, STACKFRAME -+ blr -+# else -+ # A struct smaller than a dword is returned in the low bits of r3 -+ # ie. right justified. Larger structs are passed left justified -+ # in r3 and r4. The return value area on the stack will have -+ # the structs as they are usually stored in memory. -+ cmpldi %r3, FFI_V2_TYPE_SMALL_STRUCT + 7 # size 8 bytes? -+ neg %r5, %r3 -+ ld %r3,RETVAL+0(%r1) -+ blt .Lsmalldown -+ mtlr %r0 -+ ld %r4,RETVAL+8(%r1) -+ addi %r1, %r1, STACKFRAME -+ blr -+.Lsmalldown: -+ addi %r5, %r5, FFI_V2_TYPE_SMALL_STRUCT + 7 -+ mtlr %r0 -+ sldi %r5, %r5, 3 -+ addi %r1, %r1, STACKFRAME -+ srd %r3, %r3, %r5 - blr --# esac -+# endif -+ - .LFE1: - .long 0 - .byte 0,12,0,1,128,0,0,0 -+# if _CALL_ELF == 2 -+ .size ffi_closure_LINUX64,.-ffi_closure_LINUX64 -+# else -+# ifdef _CALL_LINUX -+ .size ffi_closure_LINUX64,.-.L.ffi_closure_LINUX64 -+# else - .size .ffi_closure_LINUX64,.-.ffi_closure_LINUX64 -+# endif -+# endif - - .section .eh_frame,EH_FRAME_FLAGS,@progbits - .Lframe1: -@@ -223,14 +374,14 @@ ffi_closure_LINUX64: - .byte 0x2 # DW_CFA_advance_loc1 - .byte .LCFI0-.LFB1 - .byte 0xe # DW_CFA_def_cfa_offset -- .uleb128 240 -+ .uleb128 STACKFRAME - .byte 0x11 # DW_CFA_offset_extended_sf - .uleb128 0x41 - .sleb128 -2 - .align 3 - .LEFDE1: --#endif - --#if defined __ELF__ && defined __linux__ -+# if defined __ELF__ && defined __linux__ - .section .note.GNU-stack,"",@progbits -+# endif - #endif -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/ppc_closure.S -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/ppc_closure.S -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/ppc_closure.S -@@ -122,43 +122,78 @@ ENTRY(ffi_closure_SYSV) - blr - - # case FFI_TYPE_FLOAT -+#ifndef __NO_FPRS__ - lfs %f1,112+0(%r1) - mtlr %r0 - addi %r1,%r1,144 -+#else -+ nop -+ nop -+ nop -+#endif - blr - - # case FFI_TYPE_DOUBLE -+#ifndef __NO_FPRS__ - lfd %f1,112+0(%r1) - mtlr %r0 - addi %r1,%r1,144 -+#else -+ nop -+ nop -+ nop -+#endif - blr - - # case FFI_TYPE_LONGDOUBLE -+#ifndef __NO_FPRS__ - lfd %f1,112+0(%r1) - lfd %f2,112+8(%r1) - mtlr %r0 - b .Lfinish -+#else -+ nop -+ nop -+ nop -+ blr -+#endif - - # case FFI_TYPE_UINT8 -+#ifdef __LITTLE_ENDIAN__ -+ lbz %r3,112+0(%r1) -+#else - lbz %r3,112+3(%r1) -+#endif - mtlr %r0 - addi %r1,%r1,144 - blr - - # case FFI_TYPE_SINT8 -+#ifdef __LITTLE_ENDIAN__ -+ lbz %r3,112+0(%r1) -+#else - lbz %r3,112+3(%r1) -+#endif - extsb %r3,%r3 - mtlr %r0 - b .Lfinish - - # case FFI_TYPE_UINT16 -+#ifdef __LITTLE_ENDIAN__ -+ lhz %r3,112+0(%r1) -+#else - lhz %r3,112+2(%r1) -+#endif - mtlr %r0 - addi %r1,%r1,144 - blr - - # case FFI_TYPE_SINT16 -+#ifdef __LITTLE_ENDIAN__ -+ lha %r3,112+0(%r1) -+#else - lha %r3,112+2(%r1) -+#endif - mtlr %r0 - addi %r1,%r1,144 - blr -@@ -203,7 +238,7 @@ ENTRY(ffi_closure_SYSV) - lwz %r3,112+0(%r1) - lwz %r4,112+4(%r1) - lwz %r5,112+8(%r1) -- bl .Luint128 -+ b .Luint128 - - # The return types below are only used when the ABI type is FFI_SYSV. - # case FFI_SYSV_TYPE_SMALL_STRUCT + 1. One byte struct. -@@ -220,9 +255,15 @@ ENTRY(ffi_closure_SYSV) - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 3. Three byte struct. - lwz %r3,112+0(%r1) -+#ifdef __LITTLE_ENDIAN__ -+ mtlr %r0 -+ addi %r1,%r1,144 -+ blr -+#else - srwi %r3,%r3,8 - mtlr %r0 - b .Lfinish -+#endif - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 4. Four byte struct. - lwz %r3,112+0(%r1) -@@ -233,20 +274,35 @@ ENTRY(ffi_closure_SYSV) - # case FFI_SYSV_TYPE_SMALL_STRUCT + 5. Five byte struct. - lwz %r3,112+0(%r1) - lwz %r4,112+4(%r1) -+#ifdef __LITTLE_ENDIAN__ -+ mtlr %r0 -+ b .Lfinish -+#else - li %r5,24 - b .Lstruct567 -+#endif - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 6. Six byte struct. - lwz %r3,112+0(%r1) - lwz %r4,112+4(%r1) -+#ifdef __LITTLE_ENDIAN__ -+ mtlr %r0 -+ b .Lfinish -+#else - li %r5,16 - b .Lstruct567 -+#endif - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 7. Seven byte struct. - lwz %r3,112+0(%r1) - lwz %r4,112+4(%r1) -+#ifdef __LITTLE_ENDIAN__ -+ mtlr %r0 -+ b .Lfinish -+#else - li %r5,8 - b .Lstruct567 -+#endif - - # case FFI_SYSV_TYPE_SMALL_STRUCT + 8. Eight byte struct. - lwz %r3,112+0(%r1) -@@ -254,6 +310,7 @@ ENTRY(ffi_closure_SYSV) - mtlr %r0 - b .Lfinish - -+#ifndef __LITTLE_ENDIAN__ - .Lstruct567: - subfic %r6,%r5,32 - srw %r4,%r4,%r5 -@@ -263,6 +320,7 @@ ENTRY(ffi_closure_SYSV) - mtlr %r0 - addi %r1,%r1,144 - blr -+#endif - - .Luint128: - lwz %r6,112+12(%r1) -Index: mozilla-release/js/src/ctypes/libffi/src/powerpc/sysv.S -=================================================================== ---- mozilla-release.orig/js/src/ctypes/libffi/src/powerpc/sysv.S -+++ mozilla-release/js/src/ctypes/libffi/src/powerpc/sysv.S -@@ -83,6 +83,7 @@ ENTRY(ffi_call_SYSV) - nop - 1: - -+#ifndef __NO_FPRS__ - /* Load all the FP registers. */ - bf- 6,2f - lfd %f1,-16-(8*4)-(8*8)(%r28) -@@ -94,6 +95,7 @@ ENTRY(ffi_call_SYSV) - lfd %f6,-16-(8*4)-(3*8)(%r28) - lfd %f7,-16-(8*4)-(2*8)(%r28) - lfd %f8,-16-(8*4)-(1*8)(%r28) -+#endif - 2: - - /* Make the call. */ -@@ -103,7 +105,9 @@ ENTRY(ffi_call_SYSV) - mtcrf 0x01,%r31 /* cr7 */ - bt- 31,L(small_struct_return_value) - bt- 30,L(done_return_value) -+#ifndef __NO_FPRS__ - bt- 29,L(fp_return_value) -+#endif - stw %r3,0(%r30) - bf+ 28,L(done_return_value) - stw %r4,4(%r30) -@@ -124,6 +128,7 @@ L(done_return_value): - lwz %r1,0(%r1) - blr - -+#ifndef __NO_FPRS__ - L(fp_return_value): - bf 28,L(float_return_value) - stfd %f1,0(%r30) -@@ -134,21 +139,17 @@ L(fp_return_value): - L(float_return_value): - stfs %f1,0(%r30) - b L(done_return_value) -+#endif - - L(small_struct_return_value): -- extrwi %r6,%r31,2,19 /* number of bytes padding = shift/8 */ -- mtcrf 0x02,%r31 /* copy flags to cr[24:27] (cr6) */ -- extrwi %r5,%r31,5,19 /* r5 <- number of bits of padding */ -- subfic %r6,%r6,4 /* r6 <- number of useful bytes in r3 */ -- bf- 25,L(done_return_value) /* struct in r3 ? if not, done. */ --/* smst_one_register: */ -- slw %r3,%r3,%r5 /* Left-justify value in r3 */ -- mtxer %r6 /* move byte count to XER ... */ -- stswx %r3,0,%r30 /* ... and store that many bytes */ -- bf+ 26,L(done_return_value) /* struct in r3:r4 ? */ -- add %r6,%r6,%r30 /* adjust pointer */ -- stswi %r4,%r6,4 /* store last four bytes */ -- b L(done_return_value) -+ /* -+ * The C code always allocates a properly-aligned 8-byte bounce -+ * buffer to make this assembly code very simple. Just write out -+ * r3 and r4 to the buffer to allow the C code to handle the rest. -+ */ -+ stw %r3, 0(%r30) -+ stw %r4, 4(%r30) -+ b L(done_return_value) - - .LFE1: - END(ffi_call_SYSV) -Index: mozilla-release/mfbt/Endian.h -=================================================================== ---- mozilla-release.orig/mfbt/Endian.h -+++ mozilla-release/mfbt/Endian.h -@@ -91,7 +91,7 @@ - # else - # error "CPU type is unknown" - # endif --#elif defined(__APPLE__) -+#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__) - # if __LITTLE_ENDIAN__ - # define MOZ_LITTLE_ENDIAN 1 - # elif __BIG_ENDIAN__ -@@ -119,8 +119,7 @@ - * cases. - */ - #elif defined(__sparc) || defined(__sparc__) || \ -- defined(_POWER) || defined(__powerpc__) || \ -- defined(__ppc__) || defined(__hppa) || \ -+ defined(_POWER) || defined(__hppa) || \ - defined(_MIPSEB) || defined(__ARMEB__) || \ - defined(__s390__) || defined(__AARCH64EB__) || \ - (defined(__sh__) && defined(__LITTLE_ENDIAN__)) || \ -Index: mozilla-release/media/webrtc/trunk/webrtc/typedefs.h -=================================================================== ---- mozilla-release.orig/media/webrtc/trunk/webrtc/typedefs.h -+++ mozilla-release/media/webrtc/trunk/webrtc/typedefs.h -@@ -52,13 +52,23 @@ - #elif defined(__powerpc64__) - #define WEBRTC_ARCH_PPC64 1 - #define WEBRTC_ARCH_64_BITS 1 -+#ifdef __LITTLE_ENDIAN__ -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#define WEBRTC_LITTLE_ENDIAN -+#else - #define WEBRTC_ARCH_BIG_ENDIAN - #define WEBRTC_BIG_ENDIAN -+#endif - #elif defined(__ppc__) || defined(__powerpc__) - #define WEBRTC_ARCH_PPC 1 - #define WEBRTC_ARCH_32_BITS 1 -+#ifdef __LITTLE_ENDIAN__ -+#define WEBRTC_ARCH_LITTLE_ENDIAN -+#define WEBRTC_LITTLE_ENDIAN -+#else - #define WEBRTC_ARCH_BIG_ENDIAN - #define WEBRTC_BIG_ENDIAN -+#endif - #elif defined(__sparc64__) - #define WEBRTC_ARCH_SPARC 1 - #define WEBRTC_ARCH_64_BITS 1 -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/moz.build -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/moz.build -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/moz.build -@@ -206,12 +206,12 @@ if CONFIG['OS_TEST'] == 'powerpc': - 'xptcstubs_ppc_linux.cpp', - ] - --if CONFIG['OS_TEST'] == 'powerpc64': -+if CONFIG['OS_TEST'] in ('powerpc64', 'powerpc64le'): - if CONFIG['OS_ARCH'] in ('Linux', 'FreeBSD'): - SOURCES += [ -- 'xptcinvoke_asm_ppc64_linux.s', -+ 'xptcinvoke_asm_ppc64_linux.S', - 'xptcinvoke_ppc64_linux.cpp', -- 'xptcstubs_asm_ppc64_linux.s', -+ 'xptcstubs_asm_ppc64_linux.S', - 'xptcstubs_ppc64_linux.cpp', - ] - -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s -+++ /dev/null -@@ -1,132 +0,0 @@ --# This Source Code Form is subject to the terms of the Mozilla Public --# License, v. 2.0. If a copy of the MPL was not distributed with this --# file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --.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(nsISupports* that, uint32_t methodIndex, --# uint32_t paramCount, nsXPTCVariant* params) --# -- -- .section ".toc","aw" -- .section ".text" -- .align 2 -- .globl NS_InvokeByIndex -- .section ".opd","aw" -- .align 3 --NS_InvokeByIndex: -- .quad .NS_InvokeByIndex,.TOC.@tocbase -- .previous -- .type NS_InvokeByIndex,@function --.NS_InvokeByIndex: -- 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(uint64_t* gpregs, double* fpregs, -- # uint32_t paramCount, nsXPTCVariant* s, -- # uint64_t* 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,.-.NS_InvokeByIndex -- -- # Magic indicating no need for an executable stack -- .section .note.GNU-stack, "", @progbits ; .previous -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.S -=================================================================== ---- /dev/null -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.S -@@ -0,0 +1,167 @@ -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this -+# file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ -+.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 -+ -+# The ABI defines a fixed stack frame area of 4 doublewords (ELFv2) -+# or 6 doublewords (ELFv1); the last of these doublewords is used -+# as TOC pointer save area. The fixed area is followed by a parameter -+# save area of 8 doublewords (used for vararg routines), followed -+# by space for parameters passed on the stack. -+# -+# We set STACK_TOC to the offset of the TOC pointer save area, and -+# STACK_PARAMS to the offset of the first on-stack parameter. -+ -+#if _CALL_ELF == 2 -+#define STACK_TOC 24 -+#define STACK_PARAMS 96 -+#else -+#define STACK_TOC 40 -+#define STACK_PARAMS 112 -+#endif -+ -+# -+# NS_InvokeByIndex(nsISupports* that, uint32_t methodIndex, -+# uint32_t paramCount, nsXPTCVariant* params) -+# -+ -+#if _CALL_ELF == 2 -+ .section ".text" -+ .type NS_InvokeByIndex,@function -+ .globl NS_InvokeByIndex -+ .align 2 -+NS_InvokeByIndex: -+0: addis 2,12,(.TOC.-0b)@ha -+ addi 2,2,(.TOC.-0b)@l -+ .localentry NS_InvokeByIndex,.-NS_InvokeByIndex -+#else -+ .section ".toc","aw" -+ .section ".text" -+ .align 2 -+ .globl NS_InvokeByIndex -+ .section ".opd","aw" -+ .align 3 -+NS_InvokeByIndex: -+ .quad .NS_InvokeByIndex,.TOC.@tocbase -+ .previous -+ .type NS_InvokeByIndex,@function -+.NS_InvokeByIndex: -+#endif -+ 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. -+ # -+ # | (fixed area + | | 7 GP | 13 FP | 3 NV | -+ # | param. save) |(params)........| regs | regs | regs | -+ # (r1)......(+STACK_PARAMS)... (-23*8).(-16*8).(-3*8)..(r31) -+ -+ # +stack frame, -unused stack params, +regs storage, +1 for alignment -+ addi r7,r5,((STACK_PARAMS/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(uint64_t* gpregs, double* fpregs, -+ # uint32_t paramCount, nsXPTCVariant* s, -+ # uint64_t* d)) -+ -+ # r5, r6 are passed through intact (paramCount, params) -+ # r7 (d) has to be r1+STACK_PARAMS -+ # -- 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,STACK_PARAMS # 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 r12,0(r9) -+ -+ std r2,STACK_TOC(r1) # Save r2 (TOC pointer) -+ -+#if _CALL_ELF == 2 -+ mtctr r12 -+#else -+ ld r0,0(r12) # Actual address from fd. -+ mtctr 0 -+ ld r11,16(r12) # Environment pointer from fd. -+ ld r2,8(r12) # TOC pointer from fd. -+#endif -+ -+ # 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,STACK_TOC(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 -+ -+#if _CALL_ELF == 2 -+ .size NS_InvokeByIndex,.-NS_InvokeByIndex -+#else -+ .size NS_InvokeByIndex,.-.NS_InvokeByIndex -+#endif -+ -+ # Magic indicating no need for an executable stack -+ .section .note.GNU-stack, "", @progbits ; .previous -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp -@@ -74,7 +74,9 @@ invoke_copy_to_stack(uint64_t* gpregs, - fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles - } else { - float *p = (float *)d; -+#ifndef __LITTLE_ENDIAN__ - p++; -+#endif - *p = s->val.f; - } - } -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s -+++ /dev/null -@@ -1,81 +0,0 @@ --# This Source Code Form is subject to the terms of the Mozilla Public --# License, v. 2.0. If a copy of the MPL was not distributed with this --# file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --.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.@tocbase -- .previous -- .type SharedStub,@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 -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.S -=================================================================== ---- /dev/null -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.S -@@ -0,0 +1,107 @@ -+# This Source Code Form is subject to the terms of the Mozilla Public -+# License, v. 2.0. If a copy of the MPL was not distributed with this -+# file, You can obtain one at http://mozilla.org/MPL/2.0/. -+ -+.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 -+ -+#if _CALL_ELF == 2 -+#define STACK_PARAMS 96 -+#else -+#define STACK_PARAMS 112 -+#endif -+ -+#if _CALL_ELF == 2 -+ .section ".text" -+ .type SharedStub,@function -+ .globl SharedStub -+ # Make the symbol hidden so that the branch from the stub does -+ # not go via a PLT. This is not only better for performance, -+ # but may be necessary to avoid linker errors since there is -+ # no place to restore the TOC register in a sibling call. -+ .hidden SharedStub -+ .align 2 -+SharedStub: -+0: addis 2,12,(.TOC.-0b)@ha -+ addi 2,2,(.TOC.-0b)@l -+ .localentry SharedStub,.-SharedStub -+#else -+ .section ".text" -+ .align 2 -+ .globl SharedStub -+ .section ".opd","aw" -+ .align 3 -+ -+SharedStub: -+ .quad .SharedStub,.TOC.@tocbase -+ .previous -+ .type SharedStub,@function -+ -+.SharedStub: -+#endif -+ 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,STACK_PARAMS # 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 -+ -+#if _CALL_ELF == 2 -+ .size SharedStub,.-SharedStub -+#else -+ .size SharedStub,.-.SharedStub -+#endif -+ -+ # Magic indicating no need for an executable stack -+ .section .note.GNU-stack, "", @progbits ; .previous -Index: mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp -=================================================================== ---- mozilla-release.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp -+++ mozilla-release/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp -@@ -83,7 +83,9 @@ PrepareAndDispatch(nsXPTCStubBase* self, - dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles - else { - float *p = (float *)ap; -+#ifndef __LITTLE_ENDIAN__ - p++; -+#endif - dp->val.f = *p; - } - } else { /* integer type or pointer */ -@@ -153,6 +155,43 @@ PrepareAndDispatch(nsXPTCStubBase* self, - // etc. - // Use assembler directives to get the names right... - -+#if _CALL_ELF == 2 -+# define STUB_ENTRY(n) \ -+__asm__ ( \ -+ ".section \".text\" \n\t" \ -+ ".align 2 \n\t" \ -+ ".if "#n" < 10 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ -+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ -+ "0: addis 2,12,.TOC.-0b@ha \n\t" \ -+ "addi 2,2,.TOC.-0b@l \n\t" \ -+ ".localentry _ZN14nsXPTCStubBase5Stub"#n"Ev,.-_ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ -+ \ -+ ".elseif "#n" < 100 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ -+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ -+ "0: addis 2,12,.TOC.-0b@ha \n\t" \ -+ "addi 2,2,.TOC.-0b@l \n\t" \ -+ ".localentry _ZN14nsXPTCStubBase6Stub"#n"Ev,.-_ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ -+ \ -+ ".elseif "#n" < 1000 \n\t" \ -+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ -+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ -+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ -+ "0: addis 2,12,.TOC.-0b@ha \n\t" \ -+ "addi 2,2,.TOC.-0b@l \n\t" \ -+ ".localentry _ZN14nsXPTCStubBase7Stub"#n"Ev,.-_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" \ -+); -+#else - # define STUB_ENTRY(n) \ - __asm__ ( \ - ".section \".toc\",\"aw\" \n\t" \ -@@ -195,6 +234,7 @@ __asm__ ( - "li 11,"#n" \n\t" \ - "b SharedStub \n" \ - ); -+#endif - - #define SENTINEL_ENTRY(n) \ - nsresult nsXPTCStubBase::Sentinel##n() \ diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 1ceaaf2..6d680ff 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -26,7 +26,6 @@ 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 diff --git a/xulrunner.spec b/xulrunner.spec index da3fb6d..06161cf 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 29.0 -Release: 5%{?pre_tag}%{?dist} +Version: 30.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -101,14 +101,6 @@ Patch200: mozilla-193-pkgconfig.patch Patch204: rhbz-966424.patch # Upstream patches -Patch300: mozilla-ppc64le.patch -# mbo 962488 -Patch301: firefox-aarch64-double-convertsion.patch -# mbo 963023 -Patch302: firefox-aarch64-libevent.patch -# mbo 963024 -Patch303: firefox-aarch64-xpcom.patch -Patch304: mozilla-973977.patch # --------------------------------------------------- @@ -245,17 +237,7 @@ cd %{tarballdir} %patch204 -p1 -b .966424 # Upstream patches -%ifarch ppc64le -%if 0%{?fedora} > 20 -%patch300 -p1 -b .ppc64le -%endif -%endif -%patch301 -p1 -b .aarch64-dbl -%patch302 -p1 -b .aarch64-libevent -%patch303 -p1 -b .aarch64-xpcom -%ifarch ppc64 -%patch304 -p1 -b .973977 -%endif + %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -539,6 +521,10 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Jun 5 2014 Martin Stransky - 30.0-1 +- Update to 30.0 build 1 +- Disabled shared js + * Fri May 23 2014 Martin Stransky - 29.0-5 - Added a build fix for ppc64 - rhbz#1100495 From 8a38004b2b0d15e484a399032c73c0d27e0c87aa Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Jun 2014 12:09:22 +0200 Subject: [PATCH 165/239] Upload sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 891ef83..a387546 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -07c515fc487824f107a947d23f420e9d firefox-29.0.source.tar.bz2 +7c5433b1b58a56ce0f8d451e7217f282 firefox-30.0.source.tar.bz2 From 532901fae2c15cafc2d7e008055cdc0aa4d5936a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 5 Jun 2014 12:25:21 +0200 Subject: [PATCH 166/239] build req --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 06161cf..51632f7 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -2,7 +2,7 @@ %define system_nss 1 # Use system sqlite? -%if 0%{?fedora} < 19 +%if 0%{?fedora} < 20 %define system_sqlite 0 %define system_ffi 0 %else From d8024036fc6bcb29e17d1e50c8280157f2ed0a8b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 8 Jun 2014 01:58:07 -0500 Subject: [PATCH 167/239] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 51632f7..28fe40d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 30.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 30.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Thu Jun 5 2014 Martin Stransky - 30.0-1 - Update to 30.0 build 1 - Disabled shared js From 53dce40c725020682de26415e64b7f07f6b58f82 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 24 Jul 2014 22:27:53 -0500 Subject: [PATCH 168/239] Fix mozilla-config.h wrapper on aarch64 --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 28fe40d..e6e0c1c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 30.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -402,7 +402,7 @@ genheader=$* mv ${genheader}.h ${genheader}%{__isa_bits}.h cat > ${genheader}.h << EOF /* This file exists to fix multilib conflicts */ -#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) +#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__aarch64__) #include "${genheader}64.h" #else #include "${genheader}32.h" @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 25 2014 Yaakov Selkowitz - 30.0-3 +- Fix mozilla-config.h wrapper on aarch64 + * Sun Jun 08 2014 Fedora Release Engineering - 30.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 96a4e596aa2cf4b46826ca3d1e6d37b05c9dc351 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 25 Jul 2014 12:51:49 +0200 Subject: [PATCH 169/239] Update to 31.0 build 2 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index a387546..8de38a6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7c5433b1b58a56ce0f8d451e7217f282 firefox-30.0.source.tar.bz2 +499b70a9f08a2291d528e87eaf8804a3 firefox-31.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index e6e0c1c..7dbcc76 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 30.0 -Release: 3%{?pre_tag}%{?dist} +Version: 31.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 25 2014 Martin Stransky - 31.0-1 +- Update to 31.0 build 2 + * Fri Jul 25 2014 Yaakov Selkowitz - 30.0-3 - Fix mozilla-config.h wrapper on aarch64 From 8d523159889b91d6c5bd635617f65b74b2fc4c04 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 11:08:00 +0000 Subject: [PATCH 170/239] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7dbcc76..09f6692 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 31.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 31.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Jul 25 2014 Martin Stransky - 31.0-1 - Update to 31.0 build 2 From 695b530a4cdf01df27d98d89ad8422882653e950 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Aug 2014 15:55:18 +0200 Subject: [PATCH 171/239] Update to 32.0 build 1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 8de38a6..4659689 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -499b70a9f08a2291d528e87eaf8804a3 firefox-31.0.source.tar.bz2 +859d0b6fe2d36b6959cf08cee4c783cc firefox-32.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 09f6692..214c724 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 31.0 -Release: 2%{?pre_tag}%{?dist} +Version: 32.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -521,6 +521,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu aug 26 2014 Martin Stransky - 32.0-1 +- Update to 32.0 build 1 + * Mon Aug 18 2014 Fedora Release Engineering - 31.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From ea2e3fdf40453c1c38aa21a593e96a855895168b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Aug 2014 15:57:53 +0200 Subject: [PATCH 172/239] Update to 32.0 build 1 - changelog fix --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 214c724..95804dd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -521,7 +521,7 @@ fi #--------------------------------------------------------------------- %changelog -* Thu aug 26 2014 Martin Stransky - 32.0-1 +* Tue Aug 26 2014 Martin Stransky - 32.0-1 - Update to 32.0 build 1 * Mon Aug 18 2014 Fedora Release Engineering - 31.0-2 From 0526f46e39ecd70d58a74eab2217e2cd42cb6109 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 27 Aug 2014 13:50:15 +0200 Subject: [PATCH 173/239] Make -Wformat-security non-fatal --- xulrunner.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 95804dd..614025f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -346,8 +346,10 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat -Werror=format-security" +# -Werror=format-security causes build failures when -Wno-format is explicitly given +# for some sources +export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' From 6f337301cfe7a997104a8159cfa4ba9ae059ddd3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 2 Sep 2014 15:02:47 +0200 Subject: [PATCH 174/239] Build fixes - disable ion on i686 and enable on arm --- xulrunner.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 614025f..9f20cd1 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -286,8 +286,8 @@ echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig -echo "ac_add_options --disable-ion" >> .mozconfig -echo "ac_add_options --disable-yarr-jit" >> .mozconfig +#echo "ac_add_options --disable-ion" >> .mozconfig +#echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv7hnl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig @@ -309,6 +309,11 @@ echo "ac_add_options --disable-yarr-jit" >> .mozconfig echo "ac_add_options --disable-webrtc" >> .mozconfig %endif +# Workaround - installation crash +%ifarch %{ix86} +echo "ac_add_options --disable-ion" >> .mozconfig +%endif + #--------------------------------------------------------------------- %build From 684b0b294b944fb0bbab96095e1607445cdb5e4b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 2 Sep 2014 15:51:14 +0200 Subject: [PATCH 175/239] build fixes --- firefox-build.patch | 11 +++++++++++ xulrunner.spec | 11 +++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 firefox-build.patch diff --git a/firefox-build.patch b/firefox-build.patch new file mode 100644 index 0000000..262337c --- /dev/null +++ b/firefox-build.patch @@ -0,0 +1,11 @@ +diff -up firefox-32.0/mozilla-release/media/libstagefright/moz.build.old firefox-32.0/mozilla-release/media/libstagefright/moz.build +--- firefox-32.0/mozilla-release/media/libstagefright/moz.build.old 2014-08-26 05:38:08.000000000 +0200 ++++ firefox-32.0/mozilla-release/media/libstagefright/moz.build 2014-08-27 15:40:12.030299348 +0200 +@@ -120,7 +120,6 @@ elif CONFIG['GNU_CXX']: + '-Wno-sign-compare' + ] + CXXFLAGS += [ +- '-Wno-format', + '-Wno-multichar', + '-Wno-sign-compare', + '-Wno-unused', diff --git a/xulrunner.spec b/xulrunner.spec index 9f20cd1..572071d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -89,6 +89,7 @@ Source21: %{name}.sh.in # build patches Patch1: xulrunner-install-dir.patch +Patch2: firefox-build.patch Patch3: mozilla-build-arm.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-24.0-jemalloc-ppc.patch @@ -229,6 +230,7 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 +%patch2 -p2 -b .build %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines @@ -351,10 +353,11 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -# -Werror=format-security causes build failures when -Wno-format is explicitly given -# for some sources -export CFLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat" -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive -Wformat-security -Wformat" +#rhbz#1037063 +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" + +export CFLAGS="$MOZ_OPT_FLAGS" +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' From 7cbd0f1cf0a13891c2eb06812782fbe0f532c40c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 9 Sep 2014 18:03:49 +0200 Subject: [PATCH 176/239] move /sdk/bin to xulrunner libdir --- xulrunner.spec | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 572071d..fcee488 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 32.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -272,7 +272,6 @@ echo "ac_add_options --enable-system-ffi" >> .mozconfig %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig -echo "ac_add_options --enable-dtrace" >> .mozconfig %else echo "ac_add_options --disable-debug" >> .mozconfig echo "ac_add_options --enable-optimize" >> .mozconfig @@ -288,8 +287,6 @@ echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig -#echo "ac_add_options --disable-ion" >> .mozconfig -#echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv7hnl echo "ac_add_options --with-arch=armv7-a" >> .mozconfig @@ -435,6 +432,12 @@ for i in *.so; do done popd +# Move sdk/bin to xulrunner libdir +pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin +mv ply *.py %{mozappdir} +popd +rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin + # Library path LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d LD_CONF_FILE=xulrunner-%{__isa_bits}.conf @@ -524,13 +527,18 @@ fi %{_libdir}/%{name}-devel-*/* %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell -%{mozappdir}/js-gdb.py +%{mozappdir}/*.py +%dir %{mozappdir}/ply +%{mozappdir}/ply/*.py %ghost %{mozappdir}/js-gdb.pyc %ghost %{mozappdir}/js-gdb.pyo #--------------------------------------------------------------------- %changelog +* Tue Sep 9 2014 Martin Stransky - 32.0-2 +- move /sdk/bin to xulrunner libdir + * Tue Aug 26 2014 Martin Stransky - 32.0-1 - Update to 32.0 build 1 From e114c4ce35a344dd58905e61491462c9f03fea85 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 10 Sep 2014 09:45:24 +0200 Subject: [PATCH 177/239] xulrunner-devel - buid fix --- xulrunner.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index fcee488..4e7234a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -434,7 +434,7 @@ popd # Move sdk/bin to xulrunner libdir pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin -mv ply *.py %{mozappdir} +mv ply *.py $RPM_BUILD_ROOT%{mozappdir} popd rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin @@ -528,10 +528,12 @@ fi %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell %{mozappdir}/*.py +%ghost %{mozappdir}/*.pyc +%ghost %{mozappdir}/*.pyo %dir %{mozappdir}/ply %{mozappdir}/ply/*.py -%ghost %{mozappdir}/js-gdb.pyc -%ghost %{mozappdir}/js-gdb.pyo +%ghost %{mozappdir}/ply/*.pyc +%ghost %{mozappdir}/ply/*.pyo #--------------------------------------------------------------------- From 9cf1033e4f647a64d910ab1c05f7bd1483ff8904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 15 Sep 2014 11:15:37 +0200 Subject: [PATCH 178/239] backport js/src/configure.in changes for secondary arches fixes build on s390(x) and ppc64le (rhbz#1140157 and rhbz#1140159) --- ...er-32.0-backport-js-src-configure-in.patch | 92 +++++++++++++++++++ xulrunner.spec | 3 + 2 files changed, 95 insertions(+) create mode 100644 xulrunner-32.0-backport-js-src-configure-in.patch diff --git a/xulrunner-32.0-backport-js-src-configure-in.patch b/xulrunner-32.0-backport-js-src-configure-in.patch new file mode 100644 index 0000000..1172c7f --- /dev/null +++ b/xulrunner-32.0-backport-js-src-configure-in.patch @@ -0,0 +1,92 @@ +#Based on: +#https://hg.mozilla.org/mozilla-central/rev/57852745f33b +#https://hg.mozilla.org/mozilla-central/rev/926f47807112 +#https://hg.mozilla.org/mozilla-central/rev/a7b832e15a34 +--- firefox-32.0/mozilla-release/js/src/configure.in 2014-08-26 05:37:57.000000000 +0200 ++++ configure.in 2014-09-12 09:30:32.252623444 +0200 +@@ -1313,10 +1316,10 @@ + result="yes", result="no") + AC_MSG_RESULT("$result") + if test "$result" = "yes"; then +- AC_DEFINE(HAVE_64BIT_OS) +- HAVE_64BIT_OS=1 ++ AC_DEFINE(HAVE_64BIT_BUILD) ++ HAVE_64BIT_BUILD=1 + fi +-AC_SUBST(HAVE_64BIT_OS) ++AC_SUBST(HAVE_64BIT_BUILD) + AC_LANG_RESTORE + fi # COMPILE_ENVIRONMENT + +@@ -1404,7 +1407,7 @@ + *-aix*) + AC_DEFINE(AIX) + if test ! "$GNU_CC"; then +- if test ! "$HAVE_64BIT_OS"; then ++ if test ! "$HAVE_64BIT_BUILD"; then + # Compiling with Visual Age C++ object model compat is the + # default. To compile with object model ibm, add + # AIX_OBJMODEL=ibm to .mozconfig. +@@ -1748,7 +1763,7 @@ + + case "$target" in + i*86-*) +- if test "$HAVE_64BIT_OS"; then ++ if test "$HAVE_64BIT_BUILD"; then + AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.]) + fi + +@@ -1983,39 +1998,34 @@ + i?86-*) + ENABLE_ION=1 + AC_DEFINE(JS_CPU_X86) +- AC_DEFINE(JS_NUNBOX32) + ;; + x86_64*-*) + ENABLE_ION=1 + AC_DEFINE(JS_CPU_X64) +- AC_DEFINE(JS_PUNBOX64) + ;; + arm*-*) + ENABLE_ION=1 + AC_DEFINE(JS_CPU_ARM) +- AC_DEFINE(JS_NUNBOX32) + ;; +-sparc*-*) +- if test ! "$HAVE_64BIT_OS" ; then ++sparc-*) + dnl ENABLE_ION=0 + AC_DEFINE(JS_CPU_SPARC) +- AC_DEFINE(JS_NUNBOX32) +- else +- AC_DEFINE(JS_CPU_SPARC64) +- AC_DEFINE(JS_PUNBOX64) +- fi +- ;; +-powerpc64-*) +- AC_DEFINE(JS_CPU_PPC64) +- AC_DEFINE(JS_PUNBOX64) +- ;; +-powerpc-*) +- AC_DEFINE(JS_CPU_PPC) +- AC_DEFINE(JS_NUNBOX32) + ;; + mips*-*) + AC_DEFINE(JS_CPU_MIPS) +- AC_DEFINE(JS_NUNBOX32) ++ ;; ++esac ++ ++case "$target" in ++mips*-*) ++ AC_DEFINE(JS_NUNBOX32) ++ ;; ++*) ++ if test "$HAVE_64BIT_BUILD" ; then ++ AC_DEFINE(JS_PUNBOX64) ++ else ++ AC_DEFINE(JS_NUNBOX32) ++ fi + ;; + esac + diff --git a/xulrunner.spec b/xulrunner.spec index 4e7234a..d8ace62 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -95,6 +95,8 @@ Patch3: mozilla-build-arm.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch +# backport js/src/configure.in changes for secondary arches +Patch20: xulrunner-32.0-backport-js-src-configure-in.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -234,6 +236,7 @@ cd %{tarballdir} %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines +%patch20 -p2 -b .js-configure %patch200 -p2 -b .pk %patch204 -p1 -b .966424 From 7f9652e14cbf01a301ac6af8f3269a0d2f84b80f Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Mon, 8 Sep 2014 15:44:54 +0200 Subject: [PATCH 179/239] fix build on AArch64 Signed-off-by: Marcin Juszkiewicz --- xulrunner-fix-aarch64.patch | 22 ++++++++++++++++++++++ xulrunner.spec | 8 +++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 xulrunner-fix-aarch64.patch diff --git a/xulrunner-fix-aarch64.patch b/xulrunner-fix-aarch64.patch new file mode 100644 index 0000000..e153160 --- /dev/null +++ b/xulrunner-fix-aarch64.patch @@ -0,0 +1,22 @@ +Author: Marcin Juszkiewicz + +JS_PUNBOX64 needs to be defined for 64-bit targets. + +Upstream HEAD defines it for all 64-bit machines so no forward porting +should be needed. + +Index: mozilla-release/js/src/configure.in +=================================================================== +--- mozilla-release.orig/js/src/configure.in ++++ mozilla-release/js/src/configure.in +@@ -2017,6 +2017,10 @@ mips*-*) + AC_DEFINE(JS_CPU_MIPS) + AC_DEFINE(JS_NUNBOX32) + ;; ++aarch64*) ++ AC_DEFINE(JS_CPU_AARCH64) ++ AC_DEFINE(JS_PUNBOX64) ++ ;; + esac + + MOZ_ARG_DISABLE_BOOL(ion, diff --git a/xulrunner.spec b/xulrunner.spec index d8ace62..954cf76 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 32.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -103,6 +103,8 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch +# Let it build on AArch64 with simple backport like patch +Patch210: xulrunner-fix-aarch64.patch # Upstream patches # --------------------------------------------------- @@ -240,6 +242,7 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 +%patch210 -p1 # Upstream patches @@ -541,6 +544,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Sep 08 2014 Marcin Juszkiewicz - 32.0-3 +- Fix build on AArch64 + * Tue Sep 9 2014 Martin Stransky - 32.0-2 - move /sdk/bin to xulrunner libdir From 3d2636a82128ca6070965ec0be4d6edbdff31fdb Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 18 Sep 2014 12:03:16 +0200 Subject: [PATCH 180/239] Fix changelog date --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 954cf76..7f02914 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -544,7 +544,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Sep 08 2014 Marcin Juszkiewicz - 32.0-3 +* Mon Sep 18 2014 Marcin Juszkiewicz - 32.0-3 - Fix build on AArch64 * Tue Sep 9 2014 Martin Stransky - 32.0-2 From 2b71a87972c6708f69e809b81188470e530ffab4 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 18 Sep 2014 15:52:29 +0200 Subject: [PATCH 181/239] Revert "Fix changelog date" This reverts commit 3d2636a82128ca6070965ec0be4d6edbdff31fdb. The patch did not apply and was not needed tue to rework in this version. Backing out. Sorry for the noise. --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 7f02914..954cf76 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -544,7 +544,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Sep 18 2014 Marcin Juszkiewicz - 32.0-3 +* Mon Sep 08 2014 Marcin Juszkiewicz - 32.0-3 - Fix build on AArch64 * Tue Sep 9 2014 Martin Stransky - 32.0-2 From 6d218d94f1d45e744092494c45188e44bdc01f4e Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 18 Sep 2014 15:53:21 +0200 Subject: [PATCH 182/239] Revert "fix build on AArch64" This reverts commit 7f9652e14cbf01a301ac6af8f3269a0d2f84b80f. The patch did not apply and was not needed tue to rework in this version. Backing out. Sorry for the noise. --- xulrunner-fix-aarch64.patch | 22 ---------------------- xulrunner.spec | 8 +------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 xulrunner-fix-aarch64.patch diff --git a/xulrunner-fix-aarch64.patch b/xulrunner-fix-aarch64.patch deleted file mode 100644 index e153160..0000000 --- a/xulrunner-fix-aarch64.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Marcin Juszkiewicz - -JS_PUNBOX64 needs to be defined for 64-bit targets. - -Upstream HEAD defines it for all 64-bit machines so no forward porting -should be needed. - -Index: mozilla-release/js/src/configure.in -=================================================================== ---- mozilla-release.orig/js/src/configure.in -+++ mozilla-release/js/src/configure.in -@@ -2017,6 +2017,10 @@ mips*-*) - AC_DEFINE(JS_CPU_MIPS) - AC_DEFINE(JS_NUNBOX32) - ;; -+aarch64*) -+ AC_DEFINE(JS_CPU_AARCH64) -+ AC_DEFINE(JS_PUNBOX64) -+ ;; - esac - - MOZ_ARG_DISABLE_BOOL(ion, diff --git a/xulrunner.spec b/xulrunner.spec index 954cf76..d8ace62 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 32.0 -Release: 3%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -103,8 +103,6 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch -# Let it build on AArch64 with simple backport like patch -Patch210: xulrunner-fix-aarch64.patch # Upstream patches # --------------------------------------------------- @@ -242,7 +240,6 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 -%patch210 -p1 # Upstream patches @@ -544,9 +541,6 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Sep 08 2014 Marcin Juszkiewicz - 32.0-3 -- Fix build on AArch64 - * Tue Sep 9 2014 Martin Stransky - 32.0-2 - move /sdk/bin to xulrunner libdir From 0f5045a2d06f32905a57555ac8af5695b490d5e8 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 21 Sep 2014 07:07:33 +0100 Subject: [PATCH 183/239] Update to 32.0.2, sync fixes to the same as firefox --- firefox-baseline-disable.patch | 13 +++++++++++++ sources | 2 +- xulrunner.spec | 20 +++++++++++--------- 3 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 firefox-baseline-disable.patch diff --git a/firefox-baseline-disable.patch b/firefox-baseline-disable.patch new file mode 100644 index 0000000..806d378 --- /dev/null +++ b/firefox-baseline-disable.patch @@ -0,0 +1,13 @@ +diff -up firefox-32.0.1/mozilla-release/media/webrtc/trunk/Makefile.old firefox-32.0.1/mozilla-release/media/webrtc/trunk/Makefile +diff -up firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js.old firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js +--- firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js.old 2014-09-12 00:25:45.000000000 +0200 ++++ firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js 2014-09-16 14:27:52.447743192 +0200 +@@ -844,7 +844,7 @@ pref("javascript.options.strict", + #ifdef DEBUG + pref("javascript.options.strict.debug", true); + #endif +-pref("javascript.options.baselinejit", true); ++pref("javascript.options.baselinejit", false); + pref("javascript.options.ion", true); + pref("javascript.options.asmjs", true); + pref("javascript.options.native_regexp", true); diff --git a/sources b/sources index 4659689..342a402 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -859d0b6fe2d36b6959cf08cee4c783cc firefox-32.0.source.tar.bz2 +4e2d215627cbeba9d526de872dd7b3ee firefox-32.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index d8ace62..fe371a8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 32.0 -Release: 2%{?pre_tag}%{?dist} +Version: 32.0.2 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -102,6 +102,7 @@ Patch20: xulrunner-32.0-backport-js-src-configure-in.patch Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch +Patch207: firefox-baseline-disable.patch # Upstream patches @@ -240,6 +241,10 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p1 -b .966424 +# disable baseline JIT on i686 (rhbz#1047079) +%ifarch %{ix86} +%patch207 -p2 -b .baseline +%endif # Upstream patches @@ -296,8 +301,6 @@ echo "ac_add_options --with-arch=armv7-a" >> .mozconfig echo "ac_add_options --with-float-abi=hard" >> .mozconfig echo "ac_add_options --with-fpu=neon" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig -echo "ac_add_options --disable-ion" >> .mozconfig -echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif %ifarch armv5tel echo "ac_add_options --with-arch=armv5te" >> .mozconfig @@ -311,11 +314,6 @@ echo "ac_add_options --disable-yarr-jit" >> .mozconfig echo "ac_add_options --disable-webrtc" >> .mozconfig %endif -# Workaround - installation crash -%ifarch %{ix86} -echo "ac_add_options --disable-ion" >> .mozconfig -%endif - #--------------------------------------------------------------------- %build @@ -541,6 +539,10 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Sep 20 2014 Peter Robinson 32.0.2-1 +- Update to 32.0.2 +- sync fixes to the same as firefox + * Tue Sep 9 2014 Martin Stransky - 32.0-2 - move /sdk/bin to xulrunner libdir From b3f5bd918363784f62510f4e480242133117b4df Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2014 15:45:47 +0200 Subject: [PATCH 184/239] Updated to 33.0 --- mozilla-1042889.patch | 81 ++++++++++++++++ rhbz-966424.patch | 17 +--- sources | 2 +- ...er-32.0-backport-js-src-configure-in.patch | 92 ------------------- xulrunner.spec | 11 +-- 5 files changed, 91 insertions(+), 112 deletions(-) create mode 100644 mozilla-1042889.patch delete mode 100644 xulrunner-32.0-backport-js-src-configure-in.patch diff --git a/mozilla-1042889.patch b/mozilla-1042889.patch new file mode 100644 index 0000000..6061b9b --- /dev/null +++ b/mozilla-1042889.patch @@ -0,0 +1,81 @@ +diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js +--- a/dom/browser-element/BrowserElementChildPreload.js ++++ b/dom/browser-element/BrowserElementChildPreload.js +@@ -90,16 +90,17 @@ function getErrorClass(errorCode) { + switch (NSPRCode) { + case SEC_ERROR_UNKNOWN_ISSUER: + case SEC_ERROR_UNTRUSTED_ISSUER: + case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: + case SEC_ERROR_UNTRUSTED_CERT: + case SSL_ERROR_BAD_CERT_DOMAIN: + case SEC_ERROR_EXPIRED_CERTIFICATE: + case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: ++ case SEC_ERROR_CA_CERT_INVALID: + case MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: + return Ci.nsINSSErrorsService.ERROR_CLASS_BAD_CERT; + default: + return Ci.nsINSSErrorsService.ERROR_CLASS_SSL_PROTOCOL; + } + + return null; + } +diff --git a/security/manager/ssl/src/NSSErrorsService.cpp b/security/manager/ssl/src/NSSErrorsService.cpp +--- a/security/manager/ssl/src/NSSErrorsService.cpp ++++ b/security/manager/ssl/src/NSSErrorsService.cpp +@@ -136,16 +136,17 @@ NSSErrorsService::GetErrorClass(nsresult + // Overridable errors. + case SEC_ERROR_UNKNOWN_ISSUER: + case SEC_ERROR_UNTRUSTED_ISSUER: + case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: + case SEC_ERROR_UNTRUSTED_CERT: + case SSL_ERROR_BAD_CERT_DOMAIN: + case SEC_ERROR_EXPIRED_CERTIFICATE: + case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: ++ case SEC_ERROR_CA_CERT_INVALID: + case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: + *aErrorClass = ERROR_CLASS_BAD_CERT; + break; + // Non-overridable errors. + default: + *aErrorClass = ERROR_CLASS_SSL_PROTOCOL; + break; + } +diff --git a/security/manager/ssl/src/SSLServerCertVerification.cpp b/security/manager/ssl/src/SSLServerCertVerification.cpp +--- a/security/manager/ssl/src/SSLServerCertVerification.cpp ++++ b/security/manager/ssl/src/SSLServerCertVerification.cpp +@@ -287,16 +287,17 @@ private: + + // A probe value of 1 means "no error". + uint32_t + MapCertErrorToProbeValue(PRErrorCode errorCode) + { + switch (errorCode) + { + case SEC_ERROR_UNKNOWN_ISSUER: return 2; ++ case SEC_ERROR_CA_CERT_INVALID: return 3; + case SEC_ERROR_UNTRUSTED_ISSUER: return 4; + case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: return 5; + case SEC_ERROR_UNTRUSTED_CERT: return 6; + case SEC_ERROR_INADEQUATE_KEY_USAGE: return 7; + case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: return 8; + case SSL_ERROR_BAD_CERT_DOMAIN: return 9; + case SEC_ERROR_EXPIRED_CERTIFICATE: return 10; + case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: return 11; +@@ -321,16 +322,17 @@ DetermineCertOverrideErrors(CERTCertific + MOZ_ASSERT(errorCodeMismatch == 0); + MOZ_ASSERT(errorCodeExpired == 0); + + // Assumes the error prioritization described in mozilla::pkix's + // BuildForward function. Also assumes that CERT_VerifyCertName was only + // called if CertVerifier::VerifyCert succeeded. + switch (defaultErrorCodeToReport) { + case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: ++ case SEC_ERROR_CA_CERT_INVALID: + case SEC_ERROR_UNKNOWN_ISSUER: + case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: + { + collectedErrors = nsICertOverrideService::ERROR_UNTRUSTED; + errorCodeTrust = defaultErrorCodeToReport; + + SECCertTimeValidity validity = CERT_CheckCertValidTimes(cert, now, false); + if (validity == secCertTimeUndetermined) { diff --git a/rhbz-966424.patch b/rhbz-966424.patch index c4c332e..7579d09 100644 --- a/rhbz-966424.patch +++ b/rhbz-966424.patch @@ -1,11 +1,7 @@ ---- a/toolkit/modules/CertUtils.jsm -+++ b/toolkit/modules/CertUtils.jsm -@@ -170,17 +170,19 @@ this.checkCert = - issuerCert = issuerCert.QueryInterface(Ci.nsIX509Cert3); - var tokenNames = issuerCert.getAllTokenNames({}); - - if (!tokenNames || !tokenNames.some(isBuiltinToken)) - throw new Ce(certNotBuiltInErr, Cr.NS_ERROR_ABORT); +diff -up firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm +--- firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 2014-10-14 08:12:14.358697255 +0200 ++++ firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm 2014-10-14 08:17:59.962181908 +0200 +@@ -174,7 +174,9 @@ this.checkCert = } function isBuiltinToken(tokenName) { @@ -16,8 +12,3 @@ } /** - * This class implements nsIBadCertListener. Its job is to prevent "bad cert" - * security dialogs from being shown to the user. It is better to simply fail - * if the certificate is bad. See bug 304286. - * - * @param aAllowNonBuiltInCerts (optional) diff --git a/sources b/sources index 342a402..292c031 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4e2d215627cbeba9d526de872dd7b3ee firefox-32.0.2.source.tar.bz2 +b0e793898bddf4f2bc46e42a331f3383 firefox-33.0.source.tar.bz2 diff --git a/xulrunner-32.0-backport-js-src-configure-in.patch b/xulrunner-32.0-backport-js-src-configure-in.patch deleted file mode 100644 index 1172c7f..0000000 --- a/xulrunner-32.0-backport-js-src-configure-in.patch +++ /dev/null @@ -1,92 +0,0 @@ -#Based on: -#https://hg.mozilla.org/mozilla-central/rev/57852745f33b -#https://hg.mozilla.org/mozilla-central/rev/926f47807112 -#https://hg.mozilla.org/mozilla-central/rev/a7b832e15a34 ---- firefox-32.0/mozilla-release/js/src/configure.in 2014-08-26 05:37:57.000000000 +0200 -+++ configure.in 2014-09-12 09:30:32.252623444 +0200 -@@ -1313,10 +1316,10 @@ - result="yes", result="no") - AC_MSG_RESULT("$result") - if test "$result" = "yes"; then -- AC_DEFINE(HAVE_64BIT_OS) -- HAVE_64BIT_OS=1 -+ AC_DEFINE(HAVE_64BIT_BUILD) -+ HAVE_64BIT_BUILD=1 - fi --AC_SUBST(HAVE_64BIT_OS) -+AC_SUBST(HAVE_64BIT_BUILD) - AC_LANG_RESTORE - fi # COMPILE_ENVIRONMENT - -@@ -1404,7 +1407,7 @@ - *-aix*) - AC_DEFINE(AIX) - if test ! "$GNU_CC"; then -- if test ! "$HAVE_64BIT_OS"; then -+ if test ! "$HAVE_64BIT_BUILD"; then - # Compiling with Visual Age C++ object model compat is the - # default. To compile with object model ibm, add - # AIX_OBJMODEL=ibm to .mozconfig. -@@ -1748,7 +1763,7 @@ - - case "$target" in - i*86-*) -- if test "$HAVE_64BIT_OS"; then -+ if test "$HAVE_64BIT_BUILD"; then - AC_MSG_ERROR([You are targeting i386 but using the 64-bit compiler.]) - fi - -@@ -1983,39 +1998,34 @@ - i?86-*) - ENABLE_ION=1 - AC_DEFINE(JS_CPU_X86) -- AC_DEFINE(JS_NUNBOX32) - ;; - x86_64*-*) - ENABLE_ION=1 - AC_DEFINE(JS_CPU_X64) -- AC_DEFINE(JS_PUNBOX64) - ;; - arm*-*) - ENABLE_ION=1 - AC_DEFINE(JS_CPU_ARM) -- AC_DEFINE(JS_NUNBOX32) - ;; --sparc*-*) -- if test ! "$HAVE_64BIT_OS" ; then -+sparc-*) - dnl ENABLE_ION=0 - AC_DEFINE(JS_CPU_SPARC) -- AC_DEFINE(JS_NUNBOX32) -- else -- AC_DEFINE(JS_CPU_SPARC64) -- AC_DEFINE(JS_PUNBOX64) -- fi -- ;; --powerpc64-*) -- AC_DEFINE(JS_CPU_PPC64) -- AC_DEFINE(JS_PUNBOX64) -- ;; --powerpc-*) -- AC_DEFINE(JS_CPU_PPC) -- AC_DEFINE(JS_NUNBOX32) - ;; - mips*-*) - AC_DEFINE(JS_CPU_MIPS) -- AC_DEFINE(JS_NUNBOX32) -+ ;; -+esac -+ -+case "$target" in -+mips*-*) -+ AC_DEFINE(JS_NUNBOX32) -+ ;; -+*) -+ if test "$HAVE_64BIT_BUILD" ; then -+ AC_DEFINE(JS_PUNBOX64) -+ else -+ AC_DEFINE(JS_NUNBOX32) -+ fi - ;; - esac - diff --git a/xulrunner.spec b/xulrunner.spec index fe371a8..afa9dc3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,7 +77,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 32.0.2 +Version: 33.0 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -95,8 +95,6 @@ Patch3: mozilla-build-arm.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch -# backport js/src/configure.in changes for secondary arches -Patch20: xulrunner-32.0-backport-js-src-configure-in.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -105,6 +103,7 @@ Patch204: rhbz-966424.patch Patch207: firefox-baseline-disable.patch # Upstream patches +Patch300: mozilla-1042889.patch # --------------------------------------------------- @@ -237,16 +236,16 @@ cd %{tarballdir} %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines -%patch20 -p2 -b .js-configure %patch200 -p2 -b .pk -%patch204 -p1 -b .966424 +%patch204 -p2 -b .966424 # disable baseline JIT on i686 (rhbz#1047079) %ifarch %{ix86} %patch207 -p2 -b .baseline %endif # Upstream patches +%patch300 -p1 -b .1042889 %{__rm} -f .mozconfig @@ -310,7 +309,7 @@ echo "ac_add_options --disable-ion" >> .mozconfig echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif -%ifnarch %{ix86} x86_64 armv7hl armv7hnl +%ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig %endif From 9074bae1b725e272597975b7dbba675eb89f3dc2 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2014 15:49:42 +0200 Subject: [PATCH 185/239] Changelog fix --- xulrunner.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index afa9dc3..eff4b84 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -518,6 +518,9 @@ fi %{mozappdir}/crashreporter.ini %{mozappdir}/Throbber-small.gif %endif +%{mozappdir}/install_app.py +%ghost %{mozappdir}/install_app.pyc +%ghost %{mozappdir}/install_app.pyo %files devel %defattr(-,root,root,-) @@ -538,6 +541,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Oct 16 2014 Martin Stransky - 33.0-1 +- Update to 33.0 + * Sat Sep 20 2014 Peter Robinson 32.0.2-1 - Update to 32.0.2 - sync fixes to the same as firefox From 358d1af0a75f5ce75599f3994d5a99ec8d9f1d65 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 16 Oct 2014 16:02:22 +0200 Subject: [PATCH 186/239] build fix - PRBool --- firefox-build-prbool.patch | 11 +++++++++++ xulrunner.spec | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 firefox-build-prbool.patch diff --git a/firefox-build-prbool.patch b/firefox-build-prbool.patch new file mode 100644 index 0000000..c7424ea --- /dev/null +++ b/firefox-build-prbool.patch @@ -0,0 +1,11 @@ +diff -up mozilla-release/security/certverifier/OCSPCache.h.old mozilla-release/security/certverifier/OCSPCache.h +--- mozilla-release/security/certverifier/OCSPCache.h.old 2014-10-14 12:33:46.519970732 +0200 ++++ mozilla-release/security/certverifier/OCSPCache.h 2014-10-14 12:34:44.418000625 +0200 +@@ -25,6 +25,7 @@ + #ifndef mozilla_psm_OCSPCache_h + #define mozilla_psm_OCSPCache_h + ++#include "prtypes.h" + #include "hasht.h" + #include "mozilla/Mutex.h" + #include "mozilla/Vector.h" diff --git a/xulrunner.spec b/xulrunner.spec index eff4b84..0e4119b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -95,6 +95,7 @@ Patch3: mozilla-build-arm.patch Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch +Patch20: firefox-build-prbool.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -236,6 +237,7 @@ cd %{tarballdir} %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines +%patch20 -p1 -b .prbool %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From 1a7516497d57bed7209c0c3c545c3a57aa85477e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 17 Oct 2014 14:48:54 +0200 Subject: [PATCH 187/239] ship install_app.py script --- xulrunner.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 0e4119b..6da6da6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -399,6 +399,9 @@ DESTDIR=$RPM_BUILD_ROOT make -C objdir install %{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config +# install install_app.py +%{__cp} objdir/dist/bin/install_app.py $RPM_BUILD_ROOT%{mozappdir} + # Copy pc files (for compatibility with 1.9.1) %{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul.pc \ $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-unstable.pc @@ -523,6 +526,7 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo +%{mozappdir}/gmp-fake/* %files devel %defattr(-,root,root,-) From 1dcae4348cf559bb72866841afe1b27840c05565 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Sat, 18 Oct 2014 11:38:24 +0200 Subject: [PATCH 188/239] build fix --- xulrunner.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 6da6da6..3c10cd6 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -526,7 +526,9 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo +%ifnarch %{arm} %{mozappdir}/gmp-fake/* +%endif %files devel %defattr(-,root,root,-) From 8635c3cfa2a3e9ee3c388bccb1c33394d8270860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 22 Oct 2014 17:13:39 +0200 Subject: [PATCH 189/239] - Fix filelist for secondary arches --- xulrunner.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 3c10cd6..eacea7c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 33.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -526,7 +526,7 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo -%ifnarch %{arm} +%ifarch %{ix86} x86_64 %{mozappdir}/gmp-fake/* %endif @@ -549,6 +549,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Oct 22 2014 Dan Horák - 33.0-2 +- Fix filelist for secondary arches + * Thu Oct 16 2014 Martin Stransky - 33.0-1 - Update to 33.0 From ae52963c0106d72be2f342a76b23954bd1b2cc23 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mon, 6 Apr 2015 16:33:52 -0400 Subject: [PATCH 190/239] rebuild for libvpx 1.4.0 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index eacea7c..fd79c9d 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 33.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -549,6 +549,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 6 2015 Tom Callaway - 33.0-3 +- rebuild for libvpx 1.4.0 + * Wed Oct 22 2014 Dan Horák - 33.0-2 - Fix filelist for secondary arches From f0c48f3d46ef01eed03dec583e0f4fd1810fd8aa Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 7 Apr 2015 15:17:40 -0400 Subject: [PATCH 191/239] stop using old compat defines --- xulrunner-33.0-libvpx-modern.patch | 12 ++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 xulrunner-33.0-libvpx-modern.patch diff --git a/xulrunner-33.0-libvpx-modern.patch b/xulrunner-33.0-libvpx-modern.patch new file mode 100644 index 0000000..52d1839 --- /dev/null +++ b/xulrunner-33.0-libvpx-modern.patch @@ -0,0 +1,12 @@ +diff -up xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc.modern xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc +--- xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc.modern 2015-04-07 15:12:34.710923016 -0400 ++++ xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc 2015-04-07 15:12:48.278838658 -0400 +@@ -180,7 +180,7 @@ int VP8EncoderImpl::InitEncode(const Vid + // Creating a wrapper to the image - setting image data to NULL. Actual + // pointer will be set in encode. Setting align to 1, as it is meaningless + // (actual memory is not allocated). +- raw_ = vpx_img_wrap(NULL, IMG_FMT_I420, codec_.width, codec_.height, ++ raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, + 1, NULL); + // populate encoder configuration with default values + if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) { diff --git a/xulrunner.spec b/xulrunner.spec index fd79c9d..09a5155 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -102,6 +102,7 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch Patch207: firefox-baseline-disable.patch +Patch208: xulrunner-33.0-libvpx-modern.patch # Upstream patches Patch300: mozilla-1042889.patch @@ -245,6 +246,7 @@ cd %{tarballdir} %ifarch %{ix86} %patch207 -p2 -b .baseline %endif +%patch208 -p2 -b .modern # Upstream patches %patch300 -p1 -b .1042889 From afc4529c2321a2e5235d4b8d43211d303c355dff Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 13:30:31 +0200 Subject: [PATCH 192/239] Update to 37.0.1 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 292c031..a7e8418 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b0e793898bddf4f2bc46e42a331f3383 firefox-33.0.source.tar.bz2 +2d466d850ef9b0a71bce3b208f5f884c firefox-37.0.1.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 09a5155..b7475e3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 33.0 -Release: 3%{?pre_tag}%{?dist} +Version: 37.0.1 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -551,6 +551,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 15 2015 Martin Stransky - 37.0.1-1 +- Update to 37.0.1 + * Mon Apr 6 2015 Tom Callaway - 33.0-3 - rebuild for libvpx 1.4.0 From cf90f2c273f8f1994ae24b07aefb584c48b62729 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 14:07:31 +0200 Subject: [PATCH 193/239] Update to new version - 37.0.1 --- mozilla-1042889.patch | 81 ------------------------------ xulrunner-33.0-libvpx-modern.patch | 12 ----- xulrunner.spec | 4 -- 3 files changed, 97 deletions(-) delete mode 100644 mozilla-1042889.patch delete mode 100644 xulrunner-33.0-libvpx-modern.patch diff --git a/mozilla-1042889.patch b/mozilla-1042889.patch deleted file mode 100644 index 6061b9b..0000000 --- a/mozilla-1042889.patch +++ /dev/null @@ -1,81 +0,0 @@ -diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js ---- a/dom/browser-element/BrowserElementChildPreload.js -+++ b/dom/browser-element/BrowserElementChildPreload.js -@@ -90,16 +90,17 @@ function getErrorClass(errorCode) { - switch (NSPRCode) { - case SEC_ERROR_UNKNOWN_ISSUER: - case SEC_ERROR_UNTRUSTED_ISSUER: - case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: - case SEC_ERROR_UNTRUSTED_CERT: - case SSL_ERROR_BAD_CERT_DOMAIN: - case SEC_ERROR_EXPIRED_CERTIFICATE: - case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: -+ case SEC_ERROR_CA_CERT_INVALID: - case MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: - return Ci.nsINSSErrorsService.ERROR_CLASS_BAD_CERT; - default: - return Ci.nsINSSErrorsService.ERROR_CLASS_SSL_PROTOCOL; - } - - return null; - } -diff --git a/security/manager/ssl/src/NSSErrorsService.cpp b/security/manager/ssl/src/NSSErrorsService.cpp ---- a/security/manager/ssl/src/NSSErrorsService.cpp -+++ b/security/manager/ssl/src/NSSErrorsService.cpp -@@ -136,16 +136,17 @@ NSSErrorsService::GetErrorClass(nsresult - // Overridable errors. - case SEC_ERROR_UNKNOWN_ISSUER: - case SEC_ERROR_UNTRUSTED_ISSUER: - case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: - case SEC_ERROR_UNTRUSTED_CERT: - case SSL_ERROR_BAD_CERT_DOMAIN: - case SEC_ERROR_EXPIRED_CERTIFICATE: - case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: -+ case SEC_ERROR_CA_CERT_INVALID: - case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: - *aErrorClass = ERROR_CLASS_BAD_CERT; - break; - // Non-overridable errors. - default: - *aErrorClass = ERROR_CLASS_SSL_PROTOCOL; - break; - } -diff --git a/security/manager/ssl/src/SSLServerCertVerification.cpp b/security/manager/ssl/src/SSLServerCertVerification.cpp ---- a/security/manager/ssl/src/SSLServerCertVerification.cpp -+++ b/security/manager/ssl/src/SSLServerCertVerification.cpp -@@ -287,16 +287,17 @@ private: - - // A probe value of 1 means "no error". - uint32_t - MapCertErrorToProbeValue(PRErrorCode errorCode) - { - switch (errorCode) - { - case SEC_ERROR_UNKNOWN_ISSUER: return 2; -+ case SEC_ERROR_CA_CERT_INVALID: return 3; - case SEC_ERROR_UNTRUSTED_ISSUER: return 4; - case SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE: return 5; - case SEC_ERROR_UNTRUSTED_CERT: return 6; - case SEC_ERROR_INADEQUATE_KEY_USAGE: return 7; - case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: return 8; - case SSL_ERROR_BAD_CERT_DOMAIN: return 9; - case SEC_ERROR_EXPIRED_CERTIFICATE: return 10; - case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: return 11; -@@ -321,16 +322,17 @@ DetermineCertOverrideErrors(CERTCertific - MOZ_ASSERT(errorCodeMismatch == 0); - MOZ_ASSERT(errorCodeExpired == 0); - - // Assumes the error prioritization described in mozilla::pkix's - // BuildForward function. Also assumes that CERT_VerifyCertName was only - // called if CertVerifier::VerifyCert succeeded. - switch (defaultErrorCodeToReport) { - case SEC_ERROR_CERT_SIGNATURE_ALGORITHM_DISABLED: -+ case SEC_ERROR_CA_CERT_INVALID: - case SEC_ERROR_UNKNOWN_ISSUER: - case mozilla::pkix::MOZILLA_PKIX_ERROR_CA_CERT_USED_AS_END_ENTITY: - { - collectedErrors = nsICertOverrideService::ERROR_UNTRUSTED; - errorCodeTrust = defaultErrorCodeToReport; - - SECCertTimeValidity validity = CERT_CheckCertValidTimes(cert, now, false); - if (validity == secCertTimeUndetermined) { diff --git a/xulrunner-33.0-libvpx-modern.patch b/xulrunner-33.0-libvpx-modern.patch deleted file mode 100644 index 52d1839..0000000 --- a/xulrunner-33.0-libvpx-modern.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc.modern xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ---- xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc.modern 2015-04-07 15:12:34.710923016 -0400 -+++ xulrunner-33.0/mozilla-release/media/webrtc/trunk/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc 2015-04-07 15:12:48.278838658 -0400 -@@ -180,7 +180,7 @@ int VP8EncoderImpl::InitEncode(const Vid - // Creating a wrapper to the image - setting image data to NULL. Actual - // pointer will be set in encode. Setting align to 1, as it is meaningless - // (actual memory is not allocated). -- raw_ = vpx_img_wrap(NULL, IMG_FMT_I420, codec_.width, codec_.height, -+ raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, - 1, NULL); - // populate encoder configuration with default values - if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), config_, 0)) { diff --git a/xulrunner.spec b/xulrunner.spec index b7475e3..8449943 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -102,10 +102,8 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch Patch207: firefox-baseline-disable.patch -Patch208: xulrunner-33.0-libvpx-modern.patch # Upstream patches -Patch300: mozilla-1042889.patch # --------------------------------------------------- @@ -246,10 +244,8 @@ cd %{tarballdir} %ifarch %{ix86} %patch207 -p2 -b .baseline %endif -%patch208 -p2 -b .modern # Upstream patches -%patch300 -p1 -b .1042889 %{__rm} -f .mozconfig From a0e96f51f1661dfbf1b91ca6c1032c0685d21d97 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 14:37:53 +0200 Subject: [PATCH 194/239] removed unused patch --- firefox-baseline-disable.patch | 13 ------------- xulrunner.spec | 5 ----- 2 files changed, 18 deletions(-) delete mode 100644 firefox-baseline-disable.patch diff --git a/firefox-baseline-disable.patch b/firefox-baseline-disable.patch deleted file mode 100644 index 806d378..0000000 --- a/firefox-baseline-disable.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up firefox-32.0.1/mozilla-release/media/webrtc/trunk/Makefile.old firefox-32.0.1/mozilla-release/media/webrtc/trunk/Makefile -diff -up firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js.old firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js ---- firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js.old 2014-09-12 00:25:45.000000000 +0200 -+++ firefox-32.0.1/mozilla-release/modules/libpref/src/init/all.js 2014-09-16 14:27:52.447743192 +0200 -@@ -844,7 +844,7 @@ pref("javascript.options.strict", - #ifdef DEBUG - pref("javascript.options.strict.debug", true); - #endif --pref("javascript.options.baselinejit", true); -+pref("javascript.options.baselinejit", false); - pref("javascript.options.ion", true); - pref("javascript.options.asmjs", true); - pref("javascript.options.native_regexp", true); diff --git a/xulrunner.spec b/xulrunner.spec index 8449943..d2201d4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -101,7 +101,6 @@ Patch20: firefox-build-prbool.patch Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch -Patch207: firefox-baseline-disable.patch # Upstream patches @@ -240,10 +239,6 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p2 -b .966424 -# disable baseline JIT on i686 (rhbz#1047079) -%ifarch %{ix86} -%patch207 -p2 -b .baseline -%endif # Upstream patches From 27bff7ab6a4e8590980d51f2c1f15a3f6c467b68 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 15:24:57 +0200 Subject: [PATCH 195/239] removed /mozilla-xremote-client --- xulrunner.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index d2201d4..a4f5054 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -500,7 +500,6 @@ fi %{mozappdir}/components/*.manifest %{mozappdir}/omni.ja %{mozappdir}/*.so -%{mozappdir}/mozilla-xremote-client %{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-stub From c28fb475f7fea886964493e2c49d394dbb7d52e0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 15 Apr 2015 20:59:44 +0200 Subject: [PATCH 196/239] Added gmp-clearkey to provided files --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index a4f5054..281ec3c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -507,6 +507,7 @@ fi %{mozappdir}/dependentlibs.list %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %{mozappdir}/plugin-container +%{mozappdir}/gmp-clearkey %if !%{?system_nss} %{mozappdir}/*.chk %endif From 3949c148c5baf5e2be95bc70d5b3aa6089a28b2a Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Apr 2015 13:52:45 +0200 Subject: [PATCH 197/239] Update to 37.0.2 --- sources | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index a7e8418..1e885f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2d466d850ef9b0a71bce3b208f5f884c firefox-37.0.1.source.tar.bz2 +755c04ee31dbcd28ed4d351b67fe8a8f firefox-37.0.2.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 281ec3c..dc0b15b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,7 +77,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 37.0.1 +Version: 37.0.2 Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ @@ -542,6 +542,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Apr 16 2015 Jan Horak - 37.0.2-1 +- Update to 37.0.2 + * Wed Apr 15 2015 Martin Stransky - 37.0.1-1 - Update to 37.0.1 From 5aaaab18aa9df5a3c33c8b42ac709fafbf151525 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Apr 2015 14:27:09 +0200 Subject: [PATCH 198/239] Added skia patch for arm --- aarch64-fix-skia.patch | 18 ++++++++++++++++++ mozilla-build-arm.patch | 35 +++++++++++++++++++++++------------ xulrunner.spec | 2 ++ 3 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 aarch64-fix-skia.patch diff --git a/aarch64-fix-skia.patch b/aarch64-fix-skia.patch new file mode 100644 index 0000000..4b9958d --- /dev/null +++ b/aarch64-fix-skia.patch @@ -0,0 +1,18 @@ +Based on https://github.com/google/skia/commit/b79ff56de23fef680ae7187040f2d6a9516b553d + +Index: mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/src/core/SkUtilsArm.h ++++ mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h +@@ -21,9 +21,9 @@ + #define SK_ARM_NEON_MODE_ALWAYS 1 + #define SK_ARM_NEON_MODE_DYNAMIC 2 + +-#if defined(SK_CPU_ARM32) && defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT) ++#if defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT) + # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_DYNAMIC +-#elif defined(SK_CPU_ARM32) && defined(__ARM_HAVE_NEON) || defined(SK_CPU_ARM64) ++#elif defined(__ARM_HAVE_NEON) + # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_ALWAYS + #else + # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_NONE diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch index f98cbe3..86e6f2e 100644 --- a/mozilla-build-arm.patch +++ b/mozilla-build-arm.patch @@ -1,12 +1,23 @@ -diff -up firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm firefox-29.0/mozilla-release/gfx/ycbcr/moz.build ---- firefox-29.0/mozilla-release/gfx/ycbcr/moz.build.arm 2014-04-22 07:27:47.000000000 +0200 -+++ firefox-29.0/mozilla-release/gfx/ycbcr/moz.build 2014-04-22 16:40:34.862849368 +0200 -@@ -61,7 +61,7 @@ else: - 'yuv_row_other.cpp', - ] - --if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: -+if CONFIG['HAVE_ARM_NEON']: - SOURCES += [ - 'yuv_row_arm.s', - ] +diff -up firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi +--- firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm 2015-03-05 11:28:19.000000000 +0100 ++++ firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi 2015-03-09 10:02:17.875243261 +0100 +@@ -235,19 +235,6 @@ + 'defines': [ + 'WEBRTC_ARCH_ARM', + ], +- 'conditions': [ +- ['arm_version==7', { +- 'defines': ['WEBRTC_ARCH_ARM_V7', +- 'WEBRTC_BUILD_NEON_LIBS'], +- 'conditions': [ +- ['arm_neon==1', { +- 'defines': ['WEBRTC_ARCH_ARM_NEON',], +- }, { +- 'defines': ['WEBRTC_DETECT_ARM_NEON',], +- }], +- ], +- }], +- ], + }], + ['os_bsd==1', { + 'defines': [ diff --git a/xulrunner.spec b/xulrunner.spec index dc0b15b..347a664 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -96,6 +96,7 @@ Patch18: xulrunner-24.0-jemalloc-ppc.patch # workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch +Patch21: aarch64-fix-skia.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -236,6 +237,7 @@ cd %{tarballdir} %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool +%patch21 -p1 -b .aarch64-fix-skia %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From 8017ba78f57ac1de352a20017c06d17740b9f4f8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Apr 2015 15:21:39 +0200 Subject: [PATCH 199/239] Enable skia by default --- xulrunner-mozconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 6d680ff..e80f39e 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -33,6 +33,7 @@ ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer ac_add_options --enable-pulseaudio +ac_add_options --enable-skia export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 From 30c26d6d0bb52a03e2e527800595b89f95397f85 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 16 Apr 2015 17:36:41 +0200 Subject: [PATCH 200/239] Add gmp-fake also to arm --- xulrunner.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 347a664..fe66e91 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -521,9 +521,7 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo -%ifarch %{ix86} x86_64 %{mozappdir}/gmp-fake/* -%endif %files devel %defattr(-,root,root,-) From c535c4cbfa1c75d5f9b6c829d8c9ae5bb2977bb6 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 27 Apr 2015 15:43:34 +0200 Subject: [PATCH 201/239] Added skia patch for big endian platforms --- mozilla-1005535.patch | 194 ++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 196 insertions(+) create mode 100644 mozilla-1005535.patch diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch new file mode 100644 index 0000000..2f0381b --- /dev/null +++ b/mozilla-1005535.patch @@ -0,0 +1,194 @@ +# HG changeset patch +# Parent b7eb1ce0237d6125b75bc8ff1cb3afc328d6e78c +# User Steve Singer +Bug 1005535 - Get skia GPU building on big endian. + +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -8231,21 +8231,21 @@ dnl Skia + dnl ======================================================== + if test "$MOZ_ENABLE_SKIA"; then + AC_DEFINE(MOZ_ENABLE_SKIA) + AC_DEFINE(USE_SKIA) + if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then + AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) + fi + +- if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then ++# if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then + MOZ_ENABLE_SKIA_GPU=1 + AC_DEFINE(USE_SKIA_GPU) + AC_SUBST(MOZ_ENABLE_SKIA_GPU) +- fi ++# fi + fi + AC_SUBST(MOZ_ENABLE_SKIA) + + dnl ======================================================== + dnl disable xul + dnl ======================================================== + MOZ_ARG_DISABLE_BOOL(xul, + [ --disable-xul Disable XUL], +diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py +--- a/gfx/skia/generate_mozbuild.py ++++ b/gfx/skia/generate_mozbuild.py +@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ + return True + + return False + + separated = { + 'common': { + #'trunk/src/effects/gradients/SkGradientTileProc.cpp', + 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', +- 'trunk/src/ports/SkDiscardableMemory_none.cpp', ++ #'trunk/src/ports/SkDiscardableMemory_none.cpp', + 'trunk/src/ports/SkImageDecoder_empty.cpp', + 'trunk/src/ports/SkMemory_mozalloc.cpp', + # 'trunk/src/images/SkImages.cpp', + # 'trunk/src/images/SkImageRef.cpp', + # 'trunk/src/images/SkImageRef_GlobalPool.cpp', + # 'trunk/src/images/SkImageRefPool.cpp', + # 'trunk/src/images/SkImageDecoder.cpp', + # 'trunk/src/images/SkImageDecoder_Factory.cpp', +diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build +--- a/gfx/skia/moz.build ++++ b/gfx/skia/moz.build +@@ -847,17 +847,16 @@ else: + 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', + 'trunk/src/opts/SkBlitMask_opts_none.cpp', + 'trunk/src/opts/SkBlitRow_opts_none.cpp', + 'trunk/src/opts/SkBlurImage_opts_none.cpp', + 'trunk/src/opts/SkMorphology_opts_none.cpp', + 'trunk/src/opts/SkTextureCompression_opts_none.cpp', + 'trunk/src/opts/SkUtils_opts_none.cpp', + 'trunk/src/opts/SkXfermode_opts_none.cpp', +- 'trunk/src/ports/SkDiscardableMemory_none.cpp', + ] + + + # can we find a better way of dealing with asm sources? + + # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with + if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: + SOURCES += [ +diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h +--- a/gfx/skia/trunk/include/config/SkUserConfig.h ++++ b/gfx/skia/trunk/include/config/SkUserConfig.h +@@ -192,16 +192,17 @@ + + #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) + # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" + #else + # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" + #endif + + // On all platforms we have this byte order ++ + #define SK_A32_SHIFT 24 + #define SK_R32_SHIFT 16 + #define SK_G32_SHIFT 8 + #define SK_B32_SHIFT 0 + + #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 + + #define SK_SUPPORT_LEGACY_GETDEVICE +diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h +--- a/gfx/skia/trunk/include/core/SkColorPriv.h ++++ b/gfx/skia/trunk/include/core/SkColorPriv.h +@@ -27,37 +27,27 @@ + * For easier compatibility with Skia's GPU backend, we further restrict these + * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does + * not directly correspond to the same shift-order, since we have to take endianess + * into account. + * + * Here we enforce this constraint. + */ + +-#ifdef SK_CPU_BENDIAN +- #define SK_RGBA_R32_SHIFT 24 +- #define SK_RGBA_G32_SHIFT 16 +- #define SK_RGBA_B32_SHIFT 8 +- #define SK_RGBA_A32_SHIFT 0 + +- #define SK_BGRA_B32_SHIFT 24 +- #define SK_BGRA_G32_SHIFT 16 +- #define SK_BGRA_R32_SHIFT 8 +- #define SK_BGRA_A32_SHIFT 0 +-#else + #define SK_RGBA_R32_SHIFT 0 + #define SK_RGBA_G32_SHIFT 8 + #define SK_RGBA_B32_SHIFT 16 + #define SK_RGBA_A32_SHIFT 24 + + #define SK_BGRA_B32_SHIFT 0 + #define SK_BGRA_G32_SHIFT 8 + #define SK_BGRA_R32_SHIFT 16 + #define SK_BGRA_A32_SHIFT 24 +-#endif ++ + + #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) + #error "can't define PMCOLOR to be RGBA and BGRA" + #endif + + #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ + (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ + SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ +diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h +--- a/gfx/skia/trunk/include/core/SkImageInfo.h ++++ b/gfx/skia/trunk/include/core/SkImageInfo.h +@@ -83,19 +83,20 @@ enum SkColorType { + + kLastEnum_SkColorType = kIndex_8_SkColorType, + + #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) + kN32_SkColorType = kBGRA_8888_SkColorType, + #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) + kN32_SkColorType = kRGBA_8888_SkColorType, + #else +-#error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order" ++ kN32_SkColorType = kBGRA_8888_SkColorType + #endif + ++ + #ifdef SK_SUPPORT_LEGACY_N32_NAME + kPMColor_SkColorType = kN32_SkColorType + #endif + }; + + static int SkColorTypeBytesPerPixel(SkColorType ct) { + static const uint8_t gSize[] = { + 0, // Unknown +diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h +--- a/gfx/skia/trunk/include/gpu/GrTypes.h ++++ b/gfx/skia/trunk/include/gpu/GrTypes.h +@@ -304,25 +304,23 @@ enum GrPixelConfig { + * Byte order is r, g, b, a. This color format is 32 bits per channel + */ + kRGBA_float_GrPixelConfig, + kLast_GrPixelConfig = kRGBA_float_GrPixelConfig + }; + static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; + + // Aliases for pixel configs that match skia's byte order. +-#ifndef SK_CPU_LENDIAN +- #error "Skia gpu currently assumes little endian" +-#endif ++ + #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) + static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; + #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) + static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig; + #else +- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format." ++ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; + #endif + + // Returns true if the pixel config is a GPU-specific compressed format + // representation. + static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { + switch (config) { + case kETC1_GrPixelConfig: + case kLATC_GrPixelConfig: diff --git a/xulrunner.spec b/xulrunner.spec index fe66e91..a0f6160 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -97,6 +97,7 @@ Patch18: xulrunner-24.0-jemalloc-ppc.patch Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch +Patch22: mozilla-1005535.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -238,6 +239,7 @@ cd %{tarballdir} %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool %patch21 -p1 -b .aarch64-fix-skia +%patch22 -p1 -b .mozilla-1005535 %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From ea81758d7c935b28206ecfb41dec5952fa3026ef Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Mon, 27 Apr 2015 15:47:31 +0200 Subject: [PATCH 202/239] Added skia patch for big endian platforms, changelog entry and release bump --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index a0f6160..a884673 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 37.0.2 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -544,6 +544,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Apr 27 2015 Jan Horak - 37.0.2-2 +- Added patch for big endian arches + * Thu Apr 16 2015 Jan Horak - 37.0.2-1 - Update to 37.0.2 From 0d6f3cd8d78aa2544b7bc55af98b8be2a5fa2e65 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 May 2015 13:09:09 +0200 Subject: [PATCH 203/239] Update to 38.0 Build 2 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index 1e885f0..ed52843 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -755c04ee31dbcd28ed4d351b67fe8a8f firefox-37.0.2.source.tar.bz2 +d1c66ec031c0cb8aea3df7210dc6955c firefox-38.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index a884673..0ba25e0 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 37.0.2 -Release: 2%{?pre_tag}%{?dist} +Version: 38.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -544,6 +544,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu May 7 2015 Martin Stransky - 38.0-1 +- Update to 38.0 Build 2 + * Mon Apr 27 2015 Jan Horak - 37.0.2-2 - Added patch for big endian arches From f6cc1db8651e5197ed17bc042337b6ec995fbe82 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 May 2015 13:23:15 +0200 Subject: [PATCH 204/239] patch for nss-3.18.0 --- firefox-nss-3.18.0.patch | 13 +++++++++++++ xulrunner.spec | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 firefox-nss-3.18.0.patch diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch new file mode 100644 index 0000000..a693832 --- /dev/null +++ b/firefox-nss-3.18.0.patch @@ -0,0 +1,13 @@ +diff -up mozilla-release/configure.in.old mozilla-release/configure.in +--- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 ++++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 +@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, + _USE_SYSTEM_NSS=1 ) + + if test -n "$_USE_SYSTEM_NSS"; then +- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) ++ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) + fi + + if test -n "$MOZ_NATIVE_NSS"; then +diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile diff --git a/xulrunner.spec b/xulrunner.spec index 0ba25e0..f098a21 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -98,6 +98,7 @@ Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch22: mozilla-1005535.patch +Patch23: firefox-nss-3.18.0.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -240,6 +241,7 @@ cd %{tarballdir} %patch20 -p1 -b .prbool %patch21 -p1 -b .aarch64-fix-skia %patch22 -p1 -b .mozilla-1005535 +%patch23 -p1 -b .nss-3.18.0 %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From a361a147c0e53e6f5e30d3b7adbd4f8e576f0ca0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 7 May 2015 13:55:27 +0200 Subject: [PATCH 205/239] Updated file lists --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index f098a21..668377e 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -525,7 +525,7 @@ fi %{mozappdir}/install_app.py %ghost %{mozappdir}/install_app.pyc %ghost %{mozappdir}/install_app.pyo -%{mozappdir}/gmp-fake/* +%{mozappdir}/gmp-fake*/* %files devel %defattr(-,root,root,-) From db9aa2876275b269cea59b922763121e309857da Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 04:30:41 +0000 Subject: [PATCH 206/239] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 668377e..292bf54 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 38.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -546,6 +546,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 38.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu May 7 2015 Martin Stransky - 38.0-1 - Update to 38.0 Build 2 From efb99048087356ea193c44e781a9f56d808bf59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 8 Jul 2015 13:10:41 -0400 Subject: [PATCH 207/239] workaround build issues on s390 If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which overrides the -g1 from line above and breaks building on s390 (OOM when linking, rhbz#1238225) Workaround mis-optimization in javascipt engine on s390 (rhbz#1219542) --- rhbz-1219542-s390-build.patch | 23 +++++++++++++++++++++++ xulrunner.spec | 8 ++++++++ 2 files changed, 31 insertions(+) create mode 100644 rhbz-1219542-s390-build.patch diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch new file mode 100644 index 0000000..4f38200 --- /dev/null +++ b/rhbz-1219542-s390-build.patch @@ -0,0 +1,23 @@ +diff -up mozilla-release/js/src/configure.in.opt mozilla-release/js/src/configure.in +--- mozilla-release/js/src/configure.in.opt 2015-05-04 02:43:23.000000000 +0200 ++++ mozilla-release/js/src/configure.in 2015-05-07 14:21:07.685405039 +0200 +@@ -1492,7 +1492,7 @@ case "$host" in + *-linux*|*-kfreebsd*-gnu|*-gnu*) + HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" + HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' +- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" ++ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" + ;; + + *) +@@ -1674,8 +1674,8 @@ ia64*-hpux*) + # while; Intel recommends against using it. + MOZ_OPTIMIZE_FLAGS="-O2" + elif test "$GNU_CC" -o "$GNU_CXX"; then +- MOZ_PGO_OPTIMIZE_FLAGS="-O3" +- MOZ_OPTIMIZE_FLAGS="-O3" ++ MOZ_PGO_OPTIMIZE_FLAGS="-O1" ++ MOZ_OPTIMIZE_FLAGS="-O1" + if test -z "$CLANG_CC"; then + MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" + fi diff --git a/xulrunner.spec b/xulrunner.spec index 292bf54..3bbbb4b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -99,6 +99,7 @@ Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch22: mozilla-1005535.patch Patch23: firefox-nss-3.18.0.patch +Patch24: rhbz-1219542-s390-build.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -242,6 +243,9 @@ cd %{tarballdir} %patch21 -p1 -b .aarch64-fix-skia %patch22 -p1 -b .mozilla-1005535 %patch23 -p1 -b .nss-3.18.0 +%ifarch s390 +%patch24 -p1 -b .rhbz-1219542-s390 +%endif %patch200 -p2 -b .pk %patch204 -p2 -b .966424 @@ -346,6 +350,10 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') +# If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which +# overrides the -g1 from line above and breaks building on s390 +# (OOM when linking, rhbz#1238225) +export MOZ_DEBUG_FLAGS=" " %endif %ifarch s390 %{arm} ppc aarch64 MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" From a0580a0bd85d367233f59e8a09e4045684d91374 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 10 Jul 2015 14:33:49 +0200 Subject: [PATCH 208/239] Update to 39.0 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index ed52843..bfecd5f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d1c66ec031c0cb8aea3df7210dc6955c firefox-38.0.source.tar.bz2 +34d9841bc9b8a85aaf06e311cf1cb263 firefox-39.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 3bbbb4b..9570fd8 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 38.0 -Release: 2%{?pre_tag}%{?dist} +Version: 39.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -554,6 +554,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 10 2015 Martin Stransky - 39.0-1 +- Update to 39.0 + * Fri Jun 19 2015 Fedora Release Engineering - 38.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 588fddfcfcf891ca9cd576a1c2d61aaa458950e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1=C3=AD=C4=8Dek?= Date: Tue, 21 Jul 2015 12:46:14 +0200 Subject: [PATCH 209/239] Fixed xulrunner build on fedora 23, #1243104 --- mozilla-1005535.patch | 152 +++++++--------------- mozilla-1243104.patch | 284 ++++++++++++++++++++++++++++++++++++++++++ xulrunner.spec | 9 +- 3 files changed, 333 insertions(+), 112 deletions(-) create mode 100644 mozilla-1243104.patch diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch index 2f0381b..ef4f1ac 100644 --- a/mozilla-1005535.patch +++ b/mozilla-1005535.patch @@ -3,15 +3,11 @@ # User Steve Singer Bug 1005535 - Get skia GPU building on big endian. -diff --git a/configure.in b/configure.in ---- a/configure.in -+++ b/configure.in -@@ -8231,21 +8231,21 @@ dnl Skia - dnl ======================================================== - if test "$MOZ_ENABLE_SKIA"; then - AC_DEFINE(MOZ_ENABLE_SKIA) - AC_DEFINE(USE_SKIA) - if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then +Index: mozilla-release/configure.in +=================================================================== +--- mozilla-release.orig/configure.in ++++ mozilla-release/configure.in +@@ -8243,11 +8243,11 @@ if test "$MOZ_ENABLE_SKIA"; then AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) fi @@ -25,63 +21,35 @@ diff --git a/configure.in b/configure.in fi AC_SUBST(MOZ_ENABLE_SKIA) - dnl ======================================================== - dnl disable xul - dnl ======================================================== - MOZ_ARG_DISABLE_BOOL(xul, - [ --disable-xul Disable XUL], -diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py ---- a/gfx/skia/generate_mozbuild.py -+++ b/gfx/skia/generate_mozbuild.py -@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ - return True - - return False - - separated = { +Index: mozilla-release/gfx/skia/generate_mozbuild.py +=================================================================== +--- mozilla-release.orig/gfx/skia/generate_mozbuild.py ++++ mozilla-release/gfx/skia/generate_mozbuild.py +@@ -242,7 +242,6 @@ def generate_separated_sources(platform_ 'common': { #'trunk/src/effects/gradients/SkGradientTileProc.cpp', 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', - 'trunk/src/ports/SkDiscardableMemory_none.cpp', -+ #'trunk/src/ports/SkDiscardableMemory_none.cpp', 'trunk/src/ports/SkImageDecoder_empty.cpp', 'trunk/src/ports/SkMemory_mozalloc.cpp', # 'trunk/src/images/SkImages.cpp', - # 'trunk/src/images/SkImageRef.cpp', - # 'trunk/src/images/SkImageRef_GlobalPool.cpp', - # 'trunk/src/images/SkImageRefPool.cpp', - # 'trunk/src/images/SkImageDecoder.cpp', - # 'trunk/src/images/SkImageDecoder_Factory.cpp', -diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build ---- a/gfx/skia/moz.build -+++ b/gfx/skia/moz.build -@@ -847,17 +847,16 @@ else: - 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', - 'trunk/src/opts/SkBlitMask_opts_none.cpp', - 'trunk/src/opts/SkBlitRow_opts_none.cpp', - 'trunk/src/opts/SkBlurImage_opts_none.cpp', - 'trunk/src/opts/SkMorphology_opts_none.cpp', - 'trunk/src/opts/SkTextureCompression_opts_none.cpp', - 'trunk/src/opts/SkUtils_opts_none.cpp', - 'trunk/src/opts/SkXfermode_opts_none.cpp', -- 'trunk/src/ports/SkDiscardableMemory_none.cpp', - ] - - - # can we find a better way of dealing with asm sources? - - # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with - if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: - SOURCES += [ -diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h ---- a/gfx/skia/trunk/include/config/SkUserConfig.h -+++ b/gfx/skia/trunk/include/config/SkUserConfig.h -@@ -192,16 +192,17 @@ - - #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) - # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" - #else - # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" +Index: mozilla-release/gfx/skia/moz.build +=================================================================== +--- mozilla-release.orig/gfx/skia/moz.build ++++ mozilla-release/gfx/skia/moz.build +@@ -663,7 +663,6 @@ UNIFIED_SOURCES += [ + 'trunk/src/pathops/SkReduceOrder.cpp', + 'trunk/src/pipe/SkGPipeRead.cpp', + 'trunk/src/pipe/SkGPipeWrite.cpp', +- 'trunk/src/ports/SkDiscardableMemory_none.cpp', + 'trunk/src/ports/SkGlobalInitialization_default.cpp', + 'trunk/src/ports/SkImageDecoder_empty.cpp', + 'trunk/src/ports/SkMemory_mozalloc.cpp', +Index: mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/include/config/SkUserConfig.h ++++ mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h +@@ -197,6 +197,7 @@ #endif // On all platforms we have this byte order @@ -89,20 +57,11 @@ diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/inclu #define SK_A32_SHIFT 24 #define SK_R32_SHIFT 16 #define SK_G32_SHIFT 8 - #define SK_B32_SHIFT 0 - - #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 - - #define SK_SUPPORT_LEGACY_GETDEVICE -diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h ---- a/gfx/skia/trunk/include/core/SkColorPriv.h -+++ b/gfx/skia/trunk/include/core/SkColorPriv.h -@@ -27,37 +27,27 @@ - * For easier compatibility with Skia's GPU backend, we further restrict these - * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does - * not directly correspond to the same shift-order, since we have to take endianess - * into account. - * +Index: mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/include/core/SkColorPriv.h ++++ mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h +@@ -32,17 +32,7 @@ * Here we enforce this constraint. */ @@ -120,9 +79,7 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ #define SK_RGBA_R32_SHIFT 0 #define SK_RGBA_G32_SHIFT 8 #define SK_RGBA_B32_SHIFT 16 - #define SK_RGBA_A32_SHIFT 24 - - #define SK_BGRA_B32_SHIFT 0 +@@ -52,7 +42,7 @@ #define SK_BGRA_G32_SHIFT 8 #define SK_BGRA_R32_SHIFT 16 #define SK_BGRA_A32_SHIFT 24 @@ -131,20 +88,11 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) #error "can't define PMCOLOR to be RGBA and BGRA" - #endif - - #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ - (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ - SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ -diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h ---- a/gfx/skia/trunk/include/core/SkImageInfo.h -+++ b/gfx/skia/trunk/include/core/SkImageInfo.h -@@ -83,19 +83,20 @@ enum SkColorType { - - kLastEnum_SkColorType = kIndex_8_SkColorType, - - #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) - kN32_SkColorType = kBGRA_8888_SkColorType, +Index: mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/include/core/SkImageInfo.h ++++ mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h +@@ -88,9 +88,10 @@ enum SkColorType { #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) kN32_SkColorType = kRGBA_8888_SkColorType, #else @@ -156,20 +104,11 @@ diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/ #ifdef SK_SUPPORT_LEGACY_N32_NAME kPMColor_SkColorType = kN32_SkColorType #endif - }; - - static int SkColorTypeBytesPerPixel(SkColorType ct) { - static const uint8_t gSize[] = { - 0, // Unknown -diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h ---- a/gfx/skia/trunk/include/gpu/GrTypes.h -+++ b/gfx/skia/trunk/include/gpu/GrTypes.h -@@ -304,25 +304,23 @@ enum GrPixelConfig { - * Byte order is r, g, b, a. This color format is 32 bits per channel - */ - kRGBA_float_GrPixelConfig, - kLast_GrPixelConfig = kRGBA_float_GrPixelConfig - }; +Index: mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h +=================================================================== +--- mozilla-release.orig/gfx/skia/trunk/include/gpu/GrTypes.h ++++ mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h +@@ -309,15 +309,13 @@ enum GrPixelConfig { static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; // Aliases for pixel configs that match skia's byte order. @@ -187,8 +126,3 @@ diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/G #endif // Returns true if the pixel config is a GPU-specific compressed format - // representation. - static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { - switch (config) { - case kETC1_GrPixelConfig: - case kLATC_GrPixelConfig: diff --git a/mozilla-1243104.patch b/mozilla-1243104.patch new file mode 100644 index 0000000..5736869 --- /dev/null +++ b/mozilla-1243104.patch @@ -0,0 +1,284 @@ +From e3ee5c0dbc8814f5114cdddb0f050691e7573b34 Mon Sep 17 00:00:00 2001 +From: Marcin Juszkiewicz +Date: Tue, 14 Jul 2015 21:02:13 +0200 +Subject: [PATCH] fixed build + +--- + firefox-nss-3.18.0.patch | 13 ---- + mozilla-1005535.patch | 152 ++++++++++++++--------------------------------- + xulrunner.spec | 9 ++- + 3 files changed, 49 insertions(+), 125 deletions(-) + delete mode 100644 firefox-nss-3.18.0.patch + +diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch +deleted file mode 100644 +index a693832..0000000 +--- a/firefox-nss-3.18.0.patch ++++ /dev/null +@@ -1,13 +0,0 @@ +-diff -up mozilla-release/configure.in.old mozilla-release/configure.in +---- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 +-+++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 +-@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, +- _USE_SYSTEM_NSS=1 ) +- +- if test -n "$_USE_SYSTEM_NSS"; then +-- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) +-+ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) +- fi +- +- if test -n "$MOZ_NATIVE_NSS"; then +-diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile +diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch +index 2f0381b..ef4f1ac 100644 +--- a/mozilla-1005535.patch ++++ b/mozilla-1005535.patch +@@ -3,15 +3,11 @@ + # User Steve Singer + Bug 1005535 - Get skia GPU building on big endian. + +-diff --git a/configure.in b/configure.in +---- a/configure.in +-+++ b/configure.in +-@@ -8231,21 +8231,21 @@ dnl Skia +- dnl ======================================================== +- if test "$MOZ_ENABLE_SKIA"; then +- AC_DEFINE(MOZ_ENABLE_SKIA) +- AC_DEFINE(USE_SKIA) +- if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then ++Index: mozilla-release/configure.in ++=================================================================== ++--- mozilla-release.orig/configure.in +++++ mozilla-release/configure.in ++@@ -8243,11 +8243,11 @@ if test "$MOZ_ENABLE_SKIA"; then + AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) + fi + +@@ -25,63 +21,35 @@ diff --git a/configure.in b/configure.in + fi + AC_SUBST(MOZ_ENABLE_SKIA) + +- dnl ======================================================== +- dnl disable xul +- dnl ======================================================== +- MOZ_ARG_DISABLE_BOOL(xul, +- [ --disable-xul Disable XUL], +-diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py +---- a/gfx/skia/generate_mozbuild.py +-+++ b/gfx/skia/generate_mozbuild.py +-@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ +- return True +- +- return False +- +- separated = { ++Index: mozilla-release/gfx/skia/generate_mozbuild.py ++=================================================================== ++--- mozilla-release.orig/gfx/skia/generate_mozbuild.py +++++ mozilla-release/gfx/skia/generate_mozbuild.py ++@@ -242,7 +242,6 @@ def generate_separated_sources(platform_ + 'common': { + #'trunk/src/effects/gradients/SkGradientTileProc.cpp', + 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', + - 'trunk/src/ports/SkDiscardableMemory_none.cpp', +-+ #'trunk/src/ports/SkDiscardableMemory_none.cpp', + 'trunk/src/ports/SkImageDecoder_empty.cpp', + 'trunk/src/ports/SkMemory_mozalloc.cpp', + # 'trunk/src/images/SkImages.cpp', +- # 'trunk/src/images/SkImageRef.cpp', +- # 'trunk/src/images/SkImageRef_GlobalPool.cpp', +- # 'trunk/src/images/SkImageRefPool.cpp', +- # 'trunk/src/images/SkImageDecoder.cpp', +- # 'trunk/src/images/SkImageDecoder_Factory.cpp', +-diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build +---- a/gfx/skia/moz.build +-+++ b/gfx/skia/moz.build +-@@ -847,17 +847,16 @@ else: +- 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', +- 'trunk/src/opts/SkBlitMask_opts_none.cpp', +- 'trunk/src/opts/SkBlitRow_opts_none.cpp', +- 'trunk/src/opts/SkBlurImage_opts_none.cpp', +- 'trunk/src/opts/SkMorphology_opts_none.cpp', +- 'trunk/src/opts/SkTextureCompression_opts_none.cpp', +- 'trunk/src/opts/SkUtils_opts_none.cpp', +- 'trunk/src/opts/SkXfermode_opts_none.cpp', +-- 'trunk/src/ports/SkDiscardableMemory_none.cpp', +- ] +- +- +- # can we find a better way of dealing with asm sources? +- +- # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with +- if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: +- SOURCES += [ +-diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h +---- a/gfx/skia/trunk/include/config/SkUserConfig.h +-+++ b/gfx/skia/trunk/include/config/SkUserConfig.h +-@@ -192,16 +192,17 @@ +- +- #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) +- # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" +- #else +- # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" ++Index: mozilla-release/gfx/skia/moz.build ++=================================================================== ++--- mozilla-release.orig/gfx/skia/moz.build +++++ mozilla-release/gfx/skia/moz.build ++@@ -663,7 +663,6 @@ UNIFIED_SOURCES += [ ++ 'trunk/src/pathops/SkReduceOrder.cpp', ++ 'trunk/src/pipe/SkGPipeRead.cpp', ++ 'trunk/src/pipe/SkGPipeWrite.cpp', ++- 'trunk/src/ports/SkDiscardableMemory_none.cpp', ++ 'trunk/src/ports/SkGlobalInitialization_default.cpp', ++ 'trunk/src/ports/SkImageDecoder_empty.cpp', ++ 'trunk/src/ports/SkMemory_mozalloc.cpp', ++Index: mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h ++=================================================================== ++--- mozilla-release.orig/gfx/skia/trunk/include/config/SkUserConfig.h +++++ mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h ++@@ -197,6 +197,7 @@ + #endif + + // On all platforms we have this byte order +@@ -89,20 +57,11 @@ diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/inclu + #define SK_A32_SHIFT 24 + #define SK_R32_SHIFT 16 + #define SK_G32_SHIFT 8 +- #define SK_B32_SHIFT 0 +- +- #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 +- +- #define SK_SUPPORT_LEGACY_GETDEVICE +-diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h +---- a/gfx/skia/trunk/include/core/SkColorPriv.h +-+++ b/gfx/skia/trunk/include/core/SkColorPriv.h +-@@ -27,37 +27,27 @@ +- * For easier compatibility with Skia's GPU backend, we further restrict these +- * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does +- * not directly correspond to the same shift-order, since we have to take endianess +- * into account. +- * ++Index: mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h ++=================================================================== ++--- mozilla-release.orig/gfx/skia/trunk/include/core/SkColorPriv.h +++++ mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h ++@@ -32,17 +32,7 @@ + * Here we enforce this constraint. + */ + +@@ -120,9 +79,7 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ + #define SK_RGBA_R32_SHIFT 0 + #define SK_RGBA_G32_SHIFT 8 + #define SK_RGBA_B32_SHIFT 16 +- #define SK_RGBA_A32_SHIFT 24 +- +- #define SK_BGRA_B32_SHIFT 0 ++@@ -52,7 +42,7 @@ + #define SK_BGRA_G32_SHIFT 8 + #define SK_BGRA_R32_SHIFT 16 + #define SK_BGRA_A32_SHIFT 24 +@@ -131,20 +88,11 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ + + #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) + #error "can't define PMCOLOR to be RGBA and BGRA" +- #endif +- +- #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ +- (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ +- SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ +-diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h +---- a/gfx/skia/trunk/include/core/SkImageInfo.h +-+++ b/gfx/skia/trunk/include/core/SkImageInfo.h +-@@ -83,19 +83,20 @@ enum SkColorType { +- +- kLastEnum_SkColorType = kIndex_8_SkColorType, +- +- #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) +- kN32_SkColorType = kBGRA_8888_SkColorType, ++Index: mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h ++=================================================================== ++--- mozilla-release.orig/gfx/skia/trunk/include/core/SkImageInfo.h +++++ mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h ++@@ -88,9 +88,10 @@ enum SkColorType { + #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) + kN32_SkColorType = kRGBA_8888_SkColorType, + #else +@@ -156,20 +104,11 @@ diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/ + #ifdef SK_SUPPORT_LEGACY_N32_NAME + kPMColor_SkColorType = kN32_SkColorType + #endif +- }; +- +- static int SkColorTypeBytesPerPixel(SkColorType ct) { +- static const uint8_t gSize[] = { +- 0, // Unknown +-diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h +---- a/gfx/skia/trunk/include/gpu/GrTypes.h +-+++ b/gfx/skia/trunk/include/gpu/GrTypes.h +-@@ -304,25 +304,23 @@ enum GrPixelConfig { +- * Byte order is r, g, b, a. This color format is 32 bits per channel +- */ +- kRGBA_float_GrPixelConfig, +- kLast_GrPixelConfig = kRGBA_float_GrPixelConfig +- }; ++Index: mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h ++=================================================================== ++--- mozilla-release.orig/gfx/skia/trunk/include/gpu/GrTypes.h +++++ mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h ++@@ -309,15 +309,13 @@ enum GrPixelConfig { + static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; + + // Aliases for pixel configs that match skia's byte order. +@@ -187,8 +126,3 @@ diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/G + #endif + + // Returns true if the pixel config is a GPU-specific compressed format +- // representation. +- static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { +- switch (config) { +- case kETC1_GrPixelConfig: +- case kLATC_GrPixelConfig: +diff --git a/xulrunner.spec b/xulrunner.spec +index 9570fd8..e9447b3 100644 +--- a/xulrunner.spec ++++ b/xulrunner.spec +@@ -78,7 +78,7 @@ + Summary: XUL Runtime for Gecko Applications + Name: xulrunner + Version: 39.0 +-Release: 1%{?pre_tag}%{?dist} ++Release: 2%{?pre_tag}%{?dist} + URL: http://developer.mozilla.org/En/XULRunner + License: MPLv1.1 or GPLv2+ or LGPLv2+ + Group: Applications/Internet +@@ -98,7 +98,6 @@ Patch19: xulrunner-24.0-s390-inlines.patch + Patch20: firefox-build-prbool.patch + Patch21: aarch64-fix-skia.patch + Patch22: mozilla-1005535.patch +-Patch23: firefox-nss-3.18.0.patch + Patch24: rhbz-1219542-s390-build.patch + + # Fedora specific patches +@@ -242,7 +241,6 @@ cd %{tarballdir} + %patch20 -p1 -b .prbool + %patch21 -p1 -b .aarch64-fix-skia + %patch22 -p1 -b .mozilla-1005535 +-%patch23 -p1 -b .nss-3.18.0 + %ifarch s390 + %patch24 -p1 -b .rhbz-1219542-s390 + %endif +@@ -554,6 +552,11 @@ fi + #--------------------------------------------------------------------- + + %changelog ++* Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 ++- fixed build ++ - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available ++ - refreshed mozilla-1005535.patch patch to apply ++ + * Fri Jul 10 2015 Martin Stransky - 39.0-1 + - Update to 39.0 + +-- +2.4.5 + diff --git a/xulrunner.spec b/xulrunner.spec index 9570fd8..e9447b3 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 39.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -98,7 +98,6 @@ Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch22: mozilla-1005535.patch -Patch23: firefox-nss-3.18.0.patch Patch24: rhbz-1219542-s390-build.patch # Fedora specific patches @@ -242,7 +241,6 @@ cd %{tarballdir} %patch20 -p1 -b .prbool %patch21 -p1 -b .aarch64-fix-skia %patch22 -p1 -b .mozilla-1005535 -%patch23 -p1 -b .nss-3.18.0 %ifarch s390 %patch24 -p1 -b .rhbz-1219542-s390 %endif @@ -554,6 +552,11 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 +- fixed build + - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available + - refreshed mozilla-1005535.patch patch to apply + * Fri Jul 10 2015 Martin Stransky - 39.0-1 - Update to 39.0 From f5c38e0137e78377fc3e55726551b314567ffbdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1=C3=AD=C4=8Dek?= Date: Wed, 22 Jul 2015 14:09:49 +0200 Subject: [PATCH 210/239] Removed unneeded patch files --- firefox-nss-3.18.0.patch | 13 -- mozilla-1243104.patch | 284 --------------------------------------- xulrunner.spec | 5 +- 3 files changed, 4 insertions(+), 298 deletions(-) delete mode 100644 firefox-nss-3.18.0.patch delete mode 100644 mozilla-1243104.patch diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch deleted file mode 100644 index a693832..0000000 --- a/firefox-nss-3.18.0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mozilla-release/configure.in.old mozilla-release/configure.in ---- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 -+++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 -@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, - _USE_SYSTEM_NSS=1 ) - - if test -n "$_USE_SYSTEM_NSS"; then -- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) -+ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) - fi - - if test -n "$MOZ_NATIVE_NSS"; then -diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile diff --git a/mozilla-1243104.patch b/mozilla-1243104.patch deleted file mode 100644 index 5736869..0000000 --- a/mozilla-1243104.patch +++ /dev/null @@ -1,284 +0,0 @@ -From e3ee5c0dbc8814f5114cdddb0f050691e7573b34 Mon Sep 17 00:00:00 2001 -From: Marcin Juszkiewicz -Date: Tue, 14 Jul 2015 21:02:13 +0200 -Subject: [PATCH] fixed build - ---- - firefox-nss-3.18.0.patch | 13 ---- - mozilla-1005535.patch | 152 ++++++++++++++--------------------------------- - xulrunner.spec | 9 ++- - 3 files changed, 49 insertions(+), 125 deletions(-) - delete mode 100644 firefox-nss-3.18.0.patch - -diff --git a/firefox-nss-3.18.0.patch b/firefox-nss-3.18.0.patch -deleted file mode 100644 -index a693832..0000000 ---- a/firefox-nss-3.18.0.patch -+++ /dev/null -@@ -1,13 +0,0 @@ --diff -up mozilla-release/configure.in.old mozilla-release/configure.in ----- mozilla-release/configure.in.old 2015-04-28 20:31:45.000000000 +0200 --+++ mozilla-release/configure.in 2015-04-28 20:32:40.807783614 +0200 --@@ -3627,7 +3627,7 @@ MOZ_ARG_WITH_BOOL(system-nss, -- _USE_SYSTEM_NSS=1 ) -- -- if test -n "$_USE_SYSTEM_NSS"; then --- AM_PATH_NSS(3.18.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) --+ AM_PATH_NSS(3.18.0, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) -- fi -- -- if test -n "$MOZ_NATIVE_NSS"; then --diff -up mozilla-release/media/webrtc/trunk/Makefile.old mozilla-release/media/webrtc/trunk/Makefile -diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch -index 2f0381b..ef4f1ac 100644 ---- a/mozilla-1005535.patch -+++ b/mozilla-1005535.patch -@@ -3,15 +3,11 @@ - # User Steve Singer - Bug 1005535 - Get skia GPU building on big endian. - --diff --git a/configure.in b/configure.in ----- a/configure.in --+++ b/configure.in --@@ -8231,21 +8231,21 @@ dnl Skia -- dnl ======================================================== -- if test "$MOZ_ENABLE_SKIA"; then -- AC_DEFINE(MOZ_ENABLE_SKIA) -- AC_DEFINE(USE_SKIA) -- if test "${MOZ_WIDGET_TOOLKIT}" = "android" -o x"$MOZ_WIDGET_TOOLKIT" = x"gonk"; then -+Index: mozilla-release/configure.in -+=================================================================== -+--- mozilla-release.orig/configure.in -++++ mozilla-release/configure.in -+@@ -8243,11 +8243,11 @@ if test "$MOZ_ENABLE_SKIA"; then - AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) - fi - -@@ -25,63 +21,35 @@ diff --git a/configure.in b/configure.in - fi - AC_SUBST(MOZ_ENABLE_SKIA) - -- dnl ======================================================== -- dnl disable xul -- dnl ======================================================== -- MOZ_ARG_DISABLE_BOOL(xul, -- [ --disable-xul Disable XUL], --diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py ----- a/gfx/skia/generate_mozbuild.py --+++ b/gfx/skia/generate_mozbuild.py --@@ -236,17 +236,17 @@ def generate_separated_sources(platform_ -- return True -- -- return False -- -- separated = { -+Index: mozilla-release/gfx/skia/generate_mozbuild.py -+=================================================================== -+--- mozilla-release.orig/gfx/skia/generate_mozbuild.py -++++ mozilla-release/gfx/skia/generate_mozbuild.py -+@@ -242,7 +242,6 @@ def generate_separated_sources(platform_ - 'common': { - #'trunk/src/effects/gradients/SkGradientTileProc.cpp', - 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', - - 'trunk/src/ports/SkDiscardableMemory_none.cpp', --+ #'trunk/src/ports/SkDiscardableMemory_none.cpp', - 'trunk/src/ports/SkImageDecoder_empty.cpp', - 'trunk/src/ports/SkMemory_mozalloc.cpp', - # 'trunk/src/images/SkImages.cpp', -- # 'trunk/src/images/SkImageRef.cpp', -- # 'trunk/src/images/SkImageRef_GlobalPool.cpp', -- # 'trunk/src/images/SkImageRefPool.cpp', -- # 'trunk/src/images/SkImageDecoder.cpp', -- # 'trunk/src/images/SkImageDecoder_Factory.cpp', --diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build ----- a/gfx/skia/moz.build --+++ b/gfx/skia/moz.build --@@ -847,17 +847,16 @@ else: -- 'trunk/src/opts/SkBitmapProcState_opts_none.cpp', -- 'trunk/src/opts/SkBlitMask_opts_none.cpp', -- 'trunk/src/opts/SkBlitRow_opts_none.cpp', -- 'trunk/src/opts/SkBlurImage_opts_none.cpp', -- 'trunk/src/opts/SkMorphology_opts_none.cpp', -- 'trunk/src/opts/SkTextureCompression_opts_none.cpp', -- 'trunk/src/opts/SkUtils_opts_none.cpp', -- 'trunk/src/opts/SkXfermode_opts_none.cpp', --- 'trunk/src/ports/SkDiscardableMemory_none.cpp', -- ] -- -- -- # can we find a better way of dealing with asm sources? -- -- # left out of UNIFIED_SOURCES for now; that's not C++ anyway, nothing else to unify it with -- if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']: -- SOURCES += [ --diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/include/config/SkUserConfig.h ----- a/gfx/skia/trunk/include/config/SkUserConfig.h --+++ b/gfx/skia/trunk/include/config/SkUserConfig.h --@@ -192,16 +192,17 @@ -- -- #if defined(SK_CPU_ARM32) || defined(SK_CPU_ARM64) -- # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_arm.h" -- #else -- # define SK_BARRIERS_PLATFORM_H "skia/SkBarriers_x86.h" -+Index: mozilla-release/gfx/skia/moz.build -+=================================================================== -+--- mozilla-release.orig/gfx/skia/moz.build -++++ mozilla-release/gfx/skia/moz.build -+@@ -663,7 +663,6 @@ UNIFIED_SOURCES += [ -+ 'trunk/src/pathops/SkReduceOrder.cpp', -+ 'trunk/src/pipe/SkGPipeRead.cpp', -+ 'trunk/src/pipe/SkGPipeWrite.cpp', -+- 'trunk/src/ports/SkDiscardableMemory_none.cpp', -+ 'trunk/src/ports/SkGlobalInitialization_default.cpp', -+ 'trunk/src/ports/SkImageDecoder_empty.cpp', -+ 'trunk/src/ports/SkMemory_mozalloc.cpp', -+Index: mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h -+=================================================================== -+--- mozilla-release.orig/gfx/skia/trunk/include/config/SkUserConfig.h -++++ mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h -+@@ -197,6 +197,7 @@ - #endif - - // On all platforms we have this byte order -@@ -89,20 +57,11 @@ diff --git a/gfx/skia/trunk/include/config/SkUserConfig.h b/gfx/skia/trunk/inclu - #define SK_A32_SHIFT 24 - #define SK_R32_SHIFT 16 - #define SK_G32_SHIFT 8 -- #define SK_B32_SHIFT 0 -- -- #define SK_ALLOW_STATIC_GLOBAL_INITIALIZERS 0 -- -- #define SK_SUPPORT_LEGACY_GETDEVICE --diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/core/SkColorPriv.h ----- a/gfx/skia/trunk/include/core/SkColorPriv.h --+++ b/gfx/skia/trunk/include/core/SkColorPriv.h --@@ -27,37 +27,27 @@ -- * For easier compatibility with Skia's GPU backend, we further restrict these -- * to either (in memory-byte-order) RGBA or BGRA. Note that this "order" does -- * not directly correspond to the same shift-order, since we have to take endianess -- * into account. -- * -+Index: mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h -+=================================================================== -+--- mozilla-release.orig/gfx/skia/trunk/include/core/SkColorPriv.h -++++ mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h -+@@ -32,17 +32,7 @@ - * Here we enforce this constraint. - */ - -@@ -120,9 +79,7 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ - #define SK_RGBA_R32_SHIFT 0 - #define SK_RGBA_G32_SHIFT 8 - #define SK_RGBA_B32_SHIFT 16 -- #define SK_RGBA_A32_SHIFT 24 -- -- #define SK_BGRA_B32_SHIFT 0 -+@@ -52,7 +42,7 @@ - #define SK_BGRA_G32_SHIFT 8 - #define SK_BGRA_R32_SHIFT 16 - #define SK_BGRA_A32_SHIFT 24 -@@ -131,20 +88,11 @@ diff --git a/gfx/skia/trunk/include/core/SkColorPriv.h b/gfx/skia/trunk/include/ - - #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) - #error "can't define PMCOLOR to be RGBA and BGRA" -- #endif -- -- #define LOCAL_PMCOLOR_SHIFTS_EQUIVALENT_TO_RGBA \ -- (SK_A32_SHIFT == SK_RGBA_A32_SHIFT && \ -- SK_R32_SHIFT == SK_RGBA_R32_SHIFT && \ --diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/core/SkImageInfo.h ----- a/gfx/skia/trunk/include/core/SkImageInfo.h --+++ b/gfx/skia/trunk/include/core/SkImageInfo.h --@@ -83,19 +83,20 @@ enum SkColorType { -- -- kLastEnum_SkColorType = kIndex_8_SkColorType, -- -- #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) -- kN32_SkColorType = kBGRA_8888_SkColorType, -+Index: mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h -+=================================================================== -+--- mozilla-release.orig/gfx/skia/trunk/include/core/SkImageInfo.h -++++ mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h -+@@ -88,9 +88,10 @@ enum SkColorType { - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - kN32_SkColorType = kRGBA_8888_SkColorType, - #else -@@ -156,20 +104,11 @@ diff --git a/gfx/skia/trunk/include/core/SkImageInfo.h b/gfx/skia/trunk/include/ - #ifdef SK_SUPPORT_LEGACY_N32_NAME - kPMColor_SkColorType = kN32_SkColorType - #endif -- }; -- -- static int SkColorTypeBytesPerPixel(SkColorType ct) { -- static const uint8_t gSize[] = { -- 0, // Unknown --diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/GrTypes.h ----- a/gfx/skia/trunk/include/gpu/GrTypes.h --+++ b/gfx/skia/trunk/include/gpu/GrTypes.h --@@ -304,25 +304,23 @@ enum GrPixelConfig { -- * Byte order is r, g, b, a. This color format is 32 bits per channel -- */ -- kRGBA_float_GrPixelConfig, -- kLast_GrPixelConfig = kRGBA_float_GrPixelConfig -- }; -+Index: mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h -+=================================================================== -+--- mozilla-release.orig/gfx/skia/trunk/include/gpu/GrTypes.h -++++ mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h -+@@ -309,15 +309,13 @@ enum GrPixelConfig { - static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; - - // Aliases for pixel configs that match skia's byte order. -@@ -187,8 +126,3 @@ diff --git a/gfx/skia/trunk/include/gpu/GrTypes.h b/gfx/skia/trunk/include/gpu/G - #endif - - // Returns true if the pixel config is a GPU-specific compressed format -- // representation. -- static inline bool GrPixelConfigIsCompressed(GrPixelConfig config) { -- switch (config) { -- case kETC1_GrPixelConfig: -- case kLATC_GrPixelConfig: -diff --git a/xulrunner.spec b/xulrunner.spec -index 9570fd8..e9447b3 100644 ---- a/xulrunner.spec -+++ b/xulrunner.spec -@@ -78,7 +78,7 @@ - Summary: XUL Runtime for Gecko Applications - Name: xulrunner - Version: 39.0 --Release: 1%{?pre_tag}%{?dist} -+Release: 2%{?pre_tag}%{?dist} - URL: http://developer.mozilla.org/En/XULRunner - License: MPLv1.1 or GPLv2+ or LGPLv2+ - Group: Applications/Internet -@@ -98,7 +98,6 @@ Patch19: xulrunner-24.0-s390-inlines.patch - Patch20: firefox-build-prbool.patch - Patch21: aarch64-fix-skia.patch - Patch22: mozilla-1005535.patch --Patch23: firefox-nss-3.18.0.patch - Patch24: rhbz-1219542-s390-build.patch - - # Fedora specific patches -@@ -242,7 +241,6 @@ cd %{tarballdir} - %patch20 -p1 -b .prbool - %patch21 -p1 -b .aarch64-fix-skia - %patch22 -p1 -b .mozilla-1005535 --%patch23 -p1 -b .nss-3.18.0 - %ifarch s390 - %patch24 -p1 -b .rhbz-1219542-s390 - %endif -@@ -554,6 +552,11 @@ fi - #--------------------------------------------------------------------- - - %changelog -+* Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 -+- fixed build -+ - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available -+ - refreshed mozilla-1005535.patch patch to apply -+ - * Fri Jul 10 2015 Martin Stransky - 39.0-1 - - Update to 39.0 - --- -2.4.5 - diff --git a/xulrunner.spec b/xulrunner.spec index e9447b3..4f570b2 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 39.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -552,6 +552,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jul 22 2015 Petr Jasicek - 39.0-3 +- Removed unneeded patch files + * Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 - fixed build - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available From dfdecde2b971da01f55aea391cd8f015c77fa5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1=C3=AD=C4=8Dek?= Date: Tue, 25 Aug 2015 11:09:44 +0200 Subject: [PATCH 211/239] Update to 40.0 --- sources | 2 +- xulrunner.spec | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sources b/sources index bfecd5f..7e7ec37 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -34d9841bc9b8a85aaf06e311cf1cb263 firefox-39.0.source.tar.bz2 +62b9e6a4a46874a0be523fe41d3176e2 firefox-40.0.source.tar.bz2 diff --git a/xulrunner.spec b/xulrunner.spec index 4f570b2..699e376 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 39.0 -Release: 3%{?pre_tag}%{?dist} +Version: 40.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -552,6 +552,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Aug 25 2015 Petr Jasicek - 40.0-1 +- Update to 40.0 + * Wed Jul 22 2015 Petr Jasicek - 39.0-3 - Removed unneeded patch files From af1aad65f1728bcb399fbe0fdf14d75d97973edd Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 2 Sep 2015 22:01:45 +0200 Subject: [PATCH 212/239] Disablet Skia to build on second arches --- xulrunner-mozconfig | 2 +- xulrunner.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index e80f39e..0dcf27d 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -33,7 +33,7 @@ ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer ac_add_options --enable-pulseaudio -ac_add_options --enable-skia +ac_add_options --disable-skia export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index 699e376..28145a4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 40.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -552,6 +552,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Sep 2 2015 Martin Stransky - 40.0-2 +- Disable Skia to build on second arches + * Tue Aug 25 2015 Petr Jasicek - 40.0-1 - Update to 40.0 From 104f4ba570ea0567259096006dc6abf73866b6b3 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 1 Dec 2015 12:26:02 +0100 Subject: [PATCH 213/239] Update to 42.0 --- .gitignore | 1 + aarch64-fix-skia.patch | 4 +- mozilla-1005535.patch | 128 ----------------------------------------- sources | 2 +- xulrunner.spec | 19 +++--- 5 files changed, 14 insertions(+), 140 deletions(-) delete mode 100644 mozilla-1005535.patch diff --git a/.gitignore b/.gitignore index 0d88a9e..64b20fe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /firefox-*.source.tar.bz2 /xulrunner-*.source.tar.bz2 +/firefox-42.0.source.tar.xz diff --git a/aarch64-fix-skia.patch b/aarch64-fix-skia.patch index 4b9958d..17df80e 100644 --- a/aarch64-fix-skia.patch +++ b/aarch64-fix-skia.patch @@ -2,8 +2,8 @@ Based on https://github.com/google/skia/commit/b79ff56de23fef680ae7187040f2d6a95 Index: mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h =================================================================== ---- mozilla-release.orig/gfx/skia/trunk/src/core/SkUtilsArm.h -+++ mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h +--- mozilla-release/gfx/skia/skia/src/core/SkUtilsArm.h ++++ mozilla-release/gfx/skia/skia/src/core/SkUtilsArm.h @@ -21,9 +21,9 @@ #define SK_ARM_NEON_MODE_ALWAYS 1 #define SK_ARM_NEON_MODE_DYNAMIC 2 diff --git a/mozilla-1005535.patch b/mozilla-1005535.patch deleted file mode 100644 index ef4f1ac..0000000 --- a/mozilla-1005535.patch +++ /dev/null @@ -1,128 +0,0 @@ -# HG changeset patch -# Parent b7eb1ce0237d6125b75bc8ff1cb3afc328d6e78c -# User Steve Singer -Bug 1005535 - Get skia GPU building on big endian. - -Index: mozilla-release/configure.in -=================================================================== ---- mozilla-release.orig/configure.in -+++ mozilla-release/configure.in -@@ -8243,11 +8243,11 @@ if test "$MOZ_ENABLE_SKIA"; then - AC_DEFINE(SK_BUILD_FOR_ANDROID_NDK) - fi - -- if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then -+# if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc" -a -z "$MOZ_DISABLE_SKIA_GPU" ; then - MOZ_ENABLE_SKIA_GPU=1 - AC_DEFINE(USE_SKIA_GPU) - AC_SUBST(MOZ_ENABLE_SKIA_GPU) -- fi -+# fi - fi - AC_SUBST(MOZ_ENABLE_SKIA) - -Index: mozilla-release/gfx/skia/generate_mozbuild.py -=================================================================== ---- mozilla-release.orig/gfx/skia/generate_mozbuild.py -+++ mozilla-release/gfx/skia/generate_mozbuild.py -@@ -242,7 +242,6 @@ def generate_separated_sources(platform_ - 'common': { - #'trunk/src/effects/gradients/SkGradientTileProc.cpp', - 'trunk/src/gpu/gl/GrGLCreateNativeInterface_none.cpp', -- 'trunk/src/ports/SkDiscardableMemory_none.cpp', - 'trunk/src/ports/SkImageDecoder_empty.cpp', - 'trunk/src/ports/SkMemory_mozalloc.cpp', - # 'trunk/src/images/SkImages.cpp', -Index: mozilla-release/gfx/skia/moz.build -=================================================================== ---- mozilla-release.orig/gfx/skia/moz.build -+++ mozilla-release/gfx/skia/moz.build -@@ -663,7 +663,6 @@ UNIFIED_SOURCES += [ - 'trunk/src/pathops/SkReduceOrder.cpp', - 'trunk/src/pipe/SkGPipeRead.cpp', - 'trunk/src/pipe/SkGPipeWrite.cpp', -- 'trunk/src/ports/SkDiscardableMemory_none.cpp', - 'trunk/src/ports/SkGlobalInitialization_default.cpp', - 'trunk/src/ports/SkImageDecoder_empty.cpp', - 'trunk/src/ports/SkMemory_mozalloc.cpp', -Index: mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h -=================================================================== ---- mozilla-release.orig/gfx/skia/trunk/include/config/SkUserConfig.h -+++ mozilla-release/gfx/skia/trunk/include/config/SkUserConfig.h -@@ -197,6 +197,7 @@ - #endif - - // On all platforms we have this byte order -+ - #define SK_A32_SHIFT 24 - #define SK_R32_SHIFT 16 - #define SK_G32_SHIFT 8 -Index: mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h -=================================================================== ---- mozilla-release.orig/gfx/skia/trunk/include/core/SkColorPriv.h -+++ mozilla-release/gfx/skia/trunk/include/core/SkColorPriv.h -@@ -32,17 +32,7 @@ - * Here we enforce this constraint. - */ - --#ifdef SK_CPU_BENDIAN -- #define SK_RGBA_R32_SHIFT 24 -- #define SK_RGBA_G32_SHIFT 16 -- #define SK_RGBA_B32_SHIFT 8 -- #define SK_RGBA_A32_SHIFT 0 - -- #define SK_BGRA_B32_SHIFT 24 -- #define SK_BGRA_G32_SHIFT 16 -- #define SK_BGRA_R32_SHIFT 8 -- #define SK_BGRA_A32_SHIFT 0 --#else - #define SK_RGBA_R32_SHIFT 0 - #define SK_RGBA_G32_SHIFT 8 - #define SK_RGBA_B32_SHIFT 16 -@@ -52,7 +42,7 @@ - #define SK_BGRA_G32_SHIFT 8 - #define SK_BGRA_R32_SHIFT 16 - #define SK_BGRA_A32_SHIFT 24 --#endif -+ - - #if defined(SK_PMCOLOR_IS_RGBA) && defined(SK_PMCOLOR_IS_BGRA) - #error "can't define PMCOLOR to be RGBA and BGRA" -Index: mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h -=================================================================== ---- mozilla-release.orig/gfx/skia/trunk/include/core/SkImageInfo.h -+++ mozilla-release/gfx/skia/trunk/include/core/SkImageInfo.h -@@ -88,9 +88,10 @@ enum SkColorType { - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - kN32_SkColorType = kRGBA_8888_SkColorType, - #else --#error "SK_*32_SHFIT values must correspond to BGRA or RGBA byte order" -+ kN32_SkColorType = kBGRA_8888_SkColorType - #endif - -+ - #ifdef SK_SUPPORT_LEGACY_N32_NAME - kPMColor_SkColorType = kN32_SkColorType - #endif -Index: mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h -=================================================================== ---- mozilla-release.orig/gfx/skia/trunk/include/gpu/GrTypes.h -+++ mozilla-release/gfx/skia/trunk/include/gpu/GrTypes.h -@@ -309,15 +309,13 @@ enum GrPixelConfig { - static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1; - - // Aliases for pixel configs that match skia's byte order. --#ifndef SK_CPU_LENDIAN -- #error "Skia gpu currently assumes little endian" --#endif -+ - #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A) - static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; - #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A) - static const GrPixelConfig kSkia8888_GrPixelConfig = kRGBA_8888_GrPixelConfig; - #else -- #error "SK_*32_SHIFT values must correspond to GL_BGRA or GL_RGBA format." -+ static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig; - #endif - - // Returns true if the pixel config is a GPU-specific compressed format diff --git a/sources b/sources index 7e7ec37..1c7d7c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -62b9e6a4a46874a0be523fe41d3176e2 firefox-40.0.source.tar.bz2 +d610bf10a75afb4734045e1a43d8eba4 firefox-42.0.source.tar.xz diff --git a/xulrunner.spec b/xulrunner.spec index 28145a4..6388241 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -23,14 +23,14 @@ %global libvpx_version 1.0.0 %if %{?system_nss} -%global nspr_version 4.10.2 +%global nspr_version 4.10.10 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.15.4 +%global nss_version 3.19.2 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif %if %{?system_sqlite} -%global sqlite_version 3.7.13 +%global sqlite_version 3.8.4.2 # The actual sqlite version (see #480989): %global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) %endif @@ -46,7 +46,7 @@ %global tarballname firefox %global mozappdir %{_libdir}/%{name} -%global tarballdir mozilla-release +%global tarballdir %{tarballname}-%{version} # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -77,12 +77,12 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 40.0 -Release: 2%{?pre_tag}%{?dist} +Version: 42.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.bz2 +Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.xz Source10: %{name}-mozconfig Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in @@ -97,7 +97,6 @@ Patch18: xulrunner-24.0-jemalloc-ppc.patch Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch -Patch22: mozilla-1005535.patch Patch24: rhbz-1219542-s390-build.patch # Fedora specific patches @@ -240,7 +239,6 @@ cd %{tarballdir} %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool %patch21 -p1 -b .aarch64-fix-skia -%patch22 -p1 -b .mozilla-1005535 %ifarch s390 %patch24 -p1 -b .rhbz-1219542-s390 %endif @@ -552,6 +550,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 1 2015 Martin Stransky - 42.0-1 +- Update to 42.0 + * Wed Sep 2 2015 Martin Stransky - 40.0-2 - Disable Skia to build on second arches From 5ae495fd5c706a61fbf03f8b857d3ab88521473d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 1 Dec 2015 13:07:59 +0100 Subject: [PATCH 214/239] Build fix --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index 6388241..ba8eb5b 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -137,6 +137,7 @@ BuildRequires: libcurl-devel BuildRequires: libvpx-devel >= %{libvpx_version} BuildRequires: autoconf213 BuildRequires: pulseaudio-libs-devel +BuildRequires: pkgconfig(gconf-2.0) Requires: mozilla-filesystem %if %{?system_nss} From fd7866ba134079300db04a815e1337e4d6e38f7a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 1 Dec 2015 13:56:55 +0100 Subject: [PATCH 215/239] build fix --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index ba8eb5b..ec4b37c 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -138,6 +138,7 @@ BuildRequires: libvpx-devel >= %{libvpx_version} BuildRequires: autoconf213 BuildRequires: pulseaudio-libs-devel BuildRequires: pkgconfig(gconf-2.0) +BuildRequires: yasm Requires: mozilla-filesystem %if %{?system_nss} From 197a6537ee19f78acef175c56dd60e484b80da06 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 1 Dec 2015 16:51:17 -0500 Subject: [PATCH 216/239] rebuild for libvpx 1.5.0 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index ec4b37c..94da967 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 42.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -552,6 +552,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Dec 1 2015 Tom Callaway - 42.0-2 +- rebuild for libvpx 1.5.0 + * Tue Dec 1 2015 Martin Stransky - 42.0-1 - Update to 42.0 From fcb40580a959f31f9b72456fc3998b49e559739e Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Jan 2016 13:37:16 +0100 Subject: [PATCH 217/239] Update to 44.0 --- .gitignore | 1 + firefox-build.patch | 11 ----------- sources | 2 +- xulrunner.spec | 9 +++++---- 4 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 firefox-build.patch diff --git a/.gitignore b/.gitignore index 64b20fe..d7e8527 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /firefox-*.source.tar.bz2 /xulrunner-*.source.tar.bz2 /firefox-42.0.source.tar.xz +/firefox-44.0.source.tar.xz diff --git a/firefox-build.patch b/firefox-build.patch deleted file mode 100644 index 262337c..0000000 --- a/firefox-build.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up firefox-32.0/mozilla-release/media/libstagefright/moz.build.old firefox-32.0/mozilla-release/media/libstagefright/moz.build ---- firefox-32.0/mozilla-release/media/libstagefright/moz.build.old 2014-08-26 05:38:08.000000000 +0200 -+++ firefox-32.0/mozilla-release/media/libstagefright/moz.build 2014-08-27 15:40:12.030299348 +0200 -@@ -120,7 +120,6 @@ elif CONFIG['GNU_CXX']: - '-Wno-sign-compare' - ] - CXXFLAGS += [ -- '-Wno-format', - '-Wno-multichar', - '-Wno-sign-compare', - '-Wno-unused', diff --git a/sources b/sources index 1c7d7c4..bf85a54 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d610bf10a75afb4734045e1a43d8eba4 firefox-42.0.source.tar.xz +9d940e72f9eaff767fafcfbcc387594d firefox-44.0.source.tar.xz diff --git a/xulrunner.spec b/xulrunner.spec index 94da967..b94a2e5 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -77,8 +77,8 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 42.0 -Release: 2%{?pre_tag}%{?dist} +Version: 44.0 +Release: 1%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -89,7 +89,6 @@ Source21: %{name}.sh.in # build patches Patch1: xulrunner-install-dir.patch -Patch2: firefox-build.patch Patch3: mozilla-build-arm.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 Patch18: xulrunner-24.0-jemalloc-ppc.patch @@ -235,7 +234,6 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch2 -p2 -b .build %patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines @@ -552,6 +550,9 @@ fi #--------------------------------------------------------------------- %changelog +* Tue Jan 26 2016 Martin Stransky - 44.0-1 +- Update to 44.0 + * Tue Dec 1 2015 Tom Callaway - 42.0-2 - rebuild for libvpx 1.5.0 From 97e3e8e361ba2d56d1bb5d497b328db57c2e010a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Tue, 26 Jan 2016 15:32:31 +0100 Subject: [PATCH 218/239] Fixed file list --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index b94a2e5..6e9566a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -510,6 +510,7 @@ fi %{mozappdir}/components/*.manifest %{mozappdir}/omni.ja %{mozappdir}/*.so +%{mozappdir}/rapl %{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-stub From 8f10697eafe82413e62f8c69b769bd0db974970b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 27 Jan 2016 09:28:38 +0100 Subject: [PATCH 219/239] build fix --- xulrunner.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 6e9566a..c1e97fa 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -510,7 +510,9 @@ fi %{mozappdir}/components/*.manifest %{mozappdir}/omni.ja %{mozappdir}/*.so +%ifarch %{ix86} x86_64 %{mozappdir}/rapl +%endif %{mozappdir}/run-mozilla.sh %{mozappdir}/xulrunner %{mozappdir}/xulrunner-stub From 05a100edbfa280b6bab53e52c170e2c2ff9c8de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 1 Feb 2016 12:45:25 +0100 Subject: [PATCH 220/239] refresh s390 patch --- rhbz-1219542-s390-build.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch index 4f38200..3734ce5 100644 --- a/rhbz-1219542-s390-build.patch +++ b/rhbz-1219542-s390-build.patch @@ -1,16 +1,16 @@ -diff -up mozilla-release/js/src/configure.in.opt mozilla-release/js/src/configure.in ---- mozilla-release/js/src/configure.in.opt 2015-05-04 02:43:23.000000000 +0200 -+++ mozilla-release/js/src/configure.in 2015-05-07 14:21:07.685405039 +0200 -@@ -1492,7 +1492,7 @@ case "$host" in +diff -up firefox-43.0.3/js/src/configure.in.rhbz-1219542-s390 firefox-43.0.3/js/src/configure.in +--- firefox-43.0.3/js/src/configure.in.rhbz-1219542-s390 2015-12-23 17:11:01.000000000 -0500 ++++ firefox-43.0.3/js/src/configure.in 2016-01-03 08:08:27.139956990 -0500 +@@ -1466,7 +1466,7 @@ case "$host" in + *-linux*|*-kfreebsd*-gnu|*-gnu*) HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - HOST_NSPR_MDCPUCFG='\"md/_linux.cfg\"' - HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" + HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" ;; *) -@@ -1674,8 +1674,8 @@ ia64*-hpux*) +@@ -1649,8 +1649,8 @@ ia64*-hpux*) # while; Intel recommends against using it. MOZ_OPTIMIZE_FLAGS="-O2" elif test "$GNU_CC" -o "$GNU_CXX"; then From caeb8b7b700fe93f2d4bfd01eeaa5c7d0959f16b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:52:57 +0000 Subject: [PATCH 221/239] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index c1e97fa..9199c71 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 1%{?pre_tag}%{?dist} +Release: 2%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -553,6 +553,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 44.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Tue Jan 26 2016 Martin Stransky - 44.0-1 - Update to 44.0 From 998d1df3b6d635523ac7a10c90da004f299702a4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 15 Feb 2016 11:26:55 +0100 Subject: [PATCH 222/239] gcc 6 build fix --- firefox-gcc-6.0.patch | 26 ++++++++++++++++++++++++++ xulrunner.spec | 7 ++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 firefox-gcc-6.0.patch diff --git a/firefox-gcc-6.0.patch b/firefox-gcc-6.0.patch new file mode 100644 index 0000000..0a74d36 --- /dev/null +++ b/firefox-gcc-6.0.patch @@ -0,0 +1,26 @@ +diff -up firefox-44.0/nsprpub/config/make-system-wrappers.pl.back firefox-44.0/nsprpub/config/make-system-wrappers.pl +--- firefox-44.0/nsprpub/config/make-system-wrappers.pl.back 2016-01-24 00:23:49.000000000 +0100 ++++ firefox-44.0/nsprpub/config/make-system-wrappers.pl 2016-02-02 14:58:45.064112655 +0100 +@@ -19,7 +19,9 @@ while () { + open OUT, ">$output_dir/$_"; + print OUT "#pragma GCC system_header\n"; # suppress include_next warning + print OUT "#pragma GCC visibility push(default)\n"; ++ print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; + print OUT "#include_next \<$_\>\n"; ++ print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; + print OUT "#pragma GCC visibility pop\n"; + close OUT; + } +diff -up firefox-44.0/mozglue/build/arm.cpp.old firefox-44.0/mozglue/build/arm.cpp +--- firefox-44.0/mozglue/build/arm.cpp.old 2016-02-03 10:07:29.879526500 +0100 ++++ firefox-44.0/mozglue/build/arm.cpp 2016-02-03 10:08:11.062697517 +0100 +@@ -104,7 +104,9 @@ check_neon(void) + + # elif defined(__linux__) || defined(ANDROID) + # include ++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS + # include ++#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS + # include + + enum{ diff --git a/xulrunner.spec b/xulrunner.spec index 9199c71..ec97ed9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 2%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -97,6 +97,7 @@ Patch19: xulrunner-24.0-s390-inlines.patch Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch24: rhbz-1219542-s390-build.patch +Patch25: firefox-gcc-6.0.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -242,6 +243,7 @@ cd %{tarballdir} %ifarch s390 %patch24 -p1 -b .rhbz-1219542-s390 %endif +%patch25 -p1 -b .gcc6 %patch200 -p2 -b .pk %patch204 -p2 -b .966424 @@ -553,6 +555,9 @@ fi #--------------------------------------------------------------------- %changelog +* Mon Feb 15 2016 Martin Stransky - 44.0-3 +- gcc 6 build fix + * Fri Feb 05 2016 Fedora Release Engineering - 44.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 355332afb11d9b94cb21d6d1a5dcbefe5942f500 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 17 Feb 2016 12:32:15 +0100 Subject: [PATCH 223/239] Rebuild --- xulrunner.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index ec97ed9..9126632 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 3%{?pre_tag}%{?dist} +Release: 4%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -555,7 +555,7 @@ fi #--------------------------------------------------------------------- %changelog -* Mon Feb 15 2016 Martin Stransky - 44.0-3 +* Mon Feb 15 2016 Martin Stransky - 44.0-4 - gcc 6 build fix * Fri Feb 05 2016 Fedora Release Engineering - 44.0-2 From 9926729efe5907771e7e4c6fff1c6019ab7d090a Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Mon, 22 Feb 2016 11:06:17 +0100 Subject: [PATCH 224/239] gcc6 woraround --- xulrunner.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xulrunner.spec b/xulrunner.spec index 9126632..54ad87f 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -312,6 +312,11 @@ echo "ac_add_options --disable-ion" >> .mozconfig echo "ac_add_options --disable-yarr-jit" >> .mozconfig %endif +#Workarounf for mozbz#1245783 +%if 0%{?fedora} > 23 +echo "ac_add_options --disable-ion" >> .mozconfig +%endif + %ifnarch %{ix86} x86_64 echo "ac_add_options --disable-webrtc" >> .mozconfig %endif From 078871b9d0159a9bc6039a493cfbe1df3e076316 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 2 Mar 2016 11:34:01 +0100 Subject: [PATCH 225/239] Fix WebRTC on AArch64 again. --- firefox-webrtc-add-missing-archs.patch | 33 ++++++++++++++++++++++++++ xulrunner.spec | 9 ++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 firefox-webrtc-add-missing-archs.patch diff --git a/firefox-webrtc-add-missing-archs.patch b/firefox-webrtc-add-missing-archs.patch new file mode 100644 index 0000000..94ce346 --- /dev/null +++ b/firefox-webrtc-add-missing-archs.patch @@ -0,0 +1,33 @@ + +# HG changeset patch +# User Makoto Kato +# Date 1446192505 -32400 +# Node ID 189d4b0f9f238c76b1c2ee7003bba8fb693b3e54 +# Parent 6bac283aad5301f23a0bdbcd7c7f3f92b9da7c24 +Bug 1219566 - Add aarch64 macro to webrtc/trunk/build/build_config.h. r=rjesup + +diff --git a/media/webrtc/trunk/build/build_config.h b/media/webrtc/trunk/build/build_config.h +--- a/media/webrtc/trunk/build/build_config.h ++++ b/media/webrtc/trunk/build/build_config.h +@@ -151,16 +151,20 @@ + #define ARCH_CPU_S390X 1 + #define ARCH_CPU_64_BITS 1 + #elif defined(__s390__) + #define ARCH_CPU_S390 1 + #define ARCH_CPU_32_BITS 1 + #elif defined(__alpha__) + #define ARCH_CPU_ALPHA 1 + #define ARCH_CPU_64_BITS 1 ++#elif defined(__aarch64__) ++#define ARCH_CPU_ARM_FAMILY 1 ++#define ARCH_CPU_ARM64 1 ++#define ARCH_CPU_64_BITS 1 + #else + #error Please add support for your architecture in build/build_config.h + #endif + + // Type detection for wchar_t. + #if defined(OS_WIN) + #define WCHAR_T_IS_UTF16 + #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ + diff --git a/xulrunner.spec b/xulrunner.spec index 54ad87f..dd7bd37 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 4%{?pre_tag}%{?dist} +Release: 5%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -104,6 +104,9 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch +# FTBFS on AArch64 +Patch205: firefox-webrtc-add-missing-archs.patch + # Upstream patches # --------------------------------------------------- @@ -247,6 +250,7 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p2 -b .966424 +%patch205 -p1 # Upstream patches @@ -560,6 +564,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Mar 02 2016 Marcin Juszkiewicz - 44.0-5 +- Fix WebRTC on AArch64 again. + * Mon Feb 15 2016 Martin Stransky - 44.0-4 - gcc 6 build fix From 60bbba63be55322472db545b1f56050676336ed9 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 27 Apr 2016 22:40:56 +0100 Subject: [PATCH 226/239] Added fix for rhbz#1315225 - ppc64le/aarch64 build fixes --- xulrunner.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index dd7bd37..f630b41 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 5%{?pre_tag}%{?dist} +Release: 6%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -288,8 +288,12 @@ echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig %else echo "ac_add_options --disable-debug" >> .mozconfig +%ifarch ppc64le aarch64 +echo 'ac_add_options --enable-optimize="-g -O2"' >> .mozconfig +%else echo "ac_add_options --enable-optimize" >> .mozconfig %endif +%endif # s390(x) fails to start with jemalloc enabled %ifarch s390 s390x @@ -564,6 +568,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Apr 27 2016 Peter Robinson 44.0-6 +- Added fix for rhbz#1315225 - ppc64le/aarch64 build fixes + * Wed Mar 02 2016 Marcin Juszkiewicz - 44.0-5 - Fix WebRTC on AArch64 again. From f4ed118ce993829ff5a80149dfe37c3088124423 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 22 Jul 2016 11:19:15 -0400 Subject: [PATCH 227/239] rebuild for libvpx 1.6.0 --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index f630b41..dbf41f9 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 6%{?pre_tag}%{?dist} +Release: 7%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -568,6 +568,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jul 22 2016 Tom Callaway - 44.0-7 +- rebuild for libvpx 1.6.0 + * Wed Apr 27 2016 Peter Robinson 44.0-6 - Added fix for rhbz#1315225 - ppc64le/aarch64 build fixes From 5aa49f34725db30a92ca4c14623bc7e964adb2cf Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2016 11:03:39 +0100 Subject: [PATCH 228/239] Rebuilt --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index dbf41f9..c562dad 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 7%{?pre_tag}%{?dist} +Release: 8%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -568,6 +568,9 @@ fi #--------------------------------------------------------------------- %changelog +* Thu Dec 15 2016 Martin Stransky - 44.0-8 +- Rebuilt + * Fri Jul 22 2016 Tom Callaway - 44.0-7 - rebuild for libvpx 1.6.0 From f0c6414b608d8f0dd1ce9c815adbdcacb5c15a66 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Dec 2016 11:40:33 +0100 Subject: [PATCH 229/239] update build req --- xulrunner.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner.spec b/xulrunner.spec index c562dad..6451f93 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -142,6 +142,7 @@ BuildRequires: autoconf213 BuildRequires: pulseaudio-libs-devel BuildRequires: pkgconfig(gconf-2.0) BuildRequires: yasm +BuildRequires: dbus-glib-devel Requires: mozilla-filesystem %if %{?system_nss} From 1299889d393c06e1328f2b30f501078180182f76 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 11:17:55 +0100 Subject: [PATCH 230/239] Added fix for new nss 3.28.1 (mozbz#1290037) --- xulrunner.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xulrunner.spec b/xulrunner.spec index 6451f93..f1b1968 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ %if %{?system_nss} %global nspr_version 4.10.10 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.19.2 +%global nss_version 3.28.1 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 8%{?pre_tag}%{?dist} +Release: 9%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -107,6 +107,9 @@ Patch204: rhbz-966424.patch # FTBFS on AArch64 Patch205: firefox-webrtc-add-missing-archs.patch +# Upstream patches +Patch300: mozilla-1290037.patch + # Upstream patches # --------------------------------------------------- @@ -254,6 +257,7 @@ cd %{tarballdir} %patch205 -p1 # Upstream patches +%patch300 -p1 -b .1290037 %{__rm} -f .mozconfig @@ -569,6 +573,9 @@ fi #--------------------------------------------------------------------- %changelog +* Fri Jan 20 2017 Martin Stransky - 44.0-9 +- Added fix for new nss 3.28.1 (mozbz#1290037) + * Thu Dec 15 2016 Martin Stransky - 44.0-8 - Rebuilt From ec4a6e93109bdd221598f28e4ebcf51bbef1ccc4 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 11:30:49 +0100 Subject: [PATCH 231/239] Added missing patch --- mozilla-1290037.patch | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 mozilla-1290037.patch diff --git a/mozilla-1290037.patch b/mozilla-1290037.patch new file mode 100644 index 0000000..508d580 --- /dev/null +++ b/mozilla-1290037.patch @@ -0,0 +1,34 @@ +# HG changeset patch +# User Franziskus Kiefer +# Date 1469717280 -7200 +# Thu Jul 28 16:48:00 2016 +0200 +# Node ID 95aa61f1e3562e526bf88179d9d078fd90ad1bda +# Parent d42aacfe34af25e2f5110e2ca3d24a210eabeb33 +Update keybits in H2, r=mt + +MozReview-Commit-ID: 35oWoDMqe1Y + +diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp +--- a/netwerk/protocol/http/Http2Session.cpp ++++ b/netwerk/protocol/http/Http2Session.cpp +@@ -3544,18 +3544,18 @@ Http2Session::ConfirmTLSProfile() + RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); + } + + uint32_t keybits = ssl->GetKEAKeyBits(); + if (kea == ssl_kea_dh && keybits < 2048) { + LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to DH %d < 2048\n", + this, keybits)); + RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); +- } else if (kea == ssl_kea_ecdh && keybits < 256) { // 256 bits is "security level" of 128 +- LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 256\n", ++ } else if (kea == ssl_kea_ecdh && keybits < 224) { // see rfc7540 9.2.1. ++ LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 224\n", + this, keybits)); + RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); + } + + int16_t macAlgorithm = ssl->GetMACAlgorithmUsed(); + LOG3(("Http2Session::ConfirmTLSProfile %p MAC Algortihm (aead==6) %d\n", + this, macAlgorithm)); + if (macAlgorithm != nsISSLSocketControl::SSL_MAC_AEAD) { From 36e54a1e24bce507651a7b2b1195a06bb3c6fa2c Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 12:04:35 +0100 Subject: [PATCH 232/239] Disabled system icu --- xulrunner-mozconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index 0dcf27d..e7c882d 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -34,6 +34,7 @@ ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer ac_add_options --enable-pulseaudio ac_add_options --disable-skia +ac_add_options --without-system-icu export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 From dedebcc1f71e8e8ad6ba8dbbc44cf3fc25a3714d Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 12:32:06 +0100 Subject: [PATCH 233/239] Relaxed requested nss version --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index f1b1968..45e339a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -25,7 +25,7 @@ %if %{?system_nss} %global nspr_version 4.10.10 %global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.28.1 +%global nss_version 3.27 %global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %endif From 3608d371a58510eb7cadcb13d61c5dbad48e5601 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Fri, 20 Jan 2017 12:47:14 +0100 Subject: [PATCH 234/239] Added mozbz#1329272 build fix --- mozilla-1329272.patch | 29 +++++++++++++++++++++++++++++ xulrunner-mozconfig | 1 - xulrunner.spec | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 mozilla-1329272.patch diff --git a/mozilla-1329272.patch b/mozilla-1329272.patch new file mode 100644 index 0000000..ab0b26b --- /dev/null +++ b/mozilla-1329272.patch @@ -0,0 +1,29 @@ +From 66fc64a75617ffc68f16780f60e39c1f368dfd41 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 9 Jan 2017 14:37:33 +0100 +Subject: [PATCH] bug 1329272: add bracket for sed 4.3 compliance, r=glandium + +--- + build/autoconf/icu.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 +index 4f46345f435a..794ddcdf4e52 100644 +--- a/build/autoconf/icu.m4 ++++ b/build/autoconf/icu.m4 +@@ -67,11 +67,11 @@ if test -n "$USE_ICU"; then + if test ! -d "$icudir"; then + AC_MSG_ERROR([Cannot find the ICU directory]) + fi + fi + +- version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` ++ version=`sed -n 's/^[[[:space:]]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` + if test x"$version" = x; then + AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno]) + fi + MOZ_ICU_VERSION="$version" + +-- +2.11.0 + diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig index e7c882d..0dcf27d 100644 --- a/xulrunner-mozconfig +++ b/xulrunner-mozconfig @@ -34,7 +34,6 @@ ac_add_options --enable-chrome-format=omni ac_add_options --disable-gstreamer ac_add_options --enable-pulseaudio ac_add_options --disable-skia -ac_add_options --without-system-icu export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/xulrunner.spec b/xulrunner.spec index 45e339a..8fc82ac 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -109,6 +109,7 @@ Patch205: firefox-webrtc-add-missing-archs.patch # Upstream patches Patch300: mozilla-1290037.patch +Patch301: mozilla-1329272.patch # Upstream patches @@ -258,6 +259,7 @@ cd %{tarballdir} # Upstream patches %patch300 -p1 -b .1290037 +%patch301 -p1 -b .1329272 %{__rm} -f .mozconfig From 656d9078e217a4dcfefc151ff4b4ccaf5f54e047 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 18:11:41 +0000 Subject: [PATCH 235/239] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- xulrunner.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 8fc82ac..e0720a4 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 44.0 -Release: 9%{?pre_tag}%{?dist} +Release: 10%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -575,6 +575,9 @@ fi #--------------------------------------------------------------------- %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 44.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Jan 20 2017 Martin Stransky - 44.0-9 - Added fix for new nss 3.28.1 (mozbz#1290037) From 90cdbfa41ddd48bff32d8e460fb34ac42d4e290c Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Thu, 1 Jun 2017 15:20:24 +0200 Subject: [PATCH 236/239] Fixed xulrunner build problems with stl headers --- build-stl-headers-fix-mbz1269171.patch | 169 +++++++++++++++++++++++++ xulrunner.spec | 2 + 2 files changed, 171 insertions(+) create mode 100644 build-stl-headers-fix-mbz1269171.patch diff --git a/build-stl-headers-fix-mbz1269171.patch b/build-stl-headers-fix-mbz1269171.patch new file mode 100644 index 0000000..7f9db14 --- /dev/null +++ b/build-stl-headers-fix-mbz1269171.patch @@ -0,0 +1,169 @@ +diff -up firefox-44.0/config/gcc-stl-wrapper.template.h.1269171 firefox-44.0/config/gcc-stl-wrapper.template.h +--- firefox-44.0/config/gcc-stl-wrapper.template.h.1269171 2017-06-01 12:06:24.481286748 +0200 ++++ firefox-44.0/config/gcc-stl-wrapper.template.h 2017-06-01 12:09:28.883022995 +0200 +@@ -17,24 +17,6 @@ + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + +-// mozalloc.h wants ; break the cycle by always explicitly +-// including here. NB: this is a tad sneaky. Sez the gcc docs: +-// +-// `#include_next' does not distinguish between and "file" +-// inclusion, nor does it check that the file you specify has the +-// same name as the current file. It simply looks for the file +-// named, starting with the directory in the search path after the +-// one where the current file was found. +-#include_next +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" +-#endif + + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies +@@ -46,10 +28,34 @@ + // # define _GLIBCXX_DEBUG 1 + #endif + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++ ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \ ++ !defined(moz_dont_include_mozalloc_for_${HEADER}) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + #pragma GCC visibility push(default) + #include_next <${HEADER}> + #pragma GCC visibility pop + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + // gcc calls a __throw_*() function from bits/functexcept.h when it + // wants to "throw an exception". functexcept exists nominally to + // support -fno-exceptions, but since we'll always use the system +diff -up firefox-44.0/config/make-stl-wrappers.py.1269171 firefox-44.0/config/make-stl-wrappers.py +--- firefox-44.0/config/make-stl-wrappers.py.1269171 2016-01-24 00:23:37.000000000 +0100 ++++ firefox-44.0/config/make-stl-wrappers.py 2017-06-01 12:06:24.482286747 +0200 +@@ -30,7 +30,6 @@ def main(outdir, compiler, template_file + os.mkdir(outdir) + + template = open(template_file, 'r').read() +- path_to_new = header_path('new', compiler) + + for header in open(header_list_file, 'r'): + header = header.rstrip() +@@ -40,8 +39,7 @@ def main(outdir, compiler, template_file + path = header_path(header, compiler) + with FileAvoidWrite(os.path.join(outdir, header)) as f: + f.write(string.Template(template).substitute(HEADER=header, +- HEADER_PATH=path, +- NEW_HEADER_PATH=path_to_new)) ++ HEADER_PATH=path)) + + + if __name__ == '__main__': +diff -up firefox-44.0/config/msvc-stl-wrapper.template.h.1269171 firefox-44.0/config/msvc-stl-wrapper.template.h +--- firefox-44.0/config/msvc-stl-wrapper.template.h.1269171 2016-01-24 00:23:37.000000000 +0100 ++++ firefox-44.0/config/msvc-stl-wrapper.template.h 2017-06-01 12:06:24.482286747 +0200 +@@ -8,35 +8,23 @@ + #ifndef mozilla_${HEADER}_h + #define mozilla_${HEADER}_h + +-#ifndef MOZ_HAVE_INCLUDED_ALLOC +-#define MOZ_HAVE_INCLUDED_ALLOC +- + #if _HAS_EXCEPTIONS + # error "STL code can only be used with -fno-exceptions" + #endif + ++// Include mozalloc after the STL header and all other headers it includes ++// have been preprocessed. ++#if !defined(MOZ_INCLUDE_MOZALLOC_H) ++# define MOZ_INCLUDE_MOZALLOC_H ++# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++#endif ++ + // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k + // CRT doesn't export std::_Throw(). So we define it. + #ifndef mozilla_Throw_h + # include "mozilla/throw_msvc.h" + #endif + +-// Code might include before other wrapped headers, but +-// includes and so we want to wrap it. But mozalloc.h +-// wants also, so we break the cycle by always explicitly +-// including here. +-#include <${NEW_HEADER_PATH}> +- +-// See if we're in code that can use mozalloc. NB: this duplicates +-// code in nscore.h because nscore.h pulls in prtypes.h, and chromium +-// can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" +-#endif +-#endif /* MOZ_HAVE_INCLUDED_ALLOC */ +- + #ifdef _DEBUG + // From + // http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx +@@ -75,4 +63,15 @@ + + #pragma warning( pop ) + ++#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} ++// See if we're in code that can use mozalloc. NB: this duplicates ++// code in nscore.h because nscore.h pulls in prtypes.h, and chromium ++// can't build with that being included before base/basictypes.h. ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++#endif ++ + #endif // if mozilla_${HEADER}_h +diff -up firefox-44.0/memory/mozalloc/mozalloc.h.1269171 firefox-44.0/memory/mozalloc/mozalloc.h +--- firefox-44.0/memory/mozalloc/mozalloc.h.1269171 2016-01-24 00:23:44.000000000 +0100 ++++ firefox-44.0/memory/mozalloc/mozalloc.h 2017-06-01 12:06:24.482286747 +0200 +@@ -12,10 +12,17 @@ + * https://bugzilla.mozilla.org/show_bug.cgi?id=427099 + */ + +-#include +-#include + #if defined(__cplusplus) + # include ++// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the ++// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code ++// using things defined there. Specifically, with stdlib.h, the use of abs() ++// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs() ++# include ++# include ++#else ++# include ++# include + #endif + + #if defined(__cplusplus) diff --git a/xulrunner.spec b/xulrunner.spec index e0720a4..d477a8a 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -98,6 +98,7 @@ Patch20: firefox-build-prbool.patch Patch21: aarch64-fix-skia.patch Patch24: rhbz-1219542-s390-build.patch Patch25: firefox-gcc-6.0.patch +Patch26: build-stl-headers-fix-mbz1269171.patch # Fedora specific patches Patch200: mozilla-193-pkgconfig.patch @@ -252,6 +253,7 @@ cd %{tarballdir} %patch24 -p1 -b .rhbz-1219542-s390 %endif %patch25 -p1 -b .gcc6 +%patch26 -p1 -b .1269171 %patch200 -p2 -b .pk %patch204 -p2 -b .966424 From be3317bc531ae5359e5d7a5960e34a234d76fec7 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 14 Jun 2017 12:51:30 +0200 Subject: [PATCH 237/239] Update to Firefox 45.9.0 esr source tarball --- .gitignore | 1 + firefox-webrtc-add-missing-archs.patch | 33 ------------------------- mozilla-1290037.patch | 34 -------------------------- mozilla-1329272.patch | 29 ---------------------- sources | 2 +- xulrunner-install-dir.patch | 10 ++++---- xulrunner.spec | 29 ++++++---------------- 7 files changed, 15 insertions(+), 123 deletions(-) delete mode 100644 firefox-webrtc-add-missing-archs.patch delete mode 100644 mozilla-1290037.patch delete mode 100644 mozilla-1329272.patch diff --git a/.gitignore b/.gitignore index d7e8527..6f4d157 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /xulrunner-*.source.tar.bz2 /firefox-42.0.source.tar.xz /firefox-44.0.source.tar.xz +/firefox-45.9.0esr.source.tar.xz diff --git a/firefox-webrtc-add-missing-archs.patch b/firefox-webrtc-add-missing-archs.patch deleted file mode 100644 index 94ce346..0000000 --- a/firefox-webrtc-add-missing-archs.patch +++ /dev/null @@ -1,33 +0,0 @@ - -# HG changeset patch -# User Makoto Kato -# Date 1446192505 -32400 -# Node ID 189d4b0f9f238c76b1c2ee7003bba8fb693b3e54 -# Parent 6bac283aad5301f23a0bdbcd7c7f3f92b9da7c24 -Bug 1219566 - Add aarch64 macro to webrtc/trunk/build/build_config.h. r=rjesup - -diff --git a/media/webrtc/trunk/build/build_config.h b/media/webrtc/trunk/build/build_config.h ---- a/media/webrtc/trunk/build/build_config.h -+++ b/media/webrtc/trunk/build/build_config.h -@@ -151,16 +151,20 @@ - #define ARCH_CPU_S390X 1 - #define ARCH_CPU_64_BITS 1 - #elif defined(__s390__) - #define ARCH_CPU_S390 1 - #define ARCH_CPU_32_BITS 1 - #elif defined(__alpha__) - #define ARCH_CPU_ALPHA 1 - #define ARCH_CPU_64_BITS 1 -+#elif defined(__aarch64__) -+#define ARCH_CPU_ARM_FAMILY 1 -+#define ARCH_CPU_ARM64 1 -+#define ARCH_CPU_64_BITS 1 - #else - #error Please add support for your architecture in build/build_config.h - #endif - - // Type detection for wchar_t. - #if defined(OS_WIN) - #define WCHAR_T_IS_UTF16 - #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ - diff --git a/mozilla-1290037.patch b/mozilla-1290037.patch deleted file mode 100644 index 508d580..0000000 --- a/mozilla-1290037.patch +++ /dev/null @@ -1,34 +0,0 @@ -# HG changeset patch -# User Franziskus Kiefer -# Date 1469717280 -7200 -# Thu Jul 28 16:48:00 2016 +0200 -# Node ID 95aa61f1e3562e526bf88179d9d078fd90ad1bda -# Parent d42aacfe34af25e2f5110e2ca3d24a210eabeb33 -Update keybits in H2, r=mt - -MozReview-Commit-ID: 35oWoDMqe1Y - -diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp ---- a/netwerk/protocol/http/Http2Session.cpp -+++ b/netwerk/protocol/http/Http2Session.cpp -@@ -3544,18 +3544,18 @@ Http2Session::ConfirmTLSProfile() - RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); - } - - uint32_t keybits = ssl->GetKEAKeyBits(); - if (kea == ssl_kea_dh && keybits < 2048) { - LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to DH %d < 2048\n", - this, keybits)); - RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); -- } else if (kea == ssl_kea_ecdh && keybits < 256) { // 256 bits is "security level" of 128 -- LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 256\n", -+ } else if (kea == ssl_kea_ecdh && keybits < 224) { // see rfc7540 9.2.1. -+ LOG3(("Http2Session::ConfirmTLSProfile %p FAILED due to ECDH %d < 224\n", - this, keybits)); - RETURN_SESSION_ERROR(this, INADEQUATE_SECURITY); - } - - int16_t macAlgorithm = ssl->GetMACAlgorithmUsed(); - LOG3(("Http2Session::ConfirmTLSProfile %p MAC Algortihm (aead==6) %d\n", - this, macAlgorithm)); - if (macAlgorithm != nsISSLSocketControl::SSL_MAC_AEAD) { diff --git a/mozilla-1329272.patch b/mozilla-1329272.patch deleted file mode 100644 index ab0b26b..0000000 --- a/mozilla-1329272.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 66fc64a75617ffc68f16780f60e39c1f368dfd41 Mon Sep 17 00:00:00 2001 -From: Daniel Stenberg -Date: Mon, 9 Jan 2017 14:37:33 +0100 -Subject: [PATCH] bug 1329272: add bracket for sed 4.3 compliance, r=glandium - ---- - build/autoconf/icu.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/autoconf/icu.m4 b/build/autoconf/icu.m4 -index 4f46345f435a..794ddcdf4e52 100644 ---- a/build/autoconf/icu.m4 -+++ b/build/autoconf/icu.m4 -@@ -67,11 +67,11 @@ if test -n "$USE_ICU"; then - if test ! -d "$icudir"; then - AC_MSG_ERROR([Cannot find the ICU directory]) - fi - fi - -- version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` -+ version=`sed -n 's/^[[[:space:]]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` - if test x"$version" = x; then - AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno]) - fi - MOZ_ICU_VERSION="$version" - --- -2.11.0 - diff --git a/sources b/sources index bf85a54..799823c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9d940e72f9eaff767fafcfbcc387594d firefox-44.0.source.tar.xz +SHA512 (firefox-45.9.0esr.source.tar.xz) = 2e4c1f8bca0c59ac93ab918b996e3b6cf25e7279ad5800de256aa220e670c6aaab2036c3ead4020b80e2a0e8cda3ae5fe9b270106646c625ce4fd6ecfd66d9ca diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch index 51fe4ba..89d2972 100644 --- a/xulrunner-install-dir.patch +++ b/xulrunner-install-dir.patch @@ -1,6 +1,6 @@ -diff -up firefox-29.0/mozilla-release/config/baseconfig.mk.orig firefox-29.0/mozilla-release/config/baseconfig.mk ---- mozilla-release/config/baseconfig.mk.orig 2014-04-22 15:38:52.948165295 +0200 -+++ mozilla-release/config/baseconfig.mk 2014-04-22 15:42:20.387481673 +0200 +diff -up firefox-45.9.0esr/config/baseconfig.mk.version-fix firefox-45.9.0esr/config/baseconfig.mk +--- firefox-45.9.0esr/config/baseconfig.mk.version-fix 2017-06-14 10:02:42.829306768 +0200 ++++ firefox-45.9.0esr/config/baseconfig.mk 2017-06-14 10:02:54.014302221 +0200 @@ -4,7 +4,7 @@ # whether a normal build is happening or whether the check is running. includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) @@ -8,5 +8,5 @@ diff -up firefox-29.0/mozilla-release/config/baseconfig.mk.orig firefox-29.0/moz -installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +installdir = $(libdir)/$(MOZ_APP_NAME) sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - ifndef TOP_DIST - TOP_DIST = dist + ifeq (.,$(DEPTH)) + DIST = dist diff --git a/xulrunner.spec b/xulrunner.spec index d477a8a..68fea22 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -46,7 +46,7 @@ %global tarballname firefox %global mozappdir %{_libdir}/%{name} -%global tarballdir %{tarballname}-%{version} +%global tarballdir %{tarballname}-%{version}esr # crash reporter work only on x86/x86_64 %ifarch %{ix86} x86_64 @@ -77,12 +77,12 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner -Version: 44.0 -Release: 10%{?pre_tag}%{?dist} +Version: 45.9.0 +Release: 10%?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet -Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}.source.tar.xz +Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}esr.source.tar.xz Source10: %{name}-mozconfig Source12: %{name}-redhat-default-prefs.js Source21: %{name}.sh.in @@ -105,13 +105,6 @@ Patch200: mozilla-193-pkgconfig.patch # Unable to install addons from https pages Patch204: rhbz-966424.patch -# FTBFS on AArch64 -Patch205: firefox-webrtc-add-missing-archs.patch - -# Upstream patches -Patch300: mozilla-1290037.patch -Patch301: mozilla-1329272.patch - # Upstream patches # --------------------------------------------------- @@ -244,7 +237,7 @@ debug %{name}, you want to install %{name}-debuginfo instead. cd %{tarballdir} %patch1 -p1 -%patch3 -p2 -b .arm +#%patch3 -p2 -b .arm %patch18 -p2 -b .jemalloc-ppc %patch19 -p2 -b .s390-inlines %patch20 -p1 -b .prbool @@ -257,12 +250,6 @@ cd %{tarballdir} %patch200 -p2 -b .pk %patch204 -p2 -b .966424 -%patch205 -p1 - -# Upstream patches -%patch300 -p1 -b .1290037 -%patch301 -p1 -b .1329272 - %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -525,13 +512,10 @@ fi %doc %attr(644, root, root) %{mozappdir}/LICENSE %doc %attr(644, root, root) %{mozappdir}/README.xulrunner %{mozappdir}/chrome -%{mozappdir}/chrome.manifest %{mozappdir}/dictionaries %dir %{mozappdir}/components %ghost %{mozappdir}/components/compreg.dat %ghost %{mozappdir}/components/xpti.dat -%{mozappdir}/components/*.so -%{mozappdir}/components/*.manifest %{mozappdir}/omni.ja %{mozappdir}/*.so %ifarch %{ix86} x86_64 @@ -577,6 +561,9 @@ fi #--------------------------------------------------------------------- %changelog +* Wed Jun 14 2017 Jan Horak - 45.9.0-1 +- Update to 45.9.0 (esr) sources + * Sat Feb 11 2017 Fedora Release Engineering - 44.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 721e87200e850a0dd283cf05ce1769c5c0a8a6d8 Mon Sep 17 00:00:00 2001 From: Jan Horak Date: Wed, 14 Jun 2017 14:03:16 +0200 Subject: [PATCH 238/239] Fixed typo in release --- xulrunner.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xulrunner.spec b/xulrunner.spec index 68fea22..ebb1e37 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -78,7 +78,7 @@ Summary: XUL Runtime for Gecko Applications Name: xulrunner Version: 45.9.0 -Release: 10%?pre_tag}%{?dist} +Release: 10%{?pre_tag}%{?dist} URL: http://developer.mozilla.org/En/XULRunner License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet From 799473cddd907fb3b0036df8f436a51902bbfbf0 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Thu, 15 Jun 2017 14:29:34 +0200 Subject: [PATCH 239/239] This package is no longer supported by upstream --- .gitignore | 5 - aarch64-fix-skia.patch | 18 - build-stl-headers-fix-mbz1269171.patch | 169 ----- dead.package | 1 + firefox-build-prbool.patch | 11 - firefox-gcc-6.0.patch | 26 - mozilla-193-pkgconfig.patch | 32 - mozilla-639554.patch | 15 - mozilla-build-arm.patch | 23 - rhbz-1219542-s390-build.patch | 23 - rhbz-966424.patch | 14 - sources | 1 - xulrunner-24.0-jemalloc-ppc.patch | 12 - xulrunner-24.0-s390-inlines.patch | 12 - xulrunner-install-dir.patch | 12 - xulrunner-mozconfig | 44 -- xulrunner-redhat-default-prefs.js | 8 - xulrunner.sh.in | 69 -- xulrunner.spec | 883 ------------------------- 19 files changed, 1 insertion(+), 1377 deletions(-) delete mode 100644 .gitignore delete mode 100644 aarch64-fix-skia.patch delete mode 100644 build-stl-headers-fix-mbz1269171.patch create mode 100644 dead.package delete mode 100644 firefox-build-prbool.patch delete mode 100644 firefox-gcc-6.0.patch delete mode 100644 mozilla-193-pkgconfig.patch delete mode 100644 mozilla-639554.patch delete mode 100644 mozilla-build-arm.patch delete mode 100644 rhbz-1219542-s390-build.patch delete mode 100644 rhbz-966424.patch delete mode 100644 sources delete mode 100644 xulrunner-24.0-jemalloc-ppc.patch delete mode 100644 xulrunner-24.0-s390-inlines.patch delete mode 100644 xulrunner-install-dir.patch delete mode 100644 xulrunner-mozconfig delete mode 100644 xulrunner-redhat-default-prefs.js delete mode 100644 xulrunner.sh.in delete mode 100644 xulrunner.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 6f4d157..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/firefox-*.source.tar.bz2 -/xulrunner-*.source.tar.bz2 -/firefox-42.0.source.tar.xz -/firefox-44.0.source.tar.xz -/firefox-45.9.0esr.source.tar.xz diff --git a/aarch64-fix-skia.patch b/aarch64-fix-skia.patch deleted file mode 100644 index 17df80e..0000000 --- a/aarch64-fix-skia.patch +++ /dev/null @@ -1,18 +0,0 @@ -Based on https://github.com/google/skia/commit/b79ff56de23fef680ae7187040f2d6a9516b553d - -Index: mozilla-release/gfx/skia/trunk/src/core/SkUtilsArm.h -=================================================================== ---- mozilla-release/gfx/skia/skia/src/core/SkUtilsArm.h -+++ mozilla-release/gfx/skia/skia/src/core/SkUtilsArm.h -@@ -21,9 +21,9 @@ - #define SK_ARM_NEON_MODE_ALWAYS 1 - #define SK_ARM_NEON_MODE_DYNAMIC 2 - --#if defined(SK_CPU_ARM32) && defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT) -+#if defined(__ARM_HAVE_OPTIONAL_NEON_SUPPORT) - # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_DYNAMIC --#elif defined(SK_CPU_ARM32) && defined(__ARM_HAVE_NEON) || defined(SK_CPU_ARM64) -+#elif defined(__ARM_HAVE_NEON) - # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_ALWAYS - #else - # define SK_ARM_NEON_MODE SK_ARM_NEON_MODE_NONE diff --git a/build-stl-headers-fix-mbz1269171.patch b/build-stl-headers-fix-mbz1269171.patch deleted file mode 100644 index 7f9db14..0000000 --- a/build-stl-headers-fix-mbz1269171.patch +++ /dev/null @@ -1,169 +0,0 @@ -diff -up firefox-44.0/config/gcc-stl-wrapper.template.h.1269171 firefox-44.0/config/gcc-stl-wrapper.template.h ---- firefox-44.0/config/gcc-stl-wrapper.template.h.1269171 2017-06-01 12:06:24.481286748 +0200 -+++ firefox-44.0/config/gcc-stl-wrapper.template.h 2017-06-01 12:09:28.883022995 +0200 -@@ -17,24 +17,6 @@ - // Silence "warning: #include_next is a GCC extension" - #pragma GCC system_header - --// mozalloc.h wants ; break the cycle by always explicitly --// including here. NB: this is a tad sneaky. Sez the gcc docs: --// --// `#include_next' does not distinguish between and "file" --// inclusion, nor does it check that the file you specify has the --// same name as the current file. It simply looks for the file --// named, starting with the directory in the search path after the --// one where the current file was found. --#include_next -- --// See if we're in code that can use mozalloc. NB: this duplicates --// code in nscore.h because nscore.h pulls in prtypes.h, and chromium --// can't build with that being included before base/basictypes.h. --#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) --# include "mozilla/mozalloc.h" --#else --# error "STL code can only be used with infallible ::operator new()" --#endif - - #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) - // Enable checked iterators and other goodies -@@ -46,10 +28,34 @@ - // # define _GLIBCXX_DEBUG 1 - #endif - -+// Don't include mozalloc for cstdlib. See bug 1245076. -+#ifndef moz_dont_include_mozalloc_for_cstdlib -+# define moz_dont_include_mozalloc_for_cstdlib -+#endif -+ -+// Include mozalloc after the STL header and all other headers it includes -+// have been preprocessed. -+#if !defined(MOZ_INCLUDE_MOZALLOC_H) && \ -+ !defined(moz_dont_include_mozalloc_for_${HEADER}) -+# define MOZ_INCLUDE_MOZALLOC_H -+# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} -+#endif -+ - #pragma GCC visibility push(default) - #include_next <${HEADER}> - #pragma GCC visibility pop - -+#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} -+// See if we're in code that can use mozalloc. NB: this duplicates -+// code in nscore.h because nscore.h pulls in prtypes.h, and chromium -+// can't build with that being included before base/basictypes.h. -+# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) -+# include "mozilla/mozalloc.h" -+# else -+# error "STL code can only be used with infallible ::operator new()" -+# endif -+#endif -+ - // gcc calls a __throw_*() function from bits/functexcept.h when it - // wants to "throw an exception". functexcept exists nominally to - // support -fno-exceptions, but since we'll always use the system -diff -up firefox-44.0/config/make-stl-wrappers.py.1269171 firefox-44.0/config/make-stl-wrappers.py ---- firefox-44.0/config/make-stl-wrappers.py.1269171 2016-01-24 00:23:37.000000000 +0100 -+++ firefox-44.0/config/make-stl-wrappers.py 2017-06-01 12:06:24.482286747 +0200 -@@ -30,7 +30,6 @@ def main(outdir, compiler, template_file - os.mkdir(outdir) - - template = open(template_file, 'r').read() -- path_to_new = header_path('new', compiler) - - for header in open(header_list_file, 'r'): - header = header.rstrip() -@@ -40,8 +39,7 @@ def main(outdir, compiler, template_file - path = header_path(header, compiler) - with FileAvoidWrite(os.path.join(outdir, header)) as f: - f.write(string.Template(template).substitute(HEADER=header, -- HEADER_PATH=path, -- NEW_HEADER_PATH=path_to_new)) -+ HEADER_PATH=path)) - - - if __name__ == '__main__': -diff -up firefox-44.0/config/msvc-stl-wrapper.template.h.1269171 firefox-44.0/config/msvc-stl-wrapper.template.h ---- firefox-44.0/config/msvc-stl-wrapper.template.h.1269171 2016-01-24 00:23:37.000000000 +0100 -+++ firefox-44.0/config/msvc-stl-wrapper.template.h 2017-06-01 12:06:24.482286747 +0200 -@@ -8,35 +8,23 @@ - #ifndef mozilla_${HEADER}_h - #define mozilla_${HEADER}_h - --#ifndef MOZ_HAVE_INCLUDED_ALLOC --#define MOZ_HAVE_INCLUDED_ALLOC -- - #if _HAS_EXCEPTIONS - # error "STL code can only be used with -fno-exceptions" - #endif - -+// Include mozalloc after the STL header and all other headers it includes -+// have been preprocessed. -+#if !defined(MOZ_INCLUDE_MOZALLOC_H) -+# define MOZ_INCLUDE_MOZALLOC_H -+# define MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} -+#endif -+ - // Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k - // CRT doesn't export std::_Throw(). So we define it. - #ifndef mozilla_Throw_h - # include "mozilla/throw_msvc.h" - #endif - --// Code might include before other wrapped headers, but --// includes and so we want to wrap it. But mozalloc.h --// wants also, so we break the cycle by always explicitly --// including here. --#include <${NEW_HEADER_PATH}> -- --// See if we're in code that can use mozalloc. NB: this duplicates --// code in nscore.h because nscore.h pulls in prtypes.h, and chromium --// can't build with that being included before base/basictypes.h. --#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) --# include "mozilla/mozalloc.h" --#else --# error "STL code can only be used with infallible ::operator new()" --#endif --#endif /* MOZ_HAVE_INCLUDED_ALLOC */ -- - #ifdef _DEBUG - // From - // http://msdn.microsoft.com/en-us/library/aa985982%28VS.80%29.aspx -@@ -75,4 +63,15 @@ - - #pragma warning( pop ) - -+#ifdef MOZ_INCLUDE_MOZALLOC_H_FROM_${HEADER} -+// See if we're in code that can use mozalloc. NB: this duplicates -+// code in nscore.h because nscore.h pulls in prtypes.h, and chromium -+// can't build with that being included before base/basictypes.h. -+# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) -+# include "mozilla/mozalloc.h" -+# else -+# error "STL code can only be used with infallible ::operator new()" -+# endif -+#endif -+ - #endif // if mozilla_${HEADER}_h -diff -up firefox-44.0/memory/mozalloc/mozalloc.h.1269171 firefox-44.0/memory/mozalloc/mozalloc.h ---- firefox-44.0/memory/mozalloc/mozalloc.h.1269171 2016-01-24 00:23:44.000000000 +0100 -+++ firefox-44.0/memory/mozalloc/mozalloc.h 2017-06-01 12:06:24.482286747 +0200 -@@ -12,10 +12,17 @@ - * https://bugzilla.mozilla.org/show_bug.cgi?id=427099 - */ - --#include --#include - #if defined(__cplusplus) - # include -+// Since libstdc++ 6, including the C headers (e.g. stdlib.h) instead of the -+// corresponding C++ header (e.g. cstdlib) can cause confusion in C++ code -+// using things defined there. Specifically, with stdlib.h, the use of abs() -+// in gfx/graphite2/src/inc/UtfCodec.h somehow ends up picking the wrong abs() -+# include -+# include -+#else -+# include -+# include - #endif - - #if defined(__cplusplus) diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..3f37036 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +This package is no longer supported by upstream diff --git a/firefox-build-prbool.patch b/firefox-build-prbool.patch deleted file mode 100644 index c7424ea..0000000 --- a/firefox-build-prbool.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up mozilla-release/security/certverifier/OCSPCache.h.old mozilla-release/security/certverifier/OCSPCache.h ---- mozilla-release/security/certverifier/OCSPCache.h.old 2014-10-14 12:33:46.519970732 +0200 -+++ mozilla-release/security/certverifier/OCSPCache.h 2014-10-14 12:34:44.418000625 +0200 -@@ -25,6 +25,7 @@ - #ifndef mozilla_psm_OCSPCache_h - #define mozilla_psm_OCSPCache_h - -+#include "prtypes.h" - #include "hasht.h" - #include "mozilla/Mutex.h" - #include "mozilla/Vector.h" diff --git a/firefox-gcc-6.0.patch b/firefox-gcc-6.0.patch deleted file mode 100644 index 0a74d36..0000000 --- a/firefox-gcc-6.0.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up firefox-44.0/nsprpub/config/make-system-wrappers.pl.back firefox-44.0/nsprpub/config/make-system-wrappers.pl ---- firefox-44.0/nsprpub/config/make-system-wrappers.pl.back 2016-01-24 00:23:49.000000000 +0100 -+++ firefox-44.0/nsprpub/config/make-system-wrappers.pl 2016-02-02 14:58:45.064112655 +0100 -@@ -19,7 +19,9 @@ while () { - open OUT, ">$output_dir/$_"; - print OUT "#pragma GCC system_header\n"; # suppress include_next warning - print OUT "#pragma GCC visibility push(default)\n"; -+ print OUT "#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; - print OUT "#include_next \<$_\>\n"; -+ print OUT "#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS\n"; - print OUT "#pragma GCC visibility pop\n"; - close OUT; - } -diff -up firefox-44.0/mozglue/build/arm.cpp.old firefox-44.0/mozglue/build/arm.cpp ---- firefox-44.0/mozglue/build/arm.cpp.old 2016-02-03 10:07:29.879526500 +0100 -+++ firefox-44.0/mozglue/build/arm.cpp 2016-02-03 10:08:11.062697517 +0100 -@@ -104,7 +104,9 @@ check_neon(void) - - # elif defined(__linux__) || defined(ANDROID) - # include -+#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS - # include -+#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS - # include - - enum{ diff --git a/mozilla-193-pkgconfig.patch b/mozilla-193-pkgconfig.patch deleted file mode 100644 index 67ec302..0000000 --- a/mozilla-193-pkgconfig.patch +++ /dev/null @@ -1,32 +0,0 @@ -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)|" \ diff --git a/mozilla-639554.patch b/mozilla-639554.patch deleted file mode 100644 index 12d32b2..0000000 --- a/mozilla-639554.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- 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 diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch deleted file mode 100644 index 86e6f2e..0000000 --- a/mozilla-build-arm.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi ---- firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi.arm 2015-03-05 11:28:19.000000000 +0100 -+++ firefox-36.0.1/mozilla-release/media/webrtc/trunk/webrtc/build/common.gypi 2015-03-09 10:02:17.875243261 +0100 -@@ -235,19 +235,6 @@ - 'defines': [ - 'WEBRTC_ARCH_ARM', - ], -- 'conditions': [ -- ['arm_version==7', { -- 'defines': ['WEBRTC_ARCH_ARM_V7', -- 'WEBRTC_BUILD_NEON_LIBS'], -- 'conditions': [ -- ['arm_neon==1', { -- 'defines': ['WEBRTC_ARCH_ARM_NEON',], -- }, { -- 'defines': ['WEBRTC_DETECT_ARM_NEON',], -- }], -- ], -- }], -- ], - }], - ['os_bsd==1', { - 'defines': [ diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch deleted file mode 100644 index 3734ce5..0000000 --- a/rhbz-1219542-s390-build.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up firefox-43.0.3/js/src/configure.in.rhbz-1219542-s390 firefox-43.0.3/js/src/configure.in ---- firefox-43.0.3/js/src/configure.in.rhbz-1219542-s390 2015-12-23 17:11:01.000000000 -0500 -+++ firefox-43.0.3/js/src/configure.in 2016-01-03 08:08:27.139956990 -0500 -@@ -1466,7 +1466,7 @@ case "$host" in - - *-linux*|*-kfreebsd*-gnu|*-gnu*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" - ;; - - *) -@@ -1649,8 +1649,8 @@ ia64*-hpux*) - # while; Intel recommends against using it. - MOZ_OPTIMIZE_FLAGS="-O2" - elif test "$GNU_CC" -o "$GNU_CXX"; then -- MOZ_PGO_OPTIMIZE_FLAGS="-O3" -- MOZ_OPTIMIZE_FLAGS="-O3" -+ MOZ_PGO_OPTIMIZE_FLAGS="-O1" -+ MOZ_OPTIMIZE_FLAGS="-O1" - if test -z "$CLANG_CC"; then - MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" - fi diff --git a/rhbz-966424.patch b/rhbz-966424.patch deleted file mode 100644 index 7579d09..0000000 --- a/rhbz-966424.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm ---- firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm.966424 2014-10-14 08:12:14.358697255 +0200 -+++ firefox-33.0/mozilla-release/toolkit/modules/CertUtils.jsm 2014-10-14 08:17:59.962181908 +0200 -@@ -174,7 +174,9 @@ this.checkCert = - } - - function isBuiltinToken(tokenName) { -- return tokenName == "Builtin Object Token"; -+ return tokenName == "Builtin Object Token" || -+ tokenName == "Default Trust" || -+ tokenName == "System Trust"; - } - - /** diff --git a/sources b/sources deleted file mode 100644 index 799823c..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (firefox-45.9.0esr.source.tar.xz) = 2e4c1f8bca0c59ac93ab918b996e3b6cf25e7279ad5800de256aa220e670c6aaab2036c3ead4020b80e2a0e8cda3ae5fe9b270106646c625ce4fd6ecfd66d9ca diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch deleted file mode 100644 index fe404ca..0000000 --- a/xulrunner-24.0-jemalloc-ppc.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c ---- xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c.jemalloc-ppc 2013-09-11 01:15:18.000000000 +0200 -+++ xulrunner-24.0/mozilla-release/memory/mozjemalloc/jemalloc.c 2013-09-13 13:36:34.171680919 +0200 -@@ -1104,7 +1104,7 @@ static unsigned ncpus; - * controlling the malloc behavior are defined as compile-time constants - * for best performance and cannot be altered at runtime. - */ --#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) -+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !(defined(__powerpc__)) - #define MALLOC_STATIC_SIZES 1 - #endif - diff --git a/xulrunner-24.0-s390-inlines.patch b/xulrunner-24.0-s390-inlines.patch deleted file mode 100644 index 074f8d9..0000000 --- a/xulrunner-24.0-s390-inlines.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp ---- xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp.s390-inlines 2013-10-23 16:04:01.773093979 +0200 -+++ xulrunner-25.0/mozilla-release/js/src/vm/SPSProfiler.cpp 2013-10-23 16:04:44.551134551 +0200 -@@ -4,6 +4,8 @@ - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -+#include "jscntxtinlines.h" -+ - #include "vm/SPSProfiler.h" - - #include "mozilla/DebugOnly.h" diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch deleted file mode 100644 index 89d2972..0000000 --- a/xulrunner-install-dir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-45.9.0esr/config/baseconfig.mk.version-fix firefox-45.9.0esr/config/baseconfig.mk ---- firefox-45.9.0esr/config/baseconfig.mk.version-fix 2017-06-14 10:02:42.829306768 +0200 -+++ firefox-45.9.0esr/config/baseconfig.mk 2017-06-14 10:02:54.014302221 +0200 -@@ -4,7 +4,7 @@ - # whether a normal build is happening or whether the check is running. - includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) - sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) - ifeq (.,$(DEPTH)) - DIST = dist diff --git a/xulrunner-mozconfig b/xulrunner-mozconfig deleted file mode 100644 index 0dcf27d..0000000 --- a/xulrunner-mozconfig +++ /dev/null @@ -1,44 +0,0 @@ -. $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-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 --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 --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 --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-url-classifier -ac_add_options --enable-gio -ac_add_options --disable-gnomevfs -ac_add_options --disable-updater -ac_add_options --enable-chrome-format=omni -ac_add_options --disable-gstreamer -ac_add_options --enable-pulseaudio -ac_add_options --disable-skia - -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@/objdir diff --git a/xulrunner-redhat-default-prefs.js b/xulrunner-redhat-default-prefs.js deleted file mode 100644 index 15a1e2a..0000000 --- a/xulrunner-redhat-default-prefs.js +++ /dev/null @@ -1,8 +0,0 @@ -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); diff --git a/xulrunner.sh.in b/xulrunner.sh.in deleted file mode 100644 index 534b840..0000000 --- a/xulrunner.sh.in +++ /dev/null @@ -1,69 +0,0 @@ -#!/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 ]; then - if [ ! -x $SECONDARY_LIB_DIR/xulrunner/xulrunner ]; then - echo "Error: $XUL_LIB_DIR/xulrunner/xulrunner not found" - if [ -d $SECONDARY_LIB_DIR ]; then - echo " $SECONDARY_LIB_DIR/xulrunner/xulrunner not found" - fi - exit 1 - fi - XUL_LIB_DIR="$SECONDARY_LIB_DIR" -fi -XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner" -XUL_PROGRAM="$XUL_DIST_BIN/xulrunner" - -## -## Enable WebGL -## -MOZ_GLX_IGNORE_BLACKLIST=1 -export MOZ_GLX_IGNORE_BLACKLIST - - -exec $XUL_PROGRAM "$@" diff --git a/xulrunner.spec b/xulrunner.spec deleted file mode 100644 index ebb1e37..0000000 --- a/xulrunner.spec +++ /dev/null @@ -1,883 +0,0 @@ -# Use system nspr/nss? -%define system_nss 1 - -# Use system sqlite? -%if 0%{?fedora} < 20 -%define system_sqlite 0 -%define system_ffi 0 -%else -%define system_sqlite 1 -%define system_ffi 1 -%endif - -# Use system cairo? -%define system_cairo 0 - -# Build as a debug package? -%define debug_build 0 - -# Minimal required versions -%global cairo_version 1.10.2 -%global freetype_version 2.1.9 -%global libnotify_version 0.7.0 -%global libvpx_version 1.0.0 - -%if %{?system_nss} -%global nspr_version 4.10.10 -%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) -%global nss_version 3.27 -%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) -%endif - -%if %{?system_sqlite} -%global sqlite_version 3.8.4.2 -# The actual sqlite version (see #480989): -%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) -%endif - -# gecko_dir_ver should be set to the version in our directory names -# alpha_version should be set to the alpha number if using an alpha, 0 otherwise -# beta_version should be set to the beta number if using a beta, 0 otherwise -# rc_version should be set to the RC number if using an RC, 0 otherwise -%global gecko_dir_ver %{version} -%global alpha_version 0 -%global beta_version 0 -%global rc_version 0 - -%global tarballname firefox -%global mozappdir %{_libdir}/%{name} -%global tarballdir %{tarballname}-%{version}esr - -# crash reporter work only on x86/x86_64 -%ifarch %{ix86} x86_64 -%global enable_mozilla_crashreporter 1 -%else -%global enable_mozilla_crashreporter 0 -%endif - -%if %{alpha_version} > 0 -%global pre_version a%{alpha_version} -%global tarballdir mozilla-beta -%endif -%if %{beta_version} > 0 -%global pre_version b%{beta_version} -%global tarballdir mozilla-beta -%endif -%if %{rc_version} > 0 -%global pre_version rc%{rc_version} -%global tarballdir mozilla-release -%endif - -%if %{defined pre_version} -%global gecko_verrel %{expand:%%{version}}-%{pre_version} -%global pre_tag .%{pre_version} -%else -%global gecko_verrel %{expand:%%{version}} -%endif - -Summary: XUL Runtime for Gecko Applications -Name: xulrunner -Version: 45.9.0 -Release: 10%{?pre_tag}%{?dist} -URL: http://developer.mozilla.org/En/XULRunner -License: MPLv1.1 or GPLv2+ or LGPLv2+ -Group: Applications/Internet -Source0: ftp://ftp.mozilla.org/pub/%{tarballname}/releases/%{version}%{?pre_version}/source/%{tarballname}-%{version}%{?pre_version}esr.source.tar.xz -Source10: %{name}-mozconfig -Source12: %{name}-redhat-default-prefs.js -Source21: %{name}.sh.in - -# build patches -Patch1: xulrunner-install-dir.patch -Patch3: mozilla-build-arm.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 -Patch18: xulrunner-24.0-jemalloc-ppc.patch -# workaround linking issue on s390 (JSContext::updateMallocCounter(size_t) not found) -Patch19: xulrunner-24.0-s390-inlines.patch -Patch20: firefox-build-prbool.patch -Patch21: aarch64-fix-skia.patch -Patch24: rhbz-1219542-s390-build.patch -Patch25: firefox-gcc-6.0.patch -Patch26: build-stl-headers-fix-mbz1269171.patch - -# Fedora specific patches -Patch200: mozilla-193-pkgconfig.patch -# Unable to install addons from https pages -Patch204: rhbz-966424.patch - -# Upstream patches - -# --------------------------------------------------- - -%if %{?system_nss} -BuildRequires: nspr-devel >= %{nspr_version} -BuildRequires: nss-devel >= %{nss_version} -BuildRequires: nss-static >= %{nss_version} -%endif -%if %{?system_cairo} -BuildRequires: cairo-devel >= %{cairo_version} -%endif -BuildRequires: libpng-devel -BuildRequires: libjpeg-devel -BuildRequires: zip -BuildRequires: bzip2-devel -BuildRequires: zlib-devel -BuildRequires: libIDL-devel -BuildRequires: gtk2-devel -BuildRequires: krb5-devel -BuildRequires: pango-devel -BuildRequires: freetype-devel >= %{freetype_version} -BuildRequires: libXt-devel -BuildRequires: libXrender-devel -BuildRequires: hunspell-devel -BuildRequires: startup-notification-devel -BuildRequires: alsa-lib-devel -BuildRequires: libnotify-devel >= %{libnotify_version} -BuildRequires: mesa-libGL-devel -BuildRequires: libcurl-devel -BuildRequires: libvpx-devel >= %{libvpx_version} -BuildRequires: autoconf213 -BuildRequires: pulseaudio-libs-devel -BuildRequires: pkgconfig(gconf-2.0) -BuildRequires: yasm -BuildRequires: dbus-glib-devel - -Requires: mozilla-filesystem -%if %{?system_nss} -Requires: nspr >= %{nspr_build_version} -Requires: nss >= %{nss_build_version} -%endif -Provides: gecko-libs = %{gecko_verrel} -Provides: gecko-libs%{?_isa} = %{gecko_verrel} -Conflicts: firefox < 3.6 - -%if %{?system_sqlite} -BuildRequires: sqlite-devel >= %{sqlite_version} -Requires: sqlite >= %{sqlite_build_version} -%endif - -%if %{?system_ffi} -BuildRequires: libffi-devel -%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 provides mechanisms -for installing, upgrading, and uninstalling these applications. XULRunner also -provides libxul, a solution which allows the embedding of Mozilla technologies -in other projects and products. - -%package devel -Summary: Development files for Gecko -Group: Development/Libraries -Obsoletes: mozilla-devel < 1.9 -Obsoletes: firefox-devel < 2.1 -Obsoletes: xulrunner-devel-unstable -Provides: gecko-devel = %{gecko_verrel} -Provides: gecko-devel%{?_isa} = %{gecko_verrel} -Provides: gecko-devel-unstable = %{gecko_verrel} -Provides: gecko-devel-unstable%{?_isa} = %{gecko_verrel} - -Requires: xulrunner = %{version}-%{release} -%if %{?system_nss} -Requires: nspr-devel >= %{nspr_build_version} -Requires: nss-devel >= %{nss_build_version} -%endif -%if %{?system_cairo} -Requires: cairo-devel >= %{cairo_version} -%endif -Requires: libjpeg-devel -Requires: zip -Requires: bzip2-devel -Requires: zlib-devel -Requires: libIDL-devel -Requires: gtk2-devel -Requires: krb5-devel -Requires: pango-devel -Requires: freetype-devel >= %{freetype_version} -Requires: libXt-devel -Requires: libXrender-devel -Requires: hunspell-devel -%if %{?system_sqlite} -Requires: sqlite-devel -%endif -Requires: startup-notification-devel -Requires: alsa-lib-devel -Requires: libnotify-devel -Requires: mesa-libGL-devel -Requires: libvpx-devel >= %{libvpx_version} - -%description devel -This package contains the libraries amd header files that are needed -for writing XUL+XPCOM applications with Mozilla XULRunner and Gecko. - -%if %{enable_mozilla_crashreporter} -%global moz_debug_prefix %{_prefix}/lib/debug -%global moz_debug_dir %{moz_debug_prefix}%{mozappdir} -%global uname_m %(uname -m) -%global symbols_file_name %{name}-%{version}.en-US.%{_os}-%{uname_m}.crashreporter-symbols.zip -%global symbols_file_path %{moz_debug_dir}/%{symbols_file_name} -%global _find_debuginfo_opts -p %{symbols_file_path} -o debugcrashreporter.list -%global crashreporter_pkg_name mozilla-crashreporter-%{name}-debuginfo -%package -n %{crashreporter_pkg_name} -Summary: Debugging symbols used by Mozilla's crash reporter servers -Group: Development/Debug -%description -n %{crashreporter_pkg_name} -This package provides debug information for XULRunner, for use by -Mozilla's crash reporter servers. If you are trying to locally -debug %{name}, you want to install %{name}-debuginfo instead. -%files -n %{crashreporter_pkg_name} -f debugcrashreporter.list -%defattr(-,root,root) -%endif - -#--------------------------------------------------------------------- - -%prep -%setup -q -c -cd %{tarballdir} - -%patch1 -p1 -#%patch3 -p2 -b .arm -%patch18 -p2 -b .jemalloc-ppc -%patch19 -p2 -b .s390-inlines -%patch20 -p1 -b .prbool -%patch21 -p1 -b .aarch64-fix-skia -%ifarch s390 -%patch24 -p1 -b .rhbz-1219542-s390 -%endif -%patch25 -p1 -b .gcc6 -%patch26 -p1 -b .1269171 - -%patch200 -p2 -b .pk -%patch204 -p2 -b .966424 - -%{__rm} -f .mozconfig -%{__cp} %{SOURCE10} .mozconfig - -%if %{?system_nss} -echo "ac_add_options --with-system-nspr" >> .mozconfig -echo "ac_add_options --with-system-nss" >> .mozconfig -%else -echo "ac_add_options --without-system-nspr" >> .mozconfig -echo "ac_add_options --without-system-nss" >> .mozconfig -%endif - -%if %{?system_sqlite} -echo "ac_add_options --enable-system-sqlite" >> .mozconfig -%else -echo "ac_add_options --disable-system-sqlite" >> .mozconfig -%endif - -%if %{?system_cairo} -echo "ac_add_options --enable-system-cairo" >> .mozconfig -%else -echo "ac_add_options --disable-system-cairo" >> .mozconfig -%endif - -%if %{?system_ffi} -echo "ac_add_options --enable-system-ffi" >> .mozconfig -%endif - - -%if %{?debug_build} -echo "ac_add_options --enable-debug" >> .mozconfig -echo "ac_add_options --disable-optimize" >> .mozconfig -%else -echo "ac_add_options --disable-debug" >> .mozconfig -%ifarch ppc64le aarch64 -echo 'ac_add_options --enable-optimize="-g -O2"' >> .mozconfig -%else -echo "ac_add_options --enable-optimize" >> .mozconfig -%endif -%endif - -# s390(x) fails to start with jemalloc enabled -%ifarch s390 s390x -echo "ac_add_options --disable-jemalloc" >> .mozconfig -%endif - -%ifarch armv7hl -echo "ac_add_options --with-arch=armv7-a" >> .mozconfig -echo "ac_add_options --with-float-abi=hard" >> .mozconfig -echo "ac_add_options --with-fpu=vfpv3-d16" >> .mozconfig -echo "ac_add_options --disable-elf-hack" >> .mozconfig -%endif -%ifarch armv7hnl -echo "ac_add_options --with-arch=armv7-a" >> .mozconfig -echo "ac_add_options --with-float-abi=hard" >> .mozconfig -echo "ac_add_options --with-fpu=neon" >> .mozconfig -echo "ac_add_options --disable-elf-hack" >> .mozconfig -%endif -%ifarch armv5tel -echo "ac_add_options --with-arch=armv5te" >> .mozconfig -echo "ac_add_options --with-float-abi=soft" >> .mozconfig -echo "ac_add_options --disable-elf-hack" >> .mozconfig -echo "ac_add_options --disable-ion" >> .mozconfig -echo "ac_add_options --disable-yarr-jit" >> .mozconfig -%endif - -#Workarounf for mozbz#1245783 -%if 0%{?fedora} > 23 -echo "ac_add_options --disable-ion" >> .mozconfig -%endif - -%ifnarch %{ix86} x86_64 -echo "ac_add_options --disable-webrtc" >> .mozconfig -%endif - -#--------------------------------------------------------------------- - -%build -%if %{?system_sqlite} -# Do not proceed with build if the sqlite require would be broken: -# make sure the minimum requirement is non-empty, ... -sqlite_version=$(expr "%{sqlite_version}" : '\([0-9]*\.\)[0-9]*\.') || exit 1 -# ... and that major number of the computed build-time version matches: -case "%{sqlite_build_version}" in - "$sqlite_version"*) ;; - *) exit 1 ;; -esac -%endif - -cd %{tarballdir} - -# Update the various config.guess to upstream release for aarch64 support -find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' - -# -fpermissive is needed to build with gcc 4.6+ which has become stricter -# -# Mozilla builds with -Wall with exception of a few warnings which show up -# everywhere in the code; so, don't override that. -# -# Disable C++ exceptions since Mozilla code is not exception-safe -# -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-Wall//') -%if %{?debug_build} -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') -%endif -%ifarch s390 -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') -# If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which -# overrides the -g1 from line above and breaks building on s390 -# (OOM when linking, rhbz#1238225) -export MOZ_DEBUG_FLAGS=" " -%endif -%ifarch s390 %{arm} ppc aarch64 -MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" -%endif - -#rhbz#1037063 -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" - -export CFLAGS="$MOZ_OPT_FLAGS" -export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" -export LDFLAGS=$MOZ_LINK_FLAGS - -export PREFIX='%{_prefix}' -export LIBDIR='%{_libdir}' - -MOZ_SMP_FLAGS=-j1 -# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel, -# however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 %{arm} -[ -z "$RPM_BUILD_NCPUS" ] && \ - RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" -[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 -[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 -[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 -%endif - -make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" - -# create debuginfo for crash-stats.mozilla.com -%if %{enable_mozilla_crashreporter} -#cd %{moz_objdir} -make -C objdir buildsymbols -%endif - -#--------------------------------------------------------------------- - -%install -cd %{tarballdir} - -# set up our prefs before install, so it gets pulled in to omni.jar -%{__cp} -p %{SOURCE12} objdir/dist/bin/defaults/pref/all-redhat.js - -DESTDIR=$RPM_BUILD_ROOT make -C objdir install - -# Start script install -%{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/%{name} -%{__cat} %{SOURCE21} | %{__sed} -e 's,XULRUNNER_VERSION,%{gecko_dir_ver},g' > \ - $RPM_BUILD_ROOT%{_bindir}/%{name} -%{__chmod} 755 $RPM_BUILD_ROOT%{_bindir}/%{name} - -%{__rm} -f $RPM_BUILD_ROOT%{mozappdir}/%{name}-config - -# install install_app.py -%{__cp} objdir/dist/bin/install_app.py $RPM_BUILD_ROOT%{mozappdir} - -# Copy pc files (for compatibility with 1.9.1) -%{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul.pc \ - $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-unstable.pc -%{__cp} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding.pc \ - $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libxul-embedding-unstable.pc - -# Fix multilib devel conflicts... -function install_file() { -genheader=$* -mv ${genheader}.h ${genheader}%{__isa_bits}.h -cat > ${genheader}.h << EOF -/* This file exists to fix multilib conflicts */ -#if defined(__x86_64__) || defined(__ia64__) || defined(__s390x__) || defined(__powerpc64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__aarch64__) -#include "${genheader}64.h" -#else -#include "${genheader}32.h" -#endif -EOF -} - -INTERNAL_APP_NAME=%{name}-%{gecko_dir_ver} - -pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} -install_file "mozilla-config" -install_file "js-config" -popd - -# Link libraries in sdk directory instead of copying them: -pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/lib -for i in *.so; do - rm $i - ln -s %{mozappdir}/$i $i -done -popd - -# Move sdk/bin to xulrunner libdir -pushd $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin -mv ply *.py $RPM_BUILD_ROOT%{mozappdir} -popd -rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}-devel-%{gecko_dir_ver}/sdk/bin - -# Library path -LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d -LD_CONF_FILE=xulrunner-%{__isa_bits}.conf - -%{__mkdir_p} ${RPM_BUILD_ROOT}${LD_SO_CONF_D} -%{__cat} > ${RPM_BUILD_ROOT}${LD_SO_CONF_D}/${LD_CONF_FILE} << EOF -%{mozappdir} -EOF - -# Copy over the LICENSE -%{__install} -p -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir} - -# Install xpcshell -%{__cp} objdir/dist/bin/xpcshell $RPM_BUILD_ROOT/%{mozappdir} - -# Install run-mozilla.sh -%{__cp} objdir/dist/bin/run-mozilla.sh $RPM_BUILD_ROOT/%{mozappdir} - -# Use the system hunspell dictionaries -%{__rm} -rf ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries -ln -s %{_datadir}/myspell ${RPM_BUILD_ROOT}%{mozappdir}/dictionaries - -# Remove tmp files -find $RPM_BUILD_ROOT/%{mozappdir} -name '.mkdir.done' -exec rm -rf {} \; - -# ghost files -%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components -touch $RPM_BUILD_ROOT%{mozappdir}/components/compreg.dat -touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat - -# Add debuginfo for crash-stats.mozilla.com -%if %{enable_mozilla_crashreporter} -%{__mkdir_p} $RPM_BUILD_ROOT/%{moz_debug_dir} -%{__cp} objdir/dist/%{symbols_file_name} $RPM_BUILD_ROOT/%{moz_debug_dir} -%endif - -#--------------------------------------------------------------------- - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - -%preun -# is it a final removal? -if [ $1 -eq 0 ]; then - %{__rm} -rf %{mozappdir}/components -fi - -%files -%defattr(-,root,root,-) -%{_bindir}/xulrunner -%dir %{mozappdir} -%doc %attr(644, root, root) %{mozappdir}/LICENSE -%doc %attr(644, root, root) %{mozappdir}/README.xulrunner -%{mozappdir}/chrome -%{mozappdir}/dictionaries -%dir %{mozappdir}/components -%ghost %{mozappdir}/components/compreg.dat -%ghost %{mozappdir}/components/xpti.dat -%{mozappdir}/omni.ja -%{mozappdir}/*.so -%ifarch %{ix86} x86_64 -%{mozappdir}/rapl -%endif -%{mozappdir}/run-mozilla.sh -%{mozappdir}/xulrunner -%{mozappdir}/xulrunner-stub -%{mozappdir}/platform.ini -%{mozappdir}/dependentlibs.list -%{_sysconfdir}/ld.so.conf.d/xulrunner*.conf -%{mozappdir}/plugin-container -%{mozappdir}/gmp-clearkey -%if !%{?system_nss} -%{mozappdir}/*.chk -%endif -%if %{enable_mozilla_crashreporter} -%{mozappdir}/crashreporter -%{mozappdir}/crashreporter.ini -%{mozappdir}/Throbber-small.gif -%endif -%{mozappdir}/install_app.py -%ghost %{mozappdir}/install_app.pyc -%ghost %{mozappdir}/install_app.pyo -%{mozappdir}/gmp-fake*/* - -%files devel -%defattr(-,root,root,-) -%dir %{_libdir}/%{name}-devel-* -%{_datadir}/idl/%{name}*%{gecko_dir_ver} -%{_includedir}/%{name}*%{gecko_dir_ver} -%{_libdir}/%{name}-devel-*/* -%{_libdir}/pkgconfig/*.pc -%{mozappdir}/xpcshell -%{mozappdir}/*.py -%ghost %{mozappdir}/*.pyc -%ghost %{mozappdir}/*.pyo -%dir %{mozappdir}/ply -%{mozappdir}/ply/*.py -%ghost %{mozappdir}/ply/*.pyc -%ghost %{mozappdir}/ply/*.pyo - -#--------------------------------------------------------------------- - -%changelog -* Wed Jun 14 2017 Jan Horak - 45.9.0-1 -- Update to 45.9.0 (esr) sources - -* Sat Feb 11 2017 Fedora Release Engineering - 44.0-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Jan 20 2017 Martin Stransky - 44.0-9 -- Added fix for new nss 3.28.1 (mozbz#1290037) - -* Thu Dec 15 2016 Martin Stransky - 44.0-8 -- Rebuilt - -* Fri Jul 22 2016 Tom Callaway - 44.0-7 -- rebuild for libvpx 1.6.0 - -* Wed Apr 27 2016 Peter Robinson 44.0-6 -- Added fix for rhbz#1315225 - ppc64le/aarch64 build fixes - -* Wed Mar 02 2016 Marcin Juszkiewicz - 44.0-5 -- Fix WebRTC on AArch64 again. - -* Mon Feb 15 2016 Martin Stransky - 44.0-4 -- gcc 6 build fix - -* Fri Feb 05 2016 Fedora Release Engineering - 44.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Tue Jan 26 2016 Martin Stransky - 44.0-1 -- Update to 44.0 - -* Tue Dec 1 2015 Tom Callaway - 42.0-2 -- rebuild for libvpx 1.5.0 - -* Tue Dec 1 2015 Martin Stransky - 42.0-1 -- Update to 42.0 - -* Wed Sep 2 2015 Martin Stransky - 40.0-2 -- Disable Skia to build on second arches - -* Tue Aug 25 2015 Petr Jasicek - 40.0-1 -- Update to 40.0 - -* Wed Jul 22 2015 Petr Jasicek - 39.0-3 -- Removed unneeded patch files - -* Tue Jul 14 2015 Marcin Juszkiewicz - 39.0-2 -- fixed build - - dropped firefox-nss-3.18.0.patch as we have 3.19.2 available - - refreshed mozilla-1005535.patch patch to apply - -* Fri Jul 10 2015 Martin Stransky - 39.0-1 -- Update to 39.0 - -* Fri Jun 19 2015 Fedora Release Engineering - 38.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu May 7 2015 Martin Stransky - 38.0-1 -- Update to 38.0 Build 2 - -* Mon Apr 27 2015 Jan Horak - 37.0.2-2 -- Added patch for big endian arches - -* Thu Apr 16 2015 Jan Horak - 37.0.2-1 -- Update to 37.0.2 - -* Wed Apr 15 2015 Martin Stransky - 37.0.1-1 -- Update to 37.0.1 - -* Mon Apr 6 2015 Tom Callaway - 33.0-3 -- rebuild for libvpx 1.4.0 - -* Wed Oct 22 2014 Dan Horák - 33.0-2 -- Fix filelist for secondary arches - -* Thu Oct 16 2014 Martin Stransky - 33.0-1 -- Update to 33.0 - -* Sat Sep 20 2014 Peter Robinson 32.0.2-1 -- Update to 32.0.2 -- sync fixes to the same as firefox - -* Tue Sep 9 2014 Martin Stransky - 32.0-2 -- move /sdk/bin to xulrunner libdir - -* Tue Aug 26 2014 Martin Stransky - 32.0-1 -- Update to 32.0 build 1 - -* Mon Aug 18 2014 Fedora Release Engineering - 31.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Fri Jul 25 2014 Martin Stransky - 31.0-1 -- Update to 31.0 build 2 - -* Fri Jul 25 2014 Yaakov Selkowitz - 30.0-3 -- Fix mozilla-config.h wrapper on aarch64 - -* Sun Jun 08 2014 Fedora Release Engineering - 30.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Jun 5 2014 Martin Stransky - 30.0-1 -- Update to 30.0 build 1 -- Disabled shared js - -* Fri May 23 2014 Martin Stransky - 29.0-5 -- Added a build fix for ppc64 - rhbz#1100495 - -* Thu May 15 2014 Peter Robinson 29.0-4 -- Update aarch64 bits - -* Thu May 15 2014 Peter Robinson 29.0-3 -- Add upstream patches for aarch64 support - -* Mon Apr 28 2014 Martin Stransky - 29.0-2 -- An updated ppc64le patch (rhbz#1091054) - -* Mon Apr 28 2014 Martin Stransky - 29.0-1 -- Update to 29.0 - -* Tue Mar 18 2014 Martin Stransky - 28.0-1 -- Update to 28.0 -- Fixed arm patch - -* Mon Feb 3 2014 Martin Stransky - 27.0-1 -- Update to 27.0 - -* Fri Dec 13 2013 Martin Stransky - 26.0-2 -- rhbz#1037406 - xulrunner FTBFS if "-Werror=format-security" - flag is used - -* Mon Dec 9 2013 Martin Stransky - 26.0-1 -- Update to 26.0 Build 2 - -* Thu Nov 21 2013 Martin Stransky - 25.0-5 -- Fixed rhbz#1007603 - NSS and cert9 (sql): firefox crash on exit - with https-everywhere installed - -* Tue Nov 12 2013 Martin Stransky - 25.0-4 -- rhbz#1010916 - enabled pluseaudio backend - -* Fri Nov 8 2013 Martin Stransky - 25.0-3 -- Fixed rhbz#974718 - Segfault in FileBlockCache::Run - when playing a movie on ppc - -* Wed Oct 30 2013 Martin Stransky - 25.0-2 -- Update to 25.0 Build 3 - -* Wed Oct 23 2013 Martin Stransky - 25.0-1 -- Update to 25.0 Build 2 - -* Tue Oct 15 2013 Karsten Hopp 24.0-3 -- drop PPC-only rhbz-911314.patch, fixed upstream - -* Mon Sep 16 2013 Martin Stransky - 24.0.1-2 -- Arm build fix - -* Fri Sep 13 2013 Martin Stransky - 24.0.1-1 -- Update to 24.0 - -* Mon Sep 2 2013 Dan Horák - 23.0.1-4 -- Fix build on 64-bit big endian platforms (mozbz#618485) - -* Sat Aug 31 2013 Karsten Hopp 23.0.1-3 -- update rhbz-911314.patch (PPC* only) - -* Thu Aug 29 2013 Martin Stransky - 23.0.1-2 -- Enabled dtrace for debug builds - -* Mon Aug 19 2013 Jan Horak - 23.0.1-1 -- Update to 23.0.1 - -* Mon Aug 5 2013 Martin Stransky - 23.0-2 -- Update to latest upstream (23.0 Build 2) - -* Mon Aug 5 2013 Martin Stransky - 23.0-1 -- Update to latest upstream (23.0) - -* Mon Jul 29 2013 Jan Horak - 22.0-7 -- Use system libffi for Fedora 19+ -- Added fix for mozbz#860213 - -* Thu Jul 25 2013 Martin Stransky - 22.0-6 -- Removed already applied patches (rhbz#978123) - -* Wed Jul 24 2013 Peter Robinson 22.0-5 -- Enable web-rtc on ARM now it's fixed upstream (RHBZ 886976) - -* Mon Jul 1 2013 Jan Horak - 22.0-4 -- Added fix from mozbz#817533 - fix issues with proxy settings -- Fixed missing about:healthreport - -* Mon Jun 24 2013 Martin Stransky - 22.0-2 -- Rebuild - -* Fri Jun 21 2013 Martin Stransky - 22.0-1 -- Update to latest upstream (22.0) - -* Wed Jun 12 2013 Jan Horak - 21.0-8 -- Fixed rhbz#966424 - unable to install addons - -* Mon Jun 3 2013 Jan Horak - 21.0-7 -- Using upstream build flags for crashreporter - -* Wed May 29 2013 Martin Stransky - 21.0-6 -- Removed the i686/f19 gcc hack (rhbz#928353) - -* Tue May 21 2013 Martin Stransky - 21.0-5 -- Added ppc(64) patches (rhbz#963907) - -* Tue May 21 2013 Martin Stransky - 21.0-4 -- Added s390(x) patch - -* Mon May 13 2013 Martin Stransky - 21.0-3 -- New upstream tarball (build 4) - -* Mon May 13 2013 Martin Stransky - 21.0-2 -- Updated requested NSS/NSPR versions - -* Sun May 12 2013 Martin Stransky - 21.0-1 -- Update to latest upstream (21.0) - -* Fri Apr 5 2013 Martin Stransky - 20.0-4 -- Updated rhbz-911314.patch for xulrunner 20 - -* Wed Apr 3 2013 Martin Stransky - 20.0-3 -- A workaround for Bug 928353 - firefox i686 crashes - for a number of web pages - -* Tue Mar 19 2013 Martin Stransky - 20.0-1 -- Update to latest upstream (20.0) - -* Tue Mar 19 2013 Martin Stransky - 19.0.2-4 -- Added fix for rhbz#913284 - Firefox segfaults - in mozilla::gfx::AlphaBoxBlur::BoxBlur_C() on PPC64 - -* Tue Mar 19 2013 Martin Stransky - 19.0.2-3 -- Added fix for mozbz#826171/rhbz#922904 - strndup implementation - in memory/build/mozmemory_wrap.c is broken - -* Mon Mar 11 2013 Martin Stransky - 19.0.2-2 -- Update to 19.0.2 - -* Wed Feb 20 2013 Martin Stransky - 19.0-2 -- Added fix for rhbz#911314 (ppc only) - -* Mon Feb 18 2013 Martin Stransky - 19.0-1 -- Update to 19.0 -- Added fix for mozbz#239254 - -* Wed Feb 6 2013 Jan Horak - 18.0.2-1 -- Update to 18.0.2 - -* Fri Jan 25 2013 Jan Horak - 18.0.1-1 -- Update to 18.0.1 - -* Tue Jan 15 2013 Martin Stransky - 18.0-8 -- Added fix for NM regression (mozbz#791626) - -* Thu Jan 10 2013 Martin Stransky - 18.0-7 -- Fixed Makefile generator (rhbz#304121) - -* Wed Jan 9 2013 Martin Stransky - 18.0-6 -- Fixed missing libxpcom.so provides - -* Wed Jan 9 2013 Martin Stransky - 18.0-5 -- Added fix for langpacks - -* Wed Jan 9 2013 Martin Stransky - 18.0-4 -- Fixed source files -- Disabled WebRTC due to rhbz#304121 - -* Wed Jan 9 2013 Martin Stransky - 18.0-2 -- Disabled system sqlite on Fedora 18 - -* Mon Jan 7 2013 Martin Stransky - 18.0-1 -- Update to 18.0 - -* Thu Dec 13 2012 Peter Robinson 17.0.1-3 -- Disable webrtc on ARM as it currently tries to build SSE on ARM (fix FTBFS) -- Enable methodjit/tracejit on ARMv7 for more speed :) Fixes RHBZ 870548 - -* Fri Dec 7 2012 Jan Horak - 17.0.1-2 -- Fixed rhbz#879595 - -* Thu Nov 29 2012 Jan Horak - 17.0.1-1 -- Update to 17.0.1 - -* Tue Nov 27 2012 Jan Horak - 17.0-4 -- Rebuild agains older NSS - -* Mon Nov 19 2012 Martin Stransky - 17.0-3 -- Updated second arch patches - -* Mon Nov 19 2012 Dan Horák - 17.0-2 -- webrtc is available only on selected arches - -* Mon Nov 19 2012 Martin Stransky - 17.0-1 -- Update to 17.0 - -* Wed Nov 14 2012 Martin Stransky - 17.0-0.2b6 -- Update to 17.0 Beta 6 - -* Tue Nov 13 2012 Martin Stransky - 17.0-0.1b5 -- Update to 17.0 Beta 5 - -* Tue Nov 6 2012 Martin Stransky - 16.0.2-2 -- Added fix for rhbz#872752 - -* Wed Oct 31 2012 Martin Stransky - 16.0.2-1 -- Updated mozilla-746112.patch for second arches -- Removed unused one (rhbz#855919) - -* Fri Oct 26 2012 Jan Horak - 16.0.2-1 -- Update to 16.0.2 - -* Tue Oct 16 2012 Jan Horak - 16.0.1-2 -- Fixed required nss and nspr version - -* Thu Oct 11 2012 Martin Stransky - 16.0.1-1 -- Update to 16.0.1 -