# Maintainer (Arch): Jan Alexander Steffens (heftig) # Contributor (Arch): Ionut Biru # Contributor (Arch): Jakub Schmidtke # Contributor (ConnochaetOSl): Henry Jensen # Contributor: Andreas Grapentin # Contributor: Luke Shumaker # Contributor: André Silva # Contributor: Márcio Silva # Contributor: fauno # Contributor: vando # Contributor: Figue # Contributor: evr # Contributor: Muhammad 'MJ' Jassim # Contributor: taro-k # Contributor: Michał Masłowski # Contributor: Luke R. # Contributor: Isaac David # Contributor: bill-auger # Contributor: grizzlyuser # Rational for inclusion in [libre]: # - Modify the addons pages to use GNU IceCat plugins sources, rather # than addons.mozilla.org, which hosts non-free addons. # - Disable EME, which is implemented via the non-free libWideVine # CDM. # # The above changes cause us to run afoul of the Firefox trademark # policy[1], so making those changes also requires us to: # - Rebrand to Iceweasel # # While we're at it, while not strictly nescessary for FSDG # compliance: # - Remove Google API keys and usage # - Disable Mozilla telemetry and crash reporting (good manners # because of all of the other patching we're doing # # [1]: https://www.mozilla.org/en-US/foundation/trademarks/policy/ pkgname=iceweasel replaces=('firefox') epoch=1 pkgver=72.0.1 pkgrel=1 pkgrel+=.parabola1 _brandingver=70.0 _brandingrel=1 pkgdesc="Standalone web browser derived from Mozilla Firefox" arch=(x86_64) arch+=(i686 armv7h) license=(MPL GPL LGPL) url="https://wiki.parabola.nu/Iceweasel" depends=(gtk3 libxt startup-notification mime-types dbus-glib ffmpeg nss ttf-font libpulse) depends+=(sqlite icu) makedepends=(unzip zip diffutils python2-setuptools yasm mesa imake inetutils xorg-server-xvfb autoconf2.13 rust clang llvm jack gtk2 python nodejs python2-psutil cbindgen nasm) # FIXME: 'mozilla-serarchplugins' package needs re-working (see note in prepare()) makedepends+=(quilt libxslt imagemagick) 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://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz{,.asc} 0001-Use-remoting-name-for-GDK-application-names.patch $pkgname.desktop) source+=(https://repo.parabola.nu/other/iceweasel/${pkgname}_${_brandingver}-${_brandingrel}.branding.tar.xz{,.sig} firefox-70.0-add-distro.patch libre.patch libre-searchengines.patch) sha256sums=('1fa59aedc8469c3e6ffb12449ab7de2f93776f7679eedebfb74aa309b694956f' 'SKIP' '5f7ac724a5c5afd9322b1e59006f4170ea5354ca1e0e60dab08b7784c2d8463c' 'f573d00835afe066ef1887bfea35099933ee07aeadc4c0d603972127e600cfc4' 'e90956067d8549f02864d612369ed8714d7173f0ee07bbfb4374a7323b4a733e' 'SKIP' '41ab298519dfdf86e1599990cd2a2e4d939a2a1d77de829caa0593d0d2e8f0e8' '497b0b7d15364acec4b8706ab41ce4aefd4fd1d7f1baa7980a46d14cca8aedd8' 'dfed11d97f1d4198a3dc608be159b6b53a11054f376cdb73bb0fe9a487ae9418') validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases validpgpkeys+=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin prepare() { mkdir mozbuild cd firefox-$pkgver # https://bugzilla.mozilla.org/show_bug.cgi?id=1530052 msg "applying 0001-Use-remoting-name-for-GDK-application-names.patch" patch -Np1 -i ../0001-Use-remoting-name-for-GDK-application-names.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1212502 msg "applying firefox-70.0-add-distro.patch" patch -Np1 -i ../firefox-70.0-add-distro.patch cat >../mozconfig </ # local _remove_engines_sed='s|.*oogle.*| "ddg", "duckduckgo-html", "duckduckgo-lite", "internet-archive", "parabola-labs", "parabola-packages", "parabola-wiki-en", "searx", "wikipedia", "yacy"|g' local _remove_engines_sed='s|.*oogle.*| "ddg", "wikipedia"|g' local _search_config_file=browser/components/search/extensions/list.json msg "applying libre-searchengines.patch" patch -Np1 -i "$srcdir/libre-searchengines.patch" sed -i "${_remove_engines_sed}" ${_search_config_file} # Sanity-check search-engines patching _removed_engines_regex='Bing|Google|Seznam|Twitter|Yahoo|Yandex|Яндекс|amazon|bing|google|ebay|twitter' _err_msg="search-engines patch needs re-working" ! grep -E ${_removed_engines_regex} ${_search_config_file} > /dev/null || ! echo "${_err_msg}" } build() { cd firefox-$pkgver export MOZ_NOSPAM=1 export MOZBUILD_STATE_PATH="$srcdir/mozbuild" if [[ $CARCH = armv7h ]]; then # TODO: fixme false fi if [[ $CARCH = i686 ]]; then # TODO: fixme false 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 msg2 "Building instrumented browser..." cat >.mozconfig ../mozconfig - <.mozconfig ../mozconfig - <=${_icu_ver}" "icu<$((${_icu_ver%%.*} + 1))") cd firefox-$pkgver DESTDIR="$pkgdir" ./mach install local vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" install -Dvm644 /dev/stdin "$vendorjs" <> "$vendorjs" <