From 9bf76adcf6a06cdb3852a1f591fdbd9c34a50dcb Mon Sep 17 00:00:00 2001 From: Andreas Grapentin Date: Mon, 9 Jul 2018 16:07:39 +0200 Subject: libre-testing/iceweasel: added temporary iceweasel-60 build --- libre-testing/iceweasel/PKGBUILD | 562 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 562 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..8c76042d9 --- /dev/null +++ b/libre-testing/iceweasel/PKGBUILD @@ -0,0 +1,562 @@ +# $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 +# - removed google api keys and usage +# - removed use of firefox-symbolic.svg +# - added makedepends: mozilla-searchplugins, quilt, libxslt, imagemagick +# - added replaces, conflicts: firefox + +_pkgname=firefox +pkgname=iceweasel +epoch=1 +pkgver=60.0 +pkgrel=0.testing1 +_bver=60.0 +_brel=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 hunspell sqlite ttf-font libpulse libvpx icu) +depends+=('icu>=61' 'icu<62') +makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb + autoconf2.13 rust mercurial clang llvm jack gtk2) +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') +options=(!emptydirs !makeflags !strip) +replaces=("$_pkgname") +conflicts=("$_pkgname") +source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz + complete-csd-window-offset-mozilla-1457691.patch.xz + 0001-Bug-1435212-Add-support-for-FFmpeg-4.0.-r-bryce.patch.xz + $pkgname.desktop + no-crmf.diff) +source+=(https://repo.parabola.nu/other/iceweasel/${pkgname}_$_bver-$_brel.branding.tar.xz{,.sig} + libre.patch) +sha256sums=('4bc4fd997e6239f53e16a70b04f197791e5c5d09367e2916bcfe4a427999f842' + 'a3fb3c3b6fb775c99afdbad507848b77c5e4bbaac2e8ceeb1bfb47699c4b6268' + '8422030440032535d918844263fbd92d39bff207acb5fff55ed0afee38bcf582' + 'ed350ef2f528b999a621f7080fa80948be6b351e67ce32529fb32bcf47bb21fa' + '02000d185e647aa20ca336e595b4004bb29cdae9d8f317f90078bdcc7a36e873' + '2d02606d8010ea4fb6a29662d9440d6a4baecae6494ded06cac9174f02428955' + 'SKIP' + 'b454a871490891187f07720521234b17e4117c35e2abd556dd3be9fb8193806a') +validpgpkeys=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin + +prepare() { + mkdir path + ln -s /usr/bin/python2 path/python + + cd firefox-$pkgver + + # https://bugzilla.mozilla.org/show_bug.cgi?id=1283299#c158 + patch -Np1 -i ../complete-csd-window-offset-mozilla-1457691.patch + + # https://bugzilla.mozilla.org/show_bug.cgi?id=1435212 + patch -Np1 -i ../0001-Bug-1435212-Add-support-for-FFmpeg-4.0.-r-bryce.patch + + # https://bugzilla.mozilla.org/show_bug.cgi?id=1371991 + patch -Np1 -i ../no-crmf.diff + + cat >.mozconfig <> .mozconfig << END +mk_add_options MOZ_MAKE_FLAGS="-j1" +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 + 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 + + # produce icons + for i in 128; do + rsvg-convert -w $i -h $i "$srcdir/$pkgname-$_bver/branding/${pkgname}_icon.svg" \ + -o "browser/branding/iceweasel/default$i.png" + done + + # 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 firefox-$pkgver + + # _FORTIFY_SOURCE causes configure failures + CPPFLAGS+=" -O2" + + export PATH="$srcdir/path:$PATH" + export MOZ_SOURCE_REPO="$_repo" + + # Do PGO + #xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \ + # MOZ_PGO=1 ./mach build + ./mach build + ./mach buildsymbols +} + +package() { + cd firefox-$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" <