aboutsummaryrefslogtreecommitdiffstats
path: root/www/firefox-esr
diff options
context:
space:
mode:
authorflo <flo@FreeBSD.org>2013-01-11 06:29:23 +0800
committerflo <flo@FreeBSD.org>2013-01-11 06:29:23 +0800
commitb147be0d11dbfcd15be435b9e0d3dfc630c216e9 (patch)
treedd14b47bf2d53036668a1976cb68d74952705242 /www/firefox-esr
parentabaa47ae639fd233614733df20c4cfe5a393ef19 (diff)
downloadfreebsd-ports-gnome-b147be0d11dbfcd15be435b9e0d3dfc630c216e9.tar.gz
freebsd-ports-gnome-b147be0d11dbfcd15be435b9e0d3dfc630c216e9.tar.zst
freebsd-ports-gnome-b147be0d11dbfcd15be435b9e0d3dfc630c216e9.zip
- update www/firefox to 18.0
- update www/firefox-esr to 17.0.2 - update www/seamonkey to 2.15 (enigmail to 1.5.0) - remove QT4 option to avoid confusion (it turned out to be too experimental) In collaboration with: Jan Beich <jbeich@tormail.org> Security: http://www.vuxml.org/freebsd/a4ed6632-5aa9-11e2-8fcb-c8600054b392.html
Diffstat (limited to 'www/firefox-esr')
-rw-r--r--www/firefox-esr/Makefile22
-rw-r--r--www/firefox-esr/distinfo4
-rw-r--r--www/firefox-esr/files/extra-bug78053113
-rw-r--r--www/firefox-esr/files/patch-alsapulse117
-rw-r--r--www/firefox-esr/files/patch-bug65355129
-rw-r--r--www/firefox-esr/files/patch-bug691898285
-rw-r--r--www/firefox-esr/files/patch-bug69603034
-rw-r--r--www/firefox-esr/files/patch-bug71431273
-rw-r--r--www/firefox-esr/files/patch-bug72297561
-rw-r--r--www/firefox-esr/files/patch-bug72565553
-rw-r--r--www/firefox-esr/files/patch-bug72896850
-rw-r--r--www/firefox-esr/files/patch-bug72915518
-rw-r--r--www/firefox-esr/files/patch-bug73234013
-rw-r--r--www/firefox-esr/files/patch-bug74173790
-rw-r--r--www/firefox-esr/files/patch-bug753046187
-rw-r--r--www/firefox-esr/files/patch-bug76107788
-rw-r--r--www/firefox-esr/files/patch-bug77805621
-rw-r--r--www/firefox-esr/files/patch-bug77807814
-rw-r--r--www/firefox-esr/files/patch-bug77984728
-rw-r--r--www/firefox-esr/files/patch-bug7814574
-rw-r--r--www/firefox-esr/files/patch-bug78346334
-rw-r--r--www/firefox-esr/files/patch-bug78463152
-rw-r--r--www/firefox-esr/files/patch-bug78477622
-rw-r--r--www/firefox-esr/files/patch-bug78699536
-rw-r--r--www/firefox-esr/files/patch-bug78790412
-rw-r--r--www/firefox-esr/files/patch-bug78803911
-rw-r--r--www/firefox-esr/files/patch-bug7881082
-rw-r--r--www/firefox-esr/files/patch-bug788955299
-rw-r--r--www/firefox-esr/files/patch-bug78965611
-rw-r--r--www/firefox-esr/files/patch-bug7896935
-rw-r--r--www/firefox-esr/files/patch-bug79136665
-rw-r--r--www/firefox-esr/files/patch-bug7994414
-rw-r--r--www/firefox-esr/files/patch-bug80613929
-rw-r--r--www/firefox-esr/files/patch-bug82800336
-rw-r--r--www/firefox-esr/files/patch-clang32-libc++-visibility-hack38
-rw-r--r--www/firefox-esr/files/patch-clang32-visibility-hack20
-rw-r--r--www/firefox-esr/files/patch-config-baseconfig.mk16
-rw-r--r--www/firefox-esr/files/patch-config_autoconf.mk.in21
-rw-r--r--www/firefox-esr/files/patch-content-media-nsAudioStream.cpp14
-rw-r--r--www/firefox-esr/files/patch-dom-ipc-ContentChild.cpp10
-rw-r--r--www/firefox-esr/files/patch-extensions-spellcheck-hunspell-src-mozHunspell.cpp2
-rw-r--r--www/firefox-esr/files/patch-gfx-qcms-qcmstypes.h11
-rw-r--r--www/firefox-esr/files/patch-js-src-js-confdefs.h.in (renamed from www/firefox-esr/files/patch-js-src-configure.in)6
-rw-r--r--www/firefox-esr/files/patch-toolkit-xre-nsEmbedFunctions.cpp10
-rw-r--r--www/firefox-esr/files/patch-z-bug76244570
-rw-r--r--www/firefox-esr/pkg-descr2
46 files changed, 920 insertions, 1122 deletions
diff --git a/www/firefox-esr/Makefile b/www/firefox-esr/Makefile
index 45dd4ce4fc96..915e34b15434 100644
--- a/www/firefox-esr/Makefile
+++ b/www/firefox-esr/Makefile
@@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= firefox
-DISTVERSION= 10.0.11
+DISTVERSION= 17.0.2
PORTEPOCH= 1
CATEGORIES= www ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
@@ -12,16 +12,18 @@ DISTNAME= ${PORTNAME}-${DISTVERSION}esr.source
MAINTAINER= gecko@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
-BUILD_DEPENDS= nspr>=4.8.8:${PORTSDIR}/devel/nspr \
+BUILD_DEPENDS= nspr>=4.9.2:${PORTSDIR}/devel/nspr \
nss>=3.13.6_1:${PORTSDIR}/security/nss \
- sqlite3>=3.7.7.1:${PORTSDIR}/databases/sqlite3 \
+ sqlite3>=3.7.13:${PORTSDIR}/databases/sqlite3 \
+ ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
unzip:${PORTSDIR}/archivers/unzip
USE_AUTOTOOLS= autoconf213:env
+USE_PYTHON_BUILD=-2.7
LATEST_LINK= firefox-esr
USE_GECKO= gecko
-CONFLICTS= firefox-1[1-9].*
+CONFLICTS= firefox-2[0-9].* firefox-1[1-689].* firefox-10.*
MOZ_PKGCONFIG_FILES= # empty
USE_MOZILLA= # empty
MOZILLA_NAME= Firefox
@@ -43,13 +45,16 @@ MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \
--enable-application=browser \
--enable-official-branding
-OPTIONS_DEFINE= PGO
+OPTIONS_DEFINE= GSTREAMER PGO
OPTIONS_DEFAULT=GIO
.include "${.CURDIR}/../../www/firefox/Makefile.options"
+
+OPTIONS_DEFAULT:=${OPTIONS_DEFAULT:S/OSS/ALSA/}
+
.include <bsd.port.pre.mk>
-WRKSRC:= ${WRKDIR}/mozilla-esr10
+WRKSRC:= ${WRKDIR}/mozilla-esr17
.if ${ARCH} == amd64
CONFIGURE_TARGET=x86_64-portbld-freebsd${OSREL}
@@ -64,7 +69,6 @@ CFLAGS+= -mminimal-toc
.if ${PORT_OPTIONS:MPGO}
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
-USE_PYTHON_BUILD= -2.7
USE_DISPLAY= yes
.include "${PORTSDIR}/Mk/bsd.python.mk"
@@ -76,10 +80,6 @@ MOZ_MK_OPTIONS+=PROFILE_GEN_SCRIPT="${PYTHON_CMD} \
@MOZ_OBJDIR@/_profile/pgo/profileserver.py"
.endif
-.if !empty(CXX:M*clang++*) || (${CXX:Mc++} && ${OSVERSION} > 1000023)
-CXXFLAGS+= -Wno-return-type-c-linkage
-.endif
-
pre-extract:
.if ${PORT_OPTIONS:MPGO}
@${ECHO} "*****************************************************************"
diff --git a/www/firefox-esr/distinfo b/www/firefox-esr/distinfo
index 1d6b420050c4..a7e07589b3a6 100644
--- a/www/firefox-esr/distinfo
+++ b/www/firefox-esr/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-10.0.11esr.source.tar.bz2) = 94b4d5a339d97dc56fd349f93407c3af4f408a4a8409a64e3680d564d37594f8
-SIZE (firefox-10.0.11esr.source.tar.bz2) = 75444542
+SHA256 (firefox-17.0.2esr.source.tar.bz2) = 92bf717b3e3933b84fd37b0e5c5026868e139be828637cfcf4acdc83f7ccd886
+SIZE (firefox-17.0.2esr.source.tar.bz2) = 90828234
diff --git a/www/firefox-esr/files/extra-bug780531 b/www/firefox-esr/files/extra-bug780531
new file mode 100644
index 000000000000..aa3547c397a4
--- /dev/null
+++ b/www/firefox-esr/files/extra-bug780531
@@ -0,0 +1,13 @@
+--- configure.in~
++++ configure.in
+@@ -5151,8 +5148,8 @@ fi
+
+ AC_SUBST(MOZ_WEBRTC)
+
+-case "$target_cpu" in
+-arm*)
++case "$target" in
++arm-*-linux*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
+ MOZ_SAMPLE_TYPE_S16LE=1
+ AC_DEFINE(MOZ_SAMPLE_TYPE_S16LE)
+ AC_SUBST(MOZ_SAMPLE_TYPE_S16LE)
diff --git a/www/firefox-esr/files/patch-alsapulse b/www/firefox-esr/files/patch-alsapulse
index 175b41680977..f0c38d347bea 100644
--- a/www/firefox-esr/files/patch-alsapulse
+++ b/www/firefox-esr/files/patch-alsapulse
@@ -1,74 +1,65 @@
---- config/autoconf.mk.in~
-+++ config/autoconf.mk.in
-@@ -568,7 +568,13 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF
- MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@
- MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@
-
-+MOZ_ALSA = @MOZ_ALSA@
- MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@
-+MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@
-+
-+MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@
-+MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@
-+MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@
-
- GLIB_CFLAGS = @GLIB_CFLAGS@
- GLIB_LIBS = @GLIB_LIBS@
---- configure.in~
+diff --git configure.in configure.in
+index 5980b76..11f5f77 100644
+--- configure.in
+++ configure.in
-@@ -5758,17 +5775,48 @@ dnl ====================================
+@@ -5600,13 +5600,25 @@ dnl ========================================================
dnl = Check alsa availability on Linux if using sydneyaudio
dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(alsa,
-+[ --enable-alsa Enable Alsa support],
++[ --enable-alsa Enable Alsa support (default on Linux)],
+MOZ_ALSA=1,
+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
+
dnl If using sydneyaudio with Linux, ensure that the alsa library is available
--if test -n "$MOZ_SYDNEYAUDIO"; then
-+if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then
- case "$target_os" in
- linux*)
-+ MOZ_ALSA=1
-+ ;;
-+ esac
+-if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
++if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux" -a "$MOZ_ALSA_FORCE" != "no"; then
++ MOZ_ALSA=1
+fi
+
+if test -n "$MOZ_ALSA"; then
- PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
++ 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.)])])
-- ;;
-- esac
fi
-+AC_SUBST(MOZ_ALSA_CFLAGS)
+AC_SUBST(MOZ_ALSA)
+
-+dnl ========================================================
-+dnl = Enable PulseAudio
-+dnl ========================================================
-+
-+MOZ_ARG_ENABLE_BOOL(pulseaudio,
-+[ --enable-pulseaudio Enable PulseAudio support],
-+MOZ_PULSEAUDIO=1,
-+MOZ_PULSEAUDIO=)
-+
-+if test -n "$MOZ_PULSEAUDIO"; then
-+ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, ,
-+ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS"
-+ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])])
-+fi
-+
-+AC_SUBST(MOZ_PULSEAUDIO_CFLAGS)
-+AC_SUBST(MOZ_PULSEAUDIO_LIBS)
-+AC_SUBST(MOZ_PULSEAUDIO)
-+
dnl ========================================================
- dnl Permissions System
+ dnl = Enable PulseAudio
dnl ========================================================
---- media/libsydneyaudio/src/Makefile.in~
+diff --git media/libcubeb/src/Makefile.in media/libcubeb/src/Makefile.in
+index 5ab4dd8..c8df26f 100644
+--- media/libcubeb/src/Makefile.in
++++ media/libcubeb/src/Makefile.in
+@@ -24,10 +24,6 @@ endif
+
+ ifeq ($(OS_TARGET),Android)
+ # No Android implementation of libcubeb yet.
+-else ifeq ($(OS_TARGET),Linux)
+-CSRCS = \
+- cubeb_alsa.c \
+- $(NULL)
+ endif
+
+ ifeq ($(OS_TARGET),Darwin)
+@@ -42,6 +38,12 @@ CSRCS = \
+ $(NULL)
+ endif
+
++ifdef MOZ_ALSA
++CSRCS = \
++ cubeb_alsa.c \
++ $(NULL)
++endif
++
+ ifdef MOZ_PULSEAUDIO
+ CSRCS = \
+ cubeb_pulse.c \
+diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in
+index 8dda8ce..b19641d 100644
+--- media/libsydneyaudio/src/Makefile.in
+++ media/libsydneyaudio/src/Makefile.in
@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android)
CSRCS = \
@@ -100,20 +91,24 @@
ifeq ($(OS_ARCH),WINNT)
OS_LIBS += winmm.lib
endif
---- toolkit/library/libxul-config.mk~
-+++ toolkit/library/libxul-config.mk
-@@ -348,10 +348,12 @@ ifdef MOZ_NATIVE_LIBVPX
- EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
- endif
+diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
+index 43384e9..e46a6e3 100644
+--- toolkit/library/Makefile.in
++++ toolkit/library/Makefile.in
+@@ -370,14 +370,11 @@ endif
+
+ EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
-ifdef MOZ_SYDNEYAUDIO
-ifeq ($(OS_ARCH),Linux)
++ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO))
+ifdef MOZ_ALSA
EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
endif
-+
-+ifdef MOZ_PULSEAUDIO
-+EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
+-endif
+-
+ ifdef MOZ_PULSEAUDIO
+-ifdef MOZ_CUBEB
+ EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
+ endif
endif
-
- ifdef HAVE_CLOCK_MONOTONIC
diff --git a/www/firefox-esr/files/patch-bug653551 b/www/firefox-esr/files/patch-bug653551
deleted file mode 100644
index f9316f0f725b..000000000000
--- a/www/firefox-esr/files/patch-bug653551
+++ /dev/null
@@ -1,29 +0,0 @@
-commit 47ea30f
-Author: Landry Breuil <landry@openbsd.org>
-Date: Thu Feb 2 15:31:56 2012 +0900
-
- Bug 653551 - Jaegermonkey Sparc back-end broken on sparc64. r=leon.sha
----
- js/src/configure.in | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git js/src/configure.in js/src/configure.in
-index 84390cf..d663c46 100644
---- js/src/configure.in
-+++ js/src/configure.in
-@@ -2806,13 +2806,15 @@ arm*-*)
- AC_DEFINE(JS_NUNBOX32)
- ;;
- sparc*-*)
-+ if test ! "$HAVE_64BIT_OS" ; then
- NANOJIT_ARCH=Sparc
- ENABLE_METHODJIT=1
- ENABLE_MONOIC=1
- ENABLE_POLYIC=1
- ENABLE_METHODJIT_TYPED_ARRAY=1
- AC_DEFINE(JS_CPU_SPARC)
- AC_DEFINE(JS_NUNBOX32)
-+ fi
- ;;
- mips*-*)
- ENABLE_METHODJIT=1
diff --git a/www/firefox-esr/files/patch-bug691898 b/www/firefox-esr/files/patch-bug691898
deleted file mode 100644
index 977cae2b5bff..000000000000
--- a/www/firefox-esr/files/patch-bug691898
+++ /dev/null
@@ -1,285 +0,0 @@
-From: Mike Hommey <mh@glandium.org>
-Date: Sat, 24 Dec 2011 09:56:58 +0100
-Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where
- YARR JIT is not supported
-
----
- js/src/Makefile.in | 21 +++++++++++++--------
- js/src/vm/RegExpObject-inl.h | 28 ++++++----------------------
- js/src/vm/RegExpObject.cpp | 36 ------------------------------------
- js/src/vm/RegExpObject.h | 27 ++++++---------------------
- js/src/yarr/wtfbridge.h | 2 --
- 5 files changed, 25 insertions(+), 89 deletions(-)
-
-diff --git a/js/src/Makefile.in b/js/src/Makefile.in
-index fc48cbd..49f0bdc 100644
---- js/src/Makefile.in
-+++ js/src/Makefile.in
-@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \
-
- ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
-
--VPATH += $(srcdir)/yarr/pcre \
-+VPATH += $(srcdir)/assembler \
-+ $(srcdir)/assembler/wtf \
-+ $(srcdir)/yarr \
- $(NULL)
-
- CPPSRCS += \
-- pcre_compile.cpp \
-- pcre_exec.cpp \
-- pcre_tables.cpp \
-- pcre_xclass.cpp \
-- pcre_ucp_searchfuncs.cpp \
-+ Assertions.cpp \
-+ OSAllocatorOS2.cpp \
-+ OSAllocatorPosix.cpp \
-+ OSAllocatorWin.cpp \
-+ PageBlock.cpp \
-+ YarrInterpreter.cpp \
-+ YarrPattern.cpp \
-+ YarrSyntaxChecker.cpp \
- $(NULL)
- else
-
-@@ -1015,10 +1020,10 @@ endif
- # Needed to "configure" it correctly. Unfortunately these
- # flags wind up being applied to all code in js/src, not just
- # the code in js/src/assembler.
--CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
-+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
-
- ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
--CXXFLAGS += -DENABLE_JIT=1
-+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
- endif
-
- INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
-diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h
-index 5f7817d..91108a7 100644
---- js/src/vm/RegExpObject-inl.h
-+++ 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
---- js/src/vm/RegExpObject.cpp
-+++ js/src/vm/RegExpObject.cpp
-@@ -251,7 +251,6 @@ Class js::RegExpClass = {
- NULL /* trace */
- };
-
--#if ENABLE_YARR_JIT
- void
- RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
- {
-@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err
- }
- }
-
--#else /* !ENABLE_YARR_JIT */
--
--void
--RegExpPrivateCode::reportPCREError(JSContext *cx, int error)
--{
--#define REPORT(msg_) \
-- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \
-- return
-- switch (error) {
-- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred.");
-- case 1: REPORT(JSMSG_TRAILING_SLASH);
-- case 2: REPORT(JSMSG_TRAILING_SLASH);
-- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 4: REPORT(JSMSG_BAD_QUANTIFIER);
-- case 5: REPORT(JSMSG_BAD_QUANTIFIER);
-- case 6: REPORT(JSMSG_BAD_CLASS_RANGE);
-- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 8: REPORT(JSMSG_BAD_CLASS_RANGE);
-- case 9: REPORT(JSMSG_BAD_QUANTIFIER);
-- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
-- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
-- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 14: REPORT(JSMSG_MISSING_PAREN);
-- case 15: REPORT(JSMSG_BAD_BACKREF);
-- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
-- default:
-- JS_NOT_REACHED("Precondition violation: unknown PCRE error code.");
-- }
--#undef REPORT
--}
--#endif /* ENABLE_YARR_JIT */
--
- bool
- js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut)
- {
-diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
-index 1449d56..279f3c0 100644
---- js/src/vm/RegExpObject.h
-+++ js/src/vm/RegExpObject.h
-@@ -49,8 +49,6 @@
- #include "yarr/Yarr.h"
- #if ENABLE_YARR_JIT
- #include "yarr/YarrJIT.h"
--#else
--#include "yarr/pcre/pcre.h"
- #endif
-
- namespace js {
-@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed<RegExpPrivate> rep);
- /* Abstracts away the gross |RegExpPrivate| backend details. */
- class RegExpPrivateCode
- {
--#if ENABLE_YARR_JIT
- typedef JSC::Yarr::BytecodePattern BytecodePattern;
- typedef JSC::Yarr::ErrorCode ErrorCode;
-+ typedef JSC::Yarr::YarrPattern YarrPattern;
-+#if ENABLE_YARR_JIT
- typedef JSC::Yarr::JSGlobalData JSGlobalData;
- typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock;
-- typedef JSC::Yarr::YarrPattern YarrPattern;
-
- /* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
- YarrCodeBlock codeBlock;
-- BytecodePattern *byteCode;
--#else
-- JSRegExp *compiled;
- #endif
-+ BytecodePattern *byteCode;
-
- public:
- RegExpPrivateCode()
- :
- #if ENABLE_YARR_JIT
- codeBlock(),
-- byteCode(NULL)
--#else
-- compiled(NULL)
- #endif
-+ byteCode(NULL)
- { }
-
- ~RegExpPrivateCode() {
- #if ENABLE_YARR_JIT
- codeBlock.release();
-+#endif
- if (byteCode)
- Foreground::delete_<BytecodePattern>(byteCode);
--#else
-- if (compiled)
-- jsRegExpFree(compiled);
--#endif
- }
-
- #if ENABLE_YARR_JIT
- static inline bool isJITRuntimeEnabled(JSContext *cx);
-- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
--#else
-- void reportPCREError(JSContext *cx, int error);
- #endif
-+ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
-
- inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount,
- RegExpFlag flags);
-@@ -205,11 +194,7 @@ class RegExpPrivateCode
- int *output, size_t outputCount);
-
- static size_t getOutputSize(size_t pairCount) {
--#if ENABLE_YARR_JIT
- return pairCount * 2;
--#else
-- return pairCount * 3; /* Should be x2, but PCRE has... needs. */
--#endif
- }
- };
-
-diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h
-index ac41d08..fb8eb86 100644
---- js/src/yarr/wtfbridge.h
-+++ js/src/yarr/wtfbridge.h
-@@ -49,9 +49,7 @@
- #include "jsprvtd.h"
- #include "vm/String.h"
- #include "assembler/wtf/Platform.h"
--#if ENABLE_YARR_JIT
- #include "assembler/jit/ExecutableAllocator.h"
--#endif
-
- namespace JSC { namespace Yarr {
-
diff --git a/www/firefox-esr/files/patch-bug696030 b/www/firefox-esr/files/patch-bug696030
deleted file mode 100644
index 6845651544d7..000000000000
--- a/www/firefox-esr/files/patch-bug696030
+++ /dev/null
@@ -1,34 +0,0 @@
-commit 5e354b9
-Author: Chris Coulson <chris.coulson@canonical.com>
-Date: Thu Jan 5 11:19:50 2012 +1300
-
- Bug 696030 - Use MonitorAutoLock rather than MonitorAutoEnter in nsGIOProtocolHandler r=karlt
-
- --HG--
- extra : rebase_source : 6f3d1a49a07affab679e41cd8cf968d62c072299
----
- extensions/gio/nsGIOProtocolHandler.cpp | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git extensions/gio/nsGIOProtocolHandler.cpp extensions/gio/nsGIOProtocolHandler.cpp
-index 9347b6e..e8f153d 100644
---- extensions/gio/nsGIOProtocolHandler.cpp
-+++ extensions/gio/nsGIOProtocolHandler.cpp
-@@ -238,7 +238,7 @@ class nsGIOInputStream : public nsIInputStream
- void
- nsGIOInputStream::SetMountResult(MountOperationResult result, gint error_code)
- {
-- mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
-+ mozilla::MonitorAutoLock mon(mMonitorMountInProgress);
- mMountRes = result;
- mMountErrorCode = error_code;
- mon.Notify();
-@@ -263,7 +263,7 @@ nsGIOInputStream::MountVolume() {
- NULL,
- mount_enclosing_volume_finished,
- this);
-- mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
-+ mozilla::MonitorAutoLock mon(mMonitorMountInProgress);
- /* Waiting for finish of mount operation thread */
- while (mMountRes == MOUNT_OPERATION_IN_PROGRESS)
- mon.Wait();
diff --git a/www/firefox-esr/files/patch-bug714312 b/www/firefox-esr/files/patch-bug714312
deleted file mode 100644
index 114144d18388..000000000000
--- a/www/firefox-esr/files/patch-bug714312
+++ /dev/null
@@ -1,73 +0,0 @@
-commit c104d9b
-Author: Landry Breuil <landry@openbsd.org>
-Date: Mon Jan 9 17:32:00 2012 -0600
-
- Bug 714312 - Use <machine/endian.h> to get endianess on BSD systems, fixing the BSD build. r=ted
-
- --HG--
- extra : rebase_source : 8b418bdb2d713093d138ffed20bf1630c05f396b
----
- js/src/configure.in | 5 +++++
- js/src/js-config.h.in | 4 ++++
- js/src/jscpucfg.h | 17 +++++++++++++++++
- 3 files changed, 26 insertions(+)
-
-diff --git js/src/configure.in js/src/configure.in
-index 164c896..361b29e 100644
---- js/src/configure.in
-+++ js/src/configure.in
-@@ -2934,6 +2934,11 @@ if test "$ac_cv_header_endian_h" = yes;
- AC_DEFINE(JS_HAVE_ENDIAN_H)
- fi
-
-+AC_CHECK_HEADERS(machine/endian.h)
-+if test "$ac_cv_header_machine_endian_h" = yes; then
-+ AC_DEFINE(JS_HAVE_MACHINE_ENDIAN_H)
-+fi
-+
- AC_CHECK_HEADERS(sys/isa_defs.h)
- if test "$ac_cv_header_sys_isa_defs_h" = yes; then
- AC_DEFINE(JS_HAVE_SYS_ISA_DEFS_H)
-diff --git js/src/js-config.h.in js/src/js-config.h.in
-index fb009fa..402262e 100644
---- js/src/js-config.h.in
-+++ js/src/js-config.h.in
-@@ -59,6 +59,10 @@
- useable. See jscpucfg.h. */
- #undef JS_HAVE_ENDIAN_H
-
-+/* Define to 1 if the <machine/endian.h> header is present and
-+ useable. See jscpucfg.h. */
-+#undef JS_HAVE_MACHINE_ENDIAN_H
-+
- /* Define to 1 if the <sys/isa_defs.h> header is present and
- useable. See jscpucfg.h. */
- #undef JS_HAVE_SYS_ISA_DEFS_H
-diff --git js/src/jscpucfg.h js/src/jscpucfg.h
-index dd32bce..5fd8415 100644
---- js/src/jscpucfg.h
-+++ js/src/jscpucfg.h
-@@ -92,6 +92,23 @@
- # error "endian.h does not define __BYTE_ORDER. Cannot determine endianness."
- # endif
-
-+/* BSDs */
-+#elif defined(JS_HAVE_MACHINE_ENDIAN_H)
-+# include <sys/types.h>
-+# include <machine/endian.h>
-+
-+# if defined(_BYTE_ORDER)
-+# if _BYTE_ORDER == _LITTLE_ENDIAN
-+# define IS_LITTLE_ENDIAN 1
-+# undef IS_BIG_ENDIAN
-+# elif _BYTE_ORDER == _BIG_ENDIAN
-+# undef IS_LITTLE_ENDIAN
-+# define IS_BIG_ENDIAN 1
-+# endif
-+# else /* !defined(_BYTE_ORDER) */
-+# error "machine/endian.h does not define _BYTE_ORDER. Cannot determine endianness."
-+# endif
-+
- #elif defined(JS_HAVE_SYS_ISA_DEFS_H)
- # include <sys/isa_defs.h>
-
diff --git a/www/firefox-esr/files/patch-bug722975 b/www/firefox-esr/files/patch-bug722975
new file mode 100644
index 000000000000..46a3381b9375
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug722975
@@ -0,0 +1,61 @@
+# HG changeset patch
+# Parent 9d3c9b863c697634e434b687d456bb82fa794ecf
+# User Uli Schlachter <psychon@znc.in>
+Bug 722975 - --enable-system-cairo build is broken after Bug 715658 fixed
+
+
+diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp
+--- gfx/thebes/gfxPlatform.cpp
++++ gfx/thebes/gfxPlatform.cpp
+@@ -484,21 +484,19 @@ gfxPlatform::CreateDrawTargetForSurface(
+
+ cairo_user_data_key_t kSourceSurface;
+
+ void SourceBufferDestroy(void *srcBuffer)
+ {
+ static_cast<SourceSurface*>(srcBuffer)->Release();
+ }
+
+-void SourceSnapshotDetached(cairo_surface_t *nullSurf)
++void SourceSnapshotDetached(void *nullSurf)
+ {
+- gfxImageSurface* origSurf =
+- static_cast<gfxImageSurface*>(cairo_surface_get_user_data(nullSurf, &kSourceSurface));
+-
++ gfxImageSurface *origSurf = static_cast<gfxImageSurface*>(nullSurf);
+ origSurf->SetData(&kSourceSurface, NULL, NULL);
+ }
+
+ RefPtr<SourceSurface>
+ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface)
+ {
+ void *userData = aSurface->GetData(&kSourceSurface);
+
+@@ -588,24 +586,19 @@ gfxPlatform::GetSourceSurfaceForSurface(
+ }
+
+ srcBuffer = Factory::CreateWrappingDataSourceSurface(imgSurface->Data(),
+ imgSurface->Stride(),
+ size, format);
+
+ }
+
+- cairo_surface_t *nullSurf =
+- cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
+- cairo_surface_set_user_data(nullSurf,
+- &kSourceSurface,
+- imgSurface,
+- NULL);
+- cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached);
+- cairo_surface_destroy(nullSurf);
++ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic",
++ (const unsigned char *) "data", 4,
++ SourceSnapshotDetached, imgSurface.get());
+ }
+
+ srcBuffer->AddRef();
+ aSurface->SetData(&kSourceSurface, srcBuffer, SourceBufferDestroy);
+
+ return srcBuffer;
+ }
+
diff --git a/www/firefox-esr/files/patch-bug725655 b/www/firefox-esr/files/patch-bug725655
deleted file mode 100644
index ec331a5ccb73..000000000000
--- a/www/firefox-esr/files/patch-bug725655
+++ /dev/null
@@ -1,53 +0,0 @@
-commit 18b9c9d
-Author: Martin Stránský <stransky@redhat.com>
-Date: Fri Feb 10 16:07:41 2012 +0100
-
- Bug 725655 - gcc 4.7 build failures (missing headers). r=benjamin
----
- ipc/chromium/src/base/file_util_linux.cc | 3 +++
- ipc/chromium/src/base/message_pump_libevent.cc | 3 +++
- ipc/chromium/src/base/time_posix.cc | 3 +++
- 3 files changed, 9 insertions(+)
-
-diff --git ipc/chromium/src/base/file_util_linux.cc ipc/chromium/src/base/file_util_linux.cc
-index cca706f..171e44f 100644
---- ipc/chromium/src/base/file_util_linux.cc
-+++ ipc/chromium/src/base/file_util_linux.cc
-@@ -5,6 +5,9 @@
- #include "base/file_util.h"
-
- #include <fcntl.h>
-+#if defined(ANDROID) || defined(OS_POSIX)
-+#include <unistd.h>
-+#endif
-
- #include <string>
- #include <vector>
-diff --git ipc/chromium/src/base/message_pump_libevent.cc ipc/chromium/src/base/message_pump_libevent.cc
-index 6194f79..9f31dbb 100644
---- ipc/chromium/src/base/message_pump_libevent.cc
-+++ ipc/chromium/src/base/message_pump_libevent.cc
-@@ -6,6 +6,9 @@
-
- #include <errno.h>
- #include <fcntl.h>
-+#if defined(ANDROID) || defined(OS_POSIX)
-+#include <unistd.h>
-+#endif
-
- #include "eintr_wrapper.h"
- #include "base/logging.h"
-diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc
-index 8d1a1d5..abf2a56 100644
---- ipc/chromium/src/base/time_posix.cc
-+++ ipc/chromium/src/base/time_posix.cc
-@@ -13,6 +13,9 @@
- #else
- #include <time.h>
- #endif
-+#if defined(ANDROID) || defined(OS_POSIX)
-+#include <unistd.h>
-+#endif
-
- #include <limits>
-
diff --git a/www/firefox-esr/files/patch-bug728968 b/www/firefox-esr/files/patch-bug728968
deleted file mode 100644
index 01638e8fd119..000000000000
--- a/www/firefox-esr/files/patch-bug728968
+++ /dev/null
@@ -1,50 +0,0 @@
-commit 4075972
-Author: Mike Hommey <mh+mozilla@glandium.org>
-Date: Thu Feb 23 11:00:46 2012 +0100
-
- Bug 728968 - Detect clock_gettime when it's not in -lrt. r=khuey
----
- configure.in | 29 ++++++++++++++++-------------
- 1 file changed, 16 insertions(+), 13 deletions(-)
-
-diff --git configure.in configure.in
-index 3ba7e2f..3d0614c 100644
---- configure.in
-+++ configure.in
-@@ -3728,20 +3728,23 @@ AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat6
- AC_CHECK_FUNCS(flockfile getpagesize)
- AC_CHECK_FUNCS(localtime_r strtok_r)
-
--dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt
--_SAVE_LDFLAGS=$LDFLAGS
--LDFLAGS="$LDFLAGS -lrt"
--AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt,
-- ac_cv_have_clock_monotonic,
-- [AC_TRY_LINK([#include <time.h>],
-- [ struct timespec ts;
-- clock_gettime(CLOCK_MONOTONIC, &ts); ],
-- ac_cv_have_clock_monotonic=yes,
-- ac_cv_have_clock_monotonic=no)])
--LDFLAGS=$_SAVE_LDFLAGS
--if test "$ac_cv_have_clock_monotonic" = "yes"; then
-+dnl check for clock_gettime(), the CLOCK_MONOTONIC clock
-+AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
-+ ac_cv_clock_monotonic,
-+ [for libs in "" -lrt; do
-+ _SAVE_LDFLAGS="$LDFLAGS"
-+ LDFLAGS="$LDFLAGS $libs"
-+ AC_TRY_LINK([#include <time.h>],
-+ [ struct timespec ts;
-+ clock_gettime(CLOCK_MONOTONIC, &ts); ],
-+ ac_cv_clock_monotonic=$libs
-+ break,
-+ ac_cv_clock_monotonic=no)
-+ LDFLAGS="$_SAVE_LDFLAGS"
-+ done])
-+if test "$ac_cv_clock_monotonic" != "no"; then
- HAVE_CLOCK_MONOTONIC=1
-- REALTIME_LIBS=-lrt
-+ REALTIME_LIBS=$ac_cv_clock_monotonic
- AC_DEFINE(HAVE_CLOCK_MONOTONIC)
- AC_SUBST(HAVE_CLOCK_MONOTONIC)
- AC_SUBST(REALTIME_LIBS)
diff --git a/www/firefox-esr/files/patch-bug729155 b/www/firefox-esr/files/patch-bug729155
deleted file mode 100644
index a8f2a6623493..000000000000
--- a/www/firefox-esr/files/patch-bug729155
+++ /dev/null
@@ -1,18 +0,0 @@
---- dom/plugins/ipc/PluginMessageUtils.cpp
-+++ dom/plugins/ipc/PluginMessageUtils.cpp
-@@ -114,6 +114,7 @@ MediateRace(const RPCChannel::Message& parent,
- }
- }
-
-+#if defined(OS_LINUX)
- static string
- ReplaceAll(const string& haystack, const string& needle, const string& with)
- {
-@@ -127,6 +128,7 @@ ReplaceAll(const string& haystack, const string& needle, const string& with)
-
- return munged;
- }
-+#endif
-
- string
- MungePluginDsoPath(const string& path)
diff --git a/www/firefox-esr/files/patch-bug732340 b/www/firefox-esr/files/patch-bug732340
new file mode 100644
index 000000000000..95756678bd0f
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug732340
@@ -0,0 +1,13 @@
+--- gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400
++++ gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400
+@@ -537,4 +537,10 @@ hb_ot_layout_position_finish (hb_face_t
+ GPOS::position_finish (buffer);
+ }
+
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3
++template int SortedArrayOf<Record<LangSys> >::search<unsigned int>(unsigned int const &) const;
++template int SortedArrayOf<Record<Script> >::search<unsigned int>(unsigned int const &) const;
++template int SortedArrayOf<IntType<unsigned short> >::search<unsigned int>(unsigned int const &) const;
++template int SortedArrayOf<RangeRecord>::search<unsigned int>(unsigned int const &) const;
++#endif
+
diff --git a/www/firefox-esr/files/patch-bug741737 b/www/firefox-esr/files/patch-bug741737
deleted file mode 100644
index b00aef3d1382..000000000000
--- a/www/firefox-esr/files/patch-bug741737
+++ /dev/null
@@ -1,90 +0,0 @@
-changeset: 91900:eee73897136b
-user: Martin Stransky <stransky@redhat.com>
-date: Tue Apr 17 19:57:40 2012 -0400
-summary: Bug 741737 - Configure libvpx with pkgconfig. r=khuey, a=npotb
-
-diff --git a/configure.in b/configure.in
---- configure.in
-+++ configure.in
-@@ -5588,12 +5588,10 @@ MOZ_ARG_DISABLE_BOOL(webm,
-
- dnl system libvpx Support
- dnl ========================================================
--MOZ_ARG_WITH_STRING(system-libvpx,
--[ --with-system-libvpx=[PFX]
-- Use system libvpx [installed at prefix PFX]],
-- LIBVPX_DIR=$withval)
-+MOZ_ARG_WITH_BOOL(system-libvpx,
-+[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
-+ MOZ_NATIVE_LIBVPX=1)
-
--MOZ_NATIVE_LIBVPX=
- MOZ_LIBVPX_INCLUDES=
- MOZ_LIBVPX_LIBS=
-
-@@ -5606,53 +5604,18 @@ if test -n "$MOZ_WEBM"; then
- AC_DEFINE(MOZ_VP8_ENCODER)
- fi
-
-- if test -n "$LIBVPX_DIR" -a "$LIBVPX_DIR" != no; then
-- _SAVE_CFLAGS=$CFLAGS
-- _SAVE_LDFLAGS=$LDFLAGS
-- _SAVE_LIBS=$LIBS
-- if test "${LIBVPX_DIR}" = "yes"; then
-- LIBVPX_DIR=/usr
-- fi
-- CFLAGS="-I${LIBVPX_DIR}/include $CFLAGS"
-- LDFLAGS="-L${LIBVPX_DIR}/lib $LDFLAGS"
-- MOZ_NATIVE_LIBVPX_DEC_TEST=
-- MOZ_CHECK_HEADER(vpx/vpx_decoder.h,
-- [if test ! -f "${LIBVPX_DIR}/include/vpx/vpx_decoder.h"; then
-- AC_MSG_ERROR([vpx/vpx_decoder.h found, but is not in ${LIBVPX_DIR}/include])
-- fi],
-- AC_MSG_ERROR([--with-system-libvpx requested but vpx/vpx_decoder.h not found]))
-- AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver,
-- [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).
-- 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.
-- AC_TRY_COMPILE([
-- #include <vpx/vpx_decoder.h>
-- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
-- #error "test failed."
-- #endif
-- ],
-- [return 0;],
-- [AC_MSG_RESULT([yes])
-- MOZ_NATIVE_LIBVPX=1
-- 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])])
-- fi
-- CFLAGS=$_SAVE_CFLAGS
-- LDFLAGS=$_SAVE_LDFLAGS
-- LIBS=$_SAVE_LIBS
-+ if test -n "$MOZ_NATIVE_LIBVPX"; then
-+ dnl ============================
-+ dnl === libvpx Version check ===
-+ dnl ============================
-+ dnl Check to see if we have a system libvpx package.
-+ PKG_CHECK_MODULES(LIBVPX, vpx >= 0.9.7)
-+
-+ MOZ_CHECK_HEADER([vpx/vpx_decoder.h], [],
-+ [AC_MSG_ERROR([Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx.])])
-+
-+ AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver, [],
-+ [AC_MSG_ERROR([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])])
- fi
- fi
-
diff --git a/www/firefox-esr/files/patch-bug753046 b/www/firefox-esr/files/patch-bug753046
index c606ab1f58bc..c5ecdbd8af1b 100644
--- a/www/firefox-esr/files/patch-bug753046
+++ b/www/firefox-esr/files/patch-bug753046
@@ -56,7 +56,7 @@ $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $
--- ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000
+++ ipc/chromium/Makefile.in
-@@ -278,6 +278,34 @@ endif
+@@ -278,6 +278,33 @@ endif
endif # } OS_LINUX
@@ -64,7 +64,6 @@ $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $
+
+CPPSRCS += \
+ atomicops_internals_x86_gcc.cc \
-+ file_util_linux.cc \
+ process_util_bsd.cc \
+ time_posix.cc \
+ $(NULL)
@@ -381,37 +380,29 @@ diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_re
index 9a34492..62b280c 100644
--- ipc/chromium/src/base/dir_reader_posix.h
+++ ipc/chromium/src/base/dir_reader_posix.h
-@@ -18,6 +18,8 @@
+@@ -18,16 +18,20 @@
+ // seems worse than falling back to enumerating all file descriptors so we will
+ // probably never implement this on the Mac.
- #if defined(OS_LINUX)
+-#if defined(OS_LINUX) && !defined(OS_OPENBSD)
++#if defined(OS_LINUX)
#include "base/dir_reader_linux.h"
+#elif defined(OS_BSD)
+#include "base/dir_reader_bsd.h"
#else
#include "base/dir_reader_fallback.h"
#endif
-@@ -26,6 +28,8 @@
- #if defined(OS_LINUX)
+ namespace base {
+
+-#if defined(OS_LINUX) && !defined(OS_OPENBSD)
++#if defined(OS_LINUX)
typedef DirReaderLinux DirReaderPosix;
+#elif defined(OS_BSD)
+typedef DirReaderBSD DirReaderPosix;
#else
typedef DirReaderFallback DirReaderPosix;
#endif
-diff --git ipc/chromium/src/base/file_util_linux.cc ipc/chromium/src/base/file_util_linux.cc
-index 171e44f..0c6dfcc 100644
---- ipc/chromium/src/base/file_util_linux.cc
-+++ ipc/chromium/src/base/file_util_linux.cc
-@@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) {
- }
-
- bool GetShmemTempDir(FilePath* path) {
--#ifdef ANDROID
-+#if defined(ANDROID) || defined(OS_BSD)
- return GetTempDir(path);
- #else
- *path = FilePath("/dev/shm");
$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $
--- ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
@@ -469,7 +460,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
+++ ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,9 +9,23 @@
+@@ -9,16 +9,30 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -477,9 +468,10 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
+#include <lwp.h>
#elif defined(OS_LINUX)
#include <sys/syscall.h>
- #include <unistd.h>
-+#elif defined(OS_DRAGONFLY)
-+#include <unistd.h>
+-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
+ #include <sys/prctl.h>
+-#elif !defined(__NetBSD__)
+-#include <pthread_np.h>
+#elif defined(OS_FREEBSD)
+#include <sys/param.h>
+#if __FreeBSD_version > 802500
@@ -489,15 +481,24 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
+extern "C" int thr_self(long *);
+_Pragma("GCC visibility pop")
+#endif
-+#include <pthread_np.h>
+ #endif
++
++#if !defined(OS_MACOSX)
+ #include <unistd.h>
#endif
++#if defined(OS_BSD) && !defined(OS_NETBSD)
++#include <pthread_np.h>
++#endif
++
#if defined(OS_MACOSX)
-@@ -38,9 +45,20 @@
+ namespace base {
+ void InitThreading();
+@@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() {
// into the kernel.
#if defined(OS_MACOSX)
return mach_thread_self();
--#elif defined (__OpenBSD__)
+-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#elif defined(OS_NETBSD)
+ return _lwp_self();
+#elif defined(OS_DRAGONFLY)
@@ -517,6 +518,18 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
#elif defined(OS_LINUX)
return syscall(__NR_gettid);
#endif
+@@ -102,9 +102,9 @@ void PlatformThread::SetName(const char* name) {
+ // Note that glibc also has a 'pthread_setname_np' api, but it may not be
+ // available everywhere and it's only benefit over using prctl directly is
+ // that it can set the name of threads other than the current thread.
+-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#if defined(OS_BSD) && !defined(OS_NETBSD)
+ pthread_set_name_np(pthread_self(), name);
+-#elif defined(__NetBSD__)
++#elif defined(OS_NETBSD)
+ pthread_setname_np(pthread_self(), "%s", (void *)name);
+ #else
+ prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0);
$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
--- ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100
@@ -558,7 +571,7 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
--- ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000
+++ ipc/chromium/src/base/process_util_bsd.cc
-@@ -0,0 +1,318 @@
+@@ -0,0 +1,367 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
@@ -593,6 +606,20 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
+#define HAVE_POSIX_SPAWN 1
+#endif
+
++/*
++ * On platforms that are not gonk based, we fall back to an arbitrary
++ * UID. This is generally the UID for user `nobody', albeit it is not
++ * always the case.
++ */
++
++#if defined(OS_NETBSD) || defined(OS_OPENBSD)
++# define CHILD_UNPRIVILEGED_UID 32767
++# define CHILD_UNPRIVILEGED_GID 32767
++#else
++# define CHILD_UNPRIVILEGED_UID 65534
++# define CHILD_UNPRIVILEGED_GID 65534
++#endif
++
+#ifndef __dso_public
+# ifdef __exported
+# define __dso_public __exported
@@ -641,6 +668,17 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
+ const environment_map& env_vars_to_set,
+ bool wait, ProcessHandle* process_handle,
+ ProcessArchitecture arch) {
++ return LaunchApp(argv, fds_to_remap, env_vars_to_set,
++ SAME_PRIVILEGES_AS_PARENT,
++ wait, process_handle);
++}
++
++bool LaunchApp(const std::vector<std::string>& argv,
++ const file_handle_mapping_vector& fds_to_remap,
++ const environment_map& env_vars_to_set,
++ ChildPrivileges privs,
++ bool wait, ProcessHandle* process_handle,
++ ProcessArchitecture arch) {
+ bool retval = true;
+
+ char* argv_copy[argv.size() + 1];
@@ -755,6 +793,17 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
+ const environment_map& env_vars_to_set,
+ bool wait, ProcessHandle* process_handle,
+ ProcessArchitecture arch) {
++ return LaunchApp(argv, fds_to_remap, env_vars_to_set,
++ SAME_PRIVILEGES_AS_PARENT,
++ wait, process_handle);
++}
++
++bool LaunchApp(const std::vector<std::string>& argv,
++ const file_handle_mapping_vector& fds_to_remap,
++ const environment_map& env_vars_to_set,
++ ChildPrivileges privs,
++ bool wait, ProcessHandle* process_handle,
++ ProcessArchitecture arch) {
+ scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
+ // Illegal to allocate memory after fork and before execvp
+ InjectiveMultimap fd_shuffle1, fd_shuffle2;
@@ -777,19 +826,32 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
+
+ CloseSuperfluousFds(fd_shuffle2);
+
++ for (size_t i = 0; i < argv.size(); i++)
++ argv_cstr[i] = const_cast<char*>(argv[i].c_str());
++ argv_cstr[argv.size()] = NULL;
++
++ if (privs == UNPRIVILEGED) {
++ if (setgid(CHILD_UNPRIVILEGED_GID) != 0) {
++ DLOG(ERROR) << "FAILED TO setgid() CHILD PROCESS, path: " << argv_cstr[0];
++ _exit(127);
++ }
++ if (setuid(CHILD_UNPRIVILEGED_UID) != 0) {
++ DLOG(ERROR) << "FAILED TO setuid() CHILD PROCESS, path: " << argv_cstr[0];
++ _exit(127);
++ }
++ if (chdir("/") != 0)
++ gProcessLog.print("==> could not chdir()\n");
++ }
++
+ for (environment_map::const_iterator it = env_vars_to_set.begin();
+ it != env_vars_to_set.end(); ++it) {
+ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
+ _exit(127);
+ }
-+
-+ for (size_t i = 0; i < argv.size(); i++)
-+ argv_cstr[i] = const_cast<char*>(argv[i].c_str());
-+ argv_cstr[argv.size()] = NULL;
-+ execvp(argv_cstr[0], argv_cstr.get());
++ execv(argv_cstr[0], argv_cstr.get());
+ // if we get here, we're in serious trouble and should complain loudly
+ DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
-+ exit(127);
++ _exit(127);
+ } else {
+ gProcessLog.print("==> process %d launched child process %d\n",
+ GetCurrentProcId(), pid);
@@ -951,57 +1013,6 @@ $NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:
#else
long pages = sysconf(_SC_PHYS_PAGES);
long page_size = sysconf(_SC_PAGE_SIZE);
-$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $
-
---- ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000
-+++ ipc/chromium/src/base/third_party/nspr/prcpucfg.h
-@@ -34,7 +34,7 @@
- #include "base/third_party/nspr/prcpucfg_win.h"
- #elif defined(__APPLE__)
- #include "base/third_party/nspr/prcpucfg_mac.h"
--#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
- #include "base/third_party/nspr/prcpucfg_linux.h"
- #elif defined(__OpenBSD__)
- #include "base/third_party/nspr/prcpucfg_openbsd.h"
-$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000
-+++ ipc/chromium/src/base/third_party/nspr/prtime.cc
-@@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp
- LL_ADD(retVal, retVal, temp);
-
- return retVal;
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_DRAGONFLY)
- struct tm exp_tm = {0};
- exp_tm.tm_sec = exploded->tm_sec;
- exp_tm.tm_min = exploded->tm_min;
-@@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp
- result *= kSecondsToMicroseconds;
- result += exploded->tm_usec;
- return result;
-+#elif defined(OS_FREEBSD) || defined(OS_NETBSD)
-+ struct tm exp_tm = {0};
-+ exp_tm.tm_sec = exploded->tm_sec;
-+ exp_tm.tm_min = exploded->tm_min;
-+ exp_tm.tm_hour = exploded->tm_hour;
-+ exp_tm.tm_mday = exploded->tm_mday;
-+ exp_tm.tm_mon = exploded->tm_month;
-+ exp_tm.tm_year = exploded->tm_year - 1900;
-+
-+ // time_t is 64bit
-+ time_t absolute_time = timegm(&exp_tm);
-+
-+ PRTime result = static_cast<PRTime>(absolute_time);
-+ result -= exploded->tm_params.tp_gmt_offset +
-+ exploded->tm_params.tp_dst_offset;
-+ result *= kSecondsToMicroseconds;
-+ result += exploded->tm_usec;
-+ return result;
- #else
- #error No PR_ImplodeTime implemented on your platform.
- #endif
diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc
index abf2a56..48791f6 100644
--- ipc/chromium/src/base/time_posix.cc
@@ -1146,11 +1157,11 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoo
nsCString path;
greDir->GetNativePath(path);
-# ifdef OS_LINUX
--# ifdef ANDROID
+-# ifdef MOZ_WIDGET_ANDROID
+# if defined(OS_LINUX) || defined(OS_BSD)
-+# if defined(ANDROID) || defined(OS_BSD)
++# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD)
path += "/lib";
- # endif // ANDROID
+ # endif // MOZ_WIDGET_ANDROID
const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
@@ -557,7 +557,7 @@
childArgv.push_back(pidstring);
@@ -1167,7 +1178,7 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoo
base::LaunchApp(childArgv, mFileMap,
-#if defined(OS_LINUX) || defined(OS_MACOSX)
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- newEnvVars,
+ newEnvVars, privs,
#endif
false, &process, arch);
diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h
diff --git a/www/firefox-esr/files/patch-bug761077 b/www/firefox-esr/files/patch-bug761077
deleted file mode 100644
index 922fa55131e8..000000000000
--- a/www/firefox-esr/files/patch-bug761077
+++ /dev/null
@@ -1,88 +0,0 @@
-diff --git xpcom/reflect/xptcall/public/genstubs.pl xpcom/reflect/xptcall/public/genstubs.pl
-index b8a87a5..918c4cf 100644
---- xpcom/reflect/xptcall/public/genstubs.pl
-+++ xpcom/reflect/xptcall/public/genstubs.pl
-@@ -44,7 +44,7 @@ print OUTFILE "* 0 is QueryInterface\n";
- print OUTFILE "* 1 is AddRef\n";
- print OUTFILE "* 2 is Release\n";
- print OUTFILE "*/\n";
--print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))\n";
-+print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))\n";
- for($i = 0; $i < $entry_count; $i++) {
- print OUTFILE "NS_IMETHOD Stub",$i+3,"();\n";
- }
-diff --git xpcom/reflect/xptcall/public/xptcstubsdecl.inc xpcom/reflect/xptcall/public/xptcstubsdecl.inc
-index eb66761..807db26 100644
---- xpcom/reflect/xptcall/public/xptcstubsdecl.inc
-+++ xpcom/reflect/xptcall/public/xptcstubsdecl.inc
-@@ -8,7 +8,7 @@
- * 1 is AddRef
- * 2 is Release
- */
--#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
-+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
- NS_IMETHOD Stub3();
- NS_IMETHOD Stub4();
- NS_IMETHOD Stub5();
-diff --git xpcom/reflect/xptcall/src/md/unix/Makefile.in xpcom/reflect/xptcall/src/md/unix/Makefile.in
-index ae6ed66..2783957 100644
---- xpcom/reflect/xptcall/src/md/unix/Makefile.in
-+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in
-@@ -70,7 +70,7 @@ endif
- endif
- endif
- # IA64 Linux
--ifneq (,$(filter Linux,$(OS_ARCH)))
-+ifneq (,$(filter Linux FreeBSD,$(OS_ARCH)))
- ifneq (,$(findstring ia64,$(OS_TEST)))
- CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp
- ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s
-@@ -269,7 +269,7 @@ endif
- #
- # Linux/PPC
- #
--ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
-+ifneq (,$(filter Linuxpowerpc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
- ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
- AS := $(CC) -c -x assembler-with-cpp
-@@ -278,7 +278,7 @@ endif
- #
- # Linux/PPC64
- #
--ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
-+ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
- ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
- AS := $(CC) -c -x assembler-with-cpp
-@@ -350,7 +350,7 @@ endif
- #
- # OpenBSD/SPARC64
- #
--ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64)
-+ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp
- ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s
- endif
-diff --git xpcom/reflect/xptcall/src/xptcprivate.h xpcom/reflect/xptcall/src/xptcprivate.h
-index d903ced..e4ec832 100644
---- xpcom/reflect/xptcall/src/xptcprivate.h
-+++ xpcom/reflect/xptcall/src/xptcprivate.h
-@@ -14,7 +14,7 @@
-
- class xptiInterfaceEntry;
-
--#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
-+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
- #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
- #else
- #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64) = 0;
-@@ -31,7 +31,7 @@ public:
- #undef STUB_ENTRY
- #undef SENTINEL_ENTRY
-
--#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
-+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
- #define STUB_ENTRY(n) NS_IMETHOD Stub##n();
- #else
- #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64);
diff --git a/www/firefox-esr/files/patch-bug778056 b/www/firefox-esr/files/patch-bug778056
deleted file mode 100644
index 2730ffbfc594..000000000000
--- a/www/firefox-esr/files/patch-bug778056
+++ /dev/null
@@ -1,21 +0,0 @@
---- memory/mozalloc/mozalloc.cpp~
-+++ memory/mozalloc/mozalloc.cpp
-@@ -52,6 +52,9 @@
- #if defined(XP_UNIX)
- # include <unistd.h> // for valloc on *BSD
- #endif //if defined(XP_UNIX)
-+#ifdef __FreeBSD__
-+# include <malloc_np.h> // for malloc_usable_size
-+#endif
-
- #if defined(MOZ_MEMORY)
- // jemalloc.h doesn't redeclare symbols if they're provided by the OS
-@@ -259,7 +262,7 @@ moz_malloc_usable_size(void *ptr)
-
- #if defined(XP_MACOSX)
- return malloc_size(ptr);
--#elif defined(MOZ_MEMORY)
-+#elif defined(MOZ_MEMORY) || defined(__FreeBSD__)
- return malloc_usable_size(ptr);
- #elif defined(XP_WIN)
- return _msize(ptr);
diff --git a/www/firefox-esr/files/patch-bug778078 b/www/firefox-esr/files/patch-bug778078
index a68f07ab34ed..f7bedeb8053c 100644
--- a/www/firefox-esr/files/patch-bug778078
+++ b/www/firefox-esr/files/patch-bug778078
@@ -1,11 +1,11 @@
--- toolkit/xre/nsAppRunner.cpp~
+++ toolkit/xre/nsAppRunner.cpp
-@@ -3133,7 +3133,7 @@ XRE_main(int argc, char* argv[], const n
- gQtOnlyArgv[gQtOnlyArgc] = nsnull;
- #endif
- #if defined(MOZ_WIDGET_GTK2)
+@@ -3833,7 +3833,7 @@ XREMain::XRE_main(int argc, char* argv[]
+ ScopedLogging log;
+
+ #if defined(MOZ_WIDGET_GTK)
-#ifdef MOZ_MEMORY
+#if defined(MOZ_MEMORY) || defined(__FreeBSD__) || defined(__NetBSD__)
- // Disable the slice allocator, since jemalloc already uses similar layout
- // algorithms, and using a sub-allocator tends to increase fragmentation.
- // This must be done before g_thread_init() is called.
+ // Disable the slice allocator, since jemalloc already uses similar layout
+ // algorithms, and using a sub-allocator tends to increase fragmentation.
+ // This must be done before g_thread_init() is called.
diff --git a/www/firefox-esr/files/patch-bug779847 b/www/firefox-esr/files/patch-bug779847
deleted file mode 100644
index f431c4a8d3c5..000000000000
--- a/www/firefox-esr/files/patch-bug779847
+++ /dev/null
@@ -1,28 +0,0 @@
---- gfx/ycbcr/Makefile.in
-+++ gfx/ycbcr/Makefile.in
-@@ -54,23 +54,13 @@ CPPSRCS += yuv_row_win.cpp \
- $(NULL)
- endif
- else
--ifeq ($(OS_ARCH),Linux)
--CPPSRCS += yuv_row_posix.cpp \
-- $(NULL)
--else
--ifeq ($(OS_ARCH),SunOS)
--CPPSRCS += yuv_row_posix.cpp \
-- $(NULL)
--else
--ifeq ($(OS_ARCH),Darwin)
-+ifneq (,$(filter Linux SunOS Darwin DragonFly FreeBSD NetBSD OpenBSD, $(OS_ARCH)))
- CPPSRCS += yuv_row_posix.cpp \
- $(NULL)
- else
- CPPSRCS += yuv_row_other.cpp \
- $(NULL)
--endif # Darwin
--endif # SunOS
--endif # linux
-+endif # posix
- endif # windows
-
- ifeq (arm,$(findstring arm,$(OS_TEST)))
diff --git a/www/firefox-esr/files/patch-bug781457 b/www/firefox-esr/files/patch-bug781457
index 8cf3cfb70c14..8a790ccf84a9 100644
--- a/www/firefox-esr/files/patch-bug781457
+++ b/www/firefox-esr/files/patch-bug781457
@@ -1,5 +1,5 @@
---- xpcom/base/nsStackWalk.cpp.orig 2010-12-15 02:03:41.000000000 +0100
-+++ xpcom/base/nsStackWalk.cpp 2010-12-15 11:28:20.000000000 +0100
+--- xpcom/base/nsStackWalk.cpp.orig 2012-05-29 00:57:31.000000000 +0200
++++ xpcom/base/nsStackWalk.cpp 2012-06-03 12:33:40.000000000 +0200
@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb
#elif defined(HAVE__UNWIND_BACKTRACE)
diff --git a/www/firefox-esr/files/patch-bug783463 b/www/firefox-esr/files/patch-bug783463
index 56ec54b3fcc3..b27a1997c534 100644
--- a/www/firefox-esr/files/patch-bug783463
+++ b/www/firefox-esr/files/patch-bug783463
@@ -1,20 +1,14 @@
---- widget/src/qt/nsNativeThemeQt.cpp~
-+++ widget/src/qt/nsNativeThemeQt.cpp
-@@ -25,7 +25,6 @@
- #include "nsThemeConstants.h"
- #include "nsIServiceManager.h"
- #include "nsIDOMHTMLInputElement.h"
--#include <malloc.h>
-
-
- #include "gfxASurface.h"
---- widget/src/qt/nsSound.cpp~
-+++ widget/src/qt/nsSound.cpp
-@@ -40,6 +40,7 @@
- #include <QSound>
-
- #include <string.h>
-+#include <unistd.h>
-
- #include "nscore.h"
- #include "plstr.h"
+--- gfx/skia/Makefile.in~
++++ gfx/skia/Makefile.in
+@@ -339,10 +339,9 @@ CPPSRCS += \
+ SkMMapStream.cpp \
+ SkOSFile.cpp \
+ $(NULL)
+-ifeq (Linux,$(OS_TARGET))
++ifneq (,$(or $(MOZ_X11),$(filter Linux,$(OS_TARGET))))
+ CPPSRCS += \
+ SkFontHost_linux.cpp \
+- SkFontHost_tables.cpp \
+ SkTime_Unix.cpp \
+ $(NULL)
+ endif
diff --git a/www/firefox-esr/files/patch-bug784631 b/www/firefox-esr/files/patch-bug784631
new file mode 100644
index 000000000000..2c8a1560b877
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug784631
@@ -0,0 +1,52 @@
+commit 66b3921
+Author: Terrence Cole <terrence@mozilla.com>
+Date: Tue Sep 11 12:31:04 2012 -0700
+
+ Bug 784631 - Fix some clang build errors in SpiderMonkey; r=Waldo f=espindola
+
+ Computed gotos are not in the C++ standard: clang and gcc differ on semantics.
+---
+ js/src/jsinterp.cpp | 3 ++-
+ js/src/jsutil.h | 8 ++++----
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git js/src/jsinterp.cpp js/src/jsinterp.cpp
+index 0094c72..27a64a7 100644
+--- js/src/jsinterp.cpp
++++ js/src/jsinterp.cpp
+@@ -1231,6 +1231,7 @@ js::Interpret(JSContext *cx, StackFrame *entryFrame, InterpMode interpMode)
+ RootedPropertyName rootName0(cx);
+ RootedId rootId0(cx);
+ RootedShape rootShape0(cx);
++ DebugOnly<uint32_t> blockDepth;
+
+ if (!entryFrame)
+ entryFrame = regs.fp();
+@@ -3650,7 +3651,7 @@ BEGIN_CASE(JSOP_LEAVEBLOCK)
+ BEGIN_CASE(JSOP_LEAVEFORLETIN)
+ BEGIN_CASE(JSOP_LEAVEBLOCKEXPR)
+ {
+- DebugOnly<uint32_t> blockDepth = regs.fp()->blockChain().stackDepth();
++ blockDepth = regs.fp()->blockChain().stackDepth();
+
+ regs.fp()->popBlock(cx);
+
+diff --git js/src/jsutil.h js/src/jsutil.h
+index 8838b6f..016a877 100644
+--- js/src/jsutil.h
++++ js/src/jsutil.h
+@@ -432,10 +432,10 @@ typedef size_t jsbitmap;
+ #if defined(__clang__)
+ # define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) \
+ JS_BEGIN_MACRO \
+- _Pragma("clang diagnostic push") \
+- _Pragma("clang diagnostic ignored \"-Wunused-value\"") \
+- expr; \
+- _Pragma("clang diagnostic pop") \
++ _Pragma("(clang diagnostic push)") \
++ _Pragma("(clang diagnostic ignored \"-Wunused-value\")") \
++ {expr;} \
++ _Pragma("(clang diagnostic pop)") \
+ JS_END_MACRO
+ #elif (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+ # define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) \
diff --git a/www/firefox-esr/files/patch-bug784776 b/www/firefox-esr/files/patch-bug784776
deleted file mode 100644
index 2036b3d441e3..000000000000
--- a/www/firefox-esr/files/patch-bug784776
+++ /dev/null
@@ -1,22 +0,0 @@
---- intl/locale/src/unix/nsDateTimeFormatUnix.cpp~
-+++ intl/locale/src/unix/nsDateTimeFormatUnix.cpp
-@@ -100,7 +100,7 @@ void nsDateTimeFormatUnix::LocalePreferr
- struct tm *tmc;
- int i;
-
-- tt = time((time_t)NULL);
-+ tt = time(NULL);
- tmc = localtime(&tt);
-
- tmc->tm_hour=22; // put the test sample hour to 22:00 which is 10PM
---- xpcom/glue/nsBaseHashtable.h~
-+++ xpcom/glue/nsBaseHashtable.h
-@@ -147,7 +147,7 @@ public:
- {
- EntryType* ent = this->GetEntry(aKey);
- if (!ent)
-- return NULL;
-+ return 0;
-
- return ent->mData;
- }
diff --git a/www/firefox-esr/files/patch-bug786995 b/www/firefox-esr/files/patch-bug786995
new file mode 100644
index 000000000000..85b3abcc3d13
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug786995
@@ -0,0 +1,36 @@
+# Bug 786995 - configure should check for SSSE3 support in the whole toolchain
+
+--- configure.in.orig 2012-09-02 00:37:29.000000000 +0200
++++ configure.in 2012-09-02 00:38:50.000000000 +0200
+@@ -1710,15 +1710,15 @@
+ _MOZ_RTTI_FLAGS_OFF=-fno-rtti
+
+ # Check for -mssse3 on $CC
+- AC_MSG_CHECKING([for -mssse3 option to $CC])
+- HAVE_COMPILER_FLAG_MSSSE3=
++ AC_MSG_CHECKING([if toolchain supports -mssse3 option])
++ HAVE_TOOLCHAIN_SUPPORT_MSSSE3=
+ _SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -mssse3"
+- AC_TRY_COMPILE(,,AC_MSG_RESULT([yes])
+- [HAVE_COMPILER_FLAG_MSSSE3=1],
++ AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes])
++ [HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1],
+ AC_MSG_RESULT([no]))
+ CFLAGS=$_SAVE_CFLAGS
+- AC_SUBST(HAVE_COMPILER_FLAG_MSSSE3)
++ AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
+
+ # Turn on GNU-specific warnings:
+ # -Wall - turn on a lot of warnings
+--- gfx/skia/Makefile.in.orig 2012-09-02 00:39:00.000000000 +0200
++++ gfx/skia/Makefile.in 2012-09-02 00:39:21.000000000 +0200
+@@ -365,7 +365,7 @@
+ SkUtils_opts_SSE2.cpp \
+ opts_check_SSE2.cpp \
+ $(NULL)
+-ifdef HAVE_COMPILER_FLAG_MSSSE3
++ifdef HAVE_TOOLCHAIN_SUPPORT_MSSSE3
+ DEFINES += -DSK_BUILD_SSSE3
+ CPPSRCS += SkBitmapProcState_opts_SSSE3.cpp
+ endif
diff --git a/www/firefox-esr/files/patch-bug787904 b/www/firefox-esr/files/patch-bug787904
new file mode 100644
index 000000000000..55f7a6046813
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug787904
@@ -0,0 +1,12 @@
+--- js/src/gc/Heap.h
++++ js/src/gc/Heap.h
+@@ -108,7 +108,8 @@ struct Cell
+ * 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))
++#if (defined(SOLARIS) || defined(__FreeBSD__)) && \
++ (defined(__sparc) || defined(__sparcv9) || defined(__ia64))
+ const size_t PageShift = 13;
+ #else
+ const size_t PageShift = 12;
diff --git a/www/firefox-esr/files/patch-bug788039 b/www/firefox-esr/files/patch-bug788039
index 678f0d493eae..a678de2eab4f 100644
--- a/www/firefox-esr/files/patch-bug788039
+++ b/www/firefox-esr/files/patch-bug788039
@@ -1,16 +1,5 @@
# Bug 788039 - With no prefix search libevent via pkg-config.
---- config/autoconf.mk.in~
-+++ config/autoconf.mk.in
-@@ -227,7 +227,7 @@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLA
-
- MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVENT@
- MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@
--MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@
-+MOZ_LIBEVENT_CFLAGS = @MOZ_LIBEVENT_CFLAGS@
-
- MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@
- MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@
--- configure.in~
+++ configure.in
@@ -3854,7 +3854,7 @@ fi
diff --git a/www/firefox-esr/files/patch-bug788108 b/www/firefox-esr/files/patch-bug788108
index 746146760c62..80ff18649882 100644
--- a/www/firefox-esr/files/patch-bug788108
+++ b/www/firefox-esr/files/patch-bug788108
@@ -7,7 +7,7 @@
-//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
-#ifdef __FreeBSD__
-#include <ieeefp.h>
--#ifdef __alpha__
+-#if !defined(__i386__) && !defined(__x86_64__)
-static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
-#else
-static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
diff --git a/www/firefox-esr/files/patch-bug788955 b/www/firefox-esr/files/patch-bug788955
new file mode 100644
index 000000000000..57c5f12d7ed4
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug788955
@@ -0,0 +1,299 @@
+diff --git Makefile.in Makefile.in
+index e341462..f75bd55 100644
+--- Makefile.in
++++ Makefile.in
+@@ -48,8 +48,10 @@ endif
+ ifdef MOZ_MEMORY
+ tier_base_dirs += memory/mozjemalloc
+ ifdef MOZ_JEMALLOC
++ifndef MOZ_NATIVE_JEMALLOC
+ tier_base_dirs += memory/jemalloc
+ endif
++endif
+ tier_base_dirs += memory/build
+ endif
+ ifndef MOZ_NATIVE_ZLIB
+diff --git allmakefiles.sh allmakefiles.sh
+index 6a9be4b..d2e49e3 100755
+--- allmakefiles.sh
++++ allmakefiles.sh
+@@ -59,7 +59,7 @@ if [ ! "$LIBXUL_SDK" ]; then
+ mozglue/Makefile
+ mozglue/build/Makefile
+ "
+- if [ "$MOZ_JEMALLOC" ]; then
++ if [ "$MOZ_JEMALLOC" -a -z "$MOZ_NATIVE_JEMALLOC" ]; then
+ add_makefiles "
+ memory/jemalloc/Makefile
+ "
+diff --git configure.in configure.in
+index bb05782..2f32516 100644
+--- configure.in
++++ configure.in
+@@ -3711,21 +3711,22 @@ fi
+
+ dnl Check for the existence of various allocation headers/functions
+
++MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h"
+ MALLOC_H=
+-MOZ_CHECK_HEADER(malloc.h, [MALLOC_H=malloc.h])
+-if test "$MALLOC_H" = ""; then
+- MOZ_CHECK_HEADER(malloc/malloc.h, [MALLOC_H=malloc/malloc.h])
+- if test "$MALLOC_H" = ""; then
+- MOZ_CHECK_HEADER(sys/malloc.h, [MALLOC_H=sys/malloc.h])
++
++for file in $MALLOC_HEADERS; do
++ MOZ_CHECK_HEADER($file, [MALLOC_H=$file])
++ if test "$MALLOC_H" != ""; then
++ AC_DEFINE_UNQUOTED(MALLOC_H, <$MALLOC_H>)
++ break
+ fi
+-fi
+-if test "$MALLOC_H" != ""; then
+- AC_DEFINE_UNQUOTED(MALLOC_H, <$MALLOC_H>)
+-fi
++done
+
+ MOZ_ALLOCATING_FUNCS="strndup posix_memalign memalign valloc"
+ AC_CHECK_FUNCS(strndup posix_memalign memalign valloc)
+
++AC_CHECK_FUNCS(malloc_usable_size)
++
+ dnl See if compiler supports some gcc-style attributes
+
+ AC_CACHE_CHECK(for __attribute__((always_inline)),
+@@ -6939,6 +6940,18 @@ else
+ fi
+
+ if test -z "$MOZ_MEMORY"; then
++ if test -n "$MOZ_JEMALLOC"; then
++ MOZ_NATIVE_JEMALLOC=1
++ AC_CHECK_FUNCS(mallctl nallocm,,
++ [MOZ_NATIVE_JEMALLOC=
++ break])
++ if test -n "$MOZ_NATIVE_JEMALLOC"; then
++ MOZ_MEMORY=1
++ AC_DEFINE(MOZ_MEMORY)
++ AC_DEFINE(MOZ_JEMALLOC)
++ AC_DEFINE(MOZ_NATIVE_JEMALLOC)
++ fi
++ fi
+ case "${target}" in
+ *-mingw*)
+ if test -z "$WIN32_REDIST_DIR" -a -z "$MOZ_DEBUG"; then
+@@ -7033,6 +7046,7 @@ else
+ fi # MOZ_MEMORY
+ AC_SUBST(MOZ_MEMORY)
+ AC_SUBST(MOZ_JEMALLOC)
++AC_SUBST(MOZ_NATIVE_JEMALLOC)
+ AC_SUBST(MOZ_GLUE_LDFLAGS)
+ AC_SUBST(MOZ_GLUE_PROGRAM_LDFLAGS)
+ AC_SUBST(WIN32_CRT_LIBS)
+@@ -8820,10 +8834,22 @@ fi
+
+ # Run jemalloc configure script
+
+-if test "$MOZ_JEMALLOC" -a "$MOZ_MEMORY"; then
++if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_JEMALLOC" -a "$MOZ_MEMORY" ; then
+ ac_configure_args="$_SUBDIR_CONFIG_ARGS --build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_"
+- if test "$OS_ARCH" = "Linux"; then
+- MANGLE="malloc calloc valloc free realloc memalign posix_memalign malloc_usable_size"
++ case "$OS_ARCH" in
++ Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
++ MANGLE="malloc calloc valloc free realloc posix_memalign"
++ case "$OS_ARCH" in
++ Linux)
++ MANGLE="$MANGLE memalign malloc_usable_size"
++ ;;
++ FreeBSD)
++ MANGLE="$MANGLE malloc_usable_size"
++ ;;
++ esac
++ ;;
++ esac
++ if test -n "$MANGLE"; then
+ MANGLED=
+ JEMALLOC_WRAPPER=
+ if test -n "$_WRAP_MALLOC"; then
+diff --git memory/build/Makefile.in memory/build/Makefile.in
+index dca0f48..af93ee0 100644
+--- memory/build/Makefile.in
++++ memory/build/Makefile.in
+@@ -22,7 +22,9 @@ CSRCS = extraMallocFuncs.c
+
+ ifdef MOZ_JEMALLOC
+ CSRCS += mozjemalloc_compat.c
++ifndef MOZ_NATIVE_JEMALLOC
+ SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
++endif
+ else
+ SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/mozjemalloc)
+ endif
+diff --git memory/build/extraMallocFuncs.c memory/build/extraMallocFuncs.c
+index 9d87629..03c8320 100644
+--- memory/build/extraMallocFuncs.c
++++ memory/build/extraMallocFuncs.c
+@@ -94,8 +94,16 @@ wrap(wcsdup)(const wchar_t *src)
+ #endif
+
+ #ifdef MOZ_JEMALLOC
++
++#undef wrap
++#if defined(MOZ_NATIVE_JEMALLOC)
++#define wrap(a) a
++#else
++#define wrap(a) je_ ## a
++#endif
++
+ /* Override some jemalloc defaults */
+-const char *je_malloc_conf = "narenas:1,lg_chunk:20";
++MOZ_EXPORT_DATA(const char *) wrap(malloc_conf) = "narenas:1,lg_chunk:20";
+
+ #ifdef ANDROID
+ #include <android/log.h>
+diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
+index 10a845a..94ad96e 100644
+--- memory/build/mozjemalloc_compat.c
++++ memory/build/mozjemalloc_compat.c
+@@ -5,14 +5,21 @@
+ #include "mozilla/Types.h"
+ #include "jemalloc_types.h"
+
+-extern int je_mallctl(const char*, void*, size_t*, void*, size_t);
++#if defined(MOZ_NATIVE_JEMALLOC)
++#define wrap(a) a
++#else
++#define wrap(a) je_ ## a
++#endif
+
+-MOZ_EXPORT_API (void)
++extern MOZ_IMPORT_API(int)
++wrap(mallctl)(const char*, void*, size_t*, void*, size_t);
++
++MOZ_EXPORT_API(void)
+ jemalloc_stats(jemalloc_stats_t *stats)
+ {
+ size_t size = sizeof(stats->mapped);
+- je_mallctl("stats.mapped", &stats->mapped, &size, NULL, 0);
+- je_mallctl("stats.allocated", &stats->allocated, &size, NULL, 0);
++ wrap(mallctl)("stats.mapped", &stats->mapped, &size, NULL, 0);
++ wrap(mallctl)("stats.allocated", &stats->allocated, &size, NULL, 0);
+ stats->committed = -1;
+ stats->dirty = -1;
+ }
+diff --git memory/jemalloc/src/src/mutex.c memory/jemalloc/src/src/mutex.c
+index 37a843e..55e18c2 100644
+--- memory/jemalloc/src/src/mutex.c
++++ memory/jemalloc/src/src/mutex.c
+@@ -64,7 +64,7 @@ pthread_create(pthread_t *__restrict thread,
+ /******************************************************************************/
+
+ #ifdef JEMALLOC_MUTEX_INIT_CB
+-int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
++JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
+ void *(calloc_cb)(size_t, size_t));
+ #endif
+
+diff --git memory/mozalloc/mozalloc.cpp memory/mozalloc/mozalloc.cpp
+index 5b61050b..5b3399a 100644
+--- memory/mozalloc/mozalloc.cpp
++++ memory/mozalloc/mozalloc.cpp
+@@ -12,16 +12,13 @@
+ #include <sys/types.h>
+
+ #if defined(MALLOC_H)
+-# include MALLOC_H // for memalign, valloc where available
++# include MALLOC_H // for memalign, valloc, malloc_size, malloc_usable_size
+ #endif // if defined(MALLOC_H)
+ #include <stddef.h> // for size_t
+ #include <stdlib.h> // for malloc, free
+ #if defined(XP_UNIX)
+ # include <unistd.h> // for valloc on *BSD
+ #endif //if defined(XP_UNIX)
+-#if defined(__FreeBSD__)
+-# include <malloc_np.h> // for malloc_usable_size
+-#endif // if defined(__FreeBSD__)
+
+ #if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
+ # define MOZALLOC_EXPORT __declspec(dllexport)
+@@ -213,8 +210,7 @@ moz_malloc_usable_size(void *ptr)
+
+ #if defined(XP_MACOSX)
+ return malloc_size(ptr);
+-#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID)) || defined(__FreeBSD__)
+- // Android bionic libc doesn't have malloc_usable_size.
++#elif defined(HAVE_MALLOC_USABLE_SIZE) || defined(MOZ_MEMORY)
+ return malloc_usable_size(ptr);
+ #elif defined(XP_WIN)
+ return _msize(ptr);
+diff --git memory/mozjemalloc/jemalloc.h memory/mozjemalloc/jemalloc.h
+index f0e0878..2486e83 100644
+--- memory/mozjemalloc/jemalloc.h
++++ memory/mozjemalloc/jemalloc.h
+@@ -37,22 +37,29 @@
+ #endif
+ #include "jemalloc_types.h"
+
++#if defined(MOZ_NATIVE_JEMALLOC)
++#define wrap(a) a
++#else
++#define wrap(a) je_ ## a
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+-#if defined(MOZ_MEMORY_LINUX)
++#if defined(MOZ_NATIVE_JEMALLOC) \
++ || defined(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD)
+ __attribute__((weak))
+ #endif
+ void jemalloc_stats(jemalloc_stats_t *stats);
+
+ /* Computes the usable size in advance. */
+ #if !defined(MOZ_MEMORY_DARWIN)
+-#if defined(MOZ_MEMORY_LINUX)
++#if defined(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD)
+ __attribute__((weak))
+ #endif
+ #if defined(MOZ_JEMALLOC)
+-int je_nallocm(size_t *rsize, size_t size, int flags);
++MOZ_IMPORT_API(int) wrap(nallocm)(size_t *rsize, size_t size, int flags);
+ #else
+ size_t je_malloc_good_size(size_t size);
+ #endif
+@@ -62,11 +69,11 @@ static inline size_t je_malloc_usable_size_in_advance(size_t size) {
+ #if defined(MOZ_MEMORY_DARWIN)
+ return malloc_good_size(size);
+ #elif defined(MOZ_JEMALLOC)
+- if (je_nallocm) {
++ if (wrap(nallocm)) {
+ size_t ret;
+ if (size == 0)
+ size = 1;
+- if (!je_nallocm(&ret, size, 0))
++ if (!wrap(nallocm)(&ret, size, 0))
+ return ret;
+ }
+ return size;
+@@ -113,4 +120,6 @@ void jemalloc_purge_freed_pages();
+ } /* extern "C" */
+ #endif
+
++#undef wrap
++
+ #endif /* _JEMALLOC_H_ */
+diff --git mozglue/build/Makefile.in mozglue/build/Makefile.in
+index c333647..15ba505 100644
+--- mozglue/build/Makefile.in
++++ mozglue/build/Makefile.in
+@@ -23,7 +23,7 @@ FORCE_STATIC_LIB = 1
+ endif
+
+ # Keep jemalloc separated when mozglue is statically linked
+-ifeq (1_1,$(MOZ_MEMORY)_$(FORCE_SHARED_LIB))
++ifeq (1_1,$(MOZ_MEMORY)_$(or $(MOZ_NATIVE_JEMALLOC),$(FORCE_SHARED_LIB)))
+ SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,memory,$(DEPTH)/memory/build)
+ else
+ # Temporary, until bug 662814 lands
diff --git a/www/firefox-esr/files/patch-bug789656 b/www/firefox-esr/files/patch-bug789656
new file mode 100644
index 000000000000..ebc567ef27ac
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug789656
@@ -0,0 +1,11 @@
+--- media/libopus/Makefile.in~
++++ media/libopus/Makefile.in
+@@ -20,7 +20,7 @@ DEFINES += \
+ -Drestrict= \
+ $(NULL)
+
+-ifneq ($(filter $(OS_ARCH),Linux Darwin),)
++ifneq ($(filter $(OS_ARCH),Linux Darwin DragonFly FreeBSD NetBSD OpenBSD),)
+ DEFINES += -DHAVE_LRINTF
+ endif
+ ifeq ($(OS_ARCH), WINNT)
diff --git a/www/firefox-esr/files/patch-bug789693 b/www/firefox-esr/files/patch-bug789693
index dee137ab64fe..1d2b790a35d5 100644
--- a/www/firefox-esr/files/patch-bug789693
+++ b/www/firefox-esr/files/patch-bug789693
@@ -1,6 +1,6 @@
--- toolkit/components/startup/nsAppStartup.cpp
+++ toolkit/components/startup/nsAppStartup.cpp
-@@ -50,17 +50,40 @@
+@@ -50,18 +50,41 @@
#include <sys/syscall.h>
#endif
@@ -19,6 +19,7 @@
#endif
#include "mozilla/Telemetry.h"
+ #include "mozilla/StartupTimeline.h"
+#if defined(__NetBSD__)
+#undef KERN_PROC
@@ -44,7 +45,7 @@
+
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
- using namespace mozilla;
+ #define kPrefLastSuccess "toolkit.startup.last_success"
@@ -836,42 +859,30 @@ CalculateProcessCreationTimestamp()
#endif
return timestamp;
diff --git a/www/firefox-esr/files/patch-bug791366 b/www/firefox-esr/files/patch-bug791366
index 08a9181a33a7..2be866d928cd 100644
--- a/www/firefox-esr/files/patch-bug791366
+++ b/www/firefox-esr/files/patch-bug791366
@@ -2,17 +2,17 @@ diff --git xpcom/base/nsMemoryReporterManager.cpp xpcom/base/nsMemoryReporterMan
index a9aff58..674e757 100644
--- xpcom/base/nsMemoryReporterManager.cpp
+++ xpcom/base/nsMemoryReporterManager.cpp
-@@ -64,7 +64,7 @@ extern void jemalloc_stats(jemalloc_stat
- # endif // XP_LINUX
+@@ -32,7 +32,7 @@ using namespace mozilla;
+ # include "jemalloc.h"
#endif // MOZ_MEMORY
--#if defined(XP_LINUX) || defined(XP_MACOSX)
+-#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(SOLARIS)
+#ifdef XP_UNIX
#include <sys/time.h>
#include <sys/resource.h>
-@@ -122,6 +122,78 @@ static PRInt64 GetResident()
- return GetProcSelfStatmField(1);
+@@ -95,6 +95,81 @@ static nsresult GetResident(PRInt64 *n)
+ return GetProcSelfStatmField(1, n);
}
+#elif defined(__DragonFly__) || defined(__FreeBSD__) \
@@ -69,56 +69,27 @@ index a9aff58..674e757 100644
+ return NS_OK;
+}
+
-+static PRInt64 GetVsize()
++#define HAVE_VSIZE_AND_RESIDENT_REPORTERS 1
++static nsresult GetVsize(PRInt64 *n)
+{
+ KINFO_PROC proc;
-+ if (NS_SUCCEEDED(GetKinfoProcSelf(&proc)))
-+ return KP_SIZE(proc);
++ nsresult rv = GetKinfoProcSelf(&proc);
++ if (NS_SUCCEEDED(rv))
++ *n = KP_SIZE(proc);
+
-+ return -1;
++ return rv;
+}
+
-+static PRInt64 GetResident()
++static nsresult GetResident(PRInt64 *n)
+{
+ KINFO_PROC proc;
-+ if (NS_SUCCEEDED(GetKinfoProcSelf(&proc)))
-+ return KP_RSS(proc);
++ nsresult rv = GetKinfoProcSelf(&proc);
++ if (NS_SUCCEEDED(rv))
++ *n = KP_RSS(proc);
+
-+ return -1;
++ return rv;
+}
+
- #elif defined(XP_MACOSX)
+ #elif defined(SOLARIS)
- #include <mach/mach_init.h>
-@@ -224,7 +297,7 @@ static PRInt64 GetResident()
-
- #endif
-
--#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN)
-+#if defined(XP_UNIX) || defined(XP_WIN)
- NS_MEMORY_REPORTER_IMPLEMENT(Vsize,
- "vsize",
- KIND_OTHER,
-@@ -239,7 +312,7 @@ NS_MEMORY_REPORTER_IMPLEMENT(Vsize,
- "measure of the memory resources used by the process.")
- #endif
-
--#if defined(XP_LINUX) || defined(XP_MACOSX)
-+#if defined(XP_UNIX)
- NS_MEMORY_REPORTER_IMPLEMENT(PageFaultsSoft,
- "page-faults-soft",
- KIND_OTHER,
-@@ -457,11 +530,11 @@ nsMemoryReporterManager::Init()
- REGISTER(HeapUnallocated);
- REGISTER(Resident);
-
--#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN)
-+#if defined(XP_UNIX) || defined(XP_WIN)
- REGISTER(Vsize);
- #endif
-
--#if defined(XP_LINUX) || defined(XP_MACOSX)
-+#if defined(XP_UNIX)
- REGISTER(PageFaultsSoft);
- REGISTER(PageFaultsHard);
- #endif
+ #include <procfs.h>
diff --git a/www/firefox-esr/files/patch-bug799441 b/www/firefox-esr/files/patch-bug799441
index 3f9f1b45db2f..98bc613ba60d 100644
--- a/www/firefox-esr/files/patch-bug799441
+++ b/www/firefox-esr/files/patch-bug799441
@@ -60,8 +60,8 @@ index ccf2846..79112a8 100644
include $(topsrcdir)/config/rules.mk
diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
index 7f9046e..6499758 100644
---- toolkit/library/libxul-config.mk
-+++ toolkit/library/libxul-config.mk
+--- toolkit/library/Makefile.in
++++ toolkit/library/Makefile.in
@@ -333,6 +333,11 @@ COMPONENT_LIBS += gkdebug
endif
endif
diff --git a/www/firefox-esr/files/patch-bug806139 b/www/firefox-esr/files/patch-bug806139
new file mode 100644
index 000000000000..56791e71fb61
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug806139
@@ -0,0 +1,29 @@
+--- content/html/content/public/nsHTMLMediaElement.h~
++++ content/html/content/public/nsHTMLMediaElement.h
+@@ -311,7 +311,7 @@ public:
+ static bool IsH264Enabled();
+ static bool IsH264Type(const nsACString& aType);
+ static const char gH264Types[3][16];
+- static char const *const gH264Codecs[7];
++ static char const *const gH264Codecs[9];
+ #endif
+
+ #ifdef MOZ_MEDIA_PLUGINS
+--- content/html/content/src/nsHTMLMediaElement.cpp~
++++ content/html/content/src/nsHTMLMediaElement.cpp
+@@ -2114,12 +2114,14 @@ const char nsHTMLMediaElement::gH264Type
+ "video/quicktime",
+ };
+
+-char const *const nsHTMLMediaElement::gH264Codecs[7] = {
++char const *const nsHTMLMediaElement::gH264Codecs[9] = {
+ "avc1.42E01E",
+ "avc1.42001E",
+ "avc1.58A01E",
+ "avc1.4D401E",
+ "avc1.64001E",
++ "avc1.64001F",
++ "mp4v.20.3",
+ "mp4a.40.2",
+ nullptr
+ };
diff --git a/www/firefox-esr/files/patch-bug828003 b/www/firefox-esr/files/patch-bug828003
new file mode 100644
index 000000000000..0a5463bd69b8
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug828003
@@ -0,0 +1,36 @@
+--- gfx/qcms/qcmstypes.h
++++ gfx/qcms/qcmstypes.h
+@@ -7,30 +7,12 @@
+ #include "mozilla/StandardInteger.h"
+
+ /* prtypes.h defines IS_LITTLE_ENDIAN and IS_BIG ENDIAN */
++/* stdint.h defines int*_t and uintptr_t */
+
+-#if defined (__SVR4) && defined (__sun)
+-/* int_types.h gets included somehow, so avoid redefining the types differently */
+-#include <sys/int_types.h>
+-#elif defined (_AIX)
++#if defined (_AIX)
+ #include <sys/types.h>
+-#elif defined(__OpenBSD__)
+-#include <inttypes.h>
+-#elif !defined(ANDROID)
+-typedef int8_t int8_t;
+-typedef uint8_t uint8_t;
+-typedef int16_t int16_t;
+-typedef uint16_t uint16_t;
+-typedef int32_t int32_t;
+-typedef uint32_t uint32_t;
+-typedef int64_t int64_t;
+-typedef uint64_t uint64_t;
+-
+-#ifdef __OS2__
+-/* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
++#elif __OS2__
+ #include <stdlib.h>
+-#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
+-typedef PRUptrdiff uintptr_t;
+-#endif
+ #endif
+
+ #else // MOZ_QCMS
diff --git a/www/firefox-esr/files/patch-clang32-libc++-visibility-hack b/www/firefox-esr/files/patch-clang32-libc++-visibility-hack
new file mode 100644
index 000000000000..ccada32cbee3
--- /dev/null
+++ b/www/firefox-esr/files/patch-clang32-libc++-visibility-hack
@@ -0,0 +1,38 @@
+--- configure.in~
++++ configure.in
+@@ -2855,6 +2855,7 @@ EOF
+ #pragma GCC visibility push(hidden)
+ #pragma GCC visibility push(default)
+ #include <string.h>
++#include <iterator>
+ #pragma GCC visibility pop
+
+ __attribute__ ((visibility ("default"))) void Func() {
+@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() {
+ }
+ EOF
+ ac_cv_have_visibility_builtin_bug=no
+- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
+ ac_cv_have_visibility_builtin_bug=yes
+ else
+ if test `grep -c "@PLT" conftest.S` = 0; then
+--- js/src/configure.in~
++++ js/src/configure.in
+@@ -2855,6 +2855,7 @@ EOF
+ #pragma GCC visibility push(hidden)
+ #pragma GCC visibility push(default)
+ #include <string.h>
++#include <iterator>
+ #pragma GCC visibility pop
+
+ __attribute__ ((visibility ("default"))) void Func() {
+@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() {
+ }
+ EOF
+ ac_cv_have_visibility_builtin_bug=no
+- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
++ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
+ ac_cv_have_visibility_builtin_bug=yes
+ else
+ if test `grep -c "@PLT" conftest.S` = 0; then
diff --git a/www/firefox-esr/files/patch-clang32-visibility-hack b/www/firefox-esr/files/patch-clang32-visibility-hack
deleted file mode 100644
index 7744fed5e17e..000000000000
--- a/www/firefox-esr/files/patch-clang32-visibility-hack
+++ /dev/null
@@ -1,20 +0,0 @@
---- configure.in~
-+++ configure.in
-@@ -3230,6 +3230,7 @@ EOF
- ac_cv_have_visibility_class_bug,
- [cat > conftest.c <<EOF
- #pragma GCC visibility push(hidden)
-+struct TestStruct;
- struct __attribute__ ((visibility ("default"))) TestStruct {
- static void Init();
- };
---- js/src/configure.in~
-+++ js/src/configure.in
-@@ -3230,6 +3230,7 @@ EOF
- ac_cv_have_visibility_class_bug,
- [cat > conftest.c <<EOF
- #pragma GCC visibility push(hidden)
-+struct TestStruct;
- struct __attribute__ ((visibility ("default"))) TestStruct {
- static void Init();
- };
diff --git a/www/firefox-esr/files/patch-config-baseconfig.mk b/www/firefox-esr/files/patch-config-baseconfig.mk
new file mode 100644
index 000000000000..e6fd78f35e7b
--- /dev/null
+++ b/www/firefox-esr/files/patch-config-baseconfig.mk
@@ -0,0 +1,16 @@
+--- config/baseconfig.mk~
++++ config/baseconfig.mk
+@@ -1,9 +1,9 @@
+ 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)
+-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
++includedir := $(includedir)/%%MOZILLA%%
++idldir = $(datadir)/idl/%%MOZILLA%%
++installdir = $(libdir)/%%MOZILLA%%
++sdkdir = $(libdir)/%%MOZILLA%%
+ DIST = $(DEPTH)/dist
+
+ # We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't
diff --git a/www/firefox-esr/files/patch-config_autoconf.mk.in b/www/firefox-esr/files/patch-config_autoconf.mk.in
deleted file mode 100644
index 877c48294fc6..000000000000
--- a/www/firefox-esr/files/patch-config_autoconf.mk.in
+++ /dev/null
@@ -1,21 +0,0 @@
---- config/autoconf.mk.in.orig 2009-04-24 03:46:37.000000000 +0200
-+++ config/autoconf.mk.in 2009-05-11 15:03:26.000000000 +0200
-@@ -57,14 +57,14 @@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
- bindir = @bindir@
--includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+includedir = @includedir@/%%MOZILLA%%
- libdir = @libdir@
- datadir = @datadir@
- mandir = @mandir@
--idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+idldir = $(datadir)/idl/%%MOZILLA%%
-
--installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
--sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
-+installdir = $(libdir)/%%MOZILLA%%
-+sdkdir = $(libdir)/%%MOZILLA%%
-
- DIST = $(DEPTH)/dist
- LIBXUL_SDK = @LIBXUL_SDK@
diff --git a/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp b/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp
new file mode 100644
index 000000000000..bd0f0d4963db
--- /dev/null
+++ b/www/firefox-esr/files/patch-content-media-nsAudioStream.cpp
@@ -0,0 +1,14 @@
+--- content/media/nsAudioStream.cpp~
++++ content/media/nsAudioStream.cpp
+@@ -298,7 +298,11 @@ static int PrefChanged(const char* aPref
+ gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nsnull));
+ }
+ } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) {
++#if defined(__FreeBSD__) && __FreeBSD_version < 800097
++ bool value = Preferences::GetBool(aPref, false);
++#else
+ bool value = Preferences::GetBool(aPref, true);
++#endif
+ mozilla::MutexAutoLock lock(*gAudioPrefsLock);
+ gUseCubeb = value;
+ } else if (strcmp(aPref, PREF_CUBEB_LATENCY) == 0) {
diff --git a/www/firefox-esr/files/patch-dom-ipc-ContentChild.cpp b/www/firefox-esr/files/patch-dom-ipc-ContentChild.cpp
deleted file mode 100644
index 5a2826f3a41d..000000000000
--- a/www/firefox-esr/files/patch-dom-ipc-ContentChild.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- dom/ipc/ContentChild.cpp~
-+++ dom/ipc/ContentChild.cpp
-@@ -42,6 +42,7 @@
- #endif
-
- #ifdef MOZ_WIDGET_QT
-+#include <unistd.h>
- #include "nsQAppInstance.h"
- #endif
-
diff --git a/www/firefox-esr/files/patch-extensions-spellcheck-hunspell-src-mozHunspell.cpp b/www/firefox-esr/files/patch-extensions-spellcheck-hunspell-src-mozHunspell.cpp
index 419955d77ff1..161feb2ca7b5 100644
--- a/www/firefox-esr/files/patch-extensions-spellcheck-hunspell-src-mozHunspell.cpp
+++ b/www/firefox-esr/files/patch-extensions-spellcheck-hunspell-src-mozHunspell.cpp
@@ -7,7 +7,7 @@
+ // load system hunspell dictionaries
+ nsIFile* hunDir;
+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+ true, (nsILocalFile**)&hunDir);
++ true, &hunDir);
+ LoadDictionariesFromDir(hunDir);
+
// find dictionaries from extensions requiring restart
diff --git a/www/firefox-esr/files/patch-gfx-qcms-qcmstypes.h b/www/firefox-esr/files/patch-gfx-qcms-qcmstypes.h
deleted file mode 100644
index 33d9e3356b77..000000000000
--- a/www/firefox-esr/files/patch-gfx-qcms-qcmstypes.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- gfx/qcms/qcmstypes.h.orig 2010-11-22 12:01:36.000000000 +0100
-+++ gfx/qcms/qcmstypes.h 2010-11-22 12:02:42.000000000 +0100
-@@ -25,7 +25,7 @@
- #ifdef __OS2__
- /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
- #include <stdlib.h>
--#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
-+#elif !defined(__intptr_t_defined) && !defined(_INTPTR_T_DECLARED)
- typedef PRUptrdiff uintptr_t;
- #endif
- #endif
diff --git a/www/firefox-esr/files/patch-js-src-configure.in b/www/firefox-esr/files/patch-js-src-js-confdefs.h.in
index fc8e66185a87..cb032237b2cc 100644
--- a/www/firefox-esr/files/patch-js-src-configure.in
+++ b/www/firefox-esr/files/patch-js-src-js-confdefs.h.in
@@ -1,6 +1,6 @@
---- js/src/configure.in.orig 2012-01-29 11:24:33.000000000 +0100
-+++ js/src/configure.in 2012-01-30 23:30:02.051087215 +0100
-@@ -5946,6 +5946,7 @@ _EGREP_PATTERN="${_EGREP_PATTERN}dummy_n
+--- js/src/js-confdefs.h.in~
++++ js/src/js-confdefs.h.in
+@@ -12,6 +12,7 @@
* C++ implementations should define these macros only when __STDC_LIMIT_MACROS
* is defined before <stdint.h> is included. */
#define __STDC_LIMIT_MACROS
diff --git a/www/firefox-esr/files/patch-toolkit-xre-nsEmbedFunctions.cpp b/www/firefox-esr/files/patch-toolkit-xre-nsEmbedFunctions.cpp
deleted file mode 100644
index 6c493d940fe7..000000000000
--- a/www/firefox-esr/files/patch-toolkit-xre-nsEmbedFunctions.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- toolkit/xre/nsEmbedFunctions.cpp~
-+++ toolkit/xre/nsEmbedFunctions.cpp
-@@ -36,6 +36,7 @@
- * ***** END LICENSE BLOCK ***** */
-
- #if defined(MOZ_WIDGET_QT)
-+#include <unistd.h>
- #include "nsQAppInstance.h"
- #endif
-
diff --git a/www/firefox-esr/files/patch-z-bug762445 b/www/firefox-esr/files/patch-z-bug762445
new file mode 100644
index 000000000000..fd42fea9cab2
--- /dev/null
+++ b/www/firefox-esr/files/patch-z-bug762445
@@ -0,0 +1,70 @@
+commit b44dc8e
+Author: Jan Beich <jbeich@tormail.org>
+Date: Fri Oct 12 18:49:59 2012 +0000
+
+ Bug 762445 - Add jemalloc3 glue for heap-committed, heap-dirty in about:memory.
+---
+ memory/build/mozjemalloc_compat.c | 34 ++++++++++++++++++++++++++++------
+ 1 file changed, 28 insertions(+), 6 deletions(-)
+
+diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
+index 94ad96e..7adfef5 100644
+--- memory/build/mozjemalloc_compat.c
++++ memory/build/mozjemalloc_compat.c
+@@ -11,15 +11,50 @@
+ #define wrap(a) je_ ## a
+ #endif
+
+-extern MOZ_IMPORT_API(int)
++/*
++ * CTL_* macros are from memory/jemalloc/src/src/stats.c with changes:
++ * - drop `t' argument to avoid redundancy in calculating type size
++ * - require `i' argument for arena number explicitly
++ */
++
++#define CTL_GET(n, v) do { \
++ size_t sz = sizeof(v); \
++ wrap(mallctl)(n, &v, &sz, NULL, 0); \
++} while (0)
++
++#define CTL_I_GET(n, v, i) do { \
++ size_t mib[6]; \
++ size_t miblen = sizeof(mib) / sizeof(mib[0]); \
++ size_t sz = sizeof(v); \
++ wrap(mallctlnametomib)(n, mib, &miblen); \
++ mib[2] = i; \
++ wrap(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \
++} while (0)
++
++MOZ_IMPORT_API(int)
+ wrap(mallctl)(const char*, void*, size_t*, void*, size_t);
++MOZ_IMPORT_API(int)
++wrap(mallctlnametomib)(const char *name, size_t *mibp, size_t *miblenp);
++MOZ_IMPORT_API(int)
++wrap(mallctlbymib)(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+
+ MOZ_EXPORT_API(void)
+ jemalloc_stats(jemalloc_stats_t *stats)
+ {
+- size_t size = sizeof(stats->mapped);
+- wrap(mallctl)("stats.mapped", &stats->mapped, &size, NULL, 0);
+- wrap(mallctl)("stats.allocated", &stats->allocated, &size, NULL, 0);
+- stats->committed = -1;
+- stats->dirty = -1;
++ unsigned narenas;
++ size_t active, allocated, mapped, page, pdirty;
++
++ CTL_GET("arenas.narenas", narenas);
++ CTL_GET("arenas.page", page);
++ CTL_GET("stats.active", active);
++ CTL_GET("stats.allocated", allocated);
++ CTL_GET("stats.mapped", mapped);
++
++ /* get the summation for all arenas, i == narenas */
++ CTL_I_GET("stats.arenas.0.pdirty", pdirty, narenas);
++
++ stats->allocated = allocated;
++ stats->mapped = mapped;
++ stats->dirty = pdirty * page;
++ stats->committed = active + stats->dirty;
+ }
diff --git a/www/firefox-esr/pkg-descr b/www/firefox-esr/pkg-descr
index c9f27891b898..faddf782e71f 100644
--- a/www/firefox-esr/pkg-descr
+++ b/www/firefox-esr/pkg-descr
@@ -1,5 +1,5 @@
Mozilla Firefox is a free and open source web browser descended from the
-Mozilla Application Suite. It is small, fast and easy to use, and offers
+Mozilla Application Suite. It is small, fast and easy to use, and offers
many advanced features:
o Popup Blocking