diff options
author | ryoon <ryoon> | 2013-11-13 13:27:45 +0000 |
---|---|---|
committer | ryoon <ryoon> | 2013-11-13 13:27:45 +0000 |
commit | d63ac5ebd091675b8325bd99287605e8e179e63c (patch) | |
tree | 61bf1d18b30ef57e74775aaf3863bd9f2c82c808 /mail/thunderbird17/patches | |
parent | f34641e0e3cd159d979682275b48aaf9e7020eb0 (diff) | |
download | pkgsrc-d63ac5ebd091675b8325bd99287605e8e179e63c.tar.gz |
Import thunderbird17-17.0.10 as mail/thunderbird17.
Mozilla Thunderbird is a redesign of the Mozilla mail component. The
goal is to produce a cross platform stand alone mail application using
the XUL user interface language. This version uses the gtk2 toolkit.
This package tracks 24 ESR release branch.
Diffstat (limited to 'mail/thunderbird17/patches')
115 files changed, 4118 insertions, 0 deletions
diff --git a/mail/thunderbird17/patches/patch-aa b/mail/thunderbird17/patches/patch-aa new file mode 100644 index 00000000000..2528a63d8bb --- /dev/null +++ b/mail/thunderbird17/patches/patch-aa @@ -0,0 +1,96 @@ +$NetBSD: patch-aa,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/configure.in.orig 2013-03-28 18:08:16.000000000 +0000 ++++ mozilla/configure.in +@@ -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 + ;; + *-mingw*) + DSO_CFLAGS= +@@ -2979,6 +2982,9 @@ dnl ==================================== + case $target in + *-hpux11.*) + ;; ++*-dragonfly*) ++ AC_CHECK_LIB(c, gethostbyname_r) ++ ;; + *) + AC_CHECK_LIB(c_r, gethostbyname_r) + ;; +@@ -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);], +@@ -3937,7 +3946,7 @@ AC_CHECK_PROGS(YASM, yasm, "") + if test -n "$YASM"; then + dnl Pull out yasm's version string + changequote(,) +- _YASM_VER_FILTER='s|.* \([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\).*|\1|p' ++ _YASM_VER_FILTER='s|.* \([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\).*|\1|p' + changequote([,]) + + YASM_VERSION=`yasm --version | sed -ne "$_YASM_VER_FILTER"` +@@ -3947,6 +3956,14 @@ if test -n "$YASM"; then + _YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'` + fi + ++if test -n "${LIBXUL_SDK_DIR}"; then ++ AC_MSG_WARN([pkgsrc: LIBXUL_SDK_DIR is set; assuming we want nss and nspr from xulrunner.]) ++ NSPR_CFLAGS="-I${prefix}/include/xulrunner/unstable `pkg-config --cflags mozilla-nspr`" ++ NSPR_LIBS="`pkg-config --libs mozilla-nspr`" ++ NSS_CFLAGS="`pkg-config --cflags mozilla-nss`" ++ NSS_LIBS="`pkg-config --libs mozilla-nss`" ++fi ++ + if test -z "$SKIP_LIBRARY_CHECKS"; then + dnl system JPEG support + dnl ======================================================== +@@ -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 +- Linux:x86) ++ Linux:x86|DragonFly:x86|*BSD:i386) + VPX_ASFLAGS="-f elf32 -rnasm -pnasm" + VPX_X86_ASM=1 + ;; +- Linux:x86_64) ++ Linux:x86_64|DragonFly:x86_64|*BSD:x86_64) + VPX_ASFLAGS="-f elf64 -rnasm -pnasm -DPIC" + VPX_X86_ASM=1 + ;; +@@ -5516,10 +5533,11 @@ dnl ==================================== + + dnl If using sydneyaudio with Linux, ensure that the alsa library is available + if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then +- PKG_CHECK_MODULES(MOZ_ALSA, alsa, , ++ PKG_CHECK_MODULES(MOZ_ALSA, alsa, MOZ_ALSA=1, + [echo "$MOZ_ALSA_PKG_ERRORS" + AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) + fi ++AC_SUBST(MOZ_ALSA) + + dnl ======================================================== + dnl = Enable PulseAudio diff --git a/mail/thunderbird17/patches/patch-aa-toplevel b/mail/thunderbird17/patches/patch-aa-toplevel new file mode 100644 index 00000000000..157b51dd2cc --- /dev/null +++ b/mail/thunderbird17/patches/patch-aa-toplevel @@ -0,0 +1,58 @@ +$NetBSD: patch-aa-toplevel,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- configure.in.orig 2013-03-28 18:07:18.000000000 +0000 ++++ configure.in +@@ -1797,7 +1797,7 @@ ld.]) + 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" +@@ -1805,6 +1805,9 @@ ld.]) + if test ! "$GNU_CC"; then + DSO_LDOPTS="-Bshareable $DSO_LDOPTS" + fi ++ if test "$LIBRUNPATH"; then ++ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS" ++ fi + ;; + + ia64*-hpux*) +@@ -3019,6 +3022,9 @@ dnl ==================================== + case $target in + *-hpux11.*) + ;; ++*-dragonfly*) ++ AC_CHECK_LIB(c, gethostbyname_r) ++ ;; + *) + AC_CHECK_LIB(c_r, gethostbyname_r) + ;; +@@ -3339,6 +3345,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);], +@@ -4990,12 +4999,13 @@ dnl If using sydneyaudio with Linux, ens + if test -n "$MOZ_SYDNEYAUDIO"; then + case "$target_os" in + linux*) +- PKG_CHECK_MODULES(MOZ_ALSA, alsa, , ++ PKG_CHECK_MODULES(MOZ_ALSA, alsa, MOZ_ALSA=1, + [echo "$MOZ_ALSA_PKG_ERRORS" + AC_MSG_ERROR([Need alsa for Ogg or Wave decoding on Linux. Disable with --disable-ogg --disable-wave.])]) + ;; + esac + fi ++AC_SUBST(MOZ_ALSA) + AC_SUBST(MOZ_ALSA_LIBS) + + dnl ======================================================== diff --git a/mail/thunderbird17/patches/patch-ab b/mail/thunderbird17/patches/patch-ab new file mode 100644 index 00000000000..373f6545970 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ab @@ -0,0 +1,22 @@ +$NetBSD: patch-ab,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/nsprpub/pr/include/md/_netbsd.h.orig 2012-08-25 00:31:27.000000000 +0000 ++++ mozilla/nsprpub/pr/include/md/_netbsd.h +@@ -47,7 +47,7 @@ + #define HAVE_DLL + #define USE_DLFCN + #define _PR_HAVE_SOCKADDR_LEN +-#define _PR_NO_LARGE_FILES ++#define _PR_HAVE_LARGE_OFF_T + #define _PR_STAT_HAS_ST_ATIMESPEC + #define _PR_POLL_AVAILABLE + #define _PR_USE_POLL +@@ -75,6 +75,8 @@ + #define JB_SP_INDEX 2 + #elif defined(__mips__) + #define JB_SP_INDEX 4 ++#elif defined(__amd64__) ++#define JB_SP_INDEX 6 + #elif defined(__alpha__) + #define JB_SP_INDEX 34 + #elif defined(__arm32__) diff --git a/mail/thunderbird17/patches/patch-ac b/mail/thunderbird17/patches/patch-ac new file mode 100644 index 00000000000..4e26cdc5472 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ac @@ -0,0 +1,82 @@ +$NetBSD: patch-ac,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/nsprpub/configure.in.orig 2012-08-25 00:31:27.000000000 +0000 ++++ mozilla/nsprpub/configure.in +@@ -36,7 +36,7 @@ OBJDIR_NAME=. + OBJDIR_SUFFIX=OBJ + NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall' + NOSUCHFILE=/no-such-file +-LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)' ++LIBNSPR='-Wl,-R${prefix}/lib/${MOZILLA_PKG_NAME} -L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)' + LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)' + CYGWIN_WRAPPER= + MACOS_SDK_DIR= +@@ -1519,6 +1519,33 @@ tools are selected during the Xcode/Deve + DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' + MDCPUCFG_H=_freebsd.cfg + PR_MD_CSRCS=freebsd.c ++ if test "$LIBRUNPATH"; then ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH" ++ fi ++ ;; ++ ++*-dragonfly*) ++ if test -z "$USE_NSPR_THREADS"; then ++ USE_PTHREADS=1 ++ fi ++ AC_DEFINE(XP_UNIX) ++ AC_DEFINE(HAVE_BSD_FLOCK) ++ AC_DEFINE(HAVE_SOCKLEN_T) ++ CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall" ++ MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` ++ if test "$MOZ_OBJFORMAT" = "elf"; then ++ DLL_SUFFIX=so ++ else ++ DLL_SUFFIX=so.1.0 ++ fi ++ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' ++ DSO_CFLAGS=-fPIC ++ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)' ++ MDCPUCFG_H=_dragonfly.cfg ++ PR_MD_CSRCS=freebsd.c ++ if test "$LIBRUNPATH"; then ++ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH" ++ fi + ;; + + *-hpux*) +@@ -2110,6 +2137,7 @@ mips-nec-sysv*) + AC_DEFINE(XP_UNIX) + AC_DEFINE(NETBSD) + AC_DEFINE(HAVE_BSD_FLOCK) ++ AC_DEFINE(HAVE_SOCKLEN_T) + if test -z "$USE_NSPR_THREADS"; then + USE_PTHREADS=1 + fi +@@ -2918,7 +2946,7 @@ if test -n "$USE_PTHREADS"; then + if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then + ac_cv_have_dash_pthread=yes + case "$target_os" in +- freebsd*) ++ freebsd* | dragonfly*) + # Freebsd doesn't use -pthread for compiles, it uses them for linking + ;; + *) +@@ -2956,7 +2984,7 @@ if test -n "$USE_PTHREADS"; then + _PTHREAD_LDFLAGS= + fi + ;; +- *-freebsd*) ++ *-freebsd* | *-dragonfly*) + AC_DEFINE(_REENTRANT) + AC_DEFINE(_THREAD_SAFE) + dnl -pthread links in -lc_r, so don't specify it explicitly. +@@ -3037,7 +3065,7 @@ case "$target" in + AC_DEFINE(_PR_NEED_PTHREAD_INIT) + fi + ;; +-*-freebsd*) ++*-freebsd* | *-dragonfly*) + if test -n "$USE_NSPR_THREADS"; then + AC_DEFINE(_PR_LOCAL_THREADS_ONLY) + fi diff --git a/mail/thunderbird17/patches/patch-ad b/mail/thunderbird17/patches/patch-ad new file mode 100644 index 00000000000..b2a668f9338 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xpcom/io/nsLocalFileUnix.h.orig 2012-08-25 00:31:35.000000000 +0000 ++++ mozilla/xpcom/io/nsLocalFileUnix.h +@@ -52,7 +52,7 @@ + #endif + + // so we can statfs on freebsd +-#if defined(__FreeBSD__) ++#if defined(__FreeBSD__) || ((defined(__DragonFly__) || defined(__NetBSD__)) && !defined(HAVE_STATVFS)) + #define HAVE_SYS_STATFS_H + #define STATFS statfs + #include <sys/param.h> diff --git a/mail/thunderbird17/patches/patch-ae b/mail/thunderbird17/patches/patch-ae new file mode 100644 index 00000000000..c726ad99b33 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ae @@ -0,0 +1,58 @@ +$NetBSD: patch-ae,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/nsprpub/pr/src/misc/prnetdb.c.orig 2012-08-25 00:31:27.000000000 +0000 ++++ mozilla/nsprpub/pr/src/misc/prnetdb.c +@@ -73,7 +73,7 @@ PRLock *_pr_dnsLock = NULL; + || defined(AIX4_3_PLUS) || (defined(AIX) && defined(_THREAD_SAFE)) \ + || (defined(HPUX10_10) && defined(_REENTRANT)) \ + || (defined(HPUX10_20) && defined(_REENTRANT)) \ +- || defined(OPENBSD) ++ || defined(OPENBSD) || defined(NETBSD) + #define _PR_HAVE_GETPROTO_R + #define _PR_HAVE_GETPROTO_R_INT + #endif +@@ -83,6 +83,11 @@ PRLock *_pr_dnsLock = NULL; + #define _PR_HAVE_5_ARG_GETPROTO_R + #endif + ++#if __DragonFly_version >= 200202 ++#define _PR_HAVE_GETPROTO_R ++#define _PR_HAVE_5_ARG_GETPROTO_R ++#endif ++ + /* BeOS has glibc but not the glibc-style getprotobyxxx_r functions. */ + #if (defined(__GLIBC__) && __GLIBC__ >= 2 && !defined(XP_BEOS)) + #define _PR_HAVE_GETPROTO_R +@@ -300,7 +305,7 @@ _pr_QueryNetIfs(void) + } + + #elif (defined(DARWIN) && defined(HAVE_GETIFADDRS)) || defined(FREEBSD) \ +- || defined(NETBSD) || defined(OPENBSD) ++ || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY) + + /* + * Use the BSD getifaddrs function. +@@ -2044,6 +2049,11 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf + */ + hints.ai_socktype = SOCK_STREAM; + ++/* NetBSD >= 2.99.9 has a thread-safe resolver */ ++#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900 ++ LOCK_DNS(); ++#endif ++ + rv = GETADDRINFO(hostname, NULL, &hints, &res); + #ifdef AI_ADDRCONFIG + if (rv == EAI_BADFLAGS && (hints.ai_flags & AI_ADDRCONFIG)) { +@@ -2051,6 +2061,11 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf + rv = GETADDRINFO(hostname, NULL, &hints, &res); + } + #endif ++ ++#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900 ++ UNLOCK_DNS(); ++#endif ++ + if (rv == 0) + return (PRAddrInfo *) res; + diff --git a/mail/thunderbird17/patches/patch-af b/mail/thunderbird17/patches/patch-af new file mode 100644 index 00000000000..226adf8449a --- /dev/null +++ b/mail/thunderbird17/patches/patch-af @@ -0,0 +1,32 @@ +$NetBSD: patch-af,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/config/mkdepend/imakemdep.h.orig 2012-08-25 00:30:58.000000000 +0000 ++++ mozilla/config/mkdepend/imakemdep.h +@@ -235,7 +235,7 @@ in this Software without prior written a + #ifdef _CRAY + #define DEFAULT_CPP "/lib/pcpp" + #endif +-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) ++#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) + #define DEFAULT_CPP "/usr/libexec/cpp" + #endif + #ifdef MACH +@@ -273,7 +273,7 @@ char *cpp_argv[ARGUMENTS] = { + #ifdef unix + "-Uunix", /* remove unix symbol so that filename unix.c okay */ + #endif +-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(MACH) ++#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(MACH) || defined(__DragonFly__) + # ifdef __i386__ + "-D__i386__", + # endif +@@ -713,6 +713,9 @@ struct symtab predefs[] = { + #ifdef __sgi + {"__sgi", "1"}, + #endif ++#ifdef __DragonFly__ ++ {"__DragonFly__", "1"}, ++#endif + #ifdef __FreeBSD__ + {"__FreeBSD__", "1"}, + #endif diff --git a/mail/thunderbird17/patches/patch-ag b/mail/thunderbird17/patches/patch-ag new file mode 100644 index 00000000000..6bf60edc1f8 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ag @@ -0,0 +1,31 @@ +$NetBSD: patch-ag,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/nsprpub/pr/include/md/_freebsd.h.orig 2012-08-25 00:31:27.000000000 +0000 ++++ mozilla/nsprpub/pr/include/md/_freebsd.h +@@ -47,7 +47,7 @@ + #define _PR_HAVE_LARGE_OFF_T + + #if defined(_PR_PTHREADS) +-#if __FreeBSD_version >= 400008 ++#if defined(__DragonFly__) || __FreeBSD_version >= 400008 + /* + * libc_r before this version of FreeBSD doesn't have poll(). + * Although libc has poll(), it is not thread-safe so we can't +@@ -56,7 +56,7 @@ + #define _PR_POLL_AVAILABLE + #endif + #else +-#if __FreeBSD_version >= 300000 ++#if defined(__DragonFly__) || __FreeBSD_version >= 300000 + #define _PR_POLL_AVAILABLE + #define _PR_USE_POLL + #endif +@@ -65,7 +65,7 @@ + #define _PR_HAVE_SYSV_SEMAPHORES + #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY + +-#if __FreeBSD_version >= 400014 ++#if defined(__DragonFly__) || __FreeBSD_version >= 400014 + #define _PR_INET6 + #define _PR_HAVE_INET_NTOP + #define _PR_HAVE_GETHOSTBYNAME2 diff --git a/mail/thunderbird17/patches/patch-aj b/mail/thunderbird17/patches/patch-aj new file mode 100644 index 00000000000..ad024d9bbf8 --- /dev/null +++ b/mail/thunderbird17/patches/patch-aj @@ -0,0 +1,20 @@ +$NetBSD: patch-aj,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/profile/dirserviceprovider/src/nsProfileLock.cpp.orig 2012-08-25 00:31:27.000000000 +0000 ++++ mozilla/profile/dirserviceprovider/src/nsProfileLock.cpp +@@ -391,6 +391,7 @@ nsresult nsProfileLock::LockWithSymlink( + #endif + sigfillset(&act.sa_mask); + ++#ifndef DEBUG + #define CATCH_SIGNAL(signame) \ + PR_BEGIN_MACRO \ + if (sigaction(signame, NULL, &oldact) == 0 && \ +@@ -409,6 +410,7 @@ PR_BEGIN_MACRO + CATCH_SIGNAL(SIGTERM); + + #undef CATCH_SIGNAL ++#endif + } + } + } diff --git a/mail/thunderbird17/patches/patch-ak b/mail/thunderbird17/patches/patch-ak new file mode 100644 index 00000000000..2e593aad7c8 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ak @@ -0,0 +1,13 @@ +$NetBSD: patch-ak,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/js/src/ctypes/libffi/configure.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/js/src/ctypes/libffi/configure +@@ -11278,7 +11278,7 @@ case "$host" in + powerpc-*-aix* | rs6000-*-aix*) + TARGET=POWERPC_AIX; TARGETDIR=powerpc + ;; +- powerpc-*-freebsd* | powerpc-*-openbsd*) ++ powerpc-*-freebsd* | powerpc-*-openbsd* | powerpc-*-netbsd*) + TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc + ;; + powerpc*-*-rtems*) diff --git a/mail/thunderbird17/patches/patch-al b/mail/thunderbird17/patches/patch-al new file mode 100644 index 00000000000..a1c35a608ce --- /dev/null +++ b/mail/thunderbird17/patches/patch-al @@ -0,0 +1,16 @@ +$NetBSD: patch-al,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/storage/src/mozStorageConnection.cpp.orig 2012-08-25 00:31:30.000000000 +0000 ++++ mozilla/storage/src/mozStorageConnection.cpp +@@ -680,6 +680,11 @@ Connection::initialize(nsIFile *aDatabas + break; + } + ++ // XXX tnn: the configure script demands that sqlite3 is compiled with ++ // SECURE_DELETE on by default. sqlite3 in pkgsrc does not have that, ++ // so instead we enable secure_delete manually here. ++ (void)ExecuteSimpleSQL(NS_LITERAL_CSTRING("PRAGMA secure_delete = 1;")); ++ + return NS_OK; + } + diff --git a/mail/thunderbird17/patches/patch-am b/mail/thunderbird17/patches/patch-am new file mode 100644 index 00000000000..e6fcaad1eb9 --- /dev/null +++ b/mail/thunderbird17/patches/patch-am @@ -0,0 +1,17 @@ +$NetBSD: patch-am,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +SHA1_Update conflicts with openssl which may be dynamically loaded +at runtime via libcups or libgssapi so causing a crash due to using +the wrong binding. So rename here to avoid conflict. + +--- mozilla/security/nss/lib/freebl/blapi.h.orig 2012-08-25 00:31:29.000000000 +0000 ++++ mozilla/security/nss/lib/freebl/blapi.h +@@ -1043,6 +1043,8 @@ extern void SHA1_DestroyContext(SHA1Cont + */ + extern void SHA1_Begin(SHA1Context *cx); + ++#define SHA1_Update NSS_SHA1_Update ++ + /* + ** Update the SHA-1 hash function with more data. + ** "cx" the context diff --git a/mail/thunderbird17/patches/patch-an b/mail/thunderbird17/patches/patch-an new file mode 100644 index 00000000000..bd9914e9682 --- /dev/null +++ b/mail/thunderbird17/patches/patch-an @@ -0,0 +1,48 @@ +$NetBSD: patch-an,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +SHA1_Update conflicts with openssl which may be dynamically loaded +at runtime via libcups or libgssapi so causing a crash due to using +the wrong binding. So rename here to avoid conflict. + +--- mozilla/security/nss/lib/freebl/sha-fast-amd64-sun.s.orig 2012-08-25 00:31:29.000000000 +0000 ++++ mozilla/security/nss/lib/freebl/sha-fast-amd64-sun.s +@@ -1712,9 +1712,9 @@ shaCompress: + .LFE7: + .size shaCompress, .-shaCompress + .align 16 +-.globl SHA1_Update +- .type SHA1_Update, @function +-SHA1_Update: ++.globl NSS_SHA1_Update ++ .type NSS_SHA1_Update, @function ++NSS_SHA1_Update: + .LFB5: + pushq %rbp + .LCFI5: +@@ -1800,7 +1800,7 @@ SHA1_Update: + call shaCompress + jmp .L245 + .LFE5: +- .size SHA1_Update, .-SHA1_Update ++ .size NSS_SHA1_Update, .-NSS_SHA1_Update + .section .rodata + .align 32 + .type bulk_pad.0, @object +@@ -1902,7 +1902,7 @@ SHA1_End: + subl %r8d, %edx + andl $63, %edx + incl %edx +- call SHA1_Update@PLT ++ call NSS_SHA1_Update@PLT + movq %rbx, %rdi + movq %r12, %rsi + shrq $32, %rdi +@@ -2018,7 +2018,7 @@ SHA1_HashBuf: + movl %r12d, %edx + movq %r13, %rsi + movq %rbx, %rdi +- call SHA1_Update@PLT ++ call NSS_SHA1_Update@PLT + leaq -292(%rbp), %rdx + movq %r14, %rsi + movq %rbx, %rdi diff --git a/mail/thunderbird17/patches/patch-ao b/mail/thunderbird17/patches/patch-ao new file mode 100644 index 00000000000..03b15ed5113 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ao @@ -0,0 +1,15 @@ +$NetBSD: patch-ao,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/toolkit/mozapps/installer/packager.mk.orig 2012-08-25 00:31:33.000000000 +0000 ++++ mozilla/toolkit/mozapps/installer/packager.mk +@@ -905,8 +905,8 @@ endif + (cd $(DIST)/$(MOZ_PKG_DIR) && tar $(TAR_CREATE_FLAGS) - .) | \ + (cd $(DESTDIR)$(installdir) && tar -xf -) + $(NSINSTALL) -D $(DESTDIR)$(bindir) +- $(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME) +- ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir) ++ $(RM) -f $(DESTDIR)$(bindir)/$(MOZILLA_PKG_NAME) ++ ln -s $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir)/$(MOZILLA_PKG_NAME) + ifdef INSTALL_SDK # Here comes the hard part + $(NSINSTALL) -D $(DESTDIR)$(includedir) + (cd $(DIST)/include && tar $(TAR_CREATE_FLAGS) - .) | \ diff --git a/mail/thunderbird17/patches/patch-as b/mail/thunderbird17/patches/patch-as new file mode 100644 index 00000000000..12a44deab18 --- /dev/null +++ b/mail/thunderbird17/patches/patch-as @@ -0,0 +1,24 @@ +$NetBSD: patch-as,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +Treat DragonFly like FreeBSD. + +--- mozilla/js/src/configure.in.orig 2012-11-19 22:42:22.000000000 +0000 ++++ mozilla/js/src/configure.in +@@ -2701,7 +2701,7 @@ then + fi + + case "$target" in +- *-*-freebsd*) ++ *-*-freebsd*|*-dragonfly*) + AC_DEFINE(_REENTRANT) + AC_DEFINE(_THREAD_SAFE) + 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) + ;; +- *-*freebsd*) ++ *-*freebsd*|*-*dragonfly*) + AC_DEFINE(MOZ_MEMORY_BSD) + ;; + *-android*|*-linuxandroid*) diff --git a/mail/thunderbird17/patches/patch-at b/mail/thunderbird17/patches/patch-at new file mode 100644 index 00000000000..e12839e3ae8 --- /dev/null +++ b/mail/thunderbird17/patches/patch-at @@ -0,0 +1,13 @@ +$NetBSD: patch-at,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/gfx/qcms/qcmstypes.h.orig 2012-08-25 00:31:09.000000000 +0000 ++++ mozilla/gfx/qcms/qcmstypes.h +@@ -10,6 +10,8 @@ + #if defined (__SVR4) && defined (__sun) + /* int_types.h gets included somehow, so avoid redefining the types differently */ + #include <sys/int_types.h> ++#elif defined(__NetBSD__) || defined(__DragonFly__) || defined(__FreeBSD__) ++#include <stdint.h> + #elif defined (_AIX) + #include <sys/types.h> + #elif defined(__OpenBSD__) diff --git a/mail/thunderbird17/patches/patch-au b/mail/thunderbird17/patches/patch-au new file mode 100644 index 00000000000..d2c0abbb258 --- /dev/null +++ b/mail/thunderbird17/patches/patch-au @@ -0,0 +1,30 @@ +$NetBSD: patch-au,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +- Fix device name on NetBSD +- SOUND_VERSION just isn't a reliable way to detect features supported by + particular OSS implementation. + +--- mozilla/media/libsydneyaudio/src/sydney_audio_oss.c.orig 2012-08-25 00:31:24.000000000 +0000 ++++ mozilla/media/libsydneyaudio/src/sydney_audio_oss.c +@@ -23,7 +23,7 @@ + // support only versions newer than 3.6.1 + #define SUPP_OSS_VERSION OSS_VERSION(3,0,1) + +-#if (SOUND_VERSION < SUPP_OSS_VERSION) ++#if 0 // (SOUND_VERSION < SUPP_OSS_VERSION) + #error Unsupported OSS Version + #else + +@@ -173,7 +173,12 @@ sa_stream_create_pcm( + return SA_ERROR_SYSTEM; + } + ++#if defined(__NetBSD__) ++ /* XXX should use DEVOSSAUDIO provided by pkgsrc. */ ++ s->output_unit = "/dev/audio"; ++#else + s->output_unit = "/dev/dsp"; ++#endif + s->output_fd = -1; + s->thread_id = 0; + s->playing = 0; diff --git a/mail/thunderbird17/patches/patch-av b/mail/thunderbird17/patches/patch-av new file mode 100644 index 00000000000..d6f82c43f12 --- /dev/null +++ b/mail/thunderbird17/patches/patch-av @@ -0,0 +1,40 @@ +$NetBSD: patch-av,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xulrunner/app/nsXULRunnerApp.cpp.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xulrunner/app/nsXULRunnerApp.cpp +@@ -6,6 +6,27 @@ + #include "nsXPCOMGlue.h" + #include <stdio.h> + #include <stdlib.h> ++#include <sys/resource.h> ++/* ++ * On netbsd-4, ulimit -n is 64 by default; too few for us. ++ */ ++static void netbsd_fixrlimit(void) { ++ struct rlimit rlp; ++ if (getrlimit(RLIMIT_NOFILE, &rlp) == -1) { ++ fprintf(stderr, "warning: getrlimit failed\n"); ++ return; ++ } ++ if (rlp.rlim_cur >= 512) ++ return; ++ if (rlp.rlim_max < 512) { ++ fprintf(stderr, "warning: hard limit of 'ulimit -n' too low\n"); ++ rlp.rlim_cur = rlp.rlim_max; ++ } ++ else ++ rlp.rlim_cur = 512; ++ if (setrlimit(RLIMIT_NOFILE, &rlp) == -1) ++ fprintf(stderr, "warning: setrlimit failed\n"); ++} + #ifdef XP_WIN + #include <windows.h> + #define snprintf _snprintf +@@ -251,6 +272,7 @@ private: + + int main(int argc, char* argv[]) + { ++ netbsd_fixrlimit(); + char exePath[MAXPATHLEN]; + nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); + if (NS_FAILED(rv)) { diff --git a/mail/thunderbird17/patches/patch-aw b/mail/thunderbird17/patches/patch-aw new file mode 100644 index 00000000000..be3901a2838 --- /dev/null +++ b/mail/thunderbird17/patches/patch-aw @@ -0,0 +1,34 @@ +$NetBSD: patch-aw,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- 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" + + #include <stdarg.h> ++#if defined(__NetBSD__) ++#include <sys/resource.h> ++/* ++ * On netbsd-4, ulimit -n is 64 by default; too few for us. ++ */ ++static void netbsd_fixrlimit(void) { ++ struct rlimit rlp; ++ if (getrlimit(RLIMIT_NOFILE, &rlp) == -1) { ++ fprintf(stderr, "warning: getrlimit failed\n"); ++ return; ++ } ++ if (rlp.rlim_cur >= 512) ++ return; ++ if (rlp.rlim_max < 512) { ++ fprintf(stderr, "warning: hard limit of 'ulimit -n' too low\n"); ++ rlp.rlim_cur = rlp.rlim_max; ++ } ++ else ++ rlp.rlim_cur = 512; ++ if (setrlimit(RLIMIT_NOFILE, &rlp) == -1) ++ fprintf(stderr, "warning: setrlimit failed\n"); ++} ++#endif + + #ifdef XP_WIN + #include <windows.h> diff --git a/mail/thunderbird17/patches/patch-ax b/mail/thunderbird17/patches/patch-ax new file mode 100644 index 00000000000..f5b9a274514 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ax @@ -0,0 +1,13 @@ +$NetBSD: patch-ax,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xpcom/base/nsStackWalk.cpp.orig 2012-08-25 00:31:35.000000000 +0000 ++++ mozilla/xpcom/base/nsStackWalk.cpp +@@ -23,7 +23,7 @@ struct CriticalAddress { + }; + static CriticalAddress gCriticalAddress; + +-#if defined(HAVE_DLOPEN) || defined(XP_MACOSX) ++#if defined(HAVE_DLOPEN) || defined(XP_MACOSX) || defined(__NetBSD__) + #include <dlfcn.h> + #endif + diff --git a/mail/thunderbird17/patches/patch-ay b/mail/thunderbird17/patches/patch-ay new file mode 100644 index 00000000000..a69e47ad9eb --- /dev/null +++ b/mail/thunderbird17/patches/patch-ay @@ -0,0 +1,46 @@ +$NetBSD: patch-ay,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/browser/app/nsBrowserApp.cpp.orig 2012-08-25 00:30:56.000000000 +0000 ++++ mozilla/browser/app/nsBrowserApp.cpp +@@ -14,6 +14,31 @@ + #include <sys/resource.h> + #endif + ++#include <sys/resource.h> ++ ++#ifdef __NetBSD__ ++/* ++ * On netbsd-4, ulimit -n is 64 by default; too few for us. ++ */ ++static void netbsd_fixrlimit(void) { ++ struct rlimit rlp; ++ if (getrlimit(RLIMIT_NOFILE, &rlp) == -1) { ++ fprintf(stderr, "warning: getrlimit failed\n"); ++ return; ++ } ++ if (rlp.rlim_cur >= 512) ++ return; ++ if (rlp.rlim_max < 512) { ++ fprintf(stderr, "warning: hard limit of 'ulimit -n' too low\n"); ++ rlp.rlim_cur = rlp.rlim_max; ++ } ++ else ++ rlp.rlim_cur = 512; ++ if (setrlimit(RLIMIT_NOFILE, &rlp) == -1) ++ fprintf(stderr, "warning: setrlimit failed\n"); ++} ++#endif ++ + #ifdef XP_MACOSX + #include "MacQuirks.h" + #endif +@@ -196,6 +221,9 @@ int main(int argc, char* argv[]) + #ifdef XP_MACOSX + TriggerQuirks(); + #endif ++#ifdef __NetBSD__ ++ netbsd_fixrlimit(); ++#endif + + nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); + if (NS_FAILED(rv)) { diff --git a/mail/thunderbird17/patches/patch-az b/mail/thunderbird17/patches/patch-az new file mode 100644 index 00000000000..2b0d688c014 --- /dev/null +++ b/mail/thunderbird17/patches/patch-az @@ -0,0 +1,19 @@ +$NetBSD: patch-az,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/nsprpub/pr/src/pthreads/ptthread.c.orig 2012-08-25 00:31:27.000000000 +0000 ++++ mozilla/nsprpub/pr/src/pthreads/ptthread.c +@@ -1038,12 +1038,12 @@ PR_IMPLEMENT(void) PR_ProcessExit(PRIntn + _exit(status); + } + +-PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred) ++PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred) + { + #if defined(_PR_DCETHREADS) + return (PRUint32)&thred->id; /* this is really a sham! */ + #else +- return (PRUint32)thred->id; /* and I don't know what they will do with it */ ++ return thred->id; /* and I don't know what they will do with it */ + #endif + } + diff --git a/mail/thunderbird17/patches/patch-ba b/mail/thunderbird17/patches/patch-ba new file mode 100644 index 00000000000..cb20c2679f2 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ba @@ -0,0 +1,24 @@ +$NetBSD: patch-ba,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +pthread_t may be 64-bit, avoid casting it. + +--- mozilla/nsprpub/pr/include/private/pprthred.h.orig 2012-08-25 00:31:27.000000000 +0000 ++++ mozilla/nsprpub/pr/include/private/pprthred.h +@@ -19,6 +19,8 @@ + #include <os2.h> + #endif + ++#include <pthread.h> ++ + PR_BEGIN_EXTERN_C + + /*--------------------------------------------------------------------------- +@@ -59,7 +61,7 @@ NSPR_API(void) PR_DetachThread(void); + ** Get the id of the named thread. Each thread is assigned a unique id + ** when it is created or attached. + */ +-NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread); ++NSPR_API(pthread_t) PR_GetThreadID(PRThread *thread); + + /* + ** Set the procedure that is called when a thread is dumped. The procedure diff --git a/mail/thunderbird17/patches/patch-bd b/mail/thunderbird17/patches/patch-bd new file mode 100644 index 00000000000..2f6c0f3ad44 --- /dev/null +++ b/mail/thunderbird17/patches/patch-bd @@ -0,0 +1,28 @@ +$NetBSD: patch-bd,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/js/src/ctypes/CTypes.cpp.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/js/src/ctypes/CTypes.cpp +@@ -5,6 +5,23 @@ + + #include "mozilla/FloatingPoint.h" + ++#if defined(__NetBSD__) ++#include <stdint.h> ++/* XXX why do we have those funky __ #defines in stdint.h? */ ++#warning this is a retarded workaround ++#define uint8_t uint8_t ++#define uint16_t uint16_t ++#define uint32_t uint32_t ++#define uint64_t uint64_t ++#define int8_t int8_t ++#define int16_t int16_t ++#define int32_t int32_t ++#define int64_t int64_t ++#define intptr_t intptr_t ++#define uintptr_t uintptr_t ++#define off_t off_t ++#endif ++ + #include "CTypes.h" + #include "Library.h" + #include "jsnum.h" diff --git a/mail/thunderbird17/patches/patch-bf b/mail/thunderbird17/patches/patch-bf new file mode 100644 index 00000000000..b2229bd488d --- /dev/null +++ b/mail/thunderbird17/patches/patch-bf @@ -0,0 +1,31 @@ +$NetBSD: patch-bf,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/js/src/jsnativestack.cpp.orig 2012-08-25 00:31:13.000000000 +0000 ++++ mozilla/js/src/jsnativestack.cpp +@@ -19,10 +19,16 @@ + #elif defined(XP_MACOSX) || defined(DARWIN) || defined(XP_UNIX) + # include <pthread.h> + +-# if defined(__FreeBSD__) || defined(__OpenBSD__) ++# if defined(__OpenBSD__) || defined(__DragonFly__) + # include <pthread_np.h> + # endif + ++# if defined(__FreeBSD__) ++_Pragma("GCC visibility push(default)") ++# include <pthread_np.h> ++_Pragma("GCC visibility pop") ++# endif ++ + #else + # error "Unsupported platform" + +@@ -114,7 +120,7 @@ GetNativeStackBaseImpl() + pthread_attr_init(&sattr); + # if defined(__OpenBSD__) + stack_t ss; +-# elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(NETBSD) ++# elif defined(PTHREAD_NP_H) || defined(_PTHREAD_NP_H_) || defined(__DragonFly__) || defined(NETBSD) || defined(__NetBSD__) /* XXX tnn not sure why NETBSD isn't defined, it looks like it should be ... */ + /* e.g. on FreeBSD 4.8 or newer, neundorf@kde.org */ + pthread_attr_get_np(thread, &sattr); + # else diff --git a/mail/thunderbird17/patches/patch-bg b/mail/thunderbird17/patches/patch-bg new file mode 100644 index 00000000000..5865e7aa5c6 --- /dev/null +++ b/mail/thunderbird17/patches/patch-bg @@ -0,0 +1,24 @@ +$NetBSD: patch-bg,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/storage/src/SQLiteMutex.h.orig 2012-08-25 00:31:30.000000000 +0000 ++++ mozilla/storage/src/SQLiteMutex.h +@@ -108,15 +108,19 @@ public: + void assertCurrentThreadOwns() + { + NS_ASSERTION(mMutex, "No mutex associated with this wrapper!"); ++#if 0 /* XXX tnn: this breaks the debug build. */ + NS_ASSERTION(sqlite3_mutex_held(mMutex), + "Mutex is not held, but we expect it to be!"); ++#endif + } + + void assertNotCurrentThreadOwns() + { + NS_ASSERTION(mMutex, "No mutex associated with this wrapper!"); ++#if 0 /* XXX tnn: this breaks the debug build. */ + NS_ASSERTION(sqlite3_mutex_notheld(mMutex), + "Mutex is held, but we expect it to not be!"); ++#endif + } + #endif // ifndef DEBUG + diff --git a/mail/thunderbird17/patches/patch-bi b/mail/thunderbird17/patches/patch-bi new file mode 100644 index 00000000000..8708dd1dcf4 --- /dev/null +++ b/mail/thunderbird17/patches/patch-bi @@ -0,0 +1,12 @@ +$NetBSD: patch-bi,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- 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 + #elif defined(__APPLE__) || defined(__linux__) || \ + defined(__FreeBSD__) || defined(__OpenBSD__) || \ ++ defined(__NetBSD__) || defined(__DragonFly__) || \ + defined(__sun) || defined(ANDROID) || \ + defined(__GLIBC__) || defined(__GNU__) || \ + defined(__QNX__) diff --git a/mail/thunderbird17/patches/patch-config_baseconfig.mk b/mail/thunderbird17/patches/patch-config_baseconfig.mk new file mode 100644 index 00000000000..c4029cc108c --- /dev/null +++ b/mail/thunderbird17/patches/patch-config_baseconfig.mk @@ -0,0 +1,18 @@ +$NetBSD: patch-config_baseconfig.mk,v 1.1 2013/11/13 13:27:45 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/thunderbird17/patches/patch-directory_c-sdk_ldap_include_portable.h b/mail/thunderbird17/patches/patch-directory_c-sdk_ldap_include_portable.h new file mode 100644 index 00000000000..314a1df1505 --- /dev/null +++ b/mail/thunderbird17/patches/patch-directory_c-sdk_ldap_include_portable.h @@ -0,0 +1,17 @@ +$NetBSD: patch-directory_c-sdk_ldap_include_portable.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- ldap/sdks/c-sdk/ldap/include/portable.h.orig 2012-08-25 00:31:56.000000000 +0000 ++++ ldap/sdks/c-sdk/ldap/include/portable.h +@@ -122,8 +122,11 @@ + * some systems don't have the BSD re_comp and re_exec routines + */ + #ifndef NEED_BSDREGEX +-#if ( defined( SYSV ) || defined( NETBSD ) || defined( FREEBSD ) || defined(__OpenBSD__) || defined( linux ) || defined( DARWIN )) && !defined(sgi) ++#if ( defined( SYSV ) || defined( NETBSD ) || defined(DRAGONFLY) || defined( FREEBSD ) || defined(__OpenBSD__) || defined( linux ) || defined( DARWIN )) && !defined(sgi) + #define NEED_BSDREGEX ++/* there are conflicting prototypes in unistd.h on DragonFly */ ++#define re_comp ldap_compat_re_comp ++#define re_exec ldap_compat_re_exec + #endif + #endif + diff --git a/mail/thunderbird17/patches/patch-ipc_chromium_src_base_debug__util__posic.cc b/mail/thunderbird17/patches/patch-ipc_chromium_src_base_debug__util__posic.cc new file mode 100644 index 00000000000..914a40c5496 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ipc_chromium_src_base_debug__util__posic.cc @@ -0,0 +1,80 @@ +$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-11-19 22:42:22.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/debug_util_posix.cc +@@ -5,7 +5,7 @@ + #include "build/build_config.h" + #include "base/debug_util.h" + +-#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__)) ++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) + + #include <errno.h> + #include <fcntl.h> +@@ -17,9 +17,16 @@ + #include <unistd.h> + #if MOZ_HAVE_EXECINFO_H + #include <execinfo.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> ++#endif ++ + #include "base/basictypes.h" + #include "base/eintr_wrapper.h" + #include "base/logging.h" +@@ -32,7 +39,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u + return false; + } + +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_BSD) + + // Based on Apple's recommended method as described in + // http://developer.apple.com/qa/qa2004/qa1361.html +@@ -51,14 +58,22 @@ bool DebugUtil::BeingDebugged() { + // we're looking for information about a specific process ID. + int mib[] = { + CTL_KERN, ++#if defined(OS_NETBSD) ++ KERN_PROC2, ++#else + KERN_PROC, ++#endif + KERN_PROC_PID, + getpid() + }; + + // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and + // binary interfaces may change. ++#if defined(OS_NETBSD) ++ struct kinfo_proc2 info; ++#else + struct kinfo_proc info; ++#endif + size_t info_size = sizeof(info); + + int sysctl_result = sysctl(mib, arraysize(mib), &info, &info_size, NULL, 0); +@@ -71,7 +86,17 @@ bool DebugUtil::BeingDebugged() { + + // This process is being debugged if the P_TRACED flag is set. + is_set = true; ++#if defined(OS_DRAGONFLY) ++ 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; ++#elif defined(OS_NETBSD) ++ being_debugged = (info.p_flag & P_TRACED) != 0; ++#else + being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; ++#endif + return being_debugged; + } + diff --git a/mail/thunderbird17/patches/patch-ipc_chromium_src_base_file__util__posix.cc b/mail/thunderbird17/patches/patch-ipc_chromium_src_base_file__util__posix.cc new file mode 100644 index 00000000000..c6313d0b312 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ipc_chromium_src_base_file__util__posix.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2013-06-20 16:39:04.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_posix.cc +@@ -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 HAVE_STAT64 + #define stat64 stat + #endif + +@@ -392,7 +392,7 @@ bool CreateTemporaryFileName(FilePath* p + FILE* CreateAndOpenTemporaryShmemFile(FilePath* path) { + FilePath directory; + if (!GetShmemTempDir(&directory)) +- return false; ++ return NULL; + + return CreateAndOpenTemporaryFileInDir(directory, path); + } diff --git a/mail/thunderbird17/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc b/mail/thunderbird17/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc new file mode 100644 index 00000000000..0013138f908 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc @@ -0,0 +1,74 @@ +$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- 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,30 @@ + + #if defined(OS_MACOSX) + #include <mach/mach.h> ++#elif defined(OS_NETBSD) ++#include <lwp.h> + #elif defined(OS_LINUX) + #include <sys/syscall.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 *); ++_Pragma("GCC visibility pop") + #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) + namespace base { + void InitThreading(); +@@ -38,9 +52,20 @@ PlatformThreadId PlatformThread::Current + // into the kernel. + #if defined(OS_MACOSX) + return mach_thread_self(); +-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +- // TODO(BSD): find a better thread ID +- return (intptr_t)(pthread_self()); ++#elif defined(OS_NETBSD) ++ return _lwp_self(); ++#elif defined(OS_DRAGONFLY) ++ return lwp_gettid(); ++#elif defined(OS_FREEBSD) ++# if __FreeBSD_version > 900030 ++ return pthread_getthreadid_np(); ++# else ++ long lwpid; ++ thr_self(&lwpid); ++ return lwpid; ++# endif ++#elif defined(OS_OPENBSD) ++ return (intptr_t) (pthread_self()); + #elif defined(OS_LINUX) + return syscall(__NR_gettid); + #endif +@@ -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. +-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) ++#if defined(OS_BSD) && !defined(OS_NETBSD) + pthread_set_name_np(pthread_self(), name); +-#elif defined(__NetBSD__) ++#elif defined(OS_NETBSD) + pthread_setname_np(pthread_self(), "%s", (void *)name); + #else + prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0); diff --git a/mail/thunderbird17/patches/patch-ipc_chromium_src_base_sys__info__posix.cc b/mail/thunderbird17/patches/patch-ipc_chromium_src_base_sys__info__posix.cc new file mode 100644 index 00000000000..0c44f9434f9 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ipc_chromium_src_base_sys__info__posix.cc @@ -0,0 +1,49 @@ +$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/sys_info_posix.cc +@@ -18,6 +18,11 @@ + #include <mach/mach_init.h> + #endif + ++#if defined(OS_NETBSD) ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#endif ++ + #include "base/logging.h" + #include "base/string_util.h" + +@@ -26,7 +31,11 @@ namespace base { + int SysInfo::NumberOfProcessors() { + // It seems that sysconf returns the number of "logical" processors on both + // mac and linux. So we get the number of "online logical" processors. ++#ifdef _SC_NPROCESSORS_ONLN + static long res = sysconf(_SC_NPROCESSORS_ONLN); ++#else ++ static long res = 1; ++#endif + if (res == -1) { + NOTREACHED(); + return 1; +@@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() + } + + return static_cast<int64>(hostinfo.max_mem); ++#elif defined(OS_NETBSD) ++ int mib[2]; ++ int rc; ++ int64_t memSize; ++ size_t len = sizeof(memSize); ++ ++ mib[0] = CTL_HW; ++ mib[1] = HW_PHYSMEM64; ++ rc = sysctl( mib, 2, &memSize, &len, NULL, 0 ); ++ if (-1 != rc) { ++ return memSize; ++ } ++ return 0; ++ + #else + long pages = sysconf(_SC_PHYS_PAGES); + long page_size = sysconf(_SC_PAGE_SIZE); diff --git a/mail/thunderbird17/patches/patch-ipc_chromium_src_build_build__config.h b/mail/thunderbird17/patches/patch-ipc_chromium_src_build_build__config.h new file mode 100644 index 00000000000..82adefad3ff --- /dev/null +++ b/mail/thunderbird17/patches/patch-ipc_chromium_src_build_build__config.h @@ -0,0 +1,35 @@ +$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/build/build_config.h +@@ -19,6 +19,12 @@ + #define OS_MACOSX 1 + #elif defined(__linux__) || defined(ANDROID) + #define OS_LINUX 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) +@@ -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) ++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) + #define OS_POSIX 1 + #endif + diff --git a/mail/thunderbird17/patches/patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h b/mail/thunderbird17/patches/patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h new file mode 100644 index 00000000000..cd2816eadff --- /dev/null +++ b/mail/thunderbird17/patches/patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h @@ -0,0 +1,13 @@ +$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h +@@ -95,7 +95,7 @@ class Channel::ChannelImpl : public Mess + }; + + // This is a control message buffer large enough to hold kMaxReadFDs +-#if defined(OS_MACOSX) ++#if defined(OS_MACOSX) || defined(OS_NETBSD) + // TODO(agl): OSX appears to have non-constant CMSG macros! + char input_cmsg_buf_[1024]; + #else diff --git a/mail/thunderbird17/patches/patch-ipc_glue_GeckoChildProcessHost.cpp b/mail/thunderbird17/patches/patch-ipc_glue_GeckoChildProcessHost.cpp new file mode 100644 index 00000000000..bbf54d732ac --- /dev/null +++ b/mail/thunderbird17/patches/patch-ipc_glue_GeckoChildProcessHost.cpp @@ -0,0 +1,56 @@ +$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2012-11-19 22:42:22.000000000 +0000 ++++ mozilla/ipc/glue/GeckoChildProcessHost.cpp +@@ -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; + base::ChildPrivileges privs = kLowRightsSubprocesses ? + base::UNPRIVILEGED : +@@ -455,8 +461,8 @@ GeckoChildProcessHost::PerformAsyncLaunc + if (NS_SUCCEEDED(rv)) { + nsCString path; + greDir->GetNativePath(path); +-# ifdef OS_LINUX +-# ifdef MOZ_WIDGET_ANDROID ++# if defined(OS_LINUX) || defined(OS_BSD) ++# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD) + path += "/lib"; + # endif // MOZ_WIDGET_ANDROID + const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); +@@ -575,7 +581,7 @@ GeckoChildProcessHost::PerformAsyncLaunc + childArgv.push_back(pidstring); + + #if defined(MOZ_CRASHREPORTER) +-# if defined(OS_LINUX) ++# if defined(OS_LINUX) || defined(OS_BSD) + int childCrashFd, childCrashRemapFd; + if (!CrashReporter::CreateNotificationPipeForChild( + &childCrashFd, &childCrashRemapFd)) +@@ -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, privs, + #endif + false, &process, arch); diff --git a/mail/thunderbird17/patches/patch-js_src_jscpucfg.h b/mail/thunderbird17/patches/patch-js_src_jscpucfg.h new file mode 100644 index 00000000000..8597588ed4f --- /dev/null +++ b/mail/thunderbird17/patches/patch-js_src_jscpucfg.h @@ -0,0 +1,27 @@ +$NetBSD: patch-js_src_jscpucfg.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + + +--- mozilla/js/src/jscpucfg.h.orig 2012-08-25 00:31:12.000000000 +0000 ++++ mozilla/js/src/jscpucfg.h +@@ -44,6 +44,21 @@ + # define IS_BIG_ENDIAN 1 + # endif + ++#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__MirBSD__) || defined(__DragonFly__) ++#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 ++#else /* !defined(_BYTE_ORDER) */ ++#error "sys/endian.h does not define _BYTE_ORDER. Cannot determine endianness." ++#endif ++ + #elif defined(JS_HAVE_ENDIAN_H) + # include <endian.h> + diff --git a/mail/thunderbird17/patches/patch-ldap_sdks_c-sdk_build.mk b/mail/thunderbird17/patches/patch-ldap_sdks_c-sdk_build.mk new file mode 100644 index 00000000000..a822c834aa7 --- /dev/null +++ b/mail/thunderbird17/patches/patch-ldap_sdks_c-sdk_build.mk @@ -0,0 +1,39 @@ +$NetBSD: patch-ldap_sdks_c-sdk_build.mk,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- ldap/sdks/c-sdk/build.mk.orig 2012-08-25 00:31:56.000000000 +0000 ++++ ldap/sdks/c-sdk/build.mk +@@ -488,21 +488,21 @@ LINK_LIB = $(RM) $@; $(AR) $(AR_F + LINK_LIB2 = $(RM) $@; $(AR) $@ $(OBJS2); $(RANLIB) $@ + ifneq ($(LD),$(CC)) + ifdef SONAMEFLAG_PREFIX +-LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \ ++LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS) \ + $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \ + -o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS) + else # SONAMEFLAG_PREFIX +-LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \ ++LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS) \ + $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \ + -o $@ $(OBJS) + endif # SONAMEFLAG_PREFIX + else # $(CC) is used to link libs + ifdef SONAMEFLAG_PREFIX +-LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \ ++LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS) \ + $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \ + -o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS) + else # SONAMEFLAG_PREFIX +-LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \ ++LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS) \ + $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \ + -o $@ $(OBJS) + endif # SONAMEFLAG_PREFIX +@@ -517,7 +517,7 @@ SO_FILES_TO_REMOVE=so_locations + endif + + ifneq (,$(filter BeOS Darwin NetBSD,$(OS_ARCH))) +-LINK_DLL = $(MKSHLIB) $(OBJS) ++LINK_DLL = $(MKSHLIB) $(OBJS) $(OS_LDFLAGS) + endif + + ifeq ($(OS_ARCH), HP-UX) diff --git a/mail/thunderbird17/patches/patch-mailnews_base_search_src_nsMsgSearchTerm.cpp b/mail/thunderbird17/patches/patch-mailnews_base_search_src_nsMsgSearchTerm.cpp new file mode 100644 index 00000000000..48705f02a4c --- /dev/null +++ b/mail/thunderbird17/patches/patch-mailnews_base_search_src_nsMsgSearchTerm.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-mailnews_base_search_src_nsMsgSearchTerm.cpp,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mailnews/base/search/src/nsMsgSearchTerm.cpp.orig 2013-07-12 15:29:22.000000000 +0000 ++++ mailnews/base/search/src/nsMsgSearchTerm.cpp +@@ -197,7 +197,7 @@ nsresult NS_MsgGetStringForAttribute(int + } + } + if (!found) +- *string = '\0'; // don't leave the string uninitialized ++ *string = NULL; // don't leave the string uninitialized + + // we no longer return invalid attribute. If we cannot find the string in the table, + // then it is an arbitrary header. Return success regardless if found or not diff --git a/mail/thunderbird17/patches/patch-mb b/mail/thunderbird17/patches/patch-mb new file mode 100644 index 00000000000..39c2379884d --- /dev/null +++ b/mail/thunderbird17/patches/patch-mb @@ -0,0 +1,79 @@ +$NetBSD: patch-mb,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2012-08-25 00:31:35.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in +@@ -50,7 +50,7 @@ endif + endif + endif + +-ifneq (,$(filter NetBSD OpenBSD BSD_OS GNU,$(OS_ARCH))) ++ifneq (,$(filter BSD_OS GNU,$(OS_ARCH))) + ifeq (86,$(findstring 86,$(OS_TEST))) + CPPSRCS := xptcinvoke_gcc_x86_unix.cpp xptcstubs_gcc_x86_unix.cpp + endif +@@ -59,7 +59,7 @@ endif + # New code for Linux, et. al., with gcc + # Migrate other platforms here after testing + # +-ifneq (,$(filter Linux FreeBSD GNU_%,$(OS_ARCH))) ++ifneq (,$(filter Linux FreeBSD DragonFly NetBSD OpenBSD GNU_%,$(OS_ARCH))) + # Linux/x86-64 + ifeq (x86_64,$(OS_TEST)) + CPPSRCS := xptcinvoke_x86_64_unix.cpp xptcstubs_x86_64_linux.cpp +@@ -77,12 +77,6 @@ ASFILES := xptcstubs_asm_ipf64.s xptcin + endif + endif + # +-# OpenBSD/amd64 +-# +-ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDx86_64) +-CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp +-endif +-# + # Neutrino/Intel (uses the same unixish_x86 code) + # + ifeq ($(OS_TARGET),NTO) +@@ -158,7 +152,7 @@ endif + # NetBSD/ARM + # + ifeq ($(OS_ARCH),NetBSD) +-ifneq (,$(filter arm% sa110,$(OS_TEST))) ++ifneq (,$(filter arm%,$(TARGET_CPU))) + CPPSRCS := xptcinvoke_arm_netbsd.cpp xptcstubs_arm_netbsd.cpp + endif + endif +@@ -215,7 +209,7 @@ endif + # NetBSD/m68k + # + ifeq ($(OS_ARCH),NetBSD) +-ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST))) ++ifneq (,$(filter m68k,$(TARGET_CPU))) + CPPSRCS := xptcinvoke_netbsd_m68k.cpp xptcstubs_netbsd_m68k.cpp + endif + endif +@@ -287,9 +281,10 @@ endif + # + # NetBSD/PPC + # +-ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARCH)$(OS_TEST))) ++ifeq ($(OS_ARCH)$(OS_TEST),NetBSDpowerpc) + CPPSRCS := xptcinvoke_ppc_netbsd.cpp xptcstubs_ppc_netbsd.cpp + ASFILES := xptcinvoke_asm_ppc_netbsd.s xptcstubs_asm_ppc_netbsd.s ++AS := $(CC) -c -x assembler-with-cpp + endif + + # +@@ -355,6 +350,13 @@ CPPSRCS := xptcinvoke_sparc64_openbsd.c + ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s + endif + # ++# NetBSD/SPARC64 ++# ++ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc64) ++CPPSRCS := xptcinvoke_sparc64_netbsd.cpp xptcstubs_sparc64_netbsd.cpp ++ASFILES := xptcinvoke_asm_sparc64_netbsd.s xptcstubs_asm_sparc64_netbsd.s ++endif ++# + # Solaris/SPARC + # + ifeq ($(OS_ARCH),SunOS) diff --git a/mail/thunderbird17/patches/patch-md b/mail/thunderbird17/patches/patch-md new file mode 100644 index 00000000000..cdb0ba99261 --- /dev/null +++ b/mail/thunderbird17/patches/patch-md @@ -0,0 +1,17 @@ +$NetBSD: patch-md,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +???. from www/firefox/patch-ax. + +--- mozilla/security/coreconf/SunOS5.mk.orig 2012-08-25 00:31:28.000000000 +0000 ++++ mozilla/security/coreconf/SunOS5.mk +@@ -147,6 +147,10 @@ endif + endif + DSO_LDOPTS += -z combreloc -z defs -z ignore + ++ifdef LIBRUNPATH ++DSO_LDOPTS += -R$(LIBRUNPATH) ++endif ++ + # -KPIC generates position independent code for use in shared libraries. + # (Similarly for -fPIC in case of gcc.) + ifdef NS_USE_GCC diff --git a/mail/thunderbird17/patches/patch-me b/mail/thunderbird17/patches/patch-me new file mode 100644 index 00000000000..dd71a4df553 --- /dev/null +++ b/mail/thunderbird17/patches/patch-me @@ -0,0 +1,15 @@ +$NetBSD: patch-me,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +Add DragonFly support. + +--- mozilla/security/nss/lib/freebl/Makefile.orig 2012-08-25 00:31:29.000000000 +0000 ++++ mozilla/security/nss/lib/freebl/Makefile +@@ -279,7 +279,7 @@ endif + # to bind the blapi function references in FREEBLVector vector + # (ldvector.c) to the blapi functions defined in the freebl + # shared libraries. +-ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET))) ++ifeq (,$(filter-out BSD_OS DragonFly FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET))) + MKSHLIB += -Wl,-Bsymbolic + endif + diff --git a/mail/thunderbird17/patches/patch-mf b/mail/thunderbird17/patches/patch-mf new file mode 100644 index 00000000000..d0e11fe177a --- /dev/null +++ b/mail/thunderbird17/patches/patch-mf @@ -0,0 +1,18 @@ +$NetBSD: patch-mf,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/security/coreconf/config.mk.orig 2013-03-28 18:09:07.000000000 +0000 ++++ mozilla/security/coreconf/config.mk +@@ -31,7 +31,7 @@ endif + ####################################################################### + + TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ +- AIX RISCOS WINNT WIN95 Linux Android ++ AIX RISCOS WINNT WIN95 Linux Android DragonFly + + ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) + include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk +@@ -175,3 +175,4 @@ endif + DEFINES += -DUSE_UTIL_DIRECTLY + USE_UTIL_DIRECTLY = 1 + ++EXTRA_SHARED_LIBS += -Wl,-R${PREFIX}/lib/${MOZILLA_PKG_NAME} diff --git a/mail/thunderbird17/patches/patch-mg b/mail/thunderbird17/patches/patch-mg new file mode 100644 index 00000000000..646dcbb6d6e --- /dev/null +++ b/mail/thunderbird17/patches/patch-mg @@ -0,0 +1,90 @@ +$NetBSD: patch-mg,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +Add DragonFly support. + +--- mozilla/security/coreconf/DragonFly.mk.orig 2012-08-31 13:21:43.000000000 +0000 ++++ mozilla/security/coreconf/DragonFly.mk +@@ -0,0 +1,83 @@ ++# ++# The contents of this file are subject to the Mozilla Public ++# License Version 1.1 (the "License"); you may not use this file ++# except in compliance with the License. You may obtain a copy of ++# the License at http://www.mozilla.org/MPL/ ++# ++# Software distributed under the License is distributed on an "AS ++# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++# implied. See the License for the specific language governing ++# rights and limitations under the License. ++# ++# The Original Code is the Netscape security libraries. ++# ++# The Initial Developer of the Original Code is Netscape ++# Communications Corporation. Portions created by Netscape are ++# Copyright (C) 1994-2000 Netscape Communications Corporation. All ++# Rights Reserved. ++# ++# Contributor(s): ++# ++# Alternatively, the contents of this file may be used under the ++# terms of the GNU General Public License Version 2 or later (the ++# "GPL"), in which case the provisions of the GPL are applicable ++# instead of those above. If you wish to allow use of your ++# version of this file only under the terms of the GPL and not to ++# allow others to use your version of this file under the MPL, ++# indicate your decision by deleting the provisions above and ++# replace them with the notice and other provisions required by ++# the GPL. If you do not delete the provisions above, a recipient ++# may use your version of this file under either the MPL or the ++# GPL. ++# ++# Config stuff for DragonFly ++# ++ ++include $(CORE_DEPTH)/coreconf/UNIX.mk ++ ++DEFAULT_COMPILER = gcc ++CC = gcc ++CCC = g++ ++RANLIB = ranlib ++ ++ifeq ($(OS_TEST),alpha) ++CPU_ARCH = alpha ++else ++CPU_ARCH = x86 ++endif ++ ++OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK ++ ++DSO_CFLAGS = -fPIC ++DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) ++ ++# ++# The default implementation strategy for FreeBSD is pthreads. ++# ++ifndef CLASSIC_NSPR ++USE_PTHREADS = 1 ++DEFINES += -D_THREAD_SAFE -D_REENTRANT ++OS_LIBS += -pthread ++DSO_LDOPTS += -pthread ++endif ++ ++ARCH = freebsd ++ ++MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo aout) ++ ++DLL_SUFFIX = so ++ ++ifdef LIBRUNPATH ++DSO_LDOPTS += -Wl,-R$(LIBRUNPATH) ++endif ++ ++MKSHLIB = $(CC) $(DSO_LDOPTS) ++ifdef MAPFILE ++# Add LD options to restrict exported symbols to those in the map file ++endif ++# Change PROCESS to put the mapfile in the correct format for this platform ++PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@ ++ ++G++INCLUDES = -I/usr/include/g++ ++ ++INCLUDES += -I/usr/X11R6/include diff --git a/mail/thunderbird17/patches/patch-mh b/mail/thunderbird17/patches/patch-mh new file mode 100644 index 00000000000..80920e39252 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mh @@ -0,0 +1,13 @@ +$NetBSD: patch-mh,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/security/nss/lib/Makefile.orig 2012-08-25 00:31:29.000000000 +0000 ++++ mozilla/security/nss/lib/Makefile +@@ -70,7 +70,7 @@ endif + + ifndef MOZILLA_CLIENT + ifeq ($(OS_ARCH),Linux) +-SYSINIT_SRCDIR = sysinit # Add the sysinit directory to DIRS. ++#SYSINIT_SRCDIR = sysinit # Add the sysinit directory to DIRS. + endif + endif + diff --git a/mail/thunderbird17/patches/patch-mi b/mail/thunderbird17/patches/patch-mi new file mode 100644 index 00000000000..101b54cc68d --- /dev/null +++ b/mail/thunderbird17/patches/patch-mi @@ -0,0 +1,15 @@ +$NetBSD: patch-mi,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +Add DragonFly support. + +--- mozilla/config/config.mk.orig 2012-11-19 22:42:12.000000000 +0000 ++++ mozilla/config/config.mk +@@ -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 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/thunderbird17/patches/patch-mj b/mail/thunderbird17/patches/patch-mj new file mode 100644 index 00000000000..a4cf1848439 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mj @@ -0,0 +1,15 @@ +$NetBSD: patch-mj,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +Add DragonFly support. + +--- mozilla/security/coreconf/arch.mk.orig 2012-08-25 00:31:28.000000000 +0000 ++++ mozilla/security/coreconf/arch.mk +@@ -146,7 +146,7 @@ endif + # IRIX 6.5-ALPHA-1289139620. + # + +-ifeq (,$(filter-out Linux FreeBSD IRIX,$(OS_ARCH))) ++ifeq (,$(filter-out Linux DragonFly FreeBSD IRIX,$(OS_ARCH))) + OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//') + endif + diff --git a/mail/thunderbird17/patches/patch-mk b/mail/thunderbird17/patches/patch-mk new file mode 100644 index 00000000000..703e6686f19 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mk @@ -0,0 +1,30 @@ +$NetBSD: patch-mk,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +Treat DragonFly like FreeBSD. + +--- mozilla/config/rules.mk.orig 2012-08-25 00:30:58.000000000 +0000 ++++ mozilla/config/rules.mk +@@ -454,6 +454,12 @@ EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic + endif + endif + ++ifeq ($(OS_ARCH),DragonFly) ++ifdef IS_COMPONENT ++EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic ++endif ++endif ++ + ifeq ($(OS_ARCH),NetBSD) + ifneq (,$(filter arc cobalt hpcmips mipsco newsmips pmax sgimips,$(OS_TEST))) + ifeq ($(MODULE),layout) +@@ -463,6 +469,10 @@ endif + endif + endif + ++ifeq ($(OS_ARCH),NetBSD) ++EXTRA_DSO_LDOPTS += -Wl,-rpath,${PREFIX}/lib/thunderbird ++endif ++ + # + # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag + # which uses internal symbols first diff --git a/mail/thunderbird17/patches/patch-ml b/mail/thunderbird17/patches/patch-ml new file mode 100644 index 00000000000..111ecd438ab --- /dev/null +++ b/mail/thunderbird17/patches/patch-ml @@ -0,0 +1,16 @@ +$NetBSD: patch-ml,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +Treat DragonFly like FreeBSD. + +--- mozilla/js/src/Makefile.in.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/js/src/Makefile.in +@@ -678,6 +678,9 @@ endif # _MSC_VER + ifeq ($(OS_ARCH),FreeBSD) + EXTRA_LIBS += -pthread + endif ++ifeq ($(OS_ARCH),DragonFly) ++EXTRA_LIBS += -pthread ++endif + ifeq ($(OS_ARCH),Linux) + EXTRA_LIBS += -ldl + endif diff --git a/mail/thunderbird17/patches/patch-mm b/mail/thunderbird17/patches/patch-mm new file mode 100644 index 00000000000..7c946194d8b --- /dev/null +++ b/mail/thunderbird17/patches/patch-mm @@ -0,0 +1,21 @@ +$NetBSD: patch-mm,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/toolkit/library/Makefile.in.orig 2012-11-22 19:26:22.000000000 +0000 ++++ mozilla/toolkit/library/Makefile.in +@@ -371,14 +371,11 @@ endif + + EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) + +-ifdef MOZ_SYDNEYAUDIO +-ifeq ($(OS_ARCH),Linux) ++ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO)) ++ifdef MOZ_ALSA + EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) + endif +-endif +- + ifdef MOZ_PULSEAUDIO +-ifdef MOZ_CUBEB + EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) + endif + endif diff --git a/mail/thunderbird17/patches/patch-mn b/mail/thunderbird17/patches/patch-mn new file mode 100644 index 00000000000..a74a7907170 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mn @@ -0,0 +1,15 @@ +$NetBSD: patch-mn,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +Make sure we link correctly with sqlite3 from pkgsrc. + +--- mozilla/security/nss/lib/softoken/config.mk.orig 2012-08-25 00:31:30.000000000 +0000 ++++ mozilla/security/nss/lib/softoken/config.mk +@@ -80,7 +80,7 @@ else + # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX. + EXTRA_SHARED_LIBS += \ + -L$(DIST)/lib \ +- -l$(SQLITE_LIB_NAME) \ ++ `pkg-config --libs sqlite3` \ + -L$(NSSUTIL_LIB_DIR) \ + -lnssutil3 \ + -L$(NSPR_LIB_DIR) \ diff --git a/mail/thunderbird17/patches/patch-mozilla_build_autoconf_nss.m4 b/mail/thunderbird17/patches/patch-mozilla_build_autoconf_nss.m4 new file mode 100644 index 00000000000..27d46e6c4af --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_build_autoconf_nss.m4 @@ -0,0 +1,46 @@ +$NetBSD: patch-mozilla_build_autoconf_nss.m4,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/build/autoconf/nss.m4.orig 2012-08-25 00:30:58.000000000 +0000 ++++ mozilla/build/autoconf/nss.m4 +@@ -22,18 +22,18 @@ AC_ARG_WITH(nss-exec-prefix, + if test -n "$nss_config_exec_prefix"; then + nss_config_args="$nss_config_args --exec-prefix=$nss_config_exec_prefix" + if test -z "$NSS_CONFIG"; then +- NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config ++ NSS_CONFIG=$nss_config_exec_prefix/bin/pkg-config + fi + fi + if test -n "$nss_config_prefix"; then + nss_config_args="$nss_config_args --prefix=$nss_config_prefix" + if test -z "$NSS_CONFIG"; then +- NSS_CONFIG=$nss_config_prefix/bin/nss-config ++ NSS_CONFIG=$nss_config_prefix/bin/pkg-config + fi + fi + + unset ac_cv_path_NSS_CONFIG +- AC_PATH_PROG(NSS_CONFIG, nss-config, no) ++ AC_PATH_PROG(NSS_CONFIG, pkg-config, no) + min_nss_version=ifelse([$1], ,3.0.0,$1) + AC_MSG_CHECKING(for NSS - version >= $min_nss_version) + +@@ -41,14 +41,14 @@ AC_ARG_WITH(nss-exec-prefix, + if test "$NSS_CONFIG" = "no"; then + no_nss="yes" + else +- NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags` +- NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs` ++ NSS_CFLAGS=`$NSS_CONFIG $nss_config_args nss --cflags` ++ NSS_LIBS=`$NSS_CONFIG $nss_config_args nss --libs` + +- nss_config_major_version=`$NSS_CONFIG $nss_config_args --version | \ ++ nss_config_major_version=`$NSS_CONFIG $nss_config_args nss --modversion | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` +- nss_config_minor_version=`$NSS_CONFIG $nss_config_args --version | \ ++ nss_config_minor_version=`$NSS_CONFIG $nss_config_args nss --modversion | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` +- nss_config_micro_version=`$NSS_CONFIG $nss_config_args --version | \ ++ nss_config_micro_version=`$NSS_CONFIG $nss_config_args nss --modversion | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + min_nss_major_version=`echo $min_nss_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` diff --git a/mail/thunderbird17/patches/patch-mozilla_config_baseconfig.mk b/mail/thunderbird17/patches/patch-mozilla_config_baseconfig.mk new file mode 100644 index 00000000000..878a85cb800 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_config_baseconfig.mk @@ -0,0 +1,18 @@ +$NetBSD: patch-mozilla_config_baseconfig.mk,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- 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 + +-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} + DIST = $(DEPTH)/dist + + # We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't diff --git a/mail/thunderbird17/patches/patch-mozilla_config_stl__wrappers_ios b/mail/thunderbird17/patches/patch-mozilla_config_stl__wrappers_ios new file mode 100644 index 00000000000..d001868107d --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_config_stl__wrappers_ios @@ -0,0 +1,8 @@ +$NetBSD: patch-mozilla_config_stl__wrappers_ios,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/config/stl_wrappers/ios.orig 2013-05-13 18:23:07.000000000 +0000 ++++ mozilla/config/stl_wrappers/ios +@@ -0,0 +1,3 @@ ++#pragma GCC visibility push(default) ++#include_next <ios> ++#pragma GCC visibility pop diff --git a/mail/thunderbird17/patches/patch-mozilla_config_stl__wrappers_ostream b/mail/thunderbird17/patches/patch-mozilla_config_stl__wrappers_ostream new file mode 100644 index 00000000000..7094d5b9844 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_config_stl__wrappers_ostream @@ -0,0 +1,8 @@ +$NetBSD: patch-mozilla_config_stl__wrappers_ostream,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/config/stl_wrappers/ostream.orig 2013-05-13 18:22:40.000000000 +0000 ++++ mozilla/config/stl_wrappers/ostream +@@ -0,0 +1,3 @@ ++#pragma GCC visibility push(default) ++#include_next <ostream> ++#pragma GCC visibility pop diff --git a/mail/thunderbird17/patches/patch-mozilla_config_system-headers b/mail/thunderbird17/patches/patch-mozilla_config_system-headers new file mode 100644 index 00000000000..b8e3efc6f88 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_config_system-headers @@ -0,0 +1,14 @@ +$NetBSD: patch-mozilla_config_system-headers,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/config/system-headers.orig 2012-11-19 22:42:12.000000000 +0000 ++++ mozilla/config/system-headers +@@ -1065,5 +1065,9 @@ gst/gst.h + gst/app/gstappsink.h + gst/app/gstappsrc.h + gst/video/video.h ++sys/thr.h ++sys/user.h ++kvm.h ++spawn.h + sys/msg.h + sys/ipc.h diff --git a/mail/thunderbird17/patches/patch-mozilla_config_system__wrappers_unwind.h b/mail/thunderbird17/patches/patch-mozilla_config_system__wrappers_unwind.h new file mode 100644 index 00000000000..826acbcdb62 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_config_system__wrappers_unwind.h @@ -0,0 +1,9 @@ +$NetBSD: patch-mozilla_config_system__wrappers_unwind.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/config/system_wrappers/unwind.h.orig 2013-05-13 19:56:18.000000000 +0000 ++++ mozilla/config/system_wrappers/unwind.h +@@ -0,0 +1,4 @@ ++#pragma GCC system_header ++#pragma GCC visibility push(default) ++#include_next <unwind.h> ++#pragma GCC visibility pop diff --git a/mail/thunderbird17/patches/patch-mozilla_content_media_nsAudioStream.cpp b/mail/thunderbird17/patches/patch-mozilla_content_media_nsAudioStream.cpp new file mode 100644 index 00000000000..181a87d6416 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_content_media_nsAudioStream.cpp @@ -0,0 +1,16 @@ +$NetBSD: patch-mozilla_content_media_nsAudioStream.cpp,v 1.1 2013/11/13 13:27:45 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/thunderbird17/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp b/mail/thunderbird17/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp new file mode 100644 index 00000000000..3b8ab8c8e37 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp @@ -0,0 +1,39 @@ +$NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- 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/. */ + + #ifdef MOZ_WIDGET_QT ++#include <unistd.h> // for _exit() + #include <QtCore/QTimer> + #include "nsQAppInstance.h" + #include "NestedLoopTimer.h" +@@ -196,7 +197,7 @@ PluginModuleChild::Init(const std::strin + + // TODO: use PluginPRLibrary here + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + mShutdownFunc = + (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown"); + +@@ -1827,7 +1828,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin + PLUGIN_LOG_DEBUG_METHOD; + AssertPluginThread(); + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + return true; + #elif defined(OS_WIN) || defined(OS_MACOSX) + *_retval = mGetEntryPointsFunc(&mFunctions); +@@ -1856,7 +1857,7 @@ PluginModuleChild::AnswerNP_Initialize(c + SendBackUpXResources(FileDescriptor(xSocketFd)); + #endif + +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions); + return true; + #elif defined(OS_WIN) || defined(OS_MACOSX) diff --git a/mail/thunderbird17/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h b/mail/thunderbird17/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h new file mode 100644 index 00000000000..9ef09797eb7 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2012-08-25 00:31:04.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.h +@@ -330,7 +330,7 @@ private: + + // we get this from the plugin + NP_PLUGINSHUTDOWN mShutdownFunc; +-#ifdef OS_LINUX ++#if defined(OS_LINUX) || defined(OS_BSD) + NP_PLUGINUNIXINIT mInitializeFunc; + #elif defined(OS_WIN) || defined(OS_MACOSX) + NP_PLUGININIT mInitializeFunc; diff --git a/mail/thunderbird17/patches/patch-mozilla_gfx_thebes_gfxPlatform.cpp b/mail/thunderbird17/patches/patch-mozilla_gfx_thebes_gfxPlatform.cpp new file mode 100644 index 00000000000..ad1de7099c0 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_gfx_thebes_gfxPlatform.cpp @@ -0,0 +1,36 @@ +$NetBSD: patch-mozilla_gfx_thebes_gfxPlatform.cpp,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/gfx/thebes/gfxPlatform.cpp.orig 2012-08-25 00:31:09.000000000 +0000 ++++ mozilla/gfx/thebes/gfxPlatform.cpp +@@ -443,6 +443,7 @@ void SourceBufferDestroy(void *srcBuffer + static_cast<SourceSurface*>(srcBuffer)->Release(); + } + ++#ifdef MOZ_TREE_CAIRO + void SourceSnapshotDetached(cairo_surface_t *nullSurf) + { + gfxImageSurface* origSurf = +@@ -450,6 +451,7 @@ void SourceSnapshotDetached(cairo_surfac + + origSurf->SetData(&kSourceSurface, NULL, NULL); + } ++#endif + + RefPtr<SourceSurface> + gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface) +@@ -544,6 +546,7 @@ gfxPlatform::GetSourceSurfaceForSurface( + + } + ++ #ifdef MOZ_TREE_CAIRO + cairo_surface_t *nullSurf = + cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA); + cairo_surface_set_user_data(nullSurf, +@@ -552,6 +555,7 @@ gfxPlatform::GetSourceSurfaceForSurface( + NULL); + cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached); + cairo_surface_destroy(nullSurf); ++ #endif + } + + srcBuffer->AddRef(); diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_Makefile.in b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_Makefile.in new file mode 100644 index 00000000000..1f2e0dcaee9 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_Makefile.in @@ -0,0 +1,38 @@ +$NetBSD: patch-mozilla_ipc_chromium_Makefile.in,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/Makefile.in.orig 2012-11-19 22:42:22.000000000 +0000 ++++ mozilla/ipc/chromium/Makefile.in +@@ -240,6 +240,33 @@ endif + + endif # } OS_LINUX + ++ifdef OS_BSD # { ++ ++CPPSRCS += \ ++ atomicops_internals_x86_gcc.cc \ ++ process_util_bsd.cc \ ++ time_posix.cc \ ++ $(NULL) ++ ++ifdef MOZ_ENABLE_GTK2 ++CPPSRCS += \ ++ message_pump_glib.cc \ ++ $(NULL) ++endif ++ ++ifdef MOZ_ENABLE_QT ++MOCSRCS = \ ++ moc_message_pump_qt.cc \ ++ $(NULL) ++ ++CPPSRCS += \ ++ $(MOCSRCS) \ ++ message_pump_qt.cc \ ++ $(NULL) ++endif ++ ++endif # } OS_BSD ++ + # libevent + + ifndef MOZ_NATIVE_LIBEVENT # { diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_chromium-config.mk b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_chromium-config.mk new file mode 100644 index 00000000000..29564b6676d --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_chromium-config.mk @@ -0,0 +1,100 @@ +$NetBSD: patch-mozilla_ipc_chromium_chromium-config.mk,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/chromium-config.mk.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/chromium-config.mk +@@ -24,17 +24,6 @@ LOCAL_INCLUDES += \ + -I$(DEPTH)/ipc/ipdl/_ipdlheaders \ + $(NULL) + +-ifeq ($(OS_ARCH),Darwin) # { +- +-OS_MACOSX = 1 +-OS_POSIX = 1 +- +-DEFINES += \ +- -DOS_MACOSX=1 \ +- -DOS_POSIX=1 \ +- $(NULL) +- +-else # } { + ifeq ($(OS_ARCH),WINNT) # { + OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp) + +@@ -61,13 +50,65 @@ DEFINES += -DCOMPILER_MSVC + endif + + else # } { +- +-OS_LINUX = 1 + OS_POSIX = 1 ++DEFINES += -DOS_POSIX=1 ++ ++ifeq ($(OS_ARCH),Darwin) # { ++ ++OS_MACOSX = 1 ++DEFINES += \ ++ -DOS_MACOSX=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),DragonFly) # { ++ ++OS_DRAGONFLY = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_DRAGONFLY=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),FreeBSD) # { ++ ++OS_FREEBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_FREEBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) + ++else # } { ++ifeq ($(OS_ARCH),NetBSD) # { ++ ++OS_NETBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_NETBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ifeq ($(OS_ARCH),OpenBSD) # { ++ ++OS_OPENBSD = 1 ++OS_BSD = 1 ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++DEFINES += \ ++ -DOS_OPENBSD=1 \ ++ -DOS_BSD=1 \ ++ $(NULL) ++ ++else # } { ++ ++OS_LINUX = 1 + DEFINES += \ + -DOS_LINUX=1 \ +- -DOS_POSIX=1 \ + $(NULL) + + # NB: to stop gcc warnings about exporting template instantiation +@@ -75,4 +116,8 @@ OS_CXXFLAGS := $(filter-out -pedantic,$( + + endif # } + endif # } ++endif # } ++endif # } ++endif # } ++endif # } + diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_base__paths.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_base__paths.h new file mode 100644 index 00000000000..7c546c08791 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_base__paths.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_base__paths.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/base_paths.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/base_paths.h +@@ -13,7 +13,7 @@ + #include "base/base_paths_win.h" + #elif defined(OS_MACOSX) + #include "base/base_paths_mac.h" +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + #include "base/base_paths_linux.h" + #endif + #include "base/path_service.h" diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_dir__reader__bsd.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_dir__reader__bsd.h new file mode 100644 index 00000000000..95f57853c8d --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_dir__reader__bsd.h @@ -0,0 +1,117 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_dir__reader__bsd.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/dir_reader_bsd.h.orig 2012-09-03 10:39:55.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h +@@ -0,0 +1,112 @@ ++// Copyright (c) 2010 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. ++ ++// derived from dir_reader_linux.h ++ ++#ifndef BASE_DIR_READER_BSD_H_ ++#define BASE_DIR_READER_BSD_H_ ++#pragma once ++ ++#include <dirent.h> ++#include <errno.h> ++#include <fcntl.h> ++#include <stdint.h> ++#include <unistd.h> ++ ++#include "base/logging.h" ++#include "base/eintr_wrapper.h" ++ ++// See the comments in dir_reader_posix.h about this. ++ ++namespace base { ++ ++class DirReaderBSD { ++ public: ++ explicit DirReaderBSD(const char* directory_path) ++#ifdef O_DIRECTORY ++ : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)), ++#else ++ : fd_(open(directory_path, O_RDONLY)), ++#endif ++ offset_(0), ++ size_(0) { ++ memset(buf_, 0, sizeof(buf_)); ++ } ++ ++ ~DirReaderBSD() { ++ if (fd_ >= 0) { ++ if (HANDLE_EINTR(close(fd_))) ++ DLOG(ERROR) << "Failed to close directory handle"; ++ } ++ } ++ ++ bool IsValid() const { ++ return fd_ >= 0; ++ } ++ ++ // Move to the next entry returning false if the iteration is complete. ++ bool Next() { ++ if (size_) { ++ struct dirent* dirent = reinterpret_cast<struct dirent*>(&buf_[offset_]); ++#ifdef OS_DRAGONFLY ++ offset_ += _DIRENT_DIRSIZ(dirent); ++#else ++ offset_ += dirent->d_reclen; ++#endif ++ } ++ ++ if (offset_ != size_) ++ return true; ++ ++#ifdef OS_OPENBSD ++ const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_); ++#else ++ const int r = getdents(fd_, buf_, sizeof(buf_)); ++#endif ++ if (r == 0) ++ return false; ++ if (r == -1) { ++#ifdef OS_OPENBSD ++ DLOG(ERROR) << "getdirentries returned an error: " << errno; ++#else ++ DLOG(ERROR) << "getdents returned an error: " << errno; ++#endif ++ return false; ++ } ++ size_ = r; ++ offset_ = 0; ++ return true; ++ } ++ ++ const char* name() const { ++ if (!size_) ++ return NULL; ++ ++ const struct dirent* dirent = ++ reinterpret_cast<const struct dirent*>(&buf_[offset_]); ++ return dirent->d_name; ++ } ++ ++ int fd() const { ++ return fd_; ++ } ++ ++ static bool IsFallback() { ++ return false; ++ } ++ ++ private: ++ const int fd_; ++ char buf_[512]; ++#ifdef OS_OPENBSD ++ off_t *basep_; ++#endif ++ size_t offset_, size_; ++ ++ DISALLOW_COPY_AND_ASSIGN(DirReaderBSD); ++}; ++ ++} // namespace base ++ ++#endif // BASE_DIR_READER_BSD_H_ diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_dir__reader__posix.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_dir__reader__posix.h new file mode 100644 index 00000000000..91a87344a5d --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_dir__reader__posix.h @@ -0,0 +1,27 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_dir__reader__posix.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/dir_reader_posix.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/dir_reader_posix.h +@@ -18,16 +18,20 @@ + // seems worse than falling back to enumerating all file descriptors so we will + // probably never implement this on the Mac. + +-#if defined(OS_LINUX) && !defined(OS_OPENBSD) ++#if defined(OS_LINUX) + #include "base/dir_reader_linux.h" ++#elif defined(OS_BSD) ++#include "base/dir_reader_bsd.h" + #else + #include "base/dir_reader_fallback.h" + #endif + + namespace base { + +-#if defined(OS_LINUX) && !defined(OS_OPENBSD) ++#if defined(OS_LINUX) + typedef DirReaderLinux DirReaderPosix; ++#elif defined(OS_BSD) ++typedef DirReaderBSD DirReaderPosix; + #else + typedef DirReaderFallback DirReaderPosix; + #endif diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_file__util.cc b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_file__util.cc new file mode 100644 index 00000000000..e26ab06dc42 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_file__util.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_file__util.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util.cc.orig 2013-07-12 14:40:54.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util.cc +@@ -194,7 +194,7 @@ bool ReadFileToString(const FilePath& pa + FILE* CreateAndOpenTemporaryFile(FilePath* path) { + FilePath directory; + if (!GetTempDir(&directory)) +- return false; ++ return NULL; + + return CreateAndOpenTemporaryFileInDir(directory, path); + } diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_message__loop.cc b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_message__loop.cc new file mode 100644 index 00000000000..ce6551bd2e5 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_message__loop.cc @@ -0,0 +1,22 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_message__loop.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/message_loop.cc +@@ -19,7 +19,7 @@ + #if defined(OS_POSIX) + #include "base/message_pump_libevent.h" + #endif +-#if defined(OS_LINUX) ++#if defined(OS_LINUX) || defined(OS_BSD) + #ifdef MOZ_WIDGET_GTK2 + #include "base/message_pump_glib.h" + #endif +@@ -119,7 +119,7 @@ MessageLoop::MessageLoop(Type type) + if (type_ == TYPE_UI) { + #if defined(OS_MACOSX) + pump_ = base::MessagePumpMac::Create(); +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_BSD) + pump_ = new base::MessagePumpForUI(); + #endif // OS_LINUX + } else if (type_ == TYPE_IO) { diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_pickle.cc b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_pickle.cc new file mode 100644 index 00000000000..f8627f05136 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_pickle.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_pickle.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/pickle.cc.orig 2013-07-12 14:44:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/pickle.cc +@@ -492,7 +492,7 @@ char* Pickle::BeginWriteData(int length) + "There can only be one variable buffer in a Pickle"; + + if (!WriteInt(length)) +- return false; ++ return NULL; + + char *data_ptr = BeginWrite(length, sizeof(uint32)); + if (!data_ptr) diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h new file mode 100644 index 00000000000..e0a8bc6caa0 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h @@ -0,0 +1,17 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_platform__thread.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread.h +@@ -22,9 +22,11 @@ typedef void* PlatformThreadHandle; // + #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_BSD) ++typedef lwpid_t PlatformThreadId; + #elif defined(OS_MACOSX) + #include <mach/mach.h> + typedef mach_port_t PlatformThreadId; diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util.h new file mode 100644 index 00000000000..4ca345f91db --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util.h @@ -0,0 +1,37 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util.h +@@ -280,6 +280,7 @@ class NamedProcessIterator { + const ProcessEntry* NextProcessEntry(); + + private: ++#if !defined(OS_BSD) + // Determines whether there's another process (regardless of executable) + // left in the list of all processes. Returns true and sets entry_ to + // that process's info if there is one, false otherwise. +@@ -292,18 +293,24 @@ class NamedProcessIterator { + void InitProcessEntry(ProcessEntry* entry); + + std::wstring executable_name_; ++#endif + + #if defined(OS_WIN) + HANDLE snapshot_; + bool started_iteration_; + #elif defined(OS_LINUX) + DIR *procfs_dir_; ++#elif defined(OS_BSD) ++ std::vector<ProcessEntry> content; ++ size_t nextEntry; + #elif defined(OS_MACOSX) + std::vector<kinfo_proc> kinfo_procs_; + size_t index_of_kinfo_proc_; + #endif ++#if !defined(OS_BSD) + ProcessEntry entry_; + const ProcessFilter* filter_; ++#endif + + DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator); + }; diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc new file mode 100644 index 00000000000..1906f19c97a --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc @@ -0,0 +1,372 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- 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,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. ++ ++// derived from process_util_linux.cc and process_util_mac.cc ++ ++#include "base/process_util.h" ++ ++#include <sys/param.h> ++#include <sys/sysctl.h> ++#include <sys/wait.h> ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++#include <sys/user.h> ++#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" ++#include "base/logging.h" ++#include "base/string_tokenizer.h" ++#include "base/string_util.h" ++ ++#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \ ++ || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500) ++#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 ++# else ++# define __dso_public __attribute__((__visibility__("default"))) ++# endif ++#endif ++ ++#ifdef HAVE_POSIX_SPAWN ++#include <spawn.h> ++extern "C" char **environ __dso_public; ++#endif ++ ++namespace { ++ ++enum ParsingState { ++ KEY_NAME, ++ KEY_VALUE ++}; ++ ++static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG"); ++ ++} // namespace ++ ++namespace base { ++ ++#ifdef HAVE_POSIX_SPAWN ++ ++void FreeEnvVarsArray(char* array[], int length) ++{ ++ for (int i = 0; i < length; i++) { ++ free(array[i]); ++ } ++ delete[] array; ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ bool wait, ProcessHandle* process_handle) { ++ return LaunchApp(argv, fds_to_remap, environment_map(), ++ 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, ++ 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]; ++ for (size_t i = 0; i < argv.size(); i++) { ++ argv_copy[i] = const_cast<char*>(argv[i].c_str()); ++ } ++ argv_copy[argv.size()] = NULL; ++ ++ // Make sure we don't leak any FDs to the child process by marking all FDs ++ // as close-on-exec. ++ SetAllFDsToCloseOnExec(); ++ ++ // Copy environment to a new char array and add the variables ++ // in env_vars_to_set. ++ // Existing variables are overwritten by env_vars_to_set. ++ int pos = 0; ++ environment_map combined_env_vars = env_vars_to_set; ++ while(environ[pos] != NULL) { ++ std::string varString = environ[pos]; ++ std::string varName = varString.substr(0, varString.find_first_of('=')); ++ std::string varValue = varString.substr(varString.find_first_of('=') + 1); ++ if (combined_env_vars.find(varName) == combined_env_vars.end()) { ++ combined_env_vars[varName] = varValue; ++ } ++ pos++; ++ } ++ int varsLen = combined_env_vars.size() + 1; ++ ++ char** vars = new char*[varsLen]; ++ int i = 0; ++ for (environment_map::const_iterator it = combined_env_vars.begin(); ++ it != combined_env_vars.end(); ++it) { ++ std::string entry(it->first); ++ entry += "="; ++ entry += it->second; ++ vars[i] = strdup(entry.c_str()); ++ i++; ++ } ++ vars[i] = NULL; ++ ++ posix_spawn_file_actions_t file_actions; ++ if (posix_spawn_file_actions_init(&file_actions) != 0) { ++ FreeEnvVarsArray(vars, varsLen); ++ return false; ++ } ++ ++ // Turn fds_to_remap array into a set of dup2 calls. ++ for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin(); ++ it != fds_to_remap.end(); ++ ++it) { ++ int src_fd = it->first; ++ int dest_fd = it->second; ++ ++ if (src_fd == dest_fd) { ++ int flags = fcntl(src_fd, F_GETFD); ++ if (flags != -1) { ++ fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC); ++ } ++ } else { ++ if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { ++ posix_spawn_file_actions_destroy(&file_actions); ++ FreeEnvVarsArray(vars, varsLen); ++ return false; ++ } ++ } ++ } ++ ++ pid_t pid = 0; ++ int spawn_succeeded = (posix_spawnp(&pid, ++ argv_copy[0], ++ &file_actions, ++ NULL, ++ argv_copy, ++ vars) == 0); ++ ++ FreeEnvVarsArray(vars, varsLen); ++ ++ posix_spawn_file_actions_destroy(&file_actions); ++ ++ bool process_handle_valid = pid > 0; ++ if (!spawn_succeeded || !process_handle_valid) { ++ retval = false; ++ } else { ++ if (wait) ++ HANDLE_EINTR(waitpid(pid, 0, 0)); ++ ++ if (process_handle) ++ *process_handle = pid; ++ } ++ ++ return retval; ++} ++ ++bool LaunchApp(const CommandLine& cl, ++ bool wait, bool start_hidden, ProcessHandle* process_handle) { ++ // TODO(playmobil): Do we need to respect the start_hidden flag? ++ file_handle_mapping_vector no_files; ++ return LaunchApp(cl.argv(), no_files, wait, process_handle); ++} ++ ++#else // no posix_spawn, use fork/exec ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ bool wait, ProcessHandle* process_handle) { ++ return LaunchApp(argv, fds_to_remap, environment_map(), ++ 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, ++ 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; ++ fd_shuffle1.reserve(fds_to_remap.size()); ++ fd_shuffle2.reserve(fds_to_remap.size()); ++ ++ pid_t pid = fork(); ++ if (pid < 0) ++ return false; ++ ++ if (pid == 0) { ++ for (file_handle_mapping_vector::const_iterator ++ it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) { ++ fd_shuffle1.push_back(InjectionArc(it->first, it->second, false)); ++ fd_shuffle2.push_back(InjectionArc(it->first, it->second, false)); ++ } ++ ++ if (!ShuffleFileDescriptors(&fd_shuffle1)) ++ _exit(127); ++ ++ 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); ++ } ++ 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); ++ } else { ++ gProcessLog.print("==> process %d launched child process %d\n", ++ GetCurrentProcId(), pid); ++ if (wait) ++ HANDLE_EINTR(waitpid(pid, 0, 0)); ++ ++ if (process_handle) ++ *process_handle = pid; ++ } ++ ++ return true; ++} ++ ++bool LaunchApp(const CommandLine& cl, ++ bool wait, bool start_hidden, ++ ProcessHandle* process_handle) { ++ file_handle_mapping_vector no_files; ++ return LaunchApp(cl.argv(), no_files, wait, process_handle); ++} ++ ++#endif ++ ++NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name, ++ const ProcessFilter* filter) ++{ ++ int numEntries; ++ kvm_t *kvm; ++ std::string exe(WideToASCII(executable_name)); ++ ++#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) ++ kvm = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL); ++ struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries); ++ if (procs != NULL && numEntries > 0) { ++ for (int i = 0; i < numEntries; i++) { ++# if defined(OS_DRAGONFLY) ++ if (exe != procs[i].kp_comm) continue; ++ if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].kp_pid; ++ e.ppid = procs[i].kp_ppid; ++ strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile); ++ content.push_back(e); ++# elif defined(OS_FREEBSD) ++ if (exe != procs[i].ki_comm) continue; ++ if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].ki_pid; ++ e.ppid = procs[i].ki_ppid; ++ strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile); ++ content.push_back(e); ++# 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; ++ if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue; ++ ProcessEntry e; ++ e.pid = procs[i].p_pid; ++ e.ppid = procs[i].p_ppid; ++ strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile); ++ content.push_back(e); ++#endif ++ } ++ } ++ nextEntry = 0; ++ kvm_close(kvm); ++} ++ ++NamedProcessIterator::~NamedProcessIterator() { ++} ++ ++const ProcessEntry* NamedProcessIterator::NextProcessEntry() { ++ if (nextEntry >= content.size()) return NULL; ++ return &content[nextEntry++]; ++} ++ ++bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const { ++ return false; ++} ++ ++} // namespace base diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util__posix.cc b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util__posix.cc new file mode 100644 index 00000000000..bb77749813b --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_process__util__posix.cc @@ -0,0 +1,25 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__posix.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util_posix.cc +@@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj + #elif defined(OS_MACOSX) + static const rlim_t kSystemDefaultMaxFds = 256; + static const char kFDDir[] = "/dev/fd"; ++#elif defined(OS_BSD) ++ // the getrlimit below should never fail, so whatever .. ++ static const rlim_t kSystemDefaultMaxFds = 1024; ++ // at least /dev/fd will exist ++ static const char kFDDir[] = "/dev/fd"; + #endif + + // Get the maximum number of FDs possible. +@@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj + void SetAllFDsToCloseOnExec() { + #if defined(OS_LINUX) + const char fd_dir[] = "/proc/self/fd"; +-#elif defined(OS_MACOSX) ++#elif defined(OS_MACOSX) || defined(OS_BSD) + const char fd_dir[] = "/dev/fd"; + #endif + ScopedDIR dir_closer(opendir(fd_dir)); diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_ref__counted.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_ref__counted.h new file mode 100644 index 00000000000..b1796804f74 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_ref__counted.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_ref__counted.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/ref_counted.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/ref_counted.h +@@ -28,7 +28,7 @@ class RefCountedBase { + bool in_dtor_; + #endif + +- DFAKE_MUTEX(add_release_); ++ DFAKE_MUTEX(add_release_) + + DISALLOW_COPY_AND_ASSIGN(RefCountedBase); + }; diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_thread__collision__warner.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_thread__collision__warner.h new file mode 100644 index 00000000000..520f37a2e59 --- /dev/null +++ b/mail/thunderbird17/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 2013/11/13 13:27:45 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/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_time__posix.cc b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_time__posix.cc new file mode 100644 index 00000000000..f42ed1be508 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_base_time__posix.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_time__posix.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/time_posix.cc.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/time_posix.cc +@@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() { + // With numer and denom = 1 (the expected case), the 64-bit absolute time + // reported in nanoseconds is enough to last nearly 585 years. + +-#elif defined(__OpenBSD__) || defined(OS_POSIX) && \ ++#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \ + defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 + + struct timespec ts; diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_file__descriptor__set__posix.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_file__descriptor__set__posix.h new file mode 100644 index 00000000000..76d3e1b329f --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_file__descriptor__set__posix.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_chrome_common_file__descriptor__set__posix.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/file_descriptor_set_posix.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/file_descriptor_set_posix.h +@@ -30,7 +30,7 @@ class FileDescriptorSet : public base::R + // In debugging mode, it's a fatal error to try and add more than this number + // of descriptors to a FileDescriptorSet. + enum { +- MAX_DESCRIPTORS_PER_MESSAGE = 4, ++ MAX_DESCRIPTORS_PER_MESSAGE = 4 + }; + + // --------------------------------------------------------------------------- diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_ipc__channel__posix.cc b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_ipc__channel__posix.cc new file mode 100644 index 00000000000..89d5c36a6d6 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_ipc__channel__posix.cc @@ -0,0 +1,12 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_chrome_common_ipc__channel__posix.cc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc +@@ -7,6 +7,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <stddef.h> ++#include <unistd.h> + #include <sys/types.h> + #include <sys/socket.h> + #include <sys/stat.h> diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_ipc__message__utils.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_ipc__message__utils.h new file mode 100644 index 00000000000..070170fd9a0 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_ipc__message__utils.h @@ -0,0 +1,22 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h +@@ -195,7 +195,7 @@ struct ParamTraits<unsigned long long> { + }; + #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_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> { +@@ -248,7 +248,7 @@ struct ParamTraits<uint32> { + }; + #endif // defined(OS_MACOSX) + +-#if !(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> { diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h new file mode 100644 index 00000000000..658b1957dab --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h @@ -0,0 +1,31 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2012-08-25 00:31:11.000000000 +0000 ++++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h +@@ -7,7 +7,7 @@ + + #include "base/basictypes.h" + +-#if defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + #include "base/shared_memory.h" + #endif + +@@ -66,7 +66,7 @@ class TransportDIB { + uint32 sequence_num; + }; + typedef HandleAndSequenceNum Id; +-#elif defined(OS_MACOSX) ++#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; +@@ -108,7 +108,7 @@ class TransportDIB { + + private: + TransportDIB(); +-#if defined(OS_WIN) || defined(OS_MACOSX) ++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) + explicit TransportDIB(base::SharedMemoryHandle dib); + base::SharedMemory shared_memory_; + uint32 sequence_num_; diff --git a/mail/thunderbird17/patches/patch-mozilla_ipc_glue_SharedMemorySysV.h b/mail/thunderbird17/patches/patch-mozilla_ipc_glue_SharedMemorySysV.h new file mode 100644 index 00000000000..48a4907ba06 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_ipc_glue_SharedMemorySysV.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_ipc_glue_SharedMemorySysV.h,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- 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) + + // 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/thunderbird17/patches/patch-mozilla_js_src_config_system-headers b/mail/thunderbird17/patches/patch-mozilla_js_src_config_system-headers new file mode 100644 index 00000000000..dd8b9a9f7a1 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_js_src_config_system-headers @@ -0,0 +1,14 @@ +$NetBSD: patch-mozilla_js_src_config_system-headers,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/js/src/config/system-headers.orig 2012-11-19 22:42:22.000000000 +0000 ++++ mozilla/js/src/config/system-headers +@@ -1065,5 +1065,9 @@ gst/gst.h + gst/app/gstappsink.h + gst/app/gstappsrc.h + gst/video/video.h ++sys/thr.h ++sys/user.h ++kvm.h ++spawn.h + sys/msg.h + sys/ipc.h diff --git a/mail/thunderbird17/patches/patch-mozilla_js_src_jsgc.cpp b/mail/thunderbird17/patches/patch-mozilla_js_src_jsgc.cpp new file mode 100644 index 00000000000..61177a68e9b --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_js_src_jsgc.cpp @@ -0,0 +1,17 @@ +$NetBSD: patch-mozilla_js_src_jsgc.cpp,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/js/src/jsgc.cpp.orig 2012-08-25 00:31:12.000000000 +0000 ++++ mozilla/js/src/jsgc.cpp +@@ -2635,8 +2635,12 @@ GetCPUCount() + GetSystemInfo(&sysinfo); + ncpus = unsigned(sysinfo.dwNumberOfProcessors); + # else ++# ifdef _SC_NPROCESSORS_ONLN + long n = sysconf(_SC_NPROCESSORS_ONLN); + ncpus = (n > 0) ? unsigned(n) : 1; ++# else ++ ncpus = 1; ++# endif + # endif + } + return ncpus; diff --git a/mail/thunderbird17/patches/patch-mozilla_js_src_jsinterp.cpp b/mail/thunderbird17/patches/patch-mozilla_js_src_jsinterp.cpp new file mode 100644 index 00000000000..687f4ed4a12 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_js_src_jsinterp.cpp @@ -0,0 +1,23 @@ +$NetBSD: patch-mozilla_js_src_jsinterp.cpp,v 1.1 2013/11/13 13:27:45 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/thunderbird17/patches/patch-mozilla_js_src_methodjit_MethodJIT.cpp b/mail/thunderbird17/patches/patch-mozilla_js_src_methodjit_MethodJIT.cpp new file mode 100644 index 00000000000..64727a012a4 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_js_src_methodjit_MethodJIT.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_js_src_methodjit_MethodJIT.cpp,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/js/src/methodjit/MethodJIT.cpp.orig 2012-08-25 00:31:13.000000000 +0000 ++++ mozilla/js/src/methodjit/MethodJIT.cpp +@@ -135,7 +135,7 @@ PopActiveVMFrame(VMFrame &f) + + JS_STATIC_ASSERT(offsetof(FrameRegs, sp) == 0); + +-#if defined(__linux__) && defined(JS_CPU_X64) ++#if defined(__ELF__) && defined(JS_CPU_X64) + # define SYMBOL_STRING_RELOC(name) #name "@plt" + #else + # define SYMBOL_STRING_RELOC(name) SYMBOL_STRING(name) diff --git a/mail/thunderbird17/patches/patch-mozilla_media_libcubeb_src_Makefile.in b/mail/thunderbird17/patches/patch-mozilla_media_libcubeb_src_Makefile.in new file mode 100644 index 00000000000..073a7badfbe --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_media_libcubeb_src_Makefile.in @@ -0,0 +1,28 @@ +$NetBSD: patch-mozilla_media_libcubeb_src_Makefile.in,v 1.1 2013/11/13 13:27:45 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/thunderbird17/patches/patch-mozilla_media_libsydneyaudio_src_sydney__audio__pulseaudio.c b/mail/thunderbird17/patches/patch-mozilla_media_libsydneyaudio_src_sydney__audio__pulseaudio.c new file mode 100644 index 00000000000..1d470880fdd --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_media_libsydneyaudio_src_sydney__audio__pulseaudio.c @@ -0,0 +1,14 @@ +$NetBSD: patch-mozilla_media_libsydneyaudio_src_sydney__audio__pulseaudio.c,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/media/libsydneyaudio/src/sydney_audio_pulseaudio.c.orig 2012-08-25 00:31:24.000000000 +0000 ++++ mozilla/media/libsydneyaudio/src/sydney_audio_pulseaudio.c +@@ -6,7 +6,9 @@ + #include <stdio.h> + #include <string.h> + #include <pthread.h> ++_Pragma("GCC visibility push(default)") + #include <pulse/pulseaudio.h> ++_Pragma("GCC visibility pop") + #include "sydney_audio.h" + + /* Pulseaudio implementation based heavily on sydney_audio_alsa.c */ diff --git a/mail/thunderbird17/patches/patch-mozilla_netwerk_protocol_http_HttpChannelParent.cpp b/mail/thunderbird17/patches/patch-mozilla_netwerk_protocol_http_HttpChannelParent.cpp new file mode 100644 index 00000000000..aac7b647193 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_netwerk_protocol_http_HttpChannelParent.cpp @@ -0,0 +1,18 @@ +$NetBSD: patch-mozilla_netwerk_protocol_http_HttpChannelParent.cpp,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/netwerk/protocol/http/HttpChannelParent.cpp.orig 2012-08-25 00:31:26.000000000 +0000 ++++ mozilla/netwerk/protocol/http/HttpChannelParent.cpp +@@ -299,6 +299,13 @@ HttpChannelParent::RecvUpdateAssociatedC + return true; + } + ++// Compiling with a version of GCC <= 4.4 fails with an internal compiler ++// error. ++#if !defined(__GNUC__) || \ ++ (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) ++#pragma GCC optimize ("O0") ++#endif ++ + bool + HttpChannelParent::RecvRedirect2Verify(const nsresult& result, + const RequestHeaderTuples& changedHeaders) diff --git a/mail/thunderbird17/patches/patch-mozilla_storage_src_Makefile.in b/mail/thunderbird17/patches/patch-mozilla_storage_src_Makefile.in new file mode 100644 index 00000000000..7fe0974332b --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_storage_src_Makefile.in @@ -0,0 +1,27 @@ +$NetBSD: patch-mozilla_storage_src_Makefile.in,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/storage/src/Makefile.in.orig 2012-08-25 00:31:30.000000000 +0000 ++++ mozilla/storage/src/Makefile.in +@@ -34,6 +34,22 @@ DEFINES += -DMOZ_STORAGE_MEMORY + endif + endif + ++ifeq ($(OS_ARCH),DragonFly) ++DEFINES += -DXP_BSD ++endif ++ ++ifeq ($(OS_ARCH),FreeBSD) ++DEFINES += -DXP_BSD ++endif ++ ++ifeq ($(OS_ARCH),NetBSD) ++DEFINES += -DXP_BSD ++endif ++ ++ifeq ($(OS_ARCH),FreeBSD) ++DEFINES += -DXP_BSD ++endif ++ + EXPORTS_NAMESPACES = mozilla/storage + + EXPORTS_mozilla/storage = \ diff --git a/mail/thunderbird17/patches/patch-mozilla_xpcom_Makefile.in b/mail/thunderbird17/patches/patch-mozilla_xpcom_Makefile.in new file mode 100644 index 00000000000..0fcd1289e4a --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_xpcom_Makefile.in @@ -0,0 +1,15 @@ +$NetBSD: patch-mozilla_xpcom_Makefile.in,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xpcom/Makefile.in.orig 2012-08-25 00:31:35.000000000 +0000 ++++ mozilla/xpcom/Makefile.in +@@ -35,6 +35,10 @@ DIRS += windbgdlg + endif + endif + ++ifeq ($(OS_ARCH),NetBSD) ++EXTRA_DSO_LDOPTS += -Wl,-rpath,${PREFIX}/lib/thunderbird-sdk/sdk/lib ++endif ++ + ifdef ENABLE_TESTS + TOOL_DIRS += \ + tests \ diff --git a/mail/thunderbird17/patches/patch-mozilla_xpcom_idl-parser_Makefile.in b/mail/thunderbird17/patches/patch-mozilla_xpcom_idl-parser_Makefile.in new file mode 100644 index 00000000000..c1d80f26269 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_xpcom_idl-parser_Makefile.in @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_xpcom_idl-parser_Makefile.in,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xpcom/idl-parser/Makefile.in.orig 2012-08-25 00:31:35.000000000 +0000 ++++ mozilla/xpcom/idl-parser/Makefile.in +@@ -29,7 +29,7 @@ include $(topsrcdir)/config/rules.mk + export:: $(PARSER_SRCS) $(PLY_PROGS) + $(PYTHON_PATH) \ + $(PLY_INCLUDE) \ +- $(srcdir)/header.py --cachedir=. --regen ++ $(srcdir)/header.py --cachedir=$(DEPTH)/xpcom/idl-parser/cache --regen + + check:: + $(PYTHON_PATH) \ diff --git a/mail/thunderbird17/patches/patch-mozilla_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__ppc__netbsd.cpp b/mail/thunderbird17/patches/patch-mozilla_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__ppc__netbsd.cpp new file mode 100644 index 00000000000..800b96c8cf9 --- /dev/null +++ b/mail/thunderbird17/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 2013/11/13 13:27:45 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/thunderbird17/patches/patch-mozilla_xpcom_typelib_xpidl_Makefile.in b/mail/thunderbird17/patches/patch-mozilla_xpcom_typelib_xpidl_Makefile.in new file mode 100644 index 00000000000..993a7868f7c --- /dev/null +++ b/mail/thunderbird17/patches/patch-mozilla_xpcom_typelib_xpidl_Makefile.in @@ -0,0 +1,15 @@ +$NetBSD: patch-mozilla_xpcom_typelib_xpidl_Makefile.in,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xpcom/typelib/xpidl/Makefile.in.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xpcom/typelib/xpidl/Makefile.in +@@ -16,8 +16,8 @@ SDK_BINARY = \ + $(topsrcdir)/xpcom/idl-parser/xpidl.py \ + $(topsrcdir)/xpcom/idl-parser/header.py \ + $(topsrcdir)/xpcom/idl-parser/typelib.py \ +- $(DEPTH)/xpcom/idl-parser/xpidllex.py \ +- $(DEPTH)/xpcom/idl-parser/xpidlyacc.py \ ++ $(DEPTH)/xpcom/idl-parser/cache/xpidllex.py \ ++ $(DEPTH)/xpcom/idl-parser/cache/xpidlyacc.py \ + $(NULL) + + ifndef MOZ_SYSTEM_PLY diff --git a/mail/thunderbird17/patches/patch-mp b/mail/thunderbird17/patches/patch-mp new file mode 100644 index 00000000000..8f51a2840b8 --- /dev/null +++ b/mail/thunderbird17/patches/patch-mp @@ -0,0 +1,17 @@ +$NetBSD: patch-mp,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/media/libsydneyaudio/src/Makefile.in.orig 2012-08-25 00:31:24.000000000 +0000 ++++ mozilla/media/libsydneyaudio/src/Makefile.in +@@ -72,6 +72,12 @@ ifeq ($(OS_ARCH),WINNT) + OS_LIBS += winmm.lib + endif + ++ifdef PKGSRC_PULSEAUDIO ++CSRCS = \ ++ sydney_audio_pulseaudio.c \ ++ $(NULL) ++endif ++ + include $(topsrcdir)/config/rules.mk + + LOCAL_INCLUDES += -I$(srcdir)/../include diff --git a/mail/thunderbird17/patches/patch-pa b/mail/thunderbird17/patches/patch-pa new file mode 100644 index 00000000000..f20d7b7400f --- /dev/null +++ b/mail/thunderbird17/patches/patch-pa @@ -0,0 +1,11 @@ +$NetBSD: patch-pa,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xulrunner/installer/mozilla-js.pc.in.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xulrunner/installer/mozilla-js.pc.in +@@ -6,5 +6,5 @@ Name: JavaScript + Description: The Mozilla JavaScript Library + Version: %MOZILLA_VERSION% + Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib %MOZ_JS_LINK% ++Libs: -Wl,-R${prefix}/lib/thunderbird -Wl,-R${prefix}/lib/thunderbird-sdk -L${prefix}/lib/thunderbird %MOZ_JS_LINK% + Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE diff --git a/mail/thunderbird17/patches/patch-pb b/mail/thunderbird17/patches/patch-pb new file mode 100644 index 00000000000..b672a76a5c2 --- /dev/null +++ b/mail/thunderbird17/patches/patch-pb @@ -0,0 +1,11 @@ +$NetBSD: patch-pb,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xulrunner/installer/libxul.pc.in.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xulrunner/installer/libxul.pc.in +@@ -7,5 +7,5 @@ Name: libxul + Description: The Mozilla Runtime and Embedding Engine + Version: %MOZILLA_VERSION% + Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib %MOZ_XUL_LINK% ++Libs: -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner %MOZ_XUL_LINK% + Cflags: -I${includedir} %WCHAR_CFLAGS% diff --git a/mail/thunderbird17/patches/patch-pc b/mail/thunderbird17/patches/patch-pc new file mode 100644 index 00000000000..2598bd04f7f --- /dev/null +++ b/mail/thunderbird17/patches/patch-pc @@ -0,0 +1,12 @@ +$NetBSD: patch-pc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xulrunner/installer/libxul-embedding.pc.in.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xulrunner/installer/libxul-embedding.pc.in +@@ -6,5 +6,6 @@ idldir=%idldir% + Name: libxul-embedding + Description: Static library for version-independent embedding of the Mozilla runtime + Version: %MOZILLA_VERSION% +-Libs: -L${sdkdir}/lib -lxpcomglue -ldl ++# XXXtnn -ldl removed ++Libs: -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner -lxpcomglue + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/mail/thunderbird17/patches/patch-pd b/mail/thunderbird17/patches/patch-pd new file mode 100644 index 00000000000..299fb1ffe58 --- /dev/null +++ b/mail/thunderbird17/patches/patch-pd @@ -0,0 +1,11 @@ +$NetBSD: patch-pd,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xulrunner/installer/mozilla-nss.pc.in.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xulrunner/installer/mozilla-nss.pc.in +@@ -6,5 +6,5 @@ Name: NSS + Description: Mozilla Network Security Services + Version: %MOZILLA_VERSION% + Requires: %NSPR_NAME% >= %NSPR_VERSION% +-Libs: -L${sdkdir}/lib -lsmime3 -lssl3 -lnss3 -lnssutil3 ++Libs: -Wl,-R${prefix}/lib/thunderbird -Wl,-R${prefix}/lib/thunderbird-sdk -L${prefix}/lib/xulrunner -lsmime3 -lssl3 -lnss3 -lnssutil3 + Cflags: -I${includedir} diff --git a/mail/thunderbird17/patches/patch-pg b/mail/thunderbird17/patches/patch-pg new file mode 100644 index 00000000000..1cafd814cc2 --- /dev/null +++ b/mail/thunderbird17/patches/patch-pg @@ -0,0 +1,14 @@ +$NetBSD: patch-pg,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xulrunner/installer/mozilla-nspr.pc.in.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xulrunner/installer/mozilla-nspr.pc.in +@@ -5,7 +5,5 @@ includedir=%includedir% + Name: NSPR + Description: The Netscape Portable Runtime + Version: %NSPR_VERSION% +-Libs: %FULL_NSPR_LIBS% +-Cflags: %FULL_NSPR_CFLAGS% +- +- ++Libs: -Wl,-R${prefix}/lib/xulrunner -Wl,-R${prefix}/lib/xulrunner -L${prefix}/lib/xulrunner -lplds4 -lplc4 -lnspr4 -pthread ++Cflags: -I${includedir} diff --git a/mail/thunderbird17/patches/patch-rc b/mail/thunderbird17/patches/patch-rc new file mode 100644 index 00000000000..fc3f78aa337 --- /dev/null +++ b/mail/thunderbird17/patches/patch-rc @@ -0,0 +1,14 @@ +$NetBSD: patch-rc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/browser/branding/unofficial/locales/en-US/brand.dtd.orig 2012-08-25 00:30:57.000000000 +0000 ++++ mozilla/browser/branding/unofficial/locales/en-US/brand.dtd +@@ -2,7 +2,7 @@ + - 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/. --> + +-<!ENTITY brandShortName "Mozilla Developer Preview"> +-<!ENTITY brandFullName "Mozilla Developer Preview"> ++<!ENTITY brandShortName "Browser"> ++<!ENTITY brandFullName "Browser"> + <!ENTITY vendorShortName "mozilla.org"> + <!ENTITY trademarkInfo.part1 " "> diff --git a/mail/thunderbird17/patches/patch-toolkit_toolkit-tiers.mk b/mail/thunderbird17/patches/patch-toolkit_toolkit-tiers.mk new file mode 100644 index 00000000000..be7f0867375 --- /dev/null +++ b/mail/thunderbird17/patches/patch-toolkit_toolkit-tiers.mk @@ -0,0 +1,13 @@ +$NetBSD: patch-toolkit_toolkit-tiers.mk,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/toolkit/toolkit-tiers.mk.orig 2012-08-25 00:31:34.000000000 +0000 ++++ mozilla/toolkit/toolkit-tiers.mk +@@ -47,7 +47,7 @@ ifdef MOZ_UPDATER + ifndef MOZ_NATIVE_BZ2 + tier_platform_dirs += modules/libbz2 + endif +-tier_platform_dirs += other-licenses/bsdiff ++#tier_platform_dirs += other-licenses/bsdiff + endif + + tier_platform_dirs += gfx/qcms diff --git a/mail/thunderbird17/patches/patch-xa b/mail/thunderbird17/patches/patch-xa new file mode 100644 index 00000000000..74ec96dc0a9 --- /dev/null +++ b/mail/thunderbird17/patches/patch-xa @@ -0,0 +1,119 @@ +$NetBSD: patch-xa,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +NetBSD/sparc64 xptcall support code. From pkgsrc/www/firefox3/files/ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_netbsd.s.orig 2012-08-31 13:21:49.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_sparc64_netbsd.s +@@ -0,0 +1,112 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * The contents of this file are subject to the Netscape Public ++ * License Version 1.1 (the "License"); you may not use this file ++ * except in compliance with the License. You may obtain a copy of ++ * the License at http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS ++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * rights and limitations under the License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is Netscape ++ * Communications Corporation. Portions created by Netscape are ++ * Copyright (C) 1998 Netscape Communications Corporation. All ++ * Rights Reserved. ++ * ++ * Contributor(s): ++ */ ++ ++/* Platform specific code to invoke XPCOM methods on native objects */ ++ .global NS_InvokeByIndex_P ++ .type NS_InvokeByIndex_P, #function ++/* ++ NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, ++ PRUint32 paramCount, nsXPTCVariant* params); ++ ++*/ ++/* ++ * Note: To simplify stack handling we allocate an extra stack ++ * frame here. In principle invoke_copy_to_stack() could ++ * save the parameters our caller's frame and we could ++ * reclaim the stackframe and do a tail call to the ++ * function. However, this gets complicated.... ++ * ++ * The vtable consist of be: ++ * ++ * struct { ++ * short __delta; ++ * short __index; ++ * union { ++ * P __pfn; ++ * short __delta2; ++ * } __pfn_or_delta2; ++ * }; ++ * ++ * See gcc/cp/cp-tree.h ++ */ ++ ++NS_InvokeByIndex_P: ++ save %sp,-(128 + 64),%sp ! room for the register window and ++ ! struct pointer, rounded up to 0 % 64 ++ sll %i2,4,%l0 ! assume the worst case ++ ! paramCount * 2 * 8 bytes ++ cmp %l0, 0 ! are there any args? If not, ++ be .invoke ! no need to copy args to stack ++ nop ++ ++ sub %sp,%l0,%sp ! create the additional stack space ++ add %sp,0x7ff+136,%o0 ! step past the register window, the ++ ! struct result pointer and the 'this' slot ++ mov %i2,%o1 ! paramCount ++ call invoke_copy_to_stack ++ mov %i3,%o2 ! params ++ ++! ++! load arguments from stack into the outgoing registers ++! BIAS is 0x7ff (2047) ++! ++ ++! load the %o1..5 64bit (extended word) output registers registers ++ ldx [%sp + 0x7ff + 136],%o1 ! %i1 ++ ldx [%sp + 0x7ff + 144],%o2 ! %i2 ++ ldx [%sp + 0x7ff + 152],%o3 ! %i3 ++ ldx [%sp + 0x7ff + 160],%o4 ! %i4 ++ ldx [%sp + 0x7ff + 168],%o5 ! %i5 ++ ++! load the even number double registers starting with %f2 ++ ldd [%sp + 0x7ff + 136],%f2 ++ ldd [%sp + 0x7ff + 144],%f4 ++ ldd [%sp + 0x7ff + 152],%f6 ++ ldd [%sp + 0x7ff + 160],%f8 ++ ldd [%sp + 0x7ff + 168],%f10 ++ ldd [%sp + 0x7ff + 176],%f12 ++ ldd [%sp + 0x7ff + 184],%f14 ++ ldd [%sp + 0x7ff + 192],%f16 ++ ldd [%sp + 0x7ff + 200],%f18 ++ ldd [%sp + 0x7ff + 208],%f20 ++ ldd [%sp + 0x7ff + 216],%f22 ++ ldd [%sp + 0x7ff + 224],%f24 ++ ldd [%sp + 0x7ff + 232],%f26 ++ ldd [%sp + 0x7ff + 240],%f28 ++ ldd [%sp + 0x7ff + 248],%f30 ++ ++! ++! calculate the target address from the vtable ++! ++.invoke: ++ sll %i1,3,%l0 ! index *= 8 ++ ldx [%i0],%l1 ! *this --> address of vtable ++ ldx [%l0 + %l1],%l0 ! this->vtable[index] --> address ++ ++ jmpl %l0,%o7 ! call the routine ++ mov %i0,%o0 ! move 'this' pointer to out register ++ ++ mov %o0,%i0 ! propagate return value ++ ret ++ restore ++ ++ .size NS_InvokeByIndex_P, .-NS_InvokeByIndex_P diff --git a/mail/thunderbird17/patches/patch-xb b/mail/thunderbird17/patches/patch-xb new file mode 100644 index 00000000000..f9d12ff88ed --- /dev/null +++ b/mail/thunderbird17/patches/patch-xb @@ -0,0 +1,91 @@ +$NetBSD: patch-xb,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +NetBSD/sparc64 xptcall support code. From pkgsrc/www/firefox3/files/ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_netbsd.cpp.orig 2012-08-31 13:21:49.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_sparc64_netbsd.cpp +@@ -0,0 +1,84 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * The contents of this file are subject to the Netscape Public ++ * License Version 1.1 (the "License"); you may not use this file ++ * except in compliance with the License. You may obtain a copy of ++ * the License at http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS ++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * rights and limitations under the License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is Netscape ++ * Communications Corporation. Portions created by Netscape are ++ * Copyright (C) 1998 Netscape Communications Corporation. All ++ * Rights Reserved. ++ * ++ * Contributor(s): ++ */ ++ ++/* Platform specific code to invoke XPCOM methods on native objects */ ++ ++#include "xptcprivate.h" ++ ++#if !defined(__sparc64__) && !defined(_LP64) ++#error "This code is for Sparc64 only" ++#endif ++ ++extern "C" PRUint32 ++invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s) ++{ ++ /* ++ We need to copy the parameters for this function to locals and use them ++ from there since the parameters occupy the same stack space as the stack ++ we're trying to populate. ++ */ ++ PRUint64 *l_d = d; ++ nsXPTCVariant *l_s = s; ++ PRUint64 l_paramCount = paramCount; ++ PRUint64 regCount = 0; // return the number of registers to load from the stack ++ ++ for(PRUint64 i = 0; i < l_paramCount; i++, l_d++, l_s++) ++ { ++ if (regCount < 5) regCount++; ++ ++ if (l_s->IsPtrData()) ++ { ++ *l_d = (PRUint64)l_s->ptr; ++ continue; ++ } ++ switch (l_s->type) ++ { ++ case nsXPTType::T_I8 : *((PRInt64*)l_d) = l_s->val.i8; break; ++ case nsXPTType::T_I16 : *((PRInt64*)l_d) = l_s->val.i16; break; ++ case nsXPTType::T_I32 : *((PRInt64*)l_d) = l_s->val.i32; break; ++ case nsXPTType::T_I64 : *((PRInt64*)l_d) = l_s->val.i64; break; ++ ++ case nsXPTType::T_U8 : *((PRUint64*)l_d) = l_s->val.u8; break; ++ case nsXPTType::T_U16 : *((PRUint64*)l_d) = l_s->val.u16; break; ++ case nsXPTType::T_U32 : *((PRUint64*)l_d) = l_s->val.u32; break; ++ case nsXPTType::T_U64 : *((PRUint64*)l_d) = l_s->val.u64; break; ++ ++ /* in the case of floats, we want to put the bits in to the ++ 64bit space right justified... floats in the paramter array on ++ sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip ++ the space that would be occupied by %f0, %f2, etc. ++ */ ++ case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break; ++ case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break; ++ case nsXPTType::T_BOOL : *((PRInt64*)l_d) = l_s->val.b; break; ++ case nsXPTType::T_CHAR : *((PRUint64*)l_d) = l_s->val.c; break; ++ case nsXPTType::T_WCHAR : *((PRInt64*)l_d) = l_s->val.wc; break; ++ ++ default: ++ // all the others are plain pointer types ++ *((void**)l_d) = l_s->val.p; ++ break; ++ } ++ } ++ ++ return regCount; ++} diff --git a/mail/thunderbird17/patches/patch-xc b/mail/thunderbird17/patches/patch-xc new file mode 100644 index 00000000000..3c6da4a1511 --- /dev/null +++ b/mail/thunderbird17/patches/patch-xc @@ -0,0 +1,73 @@ +$NetBSD: patch-xc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +NetBSD/sparc64 xptcall support code. From pkgsrc/www/firefox3/files/ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc64_netbsd.s.orig 2012-08-31 13:21:49.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_sparc64_netbsd.s +@@ -0,0 +1,66 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * The contents of this file are subject to the Netscape Public ++ * License Version 1.1 (the "License"); you may not use this file ++ * except in compliance with the License. You may obtain a copy of ++ * the License at http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS ++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * rights and limitations under the License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is Netscape ++ * Communications Corporation. Portions created by Netscape are ++ * Copyright (C) 1999 Netscape Communications Corporation. All ++ * Rights Reserved. ++ * ++ * Contributor(s): ++ */ ++ ++ .global SharedStub ++ ++/* ++ in the frame for the function that called SharedStub are the ++ rest of the parameters we need ++ ++*/ ++ ++SharedStub: ++! we don't create a new frame yet, but work within the frame of the calling ++! function to give ourselves the other parameters we want ++ ++ mov %o0, %o1 ! shuffle the index up to 2nd place ++ mov %i0, %o0 ! the original 'this' ++ add %fp, 0x7ff + 136, %o2 ! previous stack top adjusted to the first argument slot (beyond 'this') ++ ++! save off the original incoming parameters that arrived in ++! registers, the ABI guarantees the space for us to do this ++ stx %i1, [%fp + 0x7ff + 136] ++ stx %i2, [%fp + 0x7ff + 144] ++ stx %i3, [%fp + 0x7ff + 152] ++ stx %i4, [%fp + 0x7ff + 160] ++ stx %i5, [%fp + 0x7ff + 168] ++! now we can build our own stack frame ++ save %sp,-(128 + 64),%sp ! room for the register window and ++ ! struct pointer, rounded up to 0 % 64 ++! our function now appears to have been called ++! as SharedStub(nsISupports* that, PRUint32 index, PRUint32* args) ++! so we can just copy these through ++ ++ mov %i0, %o0 ++ mov %i1, %o1 ++ mov %i2, %o2 ++ call PrepareAndDispatch ++ nop ++ mov %o0,%i0 ! propagate return value ++ b .LL1 ++ nop ++.LL1: ++ ret ++ restore ++ ++ .size SharedStub, .-SharedStub ++ .type SharedStub, #function diff --git a/mail/thunderbird17/patches/patch-xd b/mail/thunderbird17/patches/patch-xd new file mode 100644 index 00000000000..5b0527725ae --- /dev/null +++ b/mail/thunderbird17/patches/patch-xd @@ -0,0 +1,126 @@ +$NetBSD: patch-xd,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +NetBSD/sparc64 xptcall support code. From pkgsrc/www/firefox3/files/ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_netbsd.cpp.orig 2012-08-31 13:21:49.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc64_netbsd.cpp +@@ -0,0 +1,119 @@ ++/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- ++ * ++ * The contents of this file are subject to the Netscape Public ++ * License Version 1.1 (the "License"); you may not use this file ++ * except in compliance with the License. You may obtain a copy of ++ * the License at http://www.mozilla.org/NPL/ ++ * ++ * Software distributed under the License is distributed on an "AS ++ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or ++ * implied. See the License for the specific language governing ++ * rights and limitations under the License. ++ * ++ * The Original Code is mozilla.org code. ++ * ++ * The Initial Developer of the Original Code is Netscape ++ * Communications Corporation. Portions created by Netscape are ++ * Copyright (C) 1999 Netscape Communications Corporation. All ++ * Rights Reserved. ++ * ++ * Contributor(s): ++ */ ++ ++/* Implement shared vtbl methods. */ ++ ++#include "xptcprivate.h" ++#include "xptiprivate.h" ++ ++#if defined(sparc) || defined(__sparc__) ++ ++extern "C" nsresult ++PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args) ++{ ++ ++#define PARAM_BUFFER_COUNT 16 ++ ++ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; ++ nsXPTCMiniVariant* dispatchParams = NULL; ++ const nsXPTMethodInfo* info; ++ PRUint8 paramCount; ++ PRUint8 i; ++ nsresult result = NS_ERROR_FAILURE; ++ ++ NS_ASSERTION(self,"no self"); ++ ++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); ++ NS_ASSERTION(info,"no interface info"); ++ ++ paramCount = info->GetParamCount(); ++ ++ // setup variant array pointer ++ if(paramCount > PARAM_BUFFER_COUNT) ++ dispatchParams = new nsXPTCMiniVariant[paramCount]; ++ else ++ dispatchParams = paramBuffer; ++ NS_ASSERTION(dispatchParams,"no place for params"); ++ if (!dispatchParams) ++ return NS_ERROR_OUT_OF_MEMORY; ++ ++ PRUint64* ap = args; ++ for(i = 0; i < paramCount; i++, ap++) ++ { ++ const nsXPTParamInfo& param = info->GetParam(i); ++ const nsXPTType& type = param.GetType(); ++ nsXPTCMiniVariant* dp = &dispatchParams[i]; ++ ++ if(param.IsOut() || !type.IsArithmetic()) ++ { ++ dp->val.p = (void*) *ap; ++ continue; ++ } ++ // else ++ switch(type) ++ { ++ case nsXPTType::T_BOOL : dp->val.b = *((PRInt64*) ap); break; ++ case nsXPTType::T_CHAR : dp->val.c = *((PRUint64*) ap); break; ++ case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt64*) ap); break; ++ case nsXPTType::T_I8 : dp->val.i8 = *((PRInt64*) ap); break; ++ case nsXPTType::T_I16 : dp->val.i16 = *((PRInt64*) ap); break; ++ case nsXPTType::T_I32 : dp->val.i32 = *((PRInt64*) ap); break; ++ case nsXPTType::T_I64 : dp->val.i64 = *((PRInt64*) ap); break; ++ case nsXPTType::T_U8 : dp->val.u8 = *((PRUint64*) ap); break; ++ case nsXPTType::T_U16 : dp->val.u16 = *((PRUint64*)ap); break; ++ case nsXPTType::T_U32 : dp->val.u32 = *((PRUint64*)ap); break; ++ case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*) ap); break; ++ case nsXPTType::T_FLOAT : dp->val.f = ((float*) ap)[1]; break; ++ case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break; ++ default: ++ NS_ASSERTION(0, "bad type"); ++ break; ++ } ++ } ++ ++ result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams); ++ ++ if(dispatchParams != paramBuffer) ++ delete [] dispatchParams; ++ ++ return result; ++} ++ ++extern "C" int SharedStub(int, int*); ++ ++#define STUB_ENTRY(n) \ ++nsresult nsXPTCStubBase::Stub##n() \ ++{ \ ++ int dummy; /* defeat tail-call optimization */ \ ++ return SharedStub(n, &dummy); \ ++} ++ ++#define SENTINEL_ENTRY(n) \ ++nsresult nsXPTCStubBase::Sentinel##n() \ ++{ \ ++ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ ++ return NS_ERROR_NOT_IMPLEMENTED; \ ++} ++ ++#include "xptcstubsdef.inc" ++ ++#endif /* sparc || __sparc__ */ diff --git a/mail/thunderbird17/patches/patch-xe b/mail/thunderbird17/patches/patch-xe new file mode 100644 index 00000000000..656e429725e --- /dev/null +++ b/mail/thunderbird17/patches/patch-xe @@ -0,0 +1,77 @@ +$NetBSD: patch-xe,v 1.1 2013/11/13 13:27:45 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-11-19 22:42:44.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp +@@ -100,6 +100,15 @@ extern "C" { + } + } + ++/* ++ * SYMBOL PREFIX must be "_" for aout symbols and "" for ELF ++ */ ++#ifndef __ELF__ ++#define SYMBOLPREFIX "_" ++#else ++#define SYMBOLPREFIX ++#endif ++ + XPTC_PUBLIC_API(nsresult) + 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" +- "movl %3, sp@-\n\t" +- "jbsr _invoke_count_words\n\t" /* count words */ +- "addql #8, sp\n\t" +- "lsll #2, d0\n\t" /* *= 4 */ +- "movl sp, a2\n\t" /* save original sp */ +- "subl d0, sp\n\t" /* make room for params */ +- "movl sp, a0\n\t" +- "movl %4, sp@-\n\t" +- "movl %3, sp@-\n\t" +- "movl a0, sp@-\n\t" +- "jbsr _invoke_copy_to_stack\n\t" /* copy params */ +- "addl #12, sp\n\t" +- "movl %1, a0\n\t" +- "movl a0@, a1\n\t" +- "movl %2, d0\n\t" /* function index */ +- "movl a0, d1\n\t" +- "movw a1@(8,d0:l:8), a0\n\t" +- "addl a0, d1\n\t" +- "movl a1@(12,d0:l:8), a1\n\t" +- "movl d1, sp@-\n\t" +- "jbsr a1@\n\t" +- "movl a2, sp\n\t" /* restore original sp */ +- "movl d0, %0\n\t" ++ "movl %4, %%sp@-\n\t" ++ "movl %3, %%sp@-\n\t" ++ "jbsr "SYMBOLPREFIX"invoke_count_words\n\t" /* count words */ ++ "addql #8, %%sp\n\t" ++ "lsll #2, %%d0\n\t" /* *= 4 */ ++ "movl %%sp, %%a2\n\t" /* save original sp */ ++ "subl %%d0, %%sp\n\t" /* make room for params */ ++ "movl %%sp, %%a0\n\t" ++ "movl %4, %%sp@-\n\t" ++ "movl %3, %%sp@-\n\t" ++ "movl %%a0, %%sp@-\n\t" ++ "jbsr "SYMBOLPREFIX"invoke_copy_to_stack\n\t" /* copy params */ ++ "addl #12, %%sp\n\t" ++ "movl %1, %%a0\n\t" ++ "movl %%a0@, %%a1\n\t" ++ "movl %2, %%d0\n\t" /* function index */ ++ "movl %%a0, %%d1\n\t" ++ "movw %%a1@(8,%%d0:l:8), %%a0\n\t" ++ "addl %%a0, %%d1\n\t" ++ "movl %%a1@(12,%%d0:l:8), %%a1\n\t" ++ "movl %%d1, %%sp@-\n\t" ++ "jbsr %%a1@\n\t" ++ "movl %%a2, %%sp\n\t" /* restore original sp */ ++ "movl %%d0, %0\n\t" + : "=g" (result) /* %0 */ + : "g" (that), /* %1 */ + "g" (methodIndex), /* %2 */ diff --git a/mail/thunderbird17/patches/patch-xf b/mail/thunderbird17/patches/patch-xf new file mode 100644 index 00000000000..3ee07f44337 --- /dev/null +++ b/mail/thunderbird17/patches/patch-xf @@ -0,0 +1,43 @@ +$NetBSD: patch-xf,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +NetBSD/m68k xptcall support code. From pkgsrc/www/firefox/patch-ae. + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp +@@ -91,17 +91,27 @@ extern "C" { + } + } + ++/* ++ * Beware: use % instead of %% for register identifiers in a preprocessor macro ++ * SYMBOL PREFIX must be "_" for aout and "" for ELF ++ */ ++#ifndef __ELF__ ++#define SYMBOLPREFIX "_" ++#else ++#define SYMBOLPREFIX ++#endif ++ + #define STUB_ENTRY(n) \ + __asm__( \ +- ".global _Stub"#n"__14nsXPTCStubBase\n\t" \ +-"_Stub"#n"__14nsXPTCStubBase:\n\t" \ +- "link a6,#0 \n\t" \ +- "lea a6@(12), a0 \n\t" /* pointer to args */ \ +- "movl a0, sp@- \n\t" \ +- "movl #"#n", sp@- \n\t" /* method index */ \ +- "movl a6@(8), sp@- \n\t" /* this */ \ +- "jbsr _PrepareAndDispatch \n\t" \ +- "unlk a6 \n\t" \ ++ ".global "SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase\n\t" \ ++SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase:\n\t" \ ++ "link %a6,#0 \n\t" \ ++ "lea %a6@(12), %a0 \n\t" /* pointer to args */ \ ++ "movl %a0, %sp@- \n\t" \ ++ "movl #"#n", %sp@- \n\t" /* method index */ \ ++ "movl %a6@(8), %sp@- \n\t" /* this */ \ ++ "jbsr "SYMBOLPREFIX"PrepareAndDispatch\n\t" \ ++ "unlk %a6 \n\t" \ + "rts \n\t" \ + ); + diff --git a/mail/thunderbird17/patches/patch-xg b/mail/thunderbird17/patches/patch-xg new file mode 100644 index 00000000000..c671b5618f9 --- /dev/null +++ b/mail/thunderbird17/patches/patch-xg @@ -0,0 +1,33 @@ +$NetBSD: patch-xg,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +NetBSD/arm xptcall support code. From pkgsrc/www/firefox/patch-bm. + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp.orig 2012-08-25 00:31:35.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp +@@ -86,18 +86,23 @@ PrepareAndDispatch(nsXPTCStubBase* self, + * so they are contiguous with values passed on the stack, and then calls + * PrepareAndDispatch() to do the dirty work. + */ ++#ifndef __ELF__ ++#define SYMBOLPREFIX "_" ++#else ++#define SYMBOLPREFIX ++#endif + + #define STUB_ENTRY(n) \ + __asm__( \ +- ".global _Stub"#n"__14nsXPTCStubBase\n\t" \ +-"_Stub"#n"__14nsXPTCStubBase:\n\t" \ ++ ".global "SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase\n\t" \ ++SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase:\n\t" \ + "stmfd sp!, {r1, r2, r3} \n\t" \ + "mov ip, sp \n\t" \ + "stmfd sp!, {fp, ip, lr, pc} \n\t" \ + "sub fp, ip, #4 \n\t" \ + "mov r1, #"#n" \n\t" /* = methodIndex */ \ + "add r2, sp, #16 \n\t" \ +- "bl _PrepareAndDispatch__FP14nsXPTCStubBaseUiPUi \n\t" \ ++ "bl "SYMBOLPREFIX"PrepareAndDispatch__FP14nsXPTCStubBaseUiPUi \n\t" \ + "ldmea fp, {fp, sp, lr} \n\t" \ + "add sp, sp, #12 \n\t" \ + "mov pc, lr \n\t" \ diff --git a/mail/thunderbird17/patches/patch-xj b/mail/thunderbird17/patches/patch-xj new file mode 100644 index 00000000000..8407886f599 --- /dev/null +++ b/mail/thunderbird17/patches/patch-xj @@ -0,0 +1,128 @@ +$NetBSD: patch-xj,v 1.1 2013/11/13 13:27:45 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-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. + + #include "xptcprivate.h" ++#include "xptiprivate.h" + + // The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral + // parameters and the first 8 floating point parameters in registers +@@ -36,7 +37,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, + { + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; + nsXPTCMiniVariant* dispatchParams = NULL; +- nsIInterfaceInfo* iface_info = NULL; + const nsXPTMethodInfo* info; + uint32_t paramCount; + uint32_t i; +@@ -44,11 +44,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, + + NS_ASSERTION(self,"no self"); + +- self->GetInterfaceInfo(&iface_info); +- NS_ASSERTION(iface_info,"no interface info"); +- if (! iface_info) +- return NS_ERROR_UNEXPECTED; +- ++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); + iface_info->GetMethodInfo(uint16_t(methodIndex), &info); + NS_ASSERTION(info,"no method info"); + if (! info) +@@ -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 + if (gpr < GPR_COUNT) + gpr += 2; ++#endif + } + continue; + } +@@ -95,8 +93,10 @@ PrepareAndDispatch(nsXPTCStubBase* self, + else { + dp->val.f = *(float*) ap; + ap += 1; ++#if __GXX_ABI_VERSION < 100 + if (gpr < GPR_COUNT) + gpr += 1; ++#endif + } + continue; + } +@@ -144,9 +144,9 @@ PrepareAndDispatch(nsXPTCStubBase* self, + } + } + +- result = self->CallMethod((uint16_t) methodIndex, info, dispatchParams); +- +- NS_RELEASE(iface_info); ++ result = self->mOuter->CallMethod((PRUint16) methodIndex, ++ info, ++ dispatchParams); + + if (dispatchParams != paramBuffer) + delete [] dispatchParams; +@@ -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 ;-). + +-#define STUB_ENTRY(n) \ ++#if __GXX_ABI_VERSION < 100 ++// gcc-2 version ++# define STUB_ENTRY(n) \ + __asm__ ( \ + ".section \".text\" \n\t" \ + ".align 2 \n\t" \ +@@ -171,6 +173,46 @@ __asm__ ( + "li 11,"#n" \n\t" \ + "b SharedStub@local \n" \ + ); ++#else ++// gcc-3 version ++// ++// As G++3 ABI contains the length of the functionname in the mangled ++// name, it is difficult to get a generic assembler mechanism like ++// in the G++ 2.95 case. ++// Create names would be like: ++// _ZN14nsXPTCStubBase5Stub1Ev ++// _ZN14nsXPTCStubBase6Stub12Ev ++// _ZN14nsXPTCStubBase7Stub123Ev ++// _ZN14nsXPTCStubBase8Stub1234Ev ++// etc. ++// Use assembler directives to get the names right... ++ ++# define STUB_ENTRY(n) \ ++__asm__ ( \ ++ ".align 2 \n\t" \ ++ ".if "#n" < 10 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \ ++ \ ++ ".elseif "#n" < 100 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \ ++ \ ++ ".elseif "#n" < 1000 \n\t" \ ++ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \ ++ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \ ++"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \ ++ \ ++ ".else \n\t" \ ++ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \ ++ ".endif \n\t" \ ++ \ ++ "li 11,"#n" \n\t" \ ++ "b SharedStub@local \n" \ ++); ++#endif + + #define SENTINEL_ENTRY(n) \ + nsresult nsXPTCStubBase::Sentinel##n() \ diff --git a/mail/thunderbird17/patches/patch-xk b/mail/thunderbird17/patches/patch-xk new file mode 100644 index 00000000000..768b16a8e9b --- /dev/null +++ b/mail/thunderbird17/patches/patch-xk @@ -0,0 +1,72 @@ +$NetBSD: patch-xk,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +NetBSD ppc xptcall support code. Originally from pkgsrc/www/mozilla. + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s.orig 2012-08-25 00:31:36.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s +@@ -25,23 +25,23 @@ + .type SharedStub,@function + + SharedStub: +- stwu sp,-112(sp) # room for +- # linkage (8), +- # gprData (32), +- # fprData (64), +- # stack alignment(8) ++ stwu sp,-112(sp) // room for ++ // linkage (8), ++ // gprData (32), ++ // fprData (64), ++ // stack alignment(8) + mflr r0 +- stw r0,116(sp) # save LR backchain ++ stw r0,116(sp) // save LR backchain + +- stw r4,12(sp) # save GP registers +- stw r5,16(sp) # (n.b. that we don't save r3 +- stw r6,20(sp) # because PrepareAndDispatch() is savvy) ++ stw r4,12(sp) // save GP registers ++ stw r5,16(sp) // (n.b. that we don't save r3 ++ stw r6,20(sp) // because PrepareAndDispatch() is savvy) + stw r7,24(sp) + stw r8,28(sp) + stw r9,32(sp) + stw r10,36(sp) + +- stfd f1,40(sp) # save FP registers ++ stfd f1,40(sp) // save FP registers + stfd f2,48(sp) + stfd f3,56(sp) + stfd f4,64(sp) +@@ -50,21 +50,21 @@ SharedStub: + stfd f7,88(sp) + stfd f8,96(sp) + +- # r3 has the 'self' pointer already ++ // r3 has the 'self' pointer already + +- mr r4,r11 # r4 <= methodIndex selector, passed +- # via r11 in the nsXPTCStubBase::StubXX() call ++ mr r4,r11 // r4 <= methodIndex selector, passed ++ // via r11 in the nsXPTCStubBase::StubXX() call + +- addi r5,sp,120 # r5 <= pointer to callers args area, +- # beyond r3-r10/f1-f8 mapped range ++ addi r5,sp,120 // r5 <= pointer to callers args area, ++ // beyond r3-r10/f1-f8 mapped range + +- addi r6,sp,8 # r6 <= gprData +- addi r7,sp,40 # r7 <= fprData ++ addi r6,sp,8 // r6 <= gprData ++ addi r7,sp,40 // r7 <= fprData + +- bl PrepareAndDispatch@local # Go! ++ bl PrepareAndDispatch@local // Go! + +- lwz r0,116(sp) # restore LR ++ lwz r0,116(sp) // restore LR + mtlr r0 +- la sp,112(sp) # clean up the stack ++ la sp,112(sp) // clean up the stack + blr + diff --git a/mail/thunderbird17/patches/patch-xl b/mail/thunderbird17/patches/patch-xl new file mode 100644 index 00000000000..31a53d617ec --- /dev/null +++ b/mail/thunderbird17/patches/patch-xl @@ -0,0 +1,74 @@ +$NetBSD: patch-xl,v 1.1 2013/11/13 13:27:45 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-11-19 22:42:44.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s +@@ -20,41 +20,42 @@ + + .section ".text" + .align 2 +- .globl XPTC_InvokeByIndex +- .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, uint32_t methodIndex, +-# uint32_t paramCount, nsXPTCVariant* params) +-# +- +-XPTC_InvokeByIndex: +- 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) + +- stw r0,36(sp) # store LR backchain ++ stw r0,36(sp) // store LR backchain + mr r31,sp + +- rlwinm r10,r5,3,0,27 # r10 = (ParamCount * 2 * 4) & ~0x0f +- addi r0,r10,96 # reserve stack for GPR and FPR register save area r0 = r10 + 96 +- lwz r9,0(sp) # r9 = backchain ++ rlwinm r10,r5,3,0,27 // r10 = (ParamCount * 2 * 4) & ~0x0f ++ addi r0,r10,96 // reserve stack for GPR and FPR register save area r0 = r10 + 96 ++ lwz r9,0(sp) // r9 = backchain + neg r0,r0 +- stwux r9,sp,r0 # reserve stack sapce and save SP backchain ++ stwux r9,sp,r0 // reserve stack sapce and save SP backchain + +- addi r3,sp,8 # r3 <= args +- mr r4,r5 # r4 <= paramCount +- mr r5,r6 # r5 <= params +- add r6,r3,r10 # r6 <= gpregs ( == args + r10 ) +- mr r30,r6 # store in r30 for use later... +- addi r7,r6,32 # r7 <= fpregs ( == gpregs + 32 ) ++ addi r3,sp,8 // r3 <= args ++ mr r4,r5 // r4 <= paramCount ++ mr r5,r6 // r5 <= params ++ add r6,r3,r10 // r6 <= gpregs ( == args + r10 ) ++ mr r30,r6 // store in r30 for use later... ++ addi r7,r6,32 // r7 <= fpregs ( == gpregs + 32 ) + +- bl invoke_copy_to_stack@local # (args, paramCount, params, gpregs, fpregs) ++ bl invoke_copy_to_stack@local // (args, paramCount, params, gpregs, fpregs) + +- lfd f1,32(r30) # load FP registers with method parameters ++ lfd f1,32(r30) // load FP registers with method parameters + lfd f2,40(r30) + lfd f3,48(r30) + lfd f4,56(r30) diff --git a/mail/thunderbird17/patches/patch-xn b/mail/thunderbird17/patches/patch-xn new file mode 100644 index 00000000000..d650d019464 --- /dev/null +++ b/mail/thunderbird17/patches/patch-xn @@ -0,0 +1,52 @@ +$NetBSD: patch-xn,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s.orig 2012-08-25 00:31:35.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s +@@ -16,6 +16,47 @@ + #include <sys/asm.h> + #endif + ++#ifdef __NetBSD__ ++# include <machine/regdef.h> ++# include <machine/asm.h> ++# ifndef fp ++# define fp s8 ++# endif ++# ifndef PTRLOG ++# if SZREG == 4 ++# define PTRLOG 2 ++# else ++# define PTRLOG 3 ++# endif ++# endif ++# ifndef SETUP_GP ++# if defined(__mips_o32) ++# define SETUP_GP \ ++ .set push; \ ++ .set noreorder; \ ++ .cpload t9; \ ++ .set pop ++# define SAVE_GP(x) \ ++ .cprestore x ++# else ++# define SETUP_GP ++# define SAVE_GP(x) ++# endif ++# endif ++# ifndef ALSZ ++# if defined(__mips_n32) || defined(__mips_n64) ++# define ALSZ 15 ++# define ALMASK ~15 ++# else ++# define ALSZ 7 ++# define ALMASK ~7 ++# endif ++# endif ++#else ++# include <sys/regdef.h> ++# include <sys/asm.h> ++#endif ++ + # NARGSAVE is the argument space in the callers frame, including extra + # 'shadowed' space for the argument registers. The minimum of 4 + # argument slots is sometimes predefined in the header files. diff --git a/mail/thunderbird17/patches/patch-xo b/mail/thunderbird17/patches/patch-xo new file mode 100644 index 00000000000..c7ed1a4643d --- /dev/null +++ b/mail/thunderbird17/patches/patch-xo @@ -0,0 +1,52 @@ +$NetBSD: patch-xo,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s.orig 2012-08-25 00:31:35.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s +@@ -14,6 +14,47 @@ + #include <sys/asm.h> + #endif + ++#ifdef __NetBSD__ ++# include <machine/regdef.h> ++# include <machine/asm.h> ++# ifndef fp ++# define fp s8 ++# endif ++# ifndef PTRLOG ++# if SZREG == 4 ++# define PTRLOG 2 ++# else ++# define PTRLOG 3 ++# endif ++# endif ++# ifndef SETUP_GP ++# if defined(__mips_o32) ++# define SETUP_GP \ ++ .set push; \ ++ .set noreorder; \ ++ .cpload t9; \ ++ .set pop ++# define SAVE_GP(x) \ ++ .cprestore x ++# else ++# define SETUP_GP ++# define SAVE_GP(x) ++# endif ++# endif ++# ifndef ALSZ ++# if defined(__mips_n32) || defined(__mips_n64) ++# define ALSZ 15 ++# define ALMASK ~15 ++# else ++# define ALSZ 7 ++# define ALMASK ~7 ++# endif ++# endif ++#else ++# include <sys/regdef.h> ++# include <sys/asm.h> ++#endif ++ + # NARGSAVE is the argument space in the callers frame, including extra + # 'shadowed' space for the argument registers. The minimum of 4 + # argument slots is sometimes predefined in the header files. diff --git a/mail/thunderbird17/patches/patch-zb b/mail/thunderbird17/patches/patch-zb new file mode 100644 index 00000000000..2bb1d06dec8 --- /dev/null +++ b/mail/thunderbird17/patches/patch-zb @@ -0,0 +1,15 @@ +$NetBSD: patch-zb,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mail/app/Makefile.in.orig 2012-08-25 00:24:32.000000000 +0000 ++++ mail/app/Makefile.in +@@ -63,6 +63,10 @@ LOCAL_INCLUDES += \ + DEFINES += -DXPCOM_GLUE + STL_FLAGS= + ++ifeq ($(OS_ARCH),NetBSD) ++LIBS += -lossaudio ++endif ++ + LIBS += \ + $(EXTRA_DSO_LIBS) \ + $(XPCOM_STANDALONE_GLUE_LDOPTS) \ diff --git a/mail/thunderbird17/patches/patch-zc b/mail/thunderbird17/patches/patch-zc new file mode 100644 index 00000000000..cd021879c4c --- /dev/null +++ b/mail/thunderbird17/patches/patch-zc @@ -0,0 +1,39 @@ +$NetBSD: patch-zc,v 1.1 2013/11/13 13:27:45 ryoon Exp $ + +--- mail/app/nsMailApp.cpp.orig 2012-10-02 17:01:07.000000000 +0000 ++++ mail/app/nsMailApp.cpp +@@ -12,6 +12,26 @@ + #include <sys/time.h> + #include <sys/resource.h> + #endif ++/* ++ * On netbsd-4, ulimit -n is 64 by default; too few for us. ++ */ ++static void netbsd_fixrlimit(void) { ++ struct rlimit rlp; ++ if (getrlimit(RLIMIT_NOFILE, &rlp) == -1) { ++ fprintf(stderr, "warning: getrlimit failed\n"); ++ return; ++ } ++ if (rlp.rlim_cur >= 512) ++ return; ++ if (rlp.rlim_max < 512) { ++ fprintf(stderr, "warning: hard limit of 'ulimit -n' too low\n"); ++ rlp.rlim_cur = rlp.rlim_max; ++ } ++ else ++ rlp.rlim_cur = 512; ++ if (setrlimit(RLIMIT_NOFILE, &rlp) == -1) ++ fprintf(stderr, "warning: setrlimit failed\n"); ++ } + + #ifdef XP_MACOSX + #include "MacQuirks.h" +@@ -115,6 +135,7 @@ static int do_main(const char *exePath, + + int main(int argc, char* argv[]) + { ++ netbsd_fixrlimit(); + char exePath[MAXPATHLEN]; + + #ifdef XP_MACOSX |