From d934827bf44b7cfcf6711964418148fa60877668 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 25 Nov 2020 22:39:15 +0000 Subject: gentoo resync : 25.11.2020 --- .../thunderbird-bin/files/10thunderbird-bin | 1 - .../thunderbird-bin/files/gentoo-default-prefs.js | 7 ++ .../files/icon/thunderbird-bin-r2.desktop | 30 +++++ .../files/icon/thunderbird-bin.desktop | 10 -- .../files/thunderbird-bin-wayland.sh | 7 ++ .../thunderbird-bin/files/thunderbird-bin-x11.sh | 7 ++ .../thunderbird-bin/files/thunderbird-bin.sh | 123 +++++++++++++++++++++ .../files/thunderbird-gentoo-default-prefs-r1.js | 12 -- 8 files changed, 174 insertions(+), 23 deletions(-) delete mode 100644 mail-client/thunderbird-bin/files/10thunderbird-bin create mode 100644 mail-client/thunderbird-bin/files/gentoo-default-prefs.js create mode 100644 mail-client/thunderbird-bin/files/icon/thunderbird-bin-r2.desktop delete mode 100644 mail-client/thunderbird-bin/files/icon/thunderbird-bin.desktop create mode 100644 mail-client/thunderbird-bin/files/thunderbird-bin-wayland.sh create mode 100644 mail-client/thunderbird-bin/files/thunderbird-bin-x11.sh create mode 100644 mail-client/thunderbird-bin/files/thunderbird-bin.sh delete mode 100644 mail-client/thunderbird-bin/files/thunderbird-gentoo-default-prefs-r1.js (limited to 'mail-client/thunderbird-bin/files') diff --git a/mail-client/thunderbird-bin/files/10thunderbird-bin b/mail-client/thunderbird-bin/files/10thunderbird-bin deleted file mode 100644 index f1338b82757c..000000000000 --- a/mail-client/thunderbird-bin/files/10thunderbird-bin +++ /dev/null @@ -1 +0,0 @@ -SEARCH_DIRS_MASK="/opt/thunderbird" diff --git a/mail-client/thunderbird-bin/files/gentoo-default-prefs.js b/mail-client/thunderbird-bin/files/gentoo-default-prefs.js new file mode 100644 index 000000000000..4b5121a8d272 --- /dev/null +++ b/mail-client/thunderbird-bin/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-bin/files/icon/thunderbird-bin-r2.desktop b/mail-client/thunderbird-bin/files/icon/thunderbird-bin-r2.desktop new file mode 100644 index 000000000000..f5760f39c285 --- /dev/null +++ b/mail-client/thunderbird-bin/files/icon/thunderbird-bin-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;x-scheme-handler/mailto; +StartupNotify=true +Categories=Network;Email; +Keywords=email;messages; +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-bin/files/icon/thunderbird-bin.desktop b/mail-client/thunderbird-bin/files/icon/thunderbird-bin.desktop deleted file mode 100644 index 239a86f295bb..000000000000 --- a/mail-client/thunderbird-bin/files/icon/thunderbird-bin.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Mozilla Thunderbird (bin) -Comment=Mail & News Reader -Exec=/usr/bin/thunderbird-bin -Icon=thunderbird-bin-icon -Terminal=false -Type=Application -Categories=Office;Network;Email; -MimeType=x-scheme-handler/mailto; -StartupNotify=true diff --git a/mail-client/thunderbird-bin/files/thunderbird-bin-wayland.sh b/mail-client/thunderbird-bin/files/thunderbird-bin-wayland.sh new file mode 100644 index 000000000000..c5d58ba1fb70 --- /dev/null +++ b/mail-client/thunderbird-bin/files/thunderbird-bin-wayland.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# +# Run Mozilla Thunderbird (bin) under Wayland +# +export MOZ_ENABLE_WAYLAND=1 +exec @PREFIX@/bin/thunderbird-bin "$@" diff --git a/mail-client/thunderbird-bin/files/thunderbird-bin-x11.sh b/mail-client/thunderbird-bin/files/thunderbird-bin-x11.sh new file mode 100644 index 000000000000..17e29fa05e73 --- /dev/null +++ b/mail-client/thunderbird-bin/files/thunderbird-bin-x11.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# +# Run Mozilla Thunderbird (bin) on X11 +# +export MOZ_DISABLE_WAYLAND=1 +exec @PREFIX@/bin/thunderbird-bin "$@" diff --git a/mail-client/thunderbird-bin/files/thunderbird-bin.sh b/mail-client/thunderbird-bin/files/thunderbird-bin.sh new file mode 100644 index 000000000000..1f94e58f0c23 --- /dev/null +++ b/mail-client/thunderbird-bin/files/thunderbird-bin.sh @@ -0,0 +1,123 @@ +#!/bin/bash + +## +## Usage: +## +## $ thunderbird-bin +## +## This script is meant to run Mozilla Thunderbird (bin) 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-bin" +MOZILLA_FIVE_HOME="@MOZ_FIVE_HOME@" +MOZ_EXTENSIONS_PROFILE_DIR="${HOME}/.mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}" +MOZ_PROGRAM="${MOZILLA_FIVE_HOME}/${MOZ_THUNDERBIRD_FILE}" +APULSELIB_DIR="@APULSELIB_DIR@" +DESKTOP_FILE="thunderbird-bin" + +## +## Enable Wayland backend? +## +if @DEFAULT_WAYLAND@ && [[ -z ${MOZ_DISABLE_WAYLAND} ]]; then + if [[ -n "$WAYLAND_DISPLAY" ]]; then + DESKTOP_FILE="thunderbird-bin-wayland" + export MOZ_ENABLE_WAYLAND=1 + fi +elif [[ -n ${MOZ_DISABLE_WAYLAND} ]]; then + DESKTOP_FILE="thunderbird-bin-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 + +## +## Set special variables for -bin +export LD_LIBRARY_PATH="${APULSELIB_DIR:+${APULSELIB_DIR}:}${MOZILLA_FIVE_HOME}" +export GTK_PATH="${MOZ_LIB_DIR}/gtk-3.0" + +## +## 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} "$@" diff --git a/mail-client/thunderbird-bin/files/thunderbird-gentoo-default-prefs-r1.js b/mail-client/thunderbird-bin/files/thunderbird-gentoo-default-prefs-r1.js deleted file mode 100644 index 6c5a4dc6b6e9..000000000000 --- a/mail-client/thunderbird-bin/files/thunderbird-gentoo-default-prefs-r1.js +++ /dev/null @@ -1,12 +0,0 @@ -// disable auto-update -pref("app.update.enabled", false); -pref("app.update.autoInstallEnabled", false); - -// localization -// "intl.locale.matchOS" doesn't exist anymore, see https://mail.mozilla.org/pipermail/firefox-dev/2017-December/005991.html -pref("intl.locale.requested", ""); - -// misc -pref("browser.display.use_system_colors", true); -pref("mail.folder.views.version", "1"); -pref("mail.shell.checkDefaultClient", false); -- cgit v1.2.3