-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD (copia 1)
346 lines (301 loc) · 11.9 KB
/
PKGBUILD (copia 1)
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# $Id: PKGBUILD 277477 2016-10-01 03:36:40Z foutrelis $
# Maintainer: Evangelos Foutras <[email protected]>
# Contributor: Pierre Schmitz <[email protected]>
# Contributor: Jan "heftig" Steffens <[email protected]>
# Contributor: Daniel J Griffiths <[email protected]>
pkgname=inox
name=chromium
pkgver=62.0.3202.45
pkgrel=2
_launcher_ver=5
pkgdesc="A web browser built for speed, simplicity, and security"
arch=('i686' 'x86_64')
url="https://www.chromium.org/Home"
license=('BSD')
depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
'ttf-font' 'systemd' 'dbus' 'libpulse' 'pciutils' 'json-glib'
'desktop-file-utils' 'hicolor-icon-theme')
makedepends=('python2' 'gperf' 'yasm' 'mesa' 'ninja' 'nodejs' 'git')
optdepends=('pepper-flash: support for Flash content'
'kdialog: needed for file dialogs in KDE'
'gnome-keyring: for storing passwords in GNOME keyring'
'kwallet: for storing passwords in KWallet')
install=chromium.install
source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
inox.desktop
breakpad-use-ucontext_t.patch
crc32c-string-view-check.patch
chromium-gn-bootstrap-r17.patch
001.patch
002.patch
004.patch
005.patch
006.patch
007.patch
008.patch
009.patch
010.patch
011.patch
012.patch
013.patch
014.patch
015.patch
016.patch
017.patch
018.patch
019.patch
020.patch
021.patch
022.patch
023.patch
024.patch
025.patch
026.patch
027.patch
029.patch
030.patch
031.patch
032.patch
034.patch
035.patch
036.patch
037.patch
038.patch
12.patch
16.patch
20.patch
9k.patch
048.patch
gna.patch
gnb.patch
)
sha256sums=('975a2fd6dff93067860016959de8e9fbad21778c67c16f4d29e1faee19635c13'
'4dc3428f2c927955d9ae117f2fb24d098cc6dd67adb760ac9c82b522ec8b0587'
'028a748a5c275de9b8f776f97909f999a8583a4b77fd1cd600b4fc5c0c3e91e9'
'6e9a345f810d36068ee74ebba4708c70ab30421dad3571b6be5e9db635078ea8'
'35435e8dae76737baafecdc76d74a1c97281c4179e416556e033a06a31468e6d'
'd81319f168dad0e411c8e810f73daa2f56ff579578771bd9c9bb1aa2d7c09a8b'
'2fc7be3e38fd8056b1ba964256c3f0b04128826e16d24e2766d402af22544b35'
'9072ce92080e4ff67beea3cc04aebd3f316c196195db350eb49ae3a88ac61c83'
'6b13e3bf360d8dbd1f722ff0c2c98cf6020806a4cb1f9af64d6c7b6216452230'
'aeed949aeb22d53dd1d7a97823ffd109f875557e27937a784d05c2931c61ed41'
'5c8c3ad7d5b4ebda7508e3aee13349fc8ad627d7a7e3147168e214f03e433168'
'085c00b8f760b2262218ef772038a0d439bf208d61664ae15cf6088cc142fe47'
'9841774a5b7943b4f80ff9aed69657cbd0c59fc9453b76141449e84b3afbbdd5'
'bd233779119f47a6f25d562dee0f725b47cf88b646a4828fd2c517d46839fd3e'
'fd5fdc83665113677951e2e713a4696d999a070d6b59bb57319df357b35d4fad'
'3850ad42d0cb4ca011d46b9d569a0a2bf83476f0c3da70c74d4f011cec59f885'
'7beb0f3bbc55960092347767d423415860a3867525f6d1bbb057b3d72fae0618'
'bcaeeb52d5d17fa9e6d4883cdeef8150f7e6ce440e0fcd3cef17d99f4b5db672'
'f6a4c02feb5b21f1814d0b835b94a8b6222628ff97800b5411dc86852bfa5883'
'579b13e755ef6b6e284a44576db394c05c982be9f1dfc9435fe4966c07288c25'
'f4af2787f31abe66ab1180affed6f4c97daaad9151de429c9f5dc3e223cc8d87'
'917c0e0d3fc770e9ded0162127c99bc378a13ad723ad2b27fd93bc09e029c4ad'
'1632b2d3b9062e6ec8872b9df180f82a93099a50eda6f15125ffe56dd45beca6'
'b36ed3b00353f5c216e017e8ca7bb9798e81a61bd78cf757fcaebf54d2c04c26'
'b35247d9ca4a7a40d9ca59e95ee9457245d903542e4c29033d200b6198396820'
'7cde4208b87ba4632e2c83aa13163d3b34935d6175c868b671c74bb17b752fb5'
'519965231b125f40a644829e50529befe496e02ca2e03ebc38d8791706bf2162'
'900d9b967c5cade8c57caf0599f8048ee8ee79be4d3e6c1f91c4e934c91447de'
'66d0a7672b29293080baa141540bfdf584d3f013c6d2115fa2c9dfa28beee934'
'd975a6abd6cb8ff2a2178d9a4755ea978033af522a0b4121d025703133a87ca2'
'a392decc52fff5cd660f293b26739d7203f8678cc57d560f1b42efff1d43dc0d'
'dfac4673959a225462c629045db1c0fd736717d11d8256a9827b45c3b5dadc44'
'db1d9f62899a1acf917394d807f10765f3cbeef63c42f1e8359239b806f42517'
'3d66b22f1ba6d7309eafd93e3b0a3d9ec841828f88cd8e267a7760585776dd5b'
'14a0388a78e656acd894398bb24679b0d772aa985d69a428f47904a8593f001f'
'cabe339110369d08b2cef0b4308ee8eb8385054583815c3927421588ae94d9e7'
'5a4ec61000266fd623e0a3377210ed324ed62eeba6c61ecd95ffb49d4d20640f'
'4570a87cb632896818f8bf96eb38157bcbcfec55e702683e36d8bc63b16764af'
'9d144732d593d9ee82f99b24009a193e61ef8560aff92a15effdae95a0897c61'
'2acda9e5de0efa71c8347eb490bcae7993ae28dceaba406a0dafb50110539ba2'
'1e9fc91a973977bdd03fddb65610f34e60a0fbd357033137dbb12f4657b14cf8'
'1d178ac9e0dfa32a5f3dc860cdaa46fdedd7810bc00bc5733f52bdb113be38a6'
'216829c72f1cc378bc66fb4f62f047cccd31684d946ba9a406b6e7a8f1351677'
'80d2974001708c288a54c24e1dc896ef25916552b740765f6066a244c05ffcd5'
'e69053b14c008ee8c20134a022726c09a81b03ef18dc1298d2d8fda88211568f'
'814fa3b82c8330b944b138ece864be4761fe17f42061816028b5d8c1f2609c8a'
'8f7d2baca6d96b1e668c8c2bcb1efe5daa0e1cb33de89e12165ea22c73ce8741'
'ad70e95f53c40b9e3d9ddab5db49e53c9bad82b4e5a27cd0d09b851c8489a21a')
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
# Keys are the names in the above script; values are the dependencies in Arch
declare -rgA _system_libs=(
#[ffmpeg]=ffmpeg # https://crbug.com/731766
[flac]=flac
#[freetype]=freetype2 # https://crbug.com/pdfium/733
[harfbuzz-ng]=harfbuzz-icu
[icu]=icu
[libdrm]=
[libjpeg]=libjpeg
#[libpng]=libpng # https://crbug.com/752403#c10
#[libvpx]=libvpx # https://bugs.gentoo.org/611394
[libwebp]=libwebp
[libxml]=libxml2
[libxslt]=libxslt
[opus]=opus
[re2]=re2
[snappy]=snappy
[yasm]=
[zlib]=minizip
)
depends+=(${_system_libs[@]})
# Google API keys (see https://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.
prepare() {
cd "$srcdir/$name-$pkgver"
# https://crbug.com/710701
local _chrome_build_hash=$(curl -s https://chromium.googlesource.com/chromium/src.git/+/$pkgver?format=TEXT |
base64 -d | grep -Po '^parent \K[a-z0-9]{40}$')
if [[ -z $_chrome_build_hash ]]; then
error "Unable to fetch Chrome build hash."
return 1
fi
echo "LASTCHANGE=$_chrome_build_hash-" >build/util/LASTCHANGE
# Enable support for the Widevine CDM plugin
# libwidevinecdm.so is not included, but can be copied over from Chrome
# (Version string doesn't seem to matter so let's go with "Pinkie Pie")
sed "s/@WIDEVINE_VERSION@/Pinkie Pie/" ../chromium-widevine.patch |
patch -Np1
patch -Np1 -i ../001.patch
patch -Np1 -i ../002.patch
patch -Np1 -i ../004.patch
patch -Np1 -i ../005.patch
patch -Np1 -i ../006.patch
patch -Np1 -i ../007.patch
patch -Np1 -i ../008.patch
patch -Np1 -i ../009.patch
patch -Np1 -i ../010.patch
patch -Np1 -i ../011.patch
patch -Np1 -i ../012.patch
patch -Np1 -i ../013.patch
patch -Np1 -i ../014.patch
patch -Np1 -i ../015.patch
patch -Np1 -i ../016.patch
patch -Np1 -i ../017.patch
patch -Np1 -i ../018.patch
patch -Np1 -i ../019.patch
patch -Np1 -i ../020.patch
patch -Np1 -i ../021.patch
patch -Np1 -i ../022.patch
patch -Np1 -i ../023.patch
patch -Np1 -i ../024.patch
patch -Np1 -i ../025.patch
#patch -Np1 -i ../026.patch
patch -Np1 -i ../027.patch
patch -Np1 -i ../029.patch
patch -Np1 -i ../030.patch
patch -Np1 -i ../031.patch
patch -Np1 -i ../032.patch
patch -Np1 -i ../034.patch
patch -Np1 -i ../035.patch
patch -Np1 -i ../036.patch
patch -Np1 -i ../037.patch
patch -Np1 -i ../038.patch
#patch -Np1 -i ../9k.patch
#patch -Np1 -i ../048.patch
patch -Np1 -i ../12.patch
patch -Np1 -i ../16.patch
# Fix build with glibc 2.26
patch -Np1 -i ../breakpad-use-ucontext_t.patch
patch -Np1 -i ../gna.patch
patch -Np1 -i ../gnb.patch
# Fix incorrect inclusion of <string_view> in modes other than >= C++17
patch -Np1 -d third_party/crc32c/src <../crc32c-string-view-check.patch
# Fixes from Gentoo
patch -Np1 -i ../chromium-gn-bootstrap-r17.patch
# Use Python 2
find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} +
# There are still a lot of relative calls which need a workaround
mkdir "$srcdir/python2-path"
ln -s /usr/bin/python2 "$srcdir/python2-path/python"
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
# Remove bundled libraries for which we will use the system copies; this
# *should* do what the remove_bundled_libraries.py script does, with the
# added benefit of not having to list all the remaining libraries
local _lib
for _lib in ${!_system_libs[@]} ${_system_libs[libjpeg]+libjpeg_turbo}; do
find -type f -path "*third_party/$_lib/*" \
\! -path "*third_party/$_lib/chromium/*" \
\! -path "*third_party/$_lib/google/*" \
\! -path "*base/third_party/icu/*" \
\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
-delete
done
python2 build/linux/unbundle/replace_gn_files.py \
--system-libraries "${!_system_libs[@]}"
python2 tools/clang/scripts/update.py
cd "$srcdir/chromium-launcher-$_launcher_ver"
patch -Np1 -i ../20.patch
}
build() {
make -C chromium-launcher-$_launcher_ver
cd "$srcdir/$name-$pkgver"
export PATH="$srcdir/python2-path:$PATH"
export TMPDIR="$srcdir/temp"
mkdir -p "$TMPDIR"
local _flags=(
'symbol_level=0'
'is_debug=false'
'fatal_linker_warnings=false'
'treat_warnings_as_errors=false'
'fieldtrial_testing_like_official_build=true'
'remove_webcore_debug_symbols=true'
'exclude_unwind_tables=true'
'ffmpeg_branding="Chrome"'
'proprietary_codecs=true'
'link_pulseaudio=true'
'use_gconf=false'
'use_gnome_keyring=false'
'use_gold=false'
'use_sysroot=false'
'linux_use_bundled_binutils=false'
'use_custom_libcxx=false'
'use_system_libjpeg=true'
'use_vaapi=false'
'enable_hangout_services_extension=false'
'enable_widevine=false'
'enable_webrtc=false'
'enable_nacl=false'
'enable_swiftshader=false'
'enable_nacl_nonsfi=false'
'enable_remoting=false'
'enable_google_now=false'
'enable_hotwording=false'
'enable_print_preview=false'
)
python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args "${_flags[*]}"
out/Release/gn gen out/Release --args="${_flags[*]}" \
--script-executable=/usr/bin/python2
ninja -C out/Release chrome chrome_sandbox chromedriver widevinecdmadapter
}
package() {
cd chromium-launcher-$_launcher_ver
make PREFIX=/usr DESTDIR="$pkgdir" install
install -Dm644 LICENSE \
"$pkgdir/usr/share/licenses/inox/LICENSE.launcher"
cd "$srcdir/$name-$pkgver"
install -D out/Release/chrome "$pkgdir/usr/lib/$pkgname/$pkgname"
install -Dm644 out/Release/chrome.1 "$pkgdir/usr/share/man/man1/inox.1"
install -Dm644 "$srcdir/inox.desktop" \
"$pkgdir/usr/share/applications/inox.desktop"
install -Dm4755 out/Release/chrome_sandbox \
"$pkgdir/usr/lib/inox/chrome-sandbox"
cp -a \
out/Release/{chrome_{100,200}_percent,resources}.pak \
out/Release/{*.bin,chromedriver} \
out/Release/locales \
"$pkgdir/usr/lib/inox/"
if [[ -z ${_system_libs[icu]+set} ]]; then
cp out/Release/icudtl.dat "$pkgdir/usr/lib/inox/"
fi
ln -s /usr/lib/$pkgname/inoxdriver "$pkgdir/usr/bin/inoxdriver"
for size in 16 22 24 32 48 64 128 256; do
install -Dm644 "$srcdir/product_logo_$size.png" \
"$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/$pkgname.png"
done
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/inox/LICENSE"
}
# vim:set ts=2 sw=2 et: