# $Id$ # Maintainer (Arch): Jan Alexander Steffens (heftig) # Contributor (Arch): Ionut Biru # Contributor (Arch): Jakub Schmidtke # Maintainer: Andreas Grapentin # Contributor: André Silva # Contributor: Márcio Silva # Contributor (ConnochaetOS): Henry Jensen # Contributor: Luke Shumaker # Contributor: fauno # Contributor: vando # Contributor: Figue # Contributor: taro-k # Contributor: Michał Masłowski # Contributor: Luke R. # Contributor: Isaac David # Contributor: bill-auger # Contributor: evr # Contributor: Muhammad 'MJ' Jassim # parabola changes and rationale: # - rebranded to iceweasel # - added to makedepends: mozilla-searchplugins, quilt, libxslt, imagemagick # - removed from makedepends: mercurial # - using tarball instead of repository # - added replaces and conflicts for firefox # - removed google api keys and usage _pkgname=firefox pkgname=iceweasel epoch=1 pkgver=58.0 pkgrel=3 _bver=58.0 _brel=1 pkgdesc="Libre standalone web browser based on Mozilla Firefox" arch=(x86_64 i686 armv7h) license=(MPL GPL LGPL) url="https://wiki.parabola.nu/$pkgname" depends=(gtk3 gtk2 mozilla-common libxt startup-notification mime-types dbus-glib ffmpeg nss hunspell sqlite ttf-font libpulse libvpx icu) depends_x86_64=("icu>=60" "icu<61") depends_i686=("icu>=60" "icu<61") depends_armv7h=("icu>=60" "icu<61") makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb autoconf2.13 rust clang llvm jack mozilla-searchplugins quilt libxslt imagemagick) optdepends=('networkmanager: Location detection via available WiFi networks' 'libnotify: Notification integration' 'pulseaudio: Audio support' 'speech-dispatcher: Text-to-Speech') options=(!emptydirs !makeflags !strip) replaces=("$_pkgname") conflicts=("$_pkgname") source=(https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz $pkgname.desktop $pkgname-install-dir.patch no-crmf.diff https://repo.parabola.nu/other/iceweasel/${pkgname}_$_bver-$_brel.branding.tar.xz{,.sig} libre.patch) sha256sums=('0e0a39caabf94d7467d8bb4008fa9e7340a7be57b8c78ccf0cf98791a3bfaaff' 'ed350ef2f528b999a621f7080fa80948be6b351e67ce32529fb32bcf47bb21fa' '46e588300797bda599c8f5157437fd79f88b6e1179f2fde49e0405e435e03efa' 'fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb' '482cfe2d92f0b9638061eaf1b457abe0a8c8a0521bd67767e5c5010868612d25' 'SKIP' '12170e0539997396f83c511317377cf4cc5af74177c6c1db14275ebf0b932bb9') validpgpkeys=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin prepare() { mkdir path ln -s /usr/bin/python2 path/python cd "$srcdir/$_pkgname-$pkgver" patch -Np1 -i ../$pkgname-install-dir.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1371991 patch -Np1 -i ../no-crmf.diff cat >.mozconfig <> .mozconfig << END ac_add_options --disable-webrtc ac_add_options --disable-elf-hack ac_add_options --disable-stylo ac_add_options --enable-optimize="-g -O2 -fno-schedule-insns" END # syscall numbers are slightly broken on our arm glibc/linux-libre-api-headers constellation # see: https://labs.parabola.nu/issues/1626 #sed -i 's/mmap2/mmap/' memory/build/mozjemalloc.cpp fi # perform rebranding local brandingdir="$srcdir/$pkgname-$_bver" mkdir -v browser/branding/$pkgname cp -va $brandingdir/branding/* browser/branding/$pkgname export QUILT_PATCHES=$brandingdir/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' quilt push -av # Put "Start Page" branding images in the source code install -m644 "$brandingdir/branding/"{drm-free,gnu_headshadow,parabola-banner}.png \ browser/base/content/abouthome install -m644 "$brandingdir/branding/watermark.svg" \ browser/extensions/onboarding/content/img # Patch and remove anything that's left patch -Np1 -i "$srcdir/libre.patch" sed -i 's|Adobe Flash|SWF Player|g; ' browser/base/content/pageinfo/permissions.js \ browser/base/content/browser-plugins.js sed -i '\|["]displayName["][:] ["]Flash["]| s|Flash|SWF Player| \|["]displayName["][:] ["]Shockwave["]| s|Shockwave|DCR Player| \|["]displayName["][:] ["]QuickTime["]| s|QuickTime|MOV Player| \|installLinux| s|true|false| ' browser/base/content/browser-plugins.js # replace newtab page with abouthome cat browser/base/content/abouthome/aboutHome.xhtml > browser/base/content/newtab/newTab.xhtml # Load our searchplugins rm -rv browser/locales/searchplugins cp -av /usr/lib/mozilla/searchplugins browser/locales # Disable various components at the source level sed -i 's|[;]1|;0|' toolkit/components/telemetry/TelemetryStartup.manifest || die "failed break telemetry startup" sed -i 's|[;]1|;0|' browser/experiments/Experiments.manifest || die "failed to break ExperimentsService" sed -i '/pocket/d' browser/extensions/moz.build || die "failed to wipe pocket" sed -i '/activity-stream/d' browser/extensions/moz.build || die "failed to wipe activity-stream" } build() { cd "$srcdir/$_pkgname-$pkgver" # _FORTIFY_SOURCE causes configure failures CPPFLAGS+=" -O2" export PATH="$srcdir/path:$PATH" # Do PGO #xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \ # MOZ_PGO=1 ./mach build ./mach build ./mach buildsymbols } package() { cd "$srcdir/$_pkgname-$pkgver" DESTDIR="$pkgdir" ./mach install find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} + local _shortver=$(echo $pkgver | cut -d'.' -f1,2) _vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" install -Dm644 /dev/stdin "$_vendorjs" <