# 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 # 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=70.0.1 pkgrel=1 pkgrel+=.parabola1 _brandingver=70.0 _brandingrel=1 pkgdesc="Standalone web browser based on Mozilla Firefox" arch=(x86_64) arch+=(i686 armv7h) license=(MPL GPL LGPL) url="https://wiki.parabola.nu/$pkgname" 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} no-relinking.patch 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-update-bindgen.patch firefox-70.0-add-distro.patch libre.patch libre-searchengines.patch) sha256sums=('f2e9bb26af7682b31e82fdfc3a4b3e04fd1caa8b004469ea608185d33e35691b' 'SKIP' '2dc9d1aa5eb7798c89f46478f254ae61e4122b4d1956d6044426288627d8a014' 'ab07ab26617ff76fce68e07c66b8aa9b96c2d3e5b5517e51a3c3eac2edd88894' 'e439117380218898cd5c60a8da8947847efbd0fe64cc06b129d6ca20a392cb3d' 'e90956067d8549f02864d612369ed8714d7173f0ee07bbfb4374a7323b4a733e' 'SKIP' 'bde80a158f42f6afd01d9f3ce1ff9c8ecb89db96b6b7398f2acfb03436234eeb' '41ab298519dfdf86e1599990cd2a2e4d939a2a1d77de829caa0593d0d2e8f0e8' '783e1b7c2f6f8719cc8a0751aacc823a5029c2326ac0b5ff7c659d831e286387' 'dfed11d97f1d4198a3dc608be159b6b53a11054f376cdb73bb0fe9a487ae9418') validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases validpgpkeys+=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin prepare() { mkdir mozbuild cd firefox-$pkgver # Avoid relinking during buildsymbols patch -Np1 -i ../no-relinking.patch # 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=1583471 patch -Np1 -i ../firefox-70.0-update-bindgen.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1212502 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 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 - <&2; then error "No profile data produced." return 1 fi if [[ ! -s jarlog ]]; then error "No jar log produced." return 1 fi msg2 "Removing instrumented browser..." ./mach clobber msg2 "Building optimized browser..." cat >.mozconfig ../mozconfig - <=${_icu_ver}" "icu<$((${_icu_ver%%.*} + 1))") cd firefox-$pkgver DESTDIR="$pkgdir" ./mach install find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} + local vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" install -Dvm644 /dev/stdin "$vendorjs" <> "$vendorjs" <