From e6784cd612f90afc150622adbf1de9dfd59dc6e2 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Sun, 19 Jun 2022 12:44:16 -0400 Subject: www-client/firefox: import from ::gentoo, add virtualwl --- .../firefox/files/disable-auto-update.policy.json | 5 + www-client/firefox/files/distribution.ini | 42 ++++ www-client/firefox/files/firefox-r1.sh | 116 ++++++++++ www-client/firefox/files/gentoo-default-prefs.js | 12 ++ .../firefox/files/gentoo-hwaccel-prefs.js-r2 | 5 + www-client/firefox/files/icon/firefox-r3.desktop | 236 +++++++++++++++++++++ www-client/firefox/files/icon/firefox-symbolic.svg | 64 ++++++ 7 files changed, 480 insertions(+) create mode 100644 www-client/firefox/files/disable-auto-update.policy.json create mode 100644 www-client/firefox/files/distribution.ini create mode 100644 www-client/firefox/files/firefox-r1.sh create mode 100644 www-client/firefox/files/gentoo-default-prefs.js create mode 100644 www-client/firefox/files/gentoo-hwaccel-prefs.js-r2 create mode 100644 www-client/firefox/files/icon/firefox-r3.desktop create mode 100644 www-client/firefox/files/icon/firefox-symbolic.svg (limited to 'www-client/firefox/files') diff --git a/www-client/firefox/files/disable-auto-update.policy.json b/www-client/firefox/files/disable-auto-update.policy.json new file mode 100644 index 0000000..f366220 --- /dev/null +++ b/www-client/firefox/files/disable-auto-update.policy.json @@ -0,0 +1,5 @@ +{ + "policies": { + "DisableAppUpdate": true + } +} diff --git a/www-client/firefox/files/distribution.ini b/www-client/firefox/files/distribution.ini new file mode 100644 index 0000000..680512e --- /dev/null +++ b/www-client/firefox/files/distribution.ini @@ -0,0 +1,42 @@ +[Global] +id=gentoo +version=1.0 +about=Mozilla Firefox for Gentoo +about.de=Mozilla Firefox für Gentoo + +[Preferences] +app.distributor="gentoo" +app.distributor.channel="gentoo" +startup.homepage_welcome_url="https://www.gentoo.org/" + +[BookmarksToolbar] +item.1.type=default +item.2.title=Gentoo's Bugzilla +item.2.link=https://bugs.gentoo.org/ +item.3.title=Gentoo Forums +item.3.link=https://forums.gentoo.org/ +item.4.title=Gentoo Packages +item.4.link=https://packages.gentoo.org/ +item.5.title=Planet Gentoo +item.5.link=https://planet.gentoo.org/ +item.6.title=Gentoo Wiki +item.6.link=https://wiki.gentoo.org/ + +[BookmarksMenu] +item.1.title=Gentoo +item.1.type=folder +item.1.folderId=1 + +[BookmarksFolder-1] +item.1.title=Gentoo Linux +item.1.link=https://www.gentoo.org/ +item.2.title=Gentoo's Bugzilla +item.2.link=https://bugs.gentoo.org/ +item.3.title=Gentoo Forums +item.3.link=https://forums.gentoo.org/ +item.4.title=Gentoo Packages +item.4.link=https://packages.gentoo.org/ +item.5.title=Planet Gentoo +item.5.link=https://planet.gentoo.org/ +item.6.title=Gentoo Wiki +item.6.link=https://wiki.gentoo.org/ diff --git a/www-client/firefox/files/firefox-r1.sh b/www-client/firefox/files/firefox-r1.sh new file mode 100644 index 0000000..853a4ef --- /dev/null +++ b/www-client/firefox/files/firefox-r1.sh @@ -0,0 +1,116 @@ +#!/bin/bash + +## +## Usage: +## +## $ firefox +## +## This script is meant to run Mozilla Firefox 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_FIREFOX_FILE="firefox" + +if [[ ! -r ${MOZ_LIB_DIR}/firefox/${MOZ_FIREFOX_FILE} ]]; then + if [[ ! -r ${SECONDARY_LIB_DIR}/firefox/${MOZ_FIREFOX_FILE} ]]; then + echo "Error: ${MOZ_LIB_DIR}/firefox/${MOZ_FIREFOX_FILE} not found" >&2 + if [[ -d ${SECONDARY_LIB_DIR} ]]; then + echo " ${SECONDARY_LIB_DIR}/firefox/${MOZ_FIREFOX_FILE} not found" >&2 + fi + exit 1 + fi + MOZ_LIB_DIR="${SECONDARY_LIB_DIR}" +fi +MOZILLA_FIVE_HOME="${MOZ_LIB_DIR}/firefox" +MOZ_EXTENSIONS_PROFILE_DIR="${HOME}/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" +MOZ_PROGRAM="${MOZILLA_FIVE_HOME}/${MOZ_FIREFOX_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 browser +exec ${MOZ_PROGRAM} "${@}" diff --git a/www-client/firefox/files/gentoo-default-prefs.js b/www-client/firefox/files/gentoo-default-prefs.js new file mode 100644 index 0000000..0407f5d --- /dev/null +++ b/www-client/firefox/files/gentoo-default-prefs.js @@ -0,0 +1,12 @@ +pref("general.smoothScroll", true); +pref("general.autoScroll", false); +pref("browser.urlbar.hideGoButton", true); +pref("accessibility.typeaheadfind", true); +pref("browser.shell.checkDefaultBrowser", false); +pref("browser.EULA.override", true); +pref("general.useragent.locale", "chrome://global/locale/intl.properties"); +pref("intl.locale.requested", ""); +/* Disable DoH by default */ +pref("network.trr.mode", 5); +/* Disable use of Mozilla Normandy service by default */ +pref("app.normandy.enabled", false); diff --git a/www-client/firefox/files/gentoo-hwaccel-prefs.js-r2 b/www-client/firefox/files/gentoo-hwaccel-prefs.js-r2 new file mode 100644 index 0000000..48025ca --- /dev/null +++ b/www-client/firefox/files/gentoo-hwaccel-prefs.js-r2 @@ -0,0 +1,5 @@ +/* Force hardware accelerated rendering due to USE=hwaccel */ +pref("gfx.webrender.all", true); +pref("layers.acceleration.force-enabled", true); +pref("media.hardware-video-decoding.enabled", true); +pref("webgl.force-enabled", true); diff --git a/www-client/firefox/files/icon/firefox-r3.desktop b/www-client/firefox/files/icon/firefox-r3.desktop new file mode 100644 index 0000000..8219e93 --- /dev/null +++ b/www-client/firefox/files/icon/firefox-r3.desktop @@ -0,0 +1,236 @@ +[Desktop Entry] +Version=1.0 +Name=@NAME@ +GenericName=Web Browser +Comment=Browse the Web +Exec=@EXEC@ %u +Icon=@ICON@ +Terminal=false +Type=Application +MimeType=application/pdf;application/vnd.mozilla.xul+xml;application/xhtml+xml;text/html;text/mml;text/xml;x-scheme-handler/http;x-scheme-handler/https; +StartupNotify=true +Categories=Network;WebBrowser; +Keywords=web;browser;internet; +Actions=new-window;new-private-window;profile-manager-window; + +[Desktop Action new-window] +Name=Open a New Window +Name[ach]=Dirica manyen +Name[af]=Nuwe venster +Name[an]=Nueva finestra +Name[ar]=نافذة جديدة +Name[as]=নতুন উইন্ডো +Name[ast]=Ventana nueva +Name[az]=Yeni Pəncərə +Name[be]=Новае акно +Name[bg]=Нов прозорец +Name[bn_BD]=নতুন উইন্ডো (N) +Name[bn_IN]=নতুন উইন্ডো +Name[br]=Prenestr nevez +Name[brx]=गोदान उइन्ड'(N) +Name[bs]=Novi prozor +Name[ca]=Finestra nova +Name[cak]=K'ak'a' tzuwäch +Name[cs]=Nové okno +Name[cy]=Ffenestr Newydd +Name[da]=Nyt vindue +Name[de]=Neues Fenster +Name[dsb]=Nowe wokno +Name[el]=Νέο παράθυρο +Name[en_GB]=New Window +Name[en_US]=New Window +Name[en_ZA]=New Window +Name[eo]=Nova fenestro +Name[es_AR]=Nueva ventana +Name[es_CL]=Nueva ventana +Name[es_ES]=Nueva ventana +Name[es_MX]=Nueva ventana +Name[et]=Uus aken +Name[eu]=Leiho berria +Name[fa]=پنجره جدید‌ +Name[ff]=Henorde Hesere +Name[fi]=Uusi ikkuna +Name[fr]=Nouvelle fenêtre +Name[fy_NL]=Nij finster +Name[ga_IE]=Fuinneog Nua +Name[gd]=Uinneag ùr +Name[gl]=Nova xanela +Name[gn]=Ovetã pyahu +Name[gu_IN]=નવી વિન્ડો +Name[he]=חלון חדש +Name[hi_IN]=नया विंडो +Name[hr]=Novi prozor +Name[hsb]=Nowe wokno +Name[hu]=Új ablak +Name[hy_AM]=Նոր Պատուհան +Name[id]=Jendela Baru +Name[is]=Nýr gluggi +Name[it]=Nuova finestra +Name[ja]=新しいウィンドウ +Name[ja_JP-mac]=新規ウインドウ +Name[ka]=ახალი ფანჯარა +Name[kk]=Жаңа терезе +Name[km]=បង្អួច​​​ថ្មី +Name[kn]=ಹೊಸ ಕಿಟಕಿ +Name[ko]=새 창 +Name[kok]=नवें जनेल +Name[ks]=نئئ وِنڈو +Name[lij]=Neuvo barcon +Name[lo]=ຫນ້າຕ່າງໃຫມ່ +Name[lt]=Naujas langas +Name[ltg]=Jauns lūgs +Name[lv]=Jauns logs +Name[mai]=नव विंडो +Name[mk]=Нов прозорец +Name[ml]=പുതിയ ജാലകം +Name[mr]=नवीन पटल +Name[ms]=Tetingkap Baru +Name[my]=ဝင်းဒိုးအသစ် +Name[nb_NO]=Nytt vindu +Name[ne_NP]=नयाँ सञ्झ्याल +Name[nl]=Nieuw venster +Name[nn_NO]=Nytt vindauge +Name[or]=ନୂତନ ୱିଣ୍ଡୋ +Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pl]=Nowe okno +Name[pt_BR]=Nova janela +Name[pt_PT]=Nova janela +Name[rm]=Nova fanestra +Name[ro]=Fereastră nouă +Name[ru]=Новое окно +Name[sat]=नावा विंडो (N) +Name[si]=නව කවුළුවක් +Name[sk]=Nové okno +Name[sl]=Novo okno +Name[son]=Zanfun taaga +Name[sq]=Dritare e Re +Name[sr]=Нови прозор +Name[sv_SE]=Nytt fönster +Name[ta]=புதிய சாளரம் +Name[te]=కొత్త విండో +Name[th]=หน้าต่างใหม่ +Name[tr]=Yeni pencere +Name[tsz]=Eraatarakua jimpani +Name[uk]=Нове вікно +Name[ur]=نیا دریچہ +Name[uz]=Yangi oyna +Name[vi]=Cửa sổ mới +Name[wo]=Palanteer bu bees +Name[xh]=Ifestile entsha +Name[zh_CN]=新建窗口 +Name[zh_TW]=開新視窗 +Exec=@EXEC@ --new-window %u + +[Desktop Action new-private-window] +Name=Open a New Private Window +Name[ach]=Dirica manyen me mung +Name[af]=Nuwe privaatvenster +Name[an]=Nueva finestra privada +Name[ar]=نافذة خاصة جديدة +Name[as]=নতুন ব্যক্তিগত উইন্ডো +Name[ast]=Ventana privada nueva +Name[az]=Yeni Məxfi Pəncərə +Name[be]=Новае акно адасаблення +Name[bg]=Нов прозорец за поверително сърфиране +Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো +Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো +Name[br]=Prenestr merdeiñ prevez nevez +Name[brx]=गोदान प्राइभेट उइन्ड' +Name[bs]=Novi privatni prozor +Name[ca]=Finestra privada nova +Name[cak]=K'ak'a' ichinan tzuwäch +Name[cs]=Nové anonymní okno +Name[cy]=Ffenestr Breifat Newydd +Name[da]=Nyt privat vindue +Name[de]=Neues privates Fenster +Name[dsb]=Nowe priwatne wokno +Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης +Name[en_GB]=New Private Window +Name[en_US]=New Private Window +Name[en_ZA]=New Private Window +Name[eo]=Nova privata fenestro +Name[es_AR]=Nueva ventana privada +Name[es_CL]=Nueva ventana privada +Name[es_ES]=Nueva ventana privada +Name[es_MX]=Nueva ventana privada +Name[et]=Uus privaatne aken +Name[eu]=Leiho pribatu berria +Name[fa]=پنجره ناشناس جدید +Name[ff]=Henorde Suturo Hesere +Name[fi]=Uusi yksityinen ikkuna +Name[fr]=Nouvelle fenêtre de navigation privée +Name[fy_NL]=Nij priveefinster +Name[ga_IE]=Fuinneog Nua Phríobháideach +Name[gd]=Uinneag phrìobhaideach ùr +Name[gl]=Nova xanela privada +Name[gn]=Ovetã ñemi pyahu +Name[gu_IN]=નવી ખાનગી વિન્ડો +Name[he]=חלון פרטי חדש +Name[hi_IN]=नयी निजी विंडो +Name[hr]=Novi privatni prozor +Name[hsb]=Nowe priwatne wokno +Name[hu]=Új privát ablak +Name[hy_AM]=Սկսել Գաղտնի դիտարկում +Name[id]=Jendela Mode Pribadi Baru +Name[is]=Nýr huliðsgluggi +Name[it]=Nuova finestra anonima +Name[ja]=新しいプライベートウィンドウ +Name[ja_JP-mac]=新規プライベートウインドウ +Name[ka]=ახალი პირადი ფანჯარა +Name[kk]=Жаңа жекелік терезе +Name[km]=បង្អួច​ឯកជន​ថ្មី +Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ +Name[ko]=새 사생활 보호 모드 +Name[kok]=नवो खाजगी विंडो +Name[ks]=نْو پرایوٹ وینڈو& +Name[lij]=Neuvo barcon privou +Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ +Name[lt]=Naujas privataus naršymo langas +Name[ltg]=Jauns privatais lūgs +Name[lv]=Jauns privātais logs +Name[mai]=नया निज विंडो (W) +Name[mk]=Нов приватен прозорец +Name[ml]=പുതിയ സ്വകാര്യ ജാലകം +Name[mr]=नवीन वैयक्तिक पटल +Name[ms]=Tetingkap Persendirian Baharu +Name[my]=New Private Window +Name[nb_NO]=Nytt privat vindu +Name[ne_NP]=नयाँ निजी सञ्झ्याल +Name[nl]=Nieuw privévenster +Name[nn_NO]=Nytt privat vindauge +Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ +Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ +Name[pl]=Nowe okno prywatne +Name[pt_BR]=Nova janela privativa +Name[pt_PT]=Nova janela privada +Name[rm]=Nova fanestra privata +Name[ro]=Fereastră privată nouă +Name[ru]=Новое приватное окно +Name[sat]=नावा निजेराक् विंडो (W ) +Name[si]=නව පුද්ගලික කවුළුව (W) +Name[sk]=Nové okno v režime Súkromné prehliadanie +Name[sl]=Novo zasebno okno +Name[son]=Sutura zanfun taaga +Name[sq]=Dritare e Re Private +Name[sr]=Нови приватан прозор +Name[sv_SE]=Nytt privat fönster +Name[ta]=புதிய தனிப்பட்ட சாளரம் +Name[te]=కొత్త ఆంతరంగిక విండో +Name[th]=หน้าต่างส่วนตัวใหม่ +Name[tr]=Yeni gizli pencere +Name[tsz]=Juchiiti eraatarakua jimpani +Name[uk]=Приватне вікно +Name[ur]=نیا نجی دریچہ +Name[uz]=Yangi maxfiy oyna +Name[vi]=Cửa sổ riêng tư mới +Name[wo]=Panlanteeru biir bu bees +Name[xh]=Ifestile yangasese entsha +Name[zh_CN]=新建隐私浏览窗口 +Name[zh_TW]=新增隱私視窗 +Exec=@EXEC@ --private-window %u + +[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/www-client/firefox/files/icon/firefox-symbolic.svg b/www-client/firefox/files/icon/firefox-symbolic.svg new file mode 100644 index 0000000..2078eea --- /dev/null +++ b/www-client/firefox/files/icon/firefox-symbolic.svg @@ -0,0 +1,64 @@ + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + + Gnome Symbolic Icon Theme + + -- cgit v1.2.3-70-g09d2