diff options
Diffstat (limited to 'libre/iceweasel/PKGBUILD')
-rw-r--r-- | libre/iceweasel/PKGBUILD | 208 |
1 files changed, 101 insertions, 107 deletions
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index 99e91acda..5ad29d5bf 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -1,11 +1,13 @@ -# Maintainer (Arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> -# Contributor (Arch): Ionut Biru <ibiru@archlinux.org> -# Contributor (Arch): Jakub Schmidtke <sjakub@gmail.com> +# Maintainer (Arch:firefox): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> +# Contributor (Arch:firefox): Ionut Biru <ibiru@archlinux.org> +# Contributor (Arch:firefox): Jakub Schmidtke <sjakub@gmail.com> + +# Contributor (ConnochaetOS): Henry Jensen <hjensen@connochaetos.org> + # Maintainer: Andreas Grapentin <andreas@grapentin.org> +# Maintainer: Luke Shumaker <lukeshu@parabola.nu> # Contributor: André Silva <emulatorman@hyperbola.info> # Contributor: Márcio Silva <coadde@hyperbola.info> -# Contributor (ConnochaetOS): Henry Jensen <hjensen@connochaetos.org> -# Contributor: Luke Shumaker <lukeshu@parabola.nu> # Contributor: fauno <fauno@kiwwwi.com.ar> # Contributor: vando <facundo@esdebian.org> # Contributor: Figue <ffigue at gmail> @@ -17,20 +19,30 @@ # Contributor: evr <evanroman at gmail> # Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com> -# 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 +# 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=firefox pkgname=iceweasel +replaces=('firefox') epoch=1 pkgver=61.0.2 -pkgrel=0.testing1 -_bver=61.0 -_brel=1 +pkgrel=1 +pkgrel+=.parabola1 pkgdesc="Libre standalone web browser based on Mozilla Firefox" arch=(x86_64) arch+=(i686 armv7h) @@ -38,37 +50,34 @@ license=(MPL GPL LGPL) url="https://wiki.parabola.nu/$pkgname" depends=(gtk3 mozilla-common libxt startup-notification mime-types dbus-glib ffmpeg nss hunspell-en_US sqlite ttf-font libpulse libvpx icu) -depends+=('icu>=62' 'icu<63') makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb autoconf2.13 rust mercurial clang llvm jack gtk2 python) -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") -# https://archive.mozilla.org/pub/firefox/releases/$pkgver/SOURCE -source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz +_repo=https://hg.mozilla.org/mozilla-unified +source=("hg+$_repo#tag=FIREFOX_${pkgver//./_}_RELEASE" $pkgname.desktop) -source+=(https://repo.parabola.nu/other/iceweasel/${pkgname}_$_bver-$_brel.branding.tar.xz{,.sig} - libre.patch) -sha256sums=('0bdecbbb2a955c9f4c5cd0b33acd1e47afcb6cd57ac89cf11257668e3cef202c' +sha256sums=('SKIP' 'ed350ef2f528b999a621f7080fa80948be6b351e67ce32529fb32bcf47bb21fa' 'dabd5a0b8023e8ca13f6ae5fcb9e6c29531fc952bc781b4aa25c8a598187768e' 'SKIP' - 'f2f3484a5339c7208a2a44b63a185ec5a57f837040627d29cc45b4d1d14ef6c2') -validpgpkeys=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin - -prepare() { - mkdir path - ln -s /usr/bin/python2 path/python + 'f2ebd5054b81a0f0f642b523a545145bdd5939e70b79c8129415cd1646cc6d74' + 'b695926b8a1f9560f0e11e0bad2ef42df6152d4f16f95af1027bc12c487c1ede') - cd firefox-$pkgver +# Branding +_brandingver=$(cut -d. -f1,2<<<"$pkgver") +_brandingrel=1 +makedepends+=(mozilla-searchplugins quilt libxslt imagemagick) +source+=(https://repo.parabola.nu/other/iceweasel/${pkgname}_${_brandingver}-${_brandingrel}.branding.tar.xz{,.sig} + 0001-branding-Fix-for-v60-v61.patch + libre.patch) +validpgpkeys+=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin - # https://bugzilla.mozilla.org/show_bug.cgi?id=1371991 - patch -Np1 -i ../no-crmf.diff +prepare() { + cd mozilla-unified cat >.mozconfig <<END ac_add_options --enable-application=browser @@ -94,7 +103,6 @@ ac_add_options --with-system-jpeg ac_add_options --with-system-libvpx ac_add_options --with-system-nspr ac_add_options --with-system-nss -ac_add_options --enable-system-hunspell ac_add_options --enable-system-sqlite ac_add_options --enable-system-ffi @@ -104,97 +112,82 @@ ac_add_options --enable-jack ac_add_options --enable-startup-notification ac_add_options --disable-crashreporter ac_add_options --disable-updater -ac_add_options --disable-stylo ac_add_options --disable-eme END - if [[ "$CARCH" == arm* ]]; then - sed -i \ - -e '/enable-gold/s/^/#/' \ - -e '/enable-pie/s/^/#/' \ - -e '/enable-optimize/d' \ - .mozconfig - - cat >> .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 - + if [[ $CARCH = arm* ]]; then + sed -i '/--enable-linker=gold/d' .mozconfig + cat >> .mozconfig <<- END + ac_add_options --enable-optimize="-g -O2 -fno-schedule-insns" + END + fi # end [[ $CARCH = arm* ]] + + ## Rebranding + local brandingdir="$srcdir/$pkgname-$_brandingver" + pushd "$brandingdir" + patch -Np1 -i "$srcdir/0001-branding-Fix-for-v60-v61.patch" + popd + # file dump + rm -rf -- browser/branding/$pkgname + cp -aT -- $brandingdir/branding browser/branding/$pkgname + # patching + rm -rf .pc 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 - + 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 128; do - rsvg-convert -w $i -h $i "$srcdir/$pkgname-$_bver/branding/${pkgname}_icon.svg" \ + 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 - # Patch and remove anything that's left + # 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 -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 - + 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 -rv browser/locales/searchplugins - cp -av /usr/lib/mozilla/searchplugins browser/locales - + 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 || 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" + 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 firefox-$pkgver - - # _FORTIFY_SOURCE causes configure failures -# CPPFLAGS+=" -O2" + cd mozilla-unified - 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 + 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" {} + - local _shortver=$(echo $pkgver | cut -d'.' -f1,2) _vendorjs="$pkgdir/usr/lib/$pkgname/browser/defaults/preferences/vendor.js" install -Dm644 /dev/stdin "$_vendorjs" <<END // Use LANG environment variable to choose locale @@ -209,10 +202,19 @@ pref("browser.shell.checkDefaultBrowser", false); // Don't disable our bundled extensions in the application directory pref("extensions.autoDisableScopes", 11); pref("extensions.shownSelectionUI", true); +END -// Opt all of us into e10s, instead of just 50% -pref("browser.tabs.remote.autostart", true); - + # Parabola additions to vendor.js + # + # TODO: Go through this and figure out what's nescessary, remove + # most of it. This is mostly cargo-cult BS. For example, disabling + # all the EME stuff... that's already off because of `--disable-eme` + # in `.mozconfig`. Some of these settings no longer exist. Some of + # these settings don't do anything on GNU/Linux. + # + # However, they don't seem to be causing any of the critical issues. + local _shortver=$(cut -d. -f1,2 <<<"$pkver") + cat >> "$_vendorjs" <<END // Disable "alt" as a shortcut key to open full menu bar. Conflicts with "alt" as a modifier pref("ui.key.menuAccessKeyFocuses", false); @@ -516,7 +518,7 @@ END [Global] id=parabola version=1.0 -about=Iceweasel for Parabola GNU/Linux-libre +about=Parabola Iceweasel for Parabola GNU/Linux-libre [Preferences] app.distributor=parabola @@ -525,23 +527,15 @@ app.partner.parabola=parabola END for i in 16 22 24 32 48 64 128 192 256 384; do - rsvg-convert -w $i -h $i "$srcdir/$pkgname-$_bver/branding/${pkgname}_icon.svg" \ - -o "browser/branding/iceweasel/default$i.png" - install -Dm644 "browser/branding/iceweasel/default$i.png" \ + install -Dm644 browser/branding/$pkgname/default$i.png \ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png" done - - install -Dm644 "$srcdir/$pkgname-$_bver/branding/${pkgname}_icon.svg" \ + install -Dm644 "browser/branding/$pkgname/${pkgname}_icon.svg" \ "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg" install -Dm644 ../$pkgname.desktop \ "$pkgdir/usr/share/applications/$pkgname.desktop" - # Use system-provided dictionaries - rm -r "$pkgdir/usr/lib/$pkgname/dictionaries" - ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries" - ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation" - # Install a wrapper to avoid confusion about binary path install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <<END #!/bin/sh |