summaryrefslogtreecommitdiff
path: root/mail/thunderbird/patches
diff options
context:
space:
mode:
Diffstat (limited to 'mail/thunderbird/patches')
-rw-r--r--mail/thunderbird/patches/patch-aa68
-rw-r--r--mail/thunderbird/patches/patch-as19
-rw-r--r--mail/thunderbird/patches/patch-aw15
-rw-r--r--mail/thunderbird/patches/patch-bi8
-rw-r--r--mail/thunderbird/patches/patch-config_baseconfig.mk18
-rw-r--r--mail/thunderbird/patches/patch-ipc_chromium_src_base_file__util__posix.cc8
-rw-r--r--mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc15
-rw-r--r--mail/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp32
-rw-r--r--mail/thunderbird/patches/patch-ma-toplevel23
-rw-r--r--mail/thunderbird/patches/patch-mi10
-rw-r--r--mail/thunderbird/patches/patch-mm38
-rw-r--r--mail/thunderbird/patches/patch-mozilla_config_baseconfig.mk12
-rw-r--r--mail/thunderbird/patches/patch-mozilla_config_system-headers8
-rw-r--r--mail/thunderbird/patches/patch-mozilla_content_media_nsAudioStream.cpp16
-rw-r--r--mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp12
-rw-r--r--mail/thunderbird/patches/patch-mozilla_ipc_chromium_Makefile.in7
-rw-r--r--mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_file__util__linux.cc13
-rw-r--r--mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc70
-rw-r--r--mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_thread__collision__warner.h13
-rw-r--r--mail/thunderbird/patches/patch-mozilla_ipc_glue_SharedMemorySysV.h6
-rw-r--r--mail/thunderbird/patches/patch-mozilla_js_src_config_system-headers8
-rw-r--r--mail/thunderbird/patches/patch-mozilla_js_src_jsinterp.cpp23
-rw-r--r--mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_Makefile.in28
-rw-r--r--mail/thunderbird/patches/patch-mozilla_media_libvpx_vpx__config.h21
-rw-r--r--mail/thunderbird/patches/patch-mozilla_media_libvpx_vpx__config__c.c21
-rw-r--r--mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__ppc__netbsd.cpp47
-rw-r--r--mail/thunderbird/patches/patch-xe12
-rw-r--r--mail/thunderbird/patches/patch-xj31
-rw-r--r--mail/thunderbird/patches/patch-xl74
29 files changed, 365 insertions, 311 deletions
diff --git a/mail/thunderbird/patches/patch-aa b/mail/thunderbird/patches/patch-aa
index 7810bbf3861..3ee802c9845 100644
--- a/mail/thunderbird/patches/patch-aa
+++ b/mail/thunderbird/patches/patch-aa
@@ -1,27 +1,18 @@
-$NetBSD: patch-aa,v 1.12 2012/09/02 06:43:39 ryoon Exp $
+$NetBSD: patch-aa,v 1.13 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/configure.in.orig 2012-08-25 00:30:59.000000000 +0000
+--- mozilla/configure.in.orig 2012-11-19 22:42:12.000000000 +0000
+++ mozilla/configure.in
-@@ -2299,7 +2299,7 @@ case "$target" in
- MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
- ;;
-
--*-freebsd*)
-+*-freebsd* | *-dragonfly*)
- if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
- DLL_SUFFIX=".so.1.0"
- DSO_LDOPTS="-shared"
-@@ -2307,6 +2307,9 @@ case "$target" in
- if test ! "$GNU_CC"; then
- DSO_LDOPTS="-Bshareable $DSO_LDOPTS"
+@@ -2080,6 +2080,9 @@ ia64*-hpux*)
+ if test -z "$MC"; then
+ MC=mc.exe
fi
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+ fi
;;
-
- ia64*-hpux*)
-@@ -3309,6 +3312,9 @@ dnl ====================================
+ *-mingw*)
+ DSO_CFLAGS=
+@@ -2979,6 +2982,9 @@ dnl ====================================
case $target in
*-hpux11.*)
;;
@@ -31,7 +22,17 @@ $NetBSD: patch-aa,v 1.12 2012/09/02 06:43:39 ryoon Exp $
*)
AC_CHECK_LIB(c_r, gethostbyname_r)
;;
-@@ -4308,6 +4314,14 @@ if test -n "$YASM"; then
+@@ -3279,6 +3285,9 @@ AC_CACHE_CHECK(
+ #ifdef linux
+ #define _BSD_SOURCE 1
+ #endif
++ #ifdef __NetBSD__
++ #error use of global _res variable in threaded programs is not portable
++ #endif
+ #include <resolv.h>
+ ],
+ [int foo = res_ninit(&_res);],
+@@ -3947,6 +3956,14 @@ if test -n "$YASM"; then
_YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'`
fi
@@ -46,7 +47,18 @@ $NetBSD: patch-aa,v 1.12 2012/09/02 06:43:39 ryoon Exp $
if test -z "$SKIP_LIBRARY_CHECKS"; then
dnl system JPEG support
dnl ========================================================
-@@ -5734,11 +5748,11 @@ if test -n "$MOZ_WEBM" -a -z "$MOZ_NATIV
+@@ -5158,8 +5175,8 @@ fi
+
+ AC_SUBST(MOZ_WEBRTC)
+
+-case "$target_cpu" in
+-arm*)
++case "$target" in
++arm-*-linux*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
+ MOZ_SAMPLE_TYPE_S16LE=1
+ AC_DEFINE(MOZ_SAMPLE_TYPE_S16LE)
+ AC_SUBST(MOZ_SAMPLE_TYPE_S16LE)
+@@ -5356,11 +5373,11 @@ if test -n "$MOZ_VP8" -a -z "$MOZ_NATIVE
dnl See if we have assembly on this platform.
case "$OS_ARCH:$CPU_ARCH" in
@@ -60,21 +72,3 @@ $NetBSD: patch-aa,v 1.12 2012/09/02 06:43:39 ryoon Exp $
VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC"
VPX_X86_ASM=1
;;
-@@ -6140,7 +6154,7 @@ if test -n "$MOZ_CRASHREPORTER"; then
- AC_MSG_ERROR([Breakpad tools do not support compiling on $HOST_OS_ARCH while targeting $OS_ARCH. Use --disable-crashreporter.])
- fi
-
-- if test "$OS_ARCH" == "WINNT" -a -z "$HAVE_64BIT_OS"; then
-+ if test "$OS_ARCH" = "WINNT" -a -z "$HAVE_64BIT_OS"; then
- MOZ_CRASHREPORTER_INJECTOR=1
- AC_DEFINE(MOZ_CRASHREPORTER_INJECTOR)
- fi
-@@ -9248,6 +9262,8 @@ if test -z "$MOZ_NATIVE_NSPR"; then
- AC_MSG_WARN([Recreating autoconf.mk with updated nspr-config output])
- if test "$OS_ARCH" != "WINNT"; then
- NSPR_LIBS=`./nsprpub/config/nspr-config --prefix=$LIBXUL_DIST --exec-prefix=$MOZ_BUILD_ROOT/dist --libdir=$LIBXUL_DIST/lib --libs`
-+ AC_MSG_WARN([pkgsrc: adding run path to NSPR_LIBS for bundled NSPR.])
-+ NSPR_LIBS="-Wl,-R${prefix}/lib/\${MOZILLA_PKG_NAME} ${NSPR_LIBS}"
- $PERL -pi.bak -e "s '^NSPR_LIBS\\s*=.*'NSPR_LIBS = $NSPR_LIBS'" config/autoconf.mk
- NSPR_CFLAGS=`./nsprpub/config/nspr-config --prefix=$LIBXUL_DIST --exec-prefix=$MOZ_BUILD_ROOT/dist --includedir=$LIBXUL_DIST/include/nspr --cflags`
- $PERL -pi.bak -e "s '^NSPR_CFLAGS\\s*=.*'NSPR_CFLAGS = $NSPR_CFLAGS'" config/autoconf.mk
diff --git a/mail/thunderbird/patches/patch-as b/mail/thunderbird/patches/patch-as
index 22c526480fa..efac853c273 100644
--- a/mail/thunderbird/patches/patch-as
+++ b/mail/thunderbird/patches/patch-as
@@ -1,19 +1,10 @@
-$NetBSD: patch-as,v 1.13 2012/10/12 18:28:58 ryoon Exp $
+$NetBSD: patch-as,v 1.14 2012/11/23 07:17:54 ryoon Exp $
Treat DragonFly like FreeBSD.
---- mozilla/js/src/configure.in.orig 2012-10-02 17:02:06.000000000 +0000
+--- mozilla/js/src/configure.in.orig 2012-11-19 22:42:22.000000000 +0000
+++ mozilla/js/src/configure.in
-@@ -1679,7 +1679,7 @@ case "$target" in
- MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin'
- ;;
-
--*-freebsd*)
-+*-freebsd*|*-dragonfly*)
- if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
- DLL_SUFFIX=".so.1.0"
- DSO_LDOPTS="-shared"
-@@ -2783,7 +2783,7 @@ then
+@@ -2701,7 +2701,7 @@ then
fi
case "$target" in
@@ -21,8 +12,8 @@ Treat DragonFly like FreeBSD.
+ *-*-freebsd*|*-dragonfly*)
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
- dnl -pthread links in -lc_r, so don't specify it explicitly.
-@@ -3626,7 +3626,7 @@ if test "$MOZ_MEMORY"; then
+ dnl -pthread links in -lpthread, so don't specify it explicitly.
+@@ -3545,7 +3545,7 @@ if test "$MOZ_MEMORY"; then
*-darwin*)
AC_DEFINE(MOZ_MEMORY_DARWIN)
;;
diff --git a/mail/thunderbird/patches/patch-aw b/mail/thunderbird/patches/patch-aw
index ec3c9729bc4..ad4c60079a9 100644
--- a/mail/thunderbird/patches/patch-aw
+++ b/mail/thunderbird/patches/patch-aw
@@ -1,6 +1,6 @@
-$NetBSD: patch-aw,v 1.12 2012/10/12 18:28:59 ryoon Exp $
+$NetBSD: patch-aw,v 1.13 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/xulrunner/stub/nsXULStub.cpp.orig 2012-10-02 17:02:29.000000000 +0000
+--- mozilla/xulrunner/stub/nsXULStub.cpp.orig 2012-11-19 22:42:45.000000000 +0000
+++ mozilla/xulrunner/stub/nsXULStub.cpp
@@ -11,6 +11,29 @@
#include "nsIFile.h"
@@ -32,14 +32,3 @@ $NetBSD: patch-aw,v 1.12 2012/10/12 18:28:59 ryoon Exp $
#ifdef XP_WIN
#include <windows.h>
-@@ -169,7 +192,9 @@ main(int argc, char **argv)
- char greDir[MAXPATHLEN];
- bool greFound = false;
-
--#if defined(XP_MACOSX)
-+#if defined(__NetBSD__)
-+ netbsd_fixrlimit();
-+#elif defined(XP_MACOSX)
- CFBundleRef appBundle = CFBundleGetMainBundle();
- if (!appBundle)
- return 1;
diff --git a/mail/thunderbird/patches/patch-bi b/mail/thunderbird/patches/patch-bi
index 911dbeb1de9..fecec586c50 100644
--- a/mail/thunderbird/patches/patch-bi
+++ b/mail/thunderbird/patches/patch-bi
@@ -1,6 +1,6 @@
-$NetBSD: patch-bi,v 1.4 2012/09/02 06:43:40 ryoon Exp $
+$NetBSD: patch-bi,v 1.5 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/gfx/angle/src/compiler/osinclude.h.orig 2012-08-25 00:31:08.000000000 +0000
+--- mozilla/gfx/angle/src/compiler/osinclude.h.orig 2012-11-19 22:42:19.000000000 +0000
+++ mozilla/gfx/angle/src/compiler/osinclude.h
@@ -16,6 +16,7 @@
#define ANGLE_OS_WIN
@@ -8,5 +8,5 @@ $NetBSD: patch-bi,v 1.4 2012/09/02 06:43:40 ryoon Exp $
defined(__FreeBSD__) || defined(__OpenBSD__) || \
+ defined(__NetBSD__) || defined(__DragonFly__) || \
defined(__sun) || defined(ANDROID) || \
- defined(__GLIBC__) || defined(__GNU__)
- #define ANGLE_OS_POSIX
+ defined(__GLIBC__) || defined(__GNU__) || \
+ defined(__QNX__)
diff --git a/mail/thunderbird/patches/patch-config_baseconfig.mk b/mail/thunderbird/patches/patch-config_baseconfig.mk
new file mode 100644
index 00000000000..94d71cf3589
--- /dev/null
+++ b/mail/thunderbird/patches/patch-config_baseconfig.mk
@@ -0,0 +1,18 @@
+$NetBSD: patch-config_baseconfig.mk,v 1.1 2012/11/23 07:17:54 ryoon Exp $
+
+--- config/baseconfig.mk.orig 2012-11-19 22:35:28.000000000 +0000
++++ config/baseconfig.mk
+@@ -1,9 +1,9 @@
+ INCLUDED_AUTOCONF_MK = 1
+
+-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
++includedir := $(includedir)/$(MOZILLA_PKG_NAME)
++idldir = $(datadir)/idl/$(MOZILLA_PKG_NAME)
++installdir = $(libdir)/$(MOZILLA_PKG_NAME)
++sdkdir = $(libdir)/$(MOZILLA_PKG_NAME)-sdk
+ MOZILLA_SRCDIR = $(topsrcdir)/mozilla
+ MOZDEPTH = $(DEPTH)/mozilla
+ DIST = $(MOZDEPTH)/dist
diff --git a/mail/thunderbird/patches/patch-ipc_chromium_src_base_file__util__posix.cc b/mail/thunderbird/patches/patch-ipc_chromium_src_base_file__util__posix.cc
index d68868b8289..45bee52de9a 100644
--- a/mail/thunderbird/patches/patch-ipc_chromium_src_base_file__util__posix.cc
+++ b/mail/thunderbird/patches/patch-ipc_chromium_src_base_file__util__posix.cc
@@ -1,13 +1,13 @@
-$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.4 2012/09/02 06:43:40 ryoon Exp $
+$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.5 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2012-08-25 00:31:11.000000000 +0000
+--- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2012-11-19 22:42:22.000000000 +0000
+++ mozilla/ipc/chromium/src/base/file_util_posix.cc
-@@ -31,7 +31,7 @@
+@@ -33,7 +33,7 @@
#include "base/time.h"
// 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
diff --git a/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc b/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
index b5dd067960a..fb1d279f67a 100644
--- a/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
+++ b/mail/thunderbird/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc
@@ -1,14 +1,13 @@
-$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.5 2012/09/02 06:43:40 ryoon Exp $
+$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.6 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-08-25 00:31:11.000000000 +0000
+--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-11-19 22:42:22.000000000 +0000
+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,16 +9,31 @@
+@@ -9,16 +9,30 @@
#if defined(OS_MACOSX)
#include <mach/mach.h>
+#elif defined(OS_NETBSD)
+#include <lwp.h>
-+#include <nspr/prthread.h>
#elif defined(OS_LINUX)
#include <sys/syscall.h>
-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
@@ -37,7 +36,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.5 2012/09/02
#if defined(OS_MACOSX)
namespace base {
void InitThreading();
-@@ -38,9 +53,20 @@ PlatformThreadId PlatformThread::Current
+@@ -38,9 +52,20 @@ PlatformThreadId PlatformThread::Current
// into the kernel.
#if defined(OS_MACOSX)
return mach_thread_self();
@@ -61,7 +60,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.5 2012/09/02
#elif defined(OS_LINUX)
return syscall(__NR_gettid);
#endif
-@@ -83,10 +109,10 @@ void PlatformThread::SetName(const char*
+@@ -83,9 +108,9 @@ void PlatformThread::SetName(const char*
// 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.
@@ -69,9 +68,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.5 2012/09/02
+#if defined(OS_BSD) && !defined(OS_NETBSD)
pthread_set_name_np(pthread_self(), name);
-#elif defined(__NetBSD__)
-- pthread_setname_np(pthread_self(), "%s", name);
+#elif defined(OS_NETBSD)
-+ PR_SetCurrentThreadName(name);
+ pthread_setname_np(pthread_self(), "%s", (void *)name);
#else
prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0);
- #endif
diff --git a/mail/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp b/mail/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
index 92cf39cf55e..406b1326ff8 100644
--- a/mail/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
+++ b/mail/thunderbird/patches/patch-ipc_glue_GeckoChildProcessHost.cpp
@@ -1,17 +1,31 @@
-$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.3 2012/09/02 06:43:40 ryoon Exp $
+$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.4 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2012-08-25 00:31:11.000000000 +0000
+--- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2012-11-19 22:42:22.000000000 +0000
+++ mozilla/ipc/glue/GeckoChildProcessHost.cpp
-@@ -410,7 +410,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
+@@ -4,7 +4,13 @@
+ * 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/. */
+
++#if defined(__NetBSD__)
++_Pragma("GCC visibility push(default)")
++#endif
+ #include "GeckoChildProcessHost.h"
++#if defined(__NetBSD__)
++_Pragma("GCC visibility pop")
++#endif
+
+ #include "base/command_line.h"
+ #include "base/path_service.h"
+@@ -437,7 +443,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
// and passing wstrings from one config to the other is unsafe. So
// we split the logic here.
-#if defined(OS_LINUX) || defined(OS_MACOSX)
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
base::environment_map newEnvVars;
- // XPCOM may not be initialized in some subprocesses. We don't want
- // to initialize XPCOM just for the directory service, especially
-@@ -425,8 +425,8 @@ GeckoChildProcessHost::PerformAsyncLaunc
+ base::ChildPrivileges privs = kLowRightsSubprocesses ?
+ base::UNPRIVILEGED :
+@@ -455,8 +461,8 @@ GeckoChildProcessHost::PerformAsyncLaunc
if (NS_SUCCEEDED(rv)) {
nsCString path;
greDir->GetNativePath(path);
@@ -22,7 +36,7 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.3 2012/09/02 06:43:40 ryoo
path += "/lib";
# endif // MOZ_WIDGET_ANDROID
const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
-@@ -537,7 +537,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
+@@ -575,7 +581,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
childArgv.push_back(pidstring);
#if defined(MOZ_CRASHREPORTER)
@@ -31,12 +45,12 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.3 2012/09/02 06:43:40 ryoo
int childCrashFd, childCrashRemapFd;
if (!CrashReporter::CreateNotificationPipeForChild(
&childCrashFd, &childCrashRemapFd))
-@@ -574,7 +574,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
+@@ -612,7 +618,7 @@ GeckoChildProcessHost::PerformAsyncLaunc
#endif
base::LaunchApp(childArgv, mFileMap,
-#if defined(OS_LINUX) || defined(OS_MACOSX)
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- newEnvVars,
+ newEnvVars, privs,
#endif
false, &process, arch);
diff --git a/mail/thunderbird/patches/patch-ma-toplevel b/mail/thunderbird/patches/patch-ma-toplevel
deleted file mode 100644
index 47cff9d2e2b..00000000000
--- a/mail/thunderbird/patches/patch-ma-toplevel
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ma-toplevel,v 1.5 2012/09/02 06:43:41 ryoon Exp $
-
---- config/autoconf.mk.in.orig 2012-08-25 00:24:32.000000000 +0000
-+++ config/autoconf.mk.in
-@@ -30,14 +30,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
- bindir = @bindir@
--includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+includedir = @includedir@/$(MOZILLA_PKG_NAME)
- libdir = @libdir@
- datadir = @datadir@
- mandir = @mandir@
--idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-+idldir = @datadir@/idl/$(MOZILLA_PKG_NAME)
-
--installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
--sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
-+installdir = $(libdir)/$(MOZILLA_PKG_NAME)
-+sdkdir = $(libdir)/$(MOZILLA_PKG_NAME)-sdk
-
- MOZDEPTH = $(DEPTH)/mozilla
- DIST = $(MOZDEPTH)/dist
diff --git a/mail/thunderbird/patches/patch-mi b/mail/thunderbird/patches/patch-mi
index 782cf5823e3..68fe7badc1f 100644
--- a/mail/thunderbird/patches/patch-mi
+++ b/mail/thunderbird/patches/patch-mi
@@ -1,15 +1,15 @@
-$NetBSD: patch-mi,v 1.5 2012/09/02 06:43:41 ryoon Exp $
+$NetBSD: patch-mi,v 1.6 2012/11/23 07:17:54 ryoon Exp $
Add DragonFly support.
---- mozilla/config/config.mk.orig 2012-08-25 00:30:58.000000000 +0000
+--- mozilla/config/config.mk.orig 2012-11-19 22:42:12.000000000 +0000
+++ mozilla/config/config.mk
-@@ -97,7 +97,7 @@ endif
+@@ -92,7 +92,7 @@ AUTOCONF_TOOLS = $(topsrcdir)/build/auto
# but save the version to allow multiple versions of the same base
# platform to be built in the same tree.
#
--ifneq (,$(filter FreeBSD HP-UX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
-+ifneq (,$(filter DragonFly FreeBSD HP-UX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
+-ifneq (,$(filter FreeBSD HP-UX Linux NetBSD OpenBSD SunOS,$(OS_ARCH)))
++ifneq (,$(filter DragonFly FreeBSD HP-UX Linux NetBSD OpenBSD SunOS,$(OS_ARCH)))
OS_RELEASE := $(basename $(OS_RELEASE))
# Allow the user to ignore the OS_VERSION, which is usually irrelevant.
diff --git a/mail/thunderbird/patches/patch-mm b/mail/thunderbird/patches/patch-mm
index 54fa22f5e4c..fe0bd5e7c28 100644
--- a/mail/thunderbird/patches/patch-mm
+++ b/mail/thunderbird/patches/patch-mm
@@ -1,25 +1,21 @@
-$NetBSD: patch-mm,v 1.12 2012/09/03 15:47:49 marino Exp $
+$NetBSD: patch-mm,v 1.13 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/toolkit/library/Makefile.in.orig 2012-08-25 00:31:32.000000000 +0000
+--- mozilla/toolkit/library/Makefile.in.orig 2012-11-22 19:26:22.000000000 +0000
+++ mozilla/toolkit/library/Makefile.in
-@@ -535,6 +535,20 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
- endif
- endif
+@@ -371,14 +371,11 @@ endif
+
+ EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
-+ifneq (,$(filter DragonFly FreeBSD,$(OS_ARCH)))
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+EXTRA_DSO_LDOPTS += -lplc4 -lplds4 -lnspr4 -lnssutil3
-+endif
-+
+-ifdef MOZ_SYDNEYAUDIO
+-ifeq ($(OS_ARCH),Linux)
+ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO))
-+ifeq ($(OS_ARCH),NetBSD)
-+EXTRA_DSO_LDOPTS += -lossaudio
-+endif
-+ifdef PKGSRC_PULSEAUDIO
-+EXTRA_DSO_LDOPTS += -lpulse
-+endif
-+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)
- ifdef MOZ_CRASHREPORTER
++ifdef MOZ_ALSA
+ EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
+ endif
+-endif
+-
+ ifdef MOZ_PULSEAUDIO
+-ifdef MOZ_CUBEB
+ EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
+ endif
+ endif
diff --git a/mail/thunderbird/patches/patch-mozilla_config_baseconfig.mk b/mail/thunderbird/patches/patch-mozilla_config_baseconfig.mk
index 1e5e3ee3912..0fbd158a32e 100644
--- a/mail/thunderbird/patches/patch-mozilla_config_baseconfig.mk
+++ b/mail/thunderbird/patches/patch-mozilla_config_baseconfig.mk
@@ -1,6 +1,6 @@
-$NetBSD: patch-mozilla_config_baseconfig.mk,v 1.1 2012/10/12 18:29:39 ryoon Exp $
+$NetBSD: patch-mozilla_config_baseconfig.mk,v 1.2 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/config/baseconfig.mk.orig 2012-10-05 14:45:14.000000000 +0000
+--- mozilla/config/baseconfig.mk.orig 2012-11-19 22:42:12.000000000 +0000
+++ mozilla/config/baseconfig.mk
@@ -1,9 +1,9 @@
INCLUDED_AUTOCONF_MK = 1
@@ -9,10 +9,10 @@ $NetBSD: patch-mozilla_config_baseconfig.mk,v 1.1 2012/10/12 18:29:39 ryoon Exp
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
-+includedir := $(includedir)/$(MOZILLA_PKG_NAME)
-+idldir = $(datadir)/idl/$(MOZILLA_PKG_NAME)
-+installdir = $(libdir)/$(MOZILLA_PKG_NAME)
-+sdkdir = $(libdir)/$(MOZILLA_PKG_NAME)-sdk
++includedir := $(includedir)/${MOZILLA_PKG_NAME}
++idldir = $(datadir)/idl/${MOZILLA_PKG_NAME}
++installdir = $(libdir)/${MOZILLA_PKG_NAME}
++sdkdir = $(libdir)/${MOZILLA_PKG_NAME}
DIST = $(DEPTH)/dist
# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't
diff --git a/mail/thunderbird/patches/patch-mozilla_config_system-headers b/mail/thunderbird/patches/patch-mozilla_config_system-headers
index 730c3b806c0..7c3f868ebc2 100644
--- a/mail/thunderbird/patches/patch-mozilla_config_system-headers
+++ b/mail/thunderbird/patches/patch-mozilla_config_system-headers
@@ -1,8 +1,8 @@
-$NetBSD: patch-mozilla_config_system-headers,v 1.1 2012/09/02 06:43:41 ryoon Exp $
+$NetBSD: patch-mozilla_config_system-headers,v 1.2 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/config/system-headers.orig 2012-08-25 00:30:58.000000000 +0000
+--- mozilla/config/system-headers.orig 2012-11-19 22:42:12.000000000 +0000
+++ mozilla/config/system-headers
-@@ -1059,3 +1059,7 @@ gst/gst.h
+@@ -1065,5 +1065,9 @@ gst/gst.h
gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
@@ -10,3 +10,5 @@ $NetBSD: patch-mozilla_config_system-headers,v 1.1 2012/09/02 06:43:41 ryoon Exp
+sys/user.h
+kvm.h
+spawn.h
+ sys/msg.h
+ sys/ipc.h
diff --git a/mail/thunderbird/patches/patch-mozilla_content_media_nsAudioStream.cpp b/mail/thunderbird/patches/patch-mozilla_content_media_nsAudioStream.cpp
new file mode 100644
index 00000000000..21e91dfda89
--- /dev/null
+++ b/mail/thunderbird/patches/patch-mozilla_content_media_nsAudioStream.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-mozilla_content_media_nsAudioStream.cpp,v 1.1 2012/11/23 07:17:54 ryoon Exp $
+
+--- mozilla/content/media/nsAudioStream.cpp.orig 2012-11-19 22:42:14.000000000 +0000
++++ mozilla/content/media/nsAudioStream.cpp
+@@ -298,7 +298,11 @@ static int PrefChanged(const char* aPref
+ gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nullptr));
+ }
+ } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) {
++#if defined(__FreeBSD__) && __FreeBSD_version < 800097
++ bool value = Preferences::GetBool(aPref, false);
++#else
+ bool value = Preferences::GetBool(aPref, true);
++#endif
+ mozilla::MutexAutoLock lock(*gAudioPrefsLock);
+ gUseCubeb = value;
+ } else if (strcmp(aPref, PREF_CUBEB_LATENCY) == 0) {
diff --git a/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp b/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp
index 71301a72775..39fbf3c18c5 100644
--- a/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp
+++ b/mail/thunderbird/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp
@@ -1,6 +1,6 @@
-$NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp,v 1.3 2012/09/02 06:43:41 ryoon Exp $
+$NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp,v 1.4 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2012-08-25 00:31:04.000000000 +0000
+--- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2012-11-19 22:42:16.000000000 +0000
+++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp
@@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -10,7 +10,7 @@ $NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp,v 1.3 2012/09/02 06
#include <QtCore/QTimer>
#include "nsQAppInstance.h"
#include "NestedLoopTimer.h"
-@@ -192,7 +193,7 @@ PluginModuleChild::Init(const std::strin
+@@ -196,7 +197,7 @@ PluginModuleChild::Init(const std::strin
// TODO: use PluginPRLibrary here
@@ -19,7 +19,7 @@ $NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp,v 1.3 2012/09/02 06
mShutdownFunc =
(NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
-@@ -1811,7 +1812,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
+@@ -1827,7 +1828,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
PLUGIN_LOG_DEBUG_METHOD;
AssertPluginThread();
@@ -28,8 +28,8 @@ $NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp,v 1.3 2012/09/02 06
return true;
#elif defined(OS_WIN) || defined(OS_MACOSX)
*_retval = mGetEntryPointsFunc(&mFunctions);
-@@ -1840,7 +1841,7 @@ PluginModuleChild::AnswerNP_Initialize(c
- SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/));
+@@ -1856,7 +1857,7 @@ PluginModuleChild::AnswerNP_Initialize(c
+ SendBackUpXResources(FileDescriptor(xSocketFd));
#endif
-#if defined(OS_LINUX)
diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_Makefile.in b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_Makefile.in
index 13b2066b6b4..bb15a9eddc3 100644
--- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_Makefile.in
+++ b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_Makefile.in
@@ -1,8 +1,8 @@
-$NetBSD: patch-mozilla_ipc_chromium_Makefile.in,v 1.3 2012/09/02 06:43:41 ryoon Exp $
+$NetBSD: patch-mozilla_ipc_chromium_Makefile.in,v 1.4 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/ipc/chromium/Makefile.in.orig 2012-08-25 00:31:11.000000000 +0000
+--- mozilla/ipc/chromium/Makefile.in.orig 2012-11-19 22:42:22.000000000 +0000
+++ mozilla/ipc/chromium/Makefile.in
-@@ -243,6 +243,34 @@ endif
+@@ -240,6 +240,33 @@ endif
endif # } OS_LINUX
@@ -10,7 +10,6 @@ $NetBSD: patch-mozilla_ipc_chromium_Makefile.in,v 1.3 2012/09/02 06:43:41 ryoon
+
+CPPSRCS += \
+ atomicops_internals_x86_gcc.cc \
-+ file_util_linux.cc \
+ process_util_bsd.cc \
+ time_posix.cc \
+ $(NULL)
diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_file__util__linux.cc b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_file__util__linux.cc
deleted file mode 100644
index 2ca41740971..00000000000
--- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_file__util__linux.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-mozilla_ipc_chromium_src_base_file__util__linux.cc,v 1.1 2012/09/02 06:43:41 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/file_util_linux.cc.orig 2012-08-25 00:31:11.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/file_util_linux.cc
-@@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) {
- }
-
- bool GetShmemTempDir(FilePath* path) {
--#ifdef ANDROID
-+#if defined(ANDROID) || defined(OS_BSD)
- return GetTempDir(path);
- #else
- *path = FilePath("/dev/shm");
diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc
index 876a17557b3..7c88220a645 100644
--- a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc
+++ b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc
@@ -1,8 +1,8 @@
-$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.5 2012/09/03 15:47:49 marino Exp $
+$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.6 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-08-31 13:56:11.000000000 +0000
+--- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-11-22 19:23:30.000000000 +0000
+++ mozilla/ipc/chromium/src/base/process_util_bsd.cc
-@@ -0,0 +1,321 @@
+@@ -0,0 +1,367 @@
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
@@ -15,10 +15,7 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.5 2012/09
+#include <sys/sysctl.h>
+#include <sys/wait.h>
+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+_Pragma("GCC visibility push(default)")
-+#include <kvm.h>
+#include <sys/user.h>
-+_Pragma("GCC visibility pop")
+#endif
+
+#include <ctype.h>
@@ -40,6 +37,20 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.5 2012/09
+#define HAVE_POSIX_SPAWN 1
+#endif
+
++/*
++ * On platforms that are not gonk based, we fall back to an arbitrary
++ * UID. This is generally the UID for user `nobody', albeit it is not
++ * always the case.
++ */
++
++#if defined(OS_NETBSD) || defined(OS_OPENBSD)
++# define CHILD_UNPRIVILEGED_UID 32767
++# define CHILD_UNPRIVILEGED_GID 32767
++#else
++# define CHILD_UNPRIVILEGED_UID 65534
++# define CHILD_UNPRIVILEGED_GID 65534
++#endif
++
+#ifndef __dso_public
+# ifdef __exported
+# define __dso_public __exported
@@ -88,6 +99,17 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.5 2012/09
+ const environment_map& env_vars_to_set,
+ bool wait, ProcessHandle* process_handle,
+ ProcessArchitecture arch) {
++ return LaunchApp(argv, fds_to_remap, env_vars_to_set,
++ SAME_PRIVILEGES_AS_PARENT,
++ wait, process_handle);
++}
++
++bool LaunchApp(const std::vector<std::string>& argv,
++ const file_handle_mapping_vector& fds_to_remap,
++ const environment_map& env_vars_to_set,
++ ChildPrivileges privs,
++ bool wait, ProcessHandle* process_handle,
++ ProcessArchitecture arch) {
+ bool retval = true;
+
+ char* argv_copy[argv.size() + 1];
@@ -202,6 +224,17 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.5 2012/09
+ const environment_map& env_vars_to_set,
+ bool wait, ProcessHandle* process_handle,
+ ProcessArchitecture arch) {
++ return LaunchApp(argv, fds_to_remap, env_vars_to_set,
++ SAME_PRIVILEGES_AS_PARENT,
++ wait, process_handle);
++}
++
++bool LaunchApp(const std::vector<std::string>& argv,
++ const file_handle_mapping_vector& fds_to_remap,
++ const environment_map& env_vars_to_set,
++ ChildPrivileges privs,
++ bool wait, ProcessHandle* process_handle,
++ ProcessArchitecture arch) {
+ scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
+ // Illegal to allocate memory after fork and before execvp
+ InjectiveMultimap fd_shuffle1, fd_shuffle2;
@@ -224,19 +257,32 @@ $NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.5 2012/09
+
+ CloseSuperfluousFds(fd_shuffle2);
+
++ for (size_t i = 0; i < argv.size(); i++)
++ argv_cstr[i] = const_cast<char*>(argv[i].c_str());
++ argv_cstr[argv.size()] = NULL;
++
++ if (privs == UNPRIVILEGED) {
++ if (setgid(CHILD_UNPRIVILEGED_GID) != 0) {
++ DLOG(ERROR) << "FAILED TO setgid() CHILD PROCESS, path: " << argv_cstr[0];
++ _exit(127);
++ }
++ if (setuid(CHILD_UNPRIVILEGED_UID) != 0) {
++ DLOG(ERROR) << "FAILED TO setuid() CHILD PROCESS, path: " << argv_cstr[0];
++ _exit(127);
++ }
++ if (chdir("/") != 0)
++ gProcessLog.print("==> could not chdir()\n");
++ }
++
+ for (environment_map::const_iterator it = env_vars_to_set.begin();
+ it != env_vars_to_set.end(); ++it) {
+ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
+ _exit(127);
+ }
-+
-+ for (size_t i = 0; i < argv.size(); i++)
-+ argv_cstr[i] = const_cast<char*>(argv[i].c_str());
-+ argv_cstr[argv.size()] = NULL;
-+ execvp(argv_cstr[0], argv_cstr.get());
++ execv(argv_cstr[0], argv_cstr.get());
+ // if we get here, we're in serious trouble and should complain loudly
+ DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
-+ exit(127);
++ _exit(127);
+ } else {
+ gProcessLog.print("==> process %d launched child process %d\n",
+ GetCurrentProcId(), pid);
diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_thread__collision__warner.h b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_thread__collision__warner.h
new file mode 100644
index 00000000000..3b97a1b7000
--- /dev/null
+++ b/mail/thunderbird/patches/patch-mozilla_ipc_chromium_src_base_thread__collision__warner.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-mozilla_ipc_chromium_src_base_thread__collision__warner.h,v 1.1 2012/11/23 07:17:54 ryoon Exp $
+
+--- mozilla/ipc/chromium/src/base/thread_collision_warner.h.orig 2012-11-19 22:42:22.000000000 +0000
++++ mozilla/ipc/chromium/src/base/thread_collision_warner.h
+@@ -101,7 +101,7 @@
+ // Defines a class member that acts like a mutex. It is used only as a
+ // verification tool.
+ #define DFAKE_MUTEX(obj) \
+- mutable base::ThreadCollisionWarner obj
++ mutable base::ThreadCollisionWarner obj;
+ // Asserts the call is never called simultaneously in two threads. Used at
+ // member function scope.
+ #define DFAKE_SCOPED_LOCK(obj) \
diff --git a/mail/thunderbird/patches/patch-mozilla_ipc_glue_SharedMemorySysV.h b/mail/thunderbird/patches/patch-mozilla_ipc_glue_SharedMemorySysV.h
index 369eb5a4f59..2cd87ba8aac 100644
--- a/mail/thunderbird/patches/patch-mozilla_ipc_glue_SharedMemorySysV.h
+++ b/mail/thunderbird/patches/patch-mozilla_ipc_glue_SharedMemorySysV.h
@@ -1,13 +1,13 @@
-$NetBSD: patch-mozilla_ipc_glue_SharedMemorySysV.h,v 1.1 2012/09/02 06:43:42 ryoon Exp $
+$NetBSD: patch-mozilla_ipc_glue_SharedMemorySysV.h,v 1.2 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/ipc/glue/SharedMemorySysV.h.orig 2012-08-25 00:31:11.000000000 +0000
+--- mozilla/ipc/glue/SharedMemorySysV.h.orig 2012-11-19 22:42:22.000000000 +0000
+++ 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)
++#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
diff --git a/mail/thunderbird/patches/patch-mozilla_js_src_config_system-headers b/mail/thunderbird/patches/patch-mozilla_js_src_config_system-headers
index d44d8d58b50..3477594cb23 100644
--- a/mail/thunderbird/patches/patch-mozilla_js_src_config_system-headers
+++ b/mail/thunderbird/patches/patch-mozilla_js_src_config_system-headers
@@ -1,8 +1,8 @@
-$NetBSD: patch-mozilla_js_src_config_system-headers,v 1.1 2012/09/02 06:43:42 ryoon Exp $
+$NetBSD: patch-mozilla_js_src_config_system-headers,v 1.2 2012/11/23 07:17:54 ryoon Exp $
---- mozilla/js/src/config/system-headers.orig 2012-08-25 00:31:11.000000000 +0000
+--- mozilla/js/src/config/system-headers.orig 2012-11-19 22:42:22.000000000 +0000
+++ mozilla/js/src/config/system-headers
-@@ -1059,3 +1059,7 @@ gst/gst.h
+@@ -1065,5 +1065,9 @@ gst/gst.h
gst/app/gstappsink.h
gst/app/gstappsrc.h
gst/video/video.h
@@ -10,3 +10,5 @@ $NetBSD: patch-mozilla_js_src_config_system-headers,v 1.1 2012/09/02 06:43:42 ry
+sys/user.h
+kvm.h
+spawn.h
+ sys/msg.h
+ sys/ipc.h
diff --git a/mail/thunderbird/patches/patch-mozilla_js_src_jsinterp.cpp b/mail/thunderbird/patches/patch-mozilla_js_src_jsinterp.cpp
new file mode 100644
index 00000000000..1f35c5385a6
--- /dev/null
+++ b/mail/thunderbird/patches/patch-mozilla_js_src_jsinterp.cpp
@@ -0,0 +1,23 @@
+$NetBSD: patch-mozilla_js_src_jsinterp.cpp,v 1.1 2012/11/23 07:17:54 ryoon Exp $
+
+--- mozilla/js/src/jsinterp.cpp.orig 2012-11-19 22:42:24.000000000 +0000
++++ mozilla/js/src/jsinterp.cpp
+@@ -3664,6 +3664,7 @@ BEGIN_CASE(JSOP_LEAVEBLOCK)
+ BEGIN_CASE(JSOP_LEAVEFORLETIN)
+ BEGIN_CASE(JSOP_LEAVEBLOCKEXPR)
+ {
++ {
+ DebugOnly<uint32_t> blockDepth = regs.fp()->blockChain().stackDepth();
+
+ regs.fp()->popBlock(cx);
+@@ -3678,7 +3679,9 @@ BEGIN_CASE(JSOP_LEAVEBLOCKEXPR)
+ regs.sp -= GET_UINT16(regs.pc);
+ JS_ASSERT(regs.stackDepth() == blockDepth + 1);
+ regs.sp[-1] = *vp;
+- } else {
++ }
++ }
++ if (op != JSOP_LEAVEBLOCK && op != JSOP_LEAVEBLOCKEXPR) {
+ /* Another op will pop; nothing to do here. */
+ len = JSOP_LEAVEFORLETIN_LENGTH;
+ DO_NEXT_OP(len);
diff --git a/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_Makefile.in b/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_Makefile.in
new file mode 100644
index 00000000000..3158d6077ef
--- /dev/null
+++ b/mail/thunderbird/patches/patch-mozilla_media_libcubeb_src_Makefile.in
@@ -0,0 +1,28 @@
+$NetBSD: patch-mozilla_media_libcubeb_src_Makefile.in,v 1.1 2012/11/23 07:17:54 ryoon Exp $
+
+--- mozilla/media/libcubeb/src/Makefile.in.orig 2012-11-19 22:42:33.000000000 +0000
++++ 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,6 +38,12 @@ CSRCS = \
+ $(NULL)
+ endif
+
++ifdef MOZ_ALSA
++CSRCS = \
++ cubeb_alsa.c \
++ $(NULL)
++endif
++
+ ifdef MOZ_PULSEAUDIO
+ CSRCS = \
+ cubeb_pulse.c \
diff --git a/mail/thunderbird/patches/patch-mozilla_media_libvpx_vpx__config.h b/mail/thunderbird/patches/patch-mozilla_media_libvpx_vpx__config.h
deleted file mode 100644
index 8e844893cfe..00000000000
--- a/mail/thunderbird/patches/patch-mozilla_media_libvpx_vpx__config.h
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-mozilla_media_libvpx_vpx__config.h,v 1.3 2012/09/02 06:43:42 ryoon Exp $
-
---- mozilla/media/libvpx/vpx_config.h.orig 2012-08-25 00:31:24.000000000 +0000
-+++ mozilla/media/libvpx/vpx_config.h
-@@ -16,12 +16,12 @@
- /* 32 bit MacOS. */
- #include "vpx_config_x86-darwin9-gcc.h"
-
--#elif defined(__linux__) && defined(__i386__)
--/* 32 bit Linux. */
-+#elif (defined(__linux__) | defined(__DragonFly__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)) && defined(__i386__)
-+/* 32 bit Linux or some BSD. */
- #include "vpx_config_x86-linux-gcc.h"
-
--#elif defined(__linux__) && defined(__x86_64__)
--/* 64 bit Linux. */
-+#elif (defined(__linux__) | defined(__DragonFly__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)) && defined(__x86_64__)
-+/* 64 bit Linux or some BSD. */
- #include "vpx_config_x86_64-linux-gcc.h"
-
- #elif defined(__sun) && defined(__i386)
diff --git a/mail/thunderbird/patches/patch-mozilla_media_libvpx_vpx__config__c.c b/mail/thunderbird/patches/patch-mozilla_media_libvpx_vpx__config__c.c
deleted file mode 100644
index 1b3bb9e5fcf..00000000000
--- a/mail/thunderbird/patches/patch-mozilla_media_libvpx_vpx__config__c.c
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-mozilla_media_libvpx_vpx__config__c.c,v 1.3 2012/09/02 06:43:42 ryoon Exp $
-
---- mozilla/media/libvpx/vpx_config_c.c.orig 2012-08-25 00:31:24.000000000 +0000
-+++ mozilla/media/libvpx/vpx_config_c.c
-@@ -15,12 +15,12 @@
- /* 32 bit MacOS. */
- #include "vpx_config_x86-darwin9-gcc.c"
-
--#elif defined(__linux__) && defined(__i386__)
--/* 32 bit Linux. */
-+#elif (defined(__linux__) | defined(__DragonFly__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)) && defined(__i386__)
-+/* 32 bit Linux or BSD. */
- #include "vpx_config_x86-linux-gcc.c"
-
--#elif defined(__linux__) && defined(__x86_64__)
--/* 64 bit Linux. */
-+#elif (defined(__linux__) | defined(__DragonFly__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)) && defined(__x86_64__)
-+/* 64 bit Linux or BSD. */
- #include "vpx_config_x86_64-linux-gcc.c"
-
- #elif defined(__sun) && defined(__i386)
diff --git a/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__ppc__netbsd.cpp b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__ppc__netbsd.cpp
new file mode 100644
index 00000000000..58f3eda1310
--- /dev/null
+++ b/mail/thunderbird/patches/patch-mozilla_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__ppc__netbsd.cpp
@@ -0,0 +1,47 @@
+$NetBSD: patch-mozilla_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__ppc__netbsd.cpp,v 1.1 2012/11/23 07:17:54 ryoon Exp $
+
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.orig 2012-11-19 22:42:44.000000000 +0000
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
+@@ -5,9 +5,9 @@
+
+ // Platform specific code to invoke XPCOM methods on native objects
+
+-// The purpose of XPTC_InvokeByIndex() is to map a platform
++// The purpose of NS_InvokeByIndex_P() is to map a platform
+ // indepenpent call to the platform ABI. To do that,
+-// XPTC_InvokeByIndex() has to determine the method to call via vtable
++// NS_InvokeByIndex_P() has to determine the method to call via vtable
+ // access. The parameters for the method are read from the
+ // nsXPTCVariant* and prepared for the native ABI. For the Linux/PPC
+ // ABI this means that the first 8 integral and floating point
+@@ -69,8 +69,10 @@ invoke_copy_to_stack(uint32_t* d,
+ if ((uint32_t) d & 4) d++; // doubles are 8-byte aligned on stack
+ *((double*) d) = s->val.d;
+ d += 2;
++#if __GXX_ABI_VERSION < 100
+ if (gpr < GPR_COUNT)
+ gpr += 2;
++#endif
+ }
+ }
+ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
+@@ -79,8 +81,10 @@ invoke_copy_to_stack(uint32_t* d,
+ else {
+ *((float*) d) = s->val.f;
+ d += 1;
++#if __GXX_ABI_VERSION < 100
+ if (gpr < GPR_COUNT)
+ gpr += 1;
++#endif
+ }
+ }
+ else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
+@@ -107,6 +111,6 @@ invoke_copy_to_stack(uint32_t* d,
+ }
+
+ extern "C"
+-XPTC_PUBLIC_API(nsresult)
+-XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
++EXPORT_XPCOM_API(nsresult)
++NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+ uint32_t paramCount, nsXPTCVariant* params);
diff --git a/mail/thunderbird/patches/patch-xe b/mail/thunderbird/patches/patch-xe
index 088c4e633d8..c567fd29441 100644
--- a/mail/thunderbird/patches/patch-xe
+++ b/mail/thunderbird/patches/patch-xe
@@ -1,8 +1,8 @@
-$NetBSD: patch-xe,v 1.5 2012/09/02 06:43:44 ryoon Exp $
+$NetBSD: patch-xe,v 1.6 2012/11/23 07:17:54 ryoon Exp $
NetBSD/m68k xptcall support code. From pkgsrc/www/firefox/patch-ad.
---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp.orig 2012-08-25 00:31:35.000000000 +0000
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp.orig 2012-11-19 22:42:44.000000000 +0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp
@@ -100,6 +100,15 @@ extern "C" {
}
@@ -18,10 +18,10 @@ NetBSD/m68k xptcall support code. From pkgsrc/www/firefox/patch-ad.
+#endif
+
XPTC_PUBLIC_API(nsresult)
- XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
- PRUint32 paramCount, nsXPTCVariant* params)
-@@ -107,30 +116,30 @@ XPTC_InvokeByIndex(nsISupports* that, PR
- PRUint32 result;
+ XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
+ uint32_t paramCount, nsXPTCVariant* params)
+@@ -107,30 +116,30 @@ XPTC_InvokeByIndex(nsISupports* that, ui
+ uint32_t result;
__asm__ __volatile__(
- "movl %4, sp@-\n\t"
diff --git a/mail/thunderbird/patches/patch-xj b/mail/thunderbird/patches/patch-xj
index 4f50d097fb7..76aafdf1413 100644
--- a/mail/thunderbird/patches/patch-xj
+++ b/mail/thunderbird/patches/patch-xj
@@ -1,8 +1,8 @@
-$NetBSD: patch-xj,v 1.5 2012/09/02 06:43:44 ryoon Exp $
+$NetBSD: patch-xj,v 1.6 2012/11/23 07:17:54 ryoon Exp $
NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp.orig 2012-08-25 00:31:36.000000000 +0000
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp.orig 2012-11-19 22:42:45.000000000 +0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
@@ -6,6 +6,7 @@
// Implement shared vtbl methods.
@@ -18,9 +18,9 @@ NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
nsXPTCMiniVariant* dispatchParams = NULL;
- nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
- PRUint32 paramCount;
- PRUint32 i;
-@@ -44,12 +44,7 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+ uint32_t paramCount;
+ uint32_t i;
+@@ -44,11 +44,7 @@ PrepareAndDispatch(nsXPTCStubBase* self,
NS_ASSERTION(self,"no self");
@@ -29,13 +29,12 @@ NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
- if (! iface_info)
- return NS_ERROR_UNEXPECTED;
-
-- iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
+ iface_info->GetMethodInfo(uint16_t(methodIndex), &info);
NS_ASSERTION(info,"no method info");
if (! info)
- return NS_ERROR_UNEXPECTED;
-@@ -84,8 +79,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
- if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
+@@ -84,8 +80,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+ if ((uint32_t) ap & 4) ap++; // doubles are 8-byte aligned on stack
dp->val.d = *(double*) ap;
ap += 2;
+#if __GXX_ABI_VERSION < 100
@@ -45,7 +44,7 @@ NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
}
continue;
}
-@@ -95,8 +92,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+@@ -95,8 +93,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
else {
dp->val.f = *(float*) ap;
ap += 1;
@@ -56,20 +55,20 @@ NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
}
continue;
}
-@@ -144,9 +143,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+@@ -144,9 +144,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
}
}
-- result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
+- result = self->CallMethod((uint16_t) methodIndex, info, dispatchParams);
-
- NS_RELEASE(iface_info);
+ result = self->mOuter->CallMethod((PRUint16) methodIndex,
-+ info,
-+ dispatchParams);
++ info,
++ dispatchParams);
if (dispatchParams != paramBuffer)
delete [] dispatchParams;
-@@ -160,7 +159,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
+@@ -160,7 +160,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
// however, it's quick, dirty, and'll break when the ABI changes on
// us, which is what we want ;-).
@@ -80,7 +79,7 @@ NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
__asm__ ( \
".section \".text\" \n\t" \
".align 2 \n\t" \
-@@ -171,6 +172,46 @@ __asm__ (
+@@ -171,6 +173,46 @@ __asm__ (
"li 11,"#n" \n\t" \
"b SharedStub@local \n" \
);
diff --git a/mail/thunderbird/patches/patch-xl b/mail/thunderbird/patches/patch-xl
index b43d86e15ae..c1516c0485f 100644
--- a/mail/thunderbird/patches/patch-xl
+++ b/mail/thunderbird/patches/patch-xl
@@ -1,10 +1,10 @@
-$NetBSD: patch-xl,v 1.5 2012/09/02 06:43:44 ryoon Exp $
+$NetBSD: patch-xl,v 1.6 2012/11/23 07:17:54 ryoon Exp $
NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s.orig 2012-08-25 00:31:35.000000000 +0000
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s.orig 2012-11-19 22:42:44.000000000 +0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s
-@@ -20,41 +20,41 @@
+@@ -20,41 +20,42 @@
.section ".text"
.align 2
@@ -12,10 +12,21 @@ NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
- .type XPTC_InvokeByIndex,@function
+ .globl NS_InvokeByIndex_P
+ .type NS_InvokeByIndex_P,@function
++
++//
++// NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
++// PRUint32 paramCount, nsXPTCVariant* params)
++//
++
++NS_InvokeByIndex_P:
++ stwu sp,-32(sp) // setup standard stack frame
++ mflr r0 // save LR
++ stw r3,8(sp) // r3 <= that
++ stw r4,12(sp) // r4 <= methodIndex
-#
--# XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
--# PRUint32 paramCount, nsXPTCVariant* params)
+-# XPTC_InvokeByIndex(nsISupports* that, uint32_t methodIndex,
+-# uint32_t paramCount, nsXPTCVariant* params)
-#
-
-XPTC_InvokeByIndex:
@@ -23,16 +34,6 @@ NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
- mflr r0 # save LR
- stw r3,8(sp) # r3 <= that
- stw r4,12(sp) # r4 <= methodIndex
-+//
-+// NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
-+// PRUint32 paramCount, nsXPTCVariant* params)
-+//
-+
-+NS_InvokeByIndex_P:
-+ stwu sp,-32(sp) // setup standard stack frame
-+ mflr r0 // save LR
-+ stw r3,8(sp) // r3 <= that
-+ stw r4,12(sp) // r4 <= methodIndex
stw r30,16(sp)
stw r31,20(sp)
@@ -71,46 +72,3 @@ NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla.
lfd f2,40(r30)
lfd f3,48(r30)
lfd f4,56(r30)
-@@ -63,18 +63,13 @@ XPTC_InvokeByIndex:
- lfd f7,80(r30)
- lfd f8,88(r30)
-
-- lwz r3,8(r31) # r3 <= that
-- lwz r4,12(r31) # r4 <= methodIndex
-- lwz r5,0(r3) # r5 <= vtable ( == *that )
-- slwi r4,r4,3 # convert to offset ( *= 8 )
-- addi r4,r4,8 # skip first two vtable entries
-- add r4,r4,r5
-- lhz r0,0(r4) # virtual base offset
-- extsh r0,r0
-- add r3,r3,r0
-- lwz r0,4(r4) # r0 <= methodpointer ( == vtable + offset )
-+ lwz r3,8(r31) // r3 <= that
-+ lwz r4,12(r31) // r4 <= methodIndex
-+ lwz r5,0(r3) // r5 <= vtable ( == *that )
-+ slwi r4,r4,2 // convert to offset ( *= 4 )
-+ lwzx r0,r4,r5 // r0 <= methodpointer ( == vtable + offset )
-
-- lwz r4,4(r30) # load GP regs with method parameters
-+ lwz r4,4(r30) // load GP regs with method parameters
- lwz r5,8(r30)
- lwz r6,12(r30)
- lwz r7,16(r30)
-@@ -82,13 +77,13 @@ XPTC_InvokeByIndex:
- lwz r9,24(r30)
- lwz r10,28(r30)
-
-- mtlr r0 # copy methodpointer to LR
-- blrl # call method
-+ mtlr r0 // copy methodpointer to LR
-+ blrl // call method
-
-- lwz r30,16(r31) # restore r30 & r31
-+ lwz r30,16(r31) // restore r30 & r31
- lwz r31,20(r31)
-
-- lwz r11,0(sp) # clean up the stack
-+ lwz r11,0(sp) // clean up the stack
- lwz r0,4(r11)
- mtlr r0
- mr sp,r11