aboutsummaryrefslogtreecommitdiff
path: root/mail/thunderbird
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-08-04 09:11:25 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-08-04 09:11:25 +0000
commitf92079c61ea2516fd5b1514bae10c743ba63b699 (patch)
tree1e9acf477fa72cf7c888cc484c96bd4f207a487a /mail/thunderbird
parent397fa72062e7ed8fab7c8a395a1f9475d9723709 (diff)
downloadports-f92079c61ea2516fd5b1514bae10c743ba63b699.tar.gz
ports-f92079c61ea2516fd5b1514bae10c743ba63b699.zip
Notes
Diffstat (limited to 'mail/thunderbird')
-rw-r--r--mail/thunderbird/Makefile75
-rw-r--r--mail/thunderbird/distinfo8
-rw-r--r--mail/thunderbird/files/patch-bug10136753
-rw-r--r--mail/thunderbird/files/patch-bug101554711
-rw-r--r--mail/thunderbird/files/patch-bug102649968
-rw-r--r--mail/thunderbird/files/patch-bug102682820
-rw-r--r--mail/thunderbird/files/patch-bug104179548
-rw-r--r--mail/thunderbird/files/patch-bug292127232
-rw-r--r--mail/thunderbird/files/patch-bug70217936
-rw-r--r--mail/thunderbird/files/patch-bug77971375
-rw-r--r--mail/thunderbird/files/patch-bug78346314
-rw-r--r--mail/thunderbird/files/patch-bug803480102
-rw-r--r--mail/thunderbird/files/patch-bug807492628
-rw-r--r--mail/thunderbird/files/patch-bug81071668
-rw-r--r--mail/thunderbird/files/patch-bug82698552
-rw-r--r--mail/thunderbird/files/patch-bug847568 (renamed from mail/thunderbird/files/patch-z-bug847568)93
-rw-r--r--mail/thunderbird/files/patch-bug851992339
-rw-r--r--mail/thunderbird/files/patch-bug87615613
-rw-r--r--mail/thunderbird/files/patch-bug87879111
-rw-r--r--mail/thunderbird/files/patch-bug88618111
-rw-r--r--mail/thunderbird/files/patch-bug889699175
-rw-r--r--mail/thunderbird/files/patch-bug893397201
-rw-r--r--mail/thunderbird/files/patch-bug910875102
-rw-r--r--mail/thunderbird/files/patch-bug91621639
-rw-r--r--mail/thunderbird/files/patch-bug91658935
-rw-r--r--mail/thunderbird/files/patch-bug91817736
-rw-r--r--mail/thunderbird/files/patch-bug945046130
-rw-r--r--mail/thunderbird/files/patch-bug94656044
-rw-r--r--mail/thunderbird/files/patch-bug9612648
-rw-r--r--mail/thunderbird/files/patch-bug96181648
-rw-r--r--mail/thunderbird/files/patch-bug96234511
-rw-r--r--mail/thunderbird/files/patch-bug97563463
-rw-r--r--mail/thunderbird/files/patch-bug97745727
-rw-r--r--mail/thunderbird/files/patch-bug98134841
-rw-r--r--mail/thunderbird/files/patch-bug98584822
-rw-r--r--mail/thunderbird/files/patch-clang34-disable-stdcall4
-rw-r--r--mail/thunderbird/files/patch-config-baseconfig.mk4
-rw-r--r--mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in13
-rw-r--r--mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc11
-rw-r--r--mail/thunderbird/files/patch-z-bug517422 (renamed from mail/thunderbird/files/patch-zz-bug517422)232
40 files changed, 731 insertions, 2422 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index b8df941dd717..d8d0d001f808 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -2,55 +2,55 @@
# $FreeBSD$
PORTNAME= thunderbird
-DISTVERSION= 24.6.0
-PORTREVISION= 3
+DISTVERSION= 31.0
CATEGORIES= mail news net-im ipv6
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
- https://ftp.mozilla.org/pub/mozilla.org/${PORTNAME}/candidates/${DISTVERSION}-candidates/build2/source/
+ https://ftp.mozilla.org/pub/mozilla.org/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source/
DISTFILES= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX}
EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}.source${EXTRACT_SUFX}
MAINTAINER= gecko@FreeBSD.org
COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
-BUILD_DEPENDS= nspr>=4.10.2:${PORTSDIR}/devel/nspr \
- nss>=3.15.4:${PORTSDIR}/security/nss \
- sqlite3>=3.7.17:${PORTSDIR}/databases/sqlite3 \
- ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
- cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
- soundtouch>=1.7.0:${PORTSDIR}/audio/soundtouch \
- harfbuzz>=0.9.16:${PORTSDIR}/print/harfbuzz \
- graphite2>=1.2.3:${PORTSDIR}/graphics/graphite2 \
+BUILD_DEPENDS= nspr>=4.10.6:${PORTSDIR}/devel/nspr \
+ nss>=3.16:${PORTSDIR}/security/nss \
+ soundtouch>=1.8.0:${PORTSDIR}/audio/soundtouch \
+ harfbuzz>=0.9.25:${PORTSDIR}/print/harfbuzz \
+ graphite2>=1.2.4:${PORTSDIR}/graphics/graphite2 \
libvorbis>=1.3.4:${PORTSDIR}/audio/libvorbis \
opus>=1.1:${PORTSDIR}/audio/opus \
+ libvpx>=1.3.0:${PORTSDIR}/multimedia/libvpx \
+ sqlite3>=3.8.4.2:${PORTSDIR}/databases/sqlite3 \
+ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
v4l_compat>0:${PORTSDIR}/multimedia/v4l_compat \
zip:${PORTSDIR}/archivers/zip \
unzip:${PORTSDIR}/archivers/unzip
+# cairo>=1.12.16,2:${PORTSDIR}/graphics/cairo \
+
LIB_DEPENDS= libv4l2.so:${PORTSDIR}/multimedia/libv4l
-EM_VERSION= 1.6
-L_VERSION= 2.6.5
+EM_VERSION= 1.7
+L_VERSION= 3.3
SSP_UNSAFE= yes
USE_AUTOTOOLS= autoconf213:env
USE_PYTHON_BUILD=2
OBJDIR_BUILD= # in-tree build broken after bug 789837
USE_GECKO= gecko
-USE_MOZILLA= # empty
+USE_MOZILLA= -cairo
WANT_GNOME= yes
-USE_QT4= # empty
+USE_QT5= # empty
QT_NONSTANDARD= yes
ALL_TARGET= default
USE_GL= gl
USES= dos2unix tar:bzip2
DOS2UNIX_FILES= mozilla/media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp
-MOZ_PROTOCOLS= http,ftp,file,viewsource,res,data,wyciwyg,websocket
MOZ_OPTIONS= --program-transform-name='s/thunderbird/${MOZILLA}/' \
--enable-single-profile --disable-profilesharing \
--enable-application=mail --enable-official-branding
-MOZ_MK_OPTIONS= MOZ_MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
+MOZ_MK_OPTIONS= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
MOZ_EXPORT= MOZ_THUNDERBIRD=1 MAIL_PKG_SHARED=1
MOZ_PKGCONFIG_FILES=
@@ -74,13 +74,34 @@ OPTIONS_DEFAULT:=${OPTIONS_DEFAULT:S/GSTREAMER//}
.include <bsd.port.pre.mk>
-WRKSRC= ${WRKDIR}/comm-esr24
+WRKSRC= ${WRKDIR}/comm-esr31
MOZSRC:= ${WRKSRC}/mozilla
XPI_LIBDIR= ${PREFIX}/lib/xpi
+# avoid clang 3.2/3.3 crash in js/src/jsgc.cpp on refillFreeList<(js::AllowGC)1>
+# http://svnweb.freebsd.org/changeset/base/255804
+.if ${CHOSEN_COMPILER_TYPE} == clang && ${ARCH} == i386 && ${OSVERSION} < 1000056
+. if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
+BROKEN= Cannot build with OPTIMIZED_CFLAGS option due to \
+ a ${CHOSEN_COMPILER_TYPE} bug: unset the option or \
+ use FAVORITE_COMPILER=gcc in Makefile.local/make.conf
+# apply workaround only for -O2 or greater
+. elif ${CXXFLAGS:M-O*} && ! ${CXXFLAGS:M-O[01]}
+. if ${MACHINE_CPU:Msse2}
+CXXFLAGS+= -msse2
+. else
+CXXFLAGS+= -O1
+. endif
+. endif
+.endif
+
.if ${PORT_OPTIONS:MALSA}
-BUILD_DEPENDS+= alsa-lib>=1.0.27.2_1:${PORTSDIR}/audio/alsa-lib
+RUN_DEPENDS+= alsa-lib>=1.0.27.2_1:${PORTSDIR}/audio/alsa-lib
+.endif
+
+.if ${PORT_OPTIONS:MGSTREAMER}
+RUN_DEPENDS+= gstreamer1-libav>=1.2.4_1:${PORTSDIR}/multimedia/gstreamer1-libav
.endif
.if ${PORT_OPTIONS:MENIGMAIL}
@@ -89,7 +110,7 @@ DISTFILES+= ${EM_DISTFILE}:enigmail
RUN_DEPENDS+= gpg:${PORTSDIR}/security/gnupg
EM_DISTNAME= enigmail-${EM_VERSION}
EM_DISTFILE= ${EM_DISTNAME}.tar.gz
-EM_XPI_FILE= ${MOZ_OBJDIR}/mozilla/dist/bin/${EM_DISTNAME}-${OPSYS:tl}-${ARCH:S/amd64/x86_64/}.xpi
+EM_XPI_FILE= ${WRKSRC}/mailnews/extensions/enigmail/build/${EM_DISTNAME}-${OPSYS:tl}-${ARCH:S/amd64/x86_64/:S/i386/x86/}-gcc3.xpi
EM_ORIG_ID= {847b3a00-7ab1-11d4-8f02-006008948af5}
EM_ID= ${PORTNAME}@mozilla-enigmail.org
EM_ID_RFILES= ${XPI_LIBDIR}/${EM_ID}/install.rdf \
@@ -123,10 +144,12 @@ post-patch:
${WRKSRC}/mail/app/nsMailApp.cpp
.if ${PORT_OPTIONS:MENIGMAIL}
@${REINPLACE_CMD} -e 's,/usr/bin/perl,${PERL},' \
- ${WRKSRC}/mailnews/extensions/enigmail/makemake
+ ${WRKSRC}/mailnews/extensions/enigmail/util/fixlang.pl \
+ ${WRKSRC}/mailnews/extensions/enigmail/util/make-lang-xpi.pl
@${REINPLACE_CMD} -e '/^xpi/s/$$/ all/' \
+ -e '/^all/s/ xpi//' \
-e '/^XPI_MODULE_VERS/s/= .*/= ${EM_VERSION}/' \
- ${WRKSRC}/mailnews/extensions/enigmail/Makefile.in
+ ${WRKSRC}/mailnews/extensions/enigmail/Makefile
@${REINPLACE_CMD} -e '/em:version/s,>[^<]*<,>${EM_VERSION}<,' \
-e '/em:maxVersion/s/pre//' \
${WRKSRC}/mailnews/extensions/enigmail/package/install.rdf
@@ -138,11 +161,13 @@ pre-configure:
(cd ${MOZSRC}/js/src/ && ${AUTOCONF})
.if ${PORT_OPTIONS:MENIGMAIL}
+post-configure:
+ cd ${WRKSRC}/mailnews/extensions/enigmail/ && \
+ ${SETENV} ${MAKE_ENV} ./configure
+
post-build:
- cd ${WRKSRC}/mailnews/extensions/enigmail && \
- ./makemake -r -o ${MOZ_OBJDIR}
${SETENV} ${MAKE_ENV} ${MAKE_CMD} -j${MAKE_JOBS_NUMBER} all xpi \
- -C ${MOZ_OBJDIR}/mailnews/extensions/enigmail
+ -C ${WRKSRC}/mailnews/extensions/enigmail
.endif
port-pre-install:
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo
index 0e5920fd5c3b..3a2e5612dd77 100644
--- a/mail/thunderbird/distinfo
+++ b/mail/thunderbird/distinfo
@@ -1,4 +1,4 @@
-SHA256 (thunderbird-24.6.0.source.tar.bz2) = ae9a7cbc8dc195bd9f4b7b4edcd33599fa08c5388a0690f77221e6c5566629ea
-SIZE (thunderbird-24.6.0.source.tar.bz2) = 140120461
-SHA256 (enigmail-1.6.tar.gz) = 10d5eb7ba364b9b6e6275aae8bba1d0e4321ed7d55a715337d566ccf2a56ea4d
-SIZE (enigmail-1.6.tar.gz) = 1231111
+SHA256 (thunderbird-31.0.source.tar.bz2) = 571f8cca980f077ae81999aea69a78153422a75e9e6c07ab74ec6659fe0d6ef4
+SIZE (thunderbird-31.0.source.tar.bz2) = 170977129
+SHA256 (enigmail-1.7.tar.gz) = cddbf35783194a4e994f9584ad5bee74750e25f690e81727ba9eccc4f814f161
+SIZE (enigmail-1.7.tar.gz) = 1414100
diff --git a/mail/thunderbird/files/patch-bug1013675 b/mail/thunderbird/files/patch-bug1013675
index 0632acbf91f5..c8b0a6bf02d0 100644
--- a/mail/thunderbird/files/patch-bug1013675
+++ b/mail/thunderbird/files/patch-bug1013675
@@ -2,7 +2,7 @@ diff --git xpcom/base/nsDebugImpl.cpp xpcom/base/nsDebugImpl.cpp
index 13a286f..293bd73 100644
--- mozilla/xpcom/base/nsDebugImpl.cpp
+++ mozilla/xpcom/base/nsDebugImpl.cpp
-@@ -45,13 +45,44 @@
+@@ -45,12 +45,43 @@
#endif
#endif
@@ -10,7 +10,6 @@ index 13a286f..293bd73 100644
+#if defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
+ || defined(__NetBSD__) || defined(__OpenBSD__)
#include <stdbool.h>
- #include <sys/types.h>
#include <unistd.h>
+#include <sys/param.h>
#include <sys/sysctl.h>
diff --git a/mail/thunderbird/files/patch-bug1015547 b/mail/thunderbird/files/patch-bug1015547
index f3cd7494c301..8e6189444b50 100644
--- a/mail/thunderbird/files/patch-bug1015547
+++ b/mail/thunderbird/files/patch-bug1015547
@@ -2,11 +2,12 @@ diff --git configure.in configure.in
index 7bed45f..053de17 100644
--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -3166,6 +3166,7 @@ AC_CHECK_FUNCS(random strerror lchown fc
- AC_CHECK_FUNCS(statvfs64 statvfs statfs64 statfs)
- AC_CHECK_FUNCS(flockfile getpagesize)
- AC_CHECK_FUNCS(localtime_r strtok_r)
-+AC_CHECK_FUNCS(arc4random arc4random_buf)
+@@ -2950,7 +2950,7 @@ dnl Checks for library functions.
+ dnl ========================================================
+ AC_PROG_GCC_TRADITIONAL
+ AC_FUNC_MEMCMP
+-AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize localtime_r)
++AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize localtime_r arc4random arc4random_buf)
dnl check for clock_gettime(), the CLOCK_MONOTONIC clock
AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
diff --git a/mail/thunderbird/files/patch-bug1026499 b/mail/thunderbird/files/patch-bug1026499
new file mode 100644
index 000000000000..729f91a5d8d4
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1026499
@@ -0,0 +1,68 @@
+commit 8d0efe4
+Author: Martin Husemann <martin@NetBSD.org>
+Date: Wed Jun 18 18:12:22 2014 +0200
+
+ Bug 1026499 - Use MOZ_ALIGNED_DECL to declare union members in ipdl value declarations. r=bsmedberg
+---
+ ipc/ipdl/ipdl/cxx/ast.py | 7 ++++---
+ ipc/ipdl/ipdl/cxx/cgen.py | 5 ++++-
+ ipc/ipdl/ipdl/lower.py | 2 +-
+ 4 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git ipc/ipdl/ipdl/cxx/ast.py ipc/ipdl/ipdl/cxx/ast.py
+index 3180a65..c2d945b 100644
+--- mozilla/ipc/ipdl/ipdl/cxx/ast.py
++++ mozilla/ipc/ipdl/ipdl/cxx/ast.py
+@@ -336,12 +336,13 @@ Type.VOID = Type('void')
+ Type.VOIDPTR = Type('void', ptr=1)
+
+ class TypeArray(Node):
+- def __init__(self, basetype, nmemb):
+- '''the type |basetype DECLNAME[nmemb]|. |nmemb| is an Expr'''
++ def __init__(self, basetype, nmemb, alignType):
++ '''the type |basetype DECLNAME[nmemb]|. |nmemb| is an Expr, |alignType| is a type'''
+ self.basetype = basetype
+ self.nmemb = nmemb
++ self.alignType = alignType
+ def __deepcopy__(self, memo):
+- return TypeArray(deepcopy(self.basetype, memo), nmemb)
++ return TypeArray(deepcopy(self.basetype, memo), nmemb, alignType)
+
+ class TypeEnum(Node):
+ def __init__(self, name=None):
+diff --git ipc/ipdl/ipdl/cxx/cgen.py ipc/ipdl/ipdl/cxx/cgen.py
+index 48b0988..bc914cf 100644
+--- mozilla/ipc/ipdl/ipdl/cxx/cgen.py
++++ mozilla/ipc/ipdl/ipdl/cxx/cgen.py
+@@ -101,6 +101,7 @@ class CxxCodeGen(CodePrinter, Visitor):
+ def visitDecl(self, d):
+ # C-syntax arrays make code generation much more annoying
+ if isinstance(d.type, TypeArray):
++ self.write('MOZ_ALIGNED_DECL(')
+ d.type.basetype.accept(self)
+ else:
+ d.type.accept(self)
+@@ -111,7 +112,9 @@ class CxxCodeGen(CodePrinter, Visitor):
+ if isinstance(d.type, TypeArray):
+ self.write('[')
+ d.type.nmemb.accept(self)
+- self.write(']')
++ self.write('], MOZ_ALIGNOF(')
++ d.type.alignType.accept(self)
++ self.write('))')
+
+ def visitParam(self, p):
+ self.visitDecl(p)
+diff --git ipc/ipdl/ipdl/lower.py ipc/ipdl/ipdl/lower.py
+index e97a34c..9360f3c 100644
+--- mozilla/ipc/ipdl/ipdl/lower.py
++++ mozilla/ipc/ipdl/ipdl/lower.py
+@@ -768,7 +768,7 @@ IPDL union type."""
+ if self.recursive:
+ return self.ptrToType()
+ else:
+- return TypeArray(Type('char'), ExprSizeof(self.internalType()))
++ return TypeArray(Type('char'), ExprSizeof(self.internalType()), self.internalType())
+
+ def unionValue(self):
+ # NB: knows that Union's storage C union is named |mValue|
diff --git a/mail/thunderbird/files/patch-bug1026828 b/mail/thunderbird/files/patch-bug1026828
new file mode 100644
index 000000000000..b52dcd4e9788
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1026828
@@ -0,0 +1,20 @@
+diff --git storage/src/moz.build storage/src/moz.build
+index 4cd2551..5c40536 100644
+--- mozilla/storage/src/moz.build
++++ mozilla/storage/src/moz.build
+@@ -50,11 +50,14 @@ FINAL_LIBRARY = 'storagecomps'
+ # (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).
++# However, this is not an issue if both the jemalloc allocator and the default
++# allocator are the same thing.
+ #
+ # 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.
+-if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_NATIVE_SQLITE']:
++if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE']
++ or CONFIG['MOZ_NATIVE_JEMALLOC']):
+ if CONFIG['OS_TARGET'] != 'Android':
+ DEFINES['MOZ_STORAGE_MEMORY'] = True
+
diff --git a/mail/thunderbird/files/patch-bug1041795 b/mail/thunderbird/files/patch-bug1041795
new file mode 100644
index 000000000000..5164776bdde7
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug1041795
@@ -0,0 +1,48 @@
+diff --git config/rules.mk config/rules.mk
+index 4d67eda..783942f 100644
+--- mozilla/config/rules.mk
++++ mozilla/config/rules.mk
+@@ -858,7 +858,7 @@ ifdef DTRACE_PROBE_OBJ
+ ifndef DTRACE_LIB_DEPENDENT
+ NON_DTRACE_OBJS := $(filter-out $(DTRACE_PROBE_OBJ),$(OBJS))
+ $(DTRACE_PROBE_OBJ): $(NON_DTRACE_OBJS)
+- dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(NON_DTRACE_OBJS)
++ dtrace -x nolibs -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(NON_DTRACE_OBJS)
+ endif
+ endif
+ endif
+@@ -876,7 +876,7 @@ ifndef INCREMENTAL_LINKER
+ endif
+ ifdef DTRACE_LIB_DEPENDENT
+ ifndef XP_MACOSX
+- dtrace -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
++ dtrace -x nolibs -G -C -s $(MOZILLA_DTRACE_SRC) -o $(DTRACE_PROBE_OBJ) $(shell $(EXPAND_LIBS) $(MOZILLA_PROBE_LIBS))
+ endif
+ $(EXPAND_MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(SUB_SHLOBJS) $(DTRACE_PROBE_OBJ) $(MOZILLA_PROBE_LIBS) $(RESFILE) $(LDFLAGS) $(WRAP_LDFLAGS) $(SHARED_LIBRARY_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE) $(if $(LIB_IS_C_ONLY),,$(STLPORT_LIBS))
+ @$(RM) $(DTRACE_PROBE_OBJ)
+diff --git js/src/Makefile.in js/src/Makefile.in
+index 28ca5e8..96793d7 100644
+--- mozilla/js/src/Makefile.in
++++ mozilla/js/src/Makefile.in
+@@ -342,7 +342,7 @@ endif
+
+ ifdef HAVE_DTRACE
+ $(CURDIR)/javascript-trace.h: $(srcdir)/devtools/javascript-trace.d
+- dtrace -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in
++ dtrace -x nolibs -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in
+ sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
+ -e '/const/!s/char \*/const char */g' \
+ javascript-trace.h.in > javascript-trace.h
+diff --git probes/Makefile.in probes/Makefile.in
+index 6d18f34..deec83f 100644
+--- mozilla/probes/Makefile.in
++++ mozilla/probes/Makefile.in
+@@ -7,7 +7,7 @@ export:: $(DIST)/include/mozilla-trace.h
+
+ # Replace _DTRACE_VERSION with INCLUDE_MOZILLA_DTRACE
+ $(DIST)/include/mozilla-trace.h: mozilla-trace.d Makefile
+- dtrace -h -s $(srcdir)/mozilla-trace.d -o mozilla-trace.h.tmp
++ dtrace -x nolibs -h -s $(srcdir)/mozilla-trace.d -o mozilla-trace.h.tmp
+ sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
+ mozilla-trace.h.tmp > $(DIST)/include/mozilla-trace.h
+ rm mozilla-trace.h.tmp
diff --git a/mail/thunderbird/files/patch-bug292127 b/mail/thunderbird/files/patch-bug292127
new file mode 100644
index 000000000000..c20ff1d564a3
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug292127
@@ -0,0 +1,232 @@
+--- ldap/sdks/c-sdk/ldap/include/ldap.h~
++++ ldap/sdks/c-sdk/ldap/include/ldap.h
+@@ -40,6 +40,229 @@
+ #ifndef _LDAP_H
+ #define _LDAP_H
+
++/* rename symbols to not clash with openldap (bug 292127) */
++#define ldap_abandon moz_ldap_abandon
++#define ldap_abandon_ext moz_ldap_abandon_ext
++#define ldap_abandoned moz_ldap_abandoned
++#define ldap_add moz_ldap_add
++#define ldap_add_ext moz_ldap_add_ext
++#define ldap_add_ext_s moz_ldap_add_ext_s
++#define ldap_add_result_entry moz_ldap_add_result_entry
++#define ldap_add_s moz_ldap_add_s
++#define ldap_ber_free moz_ldap_ber_free
++#define ldap_bind moz_ldap_bind
++#define ldap_bind_s moz_ldap_bind_s
++#define ldap_build_filter moz_ldap_build_filter
++#define ldap_cache_flush moz_ldap_cache_flush
++#define ldap_charray_add moz_ldap_charray_add
++#define ldap_charray_dup moz_ldap_charray_dup
++#define ldap_charray_free moz_ldap_charray_free
++#define ldap_charray_inlist moz_ldap_charray_inlist
++#define ldap_charray_merge moz_ldap_charray_merge
++#define ldap_charray_position moz_ldap_charray_position
++#define ldap_compare moz_ldap_compare
++#define ldap_compare_ext moz_ldap_compare_ext
++#define ldap_compare_ext_s moz_ldap_compare_ext_s
++#define ldap_compare_s moz_ldap_compare_s
++#define ldap_control_free moz_ldap_control_free
++#define ldap_controls_free moz_ldap_controls_free
++#define ldap_count_entries moz_ldap_count_entries
++#define ldap_count_messages moz_ldap_count_messages
++#define ldap_count_references moz_ldap_count_references
++#define ldap_count_values moz_ldap_count_values
++#define ldap_count_values_len moz_ldap_count_values_len
++#define ldap_create_authzid_control moz_ldap_create_authzid_control
++#define ldap_create_filter moz_ldap_create_filter
++#define ldap_create_geteffectiveRights_control moz_ldap_create_geteffectiveRights_control
++#define ldap_create_passwordpolicy_control moz_ldap_create_passwordpolicy_control
++#define ldap_create_passwordpolicy_control_ext moz_ldap_create_passwordpolicy_control_ext
++#define ldap_create_persistentsearch_control moz_ldap_create_persistentsearch_control
++#define ldap_create_proxiedauth_control moz_ldap_create_proxiedauth_control
++#define ldap_create_proxyauth_control moz_ldap_create_proxyauth_control
++#define ldap_create_sort_control moz_ldap_create_sort_control
++#define ldap_create_sort_keylist moz_ldap_create_sort_keylist
++#define ldap_create_userstatus_control moz_ldap_create_userstatus_control
++#define ldap_create_virtuallist_control moz_ldap_create_virtuallist_control
++#define ldap_delete moz_ldap_delete
++#define ldap_delete_ext moz_ldap_delete_ext
++#define ldap_delete_ext_s moz_ldap_delete_ext_s
++#define ldap_delete_result_entry moz_ldap_delete_result_entry
++#define ldap_delete_s moz_ldap_delete_s
++#define ldap_dn2ufn moz_ldap_dn2ufn
++#define ldap_entry2html moz_ldap_entry2html
++#define ldap_entry2html_search moz_ldap_entry2html_search
++#define ldap_entry2text moz_ldap_entry2text
++#define ldap_entry2text_search moz_ldap_entry2text_search
++#define ldap_err2string moz_ldap_err2string
++#define ldap_errlist moz_ldap_errlist
++#define ldap_explode moz_ldap_explode
++#define ldap_explode_dn moz_ldap_explode_dn
++#define ldap_explode_dns moz_ldap_explode_dns
++#define ldap_explode_rdn moz_ldap_explode_rdn
++#define ldap_extended_operation moz_ldap_extended_operation
++#define ldap_extended_operation_s moz_ldap_extended_operation_s
++#define ldap_find_control moz_ldap_find_control
++#define ldap_first_attribute moz_ldap_first_attribute
++#define ldap_first_disptmpl moz_ldap_first_disptmpl
++#define ldap_first_entry moz_ldap_first_entry
++#define ldap_first_message moz_ldap_first_message
++#define ldap_first_reference moz_ldap_first_reference
++#define ldap_first_searchobj moz_ldap_first_searchobj
++#define ldap_first_tmplcol moz_ldap_first_tmplcol
++#define ldap_first_tmplrow moz_ldap_first_tmplrow
++#define ldap_free_friendlymap moz_ldap_free_friendlymap
++#define ldap_free_searchprefs moz_ldap_free_searchprefs
++#define ldap_free_sort_keylist moz_ldap_free_sort_keylist
++#define ldap_free_templates moz_ldap_free_templates
++#define ldap_free_urldesc moz_ldap_free_urldesc
++#define ldap_friendly_name moz_ldap_friendly_name
++#define ldap_get_dn moz_ldap_get_dn
++#define ldap_get_entry_controls moz_ldap_get_entry_controls
++#define ldap_get_lang_values moz_ldap_get_lang_values
++#define ldap_get_lang_values_len moz_ldap_get_lang_values_len
++#define ldap_get_lderrno moz_ldap_get_lderrno
++#define ldap_get_option moz_ldap_get_option
++#define ldap_get_values moz_ldap_get_values
++#define ldap_get_values_len moz_ldap_get_values_len
++#define ldap_getfilter_free moz_ldap_getfilter_free
++#define ldap_getfirstfilter moz_ldap_getfirstfilter
++#define ldap_getnextfilter moz_ldap_getnextfilter
++#define ldap_init moz_ldap_init
++#define ldap_init_getfilter moz_ldap_init_getfilter
++#define ldap_init_getfilter_buf moz_ldap_init_getfilter_buf
++#define ldap_init_searchprefs moz_ldap_init_searchprefs
++#define ldap_init_searchprefs_buf moz_ldap_init_searchprefs_buf
++#define ldap_init_templates moz_ldap_init_templates
++#define ldap_init_templates_buf moz_ldap_init_templates_buf
++#define ldap_is_dns_dn moz_ldap_is_dns_dn
++#define ldap_is_ldap_url moz_ldap_is_ldap_url
++#define ldap_keysort_entries moz_ldap_keysort_entries
++#define ldap_ld_free moz_ldap_ld_free
++#define ldap_memcache_abandon moz_ldap_memcache_abandon
++#define ldap_memcache_append moz_ldap_memcache_append
++#define ldap_memcache_createkey moz_ldap_memcache_createkey
++#define ldap_memcache_destroy moz_ldap_memcache_destroy
++#define ldap_memcache_flush moz_ldap_memcache_flush
++#define ldap_memcache_flush_results moz_ldap_memcache_flush_results
++#define ldap_memcache_get moz_ldap_memcache_get
++#define ldap_memcache_init moz_ldap_memcache_init
++#define ldap_memcache_new moz_ldap_memcache_new
++#define ldap_memcache_result moz_ldap_memcache_result
++#define ldap_memcache_set moz_ldap_memcache_set
++#define ldap_memcache_update moz_ldap_memcache_update
++#define ldap_memfree moz_ldap_memfree
++#define ldap_modify moz_ldap_modify
++#define ldap_modify_ext moz_ldap_modify_ext
++#define ldap_modify_ext_s moz_ldap_modify_ext_s
++#define ldap_modify_s moz_ldap_modify_s
++#define ldap_modrdn moz_ldap_modrdn
++#define ldap_modrdn2 moz_ldap_modrdn2
++#define ldap_modrdn2_s moz_ldap_modrdn2_s
++#define ldap_modrdn_s moz_ldap_modrdn_s
++#define ldap_mods_free moz_ldap_mods_free
++#define ldap_msgdelete moz_ldap_msgdelete
++#define ldap_msgfree moz_ldap_msgfree
++#define ldap_msgid moz_ldap_msgid
++#define ldap_msgtype moz_ldap_msgtype
++#define ldap_multisort_entries moz_ldap_multisort_entries
++#define ldap_name2template moz_ldap_name2template
++#define ldap_next_attribute moz_ldap_next_attribute
++#define ldap_next_disptmpl moz_ldap_next_disptmpl
++#define ldap_next_entry moz_ldap_next_entry
++#define ldap_next_message moz_ldap_next_message
++#define ldap_next_reference moz_ldap_next_reference
++#define ldap_next_searchobj moz_ldap_next_searchobj
++#define ldap_next_tmplcol moz_ldap_next_tmplcol
++#define ldap_next_tmplrow moz_ldap_next_tmplrow
++#define ldap_oc2template moz_ldap_oc2template
++#define ldap_open moz_ldap_open
++#define ldap_parse_authzid_control moz_ldap_parse_authzid_control
++#define ldap_parse_entrychange_control moz_ldap_parse_entrychange_control
++#define ldap_parse_extended_result moz_ldap_parse_extended_result
++#define ldap_parse_passwd moz_ldap_parse_passwd
++#define ldap_parse_passwordpolicy_control moz_ldap_parse_passwordpolicy_control
++#define ldap_parse_passwordpolicy_control_ext moz_ldap_parse_passwordpolicy_control_ext
++#define ldap_parse_reference moz_ldap_parse_reference
++#define ldap_parse_result moz_ldap_parse_result
++#define ldap_parse_sasl_bind_result moz_ldap_parse_sasl_bind_result
++#define ldap_parse_sort_control moz_ldap_parse_sort_control
++#define ldap_parse_userstatus_control moz_ldap_parse_userstatus_control
++#define ldap_parse_virtuallist_control moz_ldap_parse_virtuallist_control
++#define ldap_parse_whoami moz_ldap_parse_whoami
++#define ldap_passwd moz_ldap_passwd
++#define ldap_passwd_s moz_ldap_passwd_s
++#define ldap_passwordpolicy_err2txt moz_ldap_passwordpolicy_err2txt
++#define ldap_perror moz_ldap_perror
++#define ldap_rename moz_ldap_rename
++#define ldap_rename_s moz_ldap_rename_s
++#define ldap_result moz_ldap_result
++#define ldap_result2error moz_ldap_result2error
++#define ldap_sasl_bind moz_ldap_sasl_bind
++#define ldap_sasl_bind_s moz_ldap_sasl_bind_s
++#define ldap_sasl_interactive_bind_ext_s moz_ldap_sasl_interactive_bind_ext_s
++#define ldap_sasl_interactive_bind_s moz_ldap_sasl_interactive_bind_s
++#define ldap_search moz_ldap_search
++#define ldap_search_ext moz_ldap_search_ext
++#define ldap_search_ext_s moz_ldap_search_ext_s
++#define ldap_search_s moz_ldap_search_s
++#define ldap_search_st moz_ldap_search_st
++#define ldap_set_filter_additions moz_ldap_set_filter_additions
++#define ldap_set_lderrno moz_ldap_set_lderrno
++#define ldap_set_option moz_ldap_set_option
++#define ldap_set_rebind_proc moz_ldap_set_rebind_proc
++#define ldap_setfilteraffixes moz_ldap_setfilteraffixes
++#define ldap_simple_bind moz_ldap_simple_bind
++#define ldap_simple_bind_s moz_ldap_simple_bind_s
++#define ldap_sort_entries moz_ldap_sort_entries
++#define ldap_sort_strcasecmp moz_ldap_sort_strcasecmp
++#define ldap_sort_values moz_ldap_sort_values
++#define ldap_start_tls_s moz_ldap_start_tls_s
++#define ldap_str2charray moz_ldap_str2charray
++#define ldap_tmplattrs moz_ldap_tmplattrs
++#define ldap_tmplerr2string moz_ldap_tmplerr2string
++#define ldap_tmplerrlist moz_ldap_tmplerrlist
++#define ldap_ufn_search_c moz_ldap_ufn_search_c
++#define ldap_ufn_search_ct moz_ldap_ufn_search_ct
++#define ldap_ufn_search_ctx moz_ldap_ufn_search_ctx
++#define ldap_ufn_search_s moz_ldap_ufn_search_s
++#define ldap_ufn_setfilter moz_ldap_ufn_setfilter
++#define ldap_ufn_setprefix moz_ldap_ufn_setprefix
++#define ldap_ufn_timeout moz_ldap_ufn_timeout
++#define ldap_unbind moz_ldap_unbind
++#define ldap_unbind_ext moz_ldap_unbind_ext
++#define ldap_unbind_s moz_ldap_unbind_s
++#define ldap_url_parse moz_ldap_url_parse
++#define ldap_url_parse_no_defaults moz_ldap_url_parse_no_defaults
++#define ldap_url_search moz_ldap_url_search
++#define ldap_url_search_s moz_ldap_url_search_s
++#define ldap_url_search_st moz_ldap_url_search_st
++#define ldap_utf8characters moz_ldap_utf8characters
++#define ldap_utf8copy moz_ldap_utf8copy
++#define ldap_utf8getcc moz_ldap_utf8getcc
++#define ldap_utf8isalnum moz_ldap_utf8isalnum
++#define ldap_utf8isalpha moz_ldap_utf8isalpha
++#define ldap_utf8isdigit moz_ldap_utf8isdigit
++#define ldap_utf8isspace moz_ldap_utf8isspace
++#define ldap_utf8isxdigit moz_ldap_utf8isxdigit
++#define ldap_utf8len moz_ldap_utf8len
++#define ldap_utf8next moz_ldap_utf8next
++#define ldap_utf8prev moz_ldap_utf8prev
++#define ldap_utf8strtok_r moz_ldap_utf8strtok_r
++#define ldap_vals2html moz_ldap_vals2html
++#define ldap_vals2text moz_ldap_vals2text
++#define ldap_value_free moz_ldap_value_free
++#define ldap_value_free_len moz_ldap_value_free_len
++#define ldap_version moz_ldap_version
++#define ldap_whoami moz_ldap_whoami
++#define ldap_whoami_s moz_ldap_whoami_s
++#define ldap_x_calloc moz_ldap_x_calloc
++#define ldap_x_free moz_ldap_x_free
++#define ldap_x_hostlist_first moz_ldap_x_hostlist_first
++#define ldap_x_hostlist_next moz_ldap_x_hostlist_next
++#define ldap_x_hostlist_statusfree moz_ldap_x_hostlist_statusfree
++#define ldap_x_malloc moz_ldap_x_malloc
++#define ldap_x_realloc moz_ldap_x_realloc
++
+ /* Standard LDAP API functions and declarations */
+ #include "ldap-standard.h"
+
diff --git a/mail/thunderbird/files/patch-bug702179 b/mail/thunderbird/files/patch-bug702179
new file mode 100644
index 000000000000..9f6977c5225e
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug702179
@@ -0,0 +1,36 @@
+commit 6ddaacd
+Author: Ginn Chen <ginn.chen@oracle.com>
+Date: Wed Nov 30 07:23:46 2011 +0800
+
+ Bug 702179 dtrace probes are not installed on Solaris with static js lib r=glandium
+---
+ configure.in | 2 +-
+ js/src/Makefile.in | 2 --
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git configure.in configure.in
+index 66549c1..75b848d 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -966,7 +966,7 @@ MOZ_BZ2_LIBS='$(call EXPAND_LIBNAME_PATH,bz2,$(DEPTH)/modules/libbz2/src)'
+ MOZ_PNG_CFLAGS="-I$_objdir/dist/include" # needed for freetype compilation
+ MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/media/libpng)'
+
+-MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(LIBXUL_DIST)/lib)'
++MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(DEPTH)/js/src)'
+ MOZ_JS_SHARED_LIBS='$(call EXPAND_LIBNAME_PATH,mozjs,$(LIBXUL_DIST)/lib)'
+ MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
+ XPCOM_FROZEN_LDOPTS='$(call EXPAND_LIBNAME_PATH,xul mozalloc,$(LIBXUL_DIST)/bin)'
+diff --git js/src/Makefile.in js/src/Makefile.in
+index e28160a..28ca5e8 100644
+--- mozilla/js/src/Makefile.in
++++ mozilla/js/src/Makefile.in
+@@ -18,8 +18,6 @@ run_for_side_effects := $(shell echo 'MAKE: $(MAKE)')
+ STATIC_LIBRARY_NAME = js_static
+ LIBS = $(NSPR_LIBS)
+
+-DIST_INSTALL = 1
+-
+ ifdef JS_STANDALONE
+ SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,mfbt,$(DEPTH)/mfbt)
+ ifndef MOZ_NATIVE_ZLIB
diff --git a/mail/thunderbird/files/patch-bug779713 b/mail/thunderbird/files/patch-bug779713
new file mode 100644
index 000000000000..5137460a022c
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug779713
@@ -0,0 +1,75 @@
+--- mozilla/mfbt/Alignment.h
++++ mozilla/mfbt/Alignment.h
+@@ -9,11 +9,20 @@
+ #ifndef mozilla_Alignment_h
+ #define mozilla_Alignment_h
+
++#include "mozilla/Attributes.h"
++
+ #include <stddef.h>
+ #include <stdint.h>
+
+ namespace mozilla {
+
++#if defined(MOZ_HAVE_CXX11_ALIGNAS)
++#define MOZ_ALIGNOF(T) alignof(T)
++#elif defined(__GNUC__)
++#define MOZ_ALIGNOF(T) __alignof__(T)
++#elif defined(_MSC_VER)
++#define MOZ_ALIGNOF(T) __alignof(T)
++#else
+ /*
+ * This class, and the corresponding macro MOZ_ALIGNOF, figures out how many
+ * bytes of alignment a given type needs.
+@@ -32,6 +41,7 @@ public:
+ };
+
+ #define MOZ_ALIGNOF(T) mozilla::AlignmentFinder<T>::alignment
++#endif
+
+ /*
+ * Declare the MOZ_ALIGNED_DECL macro for declaring aligned types.
+@@ -43,7 +53,10 @@ public:
+ * will declare a two-character array |arr| aligned to 8 bytes.
+ */
+
+-#if defined(__GNUC__)
++#if defined(MOZ_HAVE_CXX11_ALIGNAS)
++# define MOZ_ALIGNED_DECL(_type, _align) \
++ alignas(_align) _type
++#elif defined(__GNUC__)
+ # define MOZ_ALIGNED_DECL(_type, _align) \
+ _type __attribute__((aligned(_align)))
+ #elif defined(_MSC_VER)
+diff --git mfbt/Attributes.h mfbt/Attributes.h
+index d317766..ddb13da 100644
+--- mozilla/mfbt/Attributes.h
++++ mozilla/mfbt/Attributes.h
+@@ -54,6 +54,9 @@
+ # ifndef __has_extension
+ # define __has_extension __has_feature /* compatibility, for older versions of clang */
+ # endif
++# if __has_extension(cxx_alignas)
++# define MOZ_HAVE_CXX11_ALIGNAS
++# endif
+ # if __has_extension(cxx_constexpr)
+ # define MOZ_HAVE_CXX11_CONSTEXPR
+ # endif
+@@ -75,6 +78,9 @@
+ # endif
+ #elif defined(__GNUC__)
+ # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
++# if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
++# define MOZ_HAVE_CXX11_ALIGNAS
++# endif
+ # if MOZ_GCC_VERSION_AT_LEAST(4, 7, 0)
+ # define MOZ_HAVE_CXX11_OVERRIDE
+ # define MOZ_HAVE_CXX11_FINAL final
+@@ -96,6 +102,7 @@
+ # define MOZ_HAVE_NORETURN __attribute__((noreturn))
+ #elif defined(_MSC_VER)
+ # if _MSC_VER >= 1800
++# define MOZ_HAVE_CXX11_ALIGNAS
+ # define MOZ_HAVE_CXX11_DELETE
+ # endif
+ # if _MSC_VER >= 1700
diff --git a/mail/thunderbird/files/patch-bug783463 b/mail/thunderbird/files/patch-bug783463
deleted file mode 100644
index 7fc8ba00f21a..000000000000
--- a/mail/thunderbird/files/patch-bug783463
+++ /dev/null
@@ -1,14 +0,0 @@
---- mozilla/gfx/skia/moz.build~
-+++ mozilla/gfx/skia/moz.build
-@@ -188,10 +188,9 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt
- 'SkMMapStream.cpp',
- 'SkOSFile.cpp',
- ]
-- if CONFIG['OS_TARGET'] == 'Linux':
-+ if CONFIG['MOZ_X11'] == 1 or CONFIG['OS_TARGET'] == 'Linux':
- CPP_SOURCES += [
- 'SkFontHost_linux.cpp',
-- 'SkFontHost_tables.cpp',
- 'SkThread_pthread.cpp',
- 'SkTime_Unix.cpp',
- ]
diff --git a/mail/thunderbird/files/patch-bug803480 b/mail/thunderbird/files/patch-bug803480
deleted file mode 100644
index 3a64220a6ad7..000000000000
--- a/mail/thunderbird/files/patch-bug803480
+++ /dev/null
@@ -1,102 +0,0 @@
-diff --git configure.in configure.in
-index a0575dc..be327fd 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -4306,7 +4306,6 @@ NS_PRINTING=1
- MOZ_PDF_PRINTING=
- MOZ_DISABLE_CRYPTOLEGACY=
- NSS_DISABLE_DBM=
--NECKO_WIFI=1
- NECKO_COOKIES=1
- NECKO_PROTOCOLS_DEFAULT="about data file ftp http res viewsource websocket wyciwyg device"
- USE_ARM_KUSER=
-@@ -4336,11 +4335,6 @@ case "${target}" in
- fi
-
- NSS_DISABLE_DBM=1
-- if test -z "$gonkdir"; then
-- NECKO_WIFI=
-- else
-- NECKO_WIFI=1
-- fi
- MOZ_THEME_FASTSTRIPE=1
- MOZ_TREE_FREETYPE=1
- MOZ_MEMORY=1
-@@ -8485,28 +8479,39 @@ done
- dnl
- dnl option to disable necko's wifi scanner
- dnl
-+
-+case "$OS_TARGET" in
-+ OS2)
-+ dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
-+ ;;
-+ Android)
-+ if test -n "$gonkdir"; then
-+ NECKO_WIFI=1
-+ fi
-+ ;;
-+ Darwin|SunOS|WINNT)
-+ NECKO_WIFI=1
-+ ;;
-+ Linux)
-+ if test -z "$MOZ_ENABLE_DBUS"; then
-+ AC_MSG_ERROR([Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi])
-+ fi
-+ NECKO_WIFI=1
-+ NECKO_WIFI_DBUS=1
-+ ;;
-+esac
-+
- MOZ_ARG_DISABLE_BOOL(necko-wifi,
- [ --disable-necko-wifi Disable necko wifi scanner],
- NECKO_WIFI=,
- NECKO_WIFI=1)
-
--if test "$OS_ARCH" = "OS2"; then
-- dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
-- NECKO_WIFI=
--fi
--if test "$NECKO_WIFI" -a \
-- "$OS_ARCH" != "Linux" -a \
-- "$OS_ARCH" != "Darwin" -a \
-- "$OS_ARCH" != "SunOS" -a \
-- "$OS_ARCH" != "WINNT"; then
-- AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
--fi
--
- if test "$NECKO_WIFI"; then
- AC_DEFINE(NECKO_WIFI)
- _NON_GLOBAL_ACDEFINES="$_NON_GLOBAL_ACDEFINES NECKO_WIFI"
- fi
- AC_SUBST(NECKO_WIFI)
-+AC_SUBST(NECKO_WIFI_DBUS)
-
- dnl
- dnl option to disable cookies
-diff --git netwerk/wifi/Makefile.in netwerk/wifi/Makefile.in
-index 26dbd79..4cbf912 100644
---- mozilla/netwerk/wifi/Makefile.in
-+++ mozilla/netwerk/wifi/Makefile.in
-@@ -20,7 +20,7 @@ ifeq ($(OS_ARCH),SunOS)
- OS_INCLUDES += $(GLIB_CFLAGS)
- endif
-
--ifdef MOZ_ENABLE_DBUS
-+ifdef NECKO_WIFI_DBUS
- OS_INCLUDES += $(MOZ_DBUS_GLIB_CFLAGS)
- endif
-
-diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build
-index 5e70211..07b01de 100644
---- mozilla/netwerk/wifi/moz.build
-+++ mozilla/netwerk/wifi/moz.build
-@@ -43,7 +43,7 @@ elif CONFIG['OS_ARCH'] == 'SunOS':
- 'nsWifiScannerSolaris.cpp',
- ]
-
--if CONFIG['MOZ_ENABLE_DBUS']:
-+if CONFIG['NECKO_WIFI_DBUS']:
- CPP_SOURCES += [
- 'nsWifiScannerDBus.cpp',
- ]
diff --git a/mail/thunderbird/files/patch-bug807492 b/mail/thunderbird/files/patch-bug807492
deleted file mode 100644
index f486428a2a4d..000000000000
--- a/mail/thunderbird/files/patch-bug807492
+++ /dev/null
@@ -1,628 +0,0 @@
-JJdiff --git configure.in configure.in
-index c167461..8346c11 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -5246,17 +5246,17 @@ if test "$NS_PRINTING"; then
- AC_DEFINE(NS_PRINT_PREVIEW)
- fi
-
- dnl Turn off webrtc for OS's we don't handle yet, but allow
- dnl --enable-webrtc to override. Can disable for everything in
- dnl the master list above.
- if test -n "$MOZ_WEBRTC"; then
- case "$target" in
-- *-linux*|*-mingw*|*-darwin*|*-android*|*-linuxandroid*)
-+ *-linux*|*-mingw*|*-darwin*|*-android*|*-linuxandroid*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
- dnl Leave enabled
- ;;
- *)
- dnl default to disabled for all others
- MOZ_WEBRTC=
- ;;
- esac
- fi
-diff --git media/mtransport/objs.mk media/mtransport/objs.mk
-index f1fc85f..141e8ca 100644
---- mozilla/media/mtransport/objs.mk
-+++ mozilla/media/mtransport/objs.mk
-@@ -18,22 +18,26 @@ LOCAL_INCLUDES += \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/util/libekr \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/log \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/registry \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/stats \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/plugin \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/event \
- $(NULL)
-
--ifeq ($(OS_TARGET), Darwin)
-+ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
- LOCAL_INCLUDES += \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \
- $(NULL)
-+ifeq ($(OS_TARGET), Darwin)
- DEFINES += -DDARWIN
-+else
-+DEFINES += -DBSD
-+endif
- endif
-
- ifeq ($(OS_TARGET), Linux)
- LOCAL_INCLUDES += \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include \
- -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/generic/include \
- $(NULL)
- DEFINES += -DLINUX
-diff --git media/mtransport/test/Makefile.in media/mtransport/test/Makefile.in
-index c1d5bf4..2ecf2c7 100644
---- mozilla/media/mtransport/test/Makefile.in
-+++ mozilla/media/mtransport/test/Makefile.in
-@@ -73,22 +73,24 @@ DEFINES += -D__Userspace_os_FreeBSD=1
- else
- #default_fallback; probably doesn't work
- DEFINES += -D__Userspace_os_$(OS_TARGET)=1
- endif
- endif
- endif
- endif
-
--ifeq ($(OS_TARGET), Darwin)
-+ifneq (,$(filter Darwin DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
- LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/darwin/include
-+ifeq ($(OS_TARGET), Darwin)
- DEFINES += \
- -DGTEST_USE_OWN_TR1_TUPLE=1 \
- $(NULL)
- endif
-+endif
-
- ifeq ($(OS_TARGET), Linux)
- LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/linux/include
- endif
-
- ifeq ($(OS_TARGET), Android)
- LOCAL_INCLUDES += -I$(topsrcdir)/media/mtransport/third_party/nrappkit/src/port/android/include
-
-diff --git media/mtransport/third_party/nICEr/nicer.gyp media/mtransport/third_party/nICEr/nicer.gyp
-index 0e1f8b4..9a4b995 100644
---- mozilla/media/mtransport/third_party/nICEr/nicer.gyp
-+++ mozilla/media/mtransport/third_party/nICEr/nicer.gyp
-@@ -126,26 +126,36 @@
- 'R_DEFINED_UINT2=uint16_t',
- 'R_DEFINED_INT4=int32_t',
- 'R_DEFINED_UINT4=uint32_t',
- 'R_DEFINED_INT8=int64_t',
- 'R_DEFINED_UINT8=uint64_t',
- ],
-
- 'conditions' : [
-- ## Mac
-+ ## Mac and BSDs
- [ 'OS == "mac"', {
-+ 'defines' : [
-+ 'DARWIN',
-+ 'HAVE_XLOCALE',
-+ ],
-+ }],
-+ [ 'os_bsd == 1', {
-+ 'defines' : [
-+ 'BSD',
-+ ],
-+ }],
-+ [ 'OS == "mac" or os_bsd == 1', {
- 'cflags_mozilla': [
- '-Wall',
- '-Wno-parentheses',
- '-Wno-strict-prototypes',
- '-Wmissing-prototypes',
- ],
- 'defines' : [
-- 'DARWIN',
- 'HAVE_LIBM=1',
- 'HAVE_STRDUP=1',
- 'HAVE_STRLCPY=1',
- 'HAVE_SYS_TIME_H=1',
- 'HAVE_VFPRINTF=1',
- 'NEW_STDIO'
- 'RETSIGTYPE=void',
- 'TIME_WITH_SYS_TIME_H=1',
-diff --git media/mtransport/third_party/nICEr/src/stun/addrs.c media/mtransport/third_party/nICEr/src/stun/addrs.c
-index b0b66b2..04fea94 100644
---- mozilla/media/mtransport/third_party/nICEr/src/stun/addrs.c
-+++ mozilla/media/mtransport/third_party/nICEr/src/stun/addrs.c
-@@ -50,17 +50,19 @@ static char *RCSSTRING __UNUSED__="$Id: addrs.c,v 1.2 2008/04/28 18:21:30 ekr Ex
- #else
- #include <syslog.h>
- /* Work around an Android NDK < r8c bug */
- #undef __unused
- #include <linux/sysctl.h>
- #endif
- #include <net/if.h>
- #ifndef LINUX
-+#if !defined(__OpenBSD__) && !defined(__NetBSD__)
- #include <net/if_var.h>
-+#endif
- #include <net/if_dl.h>
- #include <net/if_types.h>
- #include <sys/sockio.h>
- #else
- #include <linux/if.h>
- #endif
- #include <net/route.h>
-
-@@ -75,17 +77,17 @@ static char *RCSSTRING __UNUSED__="$Id: addrs.c,v 1.2 2008/04/28 18:21:30 ekr Ex
- #include <netdb.h>
- #endif /* UNIX */
-
- #include "stun.h"
- #include "addrs.h"
-
-
-
--#ifdef DARWIN
-+#if defined(BSD) || defined(DARWIN)
- /*
- * Copyright (c) 1983, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
-@@ -685,17 +687,17 @@ nr_stun_remove_duplicate_addrs(nr_transport_addr addrs[], int remove_loopback, i
- }
-
- int
- nr_stun_get_addrs(nr_transport_addr addrs[], int maxaddrs, int drop_loopback, int *count)
- {
- int _status=0;
- int i;
-
--#ifdef DARWIN
-+#if defined(BSD) || defined(DARWIN)
- _status = stun_get_mib_addrs(addrs, maxaddrs, count);
- #elif defined(WIN32)
- _status = stun_get_win32_addrs(addrs, maxaddrs, count);
- #elif defined(__sparc__)
- _status = stun_get_sparc_addrs(addrs, maxaddrs, count);
- #else
- _status = stun_get_siocgifconf_addrs(addrs, maxaddrs, count);
- #endif
-diff --git media/mtransport/third_party/nICEr/src/stun/stun.h media/mtransport/third_party/nICEr/src/stun/stun.h
-index a3c51f9..eb65ac8 100644
---- mozilla/media/mtransport/third_party/nICEr/src/stun/stun.h
-+++ mozilla/media/mtransport/third_party/nICEr/src/stun/stun.h
-@@ -36,21 +36,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- #ifdef WIN32
- #include <winsock2.h>
- #else
- #include <sys/param.h>
- #include <sys/socket.h>
- #include <net/if.h>
- #ifndef LINUX
-+#if !defined(__OpenBSD__) && !defined(__NetBSD__)
- #include <net/if_var.h>
-+#endif
- #include <net/if_dl.h>
- #include <net/if_types.h>
- #endif
-+#ifndef BSD
- #include <net/route.h>
-+#endif
- #include <netinet/in.h>
- #ifndef LINUX
- #include <netinet/in_var.h>
- #endif
- #include <arpa/inet.h>
- #include <netdb.h>
- #endif
- #include <time.h>
-diff --git media/mtransport/third_party/nICEr/src/util/mbslen.c media/mtransport/third_party/nICEr/src/util/mbslen.c
-index cc260b7..66af2d7 100644
---- mozilla/media/mtransport/third_party/nICEr/src/util/mbslen.c
-+++ mozilla/media/mtransport/third_party/nICEr/src/util/mbslen.c
-@@ -38,50 +38,58 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- #include <errno.h>
- #include <csi_platform.h>
-
- #include <assert.h>
- #include <locale.h>
- #include <stdlib.h>
- #include <wchar.h>
--#ifdef DARWIN
-+
-+#ifdef __FreeBSD__
-+#include <osreldate.h>
-+# if __FreeBSD_version > 900505
-+# define HAVE_XLOCALE
-+# endif
-+#endif
-+
-+#ifdef HAVE_XLOCALE
- #include <xlocale.h>
--#endif /* DARWIN */
-+#endif /* HAVE_XLOCALE */
-
- #include "nr_api.h"
- #include "mbslen.h"
-
- /* get number of characters in a mult-byte character string */
- int
- mbslen(const char *s, size_t *ncharsp)
- {
--#ifdef DARWIN
-+#ifdef HAVE_XLOCALE
- static locale_t loc = 0;
- static int initialized = 0;
--#endif /* DARWIN */
-+#endif /* HAVE_XLOCALE */
- #ifdef WIN32
- char *my_locale=0;
- unsigned int i;
- #endif /* WIN32 */
- int _status;
- size_t nbytes;
- int nchars;
- mbstate_t mbs;
-
--#ifdef DARWIN
-+#ifdef HAVE_XLOCALE
- if (! initialized) {
- initialized = 1;
- loc = newlocale(LC_CTYPE_MASK, "UTF-8", LC_GLOBAL_LOCALE);
- }
-
- if (loc == 0) {
- /* unable to create the UTF-8 locale */
- assert(loc != 0); /* should never happen */
--#endif /* DARWIN */
-+#endif /* HAVE_XLOCALE */
-
- #ifdef WIN32
- if (!setlocale(LC_CTYPE, 0))
- ABORT(R_INTERNAL);
-
- if (!(my_locale = r_strdup(setlocale(LC_CTYPE, 0))))
- ABORT(R_NO_MEMORY);
-
-@@ -94,28 +102,28 @@ mbslen(const char *s, size_t *ncharsp)
- /* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */
- /* null-checking setlocale is required because Android */
- char *locale = setlocale(LC_CTYPE, 0);
- /* some systems use "utf8" instead of "UTF-8" like Fedora 17 */
- if (!locale || (!strcasestr(locale, "UTF-8") && !strcasestr(locale, "UTF8")))
- ABORT(R_NOT_FOUND);
- #endif
-
--#ifdef DARWIN
-+#ifdef HAVE_XLOCALE
- }
--#endif /* DARWIN */
-+#endif /* HAVE_XLOCALE */
-
- memset(&mbs, 0, sizeof(mbs));
- nchars = 0;
-
--#ifdef DARWIN
-+#ifdef HAVE_XLOCALE
- while (*s != '\0' && (nbytes = mbrlen_l(s, strlen(s), &mbs, loc)) != 0)
- #else
- while (*s != '\0' && (nbytes = mbrlen(s, strlen(s), &mbs)) != 0)
--#endif /* DARWIN */
-+#endif /* HAVE_XLOCALE */
- {
- if (nbytes == (size_t)-1) /* should never happen */ {
- ABORT(R_INTERNAL);
- }
- if (nbytes == (size_t)-2) /* encoding error */ {
- ABORT(R_BAD_DATA);
- }
-
-diff --git media/mtransport/third_party/nrappkit/nrappkit.gyp media/mtransport/third_party/nrappkit/nrappkit.gyp
-index 3cc8e1c..74016c6 100644
---- mozilla/media/mtransport/third_party/nrappkit/nrappkit.gyp
-+++ mozilla/media/mtransport/third_party/nrappkit/nrappkit.gyp
-@@ -142,26 +142,35 @@
- 'R_DEFINED_UINT2=uint16_t',
- 'R_DEFINED_INT4=int32_t',
- 'R_DEFINED_UINT4=uint32_t',
- 'R_DEFINED_INT8=int64_t',
- 'R_DEFINED_UINT8=uint64_t',
- ],
-
- 'conditions' : [
-- ## Mac
-+ ## Mac and BSDs
- [ 'OS == "mac"', {
-+ 'defines' : [
-+ 'DARWIN',
-+ ],
-+ }],
-+ [ 'os_bsd == 1', {
-+ 'defines' : [
-+ 'BSD',
-+ ],
-+ }],
-+ [ 'OS == "mac" or os_bsd == 1', {
- 'cflags_mozilla': [
- '-Wall',
- '-Wno-parentheses',
- '-Wno-strict-prototypes',
- '-Wmissing-prototypes',
- ],
- 'defines' : [
-- 'DARWIN',
- 'HAVE_LIBM=1',
- 'HAVE_STRDUP=1',
- 'HAVE_STRLCPY=1',
- 'HAVE_SYS_TIME_H=1',
- 'HAVE_VFPRINTF=1',
- 'NEW_STDIO'
- 'RETSIGTYPE=void',
- 'TIME_WITH_SYS_TIME_H=1',
-diff --git media/mtransport/third_party/nrappkit/src/log/r_log.c media/mtransport/third_party/nrappkit/src/log/r_log.c
-index efb7ef2..aebf578 100644
---- mozilla/media/mtransport/third_party/nrappkit/src/log/r_log.c
-+++ mozilla/media/mtransport/third_party/nrappkit/src/log/r_log.c
-@@ -43,16 +43,17 @@ static char *RCSSTRING __UNUSED__ ="$Id: r_log.c,v 1.10 2008/11/25 22:25:18 adam
- #ifdef LINUX
- #define _BSD_SOURCE
- #endif
-
- #include "r_log.h"
- #include "hex.h"
-
- #include <string.h>
-+#include <errno.h>
- #ifndef _MSC_VER
- #include <strings.h>
- #include <syslog.h>
- #endif
- #include <registry.h>
- #include <time.h>
-
-
-diff --git media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
-index bcb1ec0..bb73591 100644
---- mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
-+++ mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
-@@ -33,7 +33,7 @@
- #ifndef _SYS_QUEUE_H_
- #define _SYS_QUEUE_H_
-
--#ifndef DARWIN
-+#if !defined(__FreeBSD__) && !defined(DARWIN)
- #include <stddef.h>
- #define __offsetof offsetof
- #endif
-diff --git media/mtransport/third_party/nrappkit/src/util/util.c media/mtransport/third_party/nrappkit/src/util/util.c
-index a7d4ff1..ff11a60 100644
---- mozilla/media/mtransport/third_party/nrappkit/src/util/util.c
-+++ mozilla/media/mtransport/third_party/nrappkit/src/util/util.c
-@@ -40,16 +40,17 @@
- static char *RCSSTRING __UNUSED__ ="$Id: util.c,v 1.5 2007/11/21 00:09:13 adamcain Exp $";
-
- #ifndef WIN32
- #include <sys/uio.h>
- #include <pwd.h>
- #include <dirent.h>
- #endif
- #include <string.h>
-+#include <errno.h>
- #include <ctype.h>
- #include <sys/stat.h>
- #ifdef OPENSSL
- #include <openssl/evp.h>
- #endif
- #include "nr_common.h"
- #include "r_common.h"
- #include "registry.h"
-diff --git media/webrtc/signaling/signaling.gyp media/webrtc/signaling/signaling.gyp
-index 2a91e3d..31de641 100644
---- mozilla/media/webrtc/signaling/signaling.gyp
-+++ mozilla/media/webrtc/signaling/signaling.gyp
-@@ -212,16 +212,29 @@
- 'SIPCC_BUILD',
- 'HAVE_WINSOCK2_H',
- 'CPR_STDINT_INCLUDE=\\"mozilla/StandardInteger.h\\"'
- ],
-
- 'cflags_mozilla': [
- ],
- }],
-+ ['os_bsd==1', {
-+ 'include_dirs': [
-+ ],
-+ 'defines': [
-+ # avoiding pointless ifdef churn
-+ 'SIP_OS_OSX',
-+ 'OSX',
-+ 'SECLIB_OPENSSL',
-+ ],
-+
-+ 'cflags_mozilla': [
-+ ],
-+ }],
- ['OS=="mac"', {
- 'include_dirs': [
- ],
- 'defines': [
- 'SIP_OS_OSX',
- 'OSX',
- '_FORTIFY_SOURCE=2',
- ],
-@@ -747,17 +760,17 @@
- 'EXTERNAL_TICK_REQUIRED',
- 'GIPS_VER=3480',
- ],
-
- 'cflags_mozilla': [
- ],
-
- }],
-- ['OS=="mac"', {
-+ ['OS=="mac" or os_bsd==1', {
-
- 'include_dirs': [
- ],
-
- 'sources': [
- # SIPSTACK
- './src/sipcc/core/sipstack/sip_platform_task.c',
-
-@@ -792,24 +805,23 @@
- './src/sipcc/cpr/darwin/cpr_darwin_timers_using_select.c',
- './src/sipcc/cpr/darwin/cpr_darwin_tst.h',
- './src/sipcc/cpr/darwin/cpr_darwin_types.h',
- ],
-
-
- 'defines' : [
- 'SIP_OS_OSX',
-- '_POSIX_SOURCE',
-+ # using BSD extensions, leave _POSIX_SOURCE undefined
- 'CPR_MEMORY_LITTLE_ENDIAN',
- 'NO_SOCKET_POLLING',
- 'USE_TIMER_SELECT_BASED',
- 'FULL_BUILD',
- 'STUBBED_OUT',
- 'USE_PRINTF',
-- '_DARWIN_C_SOURCE',
- 'NO_NSPR_10_SUPPORT',
- ],
-
- 'cflags_mozilla': [
- ],
- }],
- ],
-
-diff --git media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c
-index a7c47e1..4f191de 100644
---- mozilla/media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c
-+++ mozilla/media/webrtc/signaling/src/sipcc/cpr/darwin/cpr_darwin_ipc.c
-@@ -317,21 +317,25 @@ cprGetMessage (cprMsgQueue_t msgQueue, boolean waitForever, void **ppUserData)
- {
- static const char fname[] = "cprGetMessage";
-
- void *buffer = 0;
- cpr_msg_queue_t *msgq;
- cpr_msgq_node_t *node;
- struct timespec timeout;
- struct timeval tv;
-+#ifndef __APPLE__
-+ struct timezone tz;
-+#else
- // On the iPhone, there is a DarwinAlias problem with "timezone"
- struct _timezone {
- int tz_minuteswest; /* of Greenwich */
- int tz_dsttime; /* type of dst correction to apply */
- } tz;
-+#endif
-
- /* Initialize ppUserData */
- if (ppUserData) {
- *ppUserData = NULL;
- }
-
- msgq = (cpr_msg_queue_t *) msgQueue;
- if (msgq == NULL) {
-diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
-index a30e330..cfbd8a3 100644
---- mozilla/media/webrtc/signaling/test/Makefile.in
-+++ mozilla/media/webrtc/signaling/test/Makefile.in
-@@ -81,17 +81,17 @@ endif
- ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
- LIBS += \
- $(XLIBS) \
- $(TK_LIBS) \
- $(MOZ_PANGO_LIBS) \
- $(NULL)
- endif
-
--ifeq ($(OS_TARGET),Linux)
-+ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
- LIBS += \
- $(MOZ_CAIRO_OSLIBS) \
- $(NULL)
- endif
-
- ifeq ($(OS_TARGET),Darwin)
- LIBS += \
- -framework AudioToolbox \
-diff --git media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py
-index 338d0b7..2241d41 100644
---- mozilla/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py
-+++ mozilla/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py
-@@ -1,16 +1,17 @@
- # Copyright (c) 2012 Mozilla Foundation. All rights reserved.
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
-
- import collections
- import gyp
- import gyp.common
- import sys
-+import platform
- import os
- import re
- import shlex
-
- generator_wants_sorted_dependencies = True
-
- generator_default_variables = {
- }
-@@ -107,30 +108,44 @@ endif
-
- def ensure_directory_exists(path):
- dir = os.path.dirname(path)
- if dir and not os.path.exists(dir):
- os.makedirs(dir)
-
- def GetFlavor(params):
- """Returns |params.flavor| if it's set, the system's default flavor else."""
-+ system = platform.system().lower()
- flavors = {
-- 'win32': 'win',
-- 'darwin': 'mac',
-- 'sunos5': 'solaris',
-- 'freebsd7': 'freebsd',
-- 'freebsd8': 'freebsd',
-+ 'microsoft': 'win',
-+ 'windows' : 'win',
-+ 'darwin' : 'mac',
-+ 'sunos' : 'solaris',
-+ 'dragonfly': 'bsd',
-+ 'freebsd' : 'bsd',
-+ 'netbsd' : 'bsd',
-+ 'openbsd' : 'bsd',
- }
-- flavor = flavors.get(sys.platform, 'linux')
-- return params.get('flavor', flavor)
-+
-+ if 'flavor' in params:
-+ return params['flavor']
-+ if system.startswith('cygwin'):
-+ return 'win'
-+ if system in flavors:
-+ return flavors[system]
-+
-+ return 'linux'
-
-
- def CalculateVariables(default_variables, params):
-+ flavor = GetFlavor(params)
-+ if flavor == 'bsd':
-+ flavor = platform.system().lower()
- generator_flags = params.get('generator_flags', {})
-- default_variables['OS'] = generator_flags.get('os', GetFlavor(params))
-+ default_variables['OS'] = generator_flags.get('os', flavor)
-
-
- def CalculateGeneratorInputInfo(params):
- """Calculate the generator specific info that gets fed to input (called by
- gyp)."""
- generator_flags = params.get('generator_flags', {})
- if generator_flags.get('adjust_static_libraries', False):
- global generator_wants_static_library_dependencies_adjusted
diff --git a/mail/thunderbird/files/patch-bug810716 b/mail/thunderbird/files/patch-bug810716
deleted file mode 100644
index 05637dc71251..000000000000
--- a/mail/thunderbird/files/patch-bug810716
+++ /dev/null
@@ -1,68 +0,0 @@
-diff --git configure.in configure.in
-index 2084be9..eb6eeb2 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -3369,14 +3369,19 @@ fi
- AC_CACHE_CHECK(
- [for res_ninit()],
- ac_cv_func_res_ninit,
-- [AC_TRY_LINK([
-+ [AC_TRY_RUN([
- #ifdef linux
- #define _BSD_SOURCE 1
- #endif
-+ #include <sys/types.h>
-+ #include <netinet/in.h>
-+ #include <arpa/nameser.h>
- #include <resolv.h>
-- ],
-- [int foo = res_ninit(&_res);],
-+ int main(int argc, char **argv){
-+ int foo = res_ninit(&_res);
-+ }],
- [ac_cv_func_res_ninit=yes],
-+ [ac_cv_func_res_ninit=no],
- [ac_cv_func_res_ninit=no])
- ])
-
-diff --git extensions/auth/nsAuthGSSAPI.cpp extensions/auth/nsAuthGSSAPI.cpp
-index e828beb..6444246 100644
---- mozilla/extensions/auth/nsAuthGSSAPI.cpp
-+++ mozilla/extensions/auth/nsAuthGSSAPI.cpp
-@@ -39,6 +39,9 @@ typedef KLStatus (*KLCacheHasValidTickets_type)(
- #endif
-
- #if defined(HAVE_RES_NINIT)
-+#include <sys/types.h>
-+#include <netinet/in.h>
-+#include <arpa/nameser.h>
- #include <resolv.h>
- #endif
-
-diff --git js/src/configure.in js/src/configure.in
-index e25f569..b9722f9 100644
---- mozilla/js/src/configure.in
-+++ mozilla/js/src/configure.in
-@@ -2797,14 +2797,19 @@ fi
- AC_CACHE_CHECK(
- [for res_ninit()],
- ac_cv_func_res_ninit,
-- [AC_TRY_LINK([
-+ [AC_TRY_RUN([
- #ifdef linux
- #define _BSD_SOURCE 1
- #endif
-+ #include <sys/types.h>
-+ #include <netinet/in.h>
-+ #include <arpa/nameser.h>
- #include <resolv.h>
-- ],
-- [int foo = res_ninit(&_res);],
-+ int main(int argc, char **argv){
-+ int foo = res_ninit(&_res);
-+ }],
- [ac_cv_func_res_ninit=yes],
-+ [ac_cv_func_res_ninit=no],
- [ac_cv_func_res_ninit=no])
- ])
-
diff --git a/mail/thunderbird/files/patch-bug826985 b/mail/thunderbird/files/patch-bug826985
index c7bd5a99a7f9..66399a394266 100644
--- a/mail/thunderbird/files/patch-bug826985
+++ b/mail/thunderbird/files/patch-bug826985
@@ -26,22 +26,23 @@ index 55e4cd1..76567b3 100644
dnl enable once Signaling lands
MOZ_WEBRTC_SIGNALING=1
AC_DEFINE(MOZ_WEBRTC_SIGNALING)
-@@ -8981,6 +8984,10 @@ elif test "${OS_TARGET}" = "Android"; then
- fi
- fi
-
-+if test -n "$MOZ_LIBV4L2_LIBS"; then
-+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D use_libv4l2=1"
-+fi
-+
- if test -n "$MOZ_WEBRTC"; then
- AC_MSG_RESULT("generating WebRTC Makefiles...")
-
+diff --git build/gyp.mozbuild build/gyp.mozbuild
+index b483cd1..f1dd1f0 100644
+--- mozilla/build/gyp.mozbuild
++++ mozilla/build/gyp.mozbuild
+@@ -11,6 +11,7 @@ gyp_vars = {
+ 'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
+ 'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
+ 'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
++ 'use_libv4l2': 1 if CONFIG['MOZ_LIBV4L2_LIBS'] else 0,
+ # basic stuff for everything
+ 'include_internal_video_render': 0,
+ 'clang_use_chrome_plugins': 0,
diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/Makefile.in
index b483cd1..f1dd1f0 100644
--- mozilla/media/webrtc/signaling/test/Makefile.in
+++ mozilla/media/webrtc/signaling/test/Makefile.in
-@@ -17,6 +17,7 @@ LIBS = \
+@@ -7,6 +7,7 @@ LIBS = \
$(NSPR_LIBS) \
$(NSS_LIBS) \
$(REALTIME_LIBS) \
@@ -53,7 +54,7 @@ diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_lin
index 239a292..bab496c 100644
--- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
+++ mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
-@@ -26,11 +26,23 @@
+@@ -25,10 +25,21 @@
#else
#include <linux/videodev2.h>
#endif
@@ -61,9 +62,8 @@ index 239a292..bab496c 100644
+#include <libv4l2.h>
+#endif
- #include "ref_count.h"
- #include "trace.h"
-
+ #include "webrtc/system_wrappers/interface/ref_count.h"
+ #include "webrtc/system_wrappers/interface/trace.h"
+#ifdef HAVE_LIBV4L2
+#define open v4l2_open
@@ -73,10 +73,9 @@ index 239a292..bab496c 100644
+#define mmap v4l2_mmap
+#define munmap v4l2_munmap
+#endif
-+
+
namespace webrtc
{
- namespace videocapturemodule
@@ -130,6 +142,11 @@ WebRtc_Word32 DeviceInfoLinux::GetDeviceName(
memset(deviceNameUTF8, 0, deviceNameLength);
memcpy(cameraName, cap.card, sizeof(cap.card));
@@ -152,13 +151,16 @@ index d46b5aa..e452223 100644
],
diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
index 9c16ffa..1db3794 100644
---- mozilla/toolkit/library/Makefile.in
-+++ mozilla/toolkit/library/Makefile.in
-@@ -405,6 +405,7 @@ endif
+--- mozilla/toolkit/library/libxul.mk
++++ mozilla/toolkit/library/libxul.mk
+@@ -182,6 +182,10 @@ endif
+
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
- ifdef MOZ_WEBRTC
++ifdef MOZ_LIBV4L2_LIBS
+EXTRA_DSO_LDOPTS += $(MOZ_LIBV4L2_LIBS)
- ifdef MOZ_PEERCONNECTION
- COMPONENT_LIBS += peerconnection
- endif
++endif
++
+ ifdef MOZ_WEBRTC
+ ifeq (WINNT,$(OS_TARGET))
+ EXTRA_DSO_LDOPTS += \
diff --git a/mail/thunderbird/files/patch-z-bug847568 b/mail/thunderbird/files/patch-bug847568
index 24b8db490685..2eb54438a5b6 100644
--- a/mail/thunderbird/files/patch-z-bug847568
+++ b/mail/thunderbird/files/patch-bug847568
@@ -33,7 +33,7 @@ diff --git configure.in configure.in
index ac38f40..87536b7 100644
--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -8032,6 +8032,56 @@ if test "$USE_FC_FREETYPE"; then
+@@ -8032,6 +8032,52 @@ if test "$USE_FC_FREETYPE"; then
fi
dnl ========================================================
@@ -46,9 +46,7 @@ index ac38f40..87536b7 100644
+MOZ_NATIVE_HARFBUZZ=)
+
+if test -n "$MOZ_NATIVE_HARFBUZZ"; then
-+ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.16)
-+else
-+ MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)'
++ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.25)
+fi
+
+AC_SUBST(MOZ_NATIVE_HARFBUZZ)
@@ -64,7 +62,7 @@ index ac38f40..87536b7 100644
+MOZ_NATIVE_GRAPHITE2=)
+
+if test -n "$MOZ_NATIVE_GRAPHITE2"; then
-+ PKG_CHECK_MODULES(MOZ_GRAPHITE, graphite2)
++ PKG_CHECK_MODULES(MOZ_GRAPHITE2, graphite2)
+
+ dnl graphite2.pc has bogus version, check manually
+ AC_TRY_COMPILE([ #include <graphite2/Font.h>
@@ -73,57 +71,35 @@ index ac38f40..87536b7 100644
+ * 100 + GR2_VERSION_BUGFIX >= \
+ (major) * 10000 + (minor) * 100 + (bugfix) )
+ ], [
-+ #if !GR2_VERSION_REQUIRE(1,2,3)
++ #if !GR2_VERSION_REQUIRE(1,2,4)
+ #error "Insufficient graphite2 version."
+ #endif
+ ], [],
+ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
-++else
-++ MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)'
+fi
+
+AC_SUBST(MOZ_NATIVE_GRAPHITE2)
-+AC_SUBST(MOZ_GRAPHITE_CFLAGS)
-+AC_SUBST(MOZ_GRAPHITE_LIBS)
++AC_SUBST(MOZ_GRAPHITE2_CFLAGS)
++AC_SUBST(MOZ_GRAPHITE2_LIBS)
+
+dnl ========================================================
dnl Check for pixman and cairo
dnl ========================================================
-@@ -8379,18 +8412,6 @@ QCMS_LIBS='$(DEPTH)/gfx/qcms/$(LIB_PREFI
- AC_SUBST(QCMS_LIBS)
+diff --git content/base/src/moz.build content/base/src/moz.build
+index d4f6380..0ee55df 100644
+--- mozilla/content/base/src/moz.build
++++ mozilla/content/base/src/moz.build
+@@ -179,6 +179,9 @@ SOURCES += [
+ 'nsObjectLoadingContent.cpp',
+ ]
- dnl ========================================================
--dnl HarfBuzz
--dnl ========================================================
--MOZ_HARFBUZZ_LIBS='$(DEPTH)/gfx/harfbuzz/src/$(LIB_PREFIX)mozharfbuzz.$(LIB_SUFFIX)'
--AC_SUBST(MOZ_HARFBUZZ_LIBS)
--
--dnl ========================================================
--dnl SIL Graphite
--dnl ========================================================
--MOZ_GRAPHITE_LIBS='$(DEPTH)/gfx/graphite2/src/$(LIB_PREFIX)mozgraphite2.$(LIB_SUFFIX)'
--AC_SUBST(MOZ_GRAPHITE_LIBS)
--
--dnl ========================================================
- dnl OTS
- dnl ========================================================
- MOZ_OTS_LIBS='$(DEPTH)/gfx/ots/src/$(LIB_PREFIX)mozots.$(LIB_SUFFIX)'
-diff --git content/base/src/Makefile.in content/base/src/Makefile.in
-index a618096..596901a 100644
---- mozilla/content/base/src/Makefile.in
-+++ mozilla/content/base/src/Makefile.in
-@@ -5,6 +5,10 @@
-
- include $(topsrcdir)/config/rules.mk
-
-+ifdef MOZ_NATIVE_HARFBUZZ
-+nsContentUtils.$(OBJ_SUFFIX): CXXFLAGS+=$(MOZ_HARFBUZZ_CFLAGS)
-+endif
++if CONFIG['MOZ_NATIVE_HARFBUZZ']:
++ SOURCES['nsContentUtils.cpp'].flags += [CONFIG['MOZ_HARFBUZZ_CFLAGS']]
+
- # gcc requires -msse2 for this file since it uses SSE2 intrinsics. (See bug
- # 585538 comment 12.)
- ifneq (,$(INTEL_ARCHITECTURE))
+ EXTRA_COMPONENTS += [
+ 'contentAreaDropListener.js',
+ 'contentAreaDropListener.manifest',
diff --git gfx/moz.build gfx/moz.build
index 519aa46..6929751 100644
--- mozilla/gfx/moz.build
@@ -174,7 +150,7 @@ index 45c36ae..79d32cf 100644
CFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
+ifdef MOZ_NATIVE_GRAPHITE2
-+CXXFLAGS += $(MOZ_GRAPHITE_CFLAGS)
++CXXFLAGS += $(MOZ_GRAPHITE2_CFLAGS)
+endif
+
+ifdef MOZ_NATIVE_HARFBUZZ
@@ -196,29 +172,6 @@ index f6b9f7c..60863f4 100644
+ifdef MOZ_NATIVE_HARFBUZZ
+CXXFLAGS += $(MOZ_HARFBUZZ_CFLAGS)
+endif
-diff --git layout/media/Makefile.in layout/media/Makefile.in
-index 1cacbd7..a8cd156 100644
---- mozilla/layout/media/Makefile.in
-+++ mozilla/layout/media/Makefile.in
-@@ -18,10 +18,16 @@ endif
- SHARED_LIBRARY_LIBS = \
- $(MOZ_OTS_LIBS) \
- $(QCMS_LIBS) \
-- $(MOZ_GRAPHITE_LIBS) \
-- $(MOZ_HARFBUZZ_LIBS) \
- $(NULL)
-
-+ifndef MOZ_NATIVE_GRAPHITE2
-+SHARED_LIBRARY_LIBS += $(MOZ_GRAPHITE_LIBS)
-+endif
-+
-+ifndef MOZ_NATIVE_HARFBUZZ
-+SHARED_LIBRARY_LIBS += $(MOZ_HARFBUZZ_LIBS)
-+endif
-+
- ifdef MOZ_TREE_CAIRO
- SHARED_LIBRARY_LIBS += $(MOZ_CAIRO_LIBS)
- endif
diff --git netwerk/dns/Makefile.in netwerk/dns/Makefile.in
index 1cacbd7..f5d72bb 100644
--- mozilla/netwerk/dns/Makefile.in
@@ -234,16 +187,16 @@ index 1cacbd7..f5d72bb 100644
# Generate the include file containing compact, static definitions
# for effective TLD data.
etld_data.inc: $(srcdir)/prepare_tlds.py $(srcdir)/effective_tld_names.dat
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
+diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk
index 67f0db9..d42137a 100644
---- mozilla/toolkit/library/Makefile.in
-+++ mozilla/toolkit/library/Makefile.in
+--- mozilla/toolkit/library/libxul.mk
++++ mozilla/toolkit/library/libxul.mk
@@ -89,6 +89,14 @@ ifndef MOZ_TREE_PIXMAN
EXTRA_DSO_LDOPTS += $(MOZ_PIXMAN_LIBS)
endif
+ifdef MOZ_NATIVE_GRAPHITE2
-+EXTRA_DSO_LDOPTS += $(MOZ_GRAPHITE_LIBS)
++EXTRA_DSO_LDOPTS += $(MOZ_GRAPHITE2_LIBS)
+endif
+
+ifdef MOZ_NATIVE_HARFBUZZ
diff --git a/mail/thunderbird/files/patch-bug851992 b/mail/thunderbird/files/patch-bug851992
deleted file mode 100644
index 693ae6e57b90..000000000000
--- a/mail/thunderbird/files/patch-bug851992
+++ /dev/null
@@ -1,339 +0,0 @@
-diff --git a/config/Makefile.in b/config/Makefile.in
---- mozilla/config/Makefile.in
-+++ mozilla/config/Makefile.in
-@@ -97,16 +97,17 @@ export:: $(export-preqs)
- -DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
- -DMOZ_NATIVE_HUNSPELL=$(MOZ_NATIVE_HUNSPELL) \
- -DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
- -DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
- -DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
- -DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
- -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
- -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
-+ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
- $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
- $(INSTALL) system_wrappers $(DIST)
-
- GARBAGE_DIRS += system_wrappers
- endif
-
- ifdef WRAP_STL_INCLUDES
- ifdef GNU_CXX
-diff --git a/config/system-headers b/config/system-headers
---- mozilla/config/system-headers
-+++ mozilla/config/system-headers
-@@ -1125,8 +1125,19 @@ gst/video/video.h
- sys/msg.h
- sys/ipc.h
- sys/thr.h
- sys/user.h
- kvm.h
- spawn.h
- err.h
- xlocale.h
-+#if MOZ_NATIVE_ICU==1
-+unicode/locid.h
-+unicode/numsys.h
-+unicode/ucal.h
-+unicode/ucol.h
-+unicode/udat.h
-+unicode/udatpg.h
-+unicode/uenum.h
-+unicode/unum.h
-+unicode/ustring.h
-+#endif
-diff --git a/configure.in b/configure.in
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -4134,16 +4134,32 @@ if test -n "$MOZ_NATIVE_FFI"; then
- PKG_CHECK_MODULES(MOZ_FFI, libffi > 3.0.9)
- else
- PKG_CHECK_MODULES(MOZ_FFI, libffi >= 3.0.9)
- fi
- MOZ_JS_STATIC_LIBS="$MOZ_JS_STATIC_LIBS $MOZ_FFI_LIBS"
- fi
-
- dnl ========================================================
-+dnl system icu support
-+dnl ========================================================
-+MOZ_NATIVE_ICU=
-+MOZ_ARG_WITH_BOOL(system-icu,
-+[ --with-system-icu
-+ Use system icu (located with pkgconfig)],
-+ MOZ_NATIVE_ICU=1)
-+
-+if test -n "$MOZ_NATIVE_ICU"; then
-+ PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1)
-+ MOZ_JS_STATIC_LIBS="$MOZ_JS_STATIC_LIBS $MOZ_ICU_LIBS"
-+fi
-+
-+AC_SUBST(MOZ_NATIVE_ICU)
-+
-+dnl ========================================================
- dnl Java SDK support
- dnl ========================================================
-
- JAVA_BIN_PATH=
- MOZ_ARG_WITH_STRING(java-bin-path,
- [ --with-java-bin-path=dir
- Location of Java binaries (java, javac, jar)],
- JAVA_BIN_PATH=$withval)
-diff --git a/js/src/Makefile.in b/js/src/Makefile.in
---- mozilla/js/src/Makefile.in.orig 2013-10-22 08:19:02.000000000 +0200
-+++ mozilla/js/src/Makefile.in 2013-10-29 10:11:58.272605098 +0100
-@@ -237,10 +237,14 @@
- # ICU headers need to be available whether we build with the complete
- # Internationalization API or not - ICU stubs rely on them.
-
-+ifdef MOZ_NATIVE_ICU
-+LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS)
-+else
- LOCAL_INCLUDES += \
- -I$(topsrcdir)/../../intl/icu/source/common \
- -I$(topsrcdir)/../../intl/icu/source/i18n \
- $(NULL)
-+endif
-
- ifdef ENABLE_INTL_API
-
-@@ -260,6 +264,7 @@
- ICU_MAKE = $(MAKE)
- endif
-
-+ifndef MOZ_NATIVE_ICU
- # - Build ICU as part of the "export" target, so things get built
- # in the right order.
- # - ICU requires GNU make according to its readme.html. pymake can't be used
-@@ -276,6 +281,7 @@
- $(call SUBMAKE,$@,intl/icu)
-
- endif
-+endif
-
- #
- # END ECMAScript Internationalization API
-@@ -413,7 +419,11 @@
- DEFINES += -DUSE_ZLIB
- endif
-
--SHARED_LIBRARY_LIBS += $(ICU_LIBS)
-+ifdef MOZ_NATIVE_ICU
-+EXTRA_DSO_LDOPTS += $(MOZ_ICU_LIBS)
-+else
-+SHARED_LIBRARY_LIBS += $(MOZ_ICU_LIBS)
-+endif
-
- # Prevent floating point errors caused by VC++ optimizations
- ifdef _MSC_VER
-diff --git a/js/src/config/Makefile.in b/js/src/config/Makefile.in
---- mozilla/js/src/config/Makefile.in
-+++ mozilla/js/src/config/Makefile.in
-@@ -54,16 +54,17 @@ include $(topsrcdir)/config/rules.mk
-
- HOST_CFLAGS += -DUNICODE -D_UNICODE
-
- ifdef WRAP_SYSTEM_INCLUDES
- export:: \
- $(call mkdir_deps,system_wrappers_js) \
- $(NULL)
- $(PYTHON) $(srcdir)/Preprocessor.py $(DEFINES) $(ACDEFINES) \
-+ -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
- $(srcdir)/system-headers | $(PERL) $(srcdir)/make-system-wrappers.pl system_wrappers_js
- $(INSTALL) system_wrappers_js $(DIST)
-
- GARBAGE_DIRS += system_wrappers_js
- endif
-
- GARBAGE += $(srcdir)/*.pyc *.pyc
-
-diff --git a/js/src/config/system-headers b/js/src/config/system-headers
---- mozilla/js/src/config/system-headers
-+++ mozilla/js/src/config/system-headers
-@@ -1125,8 +1125,19 @@ gst/video/video.h
- sys/msg.h
- sys/ipc.h
- sys/thr.h
- sys/user.h
- kvm.h
- spawn.h
- err.h
- xlocale.h
-+#if MOZ_NATIVE_ICU==1
-+unicode/locid.h
-+unicode/numsys.h
-+unicode/ucal.h
-+unicode/ucol.h
-+unicode/udat.h
-+unicode/udatpg.h
-+unicode/uenum.h
-+unicode/unum.h
-+unicode/ustring.h
-+#endif
-diff --git a/js/src/configure.in b/js/src/configure.in
---- mozilla/js/src/configure.in
-+++ mozilla/js/src/configure.in
-@@ -4406,59 +4406,68 @@ if test "$ACCESSIBILITY" -a "$MOZ_ENABLE
- AC_DEFINE_UNQUOTED(ATK_MINOR_VERSION, $ATK_MINOR_VERSION)
- AC_DEFINE_UNQUOTED(ATK_REV_VERSION, $ATK_REV_VERSION)
- fi
-
-
- dnl ========================================================
- dnl ECMAScript Internationalization API Support (uses ICU)
- dnl ========================================================
-+ICU_LIB_NAMES=
-+MOZ_NATIVE_ICU=
-+MOZ_ARG_WITH_BOOL(system-icu,
-+[ --with-system-icu
-+ Use system icu (located with pkgconfig)],
-+ MOZ_NATIVE_ICU=1)
-+
-+if test -n "$MOZ_NATIVE_ICU"; then
-+ PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1)
-+fi
-
- if test -n "$JS_STANDALONE"; then
- ENABLE_INTL_API=1
- fi
- MOZ_ARG_ENABLE_BOOL(intl-api,
- [ --enable-intl-api Enable ECMAScript Internationalization API (default=yes for standalone JS)],
- ENABLE_INTL_API=1,
- ENABLE_INTL_API= )
-
- dnl Settings for the implementation of the ECMAScript Internationalization API
- if test -n "$ENABLE_INTL_API"; then
- AC_DEFINE(ENABLE_INTL_API)
-- # We build ICU as a static library.
-- AC_DEFINE(U_STATIC_IMPLEMENTATION)
--
-- case "$OS_TARGET" in
-- WINNT)
-- ICU_LIB_NAMES="icuin icuuc icudt"
-- ;;
-- Darwin|Linux)
-- ICU_LIB_NAMES="icui18n icuuc icudata"
-- ;;
-- *)
-- AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
-- esac
--
-- ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)'
--else
-- ICU_LIB_NAMES=
-- ICU_LIBS=
-+
-+ if test -z "$MOZ_NATIVE_ICU"; then
-+ case "$OS_TARGET" in
-+ WINNT)
-+ ICU_LIB_NAMES="icuin icuuc icudt"
-+ ;;
-+ Darwin|Linux)
-+ ICU_LIB_NAMES="icui18n icuuc icudata"
-+ ;;
-+ *)
-+ AC_MSG_ERROR([ECMAScript Internationalization API is not yet supported on this platform])
-+ esac
-+ MOZ_ICU_LIBS='$(call EXPAND_LIBNAME_PATH,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/lib)'
-+ fi
- fi
-
- AC_SUBST(ENABLE_INTL_API)
- AC_SUBST(ICU_LIB_NAMES)
--AC_SUBST(ICU_LIBS)
--
--dnl Source files that use ICU should have control over which parts of the ICU
--dnl namespace they want to use.
--AC_DEFINE(U_USING_ICU_NAMESPACE,0)
--
-+AC_SUBST(MOZ_ICU_LIBS)
-+AC_SUBST(MOZ_NATIVE_ICU)
-
- dnl Settings for ICU
--if test -n "$ENABLE_INTL_API" ; then
-+if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then
-+ dnl We build ICU as a static library.
-+ AC_DEFINE(U_STATIC_IMPLEMENTATION)
-+
-+ dnl Source files that use ICU should have control over which parts of the ICU
-+ dnl namespace they want to use.
-+ AC_DEFINE(U_USING_ICU_NAMESPACE,0)
-+
- # Set ICU compile options
- ICU_CPPFLAGS=""
- # don't use icu namespace automatically in client code
- ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_USING_ICU_NAMESPACE=0"
- # don't include obsolete header files
- ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
- # remove chunks of the library that we don't need (yet)
- ICU_CPPFLAGS="$ICU_CPPFLAGS -DUCONFIG_NO_LEGACY_CONVERSION"
-diff --git a/js/src/gdb/Makefile.in b/js/src/gdb/Makefile.in
---- mozilla/js/src/gdb/Makefile.in
-+++ mozilla/js/src/gdb/Makefile.in
-@@ -14,16 +14,20 @@ include $(DEPTH)/config/autoconf.mk
- # Building against js_static requires that we declare mfbt sybols "exported"
- # on its behalf.
- DEFINES += -DEXPORT_JS_API -DIMPL_MFBT
-
- LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIBS)
-
- LOCAL_INCLUDES += -I$(topsrcdir) -I..
-
-+ifdef MOZ_NATIVE_ICU
-+EXTRA_LIBS += $(MOZ_ICU_LIBS)
-+endif
-+
- EXTRA_LIBS += $(MOZ_FFI_LIBS)
-
- # Place a GDB Python auto-load file next to the gdb-tests executable, both
- # in the build directory and in the dist/bin directory.
- PP_TARGETS += GDB_AUTOLOAD
- GDB_AUTOLOAD := gdb-tests-gdb.py.in
- GDB_AUTOLOAD_FLAGS := -Dtopsrcdir=$(abspath $(topsrcdir))
-
-diff --git a/js/src/jsapi-tests/Makefile.in b/js/src/jsapi-tests/Makefile.in
---- mozilla/js/src/jsapi-tests/Makefile.in
-+++ mozilla/js/src/jsapi-tests/Makefile.in
-@@ -15,16 +15,20 @@ DEFINES += -DEXPORT_JS_API
- # Building against js_static requires that we declare mfbt sybols "exported"
- # on its behalf.
- DEFINES += -DIMPL_MFBT
-
- LIBS = $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(NSPR_LIBS) $(MOZ_ZLIB_LIBS)
-
- LOCAL_INCLUDES += -I$(topsrcdir) -I..
-
-+ifdef MOZ_NATIVE_ICU
-+EXTRA_LIBS += $(MOZ_ICU_LIBS)
-+endif
-+
- EXTRA_LIBS += $(MOZ_FFI_LIBS)
-
- ifdef QEMU_EXE
- MOZ_POST_PROGRAM_COMMAND = $(topsrcdir)/build/qemu-wrap --qemu $(QEMU_EXE) --libdir $(CROSS_LIB)
- endif
-
- # Place a GDB Python auto-load file next to the jsapi-tests executable in
- # the build directory.
-diff --git a/js/src/shell/Makefile.in b/js/src/shell/Makefile.in
---- mozilla/js/src/shell/Makefile.in
-+++ mozilla/js/src/shell/Makefile.in
-@@ -22,16 +22,19 @@ DEFINES += -DEXPORT_JS_API
- # Building against js_static requires that we declare mfbt sybols "exported"
- # on its behalf.
- DEFINES += -DIMPL_MFBT
-
- LIBS = $(NSPR_LIBS) $(EDITLINE_LIBS) $(DEPTH)/$(LIB_PREFIX)js_static.$(LIB_SUFFIX) $(MOZ_ZLIB_LIBS)
- ifdef MOZ_NATIVE_FFI
- EXTRA_LIBS += $(MOZ_FFI_LIBS)
- endif
-+ifdef MOZ_NATIVE_ICU
-+EXTRA_LIBS += $(MOZ_ICU_LIBS)
-+endif
-
- LOCAL_INCLUDES += -I$(topsrcdir) -I..
-
- ifeq ($(OS_ARCH),Darwin)
- ifeq ($(TARGET_CPU),x86_64)
- DARWIN_EXE_LDFLAGS += -pagezero_size 10000 -image_base 100000000
- endif
- endif
diff --git a/mail/thunderbird/files/patch-bug876156 b/mail/thunderbird/files/patch-bug876156
deleted file mode 100644
index 91e93b9b4cae..000000000000
--- a/mail/thunderbird/files/patch-bug876156
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git mfbt/Atomics.h mfbt/Atomics.h
-index d79af6c..40b9336 100644
---- mozilla/mfbt/Atomics.h
-+++ mozilla/mfbt/Atomics.h
-@@ -35,7 +35,7 @@
- */
- # if !defined(__linux__) && !defined(__OpenBSD__) && \
- (__cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)) && \
-- __has_include(<atomic>)
-+ __has_include_next(<atomic>)
- # define MOZ_HAVE_CXX11_ATOMICS
- # endif
- /*
diff --git a/mail/thunderbird/files/patch-bug878791 b/mail/thunderbird/files/patch-bug878791
deleted file mode 100644
index aa22938269e3..000000000000
--- a/mail/thunderbird/files/patch-bug878791
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/toolkit/components/osfile/osfile_unix_allthreads.jsm.orig 2013-05-11 21:19:53.000000000 +0200
-+++ mozilla/toolkit/components/osfile/osfile_unix_allthreads.jsm 2013-06-02 17:15:05.000000000 +0200
-@@ -40,7 +40,7 @@ if (typeof Components != "undefined") {
- // Open libc
- let libc;
- let libc_candidates = [ "libSystem.B.dylib",
-- "libc.so.6",
-+ "libc.so.7",
- "libc.so" ];
- for (let i = 0; i < libc_candidates.length; ++i) {
- try {
diff --git a/mail/thunderbird/files/patch-bug886181 b/mail/thunderbird/files/patch-bug886181
deleted file mode 100644
index 892f123b4a52..000000000000
--- a/mail/thunderbird/files/patch-bug886181
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/modules/libpref/src/init/all.js~
-+++ mozilla/modules/libpref/src/init/all.js
-@@ -193,7 +193,7 @@ pref("media.webm.enabled", true);
- pref("media.dash.enabled", false);
- #endif
- #ifdef MOZ_GSTREAMER
--pref("media.gstreamer.enabled", false);
-+pref("media.gstreamer.enabled", true);
- #endif
- #ifdef MOZ_WEBRTC
- pref("media.navigator.enabled", true);
diff --git a/mail/thunderbird/files/patch-bug889699 b/mail/thunderbird/files/patch-bug889699
deleted file mode 100644
index 13cc64c9a171..000000000000
--- a/mail/thunderbird/files/patch-bug889699
+++ /dev/null
@@ -1,175 +0,0 @@
-commit 7eb5827
-Author: Edwin Flores <eflores@mozilla.com>
-Date: Sat Jul 20 12:03:08 2013 +1200
-
- Bug 889699 - Make gstreamer backend return more accurate results for canPlayType() r=alessandro.d
----
- content/media/gstreamer/GStreamerFormatHelper.cpp | 90 +++++++++++++++++------
- 1 file changed, 66 insertions(+), 24 deletions(-)
-
-diff --git content/media/gstreamer/GStreamerFormatHelper.cpp content/media/gstreamer/GStreamerFormatHelper.cpp
-index f05ff8f..39f1fdf 100644
---- mozilla/content/media/gstreamer/GStreamerFormatHelper.cpp
-+++ mozilla/content/media/gstreamer/GStreamerFormatHelper.cpp
-@@ -6,7 +6,7 @@
-
- #include "GStreamerFormatHelper.h"
- #include "nsCharSeparatedTokenizer.h"
--#include "nsXPCOMStrings.h"
-+#include "nsString.h"
- #include "GStreamerLoader.h"
-
- #define ENTRY_FORMAT(entry) entry[0]
-@@ -36,7 +36,7 @@ void GStreamerFormatHelper::Shutdown() {
- }
- }
-
--char const *const GStreamerFormatHelper::mContainers[6][2] = {
-+static char const *const sContainers[6][2] = {
- {"video/mp4", "video/quicktime"},
- {"video/quicktime", "video/quicktime"},
- {"audio/mp4", "audio/x-m4a"},
-@@ -45,7 +45,7 @@ char const *const GStreamerFormatHelper::mContainers[6][2] = {
- {"audio/mp3", "audio/mpeg, mpegversion=(int)1"},
- };
-
--char const *const GStreamerFormatHelper::mCodecs[9][2] = {
-+static char const *const sCodecs[9][2] = {
- {"avc1.42E01E", "video/x-h264"},
- {"avc1.42001E", "video/x-h264"},
- {"avc1.58A01E", "video/x-h264"},
-@@ -57,6 +57,15 @@ char const *const GStreamerFormatHelper::mCodecs[9][2] = {
- {"mp3", "audio/mpeg, mpegversion=(int)1"},
- };
-
-+static char const * const sDefaultCodecCaps[][2] = {
-+ {"video/mp4", "video/x-h264"},
-+ {"video/quicktime", "video/x-h264"},
-+ {"audio/mp4", "audio/mpeg, mpegversion=(int)4"},
-+ {"audio/x-m4a", "audio/mpeg, mpegversion=(int)4"},
-+ {"audio/mp3", "audio/mpeg, layer=(int)3"},
-+ {"audio/mpeg", "audio/mpeg, layer=(int)3"}
-+};
-+
- GStreamerFormatHelper::GStreamerFormatHelper()
- : mFactories(nullptr),
- mCookie(static_cast<uint32_t>(-1))
-@@ -66,15 +75,15 @@ GStreamerFormatHelper::GStreamerFormatHelper()
- }
-
- mSupportedContainerCaps = gst_caps_new_empty();
-- for (unsigned int i = 0; i < G_N_ELEMENTS(mContainers); i++) {
-- const char* capsString = mContainers[i][1];
-+ for (unsigned int i = 0; i < G_N_ELEMENTS(sContainers); i++) {
-+ const char* capsString = sContainers[i][1];
- GstCaps* caps = gst_caps_from_string(capsString);
- gst_caps_append(mSupportedContainerCaps, caps);
- }
-
- mSupportedCodecCaps = gst_caps_new_empty();
-- for (unsigned int i = 0; i < G_N_ELEMENTS(mCodecs); i++) {
-- const char* capsString = mCodecs[i][1];
-+ for (unsigned int i = 0; i < G_N_ELEMENTS(sCodecs); i++) {
-+ const char* capsString = sCodecs[i][1];
- GstCaps* caps = gst_caps_from_string(capsString);
- gst_caps_append(mSupportedCodecCaps, caps);
- }
-@@ -92,6 +101,41 @@ GStreamerFormatHelper::~GStreamerFormatHelper() {
- g_list_free(mFactories);
- }
-
-+static GstCaps *
-+GetContainerCapsFromMIMEType(const char *aType) {
-+ /* convert aMIMEType to gst container caps */
-+ const char* capsString = nullptr;
-+ for (uint32_t i = 0; i < G_N_ELEMENTS(sContainers); i++) {
-+ if (!strcmp(ENTRY_FORMAT(sContainers[i]), aType)) {
-+ capsString = ENTRY_CAPS(sContainers[i]);
-+ break;
-+ }
-+ }
-+
-+ if (!capsString) {
-+ /* we couldn't find any matching caps */
-+ return nullptr;
-+ }
-+
-+ return gst_caps_from_string(capsString);
-+}
-+
-+static GstCaps *
-+GetDefaultCapsFromMIMEType(const char *aType) {
-+ GstCaps *caps = GetContainerCapsFromMIMEType(aType);
-+
-+ for (uint32_t i = 0; i < G_N_ELEMENTS(sDefaultCodecCaps); i++) {
-+ if (!strcmp(sDefaultCodecCaps[i][0], aType)) {
-+ GstCaps *tmp = gst_caps_from_string(sDefaultCodecCaps[i][1]);
-+
-+ gst_caps_append(caps, tmp);
-+ return caps;
-+ }
-+ }
-+
-+ return nullptr;
-+}
-+
- bool GStreamerFormatHelper::CanHandleMediaType(const nsACString& aMIMEType,
- const nsAString* aCodecs) {
- if (!sLoadOK) {
-@@ -101,7 +145,15 @@ bool GStreamerFormatHelper::CanHandleMediaType(const nsACString& aMIMEType,
- const char *type;
- NS_CStringGetData(aMIMEType, &type, NULL);
-
-- GstCaps* caps = ConvertFormatsToCaps(type, aCodecs);
-+ GstCaps *caps;
-+ if (aCodecs && !aCodecs->IsEmpty()) {
-+ caps = ConvertFormatsToCaps(type, aCodecs);
-+ } else {
-+ // Get a minimal set of codec caps for this MIME type we should support so
-+ // that we don't overreport MIME types we are able to play.
-+ caps = GetDefaultCapsFromMIMEType(type);
-+ }
-+
- if (!caps) {
- return false;
- }
-@@ -118,21 +170,11 @@ GstCaps* GStreamerFormatHelper::ConvertFormatsToCaps(const char* aMIMEType,
-
- unsigned int i;
-
-- /* convert aMIMEType to gst container caps */
-- const char* capsString = nullptr;
-- for (i = 0; i < G_N_ELEMENTS(mContainers); i++) {
-- if (!strcmp(ENTRY_FORMAT(mContainers[i]), aMIMEType)) {
-- capsString = ENTRY_CAPS(mContainers[i]);
-- break;
-- }
-- }
--
-- if (!capsString) {
-- /* we couldn't find any matching caps */
-+ GstCaps *caps = GetContainerCapsFromMIMEType(aMIMEType);
-+ if (!caps) {
- return nullptr;
- }
-
-- GstCaps* caps = gst_caps_from_string(capsString);
- /* container only */
- if (!aCodecs) {
- return caps;
-@@ -141,11 +183,11 @@ GstCaps* GStreamerFormatHelper::ConvertFormatsToCaps(const char* aMIMEType,
- nsCharSeparatedTokenizer tokenizer(*aCodecs, ',');
- while (tokenizer.hasMoreTokens()) {
- const nsSubstring& codec = tokenizer.nextToken();
-- capsString = nullptr;
-+ const char *capsString = nullptr;
-
-- for (i = 0; i < G_N_ELEMENTS(mCodecs); i++) {
-- if (codec.EqualsASCII(ENTRY_FORMAT(mCodecs[i]))) {
-- capsString = ENTRY_CAPS(mCodecs[i]);
-+ for (i = 0; i < G_N_ELEMENTS(sCodecs); i++) {
-+ if (codec.EqualsASCII(ENTRY_FORMAT(sCodecs[i]))) {
-+ capsString = ENTRY_CAPS(sCodecs[i]);
- break;
- }
- }
diff --git a/mail/thunderbird/files/patch-bug893397 b/mail/thunderbird/files/patch-bug893397
deleted file mode 100644
index 16013eba0445..000000000000
--- a/mail/thunderbird/files/patch-bug893397
+++ /dev/null
@@ -1,201 +0,0 @@
-diff --git configure.in configure.in
-index 549ad06..2878d9f 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -8091,7 +8091,7 @@ case "$OS_TARGET" in
- NECKO_WIFI=1
- fi
- ;;
-- Darwin|SunOS|WINNT)
-+ Darwin|FreeBSD|SunOS|WINNT)
- NECKO_WIFI=1
- ;;
- Linux)
-diff --git netwerk/wifi/moz.build netwerk/wifi/moz.build
-index 07b01de..11706af 100644
---- mozilla/netwerk/wifi/moz.build
-+++ mozilla/netwerk/wifi/moz.build
-@@ -31,6 +31,10 @@ if CONFIG['OS_ARCH'] == 'Darwin':
- CPP_SOURCES += [
- 'nsWifiScannerMac.cpp',
- ]
-+elif CONFIG['OS_ARCH'] == 'FreeBSD':
-+ CPP_SOURCES += [
-+ 'nsWifiScannerFreeBSD.cpp',
-+ ]
- elif CONFIG['OS_ARCH'] == 'WINNT':
- CPP_SOURCES += [
- 'nsWifiScannerWin.cpp',
-diff --git netwerk/wifi/nsWifiScannerFreeBSD.cpp netwerk/wifi/nsWifiScannerFreeBSD.cpp
-new file mode 100644
-index 0000000..80d4cb6
---- /dev/null
-+++ mozilla/netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -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/. */
-+
-+// Developed by J.R. Oldroyd <fbsd@opal.com>, December 2012.
-+
-+// For FreeBSD we use the getifaddrs(3) to obtain the list of interfaces
-+// and then check for those with an 802.11 media type and able to return
-+// a list of stations. This is similar to ifconfig(8).
-+
-+#include <sys/types.h>
-+#include <sys/ioctl.h>
-+#include <sys/socket.h>
-+#include <net/if.h>
-+#include <net/if_media.h>
-+#include <net80211/ieee80211_ioctl.h>
-+
-+#include <ifaddrs.h>
-+#include <string.h>
-+#include <unistd.h>
-+
-+#include "nsWifiAccessPoint.h"
-+
-+using namespace mozilla;
-+
-+static nsresult
-+FreeBSDGetAccessPointData(nsCOMArray<nsWifiAccessPoint> &accessPoints)
-+{
-+ // get list of interfaces
-+ struct ifaddrs *ifal;
-+ if (getifaddrs(&ifal) < 0) {
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ accessPoints.Clear();
-+
-+ // loop through the interfaces
-+ nsresult rv = NS_ERROR_FAILURE;
-+ struct ifaddrs *ifa;
-+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ // limit to one interface per address
-+ if (ifa->ifa_addr->sa_family != AF_LINK) {
-+ continue;
-+ }
-+
-+ // store interface name in socket structure
-+ struct ifreq ifr;
-+ memset(&ifr, 0, sizeof(ifr));
-+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
-+ ifr.ifr_addr.sa_family = AF_LOCAL;
-+
-+ // open socket to interface
-+ int s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0);
-+ if (s < 0) {
-+ continue;
-+ }
-+
-+ // clear interface media structure
-+ struct ifmediareq ifmr;
-+ memset(&ifmr, 0, sizeof(ifmr));
-+ strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
-+
-+ // get interface media information
-+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
-+ close(s);
-+ continue;
-+ }
-+
-+ // check interface is a WiFi interface
-+ if (IFM_TYPE(ifmr.ifm_active) != IFM_IEEE80211) {
-+ close(s);
-+ continue;
-+ }
-+
-+ // perform WiFi scan
-+ struct ieee80211req i802r;
-+ char iscanbuf[32*1024];
-+ memset(&i802r, 0, sizeof(i802r));
-+ strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
-+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
-+ i802r.i_data = iscanbuf;
-+ i802r.i_len = sizeof(iscanbuf);
-+ if (ioctl(s, SIOCG80211, &i802r) < 0) {
-+ close(s);
-+ continue;
-+ }
-+
-+ // close socket
-+ close(s);
-+
-+ // loop through WiFi networks and build geoloc-lookup structure
-+ char *vsr = (char *) i802r.i_data;
-+ unsigned len = i802r.i_len;
-+ while (len >= sizeof(struct ieee80211req_scan_result)) {
-+ struct ieee80211req_scan_result *isr =
-+ (struct ieee80211req_scan_result *) vsr;
-+
-+ // determine size of this entry
-+ char *id;
-+ int idlen;
-+ if (isr->isr_meshid_len) {
-+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
-+ idlen = isr->isr_meshid_len;
-+ } else {
-+ id = vsr + isr->isr_ie_off;
-+ idlen = isr->isr_ssid_len;
-+ }
-+
-+ // copy network data
-+ char ssid[IEEE80211_NWID_LEN+1];
-+ strncpy(ssid, id, idlen);
-+ ssid[idlen] = '\0';
-+ nsWifiAccessPoint *ap = new nsWifiAccessPoint();
-+ ap->setSSID(ssid, strlen(ssid));
-+ ap->setMac(isr->isr_bssid);
-+ ap->setSignal(isr->isr_rssi);
-+ accessPoints.AppendObject(ap);
-+ rv = NS_OK;
-+
-+ // log the data
-+ LOG(( "FreeBSD access point: "
-+ "SSID: %s, MAC: %02x-%02x-%02x-%02x-%02x-%02x, "
-+ "Strength: %d, Channel: %dMHz\n",
-+ ssid, isr->isr_bssid[0], isr->isr_bssid[1], isr->isr_bssid[2],
-+ isr->isr_bssid[3], isr->isr_bssid[4], isr->isr_bssid[5],
-+ isr->isr_rssi, isr->isr_freq));
-+
-+ // increment pointers
-+ len -= isr->isr_len;
-+ vsr += isr->isr_len;
-+ }
-+ }
-+
-+ freeifaddrs(ifal);
-+
-+ return rv;
-+}
-+
-+nsresult
-+nsWifiMonitor::DoScan()
-+{
-+ // Regularly get the access point data.
-+
-+ nsCOMArray<nsWifiAccessPoint> lastAccessPoints;
-+ nsCOMArray<nsWifiAccessPoint> accessPoints;
-+
-+ do {
-+ nsresult rv = FreeBSDGetAccessPointData(accessPoints);
-+ if (NS_FAILED(rv))
-+ return rv;
-+
-+ bool accessPointsChanged = !AccessPointsEqual(accessPoints, lastAccessPoints);
-+ ReplaceArray(lastAccessPoints, accessPoints);
-+
-+ rv = CallWifiListeners(lastAccessPoints, accessPointsChanged);
-+ NS_ENSURE_SUCCESS(rv, rv);
-+
-+ // wait for some reasonable amount of time. pref?
-+ LOG(("waiting on monitor\n"));
-+
-+ ReentrantMonitorAutoEnter mon(mReentrantMonitor);
-+ mon.Wait(PR_SecondsToInterval(60));
-+ }
-+ while (mKeepGoing);
-+
-+ return NS_OK;
-+}
diff --git a/mail/thunderbird/files/patch-bug910875 b/mail/thunderbird/files/patch-bug910875
deleted file mode 100644
index 41fc23b3653d..000000000000
--- a/mail/thunderbird/files/patch-bug910875
+++ /dev/null
@@ -1,102 +0,0 @@
-diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc
-index f231b1e..6087696 100644
---- mozilla/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc
-+++ mozilla/media/webrtc/trunk/webrtc/modules/audio_device/audio_device_impl.cc
-@@ -16,7 +16,9 @@
- #include <assert.h>
- #include <string.h>
-
--#if defined(_WIN32)
-+#if defined(WEBRTC_DUMMY_AUDIO_BUILD)
-+// do not include platform specific headers
-+#elif defined(_WIN32)
- #include "audio_device_utility_win.h"
- #include "audio_device_wave_win.h"
- #if defined(WEBRTC_WINDOWS_CORE_AUDIO_BUILD)
-@@ -32,14 +34,8 @@
- #include <stdlib.h>
- #include "audio_device_utility_android.h"
- #include "audio_device_jni_android.h"
--#elif defined(WEBRTC_LINUX)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #include "audio_device_utility_linux.h"
-- #if defined(LINUX_ALSA)
-- #include "audio_device_alsa_linux.h"
-- #endif
-- #if defined(LINUX_PULSE)
-- #include "audio_device_pulse_linux.h"
-- #endif
- #elif defined(WEBRTC_IOS)
- #include "audio_device_utility_ios.h"
- #include "audio_device_ios.h"
-@@ -47,6 +43,12 @@
- #include "audio_device_utility_mac.h"
- #include "audio_device_mac.h"
- #endif
-+#if defined(LINUX_ALSA)
-+ #include "audio_device_alsa_linux.h"
-+#endif
-+#if defined(LINUX_PULSE)
-+ #include "audio_device_pulse_linux.h"
-+#endif
- #include "audio_device_dummy.h"
- #include "audio_device_utility_dummy.h"
- #include "critical_section_wrapper.h"
-@@ -161,7 +163,7 @@ WebRtc_Word32 AudioDeviceModuleImpl::Che
- #elif defined(WEBRTC_ANDROID)
- platform = kPlatformAndroid;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is ANDROID");
--#elif defined(WEBRTC_LINUX)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- platform = kPlatformLinux;
- WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is LINUX");
- #elif defined(WEBRTC_IOS)
-@@ -309,7 +311,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
-
- // Create the *Linux* implementation of the Audio Device
- //
--#elif defined(WEBRTC_LINUX)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- if ((audioLayer == kLinuxPulseAudio) || (audioLayer == kPlatformDefaultAudio))
- {
- #if defined(LINUX_PULSE)
-@@ -355,7 +357,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
- //
- ptrAudioDeviceUtility = new AudioDeviceUtilityLinux(Id());
- }
--#endif // #if defined(WEBRTC_LINUX)
-+#endif // #if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
-
- // Create the *iPhone* implementation of the Audio Device
- //
-diff --git media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc
-index defd7f8..906c4a2 100644
---- mozilla/media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc
-+++ mozilla/media/webrtc/trunk/webrtc/modules/audio_device/test/audio_device_test_api.cc
-@@ -197,7 +197,7 @@ class AudioDeviceAPITest: public testing::Test {
- // Create default implementation instance
- EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create(
- kId, AudioDeviceModule::kPlatformDefaultAudio)) != NULL);
--#elif defined(WEBRTC_LINUX)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create(
- kId, AudioDeviceModule::kWindowsWaveAudio)) == NULL);
- EXPECT_TRUE((audio_device_ = AudioDeviceModuleImpl::Create(
-@@ -1690,7 +1690,7 @@ TEST_F(AudioDeviceAPITest, CPULoad) {
-
- // TODO(kjellander): Fix flakiness causing failures on Windows.
- // TODO(phoglund): Fix flakiness causing failures on Linux.
--#if !defined(_WIN32) && !defined(WEBRTC_LINUX)
-+#if !defined(_WIN32) && !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
- TEST_F(AudioDeviceAPITest, StartAndStopRawOutputFileRecording) {
- // NOTE: this API is better tested in a functional test
- CheckInitialPlayoutStates();
-@@ -1759,7 +1759,7 @@ TEST_F(AudioDeviceAPITest, StartAndStopRawInputFileRecording) {
- // - size of raw_input_not_recording.pcm shall be 0
- // - size of raw_input_not_recording.pcm shall be > 0
- }
--#endif // !WIN32 && !WEBRTC_LINUX
-+#endif // !WIN32 && !WEBRTC_LINUX && !defined(WEBRTC_BSD)
-
- TEST_F(AudioDeviceAPITest, RecordingSampleRate) {
- uint32_t sampleRate(0);
diff --git a/mail/thunderbird/files/patch-bug916216 b/mail/thunderbird/files/patch-bug916216
deleted file mode 100644
index 2dd125855cb9..000000000000
--- a/mail/thunderbird/files/patch-bug916216
+++ /dev/null
@@ -1,39 +0,0 @@
---- mozilla/media/webrtc/trunk/build/build_config.h~
-+++ mozilla/media/webrtc/trunk/build/build_config.h
-@@ -37,9 +37,15 @@
- #elif defined(_WIN32)
- #define OS_WIN 1
- #define TOOLKIT_VIEWS 1
--#elif defined(__FreeBSD__)
-+#elif defined(__DragonFly__)
-+#define OS_DRAGONFLY 1
-+#define TOOLKIT_GTK
-+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- #define OS_FREEBSD 1
- #define TOOLKIT_GTK
-+#elif defined(__NetBSD__)
-+#define OS_NETBSD 1
-+#define TOOLKIT_GTK
- #elif defined(__OpenBSD__)
- #define OS_OPENBSD 1
- #define TOOLKIT_GTK
-@@ -56,15 +62,15 @@
-
- // For access to standard BSD features, use OS_BSD instead of a
- // more specific macro.
--#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \
-+ || defined(OS_NETBSD) || defined(OS_OPENBSD)
- #define OS_BSD 1
- #endif
-
- // For access to standard POSIXish features, use OS_POSIX instead of a
- // more specific macro.
--#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \
-- defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) || \
-- defined(OS_NACL)
-+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
-+ defined(OS_SOLARIS) || defined(OS_ANDROID) || defined(OS_NACL)
- #define OS_POSIX 1
- #endif
-
diff --git a/mail/thunderbird/files/patch-bug916589 b/mail/thunderbird/files/patch-bug916589
deleted file mode 100644
index 3c24bf7ef332..000000000000
--- a/mail/thunderbird/files/patch-bug916589
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
-index 5b50785..7cf47d5 100644
---- mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
-+++ mozilla/media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
-@@ -33,9 +33,10 @@
- #ifndef _SYS_QUEUE_H_
- #define _SYS_QUEUE_H_
-
--#if !defined(__FreeBSD__) && !defined(DARWIN)
- #include <stddef.h>
--#define __offsetof offsetof
-+
-+#ifndef offsetof
-+#define offsetof(type, field) ((size_t)(&((type *)0)->field))
- #endif
-
- #define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
-@@ -43,8 +44,6 @@
- (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
- (var) = (tvar))
-
--// #define __offsetof(type, field) ((size_t)(&((type *)0)->field))
--
- /*
- * This file defines four types of data structures: singly-linked lists,
- * singly-linked tail queues, lists and tail queues.
-@@ -285,7 +284,7 @@ struct { \
- (STAILQ_EMPTY((head)) ? \
- NULL : \
- ((struct type *) \
-- ((char *)((head)->stqh_last) - __offsetof(struct type, field))))
-+ ((char *)((head)->stqh_last) - offsetof(struct type, field))))
-
- #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
-
diff --git a/mail/thunderbird/files/patch-bug918177 b/mail/thunderbird/files/patch-bug918177
deleted file mode 100644
index 96ce225c25a8..000000000000
--- a/mail/thunderbird/files/patch-bug918177
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git config/stl-headers config/stl-headers
-index c057d8e..dc7f6f0 100644
---- mozilla/config/stl-headers
-+++ mozilla/config/stl-headers
-@@ -21,6 +21,7 @@ algorithm
- atomic
- deque
- ios
-+iosfwd
- iostream
- iterator
- limits
-diff --git config/system-headers config/system-headers
-index d31c94e..570c82a 100644
---- mozilla/config/system-headers
-+++ mozilla/config/system-headers
-@@ -469,6 +469,7 @@ IOKit/IOMessage.h
- IOKit/pwr_mgt/IOPMLib.h
- iomanip
- ios
-+iosfwd
- iostream
- iostream.h
- iterator
-diff --git js/src/config/system-headers js/src/config/system-headers
-index d31c94e..570c82a 100644
---- mozilla/js/src/config/system-headers
-+++ mozilla/js/src/config/system-headers
-@@ -469,6 +469,7 @@ IOKit/IOMessage.h
- IOKit/pwr_mgt/IOPMLib.h
- iomanip
- ios
-+iosfwd
- iostream
- iostream.h
- iterator
diff --git a/mail/thunderbird/files/patch-bug945046 b/mail/thunderbird/files/patch-bug945046
deleted file mode 100644
index 79f9ecaf36c2..000000000000
--- a/mail/thunderbird/files/patch-bug945046
+++ /dev/null
@@ -1,130 +0,0 @@
-diff --git config/system-headers config/system-headers
-index 432cba6..18a9627 100644
---- mozilla/config/system-headers
-+++ mozilla/config/system-headers
-@@ -1157,3 +1157,4 @@ unicode/uenum.h
- unicode/unum.h
- unicode/ustring.h
- #endif
-+libutil.h
-diff --git js/src/config/system-headers js/src/config/system-headers
-index 432cba6..18a9627 100644
---- mozilla/js/src/config/system-headers
-+++ mozilla/js/src/config/system-headers
-@@ -1157,3 +1157,4 @@ unicode/uenum.h
- unicode/unum.h
- unicode/ustring.h
- #endif
-+libutil.h
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
-index 9975621..b4b037d 100644
---- mozilla/toolkit/library/Makefile.in
-+++ mozilla/toolkit/library/Makefile.in
-@@ -289,6 +289,10 @@ OS_LIBS += $(call EXPAND_LIBNAME,kvm)
- EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols
- endif
-
-+ifeq ($(OS_ARCH),FreeBSD)
-+OS_LIBS += $(call EXPAND_LIBNAME,util)
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet wbemuuid)
- ifdef ACCESSIBILITY
-diff --git xpcom/base/nsMemoryReporterManager.cpp xpcom/base/nsMemoryReporterManager.cpp
-index b8147c8..0ffb34e 100644
---- mozilla/xpcom/base/nsMemoryReporterManager.cpp
-+++ mozilla/xpcom/base/nsMemoryReporterManager.cpp
-@@ -153,6 +153,43 @@ static nsresult GetResidentFast(int64_t
- return GetResident(n);
- }
-
-+#ifdef __FreeBSD__
-+#include <libutil.h>
-+
-+static nsresult
-+GetKinfoVmentrySelf(int64_t* prss)
-+{
-+ int cnt;
-+ struct kinfo_vmentry *vmmap, *kve;
-+ if ((vmmap = kinfo_getvmmap(getpid(), &cnt)) == NULL)
-+ return NS_ERROR_FAILURE;
-+
-+ if (prss)
-+ *prss = 0;
-+
-+ for (int i = 0; i < cnt; i++) {
-+ kve = &vmmap[i];
-+ if (prss)
-+ *prss += kve->kve_private_resident;
-+ }
-+
-+ free(vmmap);
-+ return NS_OK;
-+}
-+
-+#define HAVE_PRIVATE_REPORTER
-+static nsresult
-+GetPrivate(int64_t* aN)
-+{
-+ int64_t priv;
-+ nsresult rv = GetKinfoVmentrySelf(&priv);
-+ if (NS_SUCCEEDED(rv))
-+ *aN = priv * getpagesize();
-+
-+ return NS_OK;
-+}
-+#endif // FreeBSD
-+
- #elif defined(SOLARIS)
-
- #include <procfs.h>
-@@ -327,6 +364,24 @@ static nsresult GetResidentFast(int64_t
- }
-
- #define HAVE_PRIVATE_REPORTER
-+static nsresult
-+GetPrivate(int64_t* aN)
-+{
-+ PROCESS_MEMORY_COUNTERS_EX pmcex;
-+ pmcex.cb = sizeof(PROCESS_MEMORY_COUNTERS_EX);
-+
-+ if (!GetProcessMemoryInfo(
-+ GetCurrentProcess(),
-+ (PPROCESS_MEMORY_COUNTERS) &pmcex, sizeof(pmcex))) {
-+ return NS_ERROR_FAILURE;
-+ }
-+
-+ *aN = pmcex.PrivateUsage;
-+ return NS_OK;
-+}
-+#endif // XP_<PLATFORM>
-+
-+#ifdef HAVE_PRIVATE_REPORTER
- class PrivateReporter MOZ_FINAL : public MemoryReporterBase
- {
- public:
-@@ -339,21 +394,10 @@ public:
-
- NS_IMETHOD GetAmount(int64_t *aAmount)
- {
-- PROCESS_MEMORY_COUNTERS_EX pmcex;
-- pmcex.cb = sizeof(PROCESS_MEMORY_COUNTERS_EX);
--
-- if (!GetProcessMemoryInfo(
-- GetCurrentProcess(),
-- (PPROCESS_MEMORY_COUNTERS) &pmcex, sizeof(pmcex))) {
-- return NS_ERROR_FAILURE;
-- }
--
-- *aAmount = pmcex.PrivateUsage;
-- return NS_OK;
-+ return GetPrivate(aAmount);
- }
- };
--
--#endif // XP_<PLATFORM>
-+#endif
-
- #ifdef HAVE_VSIZE_AND_RESIDENT_REPORTERS
- class VsizeReporter MOZ_FINAL : public MemoryReporterBase
diff --git a/mail/thunderbird/files/patch-bug946560 b/mail/thunderbird/files/patch-bug946560
deleted file mode 100644
index f1ab78af9cce..000000000000
--- a/mail/thunderbird/files/patch-bug946560
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git xpcom/base/nsMemoryInfoDumper.cpp xpcom/base/nsMemoryInfoDumper.cpp
-index 0b2f78c..d857374 100644
---- mozilla/xpcom/base/nsMemoryInfoDumper.cpp
-+++ mozilla/xpcom/base/nsMemoryInfoDumper.cpp
-@@ -30,7 +30,7 @@
- #include <unistd.h>
- #endif
-
--#ifdef XP_LINUX
-+#if defined(XP_LINUX) || defined(__FreeBSD__)
- #include <fcntl.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -109,7 +109,7 @@ private:
-
- } // anonymous namespace
-
--#ifdef XP_LINUX // {
-+#if defined(XP_LINUX) || defined(__FreeBSD__) // {
- namespace {
-
- /*
-@@ -548,7 +548,7 @@ nsMemoryInfoDumper::~nsMemoryInfoDumper(
- /* static */ void
- nsMemoryInfoDumper::Initialize()
- {
--#ifdef XP_LINUX
-+#if defined(XP_LINUX) || defined(__FreeBSD__)
- SignalPipeWatcher::Create();
- FifoWatcher::MaybeCreate();
- #endif
-diff --git xpcom/base/nsMemoryReporterManager.cpp xpcom/base/nsMemoryReporterManager.cpp
-index 8c65665..8f6d0e9 100644
---- mozilla/xpcom/base/nsMemoryReporterManager.cpp
-+++ mozilla/xpcom/base/nsMemoryReporterManager.cpp
-@@ -824,7 +824,7 @@ nsMemoryReporterManager::Init()
- RegisterReporter(new mozilla::dmd::DMDReporter);
- #endif
-
--#if defined(XP_LINUX)
-+#if defined(XP_LINUX) || defined(__FreeBSD__)
- nsMemoryInfoDumper::Initialize();
- #endif
-
diff --git a/mail/thunderbird/files/patch-bug961264 b/mail/thunderbird/files/patch-bug961264
index 00d077b235db..1a4cd035ab7f 100644
--- a/mail/thunderbird/files/patch-bug961264
+++ b/mail/thunderbird/files/patch-bug961264
@@ -142,9 +142,9 @@ diff --git js/src/configure.in js/src/configure.in
index bddd46d..d4b522e 100644
--- mozilla/js/src/configure.in
+++ mozilla/js/src/configure.in
-@@ -2348,116 +2348,13 @@ fi
+@@ -2077,116 +2077,13 @@ AC_LANG_CPLUSPLUS
- AC_LANG_C
+ MOZ_CXX11
-dnl Check for .hidden assembler directive and visibility attribute.
-dnl Borrowed from glibc configure.in
@@ -249,7 +249,7 @@ index bddd46d..d4b522e 100644
- ])
- if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
- "$ac_cv_have_visibility_class_bug" = "no"; then
-- VISIBILITY_FLAGS='-I$(DIST)/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h'
+- VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
- WRAP_SYSTEM_INCLUDES=1
- else
- VISIBILITY_FLAGS='-fvisibility=hidden'
@@ -259,7 +259,7 @@ index bddd46d..d4b522e 100644
- fi # have visibility(hidden) attribute
+ AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
+ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
-+ VISIBILITY_FLAGS='-I$(DIST)/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h'
++ VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
+ WRAP_SYSTEM_INCLUDES=1
fi # GNU_CC
diff --git a/mail/thunderbird/files/patch-bug961816 b/mail/thunderbird/files/patch-bug961816
deleted file mode 100644
index 12c7441f5c83..000000000000
--- a/mail/thunderbird/files/patch-bug961816
+++ /dev/null
@@ -1,48 +0,0 @@
-diff --git config/system-headers config/system-headers
-index 8803150..ae38d68 100644
---- mozilla/config/system-headers
-+++ mozilla/config/system-headers
-@@ -1158,3 +1158,4 @@ unicode/unum.h
- unicode/ustring.h
- #endif
- libutil.h
-+unwind.h
-diff --git configure.in configure.in
-index f452a5e..a1ebbcc 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -7455,7 +7455,10 @@ dnl ========================================================
- dnl = Support for gcc stack unwinding (from gcc 3.3)
- dnl ========================================================
- if test -z "$SKIP_LIBRARY_CHECKS"; then
-+ AC_LANG_SAVE
-+ AC_LANG_CPLUSPLUS
- MOZ_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
-+ AC_LANG_RESTORE
- fi
-
- dnl ========================================================
-diff --git config/system-headers config/system-headers
-index 8803150..ae38d68 100644
---- mozilla/js/src/config/system-headers
-+++ mozilla/js/src/config/system-headers
-@@ -1158,3 +1158,4 @@ unicode/unum.h
- unicode/ustring.h
- #endif
- libutil.h
-+unwind.h
-diff --git configure.in configure.in
-index f452a5e..a1ebbcc 100644
---- mozilla/js/src/configure.in
-+++ mozilla/js/src/configure.in
-@@ -7455,7 +7455,10 @@ dnl ========================================================
- dnl = Support for gcc stack unwinding (from gcc 3.3)
- dnl ========================================================
- if test -z "$SKIP_LIBRARY_CHECKS"; then
-+ AC_LANG_SAVE
-+ AC_LANG_CPLUSPLUS
- MOZ_CHECK_HEADER(unwind.h, AC_CHECK_FUNCS(_Unwind_Backtrace))
-+ AC_LANG_RESTORE
- fi
-
- dnl ========================================================
diff --git a/mail/thunderbird/files/patch-bug962345 b/mail/thunderbird/files/patch-bug962345
index d000cc7d11ee..d59fb9528285 100644
--- a/mail/thunderbird/files/patch-bug962345
+++ b/mail/thunderbird/files/patch-bug962345
@@ -2,16 +2,7 @@ diff --git config/system-headers config/system-headers
index 8803150..ae38d68 100644
--- mozilla/config/system-headers
+++ mozilla/config/system-headers
-@@ -1159,3 +1159,4 @@ unicode/ustring.h
- #endif
- libutil.h
- unwind.h
-+cairo-qt.h
-diff --git config/system-headers config/system-headers
-index 8803150..ae38d68 100644
---- mozilla/js/src/config/system-headers
-+++ mozilla/js/src/config/system-headers
-@@ -1159,3 +1159,4 @@ unicode/ustring.h
+@@ -1144,3 +1144,4 @@ unicode/utypes.h
#endif
libutil.h
unwind.h
diff --git a/mail/thunderbird/files/patch-bug975634 b/mail/thunderbird/files/patch-bug975634
deleted file mode 100644
index e2ab4063c5a0..000000000000
--- a/mail/thunderbird/files/patch-bug975634
+++ /dev/null
@@ -1,63 +0,0 @@
-diff --git configure.in configure.in
-index 0d9236a..0447104 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -9034,6 +9034,20 @@ AC_SUBST(MOZ_FOLD_LIBS)
- AC_SUBST(MOZ_ENABLE_SZIP)
- AC_SUBST(MOZ_SZIP_FLAGS)
-
-+AC_MSG_CHECKING([for posix_fadvise])
-+AC_TRY_LINK([#define _XOPEN_SOURCE 600
-+ #include <fcntl.h>],
-+ [posix_fadvise(0, 0, 0, 0);],
-+ [ac_cv___posix_fadvise=true],
-+ [ac_cv___posix_fadvise=false])
-+
-+if test "$ac_cv___posix_fadvise" = true ; then
-+ AC_DEFINE(HAVE_POSIX_FADVISE)
-+ AC_MSG_RESULT(yes)
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+
- AC_MSG_CHECKING([for posix_fallocate])
- AC_TRY_LINK([#define _XOPEN_SOURCE 600
- #include <fcntl.h>],
-diff --git js/src/configure.in js/src/configure.in
-index da9767c..352ba14 100644
---- mozilla/js/src/configure.in
-+++ mozilla/js/src/configure.in
-@@ -4025,6 +4025,20 @@ AC_SUBST(CXX_VERSION)
- AC_SUBST(MSMANIFEST_TOOL)
- AC_SUBST(MOZ_LINKER)
-
-+AC_MSG_CHECKING([for posix_fadvise])
-+AC_TRY_LINK([#define _XOPEN_SOURCE 600
-+ #include <fcntl.h>],
-+ [posix_fadvise(0, 0, 0, 0);],
-+ [ac_cv___posix_fadvise=true],
-+ [ac_cv___posix_fadvise=false])
-+
-+if test "$ac_cv___posix_fadvise" = true ; then
-+ AC_DEFINE(HAVE_POSIX_FADVISE)
-+ AC_MSG_RESULT(yes)
-+else
-+ AC_MSG_RESULT(no)
-+fi
-+
- AC_MSG_CHECKING([for posix_fallocate])
- AC_TRY_LINK([#define _XOPEN_SOURCE 600
- #include <fcntl.h>],
-diff --git xpcom/io/nsLocalFileUnix.cpp xpcom/io/nsLocalFileUnix.cpp
-index bacf06c..0e46e4a 100644
---- mozilla/xpcom/io/nsLocalFileUnix.cpp
-+++ mozilla/xpcom/io/nsLocalFileUnix.cpp
-@@ -382,7 +382,7 @@ nsLocalFile::OpenNSPRFileDesc(int32_t flags, int32_t mode, PRFileDesc **_retval)
- PR_Delete(mPath.get());
- }
-
--#if defined(LINUX) && !defined(ANDROID)
-+#if defined(HAVE_POSIX_FADVISE)
- if (flags & OS_READAHEAD) {
- posix_fadvise(PR_FileDesc2NativeHandle(*_retval), 0, 0,
- POSIX_FADV_SEQUENTIAL);
diff --git a/mail/thunderbird/files/patch-bug977457 b/mail/thunderbird/files/patch-bug977457
deleted file mode 100644
index 82209ce2ec29..000000000000
--- a/mail/thunderbird/files/patch-bug977457
+++ /dev/null
@@ -1,27 +0,0 @@
-diff --git xpcom/base/nsStackWalk.cpp xpcom/base/nsStackWalk.cpp
-index bb0e15b..7641267 100644
---- mozilla/xpcom/base/nsStackWalk.cpp
-+++ mozilla/xpcom/base/nsStackWalk.cpp
-@@ -23,6 +23,12 @@ struct CriticalAddress {
- };
- static CriticalAddress gCriticalAddress;
-
-+// for _Unwind_Backtrace from libcxxrt or libunwind
-+// cxxabi.h from libcxxrt implicitly includes unwind.h first
-+#if defined(HAVE__UNWIND_BACKTRACE) && !defined(_GNU_SOURCE)
-+#define _GNU_SOURCE
-+#endif
-+
- #if defined(HAVE_DLOPEN) || defined(XP_MACOSX)
- #include <dlfcn.h>
- #endif
-@@ -1222,9 +1228,6 @@ NS_StackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames,
- #elif defined(HAVE__UNWIND_BACKTRACE)
-
- // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0
--#ifndef _GNU_SOURCE
--#define _GNU_SOURCE
--#endif
- #include <unwind.h>
-
- struct unwind_info {
diff --git a/mail/thunderbird/files/patch-bug981348 b/mail/thunderbird/files/patch-bug981348
new file mode 100644
index 000000000000..d24dec68d05a
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug981348
@@ -0,0 +1,41 @@
+diff --git dom/system/OSFileConstants.cpp dom/system/OSFileConstants.cpp
+index 4b21361..cb3be32 100644
+--- mozilla/dom/system/OSFileConstants.cpp
++++ mozilla/dom/system/OSFileConstants.cpp
+@@ -596,7 +596,7 @@ static const dom::ConstantSpec gLibcProperties[] =
+
+ { "OSFILE_SIZEOF_STATVFS", INT_TO_JSVAL(sizeof (struct statvfs)) },
+
+- { "OSFILE_OFFSETOF_STATVFS_F_BSIZE", INT_TO_JSVAL(offsetof (struct statvfs, f_bsize)) },
++ { "OSFILE_OFFSETOF_STATVFS_F_FRSIZE", INT_TO_JSVAL(offsetof (struct statvfs, f_frsize)) },
+ { "OSFILE_OFFSETOF_STATVFS_F_BAVAIL", INT_TO_JSVAL(offsetof (struct statvfs, f_bavail)) },
+
+ #endif // defined(XP_UNIX)
+diff --git toolkit/components/osfile/modules/osfile_unix_back.jsm toolkit/components/osfile/modules/osfile_unix_back.jsm
+index b59fca4..0cf220b 100644
+--- mozilla/toolkit/components/osfile/modules/osfile_unix_back.jsm
++++ mozilla/toolkit/components/osfile/modules/osfile_unix_back.jsm
+@@ -228,8 +228,8 @@
+ let statvfs = new SharedAll.HollowStructure("statvfs",
+ Const.OSFILE_SIZEOF_STATVFS);
+
+- statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BSIZE,
+- "f_bsize", Type.unsigned_long.implementation);
++ statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_FRSIZE,
++ "f_frsize", Type.unsigned_long.implementation);
+ statvfs.add_field_at(Const.OSFILE_OFFSETOF_STATVFS_F_BAVAIL,
+ "f_bavail", Type.fsblkcnt_t.implementation);
+
+diff --git toolkit/components/osfile/modules/osfile_unix_front.jsm toolkit/components/osfile/modules/osfile_unix_front.jsm
+index 99e5e9b..de642c5 100644
+--- mozilla/toolkit/components/osfile/modules/osfile_unix_front.jsm
++++ mozilla/toolkit/components/osfile/modules/osfile_unix_front.jsm
+@@ -373,7 +373,7 @@
+ throw_on_negative("statvfs", UnixFile.statvfs(sourcePath, fileSystemInfoPtr));
+
+ let bytes = new Type.uint64_t.implementation(
+- fileSystemInfo.f_bsize * fileSystemInfo.f_bavail);
++ fileSystemInfo.f_frsize * fileSystemInfo.f_bavail);
+
+ return bytes.value;
+ };
diff --git a/mail/thunderbird/files/patch-bug985848 b/mail/thunderbird/files/patch-bug985848
deleted file mode 100644
index f23d04ad6157..000000000000
--- a/mail/thunderbird/files/patch-bug985848
+++ /dev/null
@@ -1,22 +0,0 @@
---- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
-+++ mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
-@@ -19,7 +19,7 @@
- #include <stdlib.h>
-
- //v4l includes
--#if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
- #include <sys/videoio.h>
- #elif defined(__sun)
- #include <sys/videodev2.h>
---- mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
-+++ mozilla/media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
-@@ -18,7 +18,7 @@
- #include <string.h>
-
- //v4l includes
--#if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__)
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
- #include <sys/videoio.h>
- #elif defined(__sun)
- #include <sys/videodev2.h>
diff --git a/mail/thunderbird/files/patch-clang34-disable-stdcall b/mail/thunderbird/files/patch-clang34-disable-stdcall
index 6abb13eb72ef..2b91fba7197f 100644
--- a/mail/thunderbird/files/patch-clang34-disable-stdcall
+++ b/mail/thunderbird/files/patch-clang34-disable-stdcall
@@ -6,8 +6,8 @@
* NS_HIDDEN_(int) NS_FASTCALL func2(char *foo);
*/
--#if defined(__i386__) && defined(__GNUC__) && !defined(XP_OS2)
-+#if defined(__i386__) && defined(__GNUC__) && !defined(XP_OS2) && !(defined(__clang__) && __clang_major__ == 3 && __clang_minor__ == 4 && __clang_patchlevel__ == 0)
+-#if defined(__i386__) && defined(__GNUC__)
++#if defined(__i386__) && defined(__GNUC__) && !(defined(__clang__) && __clang_major__ == 3 && __clang_minor__ == 4 && __clang_patchlevel__ == 0)
#define NS_FASTCALL __attribute__ ((regparm (3), stdcall))
#define NS_CONSTRUCTOR_FASTCALL __attribute__ ((regparm (3), stdcall))
#elif defined(XP_WIN) && !defined(_WIN64)
diff --git a/mail/thunderbird/files/patch-config-baseconfig.mk b/mail/thunderbird/files/patch-config-baseconfig.mk
index 20a51fe6ac1b..fedf7c5d8a8e 100644
--- a/mail/thunderbird/files/patch-config-baseconfig.mk
+++ b/mail/thunderbird/files/patch-config-baseconfig.mk
@@ -1,8 +1,6 @@
--- config/baseconfig.mk~
+++ config/baseconfig.mk
-@@ -1,9 +1,9 @@
- INCLUDED_AUTOCONF_MK = 1
-
+@@ -1,7 +1,7 @@
-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)
diff --git a/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in b/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in
deleted file mode 100644
index 727a86a4c3bc..000000000000
--- a/mail/thunderbird/files/patch-mozilla-ipc-chromium-Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- mozilla/ipc/chromium/Makefile.in~
-+++ mozilla/ipc/chromium/Makefile.in
-@@ -55,9 +60,7 @@ vpath %.c \
- $(srcdir)/src/third_party/libevent \
- $(NULL)
- else # } else {
--# message_pump_libevent.cc includes third_party/libevent/event.h,
--# which we put in $(DIST), see export rule below
--LOCAL_INCLUDES += -I$(DIST)
-+LOCAL_INCLUDES += $(filter %/compat, $(MOZ_LIBEVENT_CFLAGS))
- endif # }
-
- vpath %.cc \
diff --git a/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc b/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc
deleted file mode 100644
index ba9c0d6d3416..000000000000
--- a/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-message_pump_libevent.cc
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/ipc/chromium/src/base/message_pump_libevent.cc~
-+++ mozilla/ipc/chromium/src/base/message_pump_libevent.cc
-@@ -16,7 +16,7 @@
- #include "base/scoped_ptr.h"
- #include "base/time.h"
- #include "nsDependentSubstring.h"
--#include "third_party/libevent/event.h"
-+#include "event.h"
-
- // Lifecycle of struct event
- // Libevent uses two main data structures:
diff --git a/mail/thunderbird/files/patch-zz-bug517422 b/mail/thunderbird/files/patch-z-bug517422
index 413a57a17e82..bc7f0c545bb8 100644
--- a/mail/thunderbird/files/patch-zz-bug517422
+++ b/mail/thunderbird/files/patch-z-bug517422
@@ -18,52 +18,53 @@ index 5383399..0410004 100644
$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
$(INSTALL) system_wrappers $(DIST)
-diff --git toolkit/toolkit.mozbuild toolkit/toolkit.mozbuild
-index c22a36c..2febb45 100644
---- mozilla/toolkit/toolkit.mozbuild
-+++ mozilla/toolkit/toolkit.mozbuild
-@@ -64,13 +64,13 @@ add_tier_dir('platform', 'rdf')
- if CONFIG['MOZ_JSDEBUGGER']:
- add_tier_dir('platform', 'js/jsd')
+diff --git config/external/moz.build config/external/moz.build
+index f67c5c7..eb909ce 100644
+--- mozilla/config/external/moz.build
++++ mozilla/config/external/moz.build
+@@ -15,13 +15,19 @@ if CONFIG['MOZ_UPDATER']:
+ if not CONFIG['MOZ_NATIVE_BZ2']:
+ external_dirs += ['modules/libbz2']
-if CONFIG['MOZ_VORBIS']:
++if not CONFIG['MOZ_NATIVE_OGG']:
++ external_dirs += ['media/libogg']
++
++if not CONFIG['MOZ_NATIVE_THEORA']:
++ external_dirs += ['media/libtheora']
++
+if CONFIG['MOZ_VORBIS'] and not CONFIG['MOZ_NATIVE_VORBIS']:
- add_tier_dir('platform', 'media/libvorbis')
+ external_dirs += ['media/libvorbis']
-if CONFIG['MOZ_TREMOR']:
+if CONFIG['MOZ_TREMOR'] and not CONFIG['MOZ_NATIVE_TREMOR']:
- add_tier_dir('platform', 'media/libtremor')
+ external_dirs += ['media/libtremor']
-if CONFIG['MOZ_OPUS']:
+if CONFIG['MOZ_OPUS'] and not CONFIG['MOZ_NATIVE_OPUS']:
- add_tier_dir('platform', 'media/libopus')
+ external_dirs += ['media/libopus']
if CONFIG['MOZ_WEBM']:
-@@ -82,7 +82,10 @@ if CONFIG['MOZ_VP8'] and not CONFIG['MOZ
- add_tier_dir('platform', 'media/libvpx')
-
- if CONFIG['MOZ_OGG']:
-- add_tier_dir('platform', ['media/libogg', 'media/libtheora'])
-+ if not CONFIG['MOZ_NATIVE_OGG']:
-+ add_tier_dir('platform', 'media/libogg')
-+ if not CONFIG['MOZ_NATIVE_THEORA']:
-+ add_tier_dir('platform', 'media/libtheora')
-
- if CONFIG['MOZ_WEBRTC']:
- add_tier_dir('platform', [
-@@ -92,10 +95,10 @@ if CONFIG['MOZ_WEBRTC']:
- 'media/mtransport/standalone',
- ])
+@@ -36,13 +42,15 @@ if CONFIG['MOZ_VPX'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
+ if not CONFIG['MOZ_NATIVE_PNG']:
+ external_dirs += ['media/libpng']
--if CONFIG['MOZ_SPEEX_RESAMPLER']:
-+if CONFIG['MOZ_SPEEX_RESAMPLER'] and not CONFIG['MOZ_NATIVE_SPEEX']:
- add_tier_dir('platform', 'media/libspeex_resampler')
++if not CONFIG['MOZ_NATIVE_SPEEX']:
++ external_dirs += ['media/libspeex_resampler']
++
++if not CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
++ external_dirs += ['media/libsoundtouch']
++
+ external_dirs += [
+ 'media/kiss_fft',
+ 'media/libcubeb',
+- 'media/libogg',
+- 'media/libtheora',
+- 'media/libspeex_resampler',
+- 'media/libsoundtouch',
+ ]
--if CONFIG['MOZ_SOUNDTOUCH']:
-+if CONFIG['MOZ_SOUNDTOUCH'] and not CONFIG['MOZ_NATIVE_SOUNDTOUCH']:
- add_tier_dir('platform', 'media/libsoundtouch')
-
- if CONFIG['MOZ_CUBEB']:
+ PARALLEL_DIRS += ['../../' + i for i in external_dirs]
diff --git config/system-headers config/system-headers
index bef567c..9807c29 100644
--- mozilla/config/system-headers
@@ -120,7 +121,7 @@ diff --git configure.in configure.in
index 87db361..7947626 100644
--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -5211,6 +5211,57 @@ if test "${ac_cv_c_attribute_aligned}" != "0"; then
+@@ -5211,6 +5211,63 @@ if test "${ac_cv_c_attribute_aligned}" != "0"; then
fi
dnl ========================================================
@@ -134,6 +135,12 @@ index 87db361..7947626 100644
+
+if test -n "$MOZ_NATIVE_OGG"; then
+ PKG_CHECK_MODULES(MOZ_OGG, ogg >= 1.2.1)
++
++ _SAVE_LIBS=$LIBS
++ LIBS="$LIBS $MOZ_OGG_LIBS"
++ AC_CHECK_FUNC(ogg_set_mem_functions, [],
++ [AC_DEFINE(MOZ_OGG_NO_MEM_REPORTING)])
++ LIBS=$_SAVE_LIBS
+fi
+
+AC_SUBST(MOZ_NATIVE_OGG)
@@ -244,7 +251,7 @@ index 87db361..7947626 100644
+MOZ_NATIVE_SOUNDTOUCH=)
+
+if test -n "$MOZ_NATIVE_SOUNDTOUCH"; then
-+ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.7.0)
++ PKG_CHECK_MODULES(MOZ_SOUNDTOUCH, soundtouch >= 1.8.0)
+
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
@@ -276,15 +283,28 @@ index 87db361..7947626 100644
dnl = Disable VP8 decoder support
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(webm,
+diff --git content/media/AudioStream.h content/media/AudioStream.h
+index 085676d..00c54fb 100644
+--- mozilla/content/media/AudioStream.h
++++ mozilla/content/media/AudioStream.h
+@@ -26,7 +26,7 @@ public:
+ };
+
+ namespace soundtouch {
+-class SoundTouch;
++class MOZ_IMPORT_API SoundTouch;
+ }
+
+ namespace mozilla {
diff --git content/media/Makefile.in content/media/Makefile.in
index fd34449..c6c42c8 100644
--- mozilla/content/media/Makefile.in
+++ mozilla/content/media/Makefile.in
-@@ -6,4 +6,31 @@ include $(topsrcdir)/config/rules.mk
+@@ -6,3 +6,31 @@ include $(topsrcdir)/config/rules.mk
CFLAGS += $(GSTREAMER_CFLAGS)
CXXFLAGS += $(GSTREAMER_CFLAGS)
-
++
+ifdef MOZ_NATIVE_OGG
+CXXFLAGS += $(MOZ_OGG_CFLAGS)
+endif
@@ -324,98 +344,16 @@ index 4c14494..1cb98e2 100644
+ifdef MOZ_NATIVE_SPEEX
+CFLAGS += $(MOZ_SPEEX_CFLAGS)
+endif
-+
- AudioNodeEngineNEON.$(OBJ_SUFFIX): CXXFLAGS += -mfpu=neon
-diff --git layout/media/Makefile.in layout/media/Makefile.in
-index 1cacbd7..a8cd156 100644
---- mozilla/layout/media/Makefile.in
-+++ mozilla/layout/media/Makefile.in
-@@ -36,31 +36,45 @@ ifdef MOZ_TREE_PIXMAN
- SHARED_LIBRARY_LIBS += $(MOZ_PIXMAN_LIBS)
- endif
-
-+ifdef MOZ_OGG
-+ifndef MOZ_NATIVE_OGG
-+SHARED_LIBRARY_LIBS += \
-+ $(DEPTH)/media/libogg/src/$(LIB_PREFIX)ogg.$(LIB_SUFFIX) \
-+ $(NULL)
-+endif
-+endif
-+
- ifdef MOZ_VORBIS
-+ifndef MOZ_NATIVE_VORBIS
- SHARED_LIBRARY_LIBS += \
- $(DEPTH)/media/libvorbis/lib/$(LIB_PREFIX)vorbis.$(LIB_SUFFIX) \
-- $(DEPTH)/media/libogg/src/$(LIB_PREFIX)ogg.$(LIB_SUFFIX) \
- $(NULL)
- endif
-+endif
-
- ifdef MOZ_TREMOR
-+ifndef MOZ_NATIVE_TREMOR
- SHARED_LIBRARY_LIBS += \
- $(DEPTH)/media/libtremor/lib/$(LIB_PREFIX)tremor.$(LIB_SUFFIX) \
-- $(DEPTH)/media/libogg/src/$(LIB_PREFIX)ogg.$(LIB_SUFFIX) \
- $(NULL)
- endif
-+endif
-
- ifdef MOZ_OGG
-+ifndef MOZ_NATIVE_THEORA
- SHARED_LIBRARY_LIBS += \
- $(DEPTH)/media/libtheora/lib/$(LIB_PREFIX)theora.$(LIB_SUFFIX) \
- $(NULL)
- endif
-+endif
-
- ifdef MOZ_OPUS
-+ifndef MOZ_NATIVE_OPUS
- SHARED_LIBRARY_LIBS += \
- $(DEPTH)/media/libopus/$(LIB_PREFIX)opus.$(LIB_SUFFIX) \
- $(NULL)
- endif
-+endif
-
- ifdef MOZ_WEBM
- SHARED_LIBRARY_LIBS += \
-@@ -77,16 +91,20 @@ endif
- endif
-
- ifdef MOZ_SPEEX_RESAMPLER
-+ifndef MOZ_NATIVE_SPEEX
- SHARED_LIBRARY_LIBS += \
- $(DEPTH)/media/libspeex_resampler/src/$(LIB_PREFIX)speex_resampler.$(LIB_SUFFIX) \
- $(NULL)
- endif
-+endif
-
- ifdef MOZ_SOUNDTOUCH
-+ifndef MOZ_NATIVE_SOUNDTOUCH
- SHARED_LIBRARY_LIBS += \
- $(DEPTH)/media/libsoundtouch/src/$(LIB_PREFIX)soundtouch.$(LIB_SUFFIX) \
- $(NULL)
- endif
-+endif
-
- ifdef MOZ_CUBEB
- SHARED_LIBRARY_LIBS += \
diff --git media/libtheora/Makefile.in media/libtheora/Makefile.in
new file mode 100644
index 0000000..1f02dc0
--- /dev/null
+++ mozilla/media/libtheora/Makefile.in
-@@ -0,0 +1,16 @@
+@@ -0,0 +1,9 @@
+# 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/.
+
-+DEPTH = @DEPTH@
-+topsrcdir = @top_srcdir@
-+srcdir = @srcdir@
-+VPATH = @srcdir@
-+
-+include $(DEPTH)/config/autoconf.mk
-+
+include $(topsrcdir)/config/rules.mk
+
+ifdef MOZ_NATIVE_OGG
@@ -426,18 +364,11 @@ new file mode 100644
index 0000000..1f02dc0
--- /dev/null
+++ mozilla/media/libtremor/Makefile.in
-@@ -0,0 +1,16 @@
+@@ -0,0 +1,9 @@
+# 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/.
+
-+DEPTH = @DEPTH@
-+topsrcdir = @top_srcdir@
-+srcdir = @srcdir@
-+VPATH = @srcdir@
-+
-+include $(DEPTH)/config/autoconf.mk
-+
+include $(topsrcdir)/config/rules.mk
+
+ifdef MOZ_NATIVE_OGG
@@ -448,18 +379,11 @@ new file mode 100644
index 0000000..1f02dc0
--- /dev/null
+++ mozilla/media/libvorbis/Makefile.in
-@@ -0,0 +1,16 @@
+@@ -0,0 +1,9 @@
+# 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/.
+
-+DEPTH = @DEPTH@
-+topsrcdir = @top_srcdir@
-+srcdir = @srcdir@
-+VPATH = @srcdir@
-+
-+include $(DEPTH)/config/autoconf.mk
-+
+include $(topsrcdir)/config/rules.mk
+
+ifdef MOZ_NATIVE_OGG
@@ -491,7 +415,7 @@ index 00e77e7..55f48ab 100644
['build_with_mozilla==1', {
# Mozilla provides its own build of the opus library.
- 'include_dirs': [
-- '$(DIST)/include/opus',
+- '/media/libopus/include',
- ]
+ 'cflags_mozilla': [
+ '$(MOZ_OPUS_CFLAGS)',
@@ -499,10 +423,10 @@ index 00e77e7..55f48ab 100644
}, {
'dependencies': [
'<(DEPTH)/third_party/opus/opus.gyp:opus'
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
+diff --git toolkit/library/libxul.mk toolkit/library/libxul.mk
index d42137a..695e75a8 100644
---- mozilla/toolkit/library/Makefile.in
-+++ mozilla/toolkit/library/Makefile.in
+--- mozilla/toolkit/library/libxul.mk
++++ mozilla/toolkit/library/libxul.mk
@@ -77,6 +77,34 @@ ifdef MOZ_NATIVE_HUNSPELL
EXTRA_DSO_LDOPTS += $(MOZ_HUNSPELL_LIBS)
endif
@@ -538,3 +462,31 @@ index d42137a..695e75a8 100644
ifdef MOZ_NATIVE_LIBEVENT
EXTRA_DSO_LDOPTS += $(MOZ_LIBEVENT_LIBS)
endif
+diff --git xpcom/build/nsXPComInit.cpp xpcom/build/nsXPComInit.cpp
+index 2cf281e..6d7af0e 100644
+--- mozilla/xpcom/build/nsXPComInit.cpp
++++ mozilla/xpcom/build/nsXPComInit.cpp
+@@ -130,7 +130,9 @@ extern nsresult nsStringInputStreamConstructor(nsISupports *, REFNSIID, void **)
+ #include "mozilla/VisualEventTracer.h"
+ #endif
+
++#ifndef MOZ_OGG_NO_MEM_REPORTING
+ #include "ogg/ogg.h"
++#endif
+ #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
+ #include "vpx_mem/vpx_mem.h"
+ #endif
+@@ -571,11 +573,13 @@ NS_InitXPCOM2(nsIServiceManager* *result,
+ // this oddness.
+ mozilla::SetICUMemoryFunctions();
+
++#ifndef MOZ_OGG_NO_MEM_REPORTING
+ // Do the same for libogg.
+ ogg_set_mem_functions(OggReporter::CountingMalloc,
+ OggReporter::CountingCalloc,
+ OggReporter::CountingRealloc,
+ OggReporter::CountingFree);
++#endif
+
+ #if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
+ // And for VPX.