aboutsummaryrefslogtreecommitdiffstats
path: root/community/chromium/APKBUILD
blob: 5a3eed900f35679c8405202caaa9c6cb8c0d1d42 (plain) (blame)
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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=chromium
pkgver=92.0.4515.107
pkgrel=0
pkgdesc="Chromium web browser"
url="https://www.chromium.org/Home"
arch="aarch64 x86_64"	# x86: ./v8_context_snapshot_generator segfaults
license="BSD-3-Clause"
makedepends="
	alsa-lib-dev
	bash
	bison flex
	bsd-compat-headers
	bzip2-dev
	cairo-dev
	clang-dev
	cups-dev
	curl-dev
	dbus-glib-dev
	elfutils
	elfutils-dev
	eudev-dev
	ffmpeg-dev
	findutils
	flac-dev
	freetype-dev
	gnutls-dev
	gperf
	gtk+3.0-dev
	gzip
	harfbuzz-dev
	hunspell-dev
	hwids-usb
	jpeg-dev
	jsoncpp-dev
	krb5-dev
	lcms2-dev
	libbsd-dev
	libcap-dev
	libevent-dev
	libexif-dev
	libgcrypt-dev
	libgnome-keyring-dev
	libjpeg-turbo-dev
	libpng-dev
	libusb-dev
	libva-dev
	libwebp-dev
	libxcomposite-dev
	libxcursor-dev
	libxinerama-dev
	libxml2-dev
	libxrandr-dev
	libxscrnsaver-dev
	libxslt-dev
	linux-headers
	lld
	mesa-dev
	minizip-dev
	ninja
	nodejs
	nss-dev
	java-jdk
	opus-dev
	pciutils-dev
	perl
	python3
	re2-dev
	snappy-dev
	speex-dev
	sqlite-dev
	xcb-proto
	xdg-utils
	zlib-dev
	py2-setuptools
	"
# explicit depends for --headless
depends="xdg-utils eudev-libs ttf-opensans"
options="suid !check" # broken
subpackages="$pkgname-chromedriver $pkgname-lang $pkgname-swiftshader $pkgname-angle"
source="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
	test_fonts-cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb.tar.gz::https://chromium-fonts.storage.googleapis.com/cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb
	chromium-launcher.sh
	chromium.conf
	chromium.desktop
	google-api.keys

	default-pthread-stacksize.patch
	musl-fixes.patch
	musl-fixes-breakpad.patch
	musl-hacks.patch
	musl-libc++.patch
	musl-sandbox.patch
	no-execinfo.patch
	no-mallinfo.patch
	resolver.patch
	swiftshader.patch

	chromium-use-alpine-target.patch
	media-base.patch
	musl-crashpad.patch
	musl-v8-monotonic-pthread-cont_timedwait.patch
	nasm.patch

	gcc-fno-delete-null-pointer-checks.patch
	gcc-arm.patch
	aarch64-fixes.patch
	elf-arm.patch

	remove-unsupported-attribute.patch
	fix-missing-includes.patch
	revert-2778794.patch

	disable-floc-component.patch

	fix-unittests-base.patch
	fix-unittests-sandbox.patch
	fix-unittests-net.patch
	fix-unittests-net-py2tests.patch
	scoped-file.patch
	strip-binary.patch
	gdbinit.patch
	v8-constexpr.patch
	quiche-arena-size.patch
	renamed-freetype-member.patch
	"

# secfixes:
#   92.0.4515.107-r0:
#     - CVE-2021-30565
#     - CVE-2021-30566
#     - CVE-2021-30567
#     - CVE-2021-30568
#     - CVE-2021-30569
#     - CVE-2021-30571
#     - CVE-2021-30572
#     - CVE-2021-30573
#     - CVE-2021-30574
#     - CVE-2021-30575
#     - CVE-2021-30576
#     - CVE-2021-30577
#     - CVE-2021-30578
#     - CVE-2021-30579
#     - CVE-2021-30580
#     - CVE-2021-30581
#     - CVE-2021-30582
#     - CVE-2021-30583
#     - CVE-2021-30584
#     - CVE-2021-30585
#     - CVE-2021-30586
#     - CVE-2021-30587
#     - CVE-2021-30588
#     - CVE-2021-30589
#   91.0.4472.164-r0:
#     - CVE-2021-30559
#     - CVE-2021-30541
#     - CVE-2021-30560
#     - CVE-2021-30561
#     - CVE-2021-30562
#     - CVE-2021-30563
#     - CVE-2021-30564
#   91.0.4472.114-r0:
#     - CVE-2021-30554
#     - CVE-2021-30555
#     - CVE-2021-30556
#     - CVE-2021-30557
#   91.0.4472.101-r0:
#     - CVE-2021-30544
#     - CVE-2021-30545
#     - CVE-2021-30546
#     - CVE-2021-30547
#     - CVE-2021-30548
#     - CVE-2021-30549
#     - CVE-2021-30550
#     - CVE-2021-30551
#     - CVE-2021-30552
#     - CVE-2021-30553
#   91.0.4472.77-r0:
#     - CVE-2021-30521
#     - CVE-2021-30522
#     - CVE-2021-30523
#     - CVE-2021-30524
#     - CVE-2021-30525
#     - CVE-2021-30526
#     - CVE-2021-30527
#     - CVE-2021-30528
#     - CVE-2021-30529
#     - CVE-2021-30530
#     - CVE-2021-30531
#     - CVE-2021-30532
#     - CVE-2021-30533
#     - CVE-2021-30534
#     - CVE-2021-30535
#     - CVE-2021-30536
#     - CVE-2021-30537
#     - CVE-2021-30538
#     - CVE-2021-30539
#     - CVE-2021-30540
#   90.0.4430.72-r0:
#     - CVE-2021-21201
#     - CVE-2021-21202
#     - CVE-2021-21203
#     - CVE-2021-21204
#     - CVE-2021-21205
#     - CVE-2021-21221
#     - CVE-2021-21207
#     - CVE-2021-21208
#     - CVE-2021-21209
#     - CVE-2021-21210
#     - CVE-2021-21211
#     - CVE-2021-21212
#     - CVE-2021-21213
#     - CVE-2021-21214
#     - CVE-2021-21215
#     - CVE-2021-21216
#     - CVE-2021-21217
#     - CVE-2021-21218
#     - CVE-2021-21219
#   89.0.4389.128-r0:
#     - CVE-2021-21206
#     - CVE-2021-21220
#   89.0.4389.114-r0:
#     - CVE-2021-21194
#     - CVE-2021-21195
#     - CVE-2021-21196
#     - CVE-2021-21197
#     - CVE-2021-21198
#     - CVE-2021-21199
#   89.0.4389.90-r0:
#     - CVE-2021-21191
#     - CVE-2021-21192
#     - CVE-2021-21193
#   89.0.4389.72-r0:
#     - CVE-2021-21158
#     - CVE-2021-21159
#     - CVE-2021-21160
#     - CVE-2021-21161
#     - CVE-2021-21162
#     - CVE-2021-21163
#     - CVE-2021-21164
#     - CVE-2021-21165
#     - CVE-2021-21166
#     - CVE-2021-21167
#     - CVE-2021-21168
#     - CVE-2021-21169
#     - CVE-2021-21170
#     - CVE-2021-21171
#     - CVE-2021-21172
#     - CVE-2021-21173
#     - CVE-2021-21174
#     - CVE-2021-21175
#     - CVE-2021-21176
#     - CVE-2021-21177
#     - CVE-2021-21178
#     - CVE-2021-21179
#     - CVE-2021-21180
#     - CVE-2020-27844
#     - CVE-2021-21181
#     - CVE-2021-21182
#     - CVE-2021-21183
#     - CVE-2021-21184
#     - CVE-2021-21185
#     - CVE-2021-21186
#     - CVE-2021-21187
#     - CVE-2021-21188
#     - CVE-2021-21189
#     - CVE-2021-21190
#   83.0.4103.116-r0:
#     - CVE-2020-6505
#     - CVE-2020-6506
#     - CVE-2020-6507
#     - CVE-2020-6509
#   72.0.3626.121-r0:
#     - CVE-2019-5786

if [ -n "$CHECK" ]; then
	options="suid"
fi

if [ -n "$DEBUG" ]; then
	_buildtype=Debug
	_is_debug=true
	_symbol_level=1
	_is_component_build=true
else
	_buildtype=Release
	_is_debug=false
	_symbol_level=0
	_is_component_build=false
fi

prepare() {
	patch_args="-p0"
	default_prepare

	cd "$srcdir"/"chromium-$pkgver"

	mv ../test_fonts/ ./third_party/test_fonts/

	# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
	touch chrome/test/data/webui/i18n_process_css_test.html
	# Use the file at run time instead of effectively compiling it in
	sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \
		-i services/device/public/cpp/usb/BUILD.gn

	mkdir -p third_party/node/linux/node-linux-x64/bin
	ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/

	# reusable system library settings
	local use_system="
		ffmpeg
		flac
		fontconfig
		freetype
		harfbuzz-ng
		libdrm
		libevent
		libjpeg
		libpng
		libwebp
		libxml
		libxslt
		opus
		re2
		snappy
		"
	for _lib in $use_system libjpeg_turbo; do
		msg "Removing buildscripts for system provided $_lib"
		find -type f -path "*third_party/$_lib/*" \
			\! -path "*third_party/$_lib/chromium/*" \
			\! -path "*third_party/$_lib/google/*" \
			\! -path './base/third_party/icu/*' \
			\! -path './third_party/libxml/*' \
			\! -path './third_party/pdfium/third_party/freetype/include/pstables.h' \
			\! -path './third_party/harfbuzz-ng/utils/hb_scoped.h' \
			\! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
			-delete
	done

	msg "Replacing gn files"
	python3 build/linux/unbundle/replace_gn_files.py --system-libraries \
		$use_system
	third_party/libaddressinput/chromium/tools/update-strings.py

}

_gn_flags() {
	echo $*
}

build() {
	##############################################################
	# Please dont use these keys outside of Alpine Linux project #
	# You can create your own at:                                #
	# http://www.chromium.org/developers/how-tos/api-keys        #
	##############################################################
	eval "$(base64 -d < $srcdir/google-api.keys)"

	msg "Bootstrapping GN"

#	AR="ar" CC="${CC:-gcc}" CXX="${CXX:-g++}" LD="${CXX:-g++}" \
	CC="${CC:-clang}" CXX="${CXX:-clang++}" LD="${CXX:-clang++}" \
		python3 tools/gn/bootstrap/bootstrap.py -s -v --skip-generate-buildfiles

	msg "Configuring build"

	local _c _ca
	_c=$(_gn_flags \
		blink_symbol_level=0 \
		clang_use_chrome_plugins=false \
		custom_toolchain=\"//build/toolchain/linux/unbundle:default\" \
		enable_hangout_services_extension=true \
		enable_nacl_nonsfi=false \
		enable_nacl=false \
		enable_precompiled_headers=false \
		fatal_linker_warnings=false \
		ffmpeg_branding=\"Chrome\" \
		fieldtrial_testing_like_official_build=true \
		gold_path=\"/usr/bin/ld.gold\" \
		google_api_key=\"$_google_api_key\" \
		google_default_client_id=\"$_google_default_client_id\" \
		google_default_client_secret=\"$_google_default_client_secret\" \
		host_toolchain=\"//build/toolchain/linux/unbundle:default\" \
		icu_use_data_file=true \
		is_clang=true \
		is_component_build=$_is_component_build \
		is_debug=$_is_debug \
		proprietary_codecs=true \
		symbol_level=$_symbol_level \
		treat_warnings_as_errors=false \
		use_allocator_shim=false \
		use_allocator=\"none\" \
		use_cups=true \
		use_custom_libcxx=false \
		use_gnome_keyring=false \
		use_gold=false \
		use_lld=true \
		use_pulseaudio=false \
		use_sysroot=false \
		use_system_harfbuzz=true \
		use_system_freetype=true \
		use_system_harfbuzz=true \
		use_system_libdrm=true \
		use_system_libjpeg=true \
		use_system_libpng=true \
		use_system_lcms2=true \
		use_system_zlib=true \
		build_with_tflite_lib=false \
		enable_vr=false \
	)

	case $CARCH in
		x86*|aarch64) _ca="use_vaapi=true" ;;
		*) _ca="concurrent_links=1" ;;
	esac

	AR="ar" CC="clang" CXX="clang++" LD="clang++" NM=/usr/bin/nm \
		out/Release/gn gen out/$_buildtype --args="$_c $_ca"

	# Make xcbgen available to ui/gfx/x/gen_xproto.py running under Python 2
	ln -sf /usr/lib/python3.*/site-packages/xcbgen .
	export PYTHONPATH="$PWD"

	msg "Ninja turtles GO!"

	# build mksnapshot
	ninja -C out/$_buildtype mksnapshot
	ninja -C out/$_buildtype v8_context_snapshot_generator

	if [ "$CARCH" = "x86" ]; then
		# x86 only - dependency issues compiling obj/chrome/browser/devtools/devtools/cast_handler.o
		ninja -C out/$_buildtype obj/chrome/common/media_router/mojom/media_router__generator.stamp
	fi

	# final link needs lots of file descriptors
	ulimit -n 2048

	# finish rest of the build
	ninja -C out/$_buildtype chrome chrome_sandbox chromedriver

	if [ -n "$CHECK" ]; then
		ninja -C out/$_buildtype \
			base_unittests \
			base_util_unittests \
			sandbox_linux_unittests \
			chromedriver_unittests \
			crypto_unittests \
			skia_unittests \
			blink_common_unittests \
			ozone_unittests \
			ozone_x11_unittests \
			ozone_gl_unittests \
			absl_hardening_tests \
			# angle_unittests \
			blink_common_unittests \
			blink_heap_unittests \
			# blink_platform_unittests \
			boringssl_crypto_tests \
			boringssl_ssl_tests \
			cast_unittests \
			capture_unittests \
			# components_browsertests \
			# components_unittests \
			# content_browsertests \
			# content_unittests \
			# crashpad_tests \
			events_unittests \
			gcm_unit_tests \
			gin_unittests \
			google_apis_unittests \
			gpu_unittests \
			gwp_asan_unittests \
			ipc_tests \
			jingle_unittests \
			latency_unittests \
			libjingle_xmpp_unittests \
			liburlpattern_unittests \
			media_blink_unittests \
			media_unittests \
			midi_unittests \
			mojo_unittests \
			net_unittests \
			# cc_unittests \
			# blink_unittests \
			perfetto_unittests \
			# services_unittests \
			shell_dialogs_unittests \
			sql_unittests \
			storage_unittests \
			ui_base_unittests \
			ui_touch_selection_unittests \
			url_unittests \
			# webkit_unit_tests \
			wtf_unittests \
			zlib_unittests
	fi
}

check() {
	out/$_buildtype/base_unittests
	out/$_buildtype/base_util_unittests
	out/$_buildtype/sandbox_linux_unittests # broken + does not compile
	out/$_buildtype/chromedriver_unittests
	out/$_buildtype/crypto_unittests
	out/$_buildtype/skia_unittests
	out/$_buildtype/ozone_unittests
	out/$_buildtype/ozone_x11_unittests # ?
	out/$_buildtype/ozone_gl_unittests # broken
	out/$_buildtype/absl_hardening_tests
	# out/$_buildtype/angle_unittests # broken / does not compile
	out/$_buildtype/blink_common_unittests
	out/$_buildtype/blink_heap_unittests
	# out/$_buildtype/blink_platform_unittests # broken / does not compile
	out/$_buildtype/boringssl_crypto_tests
	out/$_buildtype/boringssl_ssl_tests
	out/$_buildtype/cast_unittests
	out/$_buildtype/capture_unittests --gtest_filter=-*UsingRealWebcam* # broken
	# out/$_buildtype/components_browsertests # broken / does not compile
	# out/$_buildtype/components_unittests # broken / does not compile
	# out/$_buildtype/content_browsertests # broken / does not compile
	# out/$_buildtype/content_unittests # broken / does not compile
	# out/$_buildtype/crashpad_tests # broken / does not compile
	out/$_buildtype/events_unittests
	out/$_buildtype/gcm_unit_tests
	out/$_buildtype/gin_unittests # ?
	out/$_buildtype/google_apis_unittests
	out/$_buildtype/gpu_unittests
	out/$_buildtype/gwp_asan_unittests # broken / required?
	out/$_buildtype/ipc_tests
	out/$_buildtype/jingle_unittests
	out/$_buildtype/latency_unittests
	out/$_buildtype/libjingle_xmpp_unittests
	out/$_buildtype/liburlpattern_unittests
	out/$_buildtype/media_blink_unittests # broken
	out/$_buildtype/media_unittests # broken
	out/$_buildtype/midi_unittests
	out/$_buildtype/mojo_unittests
	out/$_buildtype/net_unittests # broken
	# out/$_buildtype/cc_unittests # broken / does not compile
	# out/$_buildtype/blink_unittests # broken / does not compile
	out/$_buildtype/perfetto_unittests # ?
	# out/$_buildtype/services_unittests # broken / does not compile
	out/$_buildtype/shell_dialogs_unittests
	out/$_buildtype/sql_unittests
	out/$_buildtype/storage_unittests
	out/$_buildtype/ui_base_unittests # ok
	out/$_buildtype/ui_touch_selection_unittests
	out/$_buildtype/url_unittests
	# out/$_buildtype/webkit_unit_tests # broken / does not compile
	out/$_buildtype/wtf_unittests
	out/$_buildtype/zlib_unittests
}

package() {
	cd "$builddir"/out/$_buildtype

	# binaries
	install -Dm755 chrome "$pkgdir"/usr/lib/$pkgname/chrome
	install -Dm4755 chrome_sandbox "$pkgdir"/usr/lib/$pkgname/chrome-sandbox
	install -Dm755 crashpad_handler "$pkgdir"/usr/lib/$pkgname/crashpad_handler

	# resources
	install -Dm644 snapshot_blob.bin "$pkgdir"/usr/lib/$pkgname/
	install -Dm644 v8_context_snapshot.bin "$pkgdir"/usr/lib/$pkgname/

	install -m644 icudtl.dat "$pkgdir"/usr/lib/$pkgname/icudtl.dat

	install -Dm755 xdg-mime "$pkgdir"/usr/lib/$pkgname/xdg-mime
	install -Dm755 xdg-settings "$pkgdir"/usr/lib/$pkgname/xdg-settings

	local pak
	for pak in *.pak; do
		install -Dm644 $pak "$pkgdir"/usr/lib/$pkgname/$pak
	done

	install -Dm755 "$srcdir"/chromium-launcher.sh \
		"$pkgdir"/usr/lib/$pkgname/chromium-launcher.sh

	cp -a MEIPreload "$pkgdir"/usr/lib/$pkgname/

	# Default to en-us and provide everything else through the chromium-lang package
	install -Dm644 locales/en-US.pak "$pkgdir"/usr/lib/$pkgname/locales/en-US.pak

	# It is important that we name the target "chromium-browser",
	# xdg-utils expect it; bug #355517.
	mkdir -p "$pkgdir"/usr/bin
	ln -sf /usr/lib/$pkgname/chromium-launcher.sh "$pkgdir"/usr/bin/chromium-browser

	install -Dm644 "$srcdir"/chromium.conf \
		"$pkgdir"/etc/chromium/chromium.conf

	install -Dm644 "$srcdir"/chromium.desktop \
		"$pkgdir"/usr/share/applications/chromium.desktop

	cd "$builddir"
	for size in 24 48 64 128 256; do
		install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
			"$pkgdir/usr/share/icons/hicolor/"$size"x"$size"/apps/chromium.png"
	done

	for size in 16 32; do
		install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
			"$pkgdir/usr/share/icons/hicolor/"$size"x"$size"/apps/chromium.png"
	done
}

chromedriver() {
	pkgdesc="WebDriver driver for the Chromium Browser"
	depends="$pkgname=$pkgver-r$pkgrel"

	cd "$builddir"/out/$_buildtype

	mkdir -p "$subpkgdir"/usr/lib/$pkgname "$subpkgdir"/usr/bin

	install -Dm755 chromedriver "$subpkgdir"/usr/lib/$pkgname/chromedriver
	ln -sf /usr/lib/$pkgname/chromedriver "$subpkgdir"/usr/bin/
}

lang() {
	pkgdesc="Languages for package $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel lang"

	cd "$builddir"/out/$_buildtype

	for pak in locales/*.pak; do
		install -Dm644 "$pak" "$subpkgdir"/usr/lib/$pkgname/"$pak"
	done;

	rm "$subpkgdir"/usr/lib/$pkgname/locales/en-US.pak
}

swiftshader() {
	pkgdesc="Chromium web browser: CPU-based implementation of the Vulkan graphics API"
	depends="$pkgname-angle=$pkgver-r$pkgrel"

	cd "$builddir"/out/$_buildtype

	install -Dm755 swiftshader/libEGL.so \
		"$subpkgdir"/usr/lib/$pkgname/swiftshader/libEGL.so
	install -Dm755 swiftshader/libGLESv2.so \
		"$subpkgdir"/usr/lib/$pkgname/swiftshader/libGLESv2.so
}

angle() {
	pkgdesc="Chromium web browser: ANGLE based hardware acceleration"
	depends=""

	cd "$builddir"/out/$_buildtype

	install -Dm755 libEGL.so "$subpkgdir"/usr/lib/$pkgname/libEGL.so
	install -Dm755 libGLESv2.so "$subpkgdir"/usr/lib/$pkgname/libGLESv2.so
}

sha512sums="
8814a3371e38836cee02178fa06bee612d00efe561791278351ef5312f5225742d416043fe6e25e9e353ae3d82dbd5ef57c9b1f115423da6537288e9aece779a  chromium-92.0.4515.107.tar.xz
f554ccc5d8a5c066634357878c89944cc591809ea6f6c6ef5b35e970e9674e0b3be8fddb06c0d333ddc65211fa09ae5e0b4b483ca70048156c29607c5487c017  test_fonts-cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb.tar.gz
b9a810416dd7a8ffc3a5ced85ad9acebda1665bd08a57eec7b189698cc5f74d2c3fd69044e20fcb83297a43214b2772a1312b2c6122ea0eb716abacf39524d60  chromium-launcher.sh
f6d962b9e4c22dd42183df3db5d3202dab33eccecafb1bf63ca678147289581262db1e5e64cbe8f9c212beefb0a6717bb8d311e497f56b55fe95b8bab2db493f  chromium.conf
e182c998a43d22d1c76a86c561619afd1fca8c2be668265ad5e2f81a3806f7a154272cc027a2f8b370fb69446892c69e5967a4be76082325c14245ee7915234c  chromium.desktop
2d8237a940ea691bd10b08315429677a587f7ef9692a0cca53bfd066eae82998a6c71f402a8669e9de39f94d7f3280745d1628ea6eac5d76ca7116844d4e0dac  google-api.keys
fc1d31cf7a502cfbfa21df770e6abe7f8c0930209cbda7c250fa5a38cb3f3941a0652fc12462083840cc05881224afecf3dd637a0590222e82145387c09e653d  default-pthread-stacksize.patch
838debc14136707cb4209d5e00484392bcb06639a435c2d13e4062587cbe903ad851c9eba64c2b93263b5ed7b9e1eebec7565c844d59af74689fc0bf9138eabb  musl-fixes.patch
e8675aff9fccd8b58cc839ef1d9e0e022d66aa94f72baa72e7acf92ceb2691f6a7907cc60ec3a87f894efdd639a3dec7fe702c97d446fcdea99452caec57e002  musl-fixes-breakpad.patch
798ed4cd9b6a1113200e5ad91073f6affebc66ed8c1bd56bc87ffbacf3117ee1fedd41889d75a2853291c01dfcc2e942b88a41209454fa359fc585b3cc2d906f  musl-hacks.patch
919f13a2cd65673f267321cf95c5410e65bc5264d6704d0791b25d39111282bedb425bd9824dde3b67422cfb874c86a9383ded686e39cfd4aac239edaf41cfc8  musl-libc++.patch
ef43fa90b05e2407b6daa822193121cdeef6ee9068175572f0928f156f186be9c77539dfa06863adfaa25afd498ec1b5081f9e476543616f9472b9033fd921dc  musl-sandbox.patch
1762308e6d378fa299c841785405895545a44f71d78cd30500b0d220108d9748f2b4bb4200a82a96638ab380b8ef96bb02fe97c4092f510e20c320e4909447c6  no-execinfo.patch
f71136150dc840d63b986c18e63e198b21c94f30f95762a1857ce5ce65c682199a8a309f83d7657fb8913f31ca304ac80a2e599b3f4645cf63e10decc2acc561  no-mallinfo.patch
3a7810105c45c84563efb6c739d9fff8c3645ae70a168b2c47aa375c4d6960ba4287e339243cb8ec50809522ab40f57d8cc6f471ff4390b8aa747cc1a7af65aa  resolver.patch
f4265df7532625070c51ac43466e3e0f21e696f90c3b6040ef62a21defa7666203ff8219d9c9a5bebc011024aff300fbcbd941cebd0df59c4bc068d8f290221e  swiftshader.patch
cf9970ef403ff7a68bf08c0ba5e681eec459fcb1afb6859e5a80f4874f1b9a656377b4540eeb5208ddec570efa206f147e32718c687fa29ca3acc4fde6e8cbe8  chromium-use-alpine-target.patch
599f5ef338b5797e04436bdc88921c31365d2dea2613d40053be6e774f654e2889efb0c0bd55c2c5044a6805510fbc337da555971169a75d584fac93e18256ac  media-base.patch
2e5a83826239849d096aead033eb519338b84e6fbbf58abfcd7cfe40d0b3070b66bcc825ec84406484d73d1a333f1b9d23a8ab44987ab5c8b187076c84cd668b  musl-crashpad.patch
556cc2ba28184a75745f13c673605327f5be590be179eb3f941dc0abded854a814e5da1432a28fb8d4dcdcd66ffd4c94ee1a8824d2cd93b632f48e9310dbc3fa  musl-v8-monotonic-pthread-cont_timedwait.patch
7957aae04e8ef3badbc98c982ba1acb1b9ef5e665440116c704512f11554d7b64ba3643b7ff7d00476a6686324033b0cf762deb78ce798619226380953b9dc9c  nasm.patch
56a357668c0928bc488ccec8f53fd37fccbaefe0a185ceaf067c8c39e0fae3d2b61ca010ccabc785bec0f2e86b19f37cebb3ac344225aa8d7651c822e48c6064  gcc-fno-delete-null-pointer-checks.patch
ad4ddc25df7aa1de2038b7adb86d27679ecdb7e3e16c0eec994e947a08c41504b6fb41166f7868ff5f58ce8191c78800cbb91d259c864840fa5af1d7ba5d43a1  gcc-arm.patch
cc67d2a77910663e5a1ad5f66606ee2544867aa1fef25e1a1bc355a8db765d5928edb72f158e6a2ece4195c9b62b875dcdcab4e4055e7611edab405e8cfd658e  aarch64-fixes.patch
9b1441fe42421ef9ead86a5143bf997d989bd53a8969cdfdf4e0c45f847efc8c1d127e15fb05e2ef5dbefbb228cbdc2849404d74997ca56265599e12e5efd6e4  elf-arm.patch
51fabfc4725ab13f626653c1cc91a70df5e60477351ac1fe7f94bc9f1b1f8fb32d984ba4657f0384f53de620b7dd4aa154c6f2f104c4c42fcfe2f9721ba5ea1f  remove-unsupported-attribute.patch
f924539cd1bb8ee87f5dfb5acc6dc33a653b58d96d3b581dc7ab76489775ce0c39a2c9c541d25c6df142225344fe7932c81ec8d015e21eac03658abf7838fae4  fix-missing-includes.patch
2f976087c7f9b685d7526c6ccfe662ba642189b5044224e662e6965d9dfa5ba5b96f8bb7ebef1cb225356e7f63427288b42f12e9842d432164de9ac74642805a  revert-2778794.patch
f2291a1fb233615cf0eb2e1fac61307a8e6dc1981eb60f3f4f91e4318dfbc2ce8d96660cd355d397882b06fe4d66a091247c9affc30e19d17190cfe3ac155352  disable-floc-component.patch
2d9ec3dcdcef25cdeba5550870b8568d5b4bf210ec42d5726493c4c0aa5ded3f685b1497769a4607ada8f397a366841e47a41152a39df6fac1c7c2a0ed160571  fix-unittests-base.patch
54f07ee9d85577e284e04460e79132fa6769251ceb045561cea811dde0369e9e4cdbcf26566235b0d12c649be4d46fea294f7c6a4e2a75109dc3282e6e7d7993  fix-unittests-sandbox.patch
805319867214c997a262b0eee161c2efe9f46420b2d244083f186977c7ffa413526161682759fbfcc7bb5845bcf9624557c2f496dc560bd4d85ab71a9e47c305  fix-unittests-net.patch
94d48612e98063f0b4589aadbc74d681170c0672df643d7e97485e947c92bf8437e7962323dc2940a4a36b7dcb009ed25d58654877e04644c13f9a9bd13ba99c  fix-unittests-net-py2tests.patch
8d11b2ba811fdd6280784bfafcef073238324941b4c33e7c9a5ccfde8506242d06e5136d697f047bab3838b43a666f1da404af7b4f4ff9a0c6bf6bdb8448e5b2  scoped-file.patch
7ab510eb458c5e736237c8b0251b13677d78653c75cc693e54d0885695ce8578f65b5f96b95886c3993dcfa6987eac0c9f90309545b701005a8da20261033496  strip-binary.patch
b2684e64c7fc248ab8ddbd942326353ecfa2fa4195d2b96434d9dae52e11dadb8d81f0ecc740d13232fd73324318d8b4831ea08ce788106ec762e53df545e743  gdbinit.patch
7fcba58f38adbaa394efbfa8fe387c91e79950e4e6b9dbe32064a57fa031457020ed4003376a9af582584f2d20f07d3a40e8b546e9c2b3b01b8d9eda8b5a9d74  v8-constexpr.patch
40376e87971b5870dc1bb63121c67a0b78d88564a961d50ffd5da887b9e0989423fe266544bbafae885cd4e827caa333bb42c883572b9cca808098fe374c8c5c  quiche-arena-size.patch
907afc4823bc58c83751005a2da0f0d264f4b80beba8031b58e6faf4fcb7dbd1b341409ba8b4a95291e5fa964f28f54f9f08ddb015ea368516abef059f14fb4c  renamed-freetype-member.patch
"