aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2021-12-13 23:22:30 +0100
committerThomas Deutschmann <whissi@gentoo.org>2021-12-13 23:22:30 +0100
commitce47ac8d6cffc3a117d8c23ae568eb629f7822db (patch)
treea063c7672a796bf357f7a32ffceba386d916621a /mail-client/thunderbird/files
parentwww-client/seamonkey: move package into a safe space (diff)
downloadmozilla-ce47ac8d6cffc3a117d8c23ae568eb629f7822db.tar.gz
mozilla-ce47ac8d6cffc3a117d8c23ae568eb629f7822db.tar.bz2
mozilla-ce47ac8d6cffc3a117d8c23ae568eb629f7822db.zip
mail-client/thunderbird: move package into a safe space
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'mail-client/thunderbird/files')
-rw-r--r--mail-client/thunderbird/files/1000_fix_gentoo_preferences.patch25
-rw-r--r--mail-client/thunderbird/files/distribution.ini9
-rw-r--r--mail-client/thunderbird/files/gentoo-default-prefs.js7
-rw-r--r--mail-client/thunderbird/files/gentoo-hwaccel-prefs.js3
-rw-r--r--mail-client/thunderbird/files/icon/thunderbird-r2.desktop30
-rw-r--r--mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop10
-rw-r--r--mail-client/thunderbird/files/icon/thunderbird.desktop9
-rw-r--r--mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js-210
-rw-r--r--mail-client/thunderbird/files/thunderbird-r1.sh116
-rw-r--r--mail-client/thunderbird/files/thunderbird-wayland.sh7
-rw-r--r--mail-client/thunderbird/files/thunderbird-x11.sh7
-rw-r--r--mail-client/thunderbird/files/thunderbird.sh128
12 files changed, 307 insertions, 54 deletions
diff --git a/mail-client/thunderbird/files/1000_fix_gentoo_preferences.patch b/mail-client/thunderbird/files/1000_fix_gentoo_preferences.patch
deleted file mode 100644
index 01542105..00000000
--- a/mail-client/thunderbird/files/1000_fix_gentoo_preferences.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Jory A. Pratt <anarchy@gentoo.org>
-
-Add the gentoo preferences for the omni.jar creation
-
-diff --git a/mail/installer/package-manifest.in b/mail/installer/package-manifest.in
---- a/mail/installer/package-manifest.in
-+++ b/mail/installer/package-manifest.in
-@@ -313,16 +313,17 @@
- @RESPATH@/components/devtools-startup.manifest
- @RESPATH@/components/devtools-startup.js
-
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Default Profile Settings
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
- ; default pref files
-+@RESPATH@/defaults/pref/all-gentoo.js
- @RESPATH@/defaults/pref/all-thunderbird.js
- @RESPATH@/defaults/pref/channel-prefs.js
- @RESPATH@/defaults/pref/composer.js
- @RESPATH@/defaults/pref/mailnews.js
- @RESPATH@/defaults/pref/mdn.js
- @RESPATH@/defaults/pref/smime.js
- @RESPATH@/defaults/pref/thunderbird-branding.js
- @RESPATH@/greprefs.js
diff --git a/mail-client/thunderbird/files/distribution.ini b/mail-client/thunderbird/files/distribution.ini
new file mode 100644
index 00000000..ab0d1491
--- /dev/null
+++ b/mail-client/thunderbird/files/distribution.ini
@@ -0,0 +1,9 @@
+[Global]
+id=gentoo
+version=1.0
+about=Mozilla Thunderbird for Gentoo
+about.de=Mozilla Thunderbird für Gentoo
+
+[Preferences]
+app.distributor="gentoo"
+app.distributor.channel="gentoo"
diff --git a/mail-client/thunderbird/files/gentoo-default-prefs.js b/mail-client/thunderbird/files/gentoo-default-prefs.js
new file mode 100644
index 00000000..4b5121a8
--- /dev/null
+++ b/mail-client/thunderbird/files/gentoo-default-prefs.js
@@ -0,0 +1,7 @@
+pref("general.smoothScroll", true);
+pref("general.autoScroll", false);
+pref("general.useragent.locale", "chrome://global/locale/intl.properties");
+pref("mail.shell.checkDefaultClient", false);
+pref("intl.locale.requested", "");
+/* Disable DoH by default */
+pref("network.trr.mode", 5);
diff --git a/mail-client/thunderbird/files/gentoo-hwaccel-prefs.js b/mail-client/thunderbird/files/gentoo-hwaccel-prefs.js
new file mode 100644
index 00000000..a00144a7
--- /dev/null
+++ b/mail-client/thunderbird/files/gentoo-hwaccel-prefs.js
@@ -0,0 +1,3 @@
+/* Force hardware accelerated rendering due to USE=hwaccel */
+pref("layers.acceleration.force-enabled", true);
+pref("webgl.force-enabled", true);
diff --git a/mail-client/thunderbird/files/icon/thunderbird-r2.desktop b/mail-client/thunderbird/files/icon/thunderbird-r2.desktop
new file mode 100644
index 00000000..9bcd414e
--- /dev/null
+++ b/mail-client/thunderbird/files/icon/thunderbird-r2.desktop
@@ -0,0 +1,30 @@
+[Desktop Entry]
+Version=1.0
+Name=@NAME@
+GenericName=Email
+Comment=Send and Receive Email
+Comment[ca]=Llegiu i escriviu correu
+Comment[cs]=Čtení a psaní pošty
+Comment[de]=Emails lesen und verfassen
+Comment[fi]=Lue ja kirjoita sähköposteja
+Comment[fr]=Lire et écrire des courriels
+Comment[it]=Leggere e scrivere email
+Comment[ja]=メールの読み書き
+Comment[pl]=Czytanie i wysyłanie e-maili
+Comment[pt_BR]=Ler e escrever suas mensagens
+Comment[sv]=Läs och skriv e-post
+Exec=@EXEC@ %u
+Icon=@ICON@
+Terminal=false
+Type=Application
+MimeType=message/rfc822;text/calendar;x-scheme-handler/mailto;
+StartupNotify=true
+Categories=Network;Email;Calendar;
+Keywords=email;messages;calendar
+Actions=profile-manager-window;
+
+[Desktop Action profile-manager-window]
+Name=Open the Profile Manager
+Name[de]=Profilverwaltung öffnen
+Name[cs]=Správa profilů
+Exec=@EXEC@ --ProfileManager
diff --git a/mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop b/mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop
deleted file mode 100644
index 055bca45..00000000
--- a/mail-client/thunderbird/files/icon/thunderbird-unbranded.desktop
+++ /dev/null
@@ -1,10 +0,0 @@
-[Desktop Entry]
-Name=Mozilla Thunderbird
-Comment=Mail & News Reader
-Exec=/usr/bin/thunderbird %u
-Icon=thunderbird-icon-unbranded
-Terminal=false
-Type=Application
-Categories=Office;Email;
-MimeType=text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;
-
diff --git a/mail-client/thunderbird/files/icon/thunderbird.desktop b/mail-client/thunderbird/files/icon/thunderbird.desktop
deleted file mode 100644
index 3ab5826d..00000000
--- a/mail-client/thunderbird/files/icon/thunderbird.desktop
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-Name=Mozilla Thunderbird
-Comment=Mail & News Reader
-Exec=/usr/bin/thunderbird %u
-Icon=thunderbird-icon
-Terminal=false
-Type=Application
-Categories=Office;Email;
-MimeType=text/x-vcard;text/directory;application/mbox;message/rfc822;x-scheme-handler/mailto;
diff --git a/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js-2 b/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js-2
deleted file mode 100644
index 9770a1ac..00000000
--- a/mail-client/thunderbird/files/thunderbird-gentoo-default-prefs.js-2
+++ /dev/null
@@ -1,10 +0,0 @@
-pref("app.update.enabled", false);
-pref("app.update.autoInstallEnabled", false);
-pref("browser.display.use_system_colors", true);
-pref("intl.locale.matchOS", true);
-pref("intl.locale.requested", "");
-pref("general.useragent.locale", "chrome://global/locale/intl.properties");
-pref("mail.shell.checkDefaultClient", false);
-# Do not switch to Smart Folders after upgrade to 3.0b4
-pref("mail.folder.views.version", "1");
-pref("extensions.autoDisableScopes", 0);
diff --git a/mail-client/thunderbird/files/thunderbird-r1.sh b/mail-client/thunderbird/files/thunderbird-r1.sh
new file mode 100644
index 00000000..a433ee33
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-r1.sh
@@ -0,0 +1,116 @@
+#!/bin/bash
+
+##
+## Usage:
+##
+## $ thunderbird
+##
+## This script is meant to run Mozilla Thunderbird in Gentoo.
+
+cmdname=$(basename "$0")
+
+##
+## Variables
+##
+MOZ_ARCH=$(uname -m)
+case ${MOZ_ARCH} in
+ x86_64|s390x|sparc64)
+ MOZ_LIB_DIR="@PREFIX@/lib64"
+ SECONDARY_LIB_DIR="@PREFIX@/lib"
+ ;;
+ *)
+ MOZ_LIB_DIR="@PREFIX@/lib"
+ SECONDARY_LIB_DIR="@PREFIX@/lib64"
+ ;;
+esac
+
+MOZ_THUNDERBIRD_FILE="thunderbird"
+
+if [[ ! -r ${MOZ_LIB_DIR}/thunderbird/${MOZ_THUNDERBIRD_FILE} ]]; then
+ if [[ ! -r ${SECONDARY_LIB_DIR}/thunderbird/${MOZ_THUNDERBIRD_FILE} ]]; then
+ echo "Error: ${MOZ_LIB_DIR}/thunderbird/${MOZ_THUNDERBIRD_FILE} not found" >&2
+ if [[ -d ${SECONDARY_LIB_DIR} ]]; then
+ echo " ${SECONDARY_LIB_DIR}/thunderbird/${MOZ_THUNDERBIRD_FILE} not found" >&2
+ fi
+ exit 1
+ fi
+ MOZ_LIB_DIR="${SECONDARY_LIB_DIR}"
+fi
+MOZILLA_FIVE_HOME="${MOZ_LIB_DIR}/thunderbird"
+MOZ_EXTENSIONS_PROFILE_DIR="${HOME}/.mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}"
+MOZ_PROGRAM="${MOZILLA_FIVE_HOME}/${MOZ_THUNDERBIRD_FILE}"
+
+##
+## Enable Wayland backend?
+##
+if @DEFAULT_WAYLAND@ && [[ -z ${MOZ_DISABLE_WAYLAND} ]]; then
+ if [[ -n "${WAYLAND_DISPLAY}" ]]; then
+ export MOZ_ENABLE_WAYLAND=1
+ fi
+fi
+
+##
+## Use D-Bus remote exclusively when there's Wayland display.
+##
+if [[ -n "${WAYLAND_DISPLAY}" ]]; then
+ export MOZ_DBUS_REMOTE=1
+fi
+
+##
+## Make sure that we set the plugin path
+##
+MOZ_PLUGIN_DIR="plugins"
+
+if [[ -n "${MOZ_PLUGIN_PATH}" ]]; then
+ MOZ_PLUGIN_PATH=${MOZ_PLUGIN_PATH}:${MOZ_LIB_DIR}/mozilla/${MOZ_PLUGIN_DIR}
+else
+ MOZ_PLUGIN_PATH=${MOZ_LIB_DIR}/mozilla/${MOZ_PLUGIN_DIR}
+fi
+
+if [[ -d "${SECONDARY_LIB_DIR}/mozilla/${MOZ_PLUGIN_DIR}" ]]; then
+ MOZ_PLUGIN_PATH=${MOZ_PLUGIN_PATH}:${SECONDARY_LIB_DIR}/mozilla/${MOZ_PLUGIN_DIR}
+fi
+
+export MOZ_PLUGIN_PATH
+
+##
+## Set MOZ_APP_LAUNCHER for gnome-session
+##
+export MOZ_APP_LAUNCHER="@PREFIX@/bin/${cmdname}"
+
+##
+## Disable the GNOME crash dialog, Mozilla has its own
+##
+if [[ "${XDG_CURRENT_DESKTOP}" == "GNOME" ]]; then
+ GNOME_DISABLE_CRASH_DIALOG=1
+ export GNOME_DISABLE_CRASH_DIALOG
+fi
+
+##
+## Enable Xinput2 (#617344)
+##
+
+# respect user settings
+MOZ_USE_XINPUT2=${MOZ_USE_XINPUT2:-auto}
+
+if [[ ${MOZ_USE_XINPUT2} == auto && -n ${WAYLAND_DISPLAY} ]]; then
+ # enabling XINPUT2 should be safe for all wayland users
+ MOZ_USE_XINPUT2=1
+elif [[ ${MOZ_USE_XINPUT2} == auto && ${XDG_CURRENT_DESKTOP^^} == KDE ]]; then
+ # XINPUT2 is known to cause problems for KWin users
+ MOZ_USE_XINPUT2=0
+elif [[ ${MOZ_USE_XINPUT2} == auto && ${XDG_CURRENT_DESKTOP^^} == LXQT ]]; then
+ # LXQt uses KWin
+ MOZ_USE_XINPUT2=0
+elif [[ ${MOZ_USE_XINPUT2} == auto ]]; then
+ # should work on Mate, Xfce, FluxBox, OpenBox and all the others ...
+ MOZ_USE_XINPUT2=1
+fi
+
+[[ ${MOZ_USE_XINPUT2} != 0 ]] && export MOZ_USE_XINPUT2=${MOZ_USE_XINPUT2}
+
+# Don't throw "old profile" dialog box.
+export MOZ_ALLOW_DOWNGRADE=1
+
+# Run the mail client
+exec ${MOZ_PROGRAM} "${@}"
diff --git a/mail-client/thunderbird/files/thunderbird-wayland.sh b/mail-client/thunderbird/files/thunderbird-wayland.sh
new file mode 100644
index 00000000..2cfdc5e1
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-wayland.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+#
+# Run Mozilla Thunderbird under Wayland
+#
+export MOZ_ENABLE_WAYLAND=1
+exec @PREFIX@/bin/thunderbird "$@"
diff --git a/mail-client/thunderbird/files/thunderbird-x11.sh b/mail-client/thunderbird/files/thunderbird-x11.sh
new file mode 100644
index 00000000..2f4e410c
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird-x11.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+#
+# Run Mozilla Thunderbird on X11
+#
+export MOZ_DISABLE_WAYLAND=1
+exec @PREFIX@/bin/thunderbird "$@"
diff --git a/mail-client/thunderbird/files/thunderbird.sh b/mail-client/thunderbird/files/thunderbird.sh
new file mode 100644
index 00000000..7345cfcd
--- /dev/null
+++ b/mail-client/thunderbird/files/thunderbird.sh
@@ -0,0 +1,128 @@
+#!/bin/bash
+
+##
+## Usage:
+##
+## $ thunderbird
+##
+## This script is meant to run Mozilla Thunderbird in Gentoo.
+
+cmdname=$(basename "$0")
+
+##
+## Variables
+##
+MOZ_ARCH=$(uname -m)
+case ${MOZ_ARCH} in
+ x86_64|s390x|sparc64)
+ MOZ_LIB_DIR="@PREFIX@/lib64"
+ SECONDARY_LIB_DIR="@PREFIX@/lib"
+ ;;
+ *)
+ MOZ_LIB_DIR="@PREFIX@/lib"
+ SECONDARY_LIB_DIR="@PREFIX@/lib64"
+ ;;
+esac
+
+MOZ_THUNDERBIRD_FILE="thunderbird"
+
+if [[ ! -r ${MOZ_LIB_DIR}/thunderbird/${MOZ_THUNDERBIRD_FILE} ]]; then
+ if [[ ! -r ${SECONDARY_LIB_DIR}/thunderbird/${MOZ_THUNDERBIRD_FILE} ]]; then
+ echo "Error: ${MOZ_LIB_DIR}/thunderbird/${MOZ_THUNDERBIRD_FILE} not found" >&2
+ if [[ -d $SECONDARY_LIB_DIR ]]; then
+ echo " ${SECONDARY_LIB_DIR}/thunderbird/${MOZ_THUNDERBIRD_FILE} not found" >&2
+ fi
+ exit 1
+ fi
+ MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
+fi
+MOZILLA_FIVE_HOME="${MOZ_LIB_DIR}/thunderbird"
+MOZ_EXTENSIONS_PROFILE_DIR="${HOME}/.mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}"
+MOZ_PROGRAM="${MOZILLA_FIVE_HOME}/${MOZ_THUNDERBIRD_FILE}"
+DESKTOP_FILE="thunderbird"
+
+##
+## Enable Wayland backend?
+##
+if @DEFAULT_WAYLAND@ && [[ -z ${MOZ_DISABLE_WAYLAND} ]]; then
+ if [[ -n "$WAYLAND_DISPLAY" ]]; then
+ DESKTOP_FILE="thunderbird-wayland"
+ export MOZ_ENABLE_WAYLAND=1
+ fi
+elif [[ -n ${MOZ_DISABLE_WAYLAND} ]]; then
+ DESKTOP_FILE="thunderbird-x11"
+fi
+
+##
+## Use D-Bus remote exclusively when there's Wayland display.
+##
+if [[ -n "${WAYLAND_DISPLAY}" ]]; then
+ export MOZ_DBUS_REMOTE=1
+fi
+
+##
+## Make sure that we set the plugin path
+##
+MOZ_PLUGIN_DIR="plugins"
+
+if [[ -n "${MOZ_PLUGIN_PATH}" ]]; then
+ MOZ_PLUGIN_PATH=${MOZ_PLUGIN_PATH}:${MOZ_LIB_DIR}/mozilla/${MOZ_PLUGIN_DIR}
+else
+ MOZ_PLUGIN_PATH=${MOZ_LIB_DIR}/mozilla/${MOZ_PLUGIN_DIR}
+fi
+
+if [[ -d "${SECONDARY_LIB_DIR}/mozilla/${MOZ_PLUGIN_DIR}" ]]; then
+ MOZ_PLUGIN_PATH=${MOZ_PLUGIN_PATH}:${SECONDARY_LIB_DIR}/mozilla/${MOZ_PLUGIN_DIR}
+fi
+
+export MOZ_PLUGIN_PATH
+
+##
+## Set MOZ_APP_LAUNCHER for gnome-session
+##
+export MOZ_APP_LAUNCHER="@PREFIX@/bin/${cmdname}"
+
+##
+## Disable the GNOME crash dialog, Mozilla has its own
+##
+if [[ "$XDG_CURRENT_DESKTOP" == "GNOME" ]]; then
+ GNOME_DISABLE_CRASH_DIALOG=1
+ export GNOME_DISABLE_CRASH_DIALOG
+fi
+
+##
+## Enable Xinput2 (#617344)
+##
+
+# respect user settings
+MOZ_USE_XINPUT2=${MOZ_USE_XINPUT2:-auto}
+
+if [[ ${MOZ_USE_XINPUT2} == auto && -n ${WAYLAND_DISPLAY} ]]; then
+ # enabling XINPUT2 should be safe for all wayland users
+ MOZ_USE_XINPUT2=1
+elif [[ ${MOZ_USE_XINPUT2} == auto && ${XDG_CURRENT_DESKTOP^^} == KDE ]]; then
+ # XINPUT2 is known to cause problems for KWin users
+ MOZ_USE_XINPUT2=0
+elif [[ ${MOZ_USE_XINPUT2} == auto && ${XDG_CURRENT_DESKTOP^^} == LXQT ]]; then
+ # LXQt uses KWin
+ MOZ_USE_XINPUT2=0
+elif [[ ${MOZ_USE_XINPUT2} == auto ]]; then
+ # should work on Mate, Xfce, FluxBox, OpenBox and all the others ...
+ MOZ_USE_XINPUT2=1
+fi
+
+[[ ${MOZ_USE_XINPUT2} != 0 ]] && export MOZ_USE_XINPUT2=${MOZ_USE_XINPUT2}
+
+# Don't throw "old profile" dialog box.
+export MOZ_ALLOW_DOWNGRADE=1
+
+##
+## Route to the correct .desktop file to get proper
+## name and actions
+##
+if [[ $@ != *"--name "* ]]; then
+ set -- --name "${DESKTOP_FILE}" "$@"
+fi
+
+# Run the mail client
+exec ${MOZ_PROGRAM} "$@"