summaryrefslogtreecommitdiff
path: root/libre/iceweasel/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'libre/iceweasel/PKGBUILD')
-rw-r--r--libre/iceweasel/PKGBUILD122
1 files changed, 73 insertions, 49 deletions
diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD
index 635568990..970be1538 100644
--- a/libre/iceweasel/PKGBUILD
+++ b/libre/iceweasel/PKGBUILD
@@ -36,49 +36,53 @@
# 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=61.0.2
+pkgver=65.0.1
pkgrel=1
-pkgrel+=.parabola4
+pkgrel+=.parabola1
+_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 hunspell-en_US sqlite ttf-font libpulse libvpx icu)
-makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb
- autoconf2.13 rust mercurial clang llvm jack gtk2 python)
+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')
-options=(!emptydirs !makeflags !strip)
+ '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-searchengines.patch
+ libre.patch)
sha256sums=('SKIP'
'ed350ef2f528b999a621f7080fa80948be6b351e67ce32529fb32bcf47bb21fa'
- 'dabd5a0b8023e8ca13f6ae5fcb9e6c29531fc952bc781b4aa25c8a598187768e'
+ '4e4d52addfb0de4b4439e959e5c35194e35a6840a21dcf6b20c46604ae7f6482'
'SKIP'
- 'f2ebd5054b81a0f0f642b523a545145bdd5939e70b79c8129415cd1646cc6d74'
- '070f9e1a8513ab66903f2f19d6fa9d13c9a2d975921a21821a6e76cd8fec53c6'
- 'b695926b8a1f9560f0e11e0bad2ef42df6152d4f16f95af1027bc12c487c1ede')
-
-# 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
- 0002-Fix-triplet-two-parts.patch
- libre.patch)
+ '871222c88dfd240b1805b28c98ca7431bd2b87be1ff4dbb06caa6407b106b803'
+ '4a4667d99ab50b1990de6833e9647ddd428d9206e422c7cc3754d4f80aeb8038')
validpgpkeys+=('BFA8008A8265677063B11BF47171986E4B745536') # Andreas Grapentin
prepare() {
+ mkdir mozbuild
cd mozilla-unified
cat >.mozconfig <<END
@@ -90,6 +94,13 @@ ac_add_options --enable-linker=gold
ac_add_options --enable-hardening
ac_add_options --enable-optimize
ac_add_options --enable-rust-simd
+ac_add_options --enable-lto
+export MOZ_PGO=1
+export CC=clang
+export CXX=clang++
+export AR=llvm-ar
+export NM=llvm-nm
+export RANLIB=llvm-ranlib
# Branding
ac_add_options --disable-official-branding
@@ -98,21 +109,22 @@ ac_add_options --enable-update-channel=release
ac_add_options --with-distribution-id=nu.parabola
# System libraries
-ac_add_options --with-system-zlib
+ac_add_options --enable-system-ffi
+ac_add_options --enable-system-sqlite
ac_add_options --with-system-bz2
ac_add_options --with-system-icu
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-sqlite
-ac_add_options --enable-system-ffi
+ac_add_options --with-system-zlib
# Features
ac_add_options --enable-alsa
ac_add_options --enable-jack
ac_add_options --enable-startup-notification
ac_add_options --disable-crashreporter
+ac_add_options --disable-gconf
ac_add_options --disable-updater
ac_add_options --disable-eme
END
@@ -124,27 +136,24 @@ END
END
fi # end [[ $CARCH = arm* ]]
- patch -Np1 -i "$srcdir/0002-Fix-triplet-two-parts.patch"
+ if [[ $CARCH = i686 ]]; then
+ sed -i '/--enable-linker=gold/d' .mozconfig
+ fi # Because gold linker is alergic to some of the compile options set below to limit memory use.
## 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 -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"
+ #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" \
@@ -153,31 +162,46 @@ END
# 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
+
+ #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
+ #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
+ patch -Np1 -i "$srcdir/libre-searchengines.patch"
+ rm -rvf -- browser/components/search/searchplugins/{*.xml,images/}
+ cp -av -- /usr/lib/mozilla/searchplugins/* browser/components/search/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
+ #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"
+
+ if [[ $CARCH = i686 ]]; then
+ export RUSTFLAGS+=" -Cdebuginfo=0 -Clto=off"
+ export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
+ echo "Fixing x32 memory limits"
+ fi #Fix Memory issue
+
+ # LTO needs more open files
+ ulimit -n 4096
./mach build
./mach buildsymbols