blob: 972e9df331dacadcab33041b6d36461d3dda7975 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
# Maintainer: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Jakub Schmidtke <sjakub@gmail.com>
pkgname=firefox-wayland-git
_pkgname=firefox
pkgver=57.1.1.r14042.g4d4f4966936a
pkgrel=2
pkgdesc="Standalone web browser from mozilla.org"
arch=(i686 x86_64)
license=(MPL GPL LGPL)
url="https://www.mozilla.org/firefox/"
depends=(gtk3 gtk2 mozilla-common libxt startup-notification mime-types dbus-glib ffmpeg
nss-hg hunspell sqlite ttf-font libpulse icu)
makedepends=(unzip zip diffutils python2 yasm mesa imake gconf inetutils xorg-server-xvfb
autoconf2.13 cargo mercurial git llvm clang)
optdepends=('networkmanager: Location detection via available WiFi networks'
'libnotify: Notification integration'
'pulseaudio: Audio support'
'speech-dispatcher: Text-to-Speech')
options=(!emptydirs !makeflags !strip)
_repo=https://hg.mozilla.org/mozilla-unified
conflicts=('firefox')
provides=('firefox')
source=('git+https://github.com/stransky/gecko-dev.git'
firefox.desktop firefox-symbolic.svg
firefox-install-dir.patch no-crmf.diff fix-wifi-scanner.diff)
sha256sums=('SKIP'
'ada313750e6fb14558b37c764409a17c1672a351a46c73b350aa1fe4ea9220ef'
'a2474b32b9b2d7e0fb53a4c89715507ad1c194bef77713d798fa39d507def9e9'
'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd'
'fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb'
'9765bca5d63fb5525bbd0520b7ab1d27cabaed697e2fc7791400abc3fa4f13b8')
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact foutrelis@archlinux.org for
# more information.
_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
# Mozilla API keys (see https://location.services.mozilla.com/api)
# Note: These are for Arch Linux use ONLY. For your own distribution, please
# get your own set of keys. Feel free to contact heftig@archlinux.org for
# more information.
_mozilla_api_key=16674381-f021-49de-8622-3021c5942aff
pkgver() {
cd "gecko-dev"
git describe --always --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/firefox\.wayland\.//g'
}
prepare() {
mkdir -p path
ln -sf /usr/bin/python2 path/python
cd "gecko-dev"
patch -Np1 -i ../firefox-install-dir.patch
# https://bugzilla.mozilla.org/show_bug.cgi?id=1371991
patch -Np1 -i ../no-crmf.diff
# https://bugzilla.mozilla.org/show_bug.cgi?id=1314968
#patch -Np1 -i ../fix-wifi-scanner.diff
echo -n "$_google_api_key" >google-api-key
echo -n "$_mozilla_api_key" >mozilla-api-key
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
ac_add_options --enable-optimize="-O2"
# Branding
ac_add_options --enable-official-branding
ac_add_options --enable-update-channel=release
ac_add_options --with-distribution-id=org.archlinux
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
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
# 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-zlib
ac_add_options --with-system-bz2
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 --enable-crashreporter
ac_add_options --disable-updater
ac_add_options --enable-default-toolkit=cairo-gtk3-wayland
# fix bug https://bugzilla.mozilla.org/show_bug.cgi?id=1341234
ac_add_options BINDGEN_CFLAGS="$(pkg-config nspr pixman-1 --cflags)"
END
}
build() {
cd "gecko-dev"
# _FORTIFY_SOURCE causes configure failures
CPPFLAGS+=" -O2"
export PATH="$srcdir/path:$PATH"
export MOZ_SOURCE_REPO="$_repo"
export MOZ_SOURCE_CHANGESET=c89cd5371520
# Do PGO
#xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \
# MOZ_PGO=1 ./mach build
./mach build
./mach buildsymbols
}
package() {
cd "gecko-dev"
DESTDIR="$pkgdir" ./mach install
find . -name '*crashreporter-symbols.zip' -exec cp -fvt "$startdir" {} +
_vendorjs="$pkgdir/usr/lib/$_pkgname/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
_distini="$pkgdir/usr/lib/$_pkgname/distribution/distribution.ini"
install -Dm644 /dev/stdin "$_distini" <<END
[Global]
id=archlinux
version=1.0
about=Mozilla Firefox for Arch Linux
[Preferences]
app.distributor=archlinux
app.distributor.channel=$_pkgname
app.partner.archlinux=archlinux
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/$_pkgname.png"
done
install -Dm644 browser/branding/official/content/icon64.png \
"$pkgdir/usr/share/icons/hicolor/64x64/apps/$_pkgname.png"
install -Dm644 browser/branding/official/mozicon128.png \
"$pkgdir/usr/share/icons/hicolor/128x128/apps/$_pkgname.png"
install -Dm644 browser/branding/official/content/about-logo.png \
"$pkgdir/usr/share/icons/hicolor/192x192/apps/$_pkgname.png"
install -Dm644 browser/branding/official/content/about-logo@2x.png \
"$pkgdir/usr/share/icons/hicolor/384x384/apps/$_pkgname.png"
install -Dm644 ../firefox-symbolic.svg \
"$pkgdir/usr/share/icons/hicolor/symbolic/apps/$_pkgname-symbolic.svg"
install -Dm644 ../$_pkgname.desktop \
"$pkgdir/usr/share/applications/$_pkgname.desktop"
# Use system-provided dictionaries
# rm -r "$pkgdir"/usr/lib/$_pkgname/dictionaries
#ln -fTs /usr/share/hunspell "$pkgdir/usr/lib/$_pkgname/dictionaries"
#ln -fTs /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
exec /usr/lib/$_pkgname/firefox "\$@"
END
# Replace duplicate binary with wrapper
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
ln -srf "$pkgdir/usr/bin/$_pkgname" \
"$pkgdir/usr/lib/$_pkgname/firefox-bin"
}
|