diff options
author | ryoon <ryoon@pkgsrc.org> | 2012-03-15 09:45:26 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2012-03-15 09:45:26 +0000 |
commit | 2d936aaaf2d470d6f71f104e257ace5de677aaf5 (patch) | |
tree | 9ec36145e64025eaa44b355cf6f5917a87dd4424 /mail/thunderbird10/patches | |
parent | 4a4bd1d68c79141ed7e7234822f0142533e3519b (diff) | |
download | pkgsrc-2d936aaaf2d470d6f71f104e257ace5de677aaf5.tar.gz |
Import thunderbird10-10.0.3 as mail/thunderbird10
* This is ESR (Extended Support Release) version.
* Fix security bugs
Diffstat (limited to 'mail/thunderbird10/patches')
108 files changed, 4213 insertions, 0 deletions
diff --git a/mail/thunderbird10/patches/patch-aa b/mail/thunderbird10/patches/patch-aa new file mode 100644 index 00000000000..d7dee1422ff --- /dev/null +++ b/mail/thunderbird10/patches/patch-aa @@ -0,0 +1,107 @@ +$NetBSD: patch-aa,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/configure.in.orig 2012-02-16 10:24:47.000000000 +0000 ++++ mozilla/configure.in +@@ -2328,7 +2328,7 @@ case "$target" in + MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin' + ;; + +-*-freebsd*) ++*-freebsd* | *-dragonfly*) + if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then + DLL_SUFFIX=".so.1.0" + DSO_LDOPTS="-shared" +@@ -2336,6 +2336,9 @@ case "$target" in + 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*) +@@ -3377,6 +3380,9 @@ dnl ==================================== + case $target in + *-hpux11.*) + ;; ++*-dragonfly*) ++ AC_CHECK_LIB(c, gethostbyname_r) ++ ;; + *) + AC_CHECK_LIB(c_r, gethostbyname_r) + ;; +@@ -4330,6 +4336,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 ======================================================== +@@ -5616,20 +5630,20 @@ if test -n "$MOZ_WEBM"; then + [MOZ_NATIVE_LIBVPX_DEC_TEST=1], + ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])) + if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then +- AC_MSG_CHECKING([for libvpx version >= v0.9.7]) +- dnl We need at least v0.9.7 to fix several crash bugs (for which we +- dnl had local patches prior to v0.9.7). ++ AC_MSG_CHECKING([for libvpx version >= v1.0.0]) ++ dnl We need at least v1.0.0 to fix several crash bugs (for which we ++ dnl had local patches prior to v1.0.0). + dnl + dnl This is a terrible test for the library version, but we don't + dnl have a good one. There is no version number in a public header, + dnl and testing the headers still doesn't guarantee we link against + dnl the right version. While we could call vpx_codec_version() at + dnl run-time, that would break cross-compiling. There are no +- dnl additional exported symbols between the v0.9.7 release and the +- dnl v0.9.6 one to check for. ++ dnl additional exported decoder symbols between the v1.0.0 release ++ dnl and the v0.9.7 one to check for. + AC_TRY_COMPILE([ + #include <vpx/vpx_decoder.h> +- #if !defined(VPX_CODEC_USE_INPUT_PARTITION) ++ #if !defined(VPX_CODEC_USE_INPUT_FRAGMENTS) + #error "test failed." + #endif + ], +@@ -5639,7 +5653,7 @@ if test -n "$MOZ_WEBM"; then + MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include" + MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"], + [AC_MSG_RESULT([no]) +- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])]) ++ AC_MSG_ERROR([--with-system-libvpx requested but it is not v1.0.0 or later])]) + fi + CFLAGS=$_SAVE_CFLAGS + LDFLAGS=$_SAVE_LDFLAGS +@@ -5673,11 +5687,11 @@ if test -n "$MOZ_WEBM" -a -z "$MOZ_NATIV + + 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 + ;; +@@ -8915,6 +8929,8 @@ if test -z "$MOZ_NATIVE_NSPR"; then + AC_MSG_WARN([Recreating autoconf.mk with updated nspr-config output]) + if test "$OS_ARCH" != "WINNT"; then + NSPR_LIBS=`./nsprpub/config/nspr-config --prefix=$LIBXUL_DIST --exec-prefix=$MOZ_BUILD_ROOT/dist --libdir=$LIBXUL_DIST/lib --libs` ++ AC_MSG_WARN([pkgsrc: adding run path to NSPR_LIBS for bundled NSPR.]) ++ NSPR_LIBS="-Wl,-R${prefix}/lib/\${MOZILLA_PKG_NAME} ${NSPR_LIBS}" + $PERL -pi.bak -e "s '^NSPR_LIBS\\s*=.*'NSPR_LIBS = $NSPR_LIBS'" config/autoconf.mk + NSPR_CFLAGS=`./nsprpub/config/nspr-config --prefix=$LIBXUL_DIST --exec-prefix=$MOZ_BUILD_ROOT/dist --includedir=$LIBXUL_DIST/include/nspr --cflags` + $PERL -pi.bak -e "s '^NSPR_CFLAGS\\s*=.*'NSPR_CFLAGS = $NSPR_CFLAGS'" config/autoconf.mk diff --git a/mail/thunderbird10/patches/patch-aa-toplevel b/mail/thunderbird10/patches/patch-aa-toplevel new file mode 100644 index 00000000000..61ffd47e320 --- /dev/null +++ b/mail/thunderbird10/patches/patch-aa-toplevel @@ -0,0 +1,33 @@ +$NetBSD: patch-aa-toplevel,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- configure.in.orig 2012-02-16 10:18:22.000000000 +0000 ++++ configure.in +@@ -1945,7 +1945,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" +@@ -1953,6 +1953,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*) +@@ -3185,6 +3188,9 @@ dnl ==================================== + case $target in + *-hpux11.*) + ;; ++*-dragonfly*) ++ AC_CHECK_LIB(c, gethostbyname_r) ++ ;; + *) + AC_CHECK_LIB(c_r, gethostbyname_r) + ;; diff --git a/mail/thunderbird10/patches/patch-ab b/mail/thunderbird10/patches/patch-ab new file mode 100644 index 00000000000..1cca1bae7c0 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ab @@ -0,0 +1,22 @@ +$NetBSD: patch-ab,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/include/md/_netbsd.h.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/include/md/_netbsd.h +@@ -79,7 +79,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 +@@ -107,6 +107,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/thunderbird10/patches/patch-ac b/mail/thunderbird10/patches/patch-ac new file mode 100644 index 00000000000..5c2581652b9 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ac @@ -0,0 +1,82 @@ +$NetBSD: patch-ac,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/configure.in.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/configure.in +@@ -71,7 +71,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= +@@ -1527,6 +1527,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*) +@@ -2114,6 +2141,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 +@@ -2919,7 +2947,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 + ;; + *) +@@ -2957,7 +2985,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. +@@ -3038,7 +3066,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/thunderbird10/patches/patch-ad b/mail/thunderbird10/patches/patch-ad new file mode 100644 index 00000000000..25e9a006c08 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/xpcom/io/nsLocalFileUnix.h.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/io/nsLocalFileUnix.h +@@ -86,7 +86,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/thunderbird10/patches/patch-ae b/mail/thunderbird10/patches/patch-ae new file mode 100644 index 00000000000..e355b312083 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ae @@ -0,0 +1,58 @@ +$NetBSD: patch-ae,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/src/misc/prnetdb.c.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/src/misc/prnetdb.c +@@ -105,7 +105,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 +@@ -115,6 +115,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 +@@ -332,7 +337,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. +@@ -2076,6 +2081,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)) { +@@ -2083,6 +2093,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/thunderbird10/patches/patch-af b/mail/thunderbird10/patches/patch-af new file mode 100644 index 00000000000..aae077b1fd3 --- /dev/null +++ b/mail/thunderbird10/patches/patch-af @@ -0,0 +1,32 @@ +$NetBSD: patch-af,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/config/mkdepend/imakemdep.h.orig 2012-02-16 10:24:47.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/thunderbird10/patches/patch-ag b/mail/thunderbird10/patches/patch-ag new file mode 100644 index 00000000000..da87ef91975 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ag @@ -0,0 +1,31 @@ +$NetBSD: patch-ag,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/include/md/_freebsd.h.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/include/md/_freebsd.h +@@ -79,7 +79,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 +@@ -88,7 +88,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 +@@ -97,7 +97,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/thunderbird10/patches/patch-ai b/mail/thunderbird10/patches/patch-ai new file mode 100644 index 00000000000..a1d84b2fcc2 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ai @@ -0,0 +1,13 @@ +$NetBSD: patch-ai,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/dbm/src/mktemp.c.orig 2012-02-16 10:24:52.000000000 +0000 ++++ mozilla/dbm/src/mktemp.c +@@ -92,7 +92,7 @@ mktemp(char *path) + static int + _gettemp(char *path, register int *doopen, int extraFlags) + { +-#if !defined(_WINDOWS) || defined(_WIN32) ++#if (!defined(_WINDOWS) || defined(_WIN32)) && !defined(errno) + extern int errno; + #endif + register char *start, *trv; diff --git a/mail/thunderbird10/patches/patch-aj b/mail/thunderbird10/patches/patch-aj new file mode 100644 index 00000000000..4abffd0b817 --- /dev/null +++ b/mail/thunderbird10/patches/patch-aj @@ -0,0 +1,20 @@ +$NetBSD: patch-aj,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/profile/dirserviceprovider/src/nsProfileLock.cpp.orig 2012-02-16 10:25:23.000000000 +0000 ++++ mozilla/profile/dirserviceprovider/src/nsProfileLock.cpp +@@ -408,6 +408,7 @@ nsresult nsProfileLock::LockWithSymlink( + #endif + sigfillset(&act.sa_mask); + ++#ifndef DEBUG + #define CATCH_SIGNAL(signame) \ + PR_BEGIN_MACRO \ + if (sigaction(signame, NULL, &oldact) == 0 && \ +@@ -426,6 +427,7 @@ PR_BEGIN_MACRO + CATCH_SIGNAL(SIGTERM); + + #undef CATCH_SIGNAL ++#endif + } + } + } diff --git a/mail/thunderbird10/patches/patch-ak b/mail/thunderbird10/patches/patch-ak new file mode 100644 index 00000000000..ac697fcc26f --- /dev/null +++ b/mail/thunderbird10/patches/patch-ak @@ -0,0 +1,13 @@ +$NetBSD: patch-ak,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/js/src/ctypes/libffi/configure.orig 2012-02-16 10:25:02.000000000 +0000 ++++ mozilla/js/src/ctypes/libffi/configure +@@ -11277,7 +11277,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/thunderbird10/patches/patch-al b/mail/thunderbird10/patches/patch-al new file mode 100644 index 00000000000..20113d8acae --- /dev/null +++ b/mail/thunderbird10/patches/patch-al @@ -0,0 +1,16 @@ +$NetBSD: patch-al,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/storage/src/mozStorageConnection.cpp.orig 2012-02-16 10:25:26.000000000 +0000 ++++ mozilla/storage/src/mozStorageConnection.cpp +@@ -632,6 +632,11 @@ Connection::initialize(nsIFile *aDatabas + (void)::NS_RegisterMemoryReporter(mMemoryReporters[i]); + } + ++ // 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/thunderbird10/patches/patch-am b/mail/thunderbird10/patches/patch-am new file mode 100644 index 00000000000..1e9fad81817 --- /dev/null +++ b/mail/thunderbird10/patches/patch-am @@ -0,0 +1,17 @@ +$NetBSD: patch-am,v 1.1.1.1 2012/03/15 09:45:29 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-02-16 10:25:24.000000000 +0000 ++++ mozilla/security/nss/lib/freebl/blapi.h +@@ -1038,6 +1038,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/thunderbird10/patches/patch-an b/mail/thunderbird10/patches/patch-an new file mode 100644 index 00000000000..38381ec7444 --- /dev/null +++ b/mail/thunderbird10/patches/patch-an @@ -0,0 +1,48 @@ +$NetBSD: patch-an,v 1.1.1.1 2012/03/15 09:45:29 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-02-16 10:25:25.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/thunderbird10/patches/patch-ao b/mail/thunderbird10/patches/patch-ao new file mode 100644 index 00000000000..b958f388c68 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ao @@ -0,0 +1,15 @@ +$NetBSD: patch-ao,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/toolkit/mozapps/installer/packager.mk.orig 2012-02-16 10:25:30.000000000 +0000 ++++ mozilla/toolkit/mozapps/installer/packager.mk +@@ -786,8 +786,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/thunderbird10/patches/patch-as b/mail/thunderbird10/patches/patch-as new file mode 100644 index 00000000000..ebe5cae3e0a --- /dev/null +++ b/mail/thunderbird10/patches/patch-as @@ -0,0 +1,42 @@ +$NetBSD: patch-as,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Treat DragonFly like FreeBSD. + +--- mozilla/js/src/configure.in.orig 2012-02-16 10:25:02.000000000 +0000 ++++ mozilla/js/src/configure.in +@@ -799,7 +799,7 @@ EOF + AC_LANG_RESTORE + ]) + +- if test "$ac_cv_have_std__Throw" == "yes"; then ++ if test "$ac_cv_have_std__Throw" = "yes"; then + AC_CACHE_CHECK(for |class __declspec(dllimport) exception| bug, + ac_cv_have_dllimport_exception_bug, + [ +@@ -2157,7 +2157,7 @@ case "$target" in + MOZ_FIX_LINK_PATHS='-Wl,-executable_path,$(LIBXUL_DIST)/bin' + ;; + +-*-freebsd*) ++*-freebsd*|*-dragonfly*) + if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then + DLL_SUFFIX=".so.1.0" + DSO_LDOPTS="-shared" +@@ -2818,7 +2818,7 @@ case "$target" in + *-solaris*) + AC_DEFINE(AVMPLUS_UNIX) + ;; +-*-freebsd*|*-kfreebsd*) ++*-freebsd*|*-kfreebsd*|*-netbsd*|*-dragonfly*) + AC_DEFINE(AVMPLUS_UNIX) + ;; + *-openbsd*) +@@ -4344,7 +4344,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/thunderbird10/patches/patch-at b/mail/thunderbird10/patches/patch-at new file mode 100644 index 00000000000..a5d5bca9280 --- /dev/null +++ b/mail/thunderbird10/patches/patch-at @@ -0,0 +1,15 @@ +$NetBSD: patch-at,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Avoid silly redefinitions of standard types on NetBSD. + +--- mozilla/gfx/qcms/qcmstypes.h.orig 2012-02-16 10:24:57.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__) ++#include <stdint.h> + #elif defined (_AIX) + #include <sys/types.h> + #elif defined(__OpenBSD__) diff --git a/mail/thunderbird10/patches/patch-au b/mail/thunderbird10/patches/patch-au new file mode 100644 index 00000000000..735b7d8e315 --- /dev/null +++ b/mail/thunderbird10/patches/patch-au @@ -0,0 +1,30 @@ +$NetBSD: patch-au,v 1.1.1.1 2012/03/15 09:45:29 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-02-16 10:25:19.000000000 +0000 ++++ mozilla/media/libsydneyaudio/src/sydney_audio_oss.c +@@ -55,7 +55,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 + +@@ -205,7 +205,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/thunderbird10/patches/patch-av b/mail/thunderbird10/patches/patch-av new file mode 100644 index 00000000000..bd68f42cd2b --- /dev/null +++ b/mail/thunderbird10/patches/patch-av @@ -0,0 +1,40 @@ +$NetBSD: patch-av,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xulrunner/app/nsXULRunnerApp.cpp.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xulrunner/app/nsXULRunnerApp.cpp +@@ -37,6 +37,27 @@ + + #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> + #endif +@@ -274,6 +295,7 @@ private: + + int main(int argc, char* argv[]) + { ++ netbsd_fixrlimit(); + if (argc > 1 && (IsArg(argv[1], "h") || + IsArg(argv[1], "help") || + IsArg(argv[1], "?"))) diff --git a/mail/thunderbird10/patches/patch-aw b/mail/thunderbird10/patches/patch-aw new file mode 100644 index 00000000000..d355bdfafbd --- /dev/null +++ b/mail/thunderbird10/patches/patch-aw @@ -0,0 +1,45 @@ +$NetBSD: patch-aw,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xulrunner/stub/nsXULStub.cpp.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xulrunner/stub/nsXULStub.cpp +@@ -44,6 +44,29 @@ + #include "nsILocalFile.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> +@@ -202,7 +225,9 @@ main(int argc, char **argv) + char greDir[MAXPATHLEN]; + bool greFound = false; + +-#if defined(XP_MACOSX) ++#if defined(__NetBSD__) ++ netbsd_fixrlimit(); ++#elif defined(XP_MACOSX) + CFBundleRef appBundle = CFBundleGetMainBundle(); + if (!appBundle) + return 1; diff --git a/mail/thunderbird10/patches/patch-ax b/mail/thunderbird10/patches/patch-ax new file mode 100644 index 00000000000..afb7f34543c --- /dev/null +++ b/mail/thunderbird10/patches/patch-ax @@ -0,0 +1,13 @@ +$NetBSD: patch-ax,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/xpcom/base/nsStackWalk.cpp.orig 2012-03-06 16:30:11.000000000 +0000 ++++ mozilla/xpcom/base/nsStackWalk.cpp +@@ -54,7 +54,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/thunderbird10/patches/patch-ay b/mail/thunderbird10/patches/patch-ay new file mode 100644 index 00000000000..e362e1799fd --- /dev/null +++ b/mail/thunderbird10/patches/patch-ay @@ -0,0 +1,40 @@ +$NetBSD: patch-ay,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/browser/app/nsBrowserApp.cpp.orig 2012-02-16 10:24:45.000000000 +0000 ++++ mozilla/browser/app/nsBrowserApp.cpp +@@ -49,6 +49,27 @@ + #include <stdio.h> + #include <stdarg.h> + #include <string.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"); ++} + + #include "plstr.h" + #include "prprf.h" +@@ -203,6 +224,7 @@ static int do_main(const char *exePath, + int main(int argc, char* argv[]) + { + char exePath[MAXPATHLEN]; ++ netbsd_fixrlimit(); + + nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); + if (NS_FAILED(rv)) { diff --git a/mail/thunderbird10/patches/patch-az b/mail/thunderbird10/patches/patch-az new file mode 100644 index 00000000000..d57a5b847d2 --- /dev/null +++ b/mail/thunderbird10/patches/patch-az @@ -0,0 +1,19 @@ +$NetBSD: patch-az,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/src/pthreads/ptthread.c.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/src/pthreads/ptthread.c +@@ -1070,12 +1070,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/thunderbird10/patches/patch-ba b/mail/thunderbird10/patches/patch-ba new file mode 100644 index 00000000000..4665889f7c2 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ba @@ -0,0 +1,24 @@ +$NetBSD: patch-ba,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +pthread_t may be 64-bit, avoid casting it. + +--- mozilla/nsprpub/pr/include/private/pprthred.h.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/include/private/pprthred.h +@@ -51,6 +51,8 @@ + #include <os2.h> + #endif + ++#include <pthread.h> ++ + PR_BEGIN_EXTERN_C + + /*--------------------------------------------------------------------------- +@@ -91,7 +93,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/thunderbird10/patches/patch-bd b/mail/thunderbird10/patches/patch-bd new file mode 100644 index 00000000000..6d816d830e8 --- /dev/null +++ b/mail/thunderbird10/patches/patch-bd @@ -0,0 +1,27 @@ +$NetBSD: patch-bd,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/js/src/ctypes/CTypes.cpp.orig 2012-02-16 10:25:02.000000000 +0000 ++++ mozilla/js/src/ctypes/CTypes.cpp +@@ -36,6 +36,22 @@ + * + * ***** END LICENSE BLOCK ***** */ + ++#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 ++#endif ++ + #include "CTypes.h" + #include "Library.h" + #include "jsnum.h" diff --git a/mail/thunderbird10/patches/patch-bf b/mail/thunderbird10/patches/patch-bf new file mode 100644 index 00000000000..640da831fd0 --- /dev/null +++ b/mail/thunderbird10/patches/patch-bf @@ -0,0 +1,22 @@ +$NetBSD: patch-bf,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/js/src/jsnativestack.cpp.orig 2012-02-16 10:25:04.000000000 +0000 ++++ mozilla/js/src/jsnativestack.cpp +@@ -50,7 +50,7 @@ + #elif defined(XP_MACOSX) || defined(DARWIN) || defined(XP_UNIX) + # include <pthread.h> + +-# if defined(__FreeBSD__) || defined(__OpenBSD__) ++# if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) + # include <pthread_np.h> + # endif + +@@ -145,7 +145,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/thunderbird10/patches/patch-bg b/mail/thunderbird10/patches/patch-bg new file mode 100644 index 00000000000..6c2852964ca --- /dev/null +++ b/mail/thunderbird10/patches/patch-bg @@ -0,0 +1,24 @@ +$NetBSD: patch-bg,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/storage/src/SQLiteMutex.h.orig 2012-02-16 10:25:26.000000000 +0000 ++++ mozilla/storage/src/SQLiteMutex.h +@@ -141,15 +141,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/thunderbird10/patches/patch-bi b/mail/thunderbird10/patches/patch-bi new file mode 100644 index 00000000000..8b0ca22d396 --- /dev/null +++ b/mail/thunderbird10/patches/patch-bi @@ -0,0 +1,12 @@ +$NetBSD: patch-bi,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/gfx/angle/src/compiler/osinclude.h.orig 2012-02-16 10:24:56.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) + #define ANGLE_OS_POSIX + #else diff --git a/mail/thunderbird10/patches/patch-directory_c-sdk_ldap_include_portable.h b/mail/thunderbird10/patches/patch-directory_c-sdk_ldap_include_portable.h new file mode 100644 index 00000000000..1c283a7f18d --- /dev/null +++ b/mail/thunderbird10/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.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- ldap/sdks/c-sdk/ldap/include/portable.h.orig 2012-02-16 10:25:44.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/thunderbird10/patches/patch-ipc_chromium_src_base_debug__util__posic.cc b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_debug__util__posic.cc new file mode 100644 index 00000000000..e009f227cd7 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_debug__util__posic.cc @@ -0,0 +1,47 @@ +$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig 2012-02-16 10:25:01.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(__linux__) && !defined(ANDROID)) + + #include <errno.h> + #include <fcntl.h> +@@ -17,8 +17,11 @@ + #include <unistd.h> + #if MOZ_HAVE_EXECINFO_H + #include <execinfo.h> +-#include <sys/sysctl.h> + #endif ++#if defined(OS_DRAGONFLY) ++#include <sys/user.h> ++#endif ++#include <sys/sysctl.h> + + #include "base/basictypes.h" + #include "base/eintr_wrapper.h" +@@ -32,7 +35,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 +@@ -71,7 +74,11 @@ bool DebugUtil::BeingDebugged() { + + // This process is being debugged if the P_TRACED flag is set. + is_set = true; ++#if defined(__DragonFly__) ++ being_debugged = (info.kp_flags & P_TRACED) != 0; ++#else + being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0; ++#endif + return being_debugged; + } + diff --git a/mail/thunderbird10/patches/patch-ipc_chromium_src_base_file__util.h b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_file__util.h new file mode 100644 index 00000000000..8554bf08032 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_file__util.h @@ -0,0 +1,14 @@ +$NetBSD: patch-ipc_chromium_src_base_file__util.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util.h.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util.h +@@ -16,8 +16,8 @@ + #include <sys/stat.h> + #elif defined(OS_POSIX) + #include <sys/types.h> +-#include <fts.h> + #include <sys/stat.h> ++#include <fts.h> + #endif + + #include <stdio.h> diff --git a/mail/thunderbird10/patches/patch-ipc_chromium_src_base_file__util__posix.cc b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_file__util__posix.cc new file mode 100644 index 00000000000..0a5f670bfde --- /dev/null +++ b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_file__util__posix.cc @@ -0,0 +1,13 @@ +$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_posix.cc +@@ -31,7 +31,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 __linux__ + #define stat64 stat + #endif + diff --git a/mail/thunderbird10/patches/patch-ipc_chromium_src_base_platform__file__posix.cc b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_platform__file__posix.cc new file mode 100644 index 00000000000..8a4cef79282 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_platform__file__posix.cc @@ -0,0 +1,12 @@ +$NetBSD: patch-ipc_chromium_src_base_platform__file__posix.cc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_file_posix.cc.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_file_posix.cc +@@ -10,6 +10,7 @@ + #ifdef ANDROID + #include <linux/stat.h> + #endif ++#include <sys/stat.h> /* for S_IRUSR */ + + #include "base/logging.h" + #include "base/string_util.h" diff --git a/mail/thunderbird10/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc new file mode 100644 index 00000000000..a55105d5957 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_platform__thread__posix.cc @@ -0,0 +1,33 @@ +$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc +@@ -9,9 +9,13 @@ + + #if defined(OS_MACOSX) + #include <mach/mach.h> ++#elif defined(OS_NETBSD) ++#include <lwp.h> + #elif defined(OS_LINUX) + #include <sys/syscall.h> + #include <unistd.h> ++#elif defined(OS_DRAGONFLY) ++#include <unistd.h> + #endif + + #if defined(OS_MACOSX) +@@ -33,6 +37,14 @@ PlatformThreadId PlatformThread::Current + // into the kernel. + #if defined(OS_MACOSX) + return mach_thread_self(); ++#elif defined(OS_NETBSD) ++ return _lwp_self(); ++#elif defined(OS_DRAGONFLY) ++ return lwp_gettid(); ++#elif defined(OS_FREEBSD) ++ lwpid_t lwpid; ++ thr_self( &lwpid ); ++ return lwpid; + #elif defined (__OpenBSD__) + // TODO(BSD): find a better thread ID + return (intptr_t)(pthread_self()); diff --git a/mail/thunderbird10/patches/patch-ipc_chromium_src_base_sys__info__posix.cc b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_sys__info__posix.cc new file mode 100644 index 00000000000..820406b2b61 --- /dev/null +++ b/mail/thunderbird10/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.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig 2012-02-16 10:25:01.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/thunderbird10/patches/patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h new file mode 100644 index 00000000000..dcc0cdcc292 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h @@ -0,0 +1,13 @@ +$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/third_party/nspr/prcpucfg.h +@@ -34,7 +34,7 @@ + #include "base/third_party/nspr/prcpucfg_win.h" + #elif defined(__APPLE__) + #include "base/third_party/nspr/prcpucfg_mac.h" +-#elif defined(__linux__) || defined(ANDROID) ++#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__DragonFly__) + #include "base/third_party/nspr/prcpucfg_linux.h" + #elif defined(__OpenBSD__) + #include "base/third_party/nspr/prcpucfg_openbsd.h" diff --git a/mail/thunderbird10/patches/patch-ipc_chromium_src_build_build__config.h b/mail/thunderbird10/patches/patch-ipc_chromium_src_build_build__config.h new file mode 100644 index 00000000000..fa07e3ecc0b --- /dev/null +++ b/mail/thunderbird10/patches/patch-ipc_chromium_src_build_build__config.h @@ -0,0 +1,24 @@ +$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/build/build_config.h.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/build/build_config.h +@@ -19,6 +19,10 @@ + #define OS_MACOSX 1 + #elif defined(__linux__) || defined(ANDROID) + #define OS_LINUX 1 ++#elif defined(__NetBSD__) ++#define OS_NETBSD 1 ++#elif defined(__DragonFly__) ++#define OS_DRAGONFLY 1 + #elif defined(__OpenBSD__) + #define OS_OPENBSD 1 + #elif defined(_WIN32) +@@ -29,7 +33,7 @@ + + // 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/thunderbird10/patches/patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h b/mail/thunderbird10/patches/patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h new file mode 100644 index 00000000000..44b435ba6f5 --- /dev/null +++ b/mail/thunderbird10/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.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig 2012-02-16 10:25:01.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/thunderbird10/patches/patch-ma b/mail/thunderbird10/patches/patch-ma new file mode 100644 index 00000000000..ca9b411293d --- /dev/null +++ b/mail/thunderbird10/patches/patch-ma @@ -0,0 +1,23 @@ +$NetBSD: patch-ma,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/config/autoconf.mk.in.orig 2012-02-16 10:24:47.000000000 +0000 ++++ mozilla/config/autoconf.mk.in +@@ -62,14 +62,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ +-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++includedir = @includedir@/$(MOZILLA_PKG_NAME) + libdir = @libdir@ + datadir = @datadir@ + mandir = @mandir@ +-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++idldir = @datadir@/idl/$(MOZILLA_PKG_NAME) + +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZILLA_PKG_NAME) ++sdkdir = $(libdir)/$(MOZILLA_PKG_NAME)-sdk + + DIST = $(DEPTH)/dist + LIBXUL_SDK = @LIBXUL_SDK@ diff --git a/mail/thunderbird10/patches/patch-ma-toplevel b/mail/thunderbird10/patches/patch-ma-toplevel new file mode 100644 index 00000000000..ebfd646c5e6 --- /dev/null +++ b/mail/thunderbird10/patches/patch-ma-toplevel @@ -0,0 +1,23 @@ +$NetBSD: patch-ma-toplevel,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- config/autoconf.mk.in.orig 2012-02-16 10:18:22.000000000 +0000 ++++ config/autoconf.mk.in +@@ -60,14 +60,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ +-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++includedir = @includedir@/$(MOZILLA_PKG_NAME) + libdir = @libdir@ + datadir = @datadir@ + mandir = @mandir@ +-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++idldir = @datadir@/idl/$(MOZILLA_PKG_NAME) + +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZILLA_PKG_NAME) ++sdkdir = $(libdir)/$(MOZILLA_PKG_NAME)-sdk + + MOZDEPTH = $(DEPTH)/mozilla + DIST = $(MOZDEPTH)/dist diff --git a/mail/thunderbird10/patches/patch-mb b/mail/thunderbird10/patches/patch-mb new file mode 100644 index 00000000000..48443795ad4 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mb @@ -0,0 +1,79 @@ +$NetBSD: patch-mb,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in +@@ -84,7 +84,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 +@@ -93,7 +93,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 +@@ -111,12 +111,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) +@@ -192,7 +186,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 +@@ -249,7 +243,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 +@@ -321,9 +315,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 + + # +@@ -389,6 +384,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/thunderbird10/patches/patch-md b/mail/thunderbird10/patches/patch-md new file mode 100644 index 00000000000..deeff17f81a --- /dev/null +++ b/mail/thunderbird10/patches/patch-md @@ -0,0 +1,17 @@ +$NetBSD: patch-md,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +???. from www/firefox/patch-ax. + +--- mozilla/security/coreconf/SunOS5.mk.orig 2012-02-16 10:25:23.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/thunderbird10/patches/patch-me b/mail/thunderbird10/patches/patch-me new file mode 100644 index 00000000000..54c68a2c1cc --- /dev/null +++ b/mail/thunderbird10/patches/patch-me @@ -0,0 +1,15 @@ +$NetBSD: patch-me,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Add DragonFly support. + +--- mozilla/security/nss/lib/freebl/Makefile.orig 2012-02-16 10:25:24.000000000 +0000 ++++ mozilla/security/nss/lib/freebl/Makefile +@@ -275,7 +275,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/thunderbird10/patches/patch-mf b/mail/thunderbird10/patches/patch-mf new file mode 100644 index 00000000000..1180dc0808d --- /dev/null +++ b/mail/thunderbird10/patches/patch-mf @@ -0,0 +1,21 @@ +$NetBSD: patch-mf,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Add DragonFly support. +Make sure nss libraries have a run path defined. + +--- mozilla/security/coreconf/config.mk.orig 2012-02-16 10:25:23.000000000 +0000 ++++ mozilla/security/coreconf/config.mk +@@ -63,7 +63,7 @@ endif + ####################################################################### + + TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ +- AIX RISCOS WINNT WIN95 WINCE Linux ++ AIX RISCOS WINNT WIN95 WINCE Linux DragonFly + + ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) + include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk +@@ -207,3 +207,4 @@ endif + DEFINES += -DUSE_UTIL_DIRECTLY + USE_UTIL_DIRECTLY = 1 + ++EXTRA_SHARED_LIBS += -Wl,-R${PREFIX}/lib/${MOZILLA_PKG_NAME} diff --git a/mail/thunderbird10/patches/patch-mg b/mail/thunderbird10/patches/patch-mg new file mode 100644 index 00000000000..91bf8c188c2 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mg @@ -0,0 +1,90 @@ +$NetBSD: patch-mg,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Add DragonFly support. + +--- mozilla/security/coreconf/DragonFly.mk.orig 2012-03-09 12:27:39.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/thunderbird10/patches/patch-mh b/mail/thunderbird10/patches/patch-mh new file mode 100644 index 00000000000..7d36db707d3 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mh @@ -0,0 +1,13 @@ +$NetBSD: patch-mh,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/security/nss/lib/Makefile.orig 2012-02-16 10:25:24.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/thunderbird10/patches/patch-mi b/mail/thunderbird10/patches/patch-mi new file mode 100644 index 00000000000..6a8571a633c --- /dev/null +++ b/mail/thunderbird10/patches/patch-mi @@ -0,0 +1,15 @@ +$NetBSD: patch-mi,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Add DragonFly support. + +--- mozilla/config/config.mk.orig 2012-02-16 10:24:47.000000000 +0000 ++++ mozilla/config/config.mk +@@ -129,7 +129,7 @@ endif + # but save the version to allow multiple versions of the same base + # platform to be built in the same tree. + # +-ifneq (,$(filter FreeBSD HP-UX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH))) ++ifneq (,$(filter DragonFly FreeBSD HP-UX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH))) + OS_RELEASE := $(basename $(OS_RELEASE)) + + # Allow the user to ignore the OS_VERSION, which is usually irrelevant. diff --git a/mail/thunderbird10/patches/patch-mj b/mail/thunderbird10/patches/patch-mj new file mode 100644 index 00000000000..211598ff382 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mj @@ -0,0 +1,15 @@ +$NetBSD: patch-mj,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Add DragonFly support. + +--- mozilla/security/coreconf/arch.mk.orig 2012-02-16 10:25:23.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/thunderbird10/patches/patch-mk b/mail/thunderbird10/patches/patch-mk new file mode 100644 index 00000000000..7f9d6ee15e6 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mk @@ -0,0 +1,30 @@ +$NetBSD: patch-mk,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Treat DragonFly like FreeBSD. + +--- mozilla/config/rules.mk.orig 2012-02-16 10:24:47.000000000 +0000 ++++ mozilla/config/rules.mk +@@ -580,6 +580,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) +@@ -589,6 +595,10 @@ endif + endif + endif + ++ifeq ($(OS_ARCH),NetBSD) ++EXTRA_DSO_LDOPTS += -Wl,-rpath,${PREFIX}/lib/xulrunner ++endif ++ + # + # HP-UXBeOS specific section: for COMPONENTS only, add -Bsymbolic flag + # which uses internal symbols first diff --git a/mail/thunderbird10/patches/patch-ml b/mail/thunderbird10/patches/patch-ml new file mode 100644 index 00000000000..438919e55ac --- /dev/null +++ b/mail/thunderbird10/patches/patch-ml @@ -0,0 +1,16 @@ +$NetBSD: patch-ml,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Treat DragonFly like FreeBSD. + +--- mozilla/js/src/Makefile.in.orig 2012-02-16 10:25:02.000000000 +0000 ++++ mozilla/js/src/Makefile.in +@@ -809,6 +809,9 @@ endif # WINNT + 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/thunderbird10/patches/patch-mm b/mail/thunderbird10/patches/patch-mm new file mode 100644 index 00000000000..f543b291434 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mm @@ -0,0 +1,22 @@ +$NetBSD: patch-mm,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/toolkit/library/Makefile.in.orig 2012-02-16 10:25:30.000000000 +0000 ++++ mozilla/toolkit/library/Makefile.in +@@ -209,6 +209,17 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle + endif + endif + ++ifeq ($(OS_ARCH),DragonFly) ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++endif ++ ++ifeq ($(OS_ARCH),NetBSD) ++EXTRA_DSO_LDOPTS += -lossaudio ++endif ++ifdef PKGSRC_PULSEAUDIO ++EXTRA_DSO_LDOPTS += -lpulse ++endif ++ + ifeq ($(OS_ARCH),WINNT) + OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32 imm32 winmm wsock32 msimg32 shlwapi psapi ws2_32 dbghelp) + ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) diff --git a/mail/thunderbird10/patches/patch-mn b/mail/thunderbird10/patches/patch-mn new file mode 100644 index 00000000000..97e46481b68 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mn @@ -0,0 +1,15 @@ +$NetBSD: patch-mn,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +Make sure we link correctly with sqlite3 from pkgsrc. + +--- mozilla/security/nss/lib/softoken/config.mk.orig 2012-02-16 10:25:25.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/thunderbird10/patches/patch-mozilla_build_autoconf_gcc-pr49911.m4 b/mail/thunderbird10/patches/patch-mozilla_build_autoconf_gcc-pr49911.m4 new file mode 100644 index 00000000000..0aa776646e6 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_build_autoconf_gcc-pr49911.m4 @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_build_autoconf_gcc-pr49911.m4,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/build/autoconf/gcc-pr49911.m4.orig 2012-02-16 10:24:47.000000000 +0000 ++++ mozilla/build/autoconf/gcc-pr49911.m4 +@@ -56,7 +56,7 @@ CXXFLAGS="$_SAVE_CXXFLAGS" + + AC_LANG_RESTORE + +-if test "$ac_have_gcc_pr49911" == "yes"; then ++if test "$ac_have_gcc_pr49911" = "yes"; then + AC_MSG_RESULT(yes) + CFLAGS="$CFLAGS -fno-tree-vrp" + CXXFLAGS="$CXXFLAGS -fno-tree-vrp" diff --git a/mail/thunderbird10/patches/patch-mozilla_build_autoconf_nss.m4 b/mail/thunderbird10/patches/patch-mozilla_build_autoconf_nss.m4 new file mode 100644 index 00000000000..bf5c9f091c5 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_build_autoconf_nss.m4 @@ -0,0 +1,46 @@ +$NetBSD: patch-mozilla_build_autoconf_nss.m4,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/build/autoconf/nss.m4.orig 2012-02-16 10:24:47.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/thunderbird10/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp b/mail/thunderbird10/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp new file mode 100644 index 00000000000..3c0a27177c8 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp @@ -0,0 +1,31 @@ +$NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.cpp,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig 2012-02-16 10:24:53.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp +@@ -236,7 +236,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"); + +@@ -1824,7 +1824,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); +@@ -1851,7 +1851,7 @@ PluginModuleChild::AnswerNP_Initialize(N + SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/)); + #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/thunderbird10/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h b/mail/thunderbird10/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h new file mode 100644 index 00000000000..a091a7ccadf --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_dom_plugins_ipc_PluginModuleChild.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_dom_plugins_ipc_PluginModuleChild.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig 2012-02-16 10:24:53.000000000 +0000 ++++ mozilla/dom/plugins/ipc/PluginModuleChild.h +@@ -358,7 +358,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/thunderbird10/patches/patch-mozilla_ipc_chromium_Makefile.in b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_Makefile.in new file mode 100644 index 00000000000..4c2ccc1b083 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_Makefile.in @@ -0,0 +1,39 @@ +$NetBSD: patch-mozilla_ipc_chromium_Makefile.in,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/Makefile.in.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/Makefile.in +@@ -278,6 +278,34 @@ endif + + endif # } OS_LINUX + ++ifdef OS_BSD # { ++ ++CPPSRCS += \ ++ atomicops_internals_x86_gcc.cc \ ++ file_util_bsd.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/thunderbird10/patches/patch-mozilla_ipc_chromium_chromium-config.mk b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_chromium-config.mk new file mode 100644 index 00000000000..d90796bf9c7 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_chromium-config.mk @@ -0,0 +1,99 @@ +$NetBSD: patch-mozilla_ipc_chromium_chromium-config.mk,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/chromium-config.mk.orig 2012-02-16 07:40:33.000000000 +0100 ++++ mozilla/ipc/chromium/chromium-config.mk 2012-03-11 11:05:40.397182000 +0100 +@@ -56,17 +56,6 @@ + -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) + +@@ -93,13 +82,64 @@ + 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 ++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 +@@ -107,4 +147,8 @@ + + endif # } + endif # } ++endif # } ++endif # } ++endif # } ++endif # } + diff --git a/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_base__paths.h b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_base__paths.h new file mode 100644 index 00000000000..4d95c36adf4 --- /dev/null +++ b/mail/thunderbird10/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.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/base_paths.h.orig 2012-02-16 10:25:01.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/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_file__util__bsd.cc b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_file__util__bsd.cc new file mode 100644 index 00000000000..587ca7848ad --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_file__util__bsd.cc @@ -0,0 +1,84 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_file__util__bsd.cc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/file_util_bsd.cc.orig 2012-03-09 12:27:38.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/file_util_bsd.cc +@@ -0,0 +1,79 @@ ++// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// this is a derivative of file_util_linux.cc ++ ++#include "base/file_util.h" ++ ++#include <fcntl.h> ++ ++#include <string> ++#include <vector> ++ ++#include "base/eintr_wrapper.h" ++#include "base/file_path.h" ++#include "base/string_util.h" ++ ++namespace file_util { ++ ++bool GetTempDir(FilePath* path) { ++ const char* tmp = getenv("TMPDIR"); ++ if (tmp) ++ *path = FilePath(tmp); ++ else ++ *path = FilePath("/tmp"); ++ return true; ++} ++ ++bool GetShmemTempDir(FilePath* path) { ++ return GetTempDir(path); ++} ++ ++bool CopyFile(const FilePath& from_path, const FilePath& to_path) { ++ int infile = open(from_path.value().c_str(), O_RDONLY); ++ if (infile < 0) ++ return false; ++ ++ int outfile = creat(to_path.value().c_str(), 0666); ++ if (outfile < 0) { ++ close(infile); ++ return false; ++ } ++ ++ const size_t kBufferSize = 32768; ++ std::vector<char> buffer(kBufferSize); ++ bool result = true; ++ ++ while (result) { ++ ssize_t bytes_read = HANDLE_EINTR(read(infile, &buffer[0], buffer.size())); ++ if (bytes_read < 0) { ++ result = false; ++ break; ++ } ++ if (bytes_read == 0) ++ break; ++ // Allow for partial writes ++ ssize_t bytes_written_per_read = 0; ++ do { ++ ssize_t bytes_written_partial = HANDLE_EINTR(write( ++ outfile, ++ &buffer[bytes_written_per_read], ++ bytes_read - bytes_written_per_read)); ++ if (bytes_written_partial < 0) { ++ result = false; ++ break; ++ } ++ bytes_written_per_read += bytes_written_partial; ++ } while (bytes_written_per_read < bytes_read); ++ } ++ ++ if (HANDLE_EINTR(close(infile)) < 0) ++ result = false; ++ if (HANDLE_EINTR(close(outfile)) < 0) ++ result = false; ++ ++ return result; ++} ++ ++} // namespace file_util diff --git a/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_message__loop.cc b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_message__loop.cc new file mode 100644 index 00000000000..59e6a052c25 --- /dev/null +++ b/mail/thunderbird10/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.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/message_loop.cc.orig 2012-02-16 10:25:01.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/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h new file mode 100644 index 00000000000..b635413e37d --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_platform__thread.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_platform__thread.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/platform_thread.h.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/platform_thread.h +@@ -25,6 +25,8 @@ typedef pthread_t PlatformThreadHandle; + #if defined(OS_LINUX) + #include <unistd.h> + typedef pid_t PlatformThreadId; ++#elif defined(OS_FREEBSD) || defined(OS_DRAGONFLY) || defined (OS_NETBSD) ++typedef lwpid_t PlatformThreadId; + #elif defined(OS_MACOSX) + #include <mach/mach.h> + typedef mach_port_t PlatformThreadId; diff --git a/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_process__util.h b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_process__util.h new file mode 100644 index 00000000000..4d264ca2c52 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_process__util.h @@ -0,0 +1,45 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util.h.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/process_util.h +@@ -14,7 +14,6 @@ + #include <windows.h> + #include <tlhelp32.h> + #elif defined(OS_LINUX) +-#include <dirent.h> + #include <limits.h> + #include <sys/types.h> + #elif defined(OS_MACOSX) +@@ -280,6 +279,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 +292,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/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc new file mode 100644 index 00000000000..29f0480ca16 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc @@ -0,0 +1,315 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_process__util__bsd.cc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + + +--- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig 2012-03-08 18:52:15.229788000 +0100 ++++ mozilla/ipc/chromium/src/base/process_util_bsd.cc 2012-03-11 10:59:50.559480000 +0100 +@@ -0,0 +1,309 @@ ++// 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 <ctype.h> ++#include <fcntl.h> ++#include <unistd.h> ++#include <string> ++#if defined(OS_DRAGONFLY) ++/* DragonFly, as of v3.0.1, does not explicitly mark symbols public */ ++#define PRE_SYS_INCLUDE _Pragma("GCC visibility push(default)") ++#define POST_SYS_INCLUDE _Pragma("GCC visibility pop") ++#else ++#define PRE_SYS_INCLUDE ++#define POST_SYS_INCLUDE ++#endif ++PRE_SYS_INCLUDE ++#include <kvm.h> ++POST_SYS_INCLUDE ++#include <sys/sysctl.h> ++#include <sys/types.h> ++#include <sys/wait.h> ++#if defined(OS_DRAGONFLY) ++#include <sys/user.h> ++#define HAVE_POSIX_SPAWN 1 ++#endif ++ ++#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" ++ ++#ifdef __NetBSD__ ++#include <sys/param.h> ++#if __NetBSD_Version__ >= 600000000 ++#define HAVE_POSIX_SPAWN 1 ++#endif ++#endif ++ ++#ifdef HAVE_POSIX_SPAWN ++PRE_SYS_INCLUDE ++#include <spawn.h> ++POST_SYS_INCLUDE ++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) { ++ 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) { ++ 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 (environment_map::const_iterator it = env_vars_to_set.begin(); ++ it != env_vars_to_set.end(); ++it) { ++ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) ++ _exit(127); ++ } ++ ++ for (size_t i = 0; i < argv.size(); i++) ++ argv_cstr[i] = const_cast<char*>(argv[i].c_str()); ++ argv_cstr[argv.size()] = NULL; ++ execvp(argv_cstr[0], argv_cstr.get()); ++ // 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) ++ 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 (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); ++#else ++ kvm = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL); ++ struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries); ++ 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/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_process__util__posix.cc b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_process__util__posix.cc new file mode 100644 index 00000000000..1964b246ecb --- /dev/null +++ b/mail/thunderbird10/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.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig 2012-02-16 10:25:01.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/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_third__party_nspr_prtime.cc b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_third__party_nspr_prtime.cc new file mode 100644 index 00000000000..9aa910f9c12 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_base_third__party_nspr_prtime.cc @@ -0,0 +1,38 @@ +$NetBSD: patch-mozilla_ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/chromium/src/base/third_party/nspr/prtime.cc +@@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp + LL_ADD(retVal, retVal, temp); + + return retVal; +-#elif defined(OS_LINUX) ++#elif defined(OS_LINUX) || defined(OS_DRAGONFLY) + struct tm exp_tm = {0}; + exp_tm.tm_sec = exploded->tm_sec; + exp_tm.tm_min = exploded->tm_min; +@@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp + result *= kSecondsToMicroseconds; + result += exploded->tm_usec; + return result; ++#elif defined(OS_FREEBSD) || defined(OS_NETBSD) ++ struct tm exp_tm = {0}; ++ exp_tm.tm_sec = exploded->tm_sec; ++ exp_tm.tm_min = exploded->tm_min; ++ exp_tm.tm_hour = exploded->tm_hour; ++ exp_tm.tm_mday = exploded->tm_mday; ++ exp_tm.tm_mon = exploded->tm_month; ++ exp_tm.tm_year = exploded->tm_year - 1900; ++ ++ // time_t is 64bit ++ time_t absolute_time = timegm(&exp_tm); ++ ++ PRTime result = static_cast<PRTime>(absolute_time); ++ result -= exploded->tm_params.tp_gmt_offset + ++ exploded->tm_params.tp_dst_offset; ++ result *= kSecondsToMicroseconds; ++ result += exploded->tm_usec; ++ return result; + #else + #error No PR_ImplodeTime implemented on your platform. + #endif diff --git a/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_chrome_common_ipc__message__utils.h b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_chrome_common_ipc__message__utils.h new file mode 100644 index 00000000000..4664fa7e7ee --- /dev/null +++ b/mail/thunderbird10/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.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig 2012-02-16 10:25:01.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_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || 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_FREEBSD) || defined(OS_DRAGONFLY) || defined(OS_NETBSD) || 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/thunderbird10/patches/patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h b/mail/thunderbird10/patches/patch-mozilla_ipc_chromium_src_chrome_common_transport__dib.h new file mode 100644 index 00000000000..541a2c14af8 --- /dev/null +++ b/mail/thunderbird10/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.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig 2012-02-16 10:25:01.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_WIN) || 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/thunderbird10/patches/patch-mozilla_ipc_glue_GeckoChildProcessHost.cpp b/mail/thunderbird10/patches/patch-mozilla_ipc_glue_GeckoChildProcessHost.cpp new file mode 100644 index 00000000000..042185f9f32 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_ipc_glue_GeckoChildProcessHost.cpp @@ -0,0 +1,42 @@ +$NetBSD: patch-mozilla_ipc_glue_GeckoChildProcessHost.cpp,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig 2012-02-16 10:25:01.000000000 +0000 ++++ mozilla/ipc/glue/GeckoChildProcessHost.cpp +@@ -430,7 +430,7 @@ GeckoChildProcessHost::PerformAsyncLaunc + // and passing wstrings from one config to the other is unsafe. So + // we split the logic here. + +-#if defined(OS_LINUX) || defined(OS_MACOSX) ++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) + base::environment_map newEnvVars; + // XPCOM may not be initialized in some subprocesses. We don't want + // to initialize XPCOM just for the directory service, especially +@@ -445,8 +445,8 @@ GeckoChildProcessHost::PerformAsyncLaunc + if (NS_SUCCEEDED(rv)) { + nsCString path; + greDir->GetNativePath(path); +-# ifdef OS_LINUX +-# ifdef ANDROID ++# if defined(OS_LINUX) || defined(OS_BSD) ++# if defined(ANDROID) || defined(OS_BSD) + path += "/lib"; + # endif // ANDROID + const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); +@@ -557,7 +557,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)) +@@ -594,7 +594,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, + #endif + false, &process, arch); diff --git a/mail/thunderbird10/patches/patch-mozilla_js_src_build_autoconf_gcc-pr49911.m4 b/mail/thunderbird10/patches/patch-mozilla_js_src_build_autoconf_gcc-pr49911.m4 new file mode 100644 index 00000000000..4b014c5934b --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_js_src_build_autoconf_gcc-pr49911.m4 @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_js_src_build_autoconf_gcc-pr49911.m4,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/js/src/build/autoconf/gcc-pr49911.m4.orig 2012-02-16 10:25:02.000000000 +0000 ++++ mozilla/js/src/build/autoconf/gcc-pr49911.m4 +@@ -56,7 +56,7 @@ CXXFLAGS="$_SAVE_CXXFLAGS" + + AC_LANG_RESTORE + +-if test "$ac_have_gcc_pr49911" == "yes"; then ++if test "$ac_have_gcc_pr49911" = "yes"; then + AC_MSG_RESULT(yes) + CFLAGS="$CFLAGS -fno-tree-vrp" + CXXFLAGS="$CXXFLAGS -fno-tree-vrp" diff --git a/mail/thunderbird10/patches/patch-mozilla_js_src_jscpucfg.h b/mail/thunderbird10/patches/patch-mozilla_js_src_jscpucfg.h new file mode 100644 index 00000000000..c63b8ee03b4 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_js_src_jscpucfg.h @@ -0,0 +1,26 @@ +$NetBSD: patch-mozilla_js_src_jscpucfg.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/js/src/jscpucfg.h.orig 2012-02-16 10:25:04.000000000 +0000 ++++ mozilla/js/src/jscpucfg.h +@@ -77,6 +77,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/thunderbird10/patches/patch-mozilla_js_src_methodjit_MethodJIT.cpp b/mail/thunderbird10/patches/patch-mozilla_js_src_methodjit_MethodJIT.cpp new file mode 100644 index 00000000000..9503e5456bf --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_js_src_methodjit_MethodJIT.cpp @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_js_src_methodjit_MethodJIT.cpp,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/js/src/methodjit/MethodJIT.cpp.orig 2012-02-16 10:25:04.000000000 +0000 ++++ mozilla/js/src/methodjit/MethodJIT.cpp +@@ -171,7 +171,7 @@ SetVMFrameRegs(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/thunderbird10/patches/patch-mozilla_js_src_yarr_pcre_pcre.h b/mail/thunderbird10/patches/patch-mozilla_js_src_yarr_pcre_pcre.h new file mode 100644 index 00000000000..5e728c221f9 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_js_src_yarr_pcre_pcre.h @@ -0,0 +1,14 @@ +$NetBSD: patch-mozilla_js_src_yarr_pcre_pcre.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/js/src/yarr/pcre/pcre.h.orig 2012-02-16 10:25:08.000000000 +0000 ++++ mozilla/js/src/yarr/pcre/pcre.h +@@ -46,7 +46,9 @@ POSSIBILITY OF SUCH DAMAGE. + #include "assembler/wtf/Platform.h" + #include "jsstr.h" + #include "jsprvtd.h" ++#if ENABLE_ASSEMBLER + #include "jstl.h" ++#endif + + typedef jschar UChar; + typedef JSLinearString UString; diff --git a/mail/thunderbird10/patches/patch-mozilla_media_libvpx_vpx__config.h b/mail/thunderbird10/patches/patch-mozilla_media_libvpx_vpx__config.h new file mode 100644 index 00000000000..e7dfc05c7f1 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_media_libvpx_vpx__config.h @@ -0,0 +1,21 @@ +$NetBSD: patch-mozilla_media_libvpx_vpx__config.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/media/libvpx/vpx_config.h.orig 2012-02-16 10:25:19.000000000 +0000 ++++ mozilla/media/libvpx/vpx_config.h +@@ -12,12 +12,12 @@ + /* 32 bit MacOS. */ + #include "vpx_config_x86-darwin9-gcc.h" + +-#elif defined(__linux__) && defined(__i386__) +-/* 32 bit Linux. */ ++#elif (defined(__linux__) | defined(__DragonFly__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)) && defined(__i386__) ++/* 32 bit Linux or some BSD. */ + #include "vpx_config_x86-linux-gcc.h" + +-#elif defined(__linux__) && defined(__x86_64__) +-/* 64 bit Linux. */ ++#elif (defined(__linux__) | defined(__DragonFly__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)) && defined(__x86_64__) ++/* 64 bit Linux or some BSD. */ + #include "vpx_config_x86_64-linux-gcc.h" + + #elif defined(__sun) && defined(__i386) diff --git a/mail/thunderbird10/patches/patch-mozilla_media_libvpx_vpx__config__c.c b/mail/thunderbird10/patches/patch-mozilla_media_libvpx_vpx__config__c.c new file mode 100644 index 00000000000..1533177bf2f --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_media_libvpx_vpx__config__c.c @@ -0,0 +1,21 @@ +$NetBSD: patch-mozilla_media_libvpx_vpx__config__c.c,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/media/libvpx/vpx_config_c.c.orig 2012-02-16 10:25:19.000000000 +0000 ++++ mozilla/media/libvpx/vpx_config_c.c +@@ -12,12 +12,12 @@ + /* 32 bit MacOS. */ + #include "vpx_config_x86-darwin9-gcc.c" + +-#elif defined(__linux__) && defined(__i386__) +-/* 32 bit Linux. */ ++#elif (defined(__linux__) | defined(__DragonFly__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)) && defined(__i386__) ++/* 32 bit Linux or BSD. */ + #include "vpx_config_x86-linux-gcc.c" + +-#elif defined(__linux__) && defined(__x86_64__) +-/* 64 bit Linux. */ ++#elif (defined(__linux__) | defined(__DragonFly__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MirBSD__)) && defined(__x86_64__) ++/* 64 bit Linux or BSD. */ + #include "vpx_config_x86_64-linux-gcc.c" + + #elif defined(__sun) && defined(__i386) diff --git a/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md___dragonfly.cfg b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md___dragonfly.cfg new file mode 100644 index 00000000000..c92dcd95170 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md___dragonfly.cfg @@ -0,0 +1,199 @@ +$NetBSD: patch-mozilla_nsprpub_pr_include_md___dragonfly.cfg,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/include/md/_dragonfly.cfg.orig 2012-03-09 12:27:39.000000000 +0000 ++++ mozilla/nsprpub/pr/include/md/_dragonfly.cfg +@@ -0,0 +1,194 @@ ++/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++ * ++ * 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 Portable Runtime (NSPR). ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by the Initial Developer are Copyright (C) 1998-2000 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * Alternatively, the contents of this file may be used under the terms of ++ * either the GNU General Public License Version 2 or later (the "GPL"), or ++ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++ * in which case the provisions of the GPL or the LGPL are applicable instead ++ * of those above. If you wish to allow use of your version of this file only ++ * under the terms of either the GPL or the LGPL, and not to allow others to ++ * use your version of this file under the terms of the MPL, indicate your ++ * decision by deleting the provisions above and replace them with the notice ++ * and other provisions required by the GPL or the LGPL. If you do not delete ++ * the provisions above, a recipient may use your version of this file under ++ * the terms of any one of the MPL, the GPL or the LGPL. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef nspr_cpucfg___ ++#define nspr_cpucfg___ ++ ++#ifndef XP_UNIX ++#define XP_UNIX ++#endif ++ ++#define PR_AF_INET6 28 /* same as AF_INET6 */ ++ ++#ifndef HAVE_LONG_LONG ++#define HAVE_LONG_LONG ++#endif ++ ++#if defined(__i386__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#undef HAVE_ALIGNED_DOUBLES ++#undef HAVE_ALIGNED_LONGLONGS ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++ ++#elif defined(__amd64__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#define HAVE_ALIGNED_DOUBLES ++#define HAVE_ALIGNED_LONGLONGS ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#else ++ ++#error "Unknown CPU architecture" ++ ++#endif ++ ++#ifndef NO_NSPR_10_SUPPORT ++ ++#define BYTES_PER_BYTE PR_BYTES_PER_BYTE ++#define BYTES_PER_SHORT PR_BYTES_PER_SHORT ++#define BYTES_PER_INT PR_BYTES_PER_INT ++#define BYTES_PER_INT64 PR_BYTES_PER_INT64 ++#define BYTES_PER_LONG PR_BYTES_PER_LONG ++#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT ++#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE ++#define BYTES_PER_WORD PR_BYTES_PER_WORD ++#define BYTES_PER_DWORD PR_BYTES_PER_DWORD ++ ++#define BITS_PER_BYTE PR_BITS_PER_BYTE ++#define BITS_PER_SHORT PR_BITS_PER_SHORT ++#define BITS_PER_INT PR_BITS_PER_INT ++#define BITS_PER_INT64 PR_BITS_PER_INT64 ++#define BITS_PER_LONG PR_BITS_PER_LONG ++#define BITS_PER_FLOAT PR_BITS_PER_FLOAT ++#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE ++#define BITS_PER_WORD PR_BITS_PER_WORD ++ ++#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 ++#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 ++#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 ++#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 ++#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 ++#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 ++#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 ++#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 ++ ++#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT ++#define ALIGN_OF_INT PR_ALIGN_OF_INT ++#define ALIGN_OF_LONG PR_ALIGN_OF_LONG ++#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 ++#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT ++#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE ++#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER ++#define ALIGN_OF_WORD PR_ALIGN_OF_WORD ++ ++#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 ++#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 ++#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 ++ ++#endif /* NO_NSPR_10_SUPPORT */ ++ ++#endif /* nspr_cpucfg___ */ diff --git a/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md___pth.h b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md___pth.h new file mode 100644 index 00000000000..f68f0f28464 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md___pth.h @@ -0,0 +1,30 @@ +$NetBSD: patch-mozilla_nsprpub_pr_include_md___pth.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/include/md/_pth.h.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/include/md/_pth.h +@@ -146,7 +146,7 @@ + #define _PT_PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) + #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \ + || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ +- || defined(HPUX) || defined(FREEBSD) \ ++ || defined(HPUX) || defined(FREEBSD) || defined(__DragonFly__) \ + || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \ + || defined(NTO) || defined(DARWIN) \ + || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) +@@ -237,7 +237,7 @@ + #endif /* defined(_PR_DCETHREADS) */ + + #elif defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ +- || defined(FREEBSD) || defined(SYMBIAN) ++ || defined(FREEBSD) || defined(SYMBIAN) || defined(__DragonFly__) + #define PT_PRIO_MIN sched_get_priority_min(SCHED_OTHER) + #define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER) + #elif defined(NTO) +@@ -296,6 +296,7 @@ extern int (*_PT_aix_yield_fcn)(); + #elif defined(HPUX) || defined(SOLARIS) \ + || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ + || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ ++ || defined(__DragonFly__) \ + || defined(BSDI) || defined(NTO) || defined(DARWIN) \ + || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) + #define _PT_PTHREAD_YIELD() sched_yield() diff --git a/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md_prosdep.h b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md_prosdep.h new file mode 100644 index 00000000000..735fb0dd713 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_include_md_prosdep.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_nsprpub_pr_include_md_prosdep.h,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/include/md/prosdep.h.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/include/md/prosdep.h +@@ -66,7 +66,7 @@ PR_BEGIN_EXTERN_C + #if defined(AIX) + #include "md/_aix.h" + +-#elif defined(FREEBSD) ++#elif defined(FREEBSD) || defined(__DragonFly__) + #include "md/_freebsd.h" + + #elif defined(NETBSD) diff --git a/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_md_unix_uxrng.c b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_md_unix_uxrng.c new file mode 100644 index 00000000000..53b8c2349e4 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_md_unix_uxrng.c @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_nsprpub_pr_src_md_unix_uxrng.c,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/src/md/unix/uxrng.c.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/src/md/unix/uxrng.c +@@ -126,7 +126,7 @@ GetHighResClock(void *buf, size_t maxbyt + + #elif (defined(LINUX) || defined(FREEBSD) || defined(__FreeBSD_kernel__) \ + || defined(NETBSD) || defined(__NetBSD_kernel__) || defined(OPENBSD) \ +- || defined(SYMBIAN)) ++ || defined(SYMBIAN)) || defined(__DragonFly__) + #include <sys/types.h> + #include <sys/stat.h> + #include <fcntl.h> diff --git a/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_pthreads_ptio.c b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_pthreads_ptio.c new file mode 100644 index 00000000000..f81c02baf4a --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_pthreads_ptio.c @@ -0,0 +1,23 @@ +$NetBSD: patch-mozilla_nsprpub_pr_src_pthreads_ptio.c,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/src/pthreads/ptio.c.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/src/pthreads/ptio.c +@@ -212,7 +212,8 @@ static PRBool _pr_ipv6_v6only_on_by_defa + || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \ + || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ + || defined(BSDI) || defined(NTO) || defined(DARWIN) \ +- || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) ++ || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) \ ++ || defined(__DragonFly__) + #define _PRSelectFdSetArg_t fd_set * + #else + #error "Cannot determine architecture" +@@ -3286,7 +3287,7 @@ static PRIOMethods _pr_socketpollfd_meth + || defined(AIX) || defined(FREEBSD) || defined(NETBSD) \ + || defined(OPENBSD) || defined(BSDI) || defined(NTO) \ + || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS) \ +- || defined(SYMBIAN) ++ || defined(SYMBIAN) || defined(__DragonFly__) + #define _PR_FCNTL_FLAGS O_NONBLOCK + #else + #error "Can't determine architecture" diff --git a/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_pthreads_ptsynch.c b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_pthreads_ptsynch.c new file mode 100644 index 00000000000..aa71ebe5c8f --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_nsprpub_pr_src_pthreads_ptsynch.c @@ -0,0 +1,13 @@ +$NetBSD: patch-mozilla_nsprpub_pr_src_pthreads_ptsynch.c,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/nsprpub/pr/src/pthreads/ptsynch.c.orig 2012-02-16 10:25:22.000000000 +0000 ++++ mozilla/nsprpub/pr/src/pthreads/ptsynch.c +@@ -842,7 +842,7 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphor + */ + #if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \ + || defined(FREEBSD) || defined(OPENBSD) || defined(BSDI) \ +- || defined(DARWIN) || defined(SYMBIAN) ++ || defined(DARWIN) || defined(SYMBIAN) || defined(__DragonFly__) + /* union semun is defined by including <sys/sem.h> */ + #else + /* according to X/OPEN we have to define it ourselves */ diff --git a/mail/thunderbird10/patches/patch-mozilla_xpcom_Makefile.in b/mail/thunderbird10/patches/patch-mozilla_xpcom_Makefile.in new file mode 100644 index 00000000000..6269ac0a725 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_xpcom_Makefile.in @@ -0,0 +1,15 @@ +$NetBSD: patch-mozilla_xpcom_Makefile.in,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/xpcom/Makefile.in.orig 2012-02-16 10:25:32.000000000 +0000 ++++ mozilla/xpcom/Makefile.in +@@ -68,6 +68,10 @@ DIRS += windbgdlg + endif + endif + ++ifeq ($(OS_ARCH),NetBSD) ++EXTRA_DSO_LDOPTS += -Wl,-rpath,${PREFIX}/lib/xulrunner-sdk/sdk/lib ++endif ++ + ifdef ENABLE_TESTS + TOOL_DIRS += \ + tests \ diff --git a/mail/thunderbird10/patches/patch-mozilla_xpcom_idl-parser_header.py b/mail/thunderbird10/patches/patch-mozilla_xpcom_idl-parser_header.py new file mode 100644 index 00000000000..3f4bc9ea64a --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_xpcom_idl-parser_header.py @@ -0,0 +1,17 @@ +$NetBSD: patch-mozilla_xpcom_idl-parser_header.py,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/xpcom/idl-parser/header.py.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/idl-parser/header.py +@@ -521,6 +521,12 @@ if __name__ == '__main__': + outfd.close() + + if options.depfile is not None: ++ dirname = os.path.dirname(options.depfile) ++ if dirname: ++ try: ++ os.makedirs(dirname) ++ except: ++ pass + depfd = open(options.depfile, 'w') + deps = [dep.replace('\\', '/') for dep in idl.deps] + diff --git a/mail/thunderbird10/patches/patch-mozilla_xulrunner_app_Makefile.in b/mail/thunderbird10/patches/patch-mozilla_xulrunner_app_Makefile.in new file mode 100644 index 00000000000..870770f16fc --- /dev/null +++ b/mail/thunderbird10/patches/patch-mozilla_xulrunner_app_Makefile.in @@ -0,0 +1,15 @@ +$NetBSD: patch-mozilla_xulrunner_app_Makefile.in,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xulrunner/app/Makefile.in.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xulrunner/app/Makefile.in +@@ -130,6 +130,10 @@ endif + RCFLAGS += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" + endif + ++ifeq ($(OS_ARCH),NetBSD) ++OS_LIBS += $(call EXPAND_LIBNAME,kvm) ++endif ++ + include $(topsrcdir)/config/rules.mk + + DEFINES += -DXULRUNNER_ICO=\"$(DIST)/branding/xulrunner.ico\" -DDOCUMENT_ICO=\"$(DIST)/branding/document.ico\" diff --git a/mail/thunderbird10/patches/patch-mp b/mail/thunderbird10/patches/patch-mp new file mode 100644 index 00000000000..35cd4e62f47 --- /dev/null +++ b/mail/thunderbird10/patches/patch-mp @@ -0,0 +1,17 @@ +$NetBSD: patch-mp,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/media/libsydneyaudio/src/Makefile.in.orig 2012-02-16 10:25:19.000000000 +0000 ++++ mozilla/media/libsydneyaudio/src/Makefile.in +@@ -97,6 +97,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/thunderbird10/patches/patch-pa b/mail/thunderbird10/patches/patch-pa new file mode 100644 index 00000000000..41fef903699 --- /dev/null +++ b/mail/thunderbird10/patches/patch-pa @@ -0,0 +1,11 @@ +$NetBSD: patch-pa,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xulrunner/installer/mozilla-js.pc.in.orig 2012-02-16 10:25:33.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/thunderbird10 -L${prefix}/lib/thunderbird10 %MOZ_JS_LINK% + Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE diff --git a/mail/thunderbird10/patches/patch-pb b/mail/thunderbird10/patches/patch-pb new file mode 100644 index 00000000000..97da4d319f0 --- /dev/null +++ b/mail/thunderbird10/patches/patch-pb @@ -0,0 +1,11 @@ +$NetBSD: patch-pb,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xulrunner/installer/libxul.pc.in.orig 2012-02-16 10:25:33.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/thunderbird10 -L${prefix}/lib/thunderbird10 %MOZ_XUL_LINK% + Cflags: -I${includedir} %WCHAR_CFLAGS% diff --git a/mail/thunderbird10/patches/patch-pc b/mail/thunderbird10/patches/patch-pc new file mode 100644 index 00000000000..ba8ef4645ef --- /dev/null +++ b/mail/thunderbird10/patches/patch-pc @@ -0,0 +1,12 @@ +$NetBSD: patch-pc,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xulrunner/installer/libxul-embedding.pc.in.orig 2012-02-16 10:25:33.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/thunderbird10 -L${prefix}/lib/thunderbird10 -lxpcomglue + Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS% diff --git a/mail/thunderbird10/patches/patch-pd b/mail/thunderbird10/patches/patch-pd new file mode 100644 index 00000000000..618b21cfb23 --- /dev/null +++ b/mail/thunderbird10/patches/patch-pd @@ -0,0 +1,11 @@ +$NetBSD: patch-pd,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xulrunner/installer/mozilla-nss.pc.in.orig 2012-02-16 10:25:33.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/thunderbird10 -L${prefix}/lib/thunderbird10 -lsmime3 -lssl3 -lnss3 -lnssutil3 + Cflags: -I${includedir} diff --git a/mail/thunderbird10/patches/patch-pg b/mail/thunderbird10/patches/patch-pg new file mode 100644 index 00000000000..3433d2f191b --- /dev/null +++ b/mail/thunderbird10/patches/patch-pg @@ -0,0 +1,14 @@ +$NetBSD: patch-pg,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xulrunner/installer/mozilla-nspr.pc.in.orig 2012-02-16 10:25:33.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/thunderbird10 -L${prefix}/lib/thunderbird10 -lplds4 -lplc4 -lnspr4 -pthread ++Cflags: -I${includedir} diff --git a/mail/thunderbird10/patches/patch-rc b/mail/thunderbird10/patches/patch-rc new file mode 100644 index 00000000000..a7f2a77ab61 --- /dev/null +++ b/mail/thunderbird10/patches/patch-rc @@ -0,0 +1,11 @@ +$NetBSD: patch-rc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/browser/branding/unofficial/locales/en-US/brand.dtd.orig 2012-02-16 10:24:45.000000000 +0000 ++++ mozilla/browser/branding/unofficial/locales/en-US/brand.dtd +@@ -1,4 +1,4 @@ +-<!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/thunderbird10/patches/patch-security_nss_cmd_shlibsign_sign.sh b/mail/thunderbird10/patches/patch-security_nss_cmd_shlibsign_sign.sh new file mode 100644 index 00000000000..76ec5b05111 --- /dev/null +++ b/mail/thunderbird10/patches/patch-security_nss_cmd_shlibsign_sign.sh @@ -0,0 +1,17 @@ +$NetBSD: patch-security_nss_cmd_shlibsign_sign.sh,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +This tries to dlopen libsoftokn3.so which is linked against sqlite3, +so we need a directory containing libsqlite3.so in the search path, +beside the directory containing libsoftokn3.so itself. + +--- mozilla/security/nss/cmd/shlibsign/sign.sh.orig 2012-02-16 10:25:24.000000000 +0000 ++++ mozilla/security/nss/cmd/shlibsign/sign.sh +@@ -26,7 +26,7 @@ WIN*) + export LIBPATH + SHLIB_PATH=${1}/lib:${4}:$SHLIB_PATH + export SHLIB_PATH +- LD_LIBRARY_PATH=${1}/lib:${4}:$LD_LIBRARY_PATH ++ LD_LIBRARY_PATH=${1}/lib:${4}:${PREFIX}/lib:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH + DYLD_LIBRARY_PATH=${1}/lib:${4}:$DYLD_LIBRARY_PATH + export DYLD_LIBRARY_PATH diff --git a/mail/thunderbird10/patches/patch-toolkit_toolkit-tiers.mk b/mail/thunderbird10/patches/patch-toolkit_toolkit-tiers.mk new file mode 100644 index 00000000000..f19ba515645 --- /dev/null +++ b/mail/thunderbird10/patches/patch-toolkit_toolkit-tiers.mk @@ -0,0 +1,13 @@ +$NetBSD: patch-toolkit_toolkit-tiers.mk,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/toolkit/toolkit-tiers.mk.orig 2012-02-16 10:25:31.000000000 +0000 ++++ mozilla/toolkit/toolkit-tiers.mk +@@ -82,7 +82,7 @@ ifndef MOZ_NATIVE_BZ2 + tier_platform_dirs += modules/libbz2 + endif + tier_platform_dirs += modules/libmar +-tier_platform_dirs += other-licenses/bsdiff ++#tier_platform_dirs += other-licenses/bsdiff + endif + + tier_platform_dirs += gfx/qcms diff --git a/mail/thunderbird10/patches/patch-xa b/mail/thunderbird10/patches/patch-xa new file mode 100644 index 00000000000..019ce6c415a --- /dev/null +++ b/mail/thunderbird10/patches/patch-xa @@ -0,0 +1,119 @@ +$NetBSD: patch-xa,v 1.1.1.1 2012/03/15 09:45:29 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-03-09 12:27:39.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/thunderbird10/patches/patch-xb b/mail/thunderbird10/patches/patch-xb new file mode 100644 index 00000000000..07061cd98e0 --- /dev/null +++ b/mail/thunderbird10/patches/patch-xb @@ -0,0 +1,91 @@ +$NetBSD: patch-xb,v 1.1.1.1 2012/03/15 09:45:30 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-03-09 12:27:39.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/thunderbird10/patches/patch-xc b/mail/thunderbird10/patches/patch-xc new file mode 100644 index 00000000000..adfb95df29a --- /dev/null +++ b/mail/thunderbird10/patches/patch-xc @@ -0,0 +1,73 @@ +$NetBSD: patch-xc,v 1.1.1.1 2012/03/15 09:45:30 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-03-09 12:27:39.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/thunderbird10/patches/patch-xd b/mail/thunderbird10/patches/patch-xd new file mode 100644 index 00000000000..a392163881b --- /dev/null +++ b/mail/thunderbird10/patches/patch-xd @@ -0,0 +1,126 @@ +$NetBSD: patch-xd,v 1.1.1.1 2012/03/15 09:45:30 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-03-09 12:27:39.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/thunderbird10/patches/patch-xe b/mail/thunderbird10/patches/patch-xe new file mode 100644 index 00000000000..5cba4de9d8e --- /dev/null +++ b/mail/thunderbird10/patches/patch-xe @@ -0,0 +1,77 @@ +$NetBSD: patch-xe,v 1.1.1.1 2012/03/15 09:45:29 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-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp +@@ -132,6 +132,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, PRUint32 methodIndex, + PRUint32 paramCount, nsXPTCVariant* params) +@@ -139,30 +148,30 @@ XPTC_InvokeByIndex(nsISupports* that, PR + PRUint32 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/thunderbird10/patches/patch-xf b/mail/thunderbird10/patches/patch-xf new file mode 100644 index 00000000000..0d92c877a69 --- /dev/null +++ b/mail/thunderbird10/patches/patch-xf @@ -0,0 +1,43 @@ +$NetBSD: patch-xf,v 1.1.1.1 2012/03/15 09:45:30 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-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp +@@ -123,17 +123,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/thunderbird10/patches/patch-xg b/mail/thunderbird10/patches/patch-xg new file mode 100644 index 00000000000..b6f60d3f917 --- /dev/null +++ b/mail/thunderbird10/patches/patch-xg @@ -0,0 +1,33 @@ +$NetBSD: patch-xg,v 1.1.1.1 2012/03/15 09:45:30 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-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp +@@ -118,18 +118,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/thunderbird10/patches/patch-xj b/mail/thunderbird10/patches/patch-xj new file mode 100644 index 00000000000..bac2ee22f2c --- /dev/null +++ b/mail/thunderbird10/patches/patch-xj @@ -0,0 +1,129 @@ +$NetBSD: patch-xj,v 1.1.1.1 2012/03/15 09:45:30 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-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp +@@ -41,6 +41,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 +@@ -71,7 +72,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, + { + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; + nsXPTCMiniVariant* dispatchParams = NULL; +- nsIInterfaceInfo* iface_info = NULL; + const nsXPTMethodInfo* info; + PRUint32 paramCount; + PRUint32 i; +@@ -79,12 +79,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; +- +- iface_info->GetMethodInfo(PRUint16(methodIndex), &info); ++ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info); + NS_ASSERTION(info,"no method info"); + if (! info) + return NS_ERROR_UNEXPECTED; +@@ -119,8 +114,10 @@ PrepareAndDispatch(nsXPTCStubBase* self, + if ((PRUint32) 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; + } +@@ -130,8 +127,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; + } +@@ -179,9 +178,9 @@ PrepareAndDispatch(nsXPTCStubBase* self, + } + } + +- result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams); +- +- NS_RELEASE(iface_info); ++ result = self->mOuter->CallMethod((PRUint16) methodIndex, ++ info, ++ dispatchParams); + + if (dispatchParams != paramBuffer) + delete [] dispatchParams; +@@ -195,7 +194,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" \ +@@ -206,6 +207,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/thunderbird10/patches/patch-xk b/mail/thunderbird10/patches/patch-xk new file mode 100644 index 00000000000..718a7b7a97a --- /dev/null +++ b/mail/thunderbird10/patches/patch-xk @@ -0,0 +1,156 @@ +$NetBSD: patch-xk,v 1.1.1.1 2012/03/15 09:45:30 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-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s +@@ -1,43 +1,43 @@ +-# -*- Mode: Asm -*- +-# +-# ***** BEGIN LICENSE BLOCK ***** +-# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +-# +-# 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 mozilla.org code. +-# +-# The Initial Developer of the Original Code is +-# Netscape Communications Corporation. +-# Portions created by the Initial Developer are Copyright (C) 1999 +-# the Initial Developer. All Rights Reserved. +-# +-# Contributor(s): +-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl) +-# beard@netscape.com (Patrick Beard) +-# waterson@netscape.com (Chris Waterson) +-# +-# Alternatively, the contents of this file may be used under the terms of +-# either the GNU General Public License Version 2 or later (the "GPL"), or +-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +-# in which case the provisions of the GPL or the LGPL are applicable instead +-# of those above. If you wish to allow use of your version of this file only +-# under the terms of either the GPL or the LGPL, and not to allow others to +-# use your version of this file under the terms of the MPL, indicate your +-# decision by deleting the provisions above and replace them with the notice +-# and other provisions required by the GPL or the LGPL. If you do not delete +-# the provisions above, a recipient may use your version of this file under +-# the terms of any one of the MPL, the GPL or the LGPL. +-# +-# ***** END LICENSE BLOCK ***** ++// -*- Mode: Asm -*- ++// ++// ***** BEGIN LICENSE BLOCK ***** ++// Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++// ++// 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 mozilla.org code. ++// ++// The Initial Developer of the Original Code is ++// Netscape Communications Corporation. ++// Portions created by the Initial Developer are Copyright (C) 1999 ++// the Initial Developer. All Rights Reserved. ++// ++// Contributor(s): ++// Franz.Sirl-kernel@lauterbach.com (Franz Sirl) ++// beard@netscape.com (Patrick Beard) ++// waterson@netscape.com (Chris Waterson) ++// ++// Alternatively, the contents of this file may be used under the terms of ++// either the GNU General Public License Version 2 or later (the "GPL"), or ++// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++// in which case the provisions of the GPL or the LGPL are applicable instead ++// of those above. If you wish to allow use of your version of this file only ++// under the terms of either the GPL or the LGPL, and not to allow others to ++// use your version of this file under the terms of the MPL, indicate your ++// decision by deleting the provisions above and replace them with the notice ++// and other provisions required by the GPL or the LGPL. If you do not delete ++// the provisions above, a recipient may use your version of this file under ++// the terms of any one of the MPL, the GPL or the LGPL. ++// ++// ***** END LICENSE BLOCK ***** + + .set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4 + .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 +@@ -60,23 +60,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) +@@ -85,21 +85,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/thunderbird10/patches/patch-xl b/mail/thunderbird10/patches/patch-xl new file mode 100644 index 00000000000..7dee97784ab --- /dev/null +++ b/mail/thunderbird10/patches/patch-xl @@ -0,0 +1,200 @@ +$NetBSD: patch-xl,v 1.1.1.1 2012/03/15 09:45:29 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-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s +@@ -1,43 +1,43 @@ +-# -*- Mode: Asm -*- +-# +-# ***** BEGIN LICENSE BLOCK ***** +-# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +-# +-# 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 mozilla.org code. +-# +-# The Initial Developer of the Original Code is +-# Netscape Communications Corporation. +-# Portions created by the Initial Developer are Copyright (C) 1999 +-# the Initial Developer. All Rights Reserved. +-# +-# Contributor(s): +-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl) +-# beard@netscape.com (Patrick Beard) +-# waterson@netscape.com (Chris Waterson) +-# +-# Alternatively, the contents of this file may be used under the terms of +-# either the GNU General Public License Version 2 or later (the "GPL"), or +-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +-# in which case the provisions of the GPL or the LGPL are applicable instead +-# of those above. If you wish to allow use of your version of this file only +-# under the terms of either the GPL or the LGPL, and not to allow others to +-# use your version of this file under the terms of the MPL, indicate your +-# decision by deleting the provisions above and replace them with the notice +-# and other provisions required by the GPL or the LGPL. If you do not delete +-# the provisions above, a recipient may use your version of this file under +-# the terms of any one of the MPL, the GPL or the LGPL. +-# +-# ***** END LICENSE BLOCK ***** ++// -*- Mode: Asm -*- ++// ++// ***** BEGIN LICENSE BLOCK ***** ++// Version: MPL 1.1/GPL 2.0/LGPL 2.1 ++// ++// 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 mozilla.org code. ++// ++// The Initial Developer of the Original Code is ++// Netscape Communications Corporation. ++// Portions created by the Initial Developer are Copyright (C) 1999 ++// the Initial Developer. All Rights Reserved. ++// ++// Contributor(s): ++// Franz.Sirl-kernel@lauterbach.com (Franz Sirl) ++// beard@netscape.com (Patrick Beard) ++// waterson@netscape.com (Chris Waterson) ++// ++// Alternatively, the contents of this file may be used under the terms of ++// either the GNU General Public License Version 2 or later (the "GPL"), or ++// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), ++// in which case the provisions of the GPL or the LGPL are applicable instead ++// of those above. If you wish to allow use of your version of this file only ++// under the terms of either the GPL or the LGPL, and not to allow others to ++// use your version of this file under the terms of the MPL, indicate your ++// decision by deleting the provisions above and replace them with the notice ++// and other provisions required by the GPL or the LGPL. If you do not delete ++// the provisions above, a recipient may use your version of this file under ++// the terms of any one of the MPL, the GPL or the LGPL. ++// ++// ***** END LICENSE BLOCK ***** + .set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4 + .set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9 + .set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14 +@@ -55,41 +55,41 @@ + + .section ".text" + .align 2 +- .globl XPTC_InvokeByIndex +- .type XPTC_InvokeByIndex,@function ++ .globl NS_InvokeByIndex_P ++ .type NS_InvokeByIndex_P,@function + +-# +-# XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, +-# PRUint32 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 ++// ++// NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, ++// PRUint32 paramCount, nsXPTCVariant* params) ++// ++ ++NS_InvokeByIndex_P: ++ stwu sp,-32(sp) // setup standard stack frame ++ mflr r0 // save LR ++ stw r3,8(sp) // r3 <= that ++ stw r4,12(sp) // r4 <= methodIndex + stw r30,16(sp) + stw r31,20(sp) + +- 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) +@@ -98,18 +98,13 @@ XPTC_InvokeByIndex: + lfd f7,80(r30) + lfd f8,88(r30) + +- lwz r3,8(r31) # r3 <= that +- lwz r4,12(r31) # r4 <= methodIndex +- lwz r5,0(r3) # r5 <= vtable ( == *that ) +- slwi r4,r4,3 # convert to offset ( *= 8 ) +- addi r4,r4,8 # skip first two vtable entries +- add r4,r4,r5 +- lhz r0,0(r4) # virtual base offset +- extsh r0,r0 +- add r3,r3,r0 +- lwz r0,4(r4) # r0 <= methodpointer ( == vtable + offset ) ++ lwz r3,8(r31) // r3 <= that ++ lwz r4,12(r31) // r4 <= methodIndex ++ lwz r5,0(r3) // r5 <= vtable ( == *that ) ++ slwi r4,r4,2 // convert to offset ( *= 4 ) ++ lwzx r0,r4,r5 // r0 <= methodpointer ( == vtable + offset ) + +- lwz r4,4(r30) # load GP regs with method parameters ++ lwz r4,4(r30) // load GP regs with method parameters + lwz r5,8(r30) + lwz r6,12(r30) + lwz r7,16(r30) +@@ -117,13 +112,13 @@ XPTC_InvokeByIndex: + lwz r9,24(r30) + lwz r10,28(r30) + +- mtlr r0 # copy methodpointer to LR +- blrl # call method ++ mtlr r0 // copy methodpointer to LR ++ blrl // call method + +- lwz r30,16(r31) # restore r30 & r31 ++ lwz r30,16(r31) // restore r30 & r31 + lwz r31,20(r31) + +- lwz r11,0(sp) # clean up the stack ++ lwz r11,0(sp) // clean up the stack + lwz r0,4(r11) + mtlr r0 + mr sp,r11 diff --git a/mail/thunderbird10/patches/patch-xm b/mail/thunderbird10/patches/patch-xm new file mode 100644 index 00000000000..583db7949c4 --- /dev/null +++ b/mail/thunderbird10/patches/patch-xm @@ -0,0 +1,49 @@ +$NetBSD: patch-xm,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +NetBSD/ppc xptcall support code. Originally from pkgsrc/www/mozilla. + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp +@@ -40,9 +40,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 +@@ -104,8 +104,10 @@ invoke_copy_to_stack(PRUint32* d, + if ((PRUint32) 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) { +@@ -114,8 +116,10 @@ invoke_copy_to_stack(PRUint32* 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 +@@ -142,6 +146,6 @@ invoke_copy_to_stack(PRUint32* d, + } + + extern "C" +-XPTC_PUBLIC_API(nsresult) +-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, ++EXPORT_XPCOM_API(nsresult) ++NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex, + PRUint32 paramCount, nsXPTCVariant* params); diff --git a/mail/thunderbird10/patches/patch-xn b/mail/thunderbird10/patches/patch-xn new file mode 100644 index 00000000000..de8db6b6b0f --- /dev/null +++ b/mail/thunderbird10/patches/patch-xn @@ -0,0 +1,53 @@ +$NetBSD: patch-xn,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s +@@ -42,8 +42,46 @@ + + /* This code is for MIPS using the O32 ABI. */ + +-#include <sys/regdef.h> +-#include <sys/asm.h> ++#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 diff --git a/mail/thunderbird10/patches/patch-xo b/mail/thunderbird10/patches/patch-xo new file mode 100644 index 00000000000..7182d0a0296 --- /dev/null +++ b/mail/thunderbird10/patches/patch-xo @@ -0,0 +1,53 @@ +$NetBSD: patch-xo,v 1.1.1.1 2012/03/15 09:45:30 ryoon Exp $ + +--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s.orig 2012-02-16 10:25:33.000000000 +0000 ++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s +@@ -26,8 +26,46 @@ + + /* This code is for MIPS using the O32 ABI. */ + +-#include <sys/regdef.h> +-#include <sys/asm.h> ++#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 diff --git a/mail/thunderbird10/patches/patch-zb b/mail/thunderbird10/patches/patch-zb new file mode 100644 index 00000000000..021eceb9397 --- /dev/null +++ b/mail/thunderbird10/patches/patch-zb @@ -0,0 +1,15 @@ +$NetBSD: patch-zb,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mail/app/Makefile.in.orig 2012-02-16 10:18:22.000000000 +0000 ++++ mail/app/Makefile.in +@@ -103,6 +103,10 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) + TK_LIBS := -framework Cocoa $(TK_LIBS) + endif + ++ifeq ($(OS_ARCH),NetBSD) ++LIBS += -lossaudio ++endif ++ + LIBS += \ + $(EXTRA_DSO_LIBS) \ + $(XPCOM_STANDALONE_GLUE_LDOPTS) \ diff --git a/mail/thunderbird10/patches/patch-zc b/mail/thunderbird10/patches/patch-zc new file mode 100644 index 00000000000..5bfb5ff5216 --- /dev/null +++ b/mail/thunderbird10/patches/patch-zc @@ -0,0 +1,40 @@ +$NetBSD: patch-zc,v 1.1.1.1 2012/03/15 09:45:29 ryoon Exp $ + +--- mail/app/nsMailApp.cpp.orig 2012-02-16 10:18:22.000000000 +0000 ++++ mail/app/nsMailApp.cpp +@@ -48,6 +48,27 @@ + + #include <stdio.h> + #include <stdarg.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"); ++} + + #include "nsCOMPtr.h" + #include "nsILocalFile.h" +@@ -147,6 +168,7 @@ static int do_main(const char *exePath, + + int main(int argc, char* argv[]) + { ++ netbsd_fixrlimit(); + char exePath[MAXPATHLEN]; + + nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); |