aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mail-client/thunderbird/files')
-rw-r--r--mail-client/thunderbird/files/1001-xulrunner_fix_jemalloc_vs_aslr.patch55
-rw-r--r--mail-client/thunderbird/files/1002_fix-system-hunspell-dict-detections.patch112
-rw-r--r--mail-client/thunderbird/files/2000-thunderbird_gentoo_install_dirs.patch22
-rw-r--r--mail-client/thunderbird/files/bug-606109.patch48
-rw-r--r--mail-client/thunderbird/files/cups-1.4.4-fixup.patch161
-rw-r--r--mail-client/thunderbird/files/enigmail-1.1.2-20110124-locale-fixup.diff8
-rw-r--r--mail-client/thunderbird/files/icon/thunderbird-icon-unbranded.pngbin0 -> 13280 bytes
-rw-r--r--mail-client/thunderbird/files/icon/thunderbird-icon.pngbin0 -> 6499 bytes
-rw-r--r--mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop8
-rw-r--r--mail-client/thunderbird/files/icon/thunderbird.desktop8
-rw-r--r--mail-client/thunderbird/files/libnotify-0.7.patch56
-rw-r--r--mail-client/thunderbird/files/thunderbird-3.1-gcc45.patch37
-rw-r--r--mail-client/thunderbird/files/thunderbird-3.1-noalsa-fixup.patch26
-rw-r--r--mail-client/thunderbird/files/thunderbird-3.3-gconf-config-update.patch50
-rw-r--r--mail-client/thunderbird/files/thunderbird-gentoo-default-prefs-1.js9
-rw-r--r--mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js14
-rw-r--r--mail-client/thunderbird/files/thunderbird-respect-ldflags.patch28
-rw-r--r--mail-client/thunderbird/files/thunderbird-xul-1.9.2-arm-fixes.patch35
-rw-r--r--mail-client/thunderbird/files/xulrunner-1.9.2-gtk+-2.21.patch23
19 files changed, 700 insertions, 0 deletions
diff --git a/mail-client/thunderbird/files/1001-xulrunner_fix_jemalloc_vs_aslr.patch b/mail-client/thunderbird/files/1001-xulrunner_fix_jemalloc_vs_aslr.patch
new file mode 100644
index 0000000..7511ac7
--- /dev/null
+++ b/mail-client/thunderbird/files/1001-xulrunner_fix_jemalloc_vs_aslr.patch
@@ -0,0 +1,55 @@
+diff -urpx 'cscope*' -x '.*.swp' mozilla-1.9.1-orig/memory/jemalloc/jemalloc.c mozilla-1.9.1/memory/jemalloc/jemalloc.c
+--- mozilla-orig/memory/jemalloc/jemalloc.c 2009-07-30 17:30:25.000000000 +0200
++++ mozilla/memory/jemalloc/jemalloc.c 2009-08-10 14:28:59.000000000 +0200
+@@ -392,7 +392,7 @@ __FBSDID("$FreeBSD: head/lib/libc/stdlib
+ static const bool __isthreaded = true;
+ #endif
+
+-#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN)
++#if defined(MOZ_MEMORY_SOLARIS) || defined(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD)
+ #define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */
+ #endif
+
+@@ -2305,20 +2305,31 @@ pages_map_align(size_t size, int pfd, si
+ * We don't use MAP_FIXED here, because it can cause the *replacement*
+ * of existing mappings, and we only want to create new mappings.
+ */
+-#ifdef MALLOC_PAGEFILE
+- if (pfd != -1) {
+- ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
+- MAP_NOSYNC | MAP_ALIGN, pfd, 0);
+- } else
+-#endif
+- {
+- ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
+- MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
+- }
++ ret = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE, MAP_PRIVATE |
++ MAP_NOSYNC| MAP_ANON, -1, 0);
+ assert(ret != NULL);
+
+ if (ret == MAP_FAILED)
+ ret = NULL;
++ else {
++ uintptr_t aligned_ret;
++ size_t extra_size;
++
++ aligned_ret = (uintptr_t)ret + alignment - 1;
++ aligned_ret &= ~(alignment - 1);
++ extra_size = aligned_ret - (uintptr_t)ret;
++ munmap(ret, extra_size);
++ munmap(ret + extra_size + size, alignment - extra_size);
++ ret = (void *)aligned_ret;
++#ifdef MALLOC_PAGEFILE
++ if (pfd != -1) {
++ ret = mmap(ret, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
++ MAP_NOSYNC | MAP_FIXED, pfd, 0);
++ }
++ if (ret == MAP_FAILED)
++ ret = NULL;
++#endif
++ }
+ return (ret);
+ }
+ #endif
+
diff --git a/mail-client/thunderbird/files/1002_fix-system-hunspell-dict-detections.patch b/mail-client/thunderbird/files/1002_fix-system-hunspell-dict-detections.patch
new file mode 100644
index 0000000..5a905aa
--- /dev/null
+++ b/mail-client/thunderbird/files/1002_fix-system-hunspell-dict-detections.patch
@@ -0,0 +1,112 @@
+diff -r e06632956519 mozilla/extensions/spellcheck/Makefile.in
+--- a/mozilla/extensions/spellcheck/Makefile.in Sun Apr 04 07:02:14 2010 +0300
++++ b/mozilla/extensions/spellcheck/Makefile.in Tue Apr 06 23:07:03 2010 -0500
+@@ -42,13 +42,19 @@
+ include $(DEPTH)/config/autoconf.mk
+
+ MODULE = spellchecker
++ifndef MOZ_NATIVE_HUNSPELL
+ DIRS = idl locales
++else
++DIRS = idl
++endif
+
+ ifeq (camino,$(MOZ_BUILD_APP))
+ DIRS += osxspell
+ else
++ifndef MOZ_NATIVE_HUNSPELL
+ DIRS += hunspell
+ endif
++endif
+
+ DIRS += src
+
+diff -r e06632956519 mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp
+--- a/mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp Sun Apr 04 07:02:14 2010 +0300
++++ b/mozilla/extensions/spellcheck/hunspell/src/mozHunspell.cpp Tue Apr 06 23:07:03 2010 -0500
+@@ -63,6 +63,9 @@
+ #include "nsISimpleEnumerator.h"
+ #include "nsIDirectoryEnumerator.h"
+ #include "nsIFile.h"
++#ifdef MOZ_NATIVE_HUNSPELL
++#include "nsILocalFile.h"
++#endif
+ #include "nsDirectoryServiceUtils.h"
+ #include "nsDirectoryServiceDefs.h"
+ #include "mozISpellI18NManager.h"
+@@ -307,7 +310,16 @@
+ return;
+
+ nsCOMPtr<nsIFile> dictDir;
+- rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY,
++ #ifdef MOZ_NATIVE_HUNSPELL
++ nsCOMPtr<nsILocalFile> localFile;
++ rv = NS_NewNativeLocalFile(nsDependentCString("/usr/share/myspell"),PR_TRUE, getter_AddRefs(localFile));
++ if (localFile && NS_SUCCEEDED(rv)) {
++ localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(dictDir));
++ LoadDictionariesFromDir(dictDir);
++ }
++ else {
++ #endif
++ rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY,
+ NS_GET_IID(nsIFile), getter_AddRefs(dictDir));
+ if (NS_SUCCEEDED(rv)) {
+ LoadDictionariesFromDir(dictDir);
+@@ -332,6 +344,9 @@
+ LoadDictionariesFromDir(appDir);
+ }
+ }
++#ifdef MOZ_NATIVE_HUNSPELL
++ }
++#endif
+
+ nsCOMPtr<nsISimpleEnumerator> dictDirs;
+ rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,
+diff -r e06632956519 mozilla/extensions/spellcheck/src/Makefile.in
+--- a/mozilla/extensions/spellcheck/src/Makefile.in Sun Apr 04 07:02:14 2010 +0300
++++ b/mozilla/extensions/spellcheck/src/Makefile.in Tue Apr 06 23:07:03 2010 -0500
+@@ -63,9 +63,15 @@
+ txtsvc \
+ uconv \
+ unicharutil \
++ xulapp \
+ $(NULL)
+
+-CPPSRCS = \
++ifdef MOZ_NATIVE_HUNSPELL
++CPPSRCS += mozHunspell.cpp \
++ mozHunspellDirProvider.cpp
++endif
++
++CPPSRCS += \
+ mozSpellCheckerFactory.cpp \
+ mozSpellChecker.cpp \
+ mozPersonalDictionary.cpp \
+@@ -80,8 +86,15 @@
+ SHARED_LIBRARY_LIBS += ../osxspell/src/$(LIB_PREFIX)osxspell_s.$(LIB_SUFFIX)
+ LOCAL_INCLUDES += -I$(srcdir)/../osxspell/src
+ else
++ifndef MOZ_NATIVE_HUNSPELL
+ SHARED_LIBRARY_LIBS += ../hunspell/src/$(LIB_PREFIX)hunspell_s.$(LIB_SUFFIX)
+ LOCAL_INCLUDES += -I$(srcdir)/../hunspell/src
++else
++LOCAL_INCLUDES += $(MOZ_HUNSPELL_CFLAGS) \
++ -I$(srcdir)/../hunspell/src \
++ -DMOZ_NATIVE_HUNSPELL \
++ $(NULL)
++endif
+ endif
+
+ EXTRA_DSO_LDOPTS = \
+@@ -96,3 +109,11 @@
+ LOCAL_INCLUDES += \
+ -I$(topsrcdir)/xpcom/io \
+ $(NULL)
++
++ifdef MOZ_NATIVE_HUNSPELL
++export:: $(srcdir)/../hunspell/src/mozHunspell.cpp $(srcdir)/../hunspell/src/mozHunspellDirProvider.cpp
++ $(INSTALL) $(srcdir)/../hunspell/src/mozHunspell.* $(srcdir)/../hunspell/src/mozHunspellDirProvider.* .
++GARBAGE += mozHunspell.$(OBJ_SUFFIX) mozHunspell.cpp mozHunspellDirProvider.$(OBJ_SUFFIX) mozHunspellDirProvider.cpp
++clean::
++ rm -f mozHunspell.* mozHunspellDirProvider.*
++endif
diff --git a/mail-client/thunderbird/files/2000-thunderbird_gentoo_install_dirs.patch b/mail-client/thunderbird/files/2000-thunderbird_gentoo_install_dirs.patch
new file mode 100644
index 0000000..b3af6f3
--- /dev/null
+++ b/mail-client/thunderbird/files/2000-thunderbird_gentoo_install_dirs.patch
@@ -0,0 +1,22 @@
+diff -ur work.orig/config/autoconf.mk.in work/config/autoconf.mk.in
+--- work.orig/config/autoconf.mk.in 2009-04-28 16:55:24.000000000 +0000
++++ work/config/autoconf.mk.in 2009-04-28 16:57:12.000000000 +0000
+@@ -60,14 +60,14 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
++includedir = @includedir@/thunderbird
+ libdir = @libdir@
+ datadir = @datadir@
+ mandir = @mandir@
+-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
++idldir = $(datadir)/idl/thunderbird
+
+-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
++installdir = $(libdir)/thunderbird
++sdkdir = $(libdir)/thunderbird-devel
+
+ MOZDEPTH = $(DEPTH)/mozilla
+ DIST = $(MOZDEPTH)/dist
diff --git a/mail-client/thunderbird/files/bug-606109.patch b/mail-client/thunderbird/files/bug-606109.patch
new file mode 100644
index 0000000..57d9cd9
--- /dev/null
+++ b/mail-client/thunderbird/files/bug-606109.patch
@@ -0,0 +1,48 @@
+# HG changeset patch
+# User Jory A. Pratt <anarchy@gentoo.org>
+# Parent 74e4421e0a30c6e21b594675e32a8d9d663c309c
+Add missing ifde MOZ_MEDIA
+
+diff --git a/content/base/src/nsContentSink.cpp b/content/base/src/nsContentSink.cpp
+--- a/mozilla/content/base/src/nsContentSink.cpp
++++ b/mozilla/content/base/src/nsContentSink.cpp
+@@ -1860,17 +1860,19 @@ nsIAtom** const kDefaultAllowedTags [] =
+ &nsGkAtoms::nobr,
+ &nsGkAtoms::noscript,
+ &nsGkAtoms::ol,
+ &nsGkAtoms::optgroup,
+ &nsGkAtoms::option,
+ &nsGkAtoms::output,
+ &nsGkAtoms::p,
+ &nsGkAtoms::pre,
++#ifdef MOZ_MEDIA
+ &nsGkAtoms::progress,
++#endif
+ &nsGkAtoms::q,
+ &nsGkAtoms::rp,
+ &nsGkAtoms::rt,
+ &nsGkAtoms::ruby,
+ &nsGkAtoms::s,
+ &nsGkAtoms::samp,
+ &nsGkAtoms::section,
+ &nsGkAtoms::select,
+@@ -1952,17 +1954,19 @@ nsIAtom** const kDefaultAllowedAttribute
+ &nsGkAtoms::itemref,
+ &nsGkAtoms::itemscope,
+ &nsGkAtoms::itemtype,
+ &nsGkAtoms::kind,
+ &nsGkAtoms::label,
+ &nsGkAtoms::lang,
+ &nsGkAtoms::list,
+ &nsGkAtoms::longdesc,
++#ifdef MOZ_MEDIA
+ &nsGkAtoms::loop,
++#endif
+ &nsGkAtoms::low,
+ &nsGkAtoms::max,
+ &nsGkAtoms::maxlength,
+ &nsGkAtoms::media,
+ &nsGkAtoms::min,
+ &nsGkAtoms::mozdonotsend,
+ &nsGkAtoms::method,
+ &nsGkAtoms::multiple,
diff --git a/mail-client/thunderbird/files/cups-1.4.4-fixup.patch b/mail-client/thunderbird/files/cups-1.4.4-fixup.patch
new file mode 100644
index 0000000..a0923e8
--- /dev/null
+++ b/mail-client/thunderbird/files/cups-1.4.4-fixup.patch
@@ -0,0 +1,161 @@
+# HG changeset patch
+# User Matthew Gregan <kinetik@flim.org>
+# Date 1293624205 -3600
+# Node ID ffa1ef8ab52b4081e27aa2b24d14a550386f90db
+# Parent 9e561d402701f46eb56dbadb96b6963f4518cdd0
+Bug 573039 - Construct nsCUPSShim statically and avoid calling PR_UnloadLibrary on libcups after it has been initialized. r=karlt a=clegnitto
+
+diff --git a/mozilla/gfx/src/psshared/nsCUPSShim.cpp b/mozilla/gfx/src/psshared/nsCUPSShim.cpp
+--- a/mozilla/gfx/src/psshared/nsCUPSShim.cpp
++++ b/mozilla/gfx/src/psshared/nsCUPSShim.cpp
+@@ -83,14 +83,8 @@ nsCUPSShim::Init()
+ #endif
+ PR_UnloadLibrary(mCupsLib);
+ mCupsLib = nsnull;
+ return PR_FALSE;
+ }
+ }
+ return PR_TRUE;
+ }
+-
+-nsCUPSShim::~nsCUPSShim()
+-{
+- if (mCupsLib)
+- PR_UnloadLibrary(mCupsLib);
+-}
+diff --git a/mozilla/gfx/src/psshared/nsCUPSShim.h b/mozilla/gfx/src/psshared/nsCUPSShim.h
+--- a/mozilla/gfx/src/psshared/nsCUPSShim.h
++++ b/mozilla/gfx/src/psshared/nsCUPSShim.h
+@@ -81,17 +81,16 @@ typedef int (PR_CALLBACK *CupsAddOptionT
+ int num_options,
+ cups_option_t **options);
+
+ struct PRLibrary;
+
+ class NS_PSSHARED nsCUPSShim {
+ public:
+ nsCUPSShim() : mCupsLib(nsnull) { }
+- ~nsCUPSShim();
+
+ /**
+ * Initialize this object. Attempt to load the CUPS shared
+ * library and find function pointers for the supported
+ * functions (see below).
+ * @return PR_FALSE if the shared library could not be loaded, or if
+ * any of the functions could not be found.
+ * PR_TRUE for successful initialization.
+diff --git a/mozilla/gfx/src/psshared/nsPSPrinters.cpp b/mozilla/gfx/src/psshared/nsPSPrinters.cpp
+--- a/mozilla/gfx/src/psshared/nsPSPrinters.cpp
++++ b/mozilla/gfx/src/psshared/nsPSPrinters.cpp
+@@ -51,32 +51,34 @@
+ #include "plstr.h"
+
+ #define NS_CUPS_PRINTER "CUPS/"
+ #define NS_CUPS_PRINTER_LEN (sizeof(NS_CUPS_PRINTER) - 1)
+
+ /* dummy printer name for the gfx/src/ps driver */
+ #define NS_POSTSCRIPT_DRIVER_NAME "PostScript/"
+
++nsCUPSShim gCupsShim;
++
+ /* Initialize the printer manager object */
+ nsresult
+ nsPSPrinterList::Init()
+ {
+ nsresult rv;
+
+ mPrefSvc = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
+ if (NS_SUCCEEDED(rv))
+ rv = mPrefSvc->GetBranch("print.", getter_AddRefs(mPref));
+ NS_ENSURE_SUCCESS(rv, NS_ERROR_NOT_INITIALIZED);
+
+ // Should we try cups?
+ PRBool useCups = PR_TRUE;
+ rv = mPref->GetBoolPref("postscript.cups.enabled", &useCups);
+- if (useCups)
+- mCups.Init();
++ if (useCups && !gCupsShim.IsInitialized())
++ gCupsShim.Init();
+ return NS_OK;
+ }
+
+
+ /* Check whether the PostScript module has been disabled at runtime */
+ PRBool
+ nsPSPrinterList::Enabled()
+ {
+@@ -94,35 +96,35 @@ nsPSPrinterList::Enabled()
+ /* Fetch a list of printers handled by the PostsScript module */
+ void
+ nsPSPrinterList::GetPrinterList(nsTArray<nsCString>& aList)
+ {
+ aList.Clear();
+
+ // Query CUPS for a printer list. The default printer goes to the
+ // head of the output list; others are appended.
+- if (mCups.IsInitialized()) {
++ if (gCupsShim.IsInitialized()) {
+ cups_dest_t *dests;
+
+- int num_dests = (mCups.mCupsGetDests)(&dests);
++ int num_dests = (gCupsShim.mCupsGetDests)(&dests);
+ if (num_dests) {
+ for (int i = 0; i < num_dests; i++) {
+ nsCAutoString fullName(NS_CUPS_PRINTER);
+ fullName.Append(dests[i].name);
+ if (dests[i].instance != NULL) {
+ fullName.Append("/");
+ fullName.Append(dests[i].instance);
+ }
+ if (dests[i].is_default)
+ aList.InsertElementAt(0, fullName);
+ else
+ aList.AppendElement(fullName);
+ }
+ }
+- (mCups.mCupsFreeDests)(num_dests, dests);
++ (gCupsShim.mCupsFreeDests)(num_dests, dests);
+ }
+
+ // Build the "classic" list of printers -- those accessed by running
+ // an opaque command. This list always contains a printer named "default".
+ // In addition, we look for either an environment variable
+ // MOZILLA_POSTSCRIPT_PRINTER_LIST or a preference setting
+ // print.printer_list, which contains a space-separated list of printer
+ // names.
+diff --git a/mozilla/gfx/src/psshared/nsPSPrinters.h b/mozilla/gfx/src/psshared/nsPSPrinters.h
+--- a/mozilla/gfx/src/psshared/nsPSPrinters.h
++++ b/mozilla/gfx/src/psshared/nsPSPrinters.h
+@@ -37,17 +37,16 @@
+ * ***** END LICENSE BLOCK ***** */
+
+ #ifndef nsPSPrinters_h___
+ #define nsPSPrinters_h___
+
+ #include "nsString.h"
+ #include "nsTArray.h"
+ #include "prtypes.h"
+-#include "nsCUPSShim.h"
+ #include "psSharedCore.h"
+
+ class nsIPrefService;
+ class nsIPrefBranch;
+ class nsCUPSShim;
+
+ class NS_PSSHARED nsPSPrinterList {
+ public:
+@@ -91,12 +90,11 @@ class NS_PSSHARED nsPSPrinterList {
+ * the <type> portion as described for GetPrinterList().
+ * @return The PrinterType value for this name.
+ */
+ static PrinterType GetPrinterType(const nsACString& aName);
+
+ private:
+ nsCOMPtr<nsIPrefService> mPrefSvc;
+ nsCOMPtr<nsIPrefBranch> mPref;
+- nsCUPSShim mCups;
+ };
+
+ #endif /* nsPSPrinters_h___ */
+
+
diff --git a/mail-client/thunderbird/files/enigmail-1.1.2-20110124-locale-fixup.diff b/mail-client/thunderbird/files/enigmail-1.1.2-20110124-locale-fixup.diff
new file mode 100644
index 0000000..e5e52f1
--- /dev/null
+++ b/mail-client/thunderbird/files/enigmail-1.1.2-20110124-locale-fixup.diff
@@ -0,0 +1,8 @@
+--- enigmail/lang/current-languages.txt
++++ enigmail/lang/current-languages.txt
+@@ -1,5 +1,4 @@
+ ar
+-bg-BG
+ ca
+ cs-CZ
+ de-AT
diff --git a/mail-client/thunderbird/files/icon/thunderbird-icon-unbranded.png b/mail-client/thunderbird/files/icon/thunderbird-icon-unbranded.png
new file mode 100644
index 0000000..27265e0
--- /dev/null
+++ b/mail-client/thunderbird/files/icon/thunderbird-icon-unbranded.png
Binary files differ
diff --git a/mail-client/thunderbird/files/icon/thunderbird-icon.png b/mail-client/thunderbird/files/icon/thunderbird-icon.png
new file mode 100644
index 0000000..90ff395
--- /dev/null
+++ b/mail-client/thunderbird/files/icon/thunderbird-icon.png
Binary files differ
diff --git a/mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop b/mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop
new file mode 100644
index 0000000..90c02da
--- /dev/null
+++ b/mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Mozilla Thunderbird
+Comment=Mail & News Reader
+Exec=/usr/bin/thunderbird
+Icon=thunderbird-icon-unbranded
+Terminal=false
+Type=Application
+Categories=Office;Email;
diff --git a/mail-client/thunderbird/files/icon/thunderbird.desktop b/mail-client/thunderbird/files/icon/thunderbird.desktop
new file mode 100644
index 0000000..b696085
--- /dev/null
+++ b/mail-client/thunderbird/files/icon/thunderbird.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Mozilla Thunderbird
+Comment=Mail & News Reader
+Exec=/usr/bin/thunderbird
+Icon=thunderbird-icon
+Terminal=false
+Type=Application
+Categories=Office;Email;
diff --git a/mail-client/thunderbird/files/libnotify-0.7.patch b/mail-client/thunderbird/files/libnotify-0.7.patch
new file mode 100644
index 0000000..ab363a2
--- /dev/null
+++ b/mail-client/thunderbird/files/libnotify-0.7.patch
@@ -0,0 +1,56 @@
+# HG changeset patch
+# User Priit Laes <plaes@plaes.org>
+# Parent 194dd9a57615185c998a87148fac65df51600758
+Bug 628222 - Add support for libnotify-0.7+. r=karlt
+
+diff --git a/mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp b/mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp
+--- a/mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp
++++ b/mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp
+@@ -42,16 +42,21 @@
+ #include "nsNetUtil.h"
+ #include "nsIImageToPixbuf.h"
+ #include "nsIStringBundle.h"
+
+ #include <gdk-pixbuf/gdk-pixbuf.h>
+ #include <libnotify/notify.h>
+ #include <gdk/gdk.h>
+
++// Compatibility macro for <libnotify-0.7
++#ifndef NOTIFY_CHECK_VERSION
++#define NOTIFY_CHECK_VERSION(x,y,z) 0
++#endif
++
+ static PRBool gHasActions = PR_FALSE;
+
+ static void notify_action_cb(NotifyNotification *notification,
+ gchar *action, gpointer user_data)
+ {
+ nsAlertsIconListener* alert = static_cast<nsAlertsIconListener*> (user_data);
+ alert->SendCallback();
+ }
+@@ -199,17 +204,23 @@ nsAlertsIconListener::OnStopFrame(imgIRe
+ return NS_OK;
+ }
+
+ nsresult
+ nsAlertsIconListener::ShowAlert(GdkPixbuf* aPixbuf)
+ {
+ NotifyNotification* notify = notify_notification_new(mAlertTitle.get(),
+ mAlertText.get(),
+- NULL, NULL);
++ NULL
++// >=libnotify-0.7.0 has no support for attaching to widgets
++#if !NOTIFY_CHECK_VERSION(0,7,0)
++ , NULL
++#endif
++ );
++
+ if (!notify)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ if (aPixbuf)
+ notify_notification_set_icon_from_pixbuf(notify, aPixbuf);
+
+ NS_ADDREF(this);
+ if (mAlertHasAction) {
+
diff --git a/mail-client/thunderbird/files/thunderbird-3.1-gcc45.patch b/mail-client/thunderbird/files/thunderbird-3.1-gcc45.patch
new file mode 100644
index 0000000..0757854
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-3.1-gcc45.patch
@@ -0,0 +1,37 @@
+http://bugs.gentoo.org/324863
+
+Fix buffer overflow with GCC 4.5 and -U_FORTIFY_SOURCE=2
+
+Patch by Harald van Dijk
+
+--- comm-1.9.2/mozilla/extensions/spellcheck/hunspell/src/hashmgr.cpp
++++ comm-1.9.2/mozilla/extensions/spellcheck/hunspell/src/hashmgr.cpp
+@@ -187,7 +187,7 @@
+ struct hentry* hp =
+ (struct hentry *) malloc (sizeof(struct hentry) + wbl + descl);
+ if (!hp) return 1;
+- char * hpw = &(hp->word);
++ char * hpw = HENTRY_WORD(hp);
+ strcpy(hpw, word);
+ if (ignorechars != NULL) {
+ if (utf8) {
+--- comm-1.9.2/mozilla/extensions/spellcheck/hunspell/src/htypes.hxx
++++ comm-1.9.2/mozilla/extensions/spellcheck/hunspell/src/htypes.hxx
+@@ -57,6 +57,8 @@
+ #ifndef _HTYPES_HXX_
+ #define _HTYPES_HXX_
+
++#include <cstddef>
++
+ #define ROTATE_LEN 5
+
+ #define ROTATE(v,q) \
+@@ -68,7 +70,7 @@
+ #define H_OPT_PHON (1 << 2)
+
+ // see also csutil.hxx
+-#define HENTRY_WORD(h) &(h->word)
++#define HENTRY_WORD(h) ((char *) h + offsetof(struct hentry, word))
+
+ // approx. number of user defined words
+ #define USERWORD 1000
diff --git a/mail-client/thunderbird/files/thunderbird-3.1-noalsa-fixup.patch b/mail-client/thunderbird/files/thunderbird-3.1-noalsa-fixup.patch
new file mode 100644
index 0000000..5d60b7b
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-3.1-noalsa-fixup.patch
@@ -0,0 +1,26 @@
+diff -urN comm-central-orig/mozilla/content/base/src/nsDocument.cpp comm-central/mozilla/content/base/src/nsDocument.cpp
+--- comm-central-orig/mozilla/content/base/src/nsDocument.cpp 2010-01-28 22:16:08.683135912 -0600
++++ comm-central/mozilla/content/base/src/nsDocument.cpp 2010-01-28 22:17:57.605126833 -0600
+@@ -169,7 +169,9 @@
+ #include "nsIPropertyBag2.h"
+ #include "nsIDOMPageTransitionEvent.h"
+ #include "nsFrameLoader.h"
++#ifdef MOZ_MEDIA
+ #include "nsHTMLMediaElement.h"
++#endif
+
+ #include "mozAutoDocUpdate.h"
+
+diff -urN comm-central-orig/mozilla/content/base/src/nsNodeUtils.cpp comm-central/mozilla/content/base/src/nsNodeUtils.cpp
+--- comm-central-orig/mozilla/content/base/src/nsNodeUtils.cpp 2010-01-28 22:16:08.686138846 -0600
++++ comm-central/mozilla/content/base/src/nsNodeUtils.cpp 2010-01-28 22:17:14.618150370 -0600
+@@ -55,7 +55,9 @@
+ #endif
+ #include "nsBindingManager.h"
+ #include "nsGenericHTMLElement.h"
++#ifdef MOZ_MEDIA
+ #include "nsHTMLMediaElement.h"
++#endif
+
+ // This macro expects the ownerDocument of content_ to be in scope as
+ // |nsIDocument* doc|
diff --git a/mail-client/thunderbird/files/thunderbird-3.3-gconf-config-update.patch b/mail-client/thunderbird/files/thunderbird-3.3-gconf-config-update.patch
new file mode 100644
index 0000000..8bb7237
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-3.3-gconf-config-update.patch
@@ -0,0 +1,50 @@
+diff --git a/configure.in b/configure.in
+--- a/configure.in
++++ b/configure.in
+@@ -5031,16 +5031,21 @@ then
+ fi
+ MOZ_ENABLE_GIO=
+ ])
+ fi
+
+ dnl ========================================================
+ dnl = GConf support module
+ dnl ========================================================
++ MOZ_ARG_DISABLE_BOOL(gconf,
++ [ --disable-gconf Disable Gconf support ],
++ MOZ_ENABLE_GCONF=,
++ MOZ_ENABLE_GCONF=force)
++
+ if test "$MOZ_ENABLE_GCONF"
+ then
+ PKG_CHECK_MODULES(MOZ_GCONF, gconf-2.0 >= $GCONF_VERSION gobject-2.0 ,[
+ MOZ_ENABLE_GCONF=1
+ ],[
+ MOZ_ENABLE_GCONF=
+ ])
+ fi
+diff --git a/mozilla/configure.in b/mozilla/configure.in
+--- a/mozilla/configure.in
++++ b/mozilla/configure.in
+@@ -5701,16 +5701,21 @@ then
+
+ AC_SUBST(MOZ_ENABLE_GIO)
+ AC_SUBST(MOZ_GIO_CFLAGS)
+ AC_SUBST(MOZ_GIO_LIBS)
+
+ dnl ========================================================
+ dnl = GConf support module
+ dnl ========================================================
++ MOZ_ARG_DISABLE_BOOL(gconf,
++ [ --disable-gconf Disable Gconf support ],
++ MOZ_ENABLE_GCONF=,
++ MOZ_ENABLE_GCONF=force)
++
+ if test "$MOZ_ENABLE_GCONF"
+ then
+ PKG_CHECK_MODULES(MOZ_GCONF, gconf-2.0 >= $GCONF_VERSION gobject-2.0 ,[
+ MOZ_GCONF_LIBS=`echo $MOZ_GCONF_LIBS | sed 's/-llinc\>//'`
+ MOZ_ENABLE_GCONF=1
+ ],[
+ if test "$MOZ_ENABLE_GCONF" = "force"
+ then
diff --git a/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs-1.js b/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs-1.js
new file mode 100644
index 0000000..7323bd7
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs-1.js
@@ -0,0 +1,9 @@
+pref("app.update.enabled", false);
+pref("app.update.autoInstallEnabled", false);
+pref("browser.display.use_system_colors", true);
+pref("intl.locale.matchOS", true);
+pref("mail.shell.checkDefaultClient", false);
+
+# Do not switch to Smart Folders after upgrade to 3.0b4
+pref("mail.folder.views.version", "1");
+
diff --git a/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js b/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js
new file mode 100644
index 0000000..38bb11c
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js
@@ -0,0 +1,14 @@
+pref("app.update.enabled", false);
+pref("app.update.autoInstallEnabled", false);
+pref("browser.display.use_system_colors", true);
+pref("intl.locale.matchOS", true);
+pref("mail.shell.checkDefaultClient", false);
+
+# Disable global indexing by default
+pref("mailnews.database.global.indexer.enabled", false);
+
+# Do not switch to Smart Folders after upgrade to 3.0b4
+pref("mail.folder.views.version", "1");
+
+# Ensure we work with imap as expected
+pref("mail.server.default.use_condstore", false)
diff --git a/mail-client/thunderbird/files/thunderbird-respect-ldflags.patch b/mail-client/thunderbird/files/thunderbird-respect-ldflags.patch
new file mode 100644
index 0000000..c35ec64
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-respect-ldflags.patch
@@ -0,0 +1,28 @@
+--- a/directory/c-sdk/build.mk 2010-12-11 08:46:14.137000000 -0600
++++ b/directory/c-sdk/build.mk 2010-12-11 08:46:17.443000000 -0600
+@@ -488,21 +488,21 @@
+ LINK_LIB2 = $(RM) $@; $(AR) $@ $(OBJS2); $(RANLIB) $@
+ ifneq ($(LD),$(CC))
+ ifdef SONAMEFLAG_PREFIX
+-LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \
++LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS)\
+ $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
+ -o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS)
+ else # SONAMEFLAG_PREFIX
+-LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \
++LINK_DLL = $(LD) $(DSO_LDOPTS) $(LDRPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS)\
+ $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
+ -o $@ $(OBJS)
+ endif # SONAMEFLAG_PREFIX
+ else # $(CC) is used to link libs
+ ifdef SONAMEFLAG_PREFIX
+-LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \
++LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS)\
+ $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
+ -o $@ $(SONAMEFLAG_PREFIX)$(notdir $@) $(OBJS)
+ else # SONAMEFLAG_PREFIX
+-LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) \
++LINK_DLL = $(LD) $(DSO_LDOPTS) $(RPATHFLAG_PREFIX)$(RPATHFLAG) $(ALDFLAGS) $(OS_LDFLAGS)\
+ $(DLL_LDFLAGS) $(DLL_EXPORT_FLAGS) \
+ -o $@ $(OBJS)
+ endif # SONAMEFLAG_PREFIX
diff --git a/mail-client/thunderbird/files/thunderbird-xul-1.9.2-arm-fixes.patch b/mail-client/thunderbird/files/thunderbird-xul-1.9.2-arm-fixes.patch
new file mode 100644
index 0000000..c7d7a65
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-xul-1.9.2-arm-fixes.patch
@@ -0,0 +1,35 @@
+Fix arm OS detection
+
+https://bugs.gentoo.org/327783
+https://bugzilla.mozilla.org/show_bug.cgi?id=577319
+---
+--- configure.in
++++ configure.in
+@@ -1424,9 +1424,11 @@
+ CPU_ARCH="$OS_TEST"
+ ;;
+
+-arm)
++arm*)
+ if test "$OS_TARGET" = "WINCE"; then
+ CPU_ARCH="$OS_TEST"
++ else
++ CPU_ARCH="arm"
+ fi
+ ;;
+ esac
+--- mozilla/js/src/configure.in
++++ mozilla/js/src/configure.in
+@@ -1162,9 +1162,11 @@
+ CPU_ARCH="$OS_TEST"
+ ;;
+
+-arm)
++arm*)
+ if test "$OS_TARGET" = "WINCE"; then
+ CPU_ARCH="$OS_TEST"
++ else
++ CPU_ARCH="arm"
+ fi
+ ;;
+ esac
diff --git a/mail-client/thunderbird/files/xulrunner-1.9.2-gtk+-2.21.patch b/mail-client/thunderbird/files/xulrunner-1.9.2-gtk+-2.21.patch
new file mode 100644
index 0000000..fb414e6
--- /dev/null
+++ b/mail-client/thunderbird/files/xulrunner-1.9.2-gtk+-2.21.patch
@@ -0,0 +1,23 @@
+# HG changeset patch
+# User Jonathan Callen <abcd@gentoo.org>
+# Parent 2599ed882191d88a8e8f0cb68492a156163c5ca7
+pass MOZ_GTK_CFLAGS to ensure proper includes are avaliable.
+
+diff --git a/toolkit/system/gnome/Makefile.in b/toolkit/system/gnome/Makefile.in
+--- a/mozilla/toolkit/system/gnome/Makefile.in
++++ b/mozilla/toolkit/system/gnome/Makefile.in
+@@ -84,13 +84,14 @@ EXTRA_DSO_LDOPTS += \
+ $(MOZ_LIBNOTIFY_LIBS) \
+ $(NULL)
+
+ LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/components/build/
+
+ include $(topsrcdir)/config/rules.mk
+
+ CXXFLAGS += \
++ $(MOZ_GTK2_CFLAGS) \
+ $(MOZ_GCONF_CFLAGS) \
+ $(MOZ_GNOMEVFS_CFLAGS) \
+ $(GLIB_CFLAGS) \
+ $(MOZ_LIBNOTIFY_CFLAGS) \
+ $(NULL)