# $Id$ # Maintainer: Jan Alexander Steffens (heftig) # Contributor: Ionut Biru # Contributor: Jakub Schmidtke # ALARM: Kevin Mihelich # - mozconfig changes for ARM # - patches to build on ARM # - remove makedepend on cargo # - use tarball source buildarch=12 highmem=1 noautobuild=1 pkgname=firefox pkgver=54.0 pkgrel=1 pkgdesc="Standalone web browser from mozilla.org" arch=(i686 x86_64) license=(MPL GPL LGPL) url="https://www.mozilla.org/firefox/" depends=(gtk3 gtk2 mozilla-common libxt startup-notification mime-types dbus-glib alsa-lib ffmpeg nss hunspell sqlite ttf-font libpulse icu libvpx) makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb autoconf2.13) optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' 'pulseaudio: Audio support' 'speech-dispatcher: Text-to-Speech') options=(!emptydirs !makeflags !strip) source=(https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz $pkgname.desktop firefox-symbolic.svg firefox-install-dir.patch no-crmf.diff fix-wifi-scanner.diff mozilla-1335250.patch rhbz-1354671.patch) sha256sums=('08a9ff6870d904a2af1d03c17c6c44f67413608efb66bb280894d7b92c336a77' 'ada313750e6fb14558b37c764409a17c1672a351a46c73b350aa1fe4ea9220ef' 'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9' 'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd' 'fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb' '9765bca5d63fb5525bbd0520b7ab1d27cabaed697e2fc7791400abc3fa4f13b8' 'f3944e22d21b41b3aa17e3ea0614ffd13863e66bc8f9f6120f2efbc7595ea347' '22d5e5c07e759422027867121b24cdbcab8812670ca8e2e92825029f30eecbbd') validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A') # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact foutrelis@archlinux.org for # more information. # - Arch Linux ARM has obtained permission to use the Arch Linux keys. _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM # Mozilla API keys (see https://location.services.mozilla.com/api) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact heftig@archlinux.org for # more information. _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff prepare() { mkdir path ln -s /usr/bin/python2 path/python cd $pkgname-$pkgver patch -Np1 -i ../firefox-install-dir.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1371991 patch -Np1 -i ../no-crmf.diff # https://bugzilla.mozilla.org/show_bug.cgi?id=1314968 patch -Np1 -i ../fix-wifi-scanner.diff echo -n "$_google_api_key" >google-api-key echo -n "$_mozilla_api_key" >mozilla-api-key cat >.mozconfig <> .mozconfig echo 'ac_add_options --enable-optimize="-g -O2 -fno-schedule-insns"' >> .mozconfig elif [[ $CARCH == "aarch64" ]]; then echo 'ac_add_options --enable-optimize="-O2"' >> .mozconfig patch -p1 -i ../rhbz-1354671.patch fi patch -p1 -i ../mozilla-1335250.patch } build() { cd $pkgname-$pkgver # _FORTIFY_SOURCE causes configure failures CPPFLAGS+=" -O2" # Hardening LDFLAGS+=" -Wl,-z,now" export PATH="$srcdir/path:$PATH" # Do PGO #xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \ # make -f client.mk build MOZ_PGO=1 make -f client.mk build } package() { cd $pkgname-$pkgver make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install _vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" install -Dm644 /dev/stdin "$_vendorjs" <