summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/icecat/PKGBUILD106
-rw-r--r--libre/icecat/mozconfig3
-rw-r--r--libre/icecat/mozconfig.pgo4
3 files changed, 47 insertions, 66 deletions
diff --git a/libre/icecat/PKGBUILD b/libre/icecat/PKGBUILD
index bf16eca0b..0b1ac61ea 100644
--- a/libre/icecat/PKGBUILD
+++ b/libre/icecat/PKGBUILD
@@ -10,51 +10,17 @@
# Contributor: evr <evanroman at gmail>
# Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com>
-# If you are updating this package, don't forget to update the version number in
-# the value for 'browser.dictionaries.download.url' in 'libre.patch'
+_pgo=true
-_pgo=false
pkgname=icecat
pkgver=17.0.1
pkgrel=7
pkgdesc='GNU IceCat, the standalone web browser based on Mozilla Firefox.'
arch=(i686 x86_64 mips64el)
license=(MPL GPL LGPL)
-depends=(
- alsa-lib
- dbus-glib
- desktop-file-utils
- gtk2
- hicolor-icon-theme
- hunspell
- libevent
- libnotify
- libvpx
- libxt
- mime-types
- mozilla-common
- mozilla-searchplugins
- 'nss>=3.13.3'
- sqlite3
- startup-notification
-)
-makedepends=(
- autoconf2.13
- diffutils
- imagemagick
- libidl2
- librsvg
- libxslt
- mesa
- pkg-config
- python2
- unzip
- wireless_tools
- zip
-)
-optdepends=(
- 'wireless_tools: Location detection via available WiFi networks'
-)
+depends=(alsa-lib dbus-glib desktop-file-utils gtk2 hicolor-icon-theme hunspell libevent libnotify libvpx libxt mime-types mozilla-common mozilla-searchplugins nss sqlite startup-notification)
+makedepends=(autoconf2.13 diffutils imagemagick libidl2 librsvg libxslt mesa pkg-config python2 unzip zip)
+optdepends=('networkmanager: Location detection via available WiFi networks')
if $_pgo; then
makedepends+=(xorg-server-xvfb)
options=(!ccache)
@@ -76,8 +42,8 @@ source=(
)
md5sums=(
c88a29aa92fc41a07e777a0e63ac5f7e
- 2a35cf0054d0459993e3c3bae3d9841d
- dfeb4ab2c96aae3356a4c347eee0b97b
+ 855f11c20d38133d107cc3c6f48162a8
+ 383e8e2a97a8b13fe56d153adb6878b6
3009b176cc5f9b1e416b1bf7c45b064b
1dec37a964098fb3bc46bc767a5c0587
b41f82994fa056ffa5f8e6d99570e27a
@@ -87,18 +53,7 @@ md5sums=(
#c8552d030494443218d88792f4dbbd0f
)
-build() {
- # WebRTC build tries to execute "python" and expects Python 2
- # Workaround taken from chromium PKGBUILD on Archlinux
- mkdir "$srcdir/python2-path"
- ln -s /usr/bin/python2 "$srcdir/python2-path/python"
- export PATH="$srcdir/python2-path:$PATH"
-
- export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/$pkgname"
- export PYTHON="/usr/bin/python2"
- export MOZ_MAKE_FLAGS="$MAKEFLAGS"
- unset MAKEFLAGS
-
+prepare() {
mv $pkgname-$pkgver $srcdir/gnuzilla-build
cd $srcdir/gnuzilla-build
@@ -107,6 +62,7 @@ build() {
if $_pgo; then
cat $srcdir/mozconfig.pgo >> .mozconfig
fi
+
patch -Np1 -i $srcdir/$pkgname-install-dir.patch # install to /usr/lib/$pkgname
patch -Np1 -i $srcdir/xulrunner-copy-stub.patch # small fix
patch -Np1 -i $srcdir/libre.patch # Remove Google+Mozilla stuff
@@ -116,10 +72,6 @@ build() {
sed -i 's/\(MOZ_PKG_FATAL_WARNINGS =\).*/\1 0/' \
browser/installer/Makefile.in
- # Fix PRE_RELEASE_SUFFIX
- sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
- browser/base/Makefile.in
-
# This is a bug, we should fix it
if [ $CARCH = mips64el ]; then
# Fix MIPS N32 support.
@@ -136,16 +88,50 @@ build() {
chmod +x build/unix/run-icecat.sh # fix bug for bad file permition
+ # Fix PRE_RELEASE_SUFFIX
+ sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
+ browser/base/Makefile.in
+
+ mkdir "$srcdir/path"
+
+ # WebRTC build tries to execute "python" and expects Python 2
+ ln -s /usr/bin/python2 "$srcdir/path/python"
+
+ # Use gold, as Mozilla can use some of its features, such as safe ICF
+ ln -s /usr/bin/ld.gold "$srcdir/path/ld"
+
# configure script misdetects the preprocessor without an optimization level
# https://bugs.archlinux.org/task/34644
sed -i '/ac_cpp=/s/$CPPFLAGS/& -O2/' configure
+}
+
+build() {
+ cd $srcdir/gnuzilla-build
+
+ export PATH="$srcdir/path:$PATH"
+ export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/$pkgname"
+ export PYTHON="/usr/bin/python2"
+ export MOZ_MAKE_FLAGS="$MAKEFLAGS"
+ unset MAKEFLAGS
if $_pgo; then
- LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 :99 &
- LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS=$MAKEFLAGS
- kill $! || true
+ # Enable PGO for x86_64 and mips64el only. i686 currently has problems:
+ # Either segfaults since gcc 4.8, or the linker runs out of memory
+ # If you discover that PGO again works on i686, please file a bug
+ if [[ $CARCH != i686 ]]; then
+ export DISPLAY=:99
+ Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 $DISPLAY &
+ _fail=0
+
+ make -f client.mk build MOZ_PGO=1 || _fail=1
+
+ kill $! || true
+ return $_fail
+ else
+ make -f client.mk build
+ fi
else
- LD_PRELOAD="" make -j1 -f client.mk build MOZ_MAKE_FLAGS=$MAKEFLAGS
+ make -f client.mk build
fi
}
diff --git a/libre/icecat/mozconfig b/libre/icecat/mozconfig
index 7b27e3c6a..75b61828a 100644
--- a/libre/icecat/mozconfig
+++ b/libre/icecat/mozconfig
@@ -4,9 +4,6 @@ ac_add_options --prefix=/usr
ac_add_options --libdir=/usr/lib
# IceCat
-export MOZ_PHOENIX=1
-mk_add_options MOZ_PHOENIX=1
-
ac_add_options --disable-official-branding
ac_add_options --with-branding=browser/branding/unofficial
ac_add_options --with-distribution-id=org.gnu.gnuzilla
diff --git a/libre/icecat/mozconfig.pgo b/libre/icecat/mozconfig.pgo
index 30464c38c..2f4ebe32b 100644
--- a/libre/icecat/mozconfig.pgo
+++ b/libre/icecat/mozconfig.pgo
@@ -1,5 +1,3 @@
# PGO
-ac_add_options --enable-profile-guided-optimization
-mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
-mk_add_options PYTHONPATH='$(OBJDIR)/_profile/pgo'
+mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py 10'