aboutsummaryrefslogtreecommitdiff
path: root/mail/thunderbird
diff options
context:
space:
mode:
authorFlorian Smeets <flo@FreeBSD.org>2012-08-30 14:54:17 +0000
committerFlorian Smeets <flo@FreeBSD.org>2012-08-30 14:54:17 +0000
commit2f4c3550c50b8b9afa1652eff05e983b4e0d3f51 (patch)
tree2e5e88926978106511a58859840701a45059d65c /mail/thunderbird
parentc02b0fd529dbb7b95c859505ecb285011a16a3d5 (diff)
downloadports-2f4c3550c50b8b9afa1652eff05e983b4e0d3f51.tar.gz
ports-2f4c3550c50b8b9afa1652eff05e983b4e0d3f51.zip
Notes
Diffstat (limited to 'mail/thunderbird')
-rw-r--r--mail/thunderbird/Makefile13
-rw-r--r--mail/thunderbird/distinfo4
-rw-r--r--mail/thunderbird/files/extra-bug78053134
-rw-r--r--mail/thunderbird/files/patch-alsapulse94
-rw-r--r--mail/thunderbird/files/patch-bug72297561
-rw-r--r--mail/thunderbird/files/patch-bug72386054
-rw-r--r--mail/thunderbird/files/patch-bug753046317
-rw-r--r--mail/thunderbird/files/patch-bug75945924
-rw-r--r--mail/thunderbird/files/patch-bug760899 (renamed from mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp)22
-rw-r--r--mail/thunderbird/files/patch-bug76103025
-rw-r--r--mail/thunderbird/files/patch-bug76107788
-rw-r--r--mail/thunderbird/files/patch-bug76141922
-rw-r--r--mail/thunderbird/files/patch-bug77525727
-rw-r--r--mail/thunderbird/files/patch-bug77769632
-rw-r--r--mail/thunderbird/files/patch-bug778056 (renamed from mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp)0
-rw-r--r--mail/thunderbird/files/patch-bug778078 (renamed from mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp)2
-rw-r--r--mail/thunderbird/files/patch-bug77984728
-rw-r--r--mail/thunderbird/files/patch-bug781457 (renamed from mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp)8
-rw-r--r--mail/thunderbird/files/patch-bug781474 (renamed from mail/thunderbird/files/patch-mozilla__content__base__public__nsContentUtils.h)0
-rw-r--r--mail/thunderbird/files/patch-bug78346334
-rw-r--r--mail/thunderbird/files/patch-bug783571 (renamed from mail/thunderbird/files/patch-mail-components-Makefile.in)11
-rw-r--r--mail/thunderbird/files/patch-bug78474143
-rw-r--r--mail/thunderbird/files/patch-bug78477650
-rw-r--r--mail/thunderbird/files/patch-bug785638168
-rw-r--r--mail/thunderbird/files/patch-configure.in49
-rw-r--r--mail/thunderbird/files/patch-mail-components-build-Makefile.in11
-rw-r--r--mail/thunderbird/files/patch-mozilla-config-mkdepend-Makefile.in10
-rw-r--r--mail/thunderbird/files/patch-mozilla-config_autoconf.mk.in9
-rw-r--r--mail/thunderbird/files/patch-mozilla-configure.in30
-rw-r--r--mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp11
-rw-r--r--mail/thunderbird/files/patch-mozilla-gfx-thebes-gfxPlatform.cpp34
-rw-r--r--mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in21
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-Makefile.in11
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in11
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-config_config.mk10
-rw-r--r--mail/thunderbird/files/patch-mozilla-js-src-jscpucfg.h22
-rw-r--r--mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in14
-rw-r--r--mail/thunderbird/files/patch-mozilla-media-libvpx-vpx_config.c16
-rw-r--r--mail/thunderbird/files/patch-mozilla-media-libvpx-vpx_config.h16
-rw-r--r--mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk46
-rw-r--r--mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile11
-rw-r--r--mail/thunderbird/files/patch-mozilla-security_nss_lib_freebl_mpi_mpcpucache.c43
-rw-r--r--mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp12
-rw-r--r--mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp10
-rw-r--r--mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp10
-rw-r--r--mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-public-xptcstubsdecl.inc11
-rw-r--r--mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in38
-rw-r--r--mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp8
-rw-r--r--mail/thunderbird/files/patch-mozilla_toolkit_mozapps_installer_packager_mk13
-rw-r--r--mail/thunderbird/files/patch-nsprpub-pr-include-md_freebsd.cfg100
-rw-r--r--mail/thunderbird/files/patch-nsprpub-pr-include-md_freebsd.h30
51 files changed, 981 insertions, 787 deletions
diff --git a/mail/thunderbird/Makefile b/mail/thunderbird/Makefile
index 9695b317d753..dbe6ea12e4f3 100644
--- a/mail/thunderbird/Makefile
+++ b/mail/thunderbird/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= thunderbird
-DISTVERSION= 14.0
+DISTVERSION= 15.0
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source
@@ -17,13 +17,13 @@ COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
BUILD_DEPENDS= nspr>=4.9:${PORTSDIR}/devel/nspr \
nss>=3.13.2:${PORTSDIR}/security/nss \
- sqlite3>=3.7.11:${PORTSDIR}/databases/sqlite3 \
+ sqlite3>=3.7.12.1:${PORTSDIR}/databases/sqlite3 \
+ ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 \
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
unzip:${PORTSDIR}/archivers/unzip
-CONFLICTS_BUILD= spidermonkey-*
-
USE_AUTOTOOLS= autoconf213:env
+USE_PYTHON_BUILD=yes
USE_GECKO= gecko
CONFLICTS= thunderbird-10.*
USE_MOZILLA= # empty
@@ -34,7 +34,6 @@ USE_QT4= # empty
QT_NONSTANDARD= yes
ALL_TARGET= default
GNU_CONFIGURE= yes
-OBJDIR_BUILD= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GL= gl
@@ -76,10 +75,6 @@ CFLAGS+= -mminimal-toc
BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
.endif
-.if !empty(CXX:M*clang++*)
-CFLAGS+= -Wno-return-type-c-linkage
-.endif
-
.if ${PORT_OPTIONS:MLIGHTNING}
MOZ_OPTIONS+= --enable-calendar
MOZ_MK_OPTIONS+= MOZ_CO_PROJECT=calendar
diff --git a/mail/thunderbird/distinfo b/mail/thunderbird/distinfo
index 603e0620591c..8e9f074875b3 100644
--- a/mail/thunderbird/distinfo
+++ b/mail/thunderbird/distinfo
@@ -1,2 +1,2 @@
-SHA256 (thunderbird-14.0.source.tar.bz2) = 29225e82c1dce9d44d1b81cf0441749ef8fc4168291cc75bcbcfe9b930f10c3a
-SIZE (thunderbird-14.0.source.tar.bz2) = 105235591
+SHA256 (thunderbird-15.0.source.tar.bz2) = acbf31d36c49a878eeefd59c37e2fd9e2173c99482c93310dfd9c6c799bb3d4d
+SIZE (thunderbird-15.0.source.tar.bz2) = 105942186
diff --git a/mail/thunderbird/files/extra-bug780531 b/mail/thunderbird/files/extra-bug780531
new file mode 100644
index 000000000000..a63bcaed35fa
--- /dev/null
+++ b/mail/thunderbird/files/extra-bug780531
@@ -0,0 +1,34 @@
+--- mozilla/configure.in~
++++ mozilla/configure.in
+@@ -5585,10 +5585,13 @@ if test -n "$MOZ_OGG"; then
+ MOZ_SYDNEYAUDIO=1
+ MOZ_CUBEB=1
+ MOZ_MEDIA=1
+- case "$target_cpu" in
+- arm*)
++ case "$target" in
++ arm-*-linux*)
+ MOZ_TREMOR=1
+ ;;
++ *-freebsd*)
++ MOZ_TREMOR=1
++ ;;
+ *)
+ MOZ_VORBIS=1
+ ;;
+@@ -5715,10 +5720,13 @@ if test -n "$MOZ_WEBM" -a -z "$MOZ_NATIV
+ MOZ_SYDNEYAUDIO=1
+ MOZ_CUBEB=1
+ MOZ_MEDIA=1
+- case "$target_cpu" in
+- arm*)
++ case "$target" in
++ arm-*-linux*)
+ MOZ_TREMOR=1
+ ;;
++ *-freebsd*)
++ MOZ_TREMOR=1
++ ;;
+ *)
+ MOZ_VORBIS=1
+ ;;
diff --git a/mail/thunderbird/files/patch-alsapulse b/mail/thunderbird/files/patch-alsapulse
index 7851f7348511..f3e94050d63d 100644
--- a/mail/thunderbird/files/patch-alsapulse
+++ b/mail/thunderbird/files/patch-alsapulse
@@ -1,46 +1,46 @@
---- mozilla/config/autoconf.mk.in~
+diff --git mozilla/config/autoconf.mk.in mozilla/config/autoconf.mk.in
+index 44c0b06..748511b 100644
+--- mozilla/config/autoconf.mk.in
+++ mozilla/config/autoconf.mk.in
-@@ -568,8 +568,13 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF
+@@ -536,9 +536,14 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CFLAGS@
MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@
MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@
+MOZ_ALSA = @MOZ_ALSA@
MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@
MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@
-+
+
+MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@
+MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@
+MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@
-
++
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
---- mozilla/configure.in~
+ GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@
+diff --git mozilla/configure.in mozilla/configure.in
+index 5980b76..11f5f77 100644
+--- mozilla/configure.in
+++ mozilla/configure.in
-@@ -5758,17 +5775,47 @@ dnl ====================================
+@@ -5600,13 +5600,45 @@ dnl ========================================================
dnl = Check alsa availability on Linux if using sydneyaudio
dnl ========================================================
+MOZ_ARG_ENABLE_BOOL(alsa,
-+[ --enable-alsa Enable Alsa support],
++[ --enable-alsa Enable Alsa support (default on Linux)],
+MOZ_ALSA=1,
+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
+
dnl If using sydneyaudio with Linux, ensure that the alsa library is available
--if test -n "$MOZ_SYDNEYAUDIO"; then
-+if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then
- case "$target_os" in
- linux*)
-+ MOZ_ALSA=1
-+ ;;
-+ esac
+-if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
++if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux" -a "$MOZ_ALSA_FORCE" != "no"; then
++ MOZ_ALSA=1
+fi
+
+if test -n "$MOZ_ALSA"; then
- PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
++ AC_DEFINE(MOZ_CUBEB)
+ PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
[echo "$MOZ_ALSA_PKG_ERRORS"
AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])])
-- ;;
-- esac
fi
+AC_SUBST(MOZ_ALSA)
@@ -55,6 +55,7 @@
+MOZ_PULSEAUDIO=)
+
+if test -n "$MOZ_PULSEAUDIO"; then
++ AC_DEFINE(MOZ_CUBEB)
+ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, ,
+ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS"
+ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])])
@@ -65,9 +66,55 @@
+AC_SUBST(MOZ_PULSEAUDIO)
+
dnl ========================================================
- dnl Permissions System
+ dnl = Enable GStreamer
dnl ========================================================
---- mozilla/media/libsydneyaudio/src/Makefile.in~
+diff --git mozilla/media/libcubeb/src/Makefile.in mozilla/media/libcubeb/src/Makefile.in
+index 5ab4dd8..c8df26f 100644
+--- mozilla/media/libcubeb/src/Makefile.in
++++ mozilla/media/libcubeb/src/Makefile.in
+@@ -24,10 +24,6 @@ endif
+
+ ifeq ($(OS_TARGET),Android)
+ # No Android implementation of libcubeb yet.
+-else ifeq ($(OS_TARGET),Linux)
+-CSRCS = \
+- cubeb_alsa.c \
+- $(NULL)
+ endif
+
+ ifeq ($(OS_TARGET),Darwin)
+@@ -42,4 +38,16 @@ CSRCS = \
+ $(NULL)
+ endif
+
++ifdef MOZ_ALSA
++CSRCS = \
++ cubeb_alsa.c \
++ $(NULL)
++endif
++
++ifdef MOZ_PULSEAUDIO
++CSRCS = \
++ cubeb_pulse.c \
++ $(NULL)
++endif
++
+ include $(topsrcdir)/config/rules.mk
+diff --git mozilla/media/libcubeb/src/cubeb_alsa.c media/libcubeb/src/cubeb_alsa.c
+index 599aea2..41fd5af 100644
+--- mozilla/media/libcubeb/src/cubeb_alsa.c
++++ mozilla/media/libcubeb/src/cubeb_alsa.c
+@@ -6,6 +6,6 @@
+ #undef NDEBUG
+ #define _BSD_SOURCE
+-#define _POSIX_SOURCE
++#define _XOPEN_SOURCE 500
+ #include <pthread.h>
+ #include <sys/time.h>
+ #include <assert.h>
+diff --git mozilla/media/libsydneyaudio/src/Makefile.in mozilla/media/libsydneyaudio/src/Makefile.in
+index 8dda8ce..b19641d 100644
+--- mozilla/media/libsydneyaudio/src/Makefile.in
+++ mozilla/media/libsydneyaudio/src/Makefile.in
@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android)
CSRCS = \
@@ -99,20 +146,23 @@
ifeq ($(OS_ARCH),WINNT)
OS_LIBS += winmm.lib
endif
---- mozilla/toolkit/library/Makefile.in~
+diff --git mozilla/toolkit/library/Makefile.in mozilla/toolkit/library/Makefile.in
+index 43384e9..e46a6e3 100644
+--- mozilla/toolkit/library/Makefile.in
+++ mozilla/toolkit/library/Makefile.in
-@@ -375,10 +375,12 @@ endif
+@@ -379,10 +379,13 @@ endif
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
-ifdef MOZ_SYDNEYAUDIO
-ifeq ($(OS_ARCH),Linux)
++ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO))
+ifdef MOZ_ALSA
EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
endif
-+
+ifdef MOZ_PULSEAUDIO
+EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
++endif
endif
ifdef HAVE_CLOCK_MONOTONIC
diff --git a/mail/thunderbird/files/patch-bug722975 b/mail/thunderbird/files/patch-bug722975
new file mode 100644
index 000000000000..51bc5a4380ef
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug722975
@@ -0,0 +1,61 @@
+# HG changeset patch
+# Parent 9d3c9b863c697634e434b687d456bb82fa794ecf
+# User Uli Schlachter <psychon@znc.in>
+Bug 722975 - --enable-system-cairo build is broken after Bug 715658 fixed
+
+
+diff --git a/mozilla/gfx/thebes/gfxPlatform.cpp b/mozilla/gfx/thebes/gfxPlatform.cpp
+--- mozilla/gfx/thebes/gfxPlatform.cpp
++++ mozilla/gfx/thebes/gfxPlatform.cpp
+@@ -484,21 +484,19 @@ gfxPlatform::CreateDrawTargetForSurface(
+
+ cairo_user_data_key_t kSourceSurface;
+
+ void SourceBufferDestroy(void *srcBuffer)
+ {
+ static_cast<SourceSurface*>(srcBuffer)->Release();
+ }
+
+-void SourceSnapshotDetached(cairo_surface_t *nullSurf)
++void SourceSnapshotDetached(void *nullSurf)
+ {
+- gfxImageSurface* origSurf =
+- static_cast<gfxImageSurface*>(cairo_surface_get_user_data(nullSurf, &kSourceSurface));
+-
++ gfxImageSurface *origSurf = static_cast<gfxImageSurface*>(nullSurf);
+ origSurf->SetData(&kSourceSurface, NULL, NULL);
+ }
+
+ RefPtr<SourceSurface>
+ gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface)
+ {
+ void *userData = aSurface->GetData(&kSourceSurface);
+
+@@ -588,24 +586,19 @@ gfxPlatform::GetSourceSurfaceForSurface(
+ }
+
+ srcBuffer = Factory::CreateWrappingDataSourceSurface(imgSurface->Data(),
+ imgSurface->Stride(),
+ size, format);
+
+ }
+
+- cairo_surface_t *nullSurf =
+- cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
+- cairo_surface_set_user_data(nullSurf,
+- &kSourceSurface,
+- imgSurface,
+- NULL);
+- cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached);
+- cairo_surface_destroy(nullSurf);
++ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic",
++ (const unsigned char *) "data", 4,
++ SourceSnapshotDetached, imgSurface.get());
+ }
+
+ srcBuffer->AddRef();
+ aSurface->SetData(&kSourceSurface, srcBuffer, SourceBufferDestroy);
+
+ return srcBuffer;
+ }
+
diff --git a/mail/thunderbird/files/patch-bug723860 b/mail/thunderbird/files/patch-bug723860
new file mode 100644
index 000000000000..d76dbfe6d20c
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug723860
@@ -0,0 +1,54 @@
+commit 4e07587
+Author: Matthew Gregan <kinetik@flim.org>
+Date: Wed Jun 6 17:58:07 2012 +1200
+
+ Bug 723860 - Early bail from reader's GetBuffered() if not yet initialized. r=doublec
+---
+ content/media/gstreamer/nsGStreamerReader.cpp | 4 ++++
+ content/media/ogg/nsOggReader.cpp | 3 +--
+ content/media/wave/nsWaveReader.cpp | 3 +++
+ 3 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git mozilla/content/media/gstreamer/nsGStreamerReader.cpp mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+index 164fb2e..06a09b5 100644
+--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp
++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+@@ -505,6 +505,10 @@ nsresult nsGStreamerReader::Seek(PRInt64 aTarget,
+ nsresult nsGStreamerReader::GetBuffered(nsTimeRanges* aBuffered,
+ PRInt64 aStartTime)
+ {
++ if (!mInfo.mHasVideo && !mInfo.mHasAudio) {
++ return NS_OK;
++ }
++
+ GstFormat format = GST_FORMAT_TIME;
+ MediaResource* resource = mDecoder->GetResource();
+ gint64 resourceLength = resource->GetLength();
+diff --git mozilla/content/media/ogg/nsOggReader.cpp mozilla/content/media/ogg/nsOggReader.cpp
+index c6ff008..8d40e2c 100644
+--- mozilla/content/media/ogg/nsOggReader.cpp
++++ mozilla/content/media/ogg/nsOggReader.cpp
+@@ -1532,8 +1532,7 @@ nsresult nsOggReader::GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime)
+ {
+ // HasAudio and HasVideo are not used here as they take a lock and cause
+ // a deadlock. Accessing mInfo doesn't require a lock - it doesn't change
+- // after metadata is read and GetBuffered isn't called before metadata is
+- // read.
++ // after metadata is read.
+ if (!mInfo.mHasVideo && !mInfo.mHasAudio) {
+ // No need to search through the file if there are no audio or video tracks
+ return NS_OK;
+diff --git mozilla/content/media/wave/nsWaveReader.cpp mozilla/content/media/wave/nsWaveReader.cpp
+index 7242eb5..60fc1e1 100644
+--- mozilla/content/media/wave/nsWaveReader.cpp
++++ mozilla/content/media/wave/nsWaveReader.cpp
+@@ -239,6 +239,9 @@ static double RoundToUsecs(double aSeconds) {
+
+ nsresult nsWaveReader::GetBuffered(nsTimeRanges* aBuffered, PRInt64 aStartTime)
+ {
++ if (!mInfo.mHasAudio) {
++ return NS_OK;
++ }
+ PRInt64 startOffset = mDecoder->GetResource()->GetNextCachedData(mWavePCMOffset);
+ while (startOffset >= 0) {
+ PRInt64 endOffset = mDecoder->GetResource()->GetCachedDataEnd(startOffset);
diff --git a/mail/thunderbird/files/patch-bug753046 b/mail/thunderbird/files/patch-bug753046
index 16b3d832490c..8d1ccbf2b748 100644
--- a/mail/thunderbird/files/patch-bug753046
+++ b/mail/thunderbird/files/patch-bug753046
@@ -4,15 +4,14 @@ $NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 r
--- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2011-12-20 23:28:14.000000000 +0000
+++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp
-@@ -33,6 +33,8 @@
- #include "nsPluginsDir.h"
- #include "nsXULAppAPI.h"
+@@ -5,6 +5,7 @@
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+#include <unistd.h>
-+
- #ifdef MOZ_X11
- # include "mozilla/X11Util.h"
- #endif
+ #ifdef MOZ_WIDGET_QT
++#include <unistd.h> // for _exit()
+ #include <QtCore/QTimer>
+ #include "nsQAppInstance.h"
+ #include "NestedLoopTimer.h"
@@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin
// TODO: use PluginPRLibrary here
@@ -65,7 +64,7 @@ $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $
+
+CPPSRCS += \
+ atomicops_internals_x86_gcc.cc \
-+ file_util_bsd.cc \
++ file_util_linux.cc \
+ process_util_bsd.cc \
+ time_posix.cc \
+ $(NULL)
@@ -218,21 +217,23 @@ $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:1
#include <errno.h>
#include <fcntl.h>
-@@ -17,8 +17,13 @@
+@@ -17,9 +17,16 @@
#include <unistd.h>
#if MOZ_HAVE_EXECINFO_H
#include <execinfo.h>
--#include <sys/sysctl.h>
++#endif
++
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ #include <sys/sysctl.h>
#endif
+
+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
+#include <sys/user.h>
-+#elif defined(OS_FREEBSD)
-+#include <sys/proc.h>
+#endif
-+#include <sys/sysctl.h>
-
++
#include "base/basictypes.h"
#include "base/eintr_wrapper.h"
+ #include "base/logging.h"
@@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u
return false;
}
@@ -242,7 +243,7 @@ $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:1
// Based on Apple's recommended method as described in
// http://developer.apple.com/qa/qa2004/qa1361.html
-@@ -71,7 +76,13 @@ bool DebugUtil::BeingDebugged() {
+@@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() {
// This process is being debugged if the P_TRACED flag is set.
is_set = true;
@@ -250,6 +251,8 @@ $NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:1
+ being_debugged = (info.kp_flags & P_TRACED) != 0;
+#elif defined(OS_FREEBSD)
+ being_debugged = (info.ki_flag & P_TRACED) != 0;
++#elif defined(OS_OPENBSD)
++ being_debugged = (info.p_flag & P_TRACED) != 0;
+#else
being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
+#endif
@@ -397,105 +400,19 @@ index 9a34492..62b280c 100644
#else
typedef DirReaderFallback DirReaderPosix;
#endif
-$NetBSD: patch-ipc_chromium_src_base_file__util.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/file_util.h.orig 2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/file_util.h
-@@ -16,8 +16,8 @@
- #include <sys/stat.h>
- #elif defined(OS_POSIX)
- #include <sys/types.h>
--#include <fts.h>
- #include <sys/stat.h>
-+#include <fts.h>
- #endif
+diff --git mozilla/ipc/chromium/src/base/file_util_linux.cc mozilla/ipc/chromium/src/base/file_util_linux.cc
+index 171e44f..0c6dfcc 100644
+--- mozilla/ipc/chromium/src/base/file_util_linux.cc
++++ mozilla/ipc/chromium/src/base/file_util_linux.cc
+@@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) {
+ }
- #include <stdio.h>
-$NetBSD: patch-ipc_chromium_src_base_file__util__bsd.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/file_util_bsd.cc.orig 2012-01-07 18:21:18.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/file_util_bsd.cc
-@@ -0,0 +1,80 @@
-+// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+// this is a derivative of file_util_linux.cc
-+
-+#include "base/file_util.h"
-+
-+#include <fcntl.h>
-+#include <unistd.h>
-+
-+#include <string>
-+#include <vector>
-+
-+#include "base/eintr_wrapper.h"
-+#include "base/file_path.h"
-+#include "base/string_util.h"
-+
-+namespace file_util {
-+
-+bool GetTempDir(FilePath* path) {
-+ const char* tmp = getenv("TMPDIR");
-+ if (tmp)
-+ *path = FilePath(tmp);
-+ else
-+ *path = FilePath("/tmp");
-+ return true;
-+}
-+
-+bool GetShmemTempDir(FilePath* path) {
-+ return GetTempDir(path);
-+}
-+
-+bool CopyFile(const FilePath& from_path, const FilePath& to_path) {
-+ int infile = open(from_path.value().c_str(), O_RDONLY);
-+ if (infile < 0)
-+ return false;
-+
-+ int outfile = creat(to_path.value().c_str(), 0666);
-+ if (outfile < 0) {
-+ close(infile);
-+ return false;
-+ }
-+
-+ const size_t kBufferSize = 32768;
-+ std::vector<char> buffer(kBufferSize);
-+ bool result = true;
-+
-+ while (result) {
-+ ssize_t bytes_read = HANDLE_EINTR(read(infile, &buffer[0], buffer.size()));
-+ if (bytes_read < 0) {
-+ result = false;
-+ break;
-+ }
-+ if (bytes_read == 0)
-+ break;
-+ // Allow for partial writes
-+ ssize_t bytes_written_per_read = 0;
-+ do {
-+ ssize_t bytes_written_partial = HANDLE_EINTR(write(
-+ outfile,
-+ &buffer[bytes_written_per_read],
-+ bytes_read - bytes_written_per_read));
-+ if (bytes_written_partial < 0) {
-+ result = false;
-+ break;
-+ }
-+ bytes_written_per_read += bytes_written_partial;
-+ } while (bytes_written_per_read < bytes_read);
-+ }
-+
-+ if (HANDLE_EINTR(close(infile)) < 0)
-+ result = false;
-+ if (HANDLE_EINTR(close(outfile)) < 0)
-+ result = false;
-+
-+ return result;
-+}
-+
-+} // namespace file_util
+ bool GetShmemTempDir(FilePath* path) {
+-#ifdef ANDROID
++#if defined(ANDROID) || defined(OS_BSD)
+ return GetTempDir(path);
+ #else
+ *path = FilePath("/dev/shm");
$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $
--- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
@@ -505,7 +422,7 @@ $NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34
// FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine
-#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
-+#ifndef OS_LINUX
++#ifndef HAVE_STAT64
#define stat64 stat
#endif
@@ -531,27 +448,19 @@ $NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09
pump_ = new base::MessagePumpForUI();
#endif // OS_LINUX
} else if (type_ == TYPE_IO) {
-$NetBSD: patch-ipc_chromium_src_base_platform__file__posix.cc,v 1.1 2011/07/12 15:12:36 tnn Exp $
-
---- mozilla/ipc/chromium/src/base/platform_file_posix.cc.orig 2011-06-15 21:57:27.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/platform_file_posix.cc
-@@ -9,6 +9,7 @@
- #ifdef ANDROID
- #include <linux/stat.h>
- #endif
-+#include <sys/stat.h> /* for S_IRUSR */
-
- #include "base/logging.h"
- #include "base/string_util.h"
$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
--- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2011-12-20 23:28:19.000000000 +0000
+++ mozilla/ipc/chromium/src/base/platform_thread.h
-@@ -25,6 +25,8 @@ typedef pthread_t PlatformThreadHandle;
- #if defined(OS_LINUX)
+@@ -22,9 +22,11 @@ typedef void* PlatformThreadHandle; // HANDLE
+ #elif defined(OS_POSIX)
+ #include <pthread.h>
+ typedef pthread_t PlatformThreadHandle;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_OPENBSD)
#include <unistd.h>
typedef pid_t PlatformThreadId;
-+#elif defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined (OS_NETBSD)
++#elif defined(OS_BSD)
+typedef lwpid_t PlatformThreadId;
#elif defined(OS_MACOSX)
#include <mach/mach.h>
@@ -560,7 +469,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,9 +9,18 @@
+@@ -9,16 +9,30 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
@@ -568,22 +477,37 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
+#include <lwp.h>
#elif defined(OS_LINUX)
#include <sys/syscall.h>
- #include <unistd.h>
-+#elif defined(OS_DRAGONFLY)
-+#include <unistd.h>
+-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
+ #include <sys/prctl.h>
+-#elif !defined(__NetBSD__)
+-#include <pthread_np.h>
+#elif defined(OS_FREEBSD)
++#include <sys/param.h>
++#if __FreeBSD_version > 802500
++#include <sys/thr.h>
++#else
+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *); // XXX #include <sys/thr.h>
++extern "C" int thr_self(long *);
+_Pragma("GCC visibility pop")
-+#include <pthread_np.h>
++#endif
+ #endif
++
++#if !defined(OS_MACOSX)
+ #include <unistd.h>
#endif
++#if defined(OS_BSD) && !defined(OS_NETBSD)
++#include <pthread_np.h>
++#endif
++
#if defined(OS_MACOSX)
-@@ -38,7 +45,19 @@
+ namespace base {
+ void InitThreading();
+@@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() {
// into the kernel.
#if defined(OS_MACOSX)
return mach_thread_self();
--#elif defined (__OpenBSD__)
+-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#elif defined(OS_NETBSD)
+ return _lwp_self();
+#elif defined(OS_DRAGONFLY)
@@ -597,9 +521,25 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
+ return lwpid;
+# endif
+#elif defined(OS_OPENBSD)
- // TODO(BSD): find a better thread ID
- return (intptr_t)(pthread_self());
+- // TODO(BSD): find a better thread ID
+- return (intptr_t)(pthread_self());
++ return (intptr_t) (pthread_self());
#elif defined(OS_LINUX)
+ return syscall(__NR_gettid);
+ #endif
+@@ -102,9 +102,9 @@ void PlatformThread::SetName(const char* name) {
+ // Note that glibc also has a 'pthread_setname_np' api, but it may not be
+ // available everywhere and it's only benefit over using prctl directly is
+ // that it can set the name of threads other than the current thread.
+-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
++#if defined(OS_BSD) && !defined(OS_NETBSD)
+ pthread_set_name_np(pthread_self(), name);
+-#elif defined(__NetBSD__)
++#elif defined(OS_NETBSD)
+- pthread_setname_np(pthread_self(), "%s", name);
++ pthread_setname_np(pthread_self(), "%s", (void *)name);
+ #else
+ prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0);
$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
--- mozilla/ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100
@@ -641,7 +581,7 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
--- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000
+++ mozilla/ipc/chromium/src/base/process_util_bsd.cc
-@@ -0,0 +1,326 @@
+@@ -0,0 +1,318 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
@@ -650,36 +590,20 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
+
+#include "base/process_util.h"
+
-+#include <ctype.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <string>
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+/* DragonFly, as of v3.0.1, and FreeBSD 9.0-RELEASE do not explicitly mark symbols public */
-+#define PRE_SYS_INCLUDE _Pragma("GCC visibility push(default)")
-+#define POST_SYS_INCLUDE _Pragma("GCC visibility pop")
-+#else
-+#define PRE_SYS_INCLUDE
-+#define POST_SYS_INCLUDE
-+#endif
-+PRE_SYS_INCLUDE
-+#include <kvm.h>
-+POST_SYS_INCLUDE
++#include <sys/param.h>
+#include <sys/sysctl.h>
-+#include <sys/types.h>
+#include <sys/wait.h>
-+#if defined(OS_DRAGONFLY)
-+PRE_SYS_INCLUDE
-+#include <sys/user.h>
-+POST_SYS_INCLUDE
-+#define HAVE_POSIX_SPAWN 1
-+#endif
-+#if defined(OS_FREEBSD)
-+PRE_SYS_INCLUDE
++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
+#include <sys/user.h>
-+POST_SYS_INCLUDE
+#endif
+
++#include <ctype.h>
++#include <fcntl.h>
++#include <kvm.h>
++#include <unistd.h>
++
++#include <string>
++
+#include "base/debug_util.h"
+#include "base/eintr_wrapper.h"
+#include "base/file_util.h"
@@ -687,17 +611,21 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
+#include "base/string_tokenizer.h"
+#include "base/string_util.h"
+
-+#if defined(OS_NETBSD)
-+#include <sys/param.h>
-+#if __NetBSD_Version__ >= 600000000
++#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \
++ || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500)
+#define HAVE_POSIX_SPAWN 1
+#endif
++
++#ifndef __dso_public
++# ifdef __exported
++# define __dso_public __exported
++# else
++# define __dso_public __attribute__((__visibility__("default")))
++# endif
+#endif
+
+#ifdef HAVE_POSIX_SPAWN
-+PRE_SYS_INCLUDE
+#include <spawn.h>
-+POST_SYS_INCLUDE
+extern "C" char **environ __dso_public;
+#endif
+
@@ -938,7 +866,11 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
+# endif
+#else
+ kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
++#if defined(OS_OPENBSD)
++ struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries);
++#else
+ struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries);
++#endif
+ if (procs != NULL && numEntries > 0) {
+ for (int i = 0; i < numEntries; i++) {
+ if (exe != procs[i].p_comm) continue;
@@ -1110,24 +1042,30 @@ $NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45
--- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-03-13 01:36:53.000000000 +0000
+++ mozilla/ipc/chromium/src/build/build_config.h
-@@ -19,17 +19,23 @@
+@@ -19,6 +19,12 @@
#define OS_MACOSX 1
#elif defined(__linux__) || defined(ANDROID)
#define OS_LINUX 1
-+#elif defined(__NetBSD__)
-+#define OS_NETBSD 1
+#elif defined(__DragonFly__)
+#define OS_DRAGONFLY 1
++#elif defined(__FreeBSD__)
++#define OS_FREEBSD 1
++#elif defined(__NetBSD__)
++#define OS_NETBSD 1
#elif defined(__OpenBSD__)
#define OS_OPENBSD 1
#elif defined(_WIN32)
- #define OS_WIN 1
-+#elif defined(__FreeBSD__)
-+#define OS_FREEBSD 1
- #else
+@@ -27,9 +33,16 @@
#error Please add support for your platform in build/build_config.h
#endif
++// For access to standard BSD features, use OS_BSD instead of a
++// more specific macro.
++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \
++ || defined(OS_NETBSD) || defined(OS_OPENBSD)
++#define OS_BSD 1
++#endif
++
// For access to standard POSIX features, use OS_POSIX instead of a more
// specific macro.
-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD)
@@ -1169,7 +1107,7 @@ $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/0
#endif
-#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
-+#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
++#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
// There size_t is a synonym for |unsigned long| ...
template <>
struct ParamTraits<size_t> {
@@ -1178,7 +1116,7 @@ $NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/0
#endif // defined(OS_MACOSX)
-#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
-+#if !((defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS))
++#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS))
// int64 is |long int| on 64-bit systems, uint64 is |unsigned long|
template <>
struct ParamTraits<int64> {
@@ -1200,7 +1138,7 @@ $NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06
};
typedef HandleAndSequenceNum Id;
-#elif defined(OS_MACOSX)
-+#elif defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
++#elif defined(OS_MACOSX) || defined(OS_BSD)
typedef base::SharedMemoryHandle Handle;
// On Mac, the inode number of the backing file is used as an id.
typedef base::SharedMemoryId Id;
@@ -1255,16 +1193,31 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoo
newEnvVars,
#endif
false, &process, arch);
+diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h
+index f37998d..b05dc7b 100644
+--- mozilla/ipc/glue/SharedMemorySysV.h
++++ mozilla/ipc/glue/SharedMemorySysV.h
+@@ -8,7 +8,7 @@
+ #ifndef mozilla_ipc_SharedMemorySysV_h
+ #define mozilla_ipc_SharedMemorySysV_h
+
+-#if defined(OS_LINUX) && !defined(ANDROID)
++#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD)
+
+ // SysV shared memory isn't available on Windows, but we define the
+ // following macro so that #ifdefs are clearer (compared to #ifdef
$NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $
--- mozilla/toolkit/library/Makefile.in.orig 2012-05-23 18:57:09.000000000 +0000
+++ mozilla/toolkit/library/Makefile.in
-@@ -534,6 +538,10 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
+@@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
endif
endif
+ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH)))
+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
++# keep `environ' unresolved, see bug 14426 for binutils
++EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols
+endif
+
ifeq ($(OS_ARCH),WINNT)
diff --git a/mail/thunderbird/files/patch-bug759459 b/mail/thunderbird/files/patch-bug759459
new file mode 100644
index 000000000000..5434a759b353
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug759459
@@ -0,0 +1,24 @@
+commit 4d0c5b9
+Author: Marco Perez <bugmail@millibyte.net>
+Date: Sat Jun 9 12:24:56 2012 -0400
+
+ Bug 759459 - Build broken on FreeBSD since patch for bug 745034 landed. r=terrence
+---
+ js/src/gc/Memory.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git js/src/gc/Memory.cpp js/src/gc/Memory.cpp
+index 815e90b..10c1a91 100644
+--- mozilla/js/src/gc/Memory.cpp
++++ mozilla/js/src/gc/Memory.cpp
+@@ -292,9 +292,9 @@ GetPageFaultCount()
+ #elif defined(XP_UNIX) || defined(XP_MACOSX) || defined(DARWIN)
+
+ #include <sys/mman.h>
+-#include <unistd.h>
+ #include <sys/time.h>
+ #include <sys/resource.h>
++#include <unistd.h>
+
+ void
+ InitMemorySubsystem()
diff --git a/mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp b/mail/thunderbird/files/patch-bug760899
index fe7e4c54e1e7..c81b855e7fc2 100644
--- a/mail/thunderbird/files/patch-mozilla-content-media-gstreamer-nsGStreamerReader.cpp
+++ b/mail/thunderbird/files/patch-bug760899
@@ -1,25 +1,3 @@
-commit f0a73aa
-Author: Paul Adenot <paul@paul.cx>
-Date: Thu Jun 21 20:44:39 2012 -0400
-
- Bug 761419 - Build failure in content/media/gstreamer/nsGStreamerReader.cpp when using clang r=kinetik
----
- content/media/gstreamer/nsGStreamerReader.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git content/media/gstreamer/nsGStreamerReader.cpp content/media/gstreamer/nsGStreamerReader.cpp
-index 06a09b5..c48f92e 100644
---- mozilla/content/media/gstreamer/nsGStreamerReader.cpp
-+++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp
-@@ -191,7 +191,7 @@ nsresult nsGStreamerReader::ReadMetadata(nsVideoInfo* aInfo)
- * stream but that are otherwise decodeable.
- */
- guint flags[3] = {GST_PLAY_FLAG_VIDEO|GST_PLAY_FLAG_AUDIO,
-- ~GST_PLAY_FLAG_AUDIO, ~GST_PLAY_FLAG_VIDEO};
-+ static_cast<guint>(~GST_PLAY_FLAG_AUDIO), static_cast<guint>(~GST_PLAY_FLAG_VIDEO)};
- guint default_flags, current_flags;
- g_object_get(mPlayBin, "flags", &default_flags, NULL);
-
commit 667daed
Author: Stephen Moehle <stephen.moehle@gmail.com>
Date: Tue Jun 5 11:32:36 2012 +1200
diff --git a/mail/thunderbird/files/patch-bug761030 b/mail/thunderbird/files/patch-bug761030
new file mode 100644
index 000000000000..d6b96cc697f3
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug761030
@@ -0,0 +1,25 @@
+commit 8bc9e15
+Author: Stephen Moehle <stephen.moehle@gmail.com>
+Date: Tue Jun 5 11:31:13 2012 +1200
+
+ Bug 761030 - Fix crash with HTML 5 video with GStreamer enabled - r=kinetik
+
+ --HG--
+ extra : rebase_source : 5e884550f9870bd2fda247d50bebd472e8368588
+---
+ content/media/gstreamer/nsGStreamerReader.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git mozilla/content/media/gstreamer/nsGStreamerReader.cpp mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+index 17374a3..6a50e09 100644
+--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp
++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+@@ -452,6 +452,8 @@ bool nsGStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip,
+ i, height);
+ b.mPlanes[i].mWidth = gst_video_format_get_component_width(format,
+ i, width);
++ b.mPlanes[i].mOffset = 0;
++ b.mPlanes[i].mSkip = 0;
+ }
+
+ bool isKeyframe = !GST_BUFFER_FLAG_IS_SET(buffer,
diff --git a/mail/thunderbird/files/patch-bug761077 b/mail/thunderbird/files/patch-bug761077
new file mode 100644
index 000000000000..3c8040ed6754
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug761077
@@ -0,0 +1,88 @@
+diff --git mozilla/xpcom/reflect/xptcall/public/genstubs.pl mozilla/xpcom/reflect/xptcall/public/genstubs.pl
+index b8a87a5..918c4cf 100644
+--- mozilla/xpcom/reflect/xptcall/public/genstubs.pl
++++ mozilla/xpcom/reflect/xptcall/public/genstubs.pl
+@@ -44,7 +44,7 @@ print OUTFILE "* 0 is QueryInterface\n";
+ print OUTFILE "* 1 is AddRef\n";
+ print OUTFILE "* 2 is Release\n";
+ print OUTFILE "*/\n";
+-print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))\n";
++print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))\n";
+ for($i = 0; $i < $entry_count; $i++) {
+ print OUTFILE "NS_IMETHOD Stub",$i+3,"();\n";
+ }
+diff --git mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc
+index eb66761..807db26 100644
+--- mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc
++++ mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc
+@@ -8,7 +8,7 @@
+ * 1 is AddRef
+ * 2 is Release
+ */
+-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
++#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
+ NS_IMETHOD Stub3();
+ NS_IMETHOD Stub4();
+ NS_IMETHOD Stub5();
+diff --git mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+index ae6ed66..2783957 100644
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
+@@ -70,7 +70,7 @@ endif
+ endif
+ endif
+ # IA64 Linux
+-ifneq (,$(filter Linux,$(OS_ARCH)))
++ifneq (,$(filter Linux FreeBSD,$(OS_ARCH)))
+ ifneq (,$(findstring ia64,$(OS_TEST)))
+ CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp
+ ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s
+@@ -269,7 +269,7 @@ endif
+ #
+ # Linux/PPC
+ #
+-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
++ifneq (,$(filter Linuxpowerpc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST)))
+ CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
+ ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
+ AS := $(CC) -c -x assembler-with-cpp
+@@ -278,7 +278,7 @@ endif
+ #
+ # Linux/PPC64
+ #
+-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
++ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
+ CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
+ ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
+ AS := $(CC) -c -x assembler-with-cpp
+@@ -350,7 +350,7 @@ endif
+ #
+ # OpenBSD/SPARC64
+ #
+-ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64)
++ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST)))
+ CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp
+ ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s
+ endif
+diff --git mozilla/xpcom/reflect/xptcall/src/xptcprivate.h mozilla/xpcom/reflect/xptcall/src/xptcprivate.h
+index d903ced..e4ec832 100644
+--- mozilla/xpcom/reflect/xptcall/src/xptcprivate.h
++++ mozilla/xpcom/reflect/xptcall/src/xptcprivate.h
+@@ -14,7 +14,7 @@
+
+ class xptiInterfaceEntry;
+
+-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
++#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
+ #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
+ #else
+ #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64) = 0;
+@@ -31,7 +31,7 @@ public:
+ #undef STUB_ENTRY
+ #undef SENTINEL_ENTRY
+
+-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
++#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
+ #define STUB_ENTRY(n) NS_IMETHOD Stub##n();
+ #else
+ #define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64);
diff --git a/mail/thunderbird/files/patch-bug761419 b/mail/thunderbird/files/patch-bug761419
new file mode 100644
index 000000000000..0c8c3d1d155a
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug761419
@@ -0,0 +1,22 @@
+commit f0a73aa
+Author: Paul Adenot <paul@paul.cx>
+Date: Thu Jun 21 20:44:39 2012 -0400
+
+ Bug 761419 - Build failure in content/media/gstreamer/nsGStreamerReader.cpp when using clang r=kinetik
+---
+ content/media/gstreamer/nsGStreamerReader.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git content/media/gstreamer/nsGStreamerReader.cpp content/media/gstreamer/nsGStreamerReader.cpp
+index 06a09b5..c48f92e 100644
+--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp
++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+@@ -191,7 +191,7 @@ nsresult nsGStreamerReader::ReadMetadata(nsVideoInfo* aInfo)
+ * stream but that are otherwise decodeable.
+ */
+ guint flags[3] = {GST_PLAY_FLAG_VIDEO|GST_PLAY_FLAG_AUDIO,
+- ~GST_PLAY_FLAG_AUDIO, ~GST_PLAY_FLAG_VIDEO};
++ static_cast<guint>(~GST_PLAY_FLAG_AUDIO), static_cast<guint>(~GST_PLAY_FLAG_VIDEO)};
+ guint default_flags, current_flags;
+ g_object_get(mPlayBin, "flags", &default_flags, NULL);
+
diff --git a/mail/thunderbird/files/patch-bug775257 b/mail/thunderbird/files/patch-bug775257
new file mode 100644
index 000000000000..904fec24a5a5
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug775257
@@ -0,0 +1,27 @@
+commit 8fc8b74
+Author: Oleg Romashin <oleg.romashin@nokia.com>
+Date: Wed Jul 18 22:46:11 2012 -0400
+
+ Bug 775257 - Gstreamer backend on Meego N9 produce extra noise in audio playback.r=giles
+---
+ content/media/gstreamer/nsGStreamerReader.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git mozilla/content/media/gstreamer/nsGStreamerReader.cpp mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+index c48f92e..0fb801a 100644
+--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp
++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+@@ -130,8 +130,13 @@ nsresult nsGStreamerReader::Init(nsBuiltinDecoderReader* aCloneDonor)
+ gst_object_unref(sinkpad);
+
+ mAudioSink = gst_parse_bin_from_description("capsfilter name=filter ! "
++#ifndef MOZ_TREMOR
+ "appsink name=audiosink sync=true caps=audio/x-raw-float,"
+ "channels={1,2},rate=44100,width=32,endianness=1234", TRUE, NULL);
++#else
++ "appsink name=audiosink sync=true caps=audio/x-raw-int,"
++ "channels={1,2},rate=48000,width=16,endianness=1234", TRUE, NULL);
++#endif
+ mAudioAppSink = GST_APP_SINK(gst_bin_get_by_name(GST_BIN(mAudioSink),
+ "audiosink"));
+ gst_app_sink_set_callbacks(mAudioAppSink, &mSinkCallbacks,
diff --git a/mail/thunderbird/files/patch-bug777696 b/mail/thunderbird/files/patch-bug777696
new file mode 100644
index 000000000000..4ac884a1452c
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug777696
@@ -0,0 +1,32 @@
+commit 0c0d1a8
+Author: Landry Breuil <landry@openbsd.org>
+Date: Mon Jul 30 17:57:15 2012 +0200
+
+ Bug 777696: Fix gstreamer backend on big endian architectures. r=doublec
+---
+ content/media/gstreamer/nsGStreamerReader.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git mozilla/content/media/gstreamer/nsGStreamerReader.cpp mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+index 0fb801a..4a69196 100644
+--- mozilla/content/media/gstreamer/nsGStreamerReader.cpp
++++ mozilla/content/media/gstreamer/nsGStreamerReader.cpp
+@@ -132,10 +132,18 @@ nsresult nsGStreamerReader::Init(nsBuiltinDecoderReader* aCloneDonor)
+ mAudioSink = gst_parse_bin_from_description("capsfilter name=filter ! "
+ #ifdef MOZ_TREMOR
+ "appsink name=audiosink sync=true caps=audio/x-raw-float,"
++#ifdef IS_LITTLE_ENDIAN
+ "channels={1,2},rate=44100,width=32,endianness=1234", TRUE, NULL);
+ #else
++ "channels={1,2},rate=44100,width=32,endianness=4321", TRUE, NULL);
++#endif
++#else
+ "appsink name=audiosink sync=true caps=audio/x-raw-int,"
++#ifdef IS_LITTLE_ENDIAN
+ "channels={1,2},rate=48000,width=16,endianness=1234", TRUE, NULL);
++#else
++ "channels={1,2},rate=48000,width=16,endianness=4321", TRUE, NULL);
++#endif
+ #endif
+ mAudioAppSink = GST_APP_SINK(gst_bin_get_by_name(GST_BIN(mAudioSink),
+ "audiosink"));
diff --git a/mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp b/mail/thunderbird/files/patch-bug778056
index 72eba848047d..72eba848047d 100644
--- a/mail/thunderbird/files/patch-mozilla-memory-mozalloc-mozalloc.cpp
+++ b/mail/thunderbird/files/patch-bug778056
diff --git a/mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp b/mail/thunderbird/files/patch-bug778078
index 78cb22fd4702..fc29c1ca5ecb 100644
--- a/mail/thunderbird/files/patch-mozilla-toolkit-xre-nsAppRunner.cpp
+++ b/mail/thunderbird/files/patch-bug778078
@@ -5,7 +5,7 @@
#if defined(MOZ_WIDGET_GTK2)
-#ifdef MOZ_MEMORY
-+#if defined(MOZ_MEMORY) || defined(__FreeBSD__)
++#if defined(MOZ_MEMORY) || defined(__FreeBSD__) || defined(__NetBSD__)
// Disable the slice allocator, since jemalloc already uses similar layout
// algorithms, and using a sub-allocator tends to increase fragmentation.
// This must be done before g_thread_init() is called.
diff --git a/mail/thunderbird/files/patch-bug779847 b/mail/thunderbird/files/patch-bug779847
new file mode 100644
index 000000000000..ed30d515af31
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug779847
@@ -0,0 +1,28 @@
+--- mozilla/gfx/ycbcr/Makefile.in
++++ mozilla/gfx/ycbcr/Makefile.in
+@@ -54,23 +54,13 @@ CPPSRCS += yuv_row_win.cpp \
+ $(NULL)
+ endif
+ else
+-ifeq ($(OS_ARCH),Linux)
+-CPPSRCS += yuv_row_posix.cpp \
+- $(NULL)
+-else
+-ifeq ($(OS_ARCH),SunOS)
+-CPPSRCS += yuv_row_posix.cpp \
+- $(NULL)
+-else
+-ifeq ($(OS_ARCH),Darwin)
++ifneq (,$(filter Linux SunOS Darwin DragonFly FreeBSD NetBSD OpenBSD, $(OS_ARCH)))
+ CPPSRCS += yuv_row_posix.cpp \
+ $(NULL)
+ else
+ CPPSRCS += yuv_row_other.cpp \
+ $(NULL)
+-endif # Darwin
+-endif # SunOS
+-endif # linux
++endif # posix
+ endif # windows
+
+ ifeq (arm,$(findstring arm,$(OS_TEST)))
diff --git a/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp b/mail/thunderbird/files/patch-bug781457
index 817014333627..1a883966b942 100644
--- a/mail/thunderbird/files/patch-mozilla-xpcom-base-nsStackWalk.cpp
+++ b/mail/thunderbird/files/patch-bug781457
@@ -1,13 +1,5 @@
--- mozilla/xpcom/base/nsStackWalk.cpp.orig 2010-09-12 19:34:04.012503905 +0300
+++ mozilla/xpcom/base/nsStackWalk.cpp 2010-09-12 19:34:41.294462134 +0300
-@@ -41,6 +41,7 @@
- /* API for getting a stack trace of the C/C++ stack on the current thread */
-
- #include "nsStackWalk.h"
-+#include <dlfcn.h>
-
- #if defined(_WIN32) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)) && !defined(WINCE) // WIN32 x86 stack walking code
-
@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb
#elif defined(HAVE__UNWIND_BACKTRACE)
diff --git a/mail/thunderbird/files/patch-mozilla__content__base__public__nsContentUtils.h b/mail/thunderbird/files/patch-bug781474
index 358d40c1f988..358d40c1f988 100644
--- a/mail/thunderbird/files/patch-mozilla__content__base__public__nsContentUtils.h
+++ b/mail/thunderbird/files/patch-bug781474
diff --git a/mail/thunderbird/files/patch-bug783463 b/mail/thunderbird/files/patch-bug783463
new file mode 100644
index 000000000000..192eb5b99f73
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug783463
@@ -0,0 +1,34 @@
+--- mozilla/gfx/skia/Makefile.in~
++++ mozilla/gfx/skia/Makefile.in
+@@ -339,10 +339,9 @@ CPPSRCS += \
+ SkMMapStream.cpp \
+ SkOSFile.cpp \
+ $(NULL)
+-ifeq (Linux,$(OS_TARGET))
++ifneq (,$(or $(MOZ_X11),$(filter Linux,$(OS_TARGET))))
+ CPPSRCS += \
+ SkFontHost_linux.cpp \
+- SkFontHost_tables.cpp \
+ SkTime_Unix.cpp \
+ $(NULL)
+ endif
+--- mozilla/widget/qt/nsNativeThemeQt.cpp~
++++ mozilla/widget/qt/nsNativeThemeQt.cpp
+@@ -25,7 +25,6 @@
+ #include "nsThemeConstants.h"
+ #include "nsIServiceManager.h"
+ #include "nsIDOMHTMLInputElement.h"
+-#include <malloc.h>
+
+
+ #include "gfxASurface.h"
+--- mozilla/widget/qt/nsSound.cpp~
++++ mozilla/widget/qt/nsSound.cpp
+@@ -40,6 +40,7 @@
+ #include <QSound>
+
+ #include <string.h>
++#include <unistd.h>
+
+ #include "nscore.h"
+ #include "plstr.h"
diff --git a/mail/thunderbird/files/patch-mail-components-Makefile.in b/mail/thunderbird/files/patch-bug783571
index d3e2e8ff4433..e8d68f70e8f7 100644
--- a/mail/thunderbird/files/patch-mail-components-Makefile.in
+++ b/mail/thunderbird/files/patch-bug783571
@@ -9,3 +9,14 @@
DIRS += shell
endif
+--- mail/components/build/Makefile.in~
++++ mail/components/build/Makefile.in
+@@ -78,7 +78,7 @@ SHARED_LIBRARY_LIBS = \
+ ../migration/src/$(LIB_PREFIX)profilemigration_s.$(LIB_SUFFIX) \
+ $(NULL)
+
+-ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
++ifneq (,$(filter windows cocoa gtk2 qt, $(MOZ_WIDGET_TOOLKIT)))
+ SHARED_LIBRARY_LIBS += ../shell/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
+ endif
+
diff --git a/mail/thunderbird/files/patch-bug784741 b/mail/thunderbird/files/patch-bug784741
new file mode 100644
index 000000000000..0b0611afa312
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug784741
@@ -0,0 +1,43 @@
+diff --git js/src/Makefile.in js/src/Makefile.in
+index 8eb385f..01bd8e3 100644
+--- mozilla/js/src/Makefile.in
++++ mozilla/js/src/Makefile.in
+@@ -323,6 +323,7 @@ endif
+
+ ifneq (,$(filter arm% sparc %86 x86_64 mips%,$(TARGET_CPU)))
+ ENABLE_YARR_JIT = 1
++DEFINES += -DENABLE_YARR_JIT=1
+
+ VPATH += $(srcdir)/assembler/assembler \
+ $(srcdir)/methodjit \
+diff --git js/src/assembler/wtf/Platform.h js/src/assembler/wtf/Platform.h
+index 6570f2d..0c84896 100644
+--- mozilla/js/src/assembler/wtf/Platform.h
++++ mozilla/js/src/assembler/wtf/Platform.h
+@@ -1102,9 +1102,7 @@
+ #if WTF_PLATFORM_CHROMIUM
+ #define ENABLE_YARR_JIT 0
+
+-#elif ENABLE_JIT && !defined(ENABLE_YARR_JIT)
+-#define ENABLE_YARR_JIT 1
+-
++#elif ENABLE_YARR_JIT
+ /* Setting this flag compares JIT results with interpreter results. */
+ #define ENABLE_YARR_JIT_DEBUG 0
+ #endif
+diff --git js/src/configure.in js/src/configure.in
+index c142eb7..34f98b9 100644
+--- mozilla/js/src/configure.in
++++ mozilla/js/src/configure.in
+@@ -3347,7 +3347,10 @@ MOZ_ARG_ENABLE_STRING(debug,
+ (using compiler flags DBG)],
+ [ if test "$enableval" != "no"; then
+ MOZ_DEBUG=1
+- ENABLE_METHODJIT_SPEW=1
++ if test "$ENABLE_METHODJIT"; then
++ # needs MethodJIT or YarrJIT
++ ENABLE_METHODJIT_SPEW=1
++ fi
+ if test -n "$enableval" -a "$enableval" != "yes"; then
+ MOZ_DEBUG_FLAGS=`echo $enableval | sed -e 's|\\\ | |g'`
+ _MOZ_DEBUG_FLAGS_SET=1
diff --git a/mail/thunderbird/files/patch-bug784776 b/mail/thunderbird/files/patch-bug784776
new file mode 100644
index 000000000000..fbc597902017
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug784776
@@ -0,0 +1,50 @@
+--- mozilla/content/media/MediaEngineDefault.cpp~
++++ mozilla/content/media/MediaEngineDefault.cpp
+@@ -232,12 +232,12 @@ nsresult
+ MediaEngineDefaultAudioSource::Start(SourceMediaStream* aStream, TrackID aID)
+ {
+ if (mState != kAllocated) {
+- return NULL;
++ return 0;
+ }
+
+ mTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
+ if (!mTimer) {
+- return NULL;
++ return 0;
+ }
+
+ mSource = aStream;
+--- mozilla/gfx/layers/opengl/ImageLayerOGL.cpp~
++++ mozilla/gfx/layers/opengl/ImageLayerOGL.cpp
+@@ -936,7 +936,7 @@ ShadowImageLayerOGL::CleanupResources()
+ {
+ if (mSharedHandle) {
+ gl()->ReleaseSharedHandle(mShareType, mSharedHandle);
+- mSharedHandle = NULL;
++ mSharedHandle = 0;
+ }
+
+ mYUVTexture[0].Release();
+--- mozilla/intl/locale/src/unix/nsDateTimeFormatUnix.cpp~
++++ mozilla/intl/locale/src/unix/nsDateTimeFormatUnix.cpp
+@@ -100,7 +100,7 @@ void nsDateTimeFormatUnix::LocalePreferr
+ struct tm *tmc;
+ int i;
+
+- tt = time((time_t)NULL);
++ tt = time(NULL);
+ tmc = localtime(&tt);
+
+ tmc->tm_hour=22; // put the test sample hour to 22:00 which is 10PM
+--- mozilla/ipc/glue/CrossProcessMutex_unimplemented.cpp~
++++ mozilla/ipc/glue/CrossProcessMutex_unimplemented.cpp
+@@ -40,7 +40,7 @@ CrossProcessMutexHandle
+ CrossProcessMutex::ShareToProcess(base::ProcessHandle aHandle)
+ {
+ NS_RUNTIMEABORT("Cross-process mutices not allowed on this platform - woah! We should've aborted by now!");
+- return NULL;
++ return 0;
+ }
+
+ }
diff --git a/mail/thunderbird/files/patch-bug785638 b/mail/thunderbird/files/patch-bug785638
new file mode 100644
index 000000000000..2ce1cd35a78a
--- /dev/null
+++ b/mail/thunderbird/files/patch-bug785638
@@ -0,0 +1,168 @@
+diff --git configure.in configure.in
+index cef992b..3bd39ca 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -5353,22 +5353,6 @@ if test -n "$MOZ_VP8" -a -z "$MOZ_NATIVE_LIBVPX"; then
+
+ dnl See if we have assembly on this platform.
+ case "$OS_ARCH:$CPU_ARCH" in
+- Linux:x86)
+- VPX_ASFLAGS="-f elf32 -rnasm -pnasm"
+- VPX_X86_ASM=1
+- ;;
+- Linux:x86_64)
+- VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
+- VPX_X86_ASM=1
+- ;;
+- SunOS:x86)
+- VPX_ASFLAGS="-f elf32 -rnasm -pnasm"
+- VPX_X86_ASM=1
+- ;;
+- SunOS:x86_64)
+- VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
+- VPX_X86_ASM=1
+- ;;
+ Darwin:x86)
+ VPX_ASFLAGS="-f macho32 -rnasm -pnasm -DPIC"
+ VPX_X86_ASM=1
+@@ -5412,6 +5388,19 @@ if test -n "$MOZ_VP8" -a -z "$MOZ_NATIVE_LIBVPX"; then
+ VPX_ASM_SUFFIX="$ASM_SUFFIX"
+ VPX_ARM_ASM=1
+ fi
++ ;;
++ *:x86)
++ if $CC -E -dM -</dev/null | grep -q __ELF__; then
++ VPX_ASFLAGS="-f elf32 -rnasm -pnasm"
++ VPX_X86_ASM=1
++ fi
++ ;;
++ *:x86_64)
++ if $CC -E -dM -</dev/null | grep -q __ELF__; then
++ VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
++ VPX_X86_ASM=1
++ fi
++ ;;
+ esac
+
+ if test -n "$COMPILE_ENVIRONMENT" -a -n "$VPX_X86_ASM" -a -z "$VPX_AS"; then
+@@ -5843,22 +5832,6 @@ if test -n "$MOZ_LIBJPEG_TURBO"; then
+
+ dnl Do we support libjpeg-turbo on this platform?
+ case "$OS_ARCH:$OS_TEST" in
+- Linux:x86|Linux:i?86)
+- LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF"
+- LIBJPEG_TURBO_X86_ASM=1
+- ;;
+- Linux:x86_64)
+- LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF"
+- LIBJPEG_TURBO_X64_ASM=1
+- ;;
+- SunOS:i?86)
+- LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF"
+- LIBJPEG_TURBO_X86_ASM=1
+- ;;
+- SunOS:x86_64)
+- LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF"
+- LIBJPEG_TURBO_X64_ASM=1
+- ;;
+ Darwin:i?86)
+ LIBJPEG_TURBO_ASFLAGS="-f macho32 -rnasm -pnasm -DPIC -DMACHO"
+ LIBJPEG_TURBO_X86_ASM=1
+@@ -5879,6 +5852,18 @@ if test -n "$MOZ_LIBJPEG_TURBO"; then
+ LIBJPEG_TURBO_ASFLAGS="-march=armv7-a -mfpu=neon"
+ LIBJPEG_TURBO_ARM_ASM=1
+ ;;
++ *:x86|*:i?86)
++ if $CC -E -dM -</dev/null | grep -q __ELF__; then
++ LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF"
++ LIBJPEG_TURBO_X86_ASM=1
++ fi
++ ;;
++ *:x86_64)
++ if $CC -E -dM -</dev/null | grep -q __ELF__; then
++ LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF"
++ LIBJPEG_TURBO_X64_ASM=1
++ fi
++ ;;
+ esac
+
+ fi
+diff --git media/libvpx/update.sh media/libvpx/update.sh
+index 79e0fb1..51956af 100755
+--- mozilla/media/libvpx/update.sh
++++ mozilla/media/libvpx/update.sh
+@@ -363,12 +363,12 @@ cp $1/objdir/x86-win32-vs8/vpx_config.h vpx_config_x86-win32-vs8.h
+ # Should be same for all platforms...
+ cp $1/objdir/x86-win32-vs8/vpx_version.h vpx_version.h
+
+-# Config files for x86-linux-gcc and Solaris x86
++# Config files for x86-linux-gcc and other x86 elf platforms
+ cp $1/objdir/x86-linux-gcc/vpx_config.c vpx_config_x86-linux-gcc.c
+ cp $1/objdir/x86-linux-gcc/vpx_config.asm vpx_config_x86-linux-gcc.asm
+ cp $1/objdir/x86-linux-gcc/vpx_config.h vpx_config_x86-linux-gcc.h
+
+-# Config files for x86_64-linux-gcc and Solaris x86_64
++# Config files for x86_64-linux-gcc and other x86_64 elf platforms
+ cp $1/objdir/x86_64-linux-gcc/vpx_config.c vpx_config_x86_64-linux-gcc.c
+ cp $1/objdir/x86_64-linux-gcc/vpx_config.asm vpx_config_x86_64-linux-gcc.asm
+ cp $1/objdir/x86_64-linux-gcc/vpx_config.h vpx_config_x86_64-linux-gcc.h
+diff --git media/libvpx/vpx_config.h media/libvpx/vpx_config.h
+index 55433f3..36e1780 100644
+--- mozilla/media/libvpx/vpx_config.h
++++ mozilla/media/libvpx/vpx_config.h
+@@ -16,20 +16,12 @@
+ /* 32 bit MacOS. */
+ #include "vpx_config_x86-darwin9-gcc.h"
+
+-#elif defined(__linux__) && defined(__i386__)
+-/* 32 bit Linux. */
++#elif defined(__ELF__) && (defined(__i386) || defined(__i386__))
++/* 32 bit ELF platforms. */
+ #include "vpx_config_x86-linux-gcc.h"
+
+-#elif defined(__linux__) && defined(__x86_64__)
+-/* 64 bit Linux. */
+-#include "vpx_config_x86_64-linux-gcc.h"
+-
+-#elif defined(__sun) && defined(__i386)
+-/* 32 bit Solaris. */
+-#include "vpx_config_x86-linux-gcc.h"
+-
+-#elif defined(__sun) && defined(__x86_64)
+-/* 64 bit Solaris. */
++#elif defined(__ELF__) && (defined(__x86_64) || defined(__x86_64__))
++/* 64 bit ELF platforms. */
+ #include "vpx_config_x86_64-linux-gcc.h"
+
+ #else
+diff --git media/libvpx/vpx_config_c.c media/libvpx/vpx_config_c.c
+index eedd515..c8b5375 100644
+--- mozilla/media/libvpx/vpx_config_c.c
++++ mozilla/media/libvpx/vpx_config_c.c
+@@ -15,22 +15,14 @@
+ /* 32 bit MacOS. */
+ #include "vpx_config_x86-darwin9-gcc.c"
+
+-#elif defined(__linux__) && defined(__i386__)
+-/* 32 bit Linux. */
++#elif defined(__ELF__) && (defined(__i386) || defined(__i386__))
++/* 32 bit ELF platforms. */
+ #include "vpx_config_x86-linux-gcc.c"
+
+-#elif defined(__linux__) && defined(__x86_64__)
+-/* 64 bit Linux. */
++#elif defined(__ELF__) && (defined(__x86_64) || defined(__x86_64__))
++/* 64 bit ELF platforms. */
+ #include "vpx_config_x86_64-linux-gcc.c"
+
+-#elif defined(__sun) && defined(__i386)
+-/* 32 bit Solaris. */
+-#include "vpx_config_x86-linux-gcc.h"
+-
+-#elif defined(__sun) && defined(__x86_64)
+-/* 64 bit Solaris. */
+-#include "vpx_config_x86_64-linux-gcc.h"
+-
+ #else
+ #error VPX_X86_ASM is defined, but assembly not supported on this platform!
+ #endif
diff --git a/mail/thunderbird/files/patch-configure.in b/mail/thunderbird/files/patch-configure.in
new file mode 100644
index 000000000000..c03ce706001e
--- /dev/null
+++ b/mail/thunderbird/files/patch-configure.in
@@ -0,0 +1,49 @@
+--- configure.in.orig 2012-07-14 00:40:08.000000000 +0200
++++ configure.in 2012-08-18 18:16:06.000000000 +0200
+@@ -3101,6 +3118,8 @@
+
+ AC_SUBST(VISIBILITY_FLAGS)
+
++MOZ_COMPILER_OPTS
++
+ dnl Checks for header files.
+ dnl ========================================================
+ AC_HEADER_DIRENT
+@@ -4067,29 +4086,29 @@
+
+ AC_CACHE_CHECK(for __attribute__((always_inline)),
+ ac_cv_attribute_always_inline,
+- [AC_TRY_COMPILE([],
+- [inline void f(void) __attribute__((always_inline));],
++ [AC_TRY_COMPILE([inline void f(void) __attribute__((always_inline));],
++ [],
+ ac_cv_attribute_always_inline=yes,
+ ac_cv_attribute_always_inline=no)])
+
+ AC_CACHE_CHECK(for __attribute__((malloc)),
+ ac_cv_attribute_malloc,
+- [AC_TRY_COMPILE([],
+- [void* f(int) __attribute__((malloc));],
++ [AC_TRY_COMPILE([void* f(int) __attribute__((malloc));],
++ [],
+ ac_cv_attribute_malloc=yes,
+ ac_cv_attribute_malloc=no)])
+
+ AC_CACHE_CHECK(for __attribute__((warn_unused_result)),
+ ac_cv_attribute_warn_unused,
+- [AC_TRY_COMPILE([],
+- [int f(void) __attribute__((warn_unused_result));],
++ [AC_TRY_COMPILE([int f(void) __attribute__((warn_unused_result));],
++ [],
+ ac_cv_attribute_warn_unused=yes,
+ ac_cv_attribute_warn_unused=no)])
+
+ AC_CACHE_CHECK(for __attribute__((noreturn)),
+ ac_cv_attribute_noreturn,
+- [AC_TRY_COMPILE([],
+- [void f(void) __attribute__((noreturn));],
++ [AC_TRY_COMPILE([void f(void) __attribute__((noreturn));],
++ [],
+ ac_cv_attribute_noreturn=yes,
+ ac_cv_attribute_noreturn=no)])
+
diff --git a/mail/thunderbird/files/patch-mail-components-build-Makefile.in b/mail/thunderbird/files/patch-mail-components-build-Makefile.in
deleted file mode 100644
index af94e2c0bba3..000000000000
--- a/mail/thunderbird/files/patch-mail-components-build-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- mail/components/build/Makefile.in~
-+++ mail/components/build/Makefile.in
-@@ -78,7 +78,7 @@ SHARED_LIBRARY_LIBS = \
- ../migration/src/$(LIB_PREFIX)profilemigration_s.$(LIB_SUFFIX) \
- $(NULL)
-
--ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
-+ifneq (,$(filter windows cocoa gtk2 qt, $(MOZ_WIDGET_TOOLKIT)))
- SHARED_LIBRARY_LIBS += ../shell/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
- endif
-
diff --git a/mail/thunderbird/files/patch-mozilla-config-mkdepend-Makefile.in b/mail/thunderbird/files/patch-mozilla-config-mkdepend-Makefile.in
deleted file mode 100644
index 3b649d0f16b7..000000000000
--- a/mail/thunderbird/files/patch-mozilla-config-mkdepend-Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/config/mkdepend/Makefile.in.orig Sun Dec 12 07:36:57 2004
-+++ mozilla/config/mkdepend/Makefile.in Sun Dec 12 07:37:55 2004
-@@ -57,6 +57,7 @@
- include $(topsrcdir)/config/rules.mk
-
- HOST_CFLAGS += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\"
-+HOST_CFLAGS += $(XCFLAGS)
-
- ifdef GNU_CC
- _GCCDIR = $(shell $(CC) -print-file-name=include)
diff --git a/mail/thunderbird/files/patch-mozilla-config_autoconf.mk.in b/mail/thunderbird/files/patch-mozilla-config_autoconf.mk.in
index 2cd507fbf7a8..7d3316500fa7 100644
--- a/mail/thunderbird/files/patch-mozilla-config_autoconf.mk.in
+++ b/mail/thunderbird/files/patch-mozilla-config_autoconf.mk.in
@@ -19,13 +19,4 @@
DIST = $(DEPTH)/dist
LIBXUL_SDK = @LIBXUL_SDK@
-@@ -275,7 +275,7 @@
- OS_CPPFLAGS = @CPPFLAGS@
- OS_CFLAGS = $(OS_CPPFLAGS) @CFLAGS@
- OS_CXXFLAGS = $(OS_CPPFLAGS) @CXXFLAGS@
--OS_LDFLAGS = @LDFLAGS@
-+OS_LDFLAGS = @LDFLAGS@ -lc
-
- OS_COMPILE_CFLAGS = $(OS_CPPFLAGS) @COMPILE_CFLAGS@
- OS_COMPILE_CXXFLAGS = $(OS_CPPFLAGS) @COMPILE_CXXFLAGS@
diff --git a/mail/thunderbird/files/patch-mozilla-configure.in b/mail/thunderbird/files/patch-mozilla-configure.in
index ce91593e1ed6..d084ef86926d 100644
--- a/mail/thunderbird/files/patch-mozilla-configure.in
+++ b/mail/thunderbird/files/patch-mozilla-configure.in
@@ -23,33 +23,3 @@
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS
-@@ -5903,6 +5903,14 @@
- VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
- VPX_X86_ASM=1
- ;;
-+ FreeBSD:i386)
-+ VPX_ASFLAGS="-f elf32 -rnasm -pnasm"
-+ VPX_X86_ASM=1
-+ ;;
-+ FreeBSD:x86_64)
-+ VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
-+ VPX_X86_ASM=1
-+ ;;
- SunOS:x86)
- VPX_ASFLAGS="-f elf32 -rnasm -pnasm"
- VPX_X86_ASM=1
-@@ -6297,6 +6305,14 @@
- LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF"
- LIBJPEG_TURBO_X64_ASM=1
- ;;
-+ FreeBSD:i386)
-+ LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF"
-+ LIBJPEG_TURBO_X86_ASM=1
-+ ;;
-+ FreeBSD:x86_64)
-+ LIBJPEG_TURBO_ASFLAGS="-f elf64 -rnasm -pnasm -D__x86_64__ -DPIC -DELF"
-+ LIBJPEG_TURBO_X64_ASM=1
-+ ;;
- SunOS:i?86)
- LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF"
- LIBJPEG_TURBO_X86_ASM=1
diff --git a/mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp b/mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp
deleted file mode 100644
index f088ed439b95..000000000000
--- a/mail/thunderbird/files/patch-mozilla-dom-plugins-ipc-PluginMessageUtils.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/dom/plugins/ipc/PluginMessageUtils.cpp~
-+++ mozilla/dom/plugins/ipc/PluginMessageUtils.cpp
-@@ -94,7 +94,7 @@ ReplaceAll(const string& haystack, const
- i += with.length();
- }
-
-- return munged;
-+ return munged.c_str();
- }
- #endif
-
diff --git a/mail/thunderbird/files/patch-mozilla-gfx-thebes-gfxPlatform.cpp b/mail/thunderbird/files/patch-mozilla-gfx-thebes-gfxPlatform.cpp
deleted file mode 100644
index e7dc51335465..000000000000
--- a/mail/thunderbird/files/patch-mozilla-gfx-thebes-gfxPlatform.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
---- mozilla/gfx/thebes/gfxPlatform.cpp~ 2012-02-07 11:59:39.717184907 +0000
-+++ mozilla/gfx/thebes/gfxPlatform.cpp 2012-02-07 13:06:01.084668445 +0000
-@@ -446,6 +446,7 @@
- static_cast<SourceSurface*>(srcBuffer)->Release();
- }
-
-+#ifdef MOZ_TREE_CAIRO
- void SourceSnapshotDetached(cairo_surface_t *nullSurf)
- {
- gfxImageSurface* origSurf =
-@@ -453,6 +454,7 @@
-
- origSurf->SetData(&kSourceSurface, NULL, NULL);
- }
-+#endif
-
- RefPtr<SourceSurface>
- gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface)
-@@ -522,6 +524,7 @@
- imgSurface->Stride(),
- format);
-
-+ #ifdef MOZ_TREE_CAIRO
- cairo_surface_t *nullSurf =
- cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
- cairo_surface_set_user_data(nullSurf,
-@@ -530,6 +533,7 @@
- NULL);
- cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached);
- cairo_surface_destroy(nullSurf);
-+ #endif
- }
-
- srcBuffer->AddRef();
diff --git a/mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in b/mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in
deleted file mode 100644
index 041689a51995..000000000000
--- a/mail/thunderbird/files/patch-mozilla-gfx-ycbcr-Makefile.in
+++ /dev/null
@@ -1,21 +0,0 @@
---- mozilla/gfx/ycbcr/Makefile.in~
-+++ mozilla/gfx/ycbcr/Makefile.in
-@@ -58,6 +58,10 @@ ifeq ($(OS_ARCH),Linux)
- CPPSRCS += yuv_row_posix.cpp \
- $(NULL)
- else
-+ifeq ($(OS_ARCH),FreeBSD)
-+CPPSRCS += yuv_row_posix.cpp \
-+ $(NULL)
-+else
- ifeq ($(OS_ARCH),SunOS)
- CPPSRCS += yuv_row_posix.cpp \
- $(NULL)
-@@ -70,6 +74,7 @@ CPPSRCS += yuv_row_other.cpp \
- $(NULL)
- endif # Darwin
- endif # SunOS
-+endif # FreeBSD
- endif # linux
- endif # windows
- \ No newline at end of file
diff --git a/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in b/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in
deleted file mode 100644
index 2aa54ce69c5e..000000000000
--- a/mail/thunderbird/files/patch-mozilla-js-src-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/js/src/Makefile.in.orig 2012-03-15 20:40:13.000000000 +0100
-+++ mozilla/js/src/Makefile.in 2012-03-16 10:03:18.000000000 +0100
-@@ -737,7 +740,7 @@
- endif # WINNT
-
- ifeq ($(OS_ARCH),FreeBSD)
--EXTRA_LIBS += -pthread
-+EXTRA_LIBS += -pthread -lc
- endif
- ifeq ($(OS_ARCH),Linux)
- EXTRA_LIBS += -ldl
diff --git a/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in b/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in
deleted file mode 100644
index 37f9d4c61f3e..000000000000
--- a/mail/thunderbird/files/patch-mozilla-js-src-config-mkdepend-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/js/src/config/mkdepend/Makefile.in.orig 2010-01-19 21:27:45.000000000 +0100
-+++ mozilla/js/src/config/mkdepend/Makefile.in 2010-01-20 21:55:56.000000000 +0100
-@@ -71,7 +71,7 @@
-
- include $(topsrcdir)/config/rules.mk
-
--HOST_CFLAGS += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\"
-+HOST_CFLAGS += -DINCLUDEDIR=\"$(LOCALBASE)/include\" -DOBJSUFFIX=\".$(OBJ_SUFFIX)\" -I/usr/local/include
-
- ifdef GNU_CC
- _GCCDIR = $(shell $(CC) -print-file-name=include)
diff --git a/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk b/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk
deleted file mode 100644
index 0bacb7ee6f1a..000000000000
--- a/mail/thunderbird/files/patch-mozilla-js-src-config_config.mk
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/js/src/config/config.mk.orig 2009-08-07 00:49:23.000000000 +0200
-+++ mozilla/js/src/config/config.mk 2009-08-09 20:50:05.000000000 +0200
-@@ -506,6 +506,7 @@
- -I$(srcdir) \
- -I. \
- -I$(DIST)/include -I$(DIST)/include/nsprpub \
-+ -I$(LOCALBASE)/include \
- $(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include -I$(LIBXUL_SDK)/include/nsprpub) \
- $(OS_INCLUDES) \
- $(NULL)
diff --git a/mail/thunderbird/files/patch-mozilla-js-src-jscpucfg.h b/mail/thunderbird/files/patch-mozilla-js-src-jscpucfg.h
deleted file mode 100644
index e2c1239896d5..000000000000
--- a/mail/thunderbird/files/patch-mozilla-js-src-jscpucfg.h
+++ /dev/null
@@ -1,22 +0,0 @@
---- mozilla/js/src/jscpucfg.h.orig 2012-01-18 17:38:54.409461514 +0100
-+++ mozilla/js/src/jscpucfg.h 2012-01-18 17:38:59.522462164 +0100
-@@ -77,6 +77,19 @@
- #define IS_BIG_ENDIAN 1
- #endif
-
-+#elif defined(__FreeBSD__)
-+#include <sys/endian.h>
-+
-+#if defined(BYTE_ORDER)
-+#if BYTE_ORDER == LITTLE_ENDIAN
-+#define IS_LITTLE_ENDIAN 1
-+#undef IS_BIG_ENDIAN
-+#elif BYTE_ORDER == BIG_ENDIAN
-+#undef IS_LITTLE_ENDIAN
-+#define IS_BIG_ENDIAN 1
-+#endif
-+#endif
-+
- #elif defined(JS_HAVE_ENDIAN_H)
- #include <endian.h>
-
diff --git a/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in b/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in
deleted file mode 100644
index 9742d56bde44..000000000000
--- a/mail/thunderbird/files/patch-mozilla-layout-generic-Makefile.in
+++ /dev/null
@@ -1,14 +0,0 @@
---- mozilla/layout/generic/Makefile.in~
-+++ mozilla/layout/generic/Makefile.in
-@@ -154,9 +154,10 @@ LOCAL_INCLUDES += \
- -I$(srcdir)/../../dom/base \
- -I$(srcdir)/../../dom/plugins/base \
- -I$(srcdir)/../svg/base/src \
-- $(MOZ_CAIRO_CFLAGS) \
- $(NULL)
-
-+CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
-+
- ifdef MOZ_ENABLE_GTK2
- CXXFLAGS += $(MOZ_GTK2_CFLAGS)
- endif
diff --git a/mail/thunderbird/files/patch-mozilla-media-libvpx-vpx_config.c b/mail/thunderbird/files/patch-mozilla-media-libvpx-vpx_config.c
deleted file mode 100644
index b97d147914fe..000000000000
--- a/mail/thunderbird/files/patch-mozilla-media-libvpx-vpx_config.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- mozilla/media/libvpx/vpx_config_c.c~
-+++ mozilla/media/libvpx/vpx_config_c.c
-@@ -12,11 +12,11 @@
- /* 32 bit MacOS. */
- #include "vpx_config_x86-darwin9-gcc.c"
-
--#elif defined(__linux__) && defined(__i386__)
-+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__i386__)
- /* 32 bit Linux. */
- #include "vpx_config_x86-linux-gcc.c"
-
--#elif defined(__linux__) && defined(__x86_64__)
-+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__x86_64__)
- /* 64 bit Linux. */
- #include "vpx_config_x86_64-linux-gcc.c"
-
diff --git a/mail/thunderbird/files/patch-mozilla-media-libvpx-vpx_config.h b/mail/thunderbird/files/patch-mozilla-media-libvpx-vpx_config.h
deleted file mode 100644
index b4ba5cd8986a..000000000000
--- a/mail/thunderbird/files/patch-mozilla-media-libvpx-vpx_config.h
+++ /dev/null
@@ -1,16 +0,0 @@
---- mozilla/media/libvpx/vpx_config.h~
-+++ mozilla/media/libvpx/vpx_config.h
-@@ -12,11 +12,11 @@
- /* 32 bit MacOS. */
- #include "vpx_config_x86-darwin9-gcc.h"
-
--#elif defined(__linux__) && defined(__i386__)
-+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__i386__)
- /* 32 bit Linux. */
- #include "vpx_config_x86-linux-gcc.h"
-
--#elif defined(__linux__) && defined(__x86_64__)
-+#elif (defined(__linux__) || defined(__FreeBSD__)) && defined(__x86_64__)
- /* 64 bit Linux. */
- #include "vpx_config_x86_64-linux-gcc.h"
-
diff --git a/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk b/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk
deleted file mode 100644
index f5a47988bcc5..000000000000
--- a/mail/thunderbird/files/patch-mozilla-security-coreconf-FreeBSD.mk
+++ /dev/null
@@ -1,46 +0,0 @@
---- mozilla/security/coreconf/FreeBSD.mk.orig 2010-02-28 23:30:04.000000000 +0000
-+++ mozilla/security/coreconf/FreeBSD.mk 2010-03-03 02:05:22.000000000 +0000
-@@ -49,8 +49,24 @@
- ifeq ($(CPU_ARCH),pc98)
- CPU_ARCH = x86
- endif
--ifeq ($(CPU_ARCH),amd64)
--CPU_ARCH = x86_64
-+ifeq ($(OS_TEST),alpha)
-+CPU_ARCH = alpha
-+endif
-+ifeq ($(OS_TEST),x86_64)
-+CPU_ARCH = x86_64
-+endif
-+ifeq ($(OS_TEST),ia64)
-+CPU_ARCH = ia64
-+endif
-+ifeq ($(OS_TEST),powerpc64)
-+CPU_ARCH = powerpc
-+USE_64 = 1
-+endif
-+ifeq ($(OS_TEST),powerpc)
-+CPU_ARCH = powerpc
-+endif
-+ifeq ($(OS_TEST),sparc64)
-+CPU_ARCH = sparc64
- endif
-
- OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-@@ -78,7 +90,7 @@
- DLL_SUFFIX = so.1.0
- endif
-
--MKSHLIB = $(CC) $(DSO_LDOPTS)
-+MKSHLIB = $(CC) -Wl,-Bsymbolic -lc $(DSO_LDOPTS) -o $@
- ifdef MAPFILE
- MKSHLIB += -Wl,--version-script,$(MAPFILE)
- endif
-@@ -87,4 +99,6 @@
-
- G++INCLUDES = -I/usr/include/g++
-
--INCLUDES += -I/usr/X11R6/include
-+USE_SYSTEM_ZLIB = 1
-+ZLIB_LIBS = -lz
-+INCLUDES += -I$(LOCALBASE)/include
diff --git a/mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile b/mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile
deleted file mode 100644
index 195e44014456..000000000000
--- a/mail/thunderbird/files/patch-mozilla-security-nss-lib-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/security/nss/lib/Makefile~
-+++ mozilla/security/nss/lib/Makefile
-@@ -63,7 +63,7 @@ ZLIB_SRCDIR = zlib # Add the zlib direc
- endif
-
- ifndef MOZILLA_CLIENT
--ifndef NSS_USE_SYSTEM_SQLITE
-+ifndef MOZ_NATIVE_SQLITE
- SQLITE_SRCDIR = sqlite # Add the sqlite directory to DIRS.
- endif
- endif
diff --git a/mail/thunderbird/files/patch-mozilla-security_nss_lib_freebl_mpi_mpcpucache.c b/mail/thunderbird/files/patch-mozilla-security_nss_lib_freebl_mpi_mpcpucache.c
deleted file mode 100644
index e79b29942155..000000000000
--- a/mail/thunderbird/files/patch-mozilla-security_nss_lib_freebl_mpi_mpcpucache.c
+++ /dev/null
@@ -1,43 +0,0 @@
---- mozilla/security/nss/lib/freebl/mpi/mpcpucache.c.orig 2011-02-26 23:13:08.000000000 +0100
-+++ mozilla/security/nss/lib/freebl/mpi/mpcpucache.c 2011-02-26 23:18:46.000000000 +0100
-@@ -733,6 +733,32 @@
- #endif
-
- #if defined(__ppc64__)
-+#if defined(__FreeBSD__)
-+#include <sys/stddef.h>
-+#include <sys/sysctl.h>
-+
-+#include <machine/cpu.h>
-+#include <machine/md_var.h>
-+
-+unsigned long
-+s_mpi_getProcessorLineSize()
-+{
-+ static int cacheline_size = 0;
-+ static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE };
-+ int clen;
-+
-+ if (cacheline_size > 0)
-+ return cacheline_size;
-+
-+ clen = sizeof(cacheline_size);
-+ if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]),
-+ &cacheline_size, &clen, NULL, 0) < 0 || !cacheline_size)
-+ return 128; /* guess */
-+
-+ return cacheline_size;
-+}
-+#else /* __FreeBSD__ */
-+
- /*
- * Sigh, The PPC has some really nice features to help us determine cache
- * size, since it had lots of direct control functions to do so. The POWER
-@@ -786,6 +812,7 @@
- return 0;
- }
-
-+#endif /* __FreeBSD__ */
- #define MPI_GET_PROCESSOR_LINE_SIZE_DEFINED 1
- #endif
-
diff --git a/mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp
deleted file mode 100644
index 7305a04e1c33..000000000000
--- a/mail/thunderbird/files/patch-mozilla-widget-qt-nsNativeThemeQt.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
---- mozilla/widget/qt/nsNativeThemeQt.cpp~
-+++ mozilla/widget/qt/nsNativeThemeQt.cpp
-@@ -25,7 +25,9 @@
- #include "nsThemeConstants.h"
- #include "nsIServiceManager.h"
- #include "nsIDOMHTMLInputElement.h"
-+#ifdef __GLIBC__
- #include <malloc.h>
-+#endif
-
-
- #include "gfxASurface.h"
diff --git a/mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp
deleted file mode 100644
index 601b917a3347..000000000000
--- a/mail/thunderbird/files/patch-mozilla-widget-qt-nsSound.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/widget/qt/nsSound.cpp~
-+++ mozilla/widget/qt/nsSound.cpp
-@@ -40,6 +40,7 @@
- #include <QSound>
-
- #include <string.h>
-+#include <unistd.h>
-
- #include "nscore.h"
- #include "plstr.h"
diff --git a/mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp b/mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp
deleted file mode 100644
index 30a42b431da5..000000000000
--- a/mail/thunderbird/files/patch-mozilla-widget-qt-nsWindow.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- mozilla/widget/qt/nsWindow.cpp~
-+++ mozilla/widget/qt/nsWindow.cpp
-@@ -43,6 +43,7 @@ using namespace QtMobility;
-
- #ifdef MOZ_X11
- #include <X11/Xlib.h>
-+#include "mozilla/X11Util.h"
- #endif //MOZ_X11
-
- #include "nsXULAppAPI.h"
diff --git a/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-public-xptcstubsdecl.inc b/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-public-xptcstubsdecl.inc
deleted file mode 100644
index a146f07811fd..000000000000
--- a/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-public-xptcstubsdecl.inc
+++ /dev/null
@@ -1,11 +0,0 @@
---- mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc.orig Tue Mar 16 03:07:25 2004
-+++ mozilla/xpcom/reflect/xptcall/public/xptcstubsdecl.inc Tue Jun 15 12:52:36 2004
-@@ -8,7 +8,7 @@
- * 1 is AddRef
- * 2 is Release
- */
--#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
-+#if !defined(__ia64)
- NS_IMETHOD Stub3();
- NS_IMETHOD Stub4();
- NS_IMETHOD Stub5();
diff --git a/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in b/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in
deleted file mode 100644
index 252912459191..000000000000
--- a/mail/thunderbird/files/patch-mozilla-xpcom-reflect-xptcall-src-md-unix-Makefile.in
+++ /dev/null
@@ -1,38 +0,0 @@
---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2011-04-26 23:22:05.000000000 +0200
-+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2011-04-26 23:48:09.637442986 +0200
-@@ -70,7 +70,7 @@
- endif
- endif
- # IA64 Linux
--ifneq (,$(filter Linux,$(OS_ARCH)))
-+ifneq (,$(filter Linux FreeBSD,$(OS_ARCH)))
- ifneq (,$(findstring ia64,$(OS_TEST)))
- CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp
- ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s
-@@ -341,7 +356,7 @@
- #
- # Linux/PPC
- #
--ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
-+ifneq (,$(filter Linuxpowerpc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
- ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
- AS := $(CC) -c -x assembler-with-cpp
-@@ -350,7 +365,7 @@
- #
- # Linux/PPC64
- #
--ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
-+ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
- ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
- AS := $(CC) -c -x assembler-with-cpp
-@@ -350,7 +350,7 @@
- #
- # OpenBSD/SPARC64
- #
--ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64)
-+ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST)))
- CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp
- ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s
- endif
diff --git a/mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp b/mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp
index ff88de2ba2df..3cb45f175317 100644
--- a/mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp
+++ b/mail/thunderbird/files/patch-mozilla__xpcom__threads__nsThreadManager.cpp
@@ -1,14 +1,14 @@
--- ./mozilla/xpcom/threads/nsThreadManager.cpp.orig 2011-08-25 02:37:45.000000000 +0200
+++ ./mozilla/xpcom/threads/nsThreadManager.cpp 2011-08-28 17:14:14.000000000 +0200
-@@ -89,6 +89,11 @@
+@@ -57,6 +57,11 @@
nsresult
nsThreadManager::Init()
{
-+#ifdef NS_TLS && (__FreeBSD_version < 802513 \
++#if defined(NS_TLS) && (__FreeBSD_version < 802513 \
+ || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900045))
+ if (!gTLSThreadID)
+ gTLSThreadID = mozilla::threads::Generic;
+#endif
- if (!mThreadsByPRThread.Init())
- return NS_ERROR_OUT_OF_MEMORY;
+ mThreadsByPRThread.Init();
+ if (PR_NewThreadPrivateIndex(&mCurThreadIndex, ReleaseObject) == PR_FAILURE)
diff --git a/mail/thunderbird/files/patch-mozilla_toolkit_mozapps_installer_packager_mk b/mail/thunderbird/files/patch-mozilla_toolkit_mozapps_installer_packager_mk
new file mode 100644
index 000000000000..9a2a4ea99070
--- /dev/null
+++ b/mail/thunderbird/files/patch-mozilla_toolkit_mozapps_installer_packager_mk
@@ -0,0 +1,13 @@
+$OpenBSD: patch-toolkit_mozapps_installer_packager_mk,v 1.11 2012/06/11 15:29:56 landry Exp $
+install headers/idl/sdk libs only if xulrunner
+--- mozilla/toolkit/mozapps/installer/packager.mk.orig Fri Jun 1 14:04:20 2012
++++ mozilla/toolkit/mozapps/installer/packager.mk Tue Jun 5 07:55:51 2012
+@@ -886,7 +886,7 @@ endif
+ $(NSINSTALL) -D $(DESTDIR)$(bindir)
+ $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME)
+ ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)
+-ifdef INSTALL_SDK # Here comes the hard part
++ifeq ($(MOZ_APP_NAME),xulrunner)
+ $(NSINSTALL) -D $(DESTDIR)$(includedir)
+ (cd $(DIST)/include && tar $(TAR_CREATE_FLAGS) - .) | \
+ (cd $(DESTDIR)$(includedir) && tar -xf -)
diff --git a/mail/thunderbird/files/patch-nsprpub-pr-include-md_freebsd.cfg b/mail/thunderbird/files/patch-nsprpub-pr-include-md_freebsd.cfg
deleted file mode 100644
index e98cce3e3d8f..000000000000
--- a/mail/thunderbird/files/patch-nsprpub-pr-include-md_freebsd.cfg
+++ /dev/null
@@ -1,100 +0,0 @@
---- mozilla/nsprpub/pr/include/md/_freebsd.cfg.orig 2010-12-23 17:34:06.000000000 +0100
-+++ mozilla/nsprpub/pr/include/md/_freebsd.cfg 2010-12-23 17:34:44.000000000 +0100
-@@ -283,6 +283,97 @@
- #define PR_ALIGN_OF_POINTER 8
- #define PR_ALIGN_OF_WORD 8
-
-+#elif defined(__powerpc64__)
-+
-+#undef IS_LITTLE_ENDIAN
-+#define IS_BIG_ENDIAN 1
-+#define IS_64
-+
-+#define PR_BYTES_PER_BYTE 1
-+#define PR_BYTES_PER_SHORT 2
-+#define PR_BYTES_PER_INT 4
-+#define PR_BYTES_PER_INT64 8
-+#define PR_BYTES_PER_LONG 8
-+#define PR_BYTES_PER_FLOAT 4
-+#define PR_BYTES_PER_DOUBLE 8
-+#define PR_BYTES_PER_WORD 8
-+#define PR_BYTES_PER_DWORD 8
-+
-+#define PR_BITS_PER_BYTE 8
-+#define PR_BITS_PER_SHORT 16
-+#define PR_BITS_PER_INT 32
-+#define PR_BITS_PER_INT64 64
-+#define PR_BITS_PER_LONG 64
-+#define PR_BITS_PER_FLOAT 32
-+#define PR_BITS_PER_DOUBLE 64
-+#define PR_BITS_PER_WORD 64
-+
-+#define PR_BITS_PER_BYTE_LOG2 3
-+#define PR_BITS_PER_SHORT_LOG2 4
-+#define PR_BITS_PER_INT_LOG2 5
-+#define PR_BITS_PER_INT64_LOG2 6
-+#define PR_BITS_PER_LONG_LOG2 6
-+#define PR_BITS_PER_FLOAT_LOG2 5
-+#define PR_BITS_PER_DOUBLE_LOG2 6
-+#define PR_BITS_PER_WORD_LOG2 6
-+
-+#define PR_ALIGN_OF_SHORT 2
-+#define PR_ALIGN_OF_INT 4
-+#define PR_ALIGN_OF_LONG 8
-+#define PR_ALIGN_OF_INT64 8
-+#define PR_ALIGN_OF_FLOAT 4
-+#define PR_ALIGN_OF_DOUBLE 8
-+#define PR_ALIGN_OF_POINTER 8
-+#define PR_ALIGN_OF_WORD 8
-+
-+#define PR_BYTES_PER_WORD_LOG2 3
-+#define PR_BYTES_PER_DWORD_LOG2 3
-+
-+#elif defined(__powerpc__)
-+
-+#undef IS_LITTLE_ENDIAN
-+#define IS_BIG_ENDIAN 1
-+
-+#define PR_BYTES_PER_BYTE 1
-+#define PR_BYTES_PER_SHORT 2
-+#define PR_BYTES_PER_INT 4
-+#define PR_BYTES_PER_INT64 8
-+#define PR_BYTES_PER_LONG 4
-+#define PR_BYTES_PER_FLOAT 4
-+#define PR_BYTES_PER_DOUBLE 8
-+#define PR_BYTES_PER_WORD 4
-+#define PR_BYTES_PER_DWORD 8
-+
-+#define PR_BITS_PER_BYTE 8
-+#define PR_BITS_PER_SHORT 16
-+#define PR_BITS_PER_INT 32
-+#define PR_BITS_PER_INT64 64
-+#define PR_BITS_PER_LONG 32
-+#define PR_BITS_PER_FLOAT 32
-+#define PR_BITS_PER_DOUBLE 64
-+#define PR_BITS_PER_WORD 32
-+
-+#define PR_BITS_PER_BYTE_LOG2 3
-+#define PR_BITS_PER_SHORT_LOG2 4
-+#define PR_BITS_PER_INT_LOG2 5
-+#define PR_BITS_PER_INT64_LOG2 6
-+#define PR_BITS_PER_LONG_LOG2 5
-+#define PR_BITS_PER_FLOAT_LOG2 5
-+#define PR_BITS_PER_DOUBLE_LOG2 6
-+#define PR_BITS_PER_WORD_LOG2 5
-+
-+#define PR_ALIGN_OF_SHORT 2
-+#define PR_ALIGN_OF_INT 4
-+#define PR_ALIGN_OF_LONG 4
-+#define PR_ALIGN_OF_INT64 8
-+#define PR_ALIGN_OF_FLOAT 4
-+#define PR_ALIGN_OF_DOUBLE 8
-+#define PR_ALIGN_OF_POINTER 4
-+#define PR_ALIGN_OF_WORD 4
-+
-+#define PR_BYTES_PER_WORD_LOG2 2
-+#define PR_BYTES_PER_DWORD_LOG2 3
-+
- #else
-
- #error "Unknown CPU architecture"
diff --git a/mail/thunderbird/files/patch-nsprpub-pr-include-md_freebsd.h b/mail/thunderbird/files/patch-nsprpub-pr-include-md_freebsd.h
deleted file mode 100644
index 2be831a3ec9c..000000000000
--- a/mail/thunderbird/files/patch-nsprpub-pr-include-md_freebsd.h
+++ /dev/null
@@ -1,30 +0,0 @@
---- mozilla/nsprpub/pr/include/md/_freebsd.h.orig 2010-12-23 17:34:13.000000000 +0100
-+++ mozilla/nsprpub/pr/include/md/_freebsd.h 2010-12-23 17:34:46.000000000 +0100
-@@ -57,6 +57,10 @@
- #define _PR_SI_ARCHITECTURE "ia64"
- #elif defined(__amd64__)
- #define _PR_SI_ARCHITECTURE "amd64"
-+#elif defined(__powerpc64__)
-+#define _PR_SI_ARCHITECTURE "powerpc64"
-+#elif defined(__powerpc__)
-+#define _PR_SI_ARCHITECTURE "powerpc"
- #else
- #error "Unknown CPU architecture"
- #endif
-@@ -106,6 +110,16 @@
- #define _PR_IPV6_V6ONLY_PROBE
- #endif
-
-+#if (__FreeBSD_version >= 700016) || (__FreeBSD_version < 700000 && __FreeBSD_version >= 601103)
-+#if defined(_PR_PTHREADS)
-+#define _PR_HAVE_GETPROTO_R
-+#define _PR_HAVE_5_ARG_GETPROTO_R
-+#define _PR_HAVE_GETHOST_R
-+#define _PR_HAVE_GETHOST_R_INT
-+#define _PR_HAVE_THREADSAFE_GETHOST
-+#endif
-+#endif
-+
- #define USE_SETJMP
-
- #ifndef _PR_PTHREADS