summaryrefslogtreecommitdiff
path: root/mail/thunderbird/patches
diff options
context:
space:
mode:
authortaya <taya@pkgsrc.org>2004-04-19 23:25:27 +0000
committertaya <taya@pkgsrc.org>2004-04-19 23:25:27 +0000
commite10bcd7cf19b54a65be5cdcf9906d802458dbd0a (patch)
tree7eeab581484005aa67ff6ac2bdce20eb75e04ea6 /mail/thunderbird/patches
parent94bd18b74a494e078fe57f1ab979a244480873b2 (diff)
downloadpkgsrc-e10bcd7cf19b54a65be5cdcf9906d802458dbd0a.tar.gz
Initial import of thunderbird.
Mozilla Thunderbird is a redesign of the Mozilla mail component. The goal is to produce a cross platform stand alone mail application using the XUL user interface language.
Diffstat (limited to 'mail/thunderbird/patches')
-rw-r--r--mail/thunderbird/patches/patch-aa21
-rw-r--r--mail/thunderbird/patches/patch-ab39
-rw-r--r--mail/thunderbird/patches/patch-ac37
-rw-r--r--mail/thunderbird/patches/patch-ad76
-rw-r--r--mail/thunderbird/patches/patch-ae42
-rw-r--r--mail/thunderbird/patches/patch-af26
-rw-r--r--mail/thunderbird/patches/patch-ag15
-rw-r--r--mail/thunderbird/patches/patch-am14
-rw-r--r--mail/thunderbird/patches/patch-aw13
-rw-r--r--mail/thunderbird/patches/patch-ba70
-rw-r--r--mail/thunderbird/patches/patch-bb67
-rw-r--r--mail/thunderbird/patches/patch-bm32
-rw-r--r--mail/thunderbird/patches/patch-bn18
-rw-r--r--mail/thunderbird/patches/patch-bo29
-rw-r--r--mail/thunderbird/patches/patch-bp14
-rw-r--r--mail/thunderbird/patches/patch-bq14
-rw-r--r--mail/thunderbird/patches/patch-br17
-rw-r--r--mail/thunderbird/patches/patch-bs14
18 files changed, 558 insertions, 0 deletions
diff --git a/mail/thunderbird/patches/patch-aa b/mail/thunderbird/patches/patch-aa
new file mode 100644
index 00000000000..88e799e8bcf
--- /dev/null
+++ b/mail/thunderbird/patches/patch-aa
@@ -0,0 +1,21 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+--- config/autoconf.mk.in.orig 2003-10-30 22:11:05.000000000 +0100
++++ config/autoconf.mk.in
+@@ -29,13 +29,13 @@ MOZILLA_VERSION = @MOZILLA_VERSION@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+-includedir = @includedir@/mozilla-$(MOZILLA_VERSION)
++includedir = @includedir@/$(MOZILLA_PKG_NAME)
+ libdir = @libdir@
+ datadir = @datadir@
+ mandir = @mandir@
+-idldir = @datadir@/idl/mozilla-$(MOZILLA_VERSION)
++idldir = @datadir@/idl/$(MOZILLA_PKG_NAME)
+
+-mozappdir = $(libdir)/mozilla-$(MOZILLA_VERSION)
++mozappdir = $(libdir)/$(MOZILLA_PKG_NAME)
+ mredir = $(libdir)/mre/mre-$(MOZILLA_VERSION)
+ mrelibdir = $(mredir)/lib
+
diff --git a/mail/thunderbird/patches/patch-ab b/mail/thunderbird/patches/patch-ab
new file mode 100644
index 00000000000..7f9a46ff5d6
--- /dev/null
+++ b/mail/thunderbird/patches/patch-ab
@@ -0,0 +1,39 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/configure.in ./configure.in
+--- ../Orig/mozilla/configure.in 2003-12-12 08:30:36.000000000 +0900
++++ ./configure.in 2004-01-16 23:17:19.000000000 +0900
+@@ -959,6 +959,9 @@
+ # MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive'
+ # MKSHLIB_UNFORCE_ALL=''
+ # fi
++ if test "$LIBRUNPATH"; then
++ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
++ fi
+ ;;
+
+ *-hpux*)
+@@ -1248,6 +1251,13 @@
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+ fi
++
++ case "${target_cpu}" in
++ alpha*)
++ CFLAGS="$CFLAGS -mieee"
++ CXXFLAGS="$CXXFLAGS -mieee"
++ ;;
++ esac
+ ;;
+
+ *-nto*)
+@@ -2192,9 +2202,6 @@
+ CXXFLAGS="$CXXFLAGS -mt"
+ fi
+ ;;
+- *-*-netbsd*)
+- USE_PTHREADS=
+- _PTHREAD_LDFLAGS=
+ esac
+ fi
+
diff --git a/mail/thunderbird/patches/patch-ac b/mail/thunderbird/patches/patch-ac
new file mode 100644
index 00000000000..57eceb46372
--- /dev/null
+++ b/mail/thunderbird/patches/patch-ac
@@ -0,0 +1,37 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in ./xpcom/reflect/xptcall/src/md/unix/Makefile.in
+--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2003-08-15 13:00:23.000000000 +0900
++++ ./xpcom/reflect/xptcall/src/md/unix/Makefile.in 2004-01-16 23:17:21.000000000 +0900
+@@ -135,7 +135,7 @@
+ # 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
+@@ -169,7 +169,7 @@
+ # 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
+@@ -295,6 +295,13 @@
+ CPPSRCS := xptcinvoke_sparc_netbsd.cpp xptcstubs_sparc_netbsd.cpp
+ ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.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
+ #
diff --git a/mail/thunderbird/patches/patch-ad b/mail/thunderbird/patches/patch-ad
new file mode 100644
index 00000000000..d0dd9f64f91
--- /dev/null
+++ b/mail/thunderbird/patches/patch-ad
@@ -0,0 +1,76 @@
+$NetBSD: patch-ad,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp
+--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp 2001-09-29 05:12:51.000000000 +0900
++++ ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp 2004-01-16 23:17:22.000000000 +0900
+@@ -132,6 +132,15 @@
+ }
+ }
+
++/*
++ * 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 @@
+ 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/thunderbird/patches/patch-ae b/mail/thunderbird/patches/patch-ae
new file mode 100644
index 00000000000..c5fc12b258e
--- /dev/null
+++ b/mail/thunderbird/patches/patch-ae
@@ -0,0 +1,42 @@
+$NetBSD: patch-ae,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp
+--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp 2001-09-29 05:12:52.000000000 +0900
++++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp 2004-01-16 23:17:24.000000000 +0900
+@@ -123,17 +123,27 @@
+ }
+ }
+
++/*
++ * 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/thunderbird/patches/patch-af b/mail/thunderbird/patches/patch-af
new file mode 100644
index 00000000000..7b415895080
--- /dev/null
+++ b/mail/thunderbird/patches/patch-af
@@ -0,0 +1,26 @@
+$NetBSD: patch-af,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/security/nss/lib/freebl/unix_rand.c ./security/nss/lib/freebl/unix_rand.c
+--- ../Orig/mozilla/security/nss/lib/freebl/unix_rand.c 2003-05-31 08:31:19.000000000 +0900
++++ ./security/nss/lib/freebl/unix_rand.c 2004-01-16 23:17:26.000000000 +0900
+@@ -32,6 +32,7 @@
+ */
+
+ #include <stdio.h>
++#include <fcntl.h>
+ #include <string.h>
+ #include <signal.h>
+ #include <unistd.h>
+@@ -691,7 +692,11 @@
+ /* dup write-side of pipe to stderr and stdout */
+ if (p[1] != 1) dup2(p[1], 1);
+ if (p[1] != 2) dup2(p[1], 2);
+- close(0);
++ fd = open("/dev/null", O_RDONLY);
++ if (fd != 0) {
++ dup2(fd, 0);
++ close(fd);
++ }
+ for (fd = getdtablesize(); --fd > 2; close(fd))
+ ;
+
diff --git a/mail/thunderbird/patches/patch-ag b/mail/thunderbird/patches/patch-ag
new file mode 100644
index 00000000000..14ab1d2bde5
--- /dev/null
+++ b/mail/thunderbird/patches/patch-ag
@@ -0,0 +1,15 @@
+$NetBSD: patch-ag,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/extensions/transformiix/source/base/ErrorObserver.h ./extensions/transformiix/source/base/ErrorObserver.h
+--- ../Orig/mozilla/extensions/transformiix/source/base/ErrorObserver.h 2003-01-17 21:39:36.000000000 +0900
++++ ./extensions/transformiix/source/base/ErrorObserver.h 2004-01-16 23:17:34.000000000 +0900
+@@ -28,7 +28,8 @@
+
+ #include "baseutils.h"
+ #include "txError.h"
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ class nsAString;
+
+ /**
diff --git a/mail/thunderbird/patches/patch-am b/mail/thunderbird/patches/patch-am
new file mode 100644
index 00000000000..12dba027d3d
--- /dev/null
+++ b/mail/thunderbird/patches/patch-am
@@ -0,0 +1,14 @@
+$NetBSD: patch-am,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/nsprpub/pr/src/pthreads/ptio.c ./nsprpub/pr/src/pthreads/ptio.c
+--- ../Orig/mozilla/nsprpub/pr/src/pthreads/ptio.c 2003-11-27 10:30:44.000000000 +0900
++++ ./nsprpub/pr/src/pthreads/ptio.c 2004-01-16 23:17:38.000000000 +0900
+@@ -205,7 +205,7 @@
+ #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(HPUX) \
+ || defined(LINUX) || defined(FREEBSD) || defined(BSDI) || defined(VMS) \
+ || defined(NTO) || defined(OPENBSD) || defined(DARWIN) \
+- || defined(UNIXWARE)
++ || defined(UNIXWARE) || defined(NETBSD)
+ #define _PRSockOptVal_t void *
+ #else
+ #error "Cannot determine architecture"
diff --git a/mail/thunderbird/patches/patch-aw b/mail/thunderbird/patches/patch-aw
new file mode 100644
index 00000000000..a75074eb46a
--- /dev/null
+++ b/mail/thunderbird/patches/patch-aw
@@ -0,0 +1,13 @@
+$NetBSD: patch-aw,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/widget/src/gtksuperwin/Makefile.in ./widget/src/gtksuperwin/Makefile.in
+--- ../Orig/mozilla/widget/src/gtksuperwin/Makefile.in 2003-04-19 05:14:09.000000000 +0900
++++ ./widget/src/gtksuperwin/Makefile.in 2004-01-16 23:17:41.000000000 +0900
+@@ -25,6 +25,7 @@
+ MODULE = widget
+ LIBRARY_NAME = gtksuperwin
+ EXPORT_LIBRARY = 1
++MKSHLIB = $(MKCSHLIB)
+
+
+ CSRCS = \
diff --git a/mail/thunderbird/patches/patch-ba b/mail/thunderbird/patches/patch-ba
new file mode 100644
index 00000000000..3c73f5a878a
--- /dev/null
+++ b/mail/thunderbird/patches/patch-ba
@@ -0,0 +1,70 @@
+$NetBSD: patch-ba,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/nsprpub/pr/include/md/_netbsd.cfg ./nsprpub/pr/include/md/_netbsd.cfg
+--- ../Orig/mozilla/nsprpub/pr/include/md/_netbsd.cfg 2000-12-02 06:29:17.000000000 +0900
++++ ./nsprpub/pr/include/md/_netbsd.cfg 2004-01-16 23:17:44.000000000 +0900
+@@ -45,7 +45,8 @@
+
+ #define PR_AF_INET6 24 /* same as AF_INET6 */
+
+-#if defined(__i386__) || defined(__arm32__) || defined(__MIPSEL__)
++#if defined(__i386__) || defined(__arm32__) || defined(__arm__) || \
++ defined(__armel__) || defined(__MIPSEL__)
+
+ #define IS_LITTLE_ENDIAN 1
+ #undef IS_BIG_ENDIAN
+@@ -91,7 +92,53 @@
+ #define PR_ALIGN_OF_DOUBLE 4
+ #define PR_ALIGN_OF_POINTER 4
+
+-#elif defined(__sparc__) || defined(__MIPSEB__)
++#elif defined(__sparc_v9__)
++
++#undef IS_LITTLE_ENDIAN
++#define IS_BIG_ENDIAN 1
++#define HAVE_LONG_LONG
++#define HAVE_ALIGNED_DOUBLES
++#define 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 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
++
++#elif defined(__sparc__) || defined(__MIPSEB__) || defined(__armeb__)
+
+ #undef IS_LITTLE_ENDIAN
+ #define IS_BIG_ENDIAN 1
diff --git a/mail/thunderbird/patches/patch-bb b/mail/thunderbird/patches/patch-bb
new file mode 100644
index 00000000000..3bd87285967
--- /dev/null
+++ b/mail/thunderbird/patches/patch-bb
@@ -0,0 +1,67 @@
+$NetBSD: patch-bb,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/nsprpub/pr/include/md/_netbsd.h ./nsprpub/pr/include/md/_netbsd.h
+--- ../Orig/mozilla/nsprpub/pr/include/md/_netbsd.h 2003-09-12 02:24:53.000000000 +0900
++++ ./nsprpub/pr/include/md/_netbsd.h 2004-02-21 16:47:07.000000000 +0900
+@@ -48,12 +48,20 @@
+ #define _PR_SI_ARCHITECTURE "m68k"
+ #elif defined(__powerpc__)
+ #define _PR_SI_ARCHITECTURE "powerpc"
++#elif defined(__sparc_v9__)
++#define _PR_SI_ARCHITECTURE "sparc64"
+ #elif defined(__sparc__)
+ #define _PR_SI_ARCHITECTURE "sparc"
+ #elif defined(__mips__)
+ #define _PR_SI_ARCHITECTURE "mips"
+ #elif defined(__arm32__)
+ #define _PR_SI_ARCHITECTURE "arm32"
++#elif defined(__arm__)
++#define _PR_SI_ARCHITECTURE "arm"
++#elif defined(__armel__)
++#define _PR_SI_ARCHITECTURE "armel"
++#elif defined(__armeb__)
++#define _PR_SI_ARCHITECTURE "armeb"
+ #endif
+
+ #if defined(__ELF__)
+@@ -86,6 +94,12 @@
+ #define _PR_INET6_PROBE
+ #endif
+
++#if __NetBSD_Version__ >= 106370000
++/* NetBSD 1.6ZK */
++#define _PR_HAVE_GETPROTO_R
++#define _PR_HAVE_GETPROTO_R_INT
++#endif
++
+ #define USE_SETJMP
+
+ #ifndef _PR_PTHREADS
+@@ -108,7 +122,17 @@
+ }
+ #define _MD_GET_SP(_thread) CONTEXT(_thread)[2]
+ #endif
+-#ifdef __sparc__
++#ifdef __sparc_v9__
++#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
++{ \
++ sigsetjmp(CONTEXT(_thread), 1); \
++ CONTEXT(_thread)[1] = (unsigned char*) ((_sp) - 176 - 0x7ff); \
++ CONTEXT(_thread)[2] = (long) _main; \
++ CONTEXT(_thread)[3] = (long) _main + 4; \
++ *status = PR_TRUE; \
++}
++#define _MD_GET_SP(_thread) (CONTEXT(_thread)[2]+0x7ff)
++#elif defined(__sparc__)
+ #define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
+ { \
+ sigsetjmp(CONTEXT(_thread), 1); \
+@@ -150,7 +174,7 @@
+ }
+ #define _MD_GET_SP(_thread) CONTEXT(_thread)[32]
+ #endif
+-#ifdef __arm32__
++#if defined(__arm32__) || defined(__arm__) || defined(__armel__) || defined(__armeb__)
+ #define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
+ { \
+ sigsetjmp(CONTEXT(_thread), 1); \
diff --git a/mail/thunderbird/patches/patch-bm b/mail/thunderbird/patches/patch-bm
new file mode 100644
index 00000000000..b59abb44b99
--- /dev/null
+++ b/mail/thunderbird/patches/patch-bm
@@ -0,0 +1,32 @@
+$NetBSD: patch-bm,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp
+--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp 2001-09-29 05:12:52.000000000 +0900
++++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp 2004-01-16 23:17:51.000000000 +0900
+@@ -118,18 +118,23 @@
+ * 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/thunderbird/patches/patch-bn b/mail/thunderbird/patches/patch-bn
new file mode 100644
index 00000000000..0b9cebbbad6
--- /dev/null
+++ b/mail/thunderbird/patches/patch-bn
@@ -0,0 +1,18 @@
+$NetBSD: patch-bn,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/xpcom/io/nsNativeCharsetUtils.cpp ./xpcom/io/nsNativeCharsetUtils.cpp
+--- ../Orig/mozilla/xpcom/io/nsNativeCharsetUtils.cpp 2004-01-08 10:25:56.000000000 +0900
++++ ./xpcom/io/nsNativeCharsetUtils.cpp 2004-01-16 23:17:54.000000000 +0900
+@@ -294,7 +294,12 @@
+ {
+ const char *blank_list[] = { "", NULL };
+ const char **native_charset_list = blank_list;
++#ifdef CODESET
+ const char *native_charset = nl_langinfo(CODESET);
++#else
++ const char *native_charset = nsnull;
++#endif
++
+ if (native_charset == nsnull) {
+ NS_ERROR("native charset is unknown");
+ // fallback to ISO-8859-1
diff --git a/mail/thunderbird/patches/patch-bo b/mail/thunderbird/patches/patch-bo
new file mode 100644
index 00000000000..ee9bfdfd8df
--- /dev/null
+++ b/mail/thunderbird/patches/patch-bo
@@ -0,0 +1,29 @@
+$NetBSD: patch-bo,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/nsprpub/configure.in ./nsprpub/configure.in
+--- ../Orig/mozilla/nsprpub/configure.in 2003-12-16 04:58:56.000000000 +0900
++++ ./nsprpub/configure.in 2004-01-31 21:30:19.000000000 +0900
+@@ -930,6 +930,9 @@
+ 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
+ ;;
+
+ *-hpux*)
+@@ -2182,7 +2185,12 @@
+ _PTHREAD_LDFLAGS="-lc_r"
+ fi
+ ;;
+- *-openbsd*|*-bsdi*|*-netbsd*)
++ *-netbsd*)
++ if test "$ac_cv_have_dash_pthread" = "yes"; then
++ _PTHREAD_LDFLAGS="-pthread"
++ fi
++ ;;
++ *-openbsd*|*-bsdi*)
+ AC_DEFINE(_THREAD_SAFE)
+ dnl -pthread links in -lc_r, so don't specify it explicitly.
+ if test "$ac_cv_have_dash_pthread" = "yes"; then
diff --git a/mail/thunderbird/patches/patch-bp b/mail/thunderbird/patches/patch-bp
new file mode 100644
index 00000000000..2a12c14c9ed
--- /dev/null
+++ b/mail/thunderbird/patches/patch-bp
@@ -0,0 +1,14 @@
+$NetBSD: patch-bp,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/other-licenses/libical/src/libical/Makefile.in ./other-licenses/libical/src/libical/Makefile.in
+--- ../Orig/mozilla/other-licenses/libical/src/libical/Makefile.in 2003-01-08 13:59:28.000000000 +0900
++++ ./other-licenses/libical/src/libical/Makefile.in 2004-01-16 23:18:03.000000000 +0900
+@@ -179,7 +179,7 @@
+ $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i $(srcdir)/icalrestriction.c.in \
+ $(DESIGNDATA)/restrictions.csv > icalrestriction.c
+
+-ifneq (,$(filter BeOS Darwin OpenVMS,$(OS_ARCH)))
++ifneq (,$(filter BeOS Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH)))
+ DEFINES += -D__USE_BSD=1
+ endif
+
diff --git a/mail/thunderbird/patches/patch-bq b/mail/thunderbird/patches/patch-bq
new file mode 100644
index 00000000000..7e5b6c700de
--- /dev/null
+++ b/mail/thunderbird/patches/patch-bq
@@ -0,0 +1,14 @@
+$NetBSD: patch-bq,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/xpcom/io/nsLocalFileUnix.h ./xpcom/io/nsLocalFileUnix.h
+--- ../Orig/mozilla/xpcom/io/nsLocalFileUnix.h 2003-07-19 07:14:16.000000000 +0900
++++ ./xpcom/io/nsLocalFileUnix.h 2004-01-16 23:18:06.000000000 +0900
+@@ -57,7 +57,7 @@
+ #endif
+
+ // so we can statfs on freebsd
+-#if defined(__FreeBSD__)
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #define HAVE_SYS_STATFS_H
+ #define STATFS statfs
+ #include <sys/param.h>
diff --git a/mail/thunderbird/patches/patch-br b/mail/thunderbird/patches/patch-br
new file mode 100644
index 00000000000..d5a6b21f384
--- /dev/null
+++ b/mail/thunderbird/patches/patch-br
@@ -0,0 +1,17 @@
+$NetBSD: patch-br,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+--- nsprpub/pr/src/misc/prnetdb.c.orig 2004-02-19 21:45:15.000000000 +0900
++++ nsprpub/pr/src/misc/prnetdb.c 2004-02-19 21:50:57.000000000 +0900
+@@ -2094,7 +2094,12 @@
+ */
+ hints.ai_socktype = SOCK_STREAM;
+
++ LOCK_DNS();
++
+ rv = GETADDRINFO(hostname, NULL, &hints, &res);
++
++ UNLOCK_DNS();
++
+ if (rv == 0)
+ return (PRAddrInfo *) res;
+
diff --git a/mail/thunderbird/patches/patch-bs b/mail/thunderbird/patches/patch-bs
new file mode 100644
index 00000000000..207ea50a407
--- /dev/null
+++ b/mail/thunderbird/patches/patch-bs
@@ -0,0 +1,14 @@
+$NetBSD: patch-bs,v 1.1.1.1 2004/04/19 23:25:29 taya Exp $
+
+diff -ru ../Orig/mozilla/toolkit/mozapps/downloads/src/Makefile.in ./toolkit/mozapps/downloads/src/Makefile.in
+--- ../Orig/mozilla/toolkit/mozapps/downloads/src/Makefile.in 2003-12-11 06:59:41.000000000 +0900
++++ ./toolkit/mozapps/downloads/src/Makefile.in 2004-04-19 18:42:20.000000000 +0900
+@@ -31,7 +31,7 @@
+ libs:: nsHelperAppDlg.js
+
+ nsHelperAppDlg.js: nsHelperAppDlg.js.in
+- $(MOZILLA_DIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $^ > $@
++ $(PERL) $(MOZILLA_DIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $^ > $@
+ $(NSINSTALL) $@ $(DIST)/bin/components/
+
+ include $(topsrcdir)/config/rules.mk