extra/firefox to 52.0-1

This commit is contained in:
Kevin Mihelich 2017-03-06 22:45:00 +00:00
parent 30a1d880e9
commit 0dd92eafdd
5 changed files with 94 additions and 130 deletions

View file

@ -1,38 +0,0 @@
From: Mike Hommey <mh@glandium.org>
Date: Wed, 25 Jan 2017 15:31:46 +0900
Subject: Build Skia NEON code on arm64
---
gfx/skia/moz.build | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build
index b33f1cdbee54..475075dbeebc 100644
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -519,7 +519,7 @@ if CONFIG['INTEL_ARCHITECTURE']:
'skia/src/opts/SkOpts_sse41.cpp',
'skia/src/opts/SkOpts_ssse3.cpp',
]
-elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:
+elif CONFIG['CPU_ARCH'] in ('arm', 'aarch64') and CONFIG['GNU_CC']:
UNIFIED_SOURCES += [
'skia/src/core/SkUtilsArm.cpp',
'skia/src/opts/SkBitmapProcState_opts_arm.cpp',
@@ -528,7 +528,7 @@ elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:
SOURCES += [
'skia/src/opts/SkBlitRow_opts_arm.cpp',
]
- if CONFIG['BUILD_ARM_NEON']:
+ if CONFIG['CPU_ARCH'] == 'aarch64' or CONFIG['BUILD_ARM_NEON']:
SOURCES += [
'skia/src/opts/SkBitmapProcState_arm_neon.cpp',
'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
@@ -536,6 +536,7 @@ elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:
'skia/src/opts/SkBlitRow_opts_arm_neon.cpp',
'skia/src/opts/SkOpts_neon.cpp',
]
+ if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
SOURCES['skia/src/opts/SkBitmapProcState_arm_neon.cpp'].flags += CONFIG['NEON_FLAGS']
SOURCES['skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp'].flags += CONFIG['NEON_FLAGS']
SOURCES['skia/src/opts/SkBlitMask_opts_arm_neon.cpp'].flags += CONFIG['NEON_FLAGS']

View file

@ -1,5 +1,6 @@
# $Id$
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Jakub Schmidtke <sjakub@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
@ -7,11 +8,12 @@
# - patches to build on ARM
# - remove makedepend on cargo
buildarch=12
highmem=1
pkgname=firefox
pkgver=51.0.1
pkgrel=2
pkgver=52.0
pkgrel=1
pkgdesc="Standalone web browser from mozilla.org"
arch=(i686 x86_64)
license=(MPL GPL LGPL)
@ -22,30 +24,22 @@ makedepends=(unzip zip diffutils python2 yasm mesa imake gconf libpulse inetutil
autoconf2.13)
optdepends=('networkmanager: Location detection via available WiFi networks'
'libnotify: Notification integration'
'upower: Battery API')
'upower: Battery API'
'speech-dispatcher: Text-to-Speech')
options=(!emptydirs !makeflags)
source=(https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
mozconfig
firefox.desktop
firefox-install-dir.patch
rust-i686.patch
vendor.js
firefox-symbolic.svg
fix-wifi-scanner.diff
firefox.desktop firefox-symbolic.svg
firefox-install-dir.patch rust-i686.patch fix-wifi-scanner.diff
mozilla-1253216.patch
mozilla-build-arm.patch
Build-Skia-NEON-code-on-arm64.patch)
sha256sums=('30ba00ba716ea1eeda526e2ccc8642f8d18a836793fde50e87a4fcb9d9fccca9'
'640e529734e4e021b99f2e28205d62b915b0884e487bca1b7d81a7d3164676ab'
'75c526e9669b91b4fe5dcea650a1e8419220abb2e9564184f0d984c71eae82e8'
mozilla-build-arm.patch)
sha256sums=('494ec86875ea60043658e402b664ccd5af4709acc3a478de8729f7cbac9ea3c1'
'ada313750e6fb14558b37c764409a17c1672a351a46c73b350aa1fe4ea9220ef'
'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9'
'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd'
'f61ea706ce6905f568b9bdafd1b044b58f20737426f0aa5019ddb9b64031a269'
'93c5df00f409988bbfa890ac175103476ead3af68f7501973ee70bd11dc472f8'
'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9'
'9765bca5d63fb5525bbd0520b7ab1d27cabaed697e2fc7791400abc3fa4f13b8'
'fbb6011501a74a8ea6d01c041870fcefb7ef2859c134aedc676e5f6452833f65'
'56eecee8162c138c442773d66483886f1242c8dd2b16eed5711ae5e63d9b0e3a'
'0a786851c15fbef2afeedca56e13690145730d1d9cc2f010fc98e38348b069ed')
'56eecee8162c138c442773d66483886f1242c8dd2b16eed5711ae5e63d9b0e3a')
validpgpkeys=('2B90598A745E992F315E22C58AB132963A06537A')
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
@ -63,9 +57,10 @@ _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
prepare() {
cd $pkgname-$pkgver
mkdir path
ln -s /usr/bin/python2 path/python
cp ../mozconfig .mozconfig
cd $pkgname-$pkgver
patch -Np1 -i ../firefox-install-dir.patch
# https://bugzilla.mozilla.org/show_bug.cgi?id=1314968
@ -75,20 +70,55 @@ prepare() {
patch -Np1 -i ../rust-i686.patch
echo -n "$_google_api_key" >google-api-key
echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-api-key\"" >>.mozconfig
echo -n "$_mozilla_api_key" >mozilla-api-key
echo "ac_add_options --with-mozilla-api-keyfile=\"$PWD/mozilla-api-key\"" >>.mozconfig
mkdir "$srcdir/path"
ln -s /usr/bin/python2 "$srcdir/path/python"
cat >.mozconfig <<END
ac_add_options --enable-application=browser
ac_add_options --prefix=/usr
ac_add_options --enable-release
ac_add_options --enable-gold
ac_add_options --enable-pie
# Branding
ac_add_options --enable-official-branding
ac_add_options --enable-update-channel=release
export MOZ_ADDON_SIGNING=1
export MOZ_REQUIRE_SIGNING=1
# Keys
ac_add_options --with-google-api-keyfile=${PWD@Q}/google-api-key
ac_add_options --with-mozilla-api-keyfile=${PWD@Q}/mozilla-api-key
# ALARM
ac_add_options --disable-webrtc
# System libraries
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman
# Features
ac_add_options --enable-startup-notification
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
STRIP_FLAGS="--strip-debug"
END
[[ $CARCH != "aarch64" ]] && echo "ac_add_options --disable-ion" >> .mozconfig \
&& echo "ac_add_options --disable-elf-hack" >> .mozconfig
LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
patch -p1 -i ../mozilla-1253216.patch
patch -p1 -i ../mozilla-build-arm.patch
patch -p1 -i ../Build-Skia-NEON-code-on-arm64.patch
}
build() {
@ -106,7 +136,7 @@ build() {
export PATH="$srcdir/path:$PATH"
# Do PGO
#xvfb-run -a -s "-extension GLX -screen 0 1280x1024x24" \
#xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \
# make -f client.mk build MOZ_PGO=1
make -f client.mk build
}
@ -115,11 +145,25 @@ package() {
cd $pkgname-$pkgver
make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install
install -Dm644 ../vendor.js "$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js"
_vendorjs="$pkgdir/usr/lib/firefox/browser/defaults/preferences/vendor.js"
install -Dm644 /dev/stdin "$_vendorjs" <<END
// Use LANG environment variable to choose locale
pref("intl.locale.matchOS", true);
// Disable default browser checking.
pref("browser.shell.checkDefaultBrowser", false);
// Don't disable our bundled extensions in the application directory
pref("extensions.autoDisableScopes", 11);
pref("extensions.shownSelectionUI", true);
// Opt all of us into e10s, instead of just 50%
pref("browser.tabs.remote.autostart", true);
END
for i in 16 22 24 32 48 256; do
install -Dm644 browser/branding/official/default$i.png \
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png"
install -Dm644 browser/branding/official/default$i.png \
"$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png"
done
install -Dm644 browser/branding/official/content/icon64.png \
"$pkgdir/usr/share/icons/hicolor/64x64/apps/firefox.png"
@ -136,11 +180,18 @@ package() {
"$pkgdir/usr/share/applications/firefox.desktop"
# Use system-provided dictionaries
rm -rf "$pkgdir"/usr/lib/firefox/{dictionaries,hyphenation}
ln -s /usr/share/hunspell "$pkgdir/usr/lib/firefox/dictionaries"
ln -s /usr/share/hyphen "$pkgdir/usr/lib/firefox/hyphenation"
rm -r "$pkgdir"/usr/lib/firefox/dictionaries
ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/firefox/dictionaries"
ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/firefox/hyphenation"
# Replace duplicate binary with symlink
# Install a wrapper to avoid confusion about binary path
install -Dm755 /dev/stdin "$pkgdir/usr/bin/firefox" <<END
#!/bin/sh
exec /usr/lib/firefox/firefox "\$@"
END
# Replace duplicate binary with wrapper
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
ln -sf firefox "$pkgdir/usr/lib/firefox/firefox-bin"
ln -srf "$pkgdir/usr/bin/firefox" \
"$pkgdir/usr/lib/firefox/firefox-bin"
}

View file

@ -2,7 +2,7 @@
Version=1.0
Name=Firefox
GenericName=Web Browser
GenericName[ar]=متصفح ويب
GenericName[ar]=متصفح وِب
GenericName[ast]=Restolador Web
GenericName[bn]=
GenericName[ca]=Navegador web
@ -43,7 +43,7 @@ GenericName[vi]=Trình duyệt Web
GenericName[zh_CN]=
GenericName[zh_TW]=
Comment=Browse the Web
Comment[ar]=تصفح الشبكة العنكبوتية العالمية
Comment[ar]=تصفح الوِب
Comment[ast]=Restola pela Rede
Comment[bn]=
Comment[ca]=Navegueu per el web
@ -83,7 +83,7 @@ Comment[uk]=Перегляд сторінок Інтернету
Comment[vi]=Đ duyt các trang web
Comment[zh_CN]=
Comment[zh_TW]=
Exec=firefox %u
Exec=/usr/lib/firefox/firefox %u
Icon=firefox
Terminal=false
Type=Application
@ -199,7 +199,7 @@ Name[wo]=Palanteer bu bees
Name[xh]=Ifestile entsha
Name[zh_CN]=
Name[zh_TW]=
Exec=firefox --new-window %u
Exec=/usr/lib/firefox/firefox --new-window %u
[Desktop Action new-private-window]
Name=New Private Window
@ -307,4 +307,4 @@ Name[wo]=Panlanteeru biir bu bees
Name[xh]=Ifestile yangasese entsha
Name[zh_CN]=
Name[zh_TW]=
Exec=firefox --private-window %u
Exec=/usr/lib/firefox/firefox --private-window %u

View file

@ -1,37 +0,0 @@
ac_add_options --enable-application=browser
ac_add_options --prefix=/usr
ac_add_options --enable-release
ac_add_options --enable-pie
# Release branding
ac_add_options --enable-official-branding
ac_add_options --enable-update-channel=release
MOZ_ADDON_SIGNING=1
MOZ_REQUIRE_SIGNING=1
# ALARM
ac_add_options --disable-webrtc
# System libraries
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-icu
ac_add_options --with-system-jpeg
ac_add_options --with-system-zlib
ac_add_options --with-system-bz2
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman
# Features
ac_add_options --enable-startup-notification
ac_add_options --disable-updater
ac_add_options --disable-crashreporter
STRIP_FLAGS="--strip-debug"
# vim:set ft=sh:

View file

@ -1,12 +0,0 @@
// Use LANG environment variable to choose locale
pref("intl.locale.matchOS", true);
// Disable default browser checking.
pref("browser.shell.checkDefaultBrowser", false);
// Don't disable our bundled extensions in the application directory
pref("extensions.autoDisableScopes", 11);
pref("extensions.shownSelectionUI", true);
// Opt all of us into e10s, instead of just 50%
pref("browser.tabs.remote.autostart", true);