From 26850b3e0ea8bd3cc471b51e36af14869144d0ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Fri, 12 Apr 2013 10:53:38 -0300 Subject: icecat-17.0.1-7: adapting PKGBUILD with new changes, updating mozconfig and mozconfig.pgo --- libre/icecat/PKGBUILD | 106 ++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 60 deletions(-) (limited to 'libre/icecat/PKGBUILD') 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 # Contributor: Muhammad 'MJ' Jassim -# 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 } -- cgit v1.2.3-2-g168b