From 5b3a4d18cc3c98788757207870c6464f410c6ce0 Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Fri, 1 Feb 2019 23:52:41 +0100 Subject: libre-testing/iceweasel: added 65.0 --- libre-testing/iceweasel/PKGBUILD | 561 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 561 insertions(+) create mode 100644 libre-testing/iceweasel/PKGBUILD (limited to 'libre-testing/iceweasel/PKGBUILD') diff --git a/libre-testing/iceweasel/PKGBUILD b/libre-testing/iceweasel/PKGBUILD new file mode 100644 index 000000000..b9e625f9e --- /dev/null +++ b/libre-testing/iceweasel/PKGBUILD @@ -0,0 +1,561 @@ +# Maintainer (Arch:firefox): Jan Alexander Steffens (heftig) +# Contributor (Arch:firefox): Ionut Biru +# Contributor (Arch:firefox): Jakub Schmidtke + +# Contributor (ConnochaetOS): Henry Jensen + +# Maintainer: Andreas Grapentin +# Maintainer: Luke Shumaker +# Contributor: André Silva +# Contributor: Márcio Silva +# 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 + +# 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/ +# +# IMPORTANT NOTICE: +# libremakepkg *will* choke on this package, unless sufficient space is +# provided in /tmp. +# +# currently, at least 4.2MiB are required. +pkgname=iceweasel +replaces=('firefox') +epoch=1 +pkgver=65.0 +pkgrel=1 +pkgrel+=.parabola1.testing1 +_brandingver=$pkgver +_brandingrel=1 +pkgdesc="Libre 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 mozilla-common libxt startup-notification mime-types dbus-glib + ffmpeg nss ttf-font libpulse sqlite libvpx icu) +makedepends=(unzip zip diffutils python2-setuptools yasm mesa imake inetutils + xorg-server-xvfb autoconf2.13 rust mercurial clang llvm jack gtk2 + python nodejs python2-psutil cbindgen nasm) +makedepends+=(mozilla-searchplugins 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 !debug) +_repo=https://hg.mozilla.org/mozilla-unified +source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE" + $pkgname.desktop) +source+=(https://repo.parabola.nu/other/iceweasel/${pkgname}_${_brandingver}-${_brandingrel}.branding.tar.xz{,.sig} + libre.patch) +sha256sums=('SKIP' + 'ed350ef2f528b999a621f7080fa80948be6b351e67ce32529fb32bcf47bb21fa' + '4e4d52addfb0de4b4439e959e5c35194e35a6840a21dcf6b20c46604ae7f6482' + 'SKIP' + '440718182d7e97f1da76b624a416a662ed14e33c9591da5f9b51d6c698ceeccd') +validpgpkeys+=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin + +prepare() { + mkdir mozbuild + cd mozilla-unified + + cat >.mozconfig <> .mozconfig <<- END + ac_add_options --enable-optimize="-g -O2 -fno-schedule-insns" + END + fi # end [[ $CARCH = arm* ]] + + ## Rebranding + local brandingdir="$srcdir/$pkgname-$_brandingver" + rm -rf -- browser/branding/$pkgname + cp -aT -- $brandingdir/branding browser/branding/$pkgname + # patching + 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 -t browser/base/content/abouthome -- \ + # "$brandingdir/branding"/{drm-free,gnu_headshadow,parabola-banner}.png + #install -m644 -t browser/extensions/onboarding/content/img -- \ + # "$brandingdir/branding/watermark.svg" + # produce icons + for i in 16 22 24 32 48 64 128 192 256 384; do + rsvg-convert -w $i -h $i "$brandingdir/branding/${pkgname}_icon.svg" \ + -o "browser/branding/iceweasel/default$i.png" + done + + # Remove remaining non-free bits + 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 -e '/"displayName": "Flash"/ s/Flash/SWF Player/' \ + # -e '/"displayName": "Shockwave"/ s/Shockwave/DCR Player/' \ + # -e '/"displayName": "QuickTime"/ s/QuickTime/MOV Player/' \ + # -e '/installLinux/ s/true/false/' \ + # -i -- browser/base/content/browser-plugins.js + # re-use 'abouthome' page for 'newtab' page + #install -d browser/base/content/newtab + #cat browser/base/content/abouthome/aboutHome.xhtml > browser/base/content/newtab/newTab.xhtml + # Load our searchplugins + rm -rf -- browser/locales/searchplugins + cp -aT -- /usr/lib/mozilla/searchplugins browser/locales/searchplugins + # Disable various components at the source level + sed -i 's/;1/;0/' toolkit/components/telemetry/TelemetryStartup.manifest + #sed -i 's/;1/;0/' browser/experiments/Experiments.manifest + #sed -i '/pocket/d' browser/extensions/moz.build + #sed -i '/activity-stream/d' browser/extensions/moz.build +} + +build() { + cd mozilla-unified + + export MOZ_SOURCE_REPO="$_repo" + export MOZ_NOSPAM=1 + export MOZBUILD_STATE_PATH="$srcdir/mozbuild" + + # LTO needs more open files + ulimit -n 4096 + + ./mach build + ./mach buildsymbols +} + +package() { + local _icu_ver + _icu_ver=$(pacman -S --print-format='%v' icu) + depends+=("icu>=${_icu_ver}" "icu<$((${_icu_ver%%.*} + 1))") + + cd mozilla-unified + DESTDIR="$pkgdir" ./mach install + find . -name '*crashreporter-symbols-full.zip' -exec cp -fvt "$startdir" {} + + + _vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" + install -Dm644 /dev/stdin "$_vendorjs" <> "$_vendorjs" <