# Maintainer (Arch): Jan Alexander Steffens (heftig) # Contributor (Arch): Ionut Biru # Contributor (Arch): Jakub Schmidtke # Contributor: Figue # Contributor: fauno # Contributor: evr # Contributor: Muhammad 'MJ' Jassim # Contributor: vando # Contributor: André Silva # Contributor: Henry Jensen # Contributor: Luke Shumaker # Contributor: Márcio Silva # Maintainer: Andreas Grapentin # NOTE: icecat (60.7 < V <= 78.4) are not upstream releases # upstream releases would normally have '-gnu' appended to $_upstream_ver # this build is based on gnuzilla VCS developement sources # rev: 05adddbf87a5ee11de7cd90794c331a178bcfd5c # needed for the !(...) matching in prepare() shopt -s extglob pkgname=icecat _upstream_ver=78.4.0 # -gnu pkgver=${_upstream_ver//-/_} pkgrel=1 pkgdesc="GNU IceCat - a libre standalone web browser based on Mozilla Firefox ESR" arch=(x86_64 i686 armv7h) license=(MPL GPL LGPL) url=http://www.gnu.org/software/gnuzilla/ depends=(gtk3 libxt mime-types dbus-glib ffmpeg nss ttf-font libpulse) makedepends=(unzip zip diffutils yasm mesa imake inetutils xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2 nodejs cbindgen nasm python-setuptools python-psutil lld) makedepends+=(mozilla-searchplugins jq) optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' 'pulseaudio: Audio support' 'speech-dispatcher: Text-to-Speech' 'hunspell-en_US: Spell checking, American English') options=(!emptydirs !makeflags !strip) source=(https://repo.parabola.nu/other/${pkgname}/${pkgname}-${_upstream_ver}-pre.tar.bz2{,.sig} ${pkgname}.desktop 0001-Use-remoting-name-for-GDK-application-names.patch rust_1.48.patch.gz) source+=(libre.patch mozilla-1663715.patch) sha256sums=('314171bb68cd8b0fb7b880a77f3a2daa65acd660fc6f2a7d6871c5a5ba44be52' 'SKIP' 'f9f954fd06739e70a72ccf4774cfa71f349a4b133ec8f5dea0a3bcca2cf7321d' '3bb7463471fb43b2163a705a79a13a3003d70fff4bbe44f467807ca056de9a75' 'd32c87c4526e897d64453914da43f99366d1d0b7d71e43b4027a6cb5aa274040' '28029afa3201e1be8138be06f741c59d64869edf0c9e90dbb05cfa6b5fff4ecd' '665cf25255fd240f79d5d010b3c3764f2d80aa81fdc7b6e9a9728e4a7970685b') validpgpkeys=('318C679D94F17700CC847DE646A70073E4E50D4E' # Ruben Rodriguez '3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40') # bill-auger prepare() { mkdir -p mozbuild cd "$srcdir/$pkgname-${pkgver%_*}" # https://bugzilla.mozilla.org/show_bug.cgi?id=1530052 patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1667736 patch -Np1 -i ../rust_1.48.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1663715 patch -Np1 -i ../mozilla-1663715.patch cat >../mozconfig <> .mozconfig < browser/components/search/extensions/list.json << EOF { "default": { "visibleDefaultEngines": [ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki", "searx", "wikipedia", "yacy" ] }, "regionOverrides": { }, "locales": { EOF comma="," for locale in "${locales[@]}"; do [ "$locale" != "${locales[-1]}" ] || comma="" cat >> browser/components/search/extensions/list.json << EOF $locale: { "default": { "visibleDefaultEngines": [ "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-packages", "parabola-wiki", "searx", "wikipedia", "yacy" ] } }$comma EOF done cat >> browser/components/search/extensions/list.json << EOF } } EOF # quick syntax check jq < browser/components/search/extensions/list.json # Patch and remove anything that's left patch -Np1 -i "$srcdir/libre.patch" } build() { cd "$srcdir/$pkgname-${pkgver%_*}" export MOZ_NOSPAM=1 export MOZBUILD_STATE_PATH="$srcdir/mozbuild" # if [[ $CARCH = armv7h ]]; then # export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off" # export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" # fi # # if [[ $CARCH = i686 ]]; then # export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off" # export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" # fi # LTO needs more open files ulimit -n 4096 # -fno-plt with cross-LTO causes obscure LLVM errors # LLVM ERROR: Function Import: link error CFLAGS="${CFLAGS/-fno-plt/}" CXXFLAGS="${CXXFLAGS/-fno-plt/}" # Do 3-tier PGO echo "Building instrumented browser..." cat >.mozconfig ../mozconfig - <.mozconfig ../mozconfig - <