From b4691c97dfe6c297f4e501fa349059588b863deb Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Mon, 3 Oct 2022 19:10:51 +0300 Subject: [PATCH] www-client/icecat: drop 91.10.0, 91.11.0 Signed-off-by: Alfred Wingate --- www-client/icecat/Manifest | 4 - .../files/fix-ftbfs-newer-cbindgen.patch | 17 - .../icecat/files/gentoo-hwaccel-prefs.js | 2 - www-client/icecat/icecat-91.10.0.ebuild | 1130 ----------------- www-client/icecat/icecat-91.11.0.ebuild | 1128 ---------------- 5 files changed, 2281 deletions(-) delete mode 100644 www-client/icecat/files/fix-ftbfs-newer-cbindgen.patch delete mode 100644 www-client/icecat/files/gentoo-hwaccel-prefs.js delete mode 100644 www-client/icecat/icecat-91.10.0.ebuild delete mode 100644 www-client/icecat/icecat-91.11.0.ebuild diff --git a/www-client/icecat/Manifest b/www-client/icecat/Manifest index ced042d..a25501a 100644 --- a/www-client/icecat/Manifest +++ b/www-client/icecat/Manifest @@ -1,8 +1,4 @@ DIST firefox-102esr-patches-02j.tar.xz 19688 BLAKE2B f26b8dd2613712ab49db34247c432769386ac066238b86c0eea367cebbd167334f822866129d0874efc35da4da686e6185881649b0b3095dede28ec8c658a3b2 SHA512 456cd2b7d9f907080afb5225d353154117624fa938f24dcfae7ada03f5b39572e5d6d6e1a4bba7825465b48f6d38b04e5c0f69556c82d4ebbe1463e11dc809d7 DIST firefox-102esr-patches-03j.tar.xz 20768 BLAKE2B 49c5be06c5df5eda693a9712a63989f71dbbfc34fb3dadd74f0c95a25b2d8123af973ce92d7c7b342de311d8e94fd652a3c126ad6b9f0eeda09e709d42959cf4 SHA512 8d1e9e37095fc2d1a24064b6b6b16e5535dd387d7a566c52b8add7e060e9e7d0f0c14ff46efe370dc7b8bf7469fe9cb0ba4c2014829195f922bdbb0a2f41bc31 -DIST firefox-91esr-patches-07j.tar.xz 18900 BLAKE2B ace76bc00c3053e60c39186e460b0b422a24bb3393091324470045707dc18c631c41d5d4e61b67dca6dc2e881b7dcffce256f5b897766f994ad46b23df96b77a SHA512 2fca4a5fec8fb79541b9dddec5a632a9a88fca845cac15aa963ab686eb80e8e5ad23186166f97ed88327e6c5bd7bae6178b32760f26d560c0b685ef3b3f638f4 -DIST firefox-91esr-patches-10j.tar.xz 18320 BLAKE2B ec882411eed19bafab8676e3d79f4ae43947bb97c44571c1497bb93a44fcfec99de06ebacbdf8c4944dcecdf949e4f684908d7ce4226cdcec60241e62e75810e SHA512 670a14d852bb74b9074c3fef9310650f71ce1c56314109c49aea02a7a69acc836af60a8beab11da53e21b10a8e6da341fcfa18b68a1dfd33b26978dd63758e9c DIST icecat-102.2.0-gnu1.tar.bz2 685550799 BLAKE2B 03f3651dc8be1495c66b58b050f64fbea605f18db0b7fbf6024d511af23019321cfa3e7d7e7d6399f65198b0f9683257636675053d114f40fa4a77563ce313f6 SHA512 3ed2d278dec540e6e1c7896a03d651c4a96ad1d523245c542acd8ac8b0b37cc1789c94ed57185aa6a156904f5745ff492634a8aadae13000fb8c502d488c7fab DIST icecat-102.3.0-gnu1.tar.bz2 685637550 BLAKE2B 425a2668a826605d20dd13151a975a9f8fabe086d044da098e083a815c41865c8a8c8c71a18eef6c0b92b6d3b10cfa5fb5f68d2ba6d6ed2fbc37dbfa491b9f72 SHA512 132854dec9e1942a2a609270038b1c9f148f341f24955af770437becba602270e85490fe7c8cc8013ce7a464f94ba547be9f5094c03ffa10316da7b635292209 -DIST icecat-91.10.0-gnu1.tar.bz2 568698738 BLAKE2B 575de81b73f2b1444b340c8f1ec20728fd37756e063768b2ef1bcb196d0ba4589b4aca61ed8566eaa58fee4a75723fde468291289fd602296ea64fbd8c9065ff SHA512 78f9829416b420ab41887381caa903fe9045f9b5822c8a5d7fc4346d425739b9fd0d3d60aa85159ef2c7682ad373ebb725f9e1b7281ae756fd6f1e3f3c868615 -DIST icecat-91.11.0-gnu1.tar.bz2 568171692 BLAKE2B bf35bb5e3e5feaa8eccdf00822214b6095b05e5a0ad2bcfd7e604beb16ee319f33fad27ba877e6e3091d4cf1f221c8ecb78f8377a4e3b9b40c28dc5b3fb178e2 SHA512 b6513a75d463fe5135931ec9508ff5d70157328b76ef4d421219382a8b342f6c4b9310e1a46f44bf6f4b35d76de3ab99a6c9043ce207ce23677ecba0e1b63516 diff --git a/www-client/icecat/files/fix-ftbfs-newer-cbindgen.patch b/www-client/icecat/files/fix-ftbfs-newer-cbindgen.patch deleted file mode 100644 index 3011e8a..0000000 --- a/www-client/icecat/files/fix-ftbfs-newer-cbindgen.patch +++ /dev/null @@ -1,17 +0,0 @@ -Description: Remove an extra constant definition that is now being generated by newer versions of cbindgen (0.24), and causing build failures because it is defined in several places. -Author: Olivier Tilloy -Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1773259 -Forwarded: not-needed - ---- a/gfx/webrender_bindings/webrender_ffi.h -+++ b/gfx/webrender_bindings/webrender_ffi.h -@@ -73,8 +73,6 @@ struct WrPipelineInfo; - struct WrPipelineIdAndEpoch; - using WrPipelineIdEpochs = nsTArray; - --const uint64_t ROOT_CLIP_CHAIN = ~0; -- - } // namespace wr - } // namespace mozilla - - diff --git a/www-client/icecat/files/gentoo-hwaccel-prefs.js b/www-client/icecat/files/gentoo-hwaccel-prefs.js deleted file mode 100644 index 0cb92b0..0000000 --- a/www-client/icecat/files/gentoo-hwaccel-prefs.js +++ /dev/null @@ -1,2 +0,0 @@ -pref("layers.acceleration.force-enabled", true); -pref("webgl.force-enabled", true); diff --git a/www-client/icecat/icecat-91.10.0.ebuild b/www-client/icecat/icecat-91.10.0.ebuild deleted file mode 100644 index 030cc5d..0000000 --- a/www-client/icecat/icecat-91.10.0.ebuild +++ /dev/null @@ -1,1130 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# Ebuild is based on the Firefox ebuilds in the main repo - -EAPI="8" - -# Using Gentoos firefox patches as system libraries and lto are quite nice -FIREFOX_PATCHSET="firefox-91esr-patches-07j.tar.xz" - -LLVM_MAX_SLOT=14 - -PYTHON_COMPAT=( python3_{8..10} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -WANT_AUTOCONF="2.1" - -VIRTUALX_REQUIRED="pgo" - -inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info \ - llvm multiprocessing pax-utils python-any-r1 toolchain-funcs \ - virtualx xdg - -PATCH_URIS=( - https://dev.gentoo.org/~{juippis,polynomial-c,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -SRC_URI=" - !buildtarball? ( icecat-${PV}-gnu1.tar.bz2 ) - ${PATCH_URIS[@]} -" - -DESCRIPTION="GNU IceCat Web Browser" -HOMEPAGE="https://www.gnu.org/software/gnuzilla/" - -KEYWORDS="~amd64" - -SLOT="0" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" - -IUSE="+clang cpu_flags_arm_neon dbus debug +buildtarball hardened hwaccel" -IUSE+=" jack lto +openh264 pgo pulseaudio sndio selinux" -IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx system-png +system-webp" -IUSE+=" wayland wifi" - -# Firefox-only IUSE -IUSE+=" geckodriver" -IUSE+=" screencast" - -REQUIRED_USE="debug? ( !system-av1 ) - pgo? ( lto ) - wifi? ( dbus )" - -# Firefox-only REQUIRED_USE flags -REQUIRED_USE+=" screencast? ( wayland )" - -BDEPEND="${PYTHON_DEPS} - app-arch/unzip - app-arch/zip - >=dev-util/cbindgen-0.19.0 - >=net-libs/nodejs-10.23.1 - virtual/pkgconfig - >=virtual/rust-1.51.0 - || ( - ( - sys-devel/clang:14 - sys-devel/llvm:14 - clang? ( - =sys-devel/lld-14* - pgo? ( =sys-libs/compiler-rt-sanitizers-14*[profile] ) - ) - ) - ( - sys-devel/clang:13 - sys-devel/llvm:13 - clang? ( - =sys-devel/lld-13* - pgo? ( =sys-libs/compiler-rt-sanitizers-13*[profile] ) - ) - ) - ( - sys-devel/clang:12 - sys-devel/llvm:12 - clang? ( - =sys-devel/lld-12* - pgo? ( =sys-libs/compiler-rt-sanitizers-12*[profile] ) - ) - ) - ) - amd64? ( >=dev-lang/nasm-2.13 ) - x86? ( >=dev-lang/nasm-2.13 ) - buildtarball? ( ~www-client/makeicecat-"${PV}"[buildtarball] )" - -COMMON_DEPEND=" - >=dev-libs/nss-3.68 - >=dev-libs/nspr-4.32 - dev-libs/atk - dev-libs/expat - >=x11-libs/cairo-1.10[X] - >=x11-libs/gtk+-3.4.0:3[X] - x11-libs/gdk-pixbuf - >=x11-libs/pango-1.22.0 - >=media-libs/mesa-10.2:* - media-libs/fontconfig - >=media-libs/freetype-2.4.10 - kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) ) - virtual/freedesktop-icon-theme - >=x11-libs/pixman-0.19.2 - >=dev-libs/glib-2.26:2 - >=sys-libs/zlib-1.2.3 - >=dev-libs/libffi-3.0.10:= - media-video/ffmpeg - x11-libs/libX11 - x11-libs/libxcb:= - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrender - x11-libs/libXt - dbus? ( - sys-apps/dbus - dev-libs/dbus-glib - ) - screencast? ( media-video/pipewire:= ) - system-av1? ( - >=media-libs/dav1d-0.8.1:= - >=media-libs/libaom-1.0.0:= - ) - system-harfbuzz? ( - >=media-libs/harfbuzz-2.8.1:0= - >=media-gfx/graphite2-1.3.13 - ) - system-icu? ( >=dev-libs/icu-69.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) - system-libevent? ( >=dev-libs/libevent-2.0:0=[threads] ) - system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] ) - system-png? ( >=media-libs/libpng-1.6.35:0=[apng] ) - system-webp? ( >=media-libs/libwebp-1.1.0:0= ) - wifi? ( - kernel_linux? ( - sys-apps/dbus - dev-libs/dbus-glib - net-misc/networkmanager - ) - ) - jack? ( virtual/jack ) - selinux? ( sec-policy/selinux-mozilla ) - sndio? ( media-sound/sndio )" - -RDEPEND="${COMMON_DEPEND} - jack? ( virtual/jack ) - openh264? ( media-libs/openh264:*[plugin] ) - pulseaudio? ( - || ( - media-sound/pulseaudio - >=media-sound/apulse-0.1.12-r4 - ) - ) - selinux? ( sec-policy/selinux-mozilla )" - -DEPEND="${COMMON_DEPEND} - x11-libs/libICE - x11-libs/libSM - pulseaudio? ( - || ( - media-sound/pulseaudio - >=media-sound/apulse-0.1.12-r4[sdk] - ) - ) - wayland? ( >=x11-libs/gtk+-3.11:3[wayland] ) - amd64? ( virtual/opengl ) - x86? ( virtual/opengl )" - -S="${WORKDIR}/${PN}-${PV%_*}" - -llvm_check_deps() { - if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then - einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if use clang ; then - if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then - einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if use pgo ; then - if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*" ; then - einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - fi - fi - - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 -} - -MOZ_LANGS=( - af ar ast be bg br ca cak cs cy da de dsb - el en-CA en-GB en-US es-AR es-ES et eu - fi fr fy-NL ga-IE gd gl he hr hsb hu - id is it ja ka kab kk ko lt lv ms nb-NO nl nn-NO - pa-IN pl pt-BR pt-PT rm ro ru - sk sl sq sr sv-SE th tr uk uz vi zh-CN zh-TW -) - -# Firefox-only LANGS -MOZ_LANGS+=( ach ) -MOZ_LANGS+=( an ) -MOZ_LANGS+=( az ) -MOZ_LANGS+=( bn ) -MOZ_LANGS+=( bs ) -MOZ_LANGS+=( ca-valencia ) -MOZ_LANGS+=( eo ) -MOZ_LANGS+=( es-CL ) -MOZ_LANGS+=( es-MX ) -MOZ_LANGS+=( fa ) -MOZ_LANGS+=( ff ) -MOZ_LANGS+=( gn ) -MOZ_LANGS+=( gu-IN ) -MOZ_LANGS+=( hi-IN ) -MOZ_LANGS+=( hy-AM ) -MOZ_LANGS+=( ia ) -MOZ_LANGS+=( km ) -MOZ_LANGS+=( kn ) -MOZ_LANGS+=( lij ) -MOZ_LANGS+=( mk ) -MOZ_LANGS+=( mr ) -MOZ_LANGS+=( my ) -MOZ_LANGS+=( ne-NP ) -MOZ_LANGS+=( oc ) -MOZ_LANGS+=( sco ) -MOZ_LANGS+=( si ) -MOZ_LANGS+=( son ) -MOZ_LANGS+=( szl ) -MOZ_LANGS+=( ta ) -MOZ_LANGS+=( te ) -MOZ_LANGS+=( tl ) -MOZ_LANGS+=( trs ) -MOZ_LANGS+=( ur ) -MOZ_LANGS+=( xh ) - -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 - - IUSE+=" l10n_${xflag/[_@]/-}" - done - -} -mozilla_set_globals - -moz_clear_vendor_checksums() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -ne 1 ]] ; then - die "${FUNCNAME} requires exact one argument" - fi - - einfo "Clearing cargo checksums for ${1} ..." - - sed -i \ - -e 's/\("files":{\)[^}]*/\1/' \ - "${S}"/third_party/rust/${1}/.cargo-checksum.json \ - || die -} - -moz_build_xpi() { - debug-print-function ${FUNCNAME} "$@" - - 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 - ) - - cd "${BUILD_DIR}"/browser/locales || die - 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 - - if use l10n_"${xflag}"; then - emake langpack-"${lang}" LOCALE_MERGEDIR=. - fi - done -} - -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 -} - -mozconfig_add_options_ac() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local reason=${1} - shift - - local option - for option in ${@} ; do - echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG} - done -} - -mozconfig_add_options_mk() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local reason=${1} - shift - - local option - for option in ${@} ; do - echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG} - done -} - -mozconfig_use_enable() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 1 ]] ; then - die "${FUNCNAME} requires at least one arguments" - fi - - local flag=$(use_enable "${@}") - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" -} - -mozconfig_use_with() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 1 ]] ; then - die "${FUNCNAME} requires at least one arguments" - fi - - local flag=$(use_with "${@}") - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" -} - -pkg_pretend() { - if [[ ${MERGE_TYPE} != binary ]] ; then - if use pgo ; then - if ! has usersandbox $FEATURES ; then - die "You must enable usersandbox as X server can not run as root!" - fi - fi - - # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then - CHECKREQS_DISK_BUILD="13500M" - else - CHECKREQS_DISK_BUILD="6400M" - fi - - check-reqs_pkg_pretend - fi -} - -pkg_nofetch() { - if ! use buildtarball; then - einfo "You have not enabled buildtarball use flag, therefore you will have to" - einfo "build the tarball manually and place it in your distfiles directory." - einfo "You may find the script for building the tarball here" - einfo "https://git.savannah.gnu.org/cgit/gnuzilla.git/, but make sure it is the" - einfo "right version." - einfo "The output of the script should be icecat-"${PV}"-gnu1.tar.bz2" - fi -} - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - if use pgo ; then - if ! has userpriv ${FEATURES} ; then - eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" - fi - fi - - # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then - CHECKREQS_DISK_BUILD="13500M" - else - CHECKREQS_DISK_BUILD="6400M" - fi - - check-reqs_pkg_setup - - llvm_pkg_setup - - if use clang && use lto ; then - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" - - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" - eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " - eerror " llvm/clang/lld/rust chain depending on your @world updates)" - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" - fi - fi - - if ! use clang && [[ $(gcc-major-version) -eq 11 ]] \ - && ! has_version -b ">sys-devel/gcc-11.1.0:11" ; then - # bug 792705 - eerror "Using GCC 11 to compile firefox is currently known to be broken (see bug #792705)." - die "Set USE=clang or select >"${GENTOO_PREFS}" <<-EOF || die "failed to set spellchecker.dictionary_path pref" - pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell"); - EOF - - # Set installDistroAddons to true so that language packs work - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set extensions.installDistroAddons pref" - pref("extensions.installDistroAddons", true); - pref("extensions.langpacks.signatures.required", false); - EOF - - # Disable signatures for language packs so that unsigned just built language packs work - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable langpacks signatures" - pref("extensions.langpacks.signatures.required", false); - EOF - - # Force hwaccel prefs if USE=hwaccel is enabled - if use hwaccel ; then - cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \ - >>"${GENTOO_PREFS}" \ - || die "failed to add prefs to force hardware-accelerated rendering to all-gentoo.js" - fi - - # Force the graphite pref if USE=system-harfbuzz is enabled, since the pref cannot disable it - if use system-harfbuzz ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set gfx.font_rendering.graphite.enabled pref" - sticky_pref("gfx.font_rendering.graphite.enabled", true); - EOF - fi - - # Install language packs - local langpacks=( $(find "${BUILD_DIR}"/dist/linux-x86_64/xpi -type f -name '*.xpi') ) - if [[ -n "${langpacks}" ]] ; then - moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}" - fi - - # Install geckodriver - if use geckodriver ; then - einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..." - pax-mark m "${BUILD_DIR}"/dist/bin/geckodriver - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/geckodriver - - dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/official" - local icon_symbolic_file="${FILESDIR}/icon/"${PN}"-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="GNU IceCat" - local desktop_file="${FILESDIR}/icon/${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_preinst() { - xdg_pkg_preinst - - # If the apulse libs are available in MOZILLA_FIVE_HOME then apulse - # does not need to be forced into the LD_LIBRARY_PATH - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then - einfo "APULSE found; Generating library symlinks for sound support ..." - local lib - pushd "${ED}${MOZILLA_FIVE_HOME}" &>/dev/null || die - for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do - # A quickpkg rolled by hand will grab symlinks as part of the package, - # so we need to avoid creating them if they already exist. - if [[ ! -L ${lib##*/} ]] ; then - ln -s "${lib}" ${lib##*/} || die - fi - done - popd &>/dev/null || die - fi -} - -pkg_postinst() { - xdg_pkg_postinst - - elog "Cloudflare browser checks are broken with GNU IceCats anti fingerprinting measures." - elog "You can fix cloudflare browser checks by undoing them in about:config like below:" - # Specifying (X11) is necessary for it to work, even in a Wayland session - elog " general.appversion.override: 91.0 (X11)" - elog " general.oscpu.override: Linux x86_64" - elog " general.platform.override: Linux x86_64" - - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then - elog "Apulse was detected at merge time on this system and so it will always be" - elog "used for sound. If you wish to use pulseaudio instead please unmerge" - elog "media-sound/apulse." - elog - fi - if [[ -n "${show_shortcut_information}" ]] ; then - elog - elog "Since ${PN}-91.0 we no longer install multiple shortcuts for" - elog "each supported display protocol. Instead we will only install" - elog "one generic Mozilla ${PN^} shortcut." - elog "If you still want to be able to select between running Mozilla ${PN^}" - elog "on X11 or Wayland, you have to re-create these shortcuts on your own." - fi -} diff --git a/www-client/icecat/icecat-91.11.0.ebuild b/www-client/icecat/icecat-91.11.0.ebuild deleted file mode 100644 index 4a4c22d..0000000 --- a/www-client/icecat/icecat-91.11.0.ebuild +++ /dev/null @@ -1,1128 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# Ebuild is based on the Firefox ebuilds in the main repo - -EAPI="8" - -# Using Gentoos firefox patches as system libraries and lto are quite nice -FIREFOX_PATCHSET="firefox-91esr-patches-10j.tar.xz" - -LLVM_MAX_SLOT=14 - -PYTHON_COMPAT=( python3_{8..10} ) -PYTHON_REQ_USE="ncurses,sqlite,ssl" - -WANT_AUTOCONF="2.1" - -VIRTUALX_REQUIRED="pgo" - -inherit autotools check-reqs desktop flag-o-matic gnome2-utils linux-info \ - llvm multiprocessing pax-utils python-any-r1 toolchain-funcs \ - virtualx xdg - -PATCH_URIS=( - https://dev.gentoo.org/~{juippis,polynomial-c,whissi}/mozilla/patchsets/${FIREFOX_PATCHSET} -) - -SRC_URI=" - !buildtarball? ( icecat-${PV}-gnu1.tar.bz2 ) - ${PATCH_URIS[@]} -" - -DESCRIPTION="GNU IceCat Web Browser" -HOMEPAGE="https://www.gnu.org/software/gnuzilla/" - -KEYWORDS="~amd64" - -SLOT="0" -LICENSE="MPL-2.0 GPL-2 LGPL-2.1" - -IUSE="+clang cpu_flags_arm_neon dbus debug +buildtarball hardened hwaccel" -IUSE+=" jack lto +openh264 pgo pulseaudio sndio selinux" -IUSE+=" +system-av1 +system-harfbuzz +system-icu +system-jpeg +system-libevent +system-libvpx system-png +system-webp" -IUSE+=" wayland wifi" - -# Firefox-only IUSE -IUSE+=" geckodriver" -IUSE+=" screencast" - -REQUIRED_USE="debug? ( !system-av1 ) - pgo? ( lto ) - wifi? ( dbus )" - -# Firefox-only REQUIRED_USE flags -REQUIRED_USE+=" screencast? ( wayland )" - -BDEPEND="${PYTHON_DEPS} - app-arch/unzip - app-arch/zip - >=dev-util/cbindgen-0.24.0 - >=net-libs/nodejs-10.23.1 - virtual/pkgconfig - >=virtual/rust-1.51.0 - || ( - ( - sys-devel/clang:14 - sys-devel/llvm:14 - clang? ( - =sys-devel/lld-14* - pgo? ( =sys-libs/compiler-rt-sanitizers-14*[profile] ) - ) - ) - ( - sys-devel/clang:13 - sys-devel/llvm:13 - clang? ( - =sys-devel/lld-13* - pgo? ( =sys-libs/compiler-rt-sanitizers-13*[profile] ) - ) - ) - ( - sys-devel/clang:12 - sys-devel/llvm:12 - clang? ( - =sys-devel/lld-12* - pgo? ( =sys-libs/compiler-rt-sanitizers-12*[profile] ) - ) - ) - ) - amd64? ( >=dev-lang/nasm-2.13 ) - x86? ( >=dev-lang/nasm-2.13 ) - buildtarball? ( ~www-client/makeicecat-"${PV}"[buildtarball] )" - -COMMON_DEPEND=" - >=dev-libs/nss-3.68 - >=dev-libs/nspr-4.32 - dev-libs/atk - dev-libs/expat - >=x11-libs/cairo-1.10[X] - >=x11-libs/gtk+-3.4.0:3[X] - x11-libs/gdk-pixbuf - >=x11-libs/pango-1.22.0 - >=media-libs/mesa-10.2:* - media-libs/fontconfig - >=media-libs/freetype-2.4.10 - kernel_linux? ( !pulseaudio? ( media-libs/alsa-lib ) ) - virtual/freedesktop-icon-theme - >=x11-libs/pixman-0.19.2 - >=dev-libs/glib-2.26:2 - >=sys-libs/zlib-1.2.3 - >=dev-libs/libffi-3.0.10:= - media-video/ffmpeg - x11-libs/libX11 - x11-libs/libxcb:= - x11-libs/libXcomposite - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXrender - x11-libs/libXt - dbus? ( - sys-apps/dbus - dev-libs/dbus-glib - ) - screencast? ( media-video/pipewire:= ) - system-av1? ( - >=media-libs/dav1d-0.8.1:= - >=media-libs/libaom-1.0.0:= - ) - system-harfbuzz? ( - >=media-libs/harfbuzz-2.8.1:0= - >=media-gfx/graphite2-1.3.13 - ) - system-icu? ( >=dev-libs/icu-69.1:= ) - system-jpeg? ( >=media-libs/libjpeg-turbo-1.2.1 ) - system-libevent? ( >=dev-libs/libevent-2.0:0=[threads] ) - system-libvpx? ( >=media-libs/libvpx-1.8.2:0=[postproc] ) - system-png? ( >=media-libs/libpng-1.6.35:0=[apng] ) - system-webp? ( >=media-libs/libwebp-1.1.0:0= ) - wifi? ( - kernel_linux? ( - sys-apps/dbus - dev-libs/dbus-glib - net-misc/networkmanager - ) - ) - jack? ( virtual/jack ) - selinux? ( sec-policy/selinux-mozilla ) - sndio? ( media-sound/sndio )" - -RDEPEND="${COMMON_DEPEND} - jack? ( virtual/jack ) - openh264? ( media-libs/openh264:*[plugin] ) - pulseaudio? ( - || ( - media-sound/pulseaudio - >=media-sound/apulse-0.1.12-r4 - ) - ) - selinux? ( sec-policy/selinux-mozilla )" - -DEPEND="${COMMON_DEPEND} - x11-libs/libICE - x11-libs/libSM - pulseaudio? ( - || ( - media-sound/pulseaudio - >=media-sound/apulse-0.1.12-r4[sdk] - ) - ) - wayland? ( >=x11-libs/gtk+-3.11:3[wayland] ) - amd64? ( virtual/opengl ) - x86? ( virtual/opengl )" - -S="${WORKDIR}/${PN}-${PV%_*}" - -llvm_check_deps() { - if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then - einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if use clang ; then - if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then - einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if use pgo ; then - if ! has_version -b "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}*" ; then - einfo "=sys-libs/compiler-rt-sanitizers-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - fi - fi - - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 -} - -MOZ_LANGS=( - af ar ast be bg br ca cak cs cy da de dsb - el en-CA en-GB en-US es-AR es-ES et eu - fi fr fy-NL ga-IE gd gl he hr hsb hu - id is it ja ka kab kk ko lt lv ms nb-NO nl nn-NO - pa-IN pl pt-BR pt-PT rm ro ru - sk sl sq sr sv-SE th tr uk uz vi zh-CN zh-TW -) - -# Firefox-only LANGS -MOZ_LANGS+=( ach ) -MOZ_LANGS+=( an ) -MOZ_LANGS+=( az ) -MOZ_LANGS+=( bn ) -MOZ_LANGS+=( bs ) -MOZ_LANGS+=( ca-valencia ) -MOZ_LANGS+=( eo ) -MOZ_LANGS+=( es-CL ) -MOZ_LANGS+=( es-MX ) -MOZ_LANGS+=( fa ) -MOZ_LANGS+=( ff ) -MOZ_LANGS+=( gn ) -MOZ_LANGS+=( gu-IN ) -MOZ_LANGS+=( hi-IN ) -MOZ_LANGS+=( hy-AM ) -MOZ_LANGS+=( ia ) -MOZ_LANGS+=( km ) -MOZ_LANGS+=( kn ) -MOZ_LANGS+=( lij ) -MOZ_LANGS+=( mk ) -MOZ_LANGS+=( mr ) -MOZ_LANGS+=( my ) -MOZ_LANGS+=( ne-NP ) -MOZ_LANGS+=( oc ) -MOZ_LANGS+=( sco ) -MOZ_LANGS+=( si ) -MOZ_LANGS+=( son ) -MOZ_LANGS+=( szl ) -MOZ_LANGS+=( ta ) -MOZ_LANGS+=( te ) -MOZ_LANGS+=( tl ) -MOZ_LANGS+=( trs ) -MOZ_LANGS+=( ur ) -MOZ_LANGS+=( xh ) - -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 - - IUSE+=" l10n_${xflag/[_@]/-}" - done - -} -mozilla_set_globals - -moz_clear_vendor_checksums() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -ne 1 ]] ; then - die "${FUNCNAME} requires exact one argument" - fi - - einfo "Clearing cargo checksums for ${1} ..." - - sed -i \ - -e 's/\("files":{\)[^}]*/\1/' \ - "${S}"/third_party/rust/${1}/.cargo-checksum.json \ - || die -} - -moz_build_xpi() { - debug-print-function ${FUNCNAME} "$@" - - 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 - ) - - cd "${BUILD_DIR}"/browser/locales || die - 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 - - if use l10n_"${xflag}"; then - emake langpack-"${lang}" LOCALE_MERGEDIR=. - fi - done -} - -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 -} - -mozconfig_add_options_ac() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local reason=${1} - shift - - local option - for option in ${@} ; do - echo "ac_add_options ${option} # ${reason}" >>${MOZCONFIG} - done -} - -mozconfig_add_options_mk() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 2 ]] ; then - die "${FUNCNAME} requires at least two arguments" - fi - - local reason=${1} - shift - - local option - for option in ${@} ; do - echo "mk_add_options ${option} # ${reason}" >>${MOZCONFIG} - done -} - -mozconfig_use_enable() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 1 ]] ; then - die "${FUNCNAME} requires at least one arguments" - fi - - local flag=$(use_enable "${@}") - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" -} - -mozconfig_use_with() { - debug-print-function ${FUNCNAME} "$@" - - if [[ ${#} -lt 1 ]] ; then - die "${FUNCNAME} requires at least one arguments" - fi - - local flag=$(use_with "${@}") - mozconfig_add_options_ac "$(use ${1} && echo +${1} || echo -${1})" "${flag}" -} - -pkg_pretend() { - if [[ ${MERGE_TYPE} != binary ]] ; then - if use pgo ; then - if ! has usersandbox $FEATURES ; then - die "You must enable usersandbox as X server can not run as root!" - fi - fi - - # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then - CHECKREQS_DISK_BUILD="13500M" - else - CHECKREQS_DISK_BUILD="6400M" - fi - - check-reqs_pkg_pretend - fi -} - -pkg_nofetch() { - if ! use buildtarball; then - einfo "You have not enabled buildtarball use flag, therefore you will have to" - einfo "build the tarball manually and place it in your distfiles directory." - einfo "You may find the script for building the tarball here" - einfo "https://git.savannah.gnu.org/cgit/gnuzilla.git/, but make sure it is the" - einfo "right version." - einfo "The output of the script should be icecat-"${PV}"-gnu1.tar.bz2" - fi -} - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] ; then - if use pgo ; then - if ! has userpriv ${FEATURES} ; then - eerror "Building ${PN} with USE=pgo and FEATURES=-userpriv is not supported!" - fi - fi - - # Ensure we have enough disk space to compile - if use pgo || use lto || use debug ; then - CHECKREQS_DISK_BUILD="13500M" - else - CHECKREQS_DISK_BUILD="6400M" - fi - - check-reqs_pkg_setup - - llvm_pkg_setup - - if use clang && use lto ; then - local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }') - [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}") - [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!" - - local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }') - [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}") - [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!" - - if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then - eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}." - eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:" - eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version" - eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version" - eerror " - Build ${CATEGORY}/${PN} without USE=lto" - eerror " - Rebuild lld with llvm that was used to build rust (may need to rebuild the whole " - eerror " llvm/clang/lld/rust chain depending on your @world updates)" - die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!" - fi - fi - - if ! use clang && [[ $(gcc-major-version) -eq 11 ]] \ - && ! has_version -b ">sys-devel/gcc-11.1.0:11" ; then - # bug 792705 - eerror "Using GCC 11 to compile firefox is currently known to be broken (see bug #792705)." - die "Set USE=clang or select >"${GENTOO_PREFS}" <<-EOF || die "failed to set spellchecker.dictionary_path pref" - pref("spellchecker.dictionary_path", "${EPREFIX}/usr/share/myspell"); - EOF - - # Set installDistroAddons to true so that language packs work - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set extensions.installDistroAddons pref" - pref("extensions.installDistroAddons", true); - pref("extensions.langpacks.signatures.required", false); - EOF - - # Disable signatures for language packs so that unsigned just built language packs work - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to disable langpacks signatures" - pref("extensions.langpacks.signatures.required", false); - EOF - - # Force hwaccel prefs if USE=hwaccel is enabled - if use hwaccel ; then - cat "${FILESDIR}"/gentoo-hwaccel-prefs.js \ - >>"${GENTOO_PREFS}" \ - || die "failed to add prefs to force hardware-accelerated rendering to all-gentoo.js" - fi - - # Force the graphite pref if USE=system-harfbuzz is enabled, since the pref cannot disable it - if use system-harfbuzz ; then - cat >>"${GENTOO_PREFS}" <<-EOF || die "failed to set gfx.font_rendering.graphite.enabled pref" - sticky_pref("gfx.font_rendering.graphite.enabled", true); - EOF - fi - - # Install language packs - local langpacks=( $(find "${BUILD_DIR}"/dist/linux-x86_64/xpi -type f -name '*.xpi') ) - if [[ -n "${langpacks}" ]] ; then - moz_install_xpi "${MOZILLA_FIVE_HOME}/distribution/extensions" "${langpacks[@]}" - fi - - # Install geckodriver - if use geckodriver ; then - einfo "Installing geckodriver into ${ED}${MOZILLA_FIVE_HOME} ..." - pax-mark m "${BUILD_DIR}"/dist/bin/geckodriver - exeinto "${MOZILLA_FIVE_HOME}" - doexe "${BUILD_DIR}"/dist/bin/geckodriver - - dosym ${MOZILLA_FIVE_HOME}/geckodriver /usr/bin/geckodriver - fi - - # Install icons - local icon_srcdir="${S}/browser/branding/official" - local icon_symbolic_file="${FILESDIR}/icon/"${PN}"-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="GNU IceCat" - local desktop_file="${FILESDIR}/icon/${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_preinst() { - xdg_pkg_preinst - - # If the apulse libs are available in MOZILLA_FIVE_HOME then apulse - # does not need to be forced into the LD_LIBRARY_PATH - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then - einfo "APULSE found; Generating library symlinks for sound support ..." - local lib - pushd "${ED}${MOZILLA_FIVE_HOME}" &>/dev/null || die - for lib in ../apulse/libpulse{.so{,.0},-simple.so{,.0}} ; do - # A quickpkg rolled by hand will grab symlinks as part of the package, - # so we need to avoid creating them if they already exist. - if [[ ! -L ${lib##*/} ]] ; then - ln -s "${lib}" ${lib##*/} || die - fi - done - popd &>/dev/null || die - fi -} - -pkg_postinst() { - xdg_pkg_postinst - - elog "Cloudflare browser checks are broken with GNU IceCats anti fingerprinting measures." - elog "You can fix cloudflare browser checks by undoing them in about:config like below:" - # Specifying (X11) is necessary for it to work, even in a Wayland session - elog " general.appversion.override: 91.0 (X11)" - elog " general.oscpu.override: Linux x86_64" - elog " general.platform.override: Linux x86_64" - - if use pulseaudio && has_version ">=media-sound/apulse-0.1.12-r4" ; then - elog "Apulse was detected at merge time on this system and so it will always be" - elog "used for sound. If you wish to use pulseaudio instead please unmerge" - elog "media-sound/apulse." - elog - fi - if [[ -n "${show_shortcut_information}" ]] ; then - elog - elog "Since ${PN}-91.0 we no longer install multiple shortcuts for" - elog "each supported display protocol. Instead we will only install" - elog "one generic Mozilla ${PN^} shortcut." - elog "If you still want to be able to select between running Mozilla ${PN^}" - elog "on X11 or Wayland, you have to re-create these shortcuts on your own." - fi -}