From 086b8c859b51192fdc9b38f157f29dd259679cc0 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Wed, 8 Sep 2021 16:15:19 +0200 Subject: www-client/firefox-bin: drop x-scheme-handler/ftp support >=firefox-90 no longer provides FTP support. Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Thomas Deutschmann --- .../firefox-bin/files/firefox-bin-r3.desktop | 230 +++++++++++++ www-client/firefox-bin/firefox-bin-92.0-r1.ebuild | 383 +++++++++++++++++++++ www-client/firefox-bin/firefox-bin-92.0.ebuild | 383 --------------------- 3 files changed, 613 insertions(+), 383 deletions(-) create mode 100644 www-client/firefox-bin/files/firefox-bin-r3.desktop create mode 100644 www-client/firefox-bin/firefox-bin-92.0-r1.ebuild delete mode 100644 www-client/firefox-bin/firefox-bin-92.0.ebuild diff --git a/www-client/firefox-bin/files/firefox-bin-r3.desktop b/www-client/firefox-bin/files/firefox-bin-r3.desktop new file mode 100644 index 000000000000..0e768c5556c0 --- /dev/null +++ b/www-client/firefox-bin/files/firefox-bin-r3.desktop @@ -0,0 +1,230 @@ +[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; + +[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 diff --git a/www-client/firefox-bin/firefox-bin-92.0-r1.ebuild b/www-client/firefox-bin/firefox-bin-92.0-r1.ebuild new file mode 100644 index 000000000000..ccc2f8c0071d --- /dev/null +++ b/www-client/firefox-bin/firefox-bin-92.0-r1.ebuild @@ -0,0 +1,383 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +MOZ_ESR= + +MOZ_PV=${PV} +MOZ_PV_SUFFIX= +if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then + MOZ_PV_SUFFIX=${BASH_REMATCH[1]} + + # Convert the ebuild version to the upstream Mozilla version + MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI + MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI + MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI +fi + +if [[ -n ${MOZ_ESR} ]] ; then + # ESR releases have slightly different version numbers + MOZ_PV="${MOZ_PV}esr" +fi + +MOZ_PN="${PN%-bin}" +MOZ_P="${MOZ_PN}-${MOZ_PV}" +MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" +MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" + +inherit desktop linux-info pax-utils xdg + +MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" + +SRC_URI="amd64? ( ${MOZ_SRC_BASE_URI}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 ) + x86? ( ${MOZ_SRC_BASE_URI}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )" + +DESCRIPTION="Firefox Web Browser" +HOMEPAGE="https://www.mozilla.com/firefox" + +KEYWORDS="-* amd64 x86" +SLOT="0/$(ver_cut 1)" +LICENSE="MPL-2.0 GPL-2 LGPL-2.1" +IUSE="+alsa +ffmpeg +gmp-autoupdate +pulseaudio selinux wayland" + +RESTRICT="strip" + +BDEPEND="app-arch/unzip + alsa? ( + !pulseaudio? ( + dev-util/patchelf + ) + )" + +CDEPEND="alsa? ( + !pulseaudio? ( + media-sound/apulse + ) + )" + +DEPEND="${CDEPEND}" + +RDEPEND="${CDEPEND} + dev-libs/atk + dev-libs/dbus-glib + >=dev-libs/glib-2.26:2 + media-libs/fontconfig + >=media-libs/freetype-2.4.10 + sys-apps/dbus + virtual/freedesktop-icon-theme + >=x11-libs/cairo-1.10[X] + x11-libs/gdk-pixbuf + >=x11-libs/gtk+-3.11:3[wayland?] + x11-libs/libX11 + x11-libs/libXcomposite + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXrender + >=x11-libs/pango-1.22.0 + ffmpeg? ( media-video/ffmpeg ) + pulseaudio? ( media-sound/pulseaudio ) + selinux? ( sec-policy/selinux-mozilla ) +" + +QA_PREBUILT="opt/${MOZ_PN}/*" + +# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or +# overridden in the enviromnent (advanced hackers only) +if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then + MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) +fi + +MOZ_LANGS=( + ach af an ar ast az be bg bn br bs ca-valencia ca cak cs cy + da de dsb el en-CA en-GB en-US eo es-AR es-CL es-ES es-MX et eu + fa ff fi fr fy-NL ga-IE gd gl gn gu-IN he hi-IN hr hsb hu hy-AM + ia id is it ja ka kab kk km kn ko lij lt lv mk mr ms my + nb-NO ne-NP nl nn-NO oc pa-IN pl pt-BR pt-PT rm ro ru + si sk sl son sq sr sv-SE ta te th tl tr trs uk ur uz vi + xh zh-CN zh-TW +) + +mozilla_set_globals() { + # https://bugs.gentoo.org/587334 + local MOZ_TOO_REGIONALIZED_FOR_L10N=( + fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE + ) + + local lang xflag + for lang in "${MOZ_LANGS[@]}" ; do + # en and en_US are handled internally + if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then + continue + fi + + # strip region subtag if $lang is in the list + if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then + xflag=${lang%%-*} + else + xflag=${lang} + fi + + SRC_URI+=" l10n_${xflag/[_@]/-}? (" + SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> ${MOZ_P_DISTFILES}-${lang}.xpi" + SRC_URI+=" )" + IUSE+=" l10n_${xflag/[_@]/-}" + done +} +mozilla_set_globals + +moz_install_xpi() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${#} -lt 2 ]] ; then + die "${FUNCNAME} requires at least two arguments" + fi + + local DESTDIR=${1} + shift + + insinto "${DESTDIR}" + + local emid xpi_file xpi_tmp_dir + for xpi_file in "${@}" ; do + emid= + xpi_tmp_dir=$(mktemp -d --tmpdir="${T}") + + # Unpack XPI + unzip -qq "${xpi_file}" -d "${xpi_tmp_dir}" || die + + # Determine extension ID + if [[ -f "${xpi_tmp_dir}/install.rdf" ]] ; then + emid=$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${xpi_tmp_dir}/install.rdf") + [[ -z "${emid}" ]] && die "failed to determine extension id from install.rdf" + elif [[ -f "${xpi_tmp_dir}/manifest.json" ]] ; then + emid=$(sed -n -e 's/.*"id": "\([^"]*\)".*/\1/p' "${xpi_tmp_dir}/manifest.json") + [[ -z "${emid}" ]] && die "failed to determine extension id from manifest.json" + else + die "failed to determine extension id" + fi + + einfo "Installing ${emid}.xpi into ${ED}${DESTDIR} ..." + newins "${xpi_file}" "${emid}.xpi" + done +} + +pkg_setup() { + CONFIG_CHECK="~SECCOMP" + WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." + + linux-info_pkg_setup +} + +src_unpack() { + local _lp_dir="${WORKDIR}/language_packs" + local _src_file + + mkdir "${S}" || die + + if [[ ! -d "${_lp_dir}" ]] ; then + mkdir "${_lp_dir}" || die + fi + + for _src_file in ${A} ; do + if [[ ${_src_file} == *.xpi ]]; then + cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!" + else + MY_SRC_FILE=${_src_file} + fi + done +} + +src_install() { + # Set MOZILLA_FIVE_HOME + local MOZILLA_FIVE_HOME="/opt/${MOZ_PN}" + + dodir /opt + pushd "${ED}"/opt &>/dev/null || die + unpack "${MY_SRC_FILE}" + popd &>/dev/null || die + + pax-mark m \ + "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN} \ + "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN}-bin \ + "${ED}${MOZILLA_FIVE_HOME}"/plugin-container + + # Patch alsa support + local apulselib= + if use alsa && ! use pulseaudio ; then + apulselib="${EPREFIX}/usr/$(get_libdir)/apulse" + patchelf --set-rpath "${apulselib}" "${ED}${MOZILLA_FIVE_HOME}/libxul.so" || die + fi + + # Install policy (currently only used to disable application updates) + insinto "${MOZILLA_FIVE_HOME}/distribution" + newins "${FILESDIR}"/disable-auto-update.policy.json policies.json + + # Install system-wide preferences + local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" + insinto "${PREFS_DIR}" + newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js + + local GENTOO_PREFS="${ED}${PREFS_DIR}/all-gentoo.js" + + if ! use gmp-autoupdate ; then + local plugin + for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do + einfo "Disabling auto-update for ${plugin} plugin ..." + cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" + pref("media.${plugin}.autoupdate", false); + EOF + done + fi + + # Install language packs + local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name '*.xpi') ) + if [[ -n "${langpacks}" ]] ; then + moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}" + fi + + # Install icons + local icon_srcdir="${ED}/${MOZILLA_FIVE_HOME}/browser/chrome/icons/default" + local icon_symbolic_file="${FILESDIR}/firefox-symbolic.svg" + + insinto /usr/share/icons/hicolor/symbolic/apps + newins "${icon_symbolic_file}" ${PN}-symbolic.svg + + local icon size + for icon in "${icon_srcdir}"/default*.png ; do + size=${icon%.png} + size=${size##*/default} + + if [[ ${size} -eq 48 ]] ; then + newicon "${icon}" ${PN}.png + fi + + newicon -s ${size} "${icon}" ${PN}.png + done + + # Install menu + local app_name="Mozilla ${MOZ_PN^} (bin)" + local desktop_file="${FILESDIR}/${PN}-r3.desktop" + local desktop_filename="${PN}.desktop" + local exec_command="${PN}" + local icon="${PN}" + local use_wayland="false" + + if use wayland ; then + use_wayland="true" + fi + + cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die + + sed -i \ + -e "s:@NAME@:${app_name}:" \ + -e "s:@EXEC@:${exec_command}:" \ + -e "s:@ICON@:${icon}:" \ + "${WORKDIR}/${PN}.desktop-template" \ + || die + + newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" + + rm "${WORKDIR}/${PN}.desktop-template" || die + + # Install wrapper script + [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" + newbin "${FILESDIR}/${PN}-r1.sh" ${PN} + + # Update wrapper + sed -i \ + -e "s:@PREFIX@:${EPREFIX}/usr:" \ + -e "s:@MOZ_FIVE_HOME@:${MOZILLA_FIVE_HOME}:" \ + -e "s:@APULSELIB_DIR@:${apulselib}:" \ + -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ + "${ED}/usr/bin/${PN}" \ + || die +} + +pkg_postinst() { + xdg_pkg_postinst + + if ! use gmp-autoupdate ; then + elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" + elog "installing into new profiles:" + local plugin + for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do + elog "\t ${plugin}" + done + elog + fi + + if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \ + || ! has_version 'net-misc/curl'; then + einfo + einfo "For using the crashreporter, you need gnome-base/gconf," + einfo "gnome-base/orbit and net-misc/curl emerged." + einfo + fi + + use ffmpeg || ewarn "USE=-ffmpeg : HTML5 video will not render without media-video/ffmpeg installed" + + local HAS_AUDIO=0 + if use alsa || use pulseaudio; then + HAS_AUDIO=1 + fi + + if [[ ${HAS_AUDIO} -eq 0 ]] ; then + ewarn "USE=-pulseaudio & USE=-alsa : For audio please either set USE=pulseaudio or USE=alsa!" + fi + + local show_doh_information show_normandy_information show_shortcut_information + + if [[ -z "${REPLACING_VERSIONS}" ]] ; then + # New install; Tell user that DoH is disabled by default + show_doh_information=yes + show_normandy_information=yes + show_shortcut_information=no + else + local replacing_version + for replacing_version in ${REPLACING_VERSIONS} ; do + if ver_test "${replacing_version}" -lt 91.0 ; then + # Tell user that we no longer install a shortcut + # per supported display protocol + show_shortcut_information=yes + fi + done + fi + + if [[ -n "${show_doh_information}" ]] ; then + elog + elog "Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):" + elog "Due to privacy concerns (encrypting DNS might be a good thing, sending all" + elog "DNS traffic to Cloudflare by default is not a good idea and applications" + elog "should respect OS configured settings), \"network.trr.mode\" was set to 5" + elog "(\"Off by choice\") by default." + elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences." + fi + + # bug 713782 + if [[ -n "${show_normandy_information}" ]] ; then + elog + elog "Upstream operates a service named Normandy which allows Mozilla to" + elog "push changes for default settings or even install new add-ons remotely." + elog "While this can be useful to address problems like 'Armagadd-on 2.0' or" + elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security" + elog "concerns prevail, which is why we have switched off the use of this" + elog "service by default." + elog + elog "To re-enable this service set" + elog + elog " app.normandy.enabled=true" + elog + elog "in about:config." + fi + + if [[ -n "${show_shortcut_information}" ]] ; then + elog + elog "Since firefox-91.0 we no longer install multiple shortcuts for" + elog "each supported display protocol. Instead we will only install" + elog "one generic Mozilla Firefox shortcut." + elog "If you still want to be able to select between running Mozilla Firefox" + elog "on X11 or Wayland, you have to re-create these shortcuts on your own." + fi +} diff --git a/www-client/firefox-bin/firefox-bin-92.0.ebuild b/www-client/firefox-bin/firefox-bin-92.0.ebuild deleted file mode 100644 index bf58e64521cd..000000000000 --- a/www-client/firefox-bin/firefox-bin-92.0.ebuild +++ /dev/null @@ -1,383 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -MOZ_ESR= - -MOZ_PV=${PV} -MOZ_PV_SUFFIX= -if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then - MOZ_PV_SUFFIX=${BASH_REMATCH[1]} - - # Convert the ebuild version to the upstream Mozilla version - MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI - MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI - MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI -fi - -if [[ -n ${MOZ_ESR} ]] ; then - # ESR releases have slightly different version numbers - MOZ_PV="${MOZ_PV}esr" -fi - -MOZ_PN="${PN%-bin}" -MOZ_P="${MOZ_PN}-${MOZ_PV}" -MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}" -MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}" - -inherit desktop linux-info pax-utils xdg - -MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}" - -SRC_URI="amd64? ( ${MOZ_SRC_BASE_URI}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 ) - x86? ( ${MOZ_SRC_BASE_URI}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )" - -DESCRIPTION="Firefox Web Browser" -HOMEPAGE="https://www.mozilla.com/firefox" - -KEYWORDS="-* amd64 x86" -SLOT="0/$(ver_cut 1)" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" -IUSE="+alsa +ffmpeg +gmp-autoupdate +pulseaudio selinux wayland" - -RESTRICT="strip" - -BDEPEND="app-arch/unzip - alsa? ( - !pulseaudio? ( - dev-util/patchelf - ) - )" - -CDEPEND="alsa? ( - !pulseaudio? ( - media-sound/apulse - ) - )" - -DEPEND="${CDEPEND}" - -RDEPEND="${CDEPEND} - dev-libs/atk - dev-libs/dbus-glib - >=dev-libs/glib-2.26:2 - media-libs/fontconfig - >=media-libs/freetype-2.4.10 - sys-apps/dbus - virtual/freedesktop-icon-theme - >=x11-libs/cairo-1.10[X] - x11-libs/gdk-pixbuf - >=x11-libs/gtk+-3.11:3[wayland?] - x11-libs/libX11 - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrender - >=x11-libs/pango-1.22.0 - ffmpeg? ( media-video/ffmpeg ) - pulseaudio? ( media-sound/pulseaudio ) - selinux? ( sec-policy/selinux-mozilla ) -" - -QA_PREBUILT="opt/${MOZ_PN}/*" - -# Allow MOZ_GMP_PLUGIN_LIST to be set in an eclass or -# overridden in the enviromnent (advanced hackers only) -if [[ -z "${MOZ_GMP_PLUGIN_LIST+set}" ]] ; then - MOZ_GMP_PLUGIN_LIST=( gmp-gmpopenh264 gmp-widevinecdm ) -fi - -MOZ_LANGS=( - ach af an ar ast az be bg bn br bs ca-valencia ca cak cs cy - da de dsb el en-CA en-GB en-US eo es-AR es-CL es-ES es-MX et eu - fa ff fi fr fy-NL ga-IE gd gl gn gu-IN he hi-IN hr hsb hu hy-AM - ia id is it ja ka kab kk km kn ko lij lt lv mk mr ms my - nb-NO ne-NP nl nn-NO oc pa-IN pl pt-BR pt-PT rm ro ru - si sk sl son sq sr sv-SE ta te th tl tr trs uk ur uz vi - xh zh-CN zh-TW -) - -mozilla_set_globals() { - # https://bugs.gentoo.org/587334 - local MOZ_TOO_REGIONALIZED_FOR_L10N=( - fy-NL ga-IE gu-IN hi-IN hy-AM nb-NO ne-NP nn-NO pa-IN sv-SE - ) - - local lang xflag - for lang in "${MOZ_LANGS[@]}" ; do - # en and en_US are handled internally - if [[ ${lang} == en ]] || [[ ${lang} == en-US ]] ; then - continue - fi - - # strip region subtag if $lang is in the list - if has ${lang} "${MOZ_TOO_REGIONALIZED_FOR_L10N[@]}" ; then - xflag=${lang%%-*} - else - xflag=${lang} - fi - - SRC_URI+=" l10n_${xflag/[_@]/-}? (" - SRC_URI+=" ${MOZ_SRC_BASE_URI}/linux-x86_64/xpi/${lang}.xpi -> ${MOZ_P_DISTFILES}-${lang}.xpi" - SRC_URI+=" )" - IUSE+=" l10n_${xflag/[_@]/-}" - done -} -mozilla_set_globals - -moz_install_xpi() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local DESTDIR=${1} - shift - - insinto "${DESTDIR}" - - local emid xpi_file xpi_tmp_dir - for xpi_file in "${@}" ; do - emid= - xpi_tmp_dir=$(mktemp -d --tmpdir="${T}") - - # Unpack XPI - unzip -qq "${xpi_file}" -d "${xpi_tmp_dir}" || die - - # Determine extension ID - if [[ -f "${xpi_tmp_dir}/install.rdf" ]] ; then - emid=$(sed -n -e '/install-manifest/,$ { /em:id/!d; s/.*[\">]\([^\"<>]*\)[\"<].*/\1/; p; q }' "${xpi_tmp_dir}/install.rdf") - [[ -z "${emid}" ]] && die "failed to determine extension id from install.rdf" - elif [[ -f "${xpi_tmp_dir}/manifest.json" ]] ; then - emid=$(sed -n -e 's/.*"id": "\([^"]*\)".*/\1/p' "${xpi_tmp_dir}/manifest.json") - [[ -z "${emid}" ]] && die "failed to determine extension id from manifest.json" - else - die "failed to determine extension id" - fi - - einfo "Installing ${emid}.xpi into ${ED}${DESTDIR} ..." - newins "${xpi_file}" "${emid}.xpi" - done -} - -pkg_setup() { - CONFIG_CHECK="~SECCOMP" - WARNING_SECCOMP="CONFIG_SECCOMP not set! This system will be unable to play DRM-protected content." - - linux-info_pkg_setup -} - -src_unpack() { - local _lp_dir="${WORKDIR}/language_packs" - local _src_file - - mkdir "${S}" || die - - if [[ ! -d "${_lp_dir}" ]] ; then - mkdir "${_lp_dir}" || die - fi - - for _src_file in ${A} ; do - if [[ ${_src_file} == *.xpi ]]; then - cp "${DISTDIR}/${_src_file}" "${_lp_dir}" || die "Failed to copy '${_src_file}' to '${_lp_dir}'!" - else - MY_SRC_FILE=${_src_file} - fi - done -} - -src_install() { - # Set MOZILLA_FIVE_HOME - local MOZILLA_FIVE_HOME="/opt/${MOZ_PN}" - - dodir /opt - pushd "${ED}"/opt &>/dev/null || die - unpack "${MY_SRC_FILE}" - popd &>/dev/null || die - - pax-mark m \ - "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN} \ - "${ED}${MOZILLA_FIVE_HOME}"/${MOZ_PN}-bin \ - "${ED}${MOZILLA_FIVE_HOME}"/plugin-container - - # Patch alsa support - local apulselib= - if use alsa && ! use pulseaudio ; then - apulselib="${EPREFIX}/usr/$(get_libdir)/apulse" - patchelf --set-rpath "${apulselib}" "${ED}${MOZILLA_FIVE_HOME}/libxul.so" || die - fi - - # Install policy (currently only used to disable application updates) - insinto "${MOZILLA_FIVE_HOME}/distribution" - newins "${FILESDIR}"/disable-auto-update.policy.json policies.json - - # Install system-wide preferences - local PREFS_DIR="${MOZILLA_FIVE_HOME}/browser/defaults/preferences" - insinto "${PREFS_DIR}" - newins "${FILESDIR}"/gentoo-default-prefs.js all-gentoo.js - - local GENTOO_PREFS="${ED}${PREFS_DIR}/all-gentoo.js" - - if ! use gmp-autoupdate ; then - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - einfo "Disabling auto-update for ${plugin} plugin ..." - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable autoupdate for ${plugin} media plugin" - pref("media.${plugin}.autoupdate", false); - EOF - done - fi - - # Install language packs - local langpacks=( $(find "${WORKDIR}/language_packs" -type f -name '*.xpi') ) - if [[ -n "${langpacks}" ]] ; then - moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}" - fi - - # Install icons - local icon_srcdir="${ED}/${MOZILLA_FIVE_HOME}/browser/chrome/icons/default" - local icon_symbolic_file="${FILESDIR}/firefox-symbolic.svg" - - insinto /usr/share/icons/hicolor/symbolic/apps - newins "${icon_symbolic_file}" ${PN}-symbolic.svg - - local icon size - for icon in "${icon_srcdir}"/default*.png ; do - size=${icon%.png} - size=${size##*/default} - - if [[ ${size} -eq 48 ]] ; then - newicon "${icon}" ${PN}.png - fi - - newicon -s ${size} "${icon}" ${PN}.png - done - - # Install menu - local app_name="Mozilla ${MOZ_PN^} (bin)" - local desktop_file="${FILESDIR}/${PN}-r2.desktop" - local desktop_filename="${PN}.desktop" - local exec_command="${PN}" - local icon="${PN}" - local use_wayland="false" - - if use wayland ; then - use_wayland="true" - fi - - cp "${desktop_file}" "${WORKDIR}/${PN}.desktop-template" || die - - sed -i \ - -e "s:@NAME@:${app_name}:" \ - -e "s:@EXEC@:${exec_command}:" \ - -e "s:@ICON@:${icon}:" \ - "${WORKDIR}/${PN}.desktop-template" \ - || die - - newmenu "${WORKDIR}/${PN}.desktop-template" "${desktop_filename}" - - rm "${WORKDIR}/${PN}.desktop-template" || die - - # Install wrapper script - [[ -f "${ED}/usr/bin/${PN}" ]] && rm "${ED}/usr/bin/${PN}" - newbin "${FILESDIR}/${PN}-r1.sh" ${PN} - - # Update wrapper - sed -i \ - -e "s:@PREFIX@:${EPREFIX}/usr:" \ - -e "s:@MOZ_FIVE_HOME@:${MOZILLA_FIVE_HOME}:" \ - -e "s:@APULSELIB_DIR@:${apulselib}:" \ - -e "s:@DEFAULT_WAYLAND@:${use_wayland}:" \ - "${ED}/usr/bin/${PN}" \ - || die -} - -pkg_postinst() { - xdg_pkg_postinst - - if ! use gmp-autoupdate ; then - elog "USE='-gmp-autoupdate' has disabled the following plugins from updating or" - elog "installing into new profiles:" - local plugin - for plugin in "${MOZ_GMP_PLUGIN_LIST[@]}" ; do - elog "\t ${plugin}" - done - elog - fi - - if ! has_version 'gnome-base/gconf' || ! has_version 'gnome-base/orbit' \ - || ! has_version 'net-misc/curl'; then - einfo - einfo "For using the crashreporter, you need gnome-base/gconf," - einfo "gnome-base/orbit and net-misc/curl emerged." - einfo - fi - - use ffmpeg || ewarn "USE=-ffmpeg : HTML5 video will not render without media-video/ffmpeg installed" - - local HAS_AUDIO=0 - if use alsa || use pulseaudio; then - HAS_AUDIO=1 - fi - - if [[ ${HAS_AUDIO} -eq 0 ]] ; then - ewarn "USE=-pulseaudio & USE=-alsa : For audio please either set USE=pulseaudio or USE=alsa!" - fi - - local show_doh_information show_normandy_information show_shortcut_information - - if [[ -z "${REPLACING_VERSIONS}" ]] ; then - # New install; Tell user that DoH is disabled by default - show_doh_information=yes - show_normandy_information=yes - show_shortcut_information=no - else - local replacing_version - for replacing_version in ${REPLACING_VERSIONS} ; do - if ver_test "${replacing_version}" -lt 91.0 ; then - # Tell user that we no longer install a shortcut - # per supported display protocol - show_shortcut_information=yes - fi - done - fi - - if [[ -n "${show_doh_information}" ]] ; then - elog - elog "Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):" - elog "Due to privacy concerns (encrypting DNS might be a good thing, sending all" - elog "DNS traffic to Cloudflare by default is not a good idea and applications" - elog "should respect OS configured settings), \"network.trr.mode\" was set to 5" - elog "(\"Off by choice\") by default." - elog "You can enable DNS-over-HTTPS in ${PN^}'s preferences." - fi - - # bug 713782 - if [[ -n "${show_normandy_information}" ]] ; then - elog - elog "Upstream operates a service named Normandy which allows Mozilla to" - elog "push changes for default settings or even install new add-ons remotely." - elog "While this can be useful to address problems like 'Armagadd-on 2.0' or" - elog "revert previous decisions to disable TLS 1.0/1.1, privacy and security" - elog "concerns prevail, which is why we have switched off the use of this" - elog "service by default." - elog - elog "To re-enable this service set" - elog - elog " app.normandy.enabled=true" - elog - elog "in about:config." - fi - - if [[ -n "${show_shortcut_information}" ]] ; then - elog - elog "Since firefox-91.0 we no longer install multiple shortcuts for" - elog "each supported display protocol. Instead we will only install" - elog "one generic Mozilla Firefox shortcut." - elog "If you still want to be able to select between running Mozilla Firefox" - elog "on X11 or Wayland, you have to re-create these shortcuts on your own." - fi -} -- cgit v1.2.3-65-gdbad