Gentoo Archives: gentoo-commits

From: Stephan Hartmann <sultan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/files/, www-client/chromium/
Date: Mon, 22 Nov 2021 16:03:31
Message-Id: 1637596978.572543329f9479c9b454fe97917b4d3f3b3cf8ca.sultan@gentoo
1 commit: 572543329f9479c9b454fe97917b4d3f3b3cf8ca
2 Author: Stephan Hartmann <sultan <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 22 16:02:58 2021 +0000
4 Commit: Stephan Hartmann <sultan <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 22 16:02:58 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57254332
7
8 www-client/chromium: dev channel bump to 98.0.4710.4
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>
12
13 www-client/chromium/Manifest | 2 +
14 www-client/chromium/chromium-98.0.4710.4.ebuild | 956 +++++++++++++++++++++
15 .../files/chromium-98-EnumTable-crash.patch | 76 ++
16 .../chromium/files/chromium-98-system-libdrm.patch | 34 +
17 www-client/chromium/metadata.xml | 1 +
18 5 files changed, 1069 insertions(+)
19
20 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
21 index d2577b96d37c..25a784ab1d5e 100644
22 --- a/www-client/chromium/Manifest
23 +++ b/www-client/chromium/Manifest
24 @@ -4,3 +4,5 @@ DIST chromium-96-patchset-4.tar.xz 4812 BLAKE2B 5d82d212b8ec1689be6f4a7a06462563
25 DIST chromium-96.0.4664.45.tar.xz 1221965612 BLAKE2B e990a2c3f0ae6d8bc4b6dddbecea2c640bb6491d9b321a301c1f168a35ad37553a23b8290a28dc05d50be005d3ad57fa69af2d3574266b9c83dcd24e65116c35 SHA512 0b1ccaf95697c14cb080dcb22e8584817ddcd98e704d081bc4f35a22dcfc8cca82dcabc4b82ad89ed0cd64752d226f389941bfab33b615e3948e2f778b9d9028
26 DIST chromium-97-patchset-4.tar.xz 4240 BLAKE2B 450d013b6fd68f7e0bcb21a2b0828d531eda86965e636fe24fc36c2e7e1f74fe93f27f0d4b1d03e67c605797e28db37de4949ff78d5106e07b0362bec4bc5d8a SHA512 181c706c83bdbe07b2e7f02b654922a860aea761ad267e6545fb7d56b66373b003c1c79fae5cd45eeb3be8917782fa45df1c05bbb00e170f0146e7385f4246c4
27 DIST chromium-97.0.4692.20.tar.xz 1225705204 BLAKE2B fd972611d2f6fdd385a7b33dd6ecb73a09804c6f94c8f4b8663efac1aada87df778c1f6172594e3b8cd9fcce404f0b32ff80998cb996a18428efb04e8ed179db SHA512 3cd83efb93c88052e1f4b80342247536ec999bb2fffa3fd0394ef21d805de734b9582be4b82f65de1cfd8acc53c5118e7e9a2719a1279f6d1a22aefcf22bd9d7
28 +DIST chromium-98-patchset-1.tar.xz 3792 BLAKE2B c35ec4b6343de1c8257fa8581ab05bdaee9d385947fb888bed461f90588405da74acdde5ba4dd9941574b96d54a95e54d7240da6f5d818b389f0aa37db5deb85 SHA512 95cc123557549be6675c8e4f4d70af12b0fab3e592543b826dc9326d4a74b84fe62ded380c8130e70c198595c1f1a4ef08f289956ded8856fbdaf02831221f9b
29 +DIST chromium-98.0.4710.4.tar.xz 1222819976 BLAKE2B 1af16bcecf4be8f53b4c8f41c9fca18014a72a69fe2703aa7119c2228338ba75c76e4fc2eefa098279228ea4c13e16235bc8f642cd6597e424830fb9774cace3 SHA512 256b695d41a7810beb3f75e23ab0aead25f10dd60af0cc5b3379c0f821e9161e08b5bac3633d38afd36f110342698263d0c5de36c84bb6de8747b35f3c546180
30
31 diff --git a/www-client/chromium/chromium-98.0.4710.4.ebuild b/www-client/chromium/chromium-98.0.4710.4.ebuild
32 new file mode 100644
33 index 000000000000..27f45f3e4b5d
34 --- /dev/null
35 +++ b/www-client/chromium/chromium-98.0.4710.4.ebuild
36 @@ -0,0 +1,956 @@
37 +# Copyright 2009-2021 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=8
41 +PYTHON_COMPAT=( python3_{8..10} )
42 +PYTHON_REQ_USE="xml"
43 +
44 +CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
45 + hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr
46 + sv sw ta te th tr uk vi zh-CN zh-TW"
47 +
48 +inherit check-reqs chromium-2 desktop flag-o-matic ninja-utils pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
49 +
50 +DESCRIPTION="Open-source version of Google Chrome web browser"
51 +HOMEPAGE="https://chromium.org/"
52 +PATCHSET="1"
53 +PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
54 +SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
55 + https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz"
56 +
57 +LICENSE="BSD"
58 +SLOT="0/dev"
59 +KEYWORDS="~amd64 ~arm64 ~x86"
60 +IUSE="component-build cups cpu_flags_arm_neon debug +hangouts headless +js-type-check kerberos +official pic +proprietary-codecs pulseaudio screencast selinux +suid +system-ffmpeg +system-harfbuzz +system-icu +system-png vaapi wayland widevine"
61 +REQUIRED_USE="
62 + component-build? ( !suid )
63 + screencast? ( wayland )
64 +"
65 +
66 +COMMON_X_DEPEND="
67 + media-libs/mesa:=[gbm(+)]
68 + x11-libs/libX11:=
69 + x11-libs/libXcomposite:=
70 + x11-libs/libXcursor:=
71 + x11-libs/libXdamage:=
72 + x11-libs/libXext:=
73 + x11-libs/libXfixes:=
74 + >=x11-libs/libXi-1.6.0:=
75 + x11-libs/libXrandr:=
76 + x11-libs/libXrender:=
77 + x11-libs/libXtst:=
78 + x11-libs/libxcb:=
79 + x11-libs/libxshmfence:=
80 + vaapi? ( >=x11-libs/libva-2.7:=[X,drm] )
81 +"
82 +
83 +COMMON_DEPEND="
84 + app-arch/bzip2:=
85 + cups? ( >=net-print/cups-1.3.11:= )
86 + dev-libs/expat:=
87 + dev-libs/glib:2
88 + >=dev-libs/libxml2-2.9.4-r3:=[icu]
89 + dev-libs/nspr:=
90 + >=dev-libs/nss-3.26:=
91 + >=media-libs/alsa-lib-1.0.19:=
92 + media-libs/fontconfig:=
93 + >=media-libs/freetype-2.11.0-r1:=
94 + system-harfbuzz? ( >=media-libs/harfbuzz-2.9.0:0=[icu(-)] )
95 + media-libs/libjpeg-turbo:=
96 + system-png? ( media-libs/libpng:=[-apng] )
97 + pulseaudio? ( media-sound/pulseaudio:= )
98 + system-ffmpeg? (
99 + >=media-video/ffmpeg-4.3:=
100 + || (
101 + media-video/ffmpeg[-samba]
102 + >=net-fs/samba-4.5.10-r1[-debug(-)]
103 + )
104 + >=media-libs/opus-1.3.1:=
105 + )
106 + net-misc/curl[ssl]
107 + sys-apps/dbus:=
108 + sys-apps/pciutils:=
109 + virtual/udev
110 + x11-libs/cairo:=
111 + x11-libs/gdk-pixbuf:2
112 + x11-libs/libxkbcommon:=
113 + x11-libs/pango:=
114 + media-libs/flac:=
115 + >=media-libs/libwebp-0.4.0:=
116 + sys-libs/zlib:=[minizip]
117 + kerberos? ( virtual/krb5 )
118 + !headless? (
119 + ${COMMON_X_DEPEND}
120 + >=app-accessibility/at-spi2-atk-2.26:2
121 + >=app-accessibility/at-spi2-core-2.26:2
122 + >=dev-libs/atk-2.26
123 + x11-libs/gtk+:3[X]
124 + wayland? (
125 + dev-libs/wayland:=
126 + screencast? ( media-video/pipewire:0/0.3 )
127 + x11-libs/gtk+:3[wayland,X]
128 + x11-libs/libdrm:=
129 + )
130 + )
131 +"
132 +RDEPEND="${COMMON_DEPEND}
133 + x11-misc/xdg-utils
134 + virtual/opengl
135 + virtual/ttf-fonts
136 + selinux? ( sec-policy/selinux-chromium )
137 +"
138 +DEPEND="${COMMON_DEPEND}
139 +"
140 +# dev-vcs/git - https://bugs.gentoo.org/593476
141 +BDEPEND="
142 + ${PYTHON_DEPS}
143 + $(python_gen_any_dep '
144 + dev-python/setuptools[${PYTHON_USEDEP}]
145 + ')
146 + >=app-arch/gzip-1.7
147 + dev-lang/perl
148 + >=dev-util/gn-0.1807
149 + dev-vcs/git
150 + >=dev-util/gperf-3.0.3
151 + >=dev-util/ninja-1.7.2
152 + >=net-libs/nodejs-7.6.0[inspector]
153 + sys-apps/hwids[usb(+)]
154 + >=sys-devel/bison-2.4.3
155 + sys-devel/flex
156 + virtual/pkgconfig
157 + js-type-check? ( virtual/jre )
158 +"
159 +
160 +# These are intended for ebuild maintainer use to force clang if GCC is broken.
161 +: ${CHROMIUM_FORCE_CLANG=no}
162 +: ${CHROMIUM_FORCE_LIBCXX=no}
163 +
164 +if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
165 + BDEPEND+=" >=sys-devel/clang-12"
166 +fi
167 +
168 +if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
169 + RDEPEND+=" >=sys-libs/libcxx-12"
170 + DEPEND+=" >=sys-libs/libcxx-12"
171 +else
172 + COMMON_DEPEND="
173 + dev-libs/libxslt:=
174 + >=dev-libs/re2-0.2019.08.01:=
175 + >=media-libs/openh264-1.6.0:=
176 + system-icu? ( >=dev-libs/icu-69.1:= )
177 + "
178 + RDEPEND+="${COMMON_DEPEND}"
179 + DEPEND+="${COMMON_DEPEND}"
180 +fi
181 +
182 +if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
183 + EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
184 +fi
185 +
186 +DISABLE_AUTOFORMATTING="yes"
187 +DOC_CONTENTS="
188 +Some web pages may require additional fonts to display properly.
189 +Try installing some of the following packages if some characters
190 +are not displayed properly:
191 +- media-fonts/arphicfonts
192 +- media-fonts/droid
193 +- media-fonts/ipamonafont
194 +- media-fonts/noto
195 +- media-fonts/ja-ipafonts
196 +- media-fonts/takao-fonts
197 +- media-fonts/wqy-microhei
198 +- media-fonts/wqy-zenhei
199 +
200 +To fix broken icons on the Downloads page, you should install an icon
201 +theme that covers the appropriate MIME types, and configure this as your
202 +GTK+ icon theme.
203 +
204 +For native file dialogs in KDE, install kde-apps/kdialog.
205 +
206 +To make password storage work with your desktop environment you may
207 +have install one of the supported credentials management applications:
208 +- app-crypt/libsecret (GNOME)
209 +- kde-frameworks/kwallet (KDE)
210 +If you have one of above packages installed, but don't want to use
211 +them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
212 +in /etc/chromium/default.
213 +"
214 +
215 +python_check_deps() {
216 + has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
217 +}
218 +
219 +pre_build_checks() {
220 + if [[ ${MERGE_TYPE} != binary ]]; then
221 + local -x CPP="$(tc-getCXX) -E"
222 + if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
223 + die "At least gcc 9.2 is required"
224 + fi
225 + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then
226 + CPP="${CHOST}-clang++ -E"
227 + if ! ver_test "$(clang-major-version)" -ge 12; then
228 + die "At least clang 12 is required"
229 + fi
230 + fi
231 + fi
232 +
233 + # Check build requirements, bug #541816 and bug #471810 .
234 + CHECKREQS_MEMORY="4G"
235 + CHECKREQS_DISK_BUILD="9G"
236 + if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
237 + if use custom-cflags || use component-build; then
238 + CHECKREQS_DISK_BUILD="25G"
239 + fi
240 + if ! use component-build; then
241 + CHECKREQS_MEMORY="16G"
242 + fi
243 + fi
244 + check-reqs_pkg_setup
245 +}
246 +
247 +pkg_pretend() {
248 + pre_build_checks
249 +}
250 +
251 +pkg_setup() {
252 + pre_build_checks
253 +
254 + chromium_suid_sandbox_check_kernel_config
255 +
256 + # nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams
257 + if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then
258 + ewarn "Proprietary nVidia driver does not work with Wayland. You can disable"
259 + ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default."
260 + fi
261 +}
262 +
263 +src_prepare() {
264 + # Calling this here supports resumption via FEATURES=keepwork
265 + python_setup
266 +
267 + local PATCHES=(
268 + "${WORKDIR}/patches"
269 + "${FILESDIR}/chromium-93-InkDropHost-crash.patch"
270 + "${FILESDIR}/chromium-98-EnumTable-crash.patch"
271 + "${FILESDIR}/chromium-98-system-libdrm.patch"
272 + "${FILESDIR}/chromium-glibc-2.34.patch"
273 + "${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
274 + "${FILESDIR}/chromium-shim_headers.patch"
275 + )
276 +
277 + default
278 +
279 + mkdir -p third_party/node/linux/node-linux-x64/bin || die
280 + ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
281 +
282 + # adjust python interpreter version
283 + sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
284 +
285 + local keeplibs=(
286 + base/third_party/cityhash
287 + base/third_party/double_conversion
288 + base/third_party/dynamic_annotations
289 + base/third_party/icu
290 + base/third_party/nspr
291 + base/third_party/superfasthash
292 + base/third_party/symbolize
293 + base/third_party/valgrind
294 + base/third_party/xdg_mime
295 + base/third_party/xdg_user_dirs
296 + buildtools/third_party/libc++
297 + buildtools/third_party/libc++abi
298 + chrome/third_party/mozilla_security_manager
299 + courgette/third_party
300 + net/third_party/mozilla_security_manager
301 + net/third_party/nss
302 + net/third_party/quic
303 + net/third_party/uri_template
304 + third_party/abseil-cpp
305 + third_party/angle
306 + third_party/angle/src/common/third_party/base
307 + third_party/angle/src/common/third_party/smhasher
308 + third_party/angle/src/common/third_party/xxhash
309 + third_party/angle/src/third_party/libXNVCtrl
310 + third_party/angle/src/third_party/trace_event
311 + third_party/angle/src/third_party/volk
312 + third_party/apple_apsl
313 + third_party/axe-core
314 + third_party/blink
315 + third_party/boringssl
316 + third_party/boringssl/src/third_party/fiat
317 + third_party/breakpad
318 + third_party/breakpad/breakpad/src/third_party/curl
319 + third_party/brotli
320 + third_party/catapult
321 + third_party/catapult/common/py_vulcanize/third_party/rcssmin
322 + third_party/catapult/common/py_vulcanize/third_party/rjsmin
323 + third_party/catapult/third_party/beautifulsoup4-4.9.3
324 + third_party/catapult/third_party/html5lib-1.1
325 + third_party/catapult/third_party/polymer
326 + third_party/catapult/third_party/six
327 + third_party/catapult/tracing/third_party/d3
328 + third_party/catapult/tracing/third_party/gl-matrix
329 + third_party/catapult/tracing/third_party/jpeg-js
330 + third_party/catapult/tracing/third_party/jszip
331 + third_party/catapult/tracing/third_party/mannwhitneyu
332 + third_party/catapult/tracing/third_party/oboe
333 + third_party/catapult/tracing/third_party/pako
334 + third_party/ced
335 + third_party/cld_3
336 + third_party/closure_compiler
337 + third_party/crashpad
338 + third_party/crashpad/crashpad/third_party/lss
339 + third_party/crashpad/crashpad/third_party/zlib
340 + third_party/crc32c
341 + third_party/cros_system_api
342 + third_party/dav1d
343 + third_party/dawn
344 + third_party/dawn/third_party/khronos
345 + third_party/dawn/third_party/tint
346 + third_party/depot_tools
347 + third_party/devscripts
348 + third_party/devtools-frontend
349 + third_party/devtools-frontend/src/front_end/third_party/acorn
350 + third_party/devtools-frontend/src/front_end/third_party/axe-core
351 + third_party/devtools-frontend/src/front_end/third_party/chromium
352 + third_party/devtools-frontend/src/front_end/third_party/codemirror
353 + third_party/devtools-frontend/src/front_end/third_party/diff
354 + third_party/devtools-frontend/src/front_end/third_party/i18n
355 + third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
356 + third_party/devtools-frontend/src/front_end/third_party/lighthouse
357 + third_party/devtools-frontend/src/front_end/third_party/lit-html
358 + third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
359 + third_party/devtools-frontend/src/front_end/third_party/marked
360 + third_party/devtools-frontend/src/front_end/third_party/puppeteer
361 + third_party/devtools-frontend/src/front_end/third_party/wasmparser
362 + third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
363 + third_party/devtools-frontend/src/third_party
364 + third_party/distributed_point_functions
365 + third_party/dom_distiller_js
366 + third_party/eigen3
367 + third_party/emoji-segmenter
368 + third_party/farmhash
369 + third_party/fdlibm
370 + third_party/fft2d
371 + third_party/flatbuffers
372 + third_party/freetype
373 + third_party/fusejs
374 + third_party/highway
375 + third_party/libgifcodec
376 + third_party/liburlpattern
377 + third_party/libzip
378 + third_party/gemmlowp
379 + third_party/google_input_tools
380 + third_party/google_input_tools/third_party/closure_library
381 + third_party/google_input_tools/third_party/closure_library/third_party/closure
382 + third_party/googletest
383 + third_party/hunspell
384 + third_party/iccjpeg
385 + third_party/inspector_protocol
386 + third_party/jinja2
387 + third_party/jsoncpp
388 + third_party/jstemplate
389 + third_party/khronos
390 + third_party/leveldatabase
391 + third_party/libXNVCtrl
392 + third_party/libaddressinput
393 + third_party/libaom
394 + third_party/libaom/source/libaom/third_party/fastfeat
395 + third_party/libaom/source/libaom/third_party/vector
396 + third_party/libaom/source/libaom/third_party/x86inc
397 + third_party/libavif
398 + third_party/libgav1
399 + third_party/libjingle
400 + third_party/libjxl
401 + third_party/libphonenumber
402 + third_party/libsecret
403 + third_party/libsrtp
404 + third_party/libsync
405 + third_party/libudev
406 + third_party/libva_protected_content
407 + third_party/libvpx
408 + third_party/libvpx/source/libvpx/third_party/x86inc
409 + third_party/libwebm
410 + third_party/libx11
411 + third_party/libxcb-keysyms
412 + third_party/libxml/chromium
413 + third_party/libyuv
414 + third_party/llvm
415 + third_party/lottie
416 + third_party/lss
417 + third_party/lzma_sdk
418 + third_party/mako
419 + third_party/maldoca
420 + third_party/maldoca/src/third_party/tensorflow_protos
421 + third_party/maldoca/src/third_party/zlibwrapper
422 + third_party/markupsafe
423 + third_party/mesa
424 + third_party/metrics_proto
425 + third_party/minigbm
426 + third_party/modp_b64
427 + third_party/nasm
428 + third_party/nearby
429 + third_party/neon_2_sse
430 + third_party/node
431 + third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
432 + third_party/one_euro_filter
433 + third_party/opencv
434 + third_party/openscreen
435 + third_party/openscreen/src/third_party/mozilla
436 + third_party/openscreen/src/third_party/tinycbor/src/src
437 + third_party/ots
438 + third_party/pdfium
439 + third_party/pdfium/third_party/agg23
440 + third_party/pdfium/third_party/base
441 + third_party/pdfium/third_party/bigint
442 + third_party/pdfium/third_party/freetype
443 + third_party/pdfium/third_party/lcms
444 + third_party/pdfium/third_party/libopenjpeg20
445 + third_party/pdfium/third_party/libpng16
446 + third_party/pdfium/third_party/libtiff
447 + third_party/pdfium/third_party/skia_shared
448 + third_party/perfetto
449 + third_party/perfetto/protos/third_party/chromium
450 + third_party/pffft
451 + third_party/ply
452 + third_party/polymer
453 + third_party/private-join-and-compute
454 + third_party/private_membership
455 + third_party/protobuf
456 + third_party/protobuf/third_party/six
457 + third_party/pyjson5
458 + third_party/qcms
459 + third_party/rnnoise
460 + third_party/s2cellid
461 + third_party/securemessage
462 + third_party/shell-encryption
463 + third_party/simplejson
464 + third_party/skia
465 + third_party/skia/include/third_party/skcms
466 + third_party/skia/include/third_party/vulkan
467 + third_party/skia/third_party/skcms
468 + third_party/skia/third_party/vulkan
469 + third_party/smhasher
470 + third_party/snappy
471 + third_party/sqlite
472 + third_party/swiftshader
473 + third_party/swiftshader/third_party/astc-encoder
474 + third_party/swiftshader/third_party/llvm-subzero
475 + third_party/swiftshader/third_party/marl
476 + third_party/swiftshader/third_party/subzero
477 + third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
478 + third_party/tcmalloc
479 + third_party/tensorflow-text
480 + third_party/tflite
481 + third_party/tflite/src/third_party/eigen3
482 + third_party/tflite/src/third_party/fft2d
483 + third_party/ruy
484 + third_party/six
485 + third_party/ukey2
486 + third_party/unrar
487 + third_party/usrsctp
488 + third_party/utf
489 + third_party/vulkan
490 + third_party/web-animations-js
491 + third_party/webdriver
492 + third_party/webgpu-cts
493 + third_party/webrtc
494 + third_party/webrtc/common_audio/third_party/ooura
495 + third_party/webrtc/common_audio/third_party/spl_sqrt_floor
496 + third_party/webrtc/modules/third_party/fft
497 + third_party/webrtc/modules/third_party/g711
498 + third_party/webrtc/modules/third_party/g722
499 + third_party/webrtc/rtc_base/third_party/base64
500 + third_party/webrtc/rtc_base/third_party/sigslot
501 + third_party/widevine
502 + third_party/woff2
503 + third_party/wuffs
504 + third_party/x11proto
505 + third_party/xcbproto
506 + third_party/zxcvbn-cpp
507 + third_party/zlib/google
508 + url/third_party/mozilla
509 + v8/src/third_party/siphash
510 + v8/src/third_party/valgrind
511 + v8/src/third_party/utf8-decoder
512 + v8/third_party/inspector_protocol
513 + v8/third_party/v8
514 +
515 + # gyp -> gn leftovers
516 + base/third_party/libevent
517 + third_party/speech-dispatcher
518 + third_party/usb_ids
519 + third_party/xdg-utils
520 + )
521 + if ! use system-ffmpeg; then
522 + keeplibs+=( third_party/ffmpeg third_party/opus )
523 + fi
524 + if ! use system-icu; then
525 + keeplibs+=( third_party/icu )
526 + fi
527 + if ! use system-png; then
528 + keeplibs+=( third_party/libpng )
529 + fi
530 + if use system-harfbuzz; then
531 + keeplibs+=( third_party/harfbuzz-ng/utils )
532 + else
533 + keeplibs+=( third_party/harfbuzz-ng )
534 + fi
535 + if use wayland && ! use headless ; then
536 + keeplibs+=( third_party/wayland )
537 + fi
538 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
539 + keeplibs+=( third_party/libxml )
540 + keeplibs+=( third_party/libxslt )
541 + keeplibs+=( third_party/openh264 )
542 + keeplibs+=( third_party/re2 )
543 + if use system-icu; then
544 + keeplibs+=( third_party/icu )
545 + fi
546 + fi
547 + if use arm64 || use ppc64 ; then
548 + keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
549 + fi
550 + # we need to generate ppc64 stuff because upstream does not ship it yet
551 + # it has to be done before unbundling.
552 + if use ppc64; then
553 + pushd third_party/libvpx >/dev/null || die
554 + mkdir -p source/config/linux/ppc64 || die
555 + ./generate_gni.sh || die
556 + popd >/dev/null || die
557 + fi
558 +
559 + # Remove most bundled libraries. Some are still needed.
560 + build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
561 +
562 + if use js-type-check; then
563 + ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die
564 + fi
565 +
566 + # bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
567 + mkdir -p buildtools/third_party/eu-strip/bin || die
568 + ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
569 +}
570 +
571 +src_configure() {
572 + # Calling this here supports resumption via FEATURES=keepwork
573 + python_setup
574 +
575 + local myconf_gn=""
576 +
577 + # Make sure the build system will use the right tools, bug #340795.
578 + tc-export AR CC CXX NM
579 +
580 + if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
581 + # Force clang since gcc is pretty broken at the moment.
582 + CC=${CHOST}-clang
583 + CXX=${CHOST}-clang++
584 + strip-unsupported-flags
585 + fi
586 +
587 + if tc-is-clang; then
588 + myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
589 + else
590 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
591 + die "Compiling with sys-libs/libcxx requires clang."
592 + fi
593 + myconf_gn+=" is_clang=false"
594 + fi
595 +
596 + # Define a custom toolchain for GN
597 + myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
598 +
599 + if tc-is-cross-compiler; then
600 + tc-export BUILD_{AR,CC,CXX,NM}
601 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
602 + myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
603 + else
604 + myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
605 + fi
606 +
607 + # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
608 + myconf_gn+=" is_debug=false"
609 +
610 + # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
611 + # DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
612 + myconf_gn+=" dcheck_always_on=$(usex debug true false)"
613 + myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
614 +
615 + # Component build isn't generally intended for use by end users. It's mostly useful
616 + # for development and debugging.
617 + myconf_gn+=" is_component_build=$(usex component-build true false)"
618 +
619 + # Disable nacl, we can't build without pnacl (http://crbug.com/269560).
620 + myconf_gn+=" enable_nacl=false"
621 +
622 + # Use system-provided libraries.
623 + # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
624 + # TODO: use_system_hunspell (upstream changes needed).
625 + # TODO: use_system_protobuf (bug #525560).
626 + # TODO: use_system_sqlite (http://crbug.com/22208).
627 +
628 + # libevent: https://bugs.gentoo.org/593458
629 + local gn_system_libraries=(
630 + flac
631 + fontconfig
632 + freetype
633 + # Need harfbuzz_from_pkgconfig target
634 + #harfbuzz-ng
635 + libdrm
636 + libjpeg
637 + libwebp
638 + zlib
639 + )
640 + if use system-ffmpeg; then
641 + gn_system_libraries+=( ffmpeg opus )
642 + fi
643 + if use system-icu; then
644 + gn_system_libraries+=( icu )
645 + fi
646 + if use system-png; then
647 + gn_system_libraries+=( libpng )
648 + fi
649 + if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then
650 + # unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++
651 + gn_system_libraries+=( libxml )
652 + gn_system_libraries+=( libxslt )
653 + gn_system_libraries+=( openh264 )
654 + gn_system_libraries+=( re2 )
655 + fi
656 + build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
657 +
658 + # See dependency logic in third_party/BUILD.gn
659 + myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
660 +
661 + # Disable deprecated libgnome-keyring dependency, bug #713012
662 + myconf_gn+=" use_gnome_keyring=false"
663 +
664 + # Optional dependencies.
665 + myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)"
666 + myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
667 + myconf_gn+=" enable_widevine=$(usex widevine true false)"
668 + myconf_gn+=" use_cups=$(usex cups true false)"
669 + myconf_gn+=" use_kerberos=$(usex kerberos true false)"
670 + myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
671 + myconf_gn+=" use_vaapi=$(usex vaapi true false)"
672 + myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
673 +
674 + # TODO: link_pulseaudio=true for GN.
675 +
676 + myconf_gn+=" disable_fieldtrial_testing_config=true"
677 +
678 + # Never use bundled gold binary. Disable gold linker flags for now.
679 + # Do not use bundled clang.
680 + # Trying to use gold results in linker crash.
681 + myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false"
682 +
683 + # Disable forced lld, bug 641556
684 + myconf_gn+=" use_lld=false"
685 +
686 + # Disable pseudolocales, only used for testing
687 + myconf_gn+=" enable_pseudolocales=false"
688 +
689 + # Disable code formating of generated files
690 + myconf_gn+=" blink_enable_generated_code_formatting=false"
691 +
692 + ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
693 + myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
694 + myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
695 +
696 + # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
697 + # Note: these are for Gentoo use ONLY. For your own distribution,
698 + # please get your own set of keys. Feel free to contact chromium@g.o
699 + # for more info. The OAuth2 credentials, however, have been left out.
700 + # Those OAuth2 credentials have been broken for quite some time anyway.
701 + # Instead we apply a patch to use the --oauth2-client-id= and
702 + # --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
703 + # GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
704 + # Chromium without baked-in values.
705 + local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
706 + myconf_gn+=" google_api_key=\"${google_api_key}\""
707 + local myarch="$(tc-arch)"
708 +
709 + # Avoid CFLAGS problems, bug #352457, bug #390147.
710 + if ! use custom-cflags; then
711 + replace-flags "-Os" "-O2"
712 + strip-flags
713 +
714 + # Debug info section overflows without component build
715 + # Prevent linker from running out of address space, bug #471810 .
716 + if ! use component-build || use x86; then
717 + filter-flags "-g*"
718 + fi
719 +
720 + # Prevent libvpx build failures. Bug 530248, 544702, 546984.
721 + if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
722 + filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4
723 + fi
724 + fi
725 +
726 + if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
727 + append-flags -stdlib=libc++
728 + append-ldflags -stdlib=libc++
729 + fi
730 +
731 + if [[ $myarch = amd64 ]] ; then
732 + myconf_gn+=" target_cpu=\"x64\""
733 + ffmpeg_target_arch=x64
734 + elif [[ $myarch = x86 ]] ; then
735 + myconf_gn+=" target_cpu=\"x86\""
736 + ffmpeg_target_arch=ia32
737 +
738 + # This is normally defined by compiler_cpu_abi in
739 + # build/config/compiler/BUILD.gn, but we patch that part out.
740 + append-flags -msse2 -mfpmath=sse -mmmx
741 + elif [[ $myarch = arm64 ]] ; then
742 + myconf_gn+=" target_cpu=\"arm64\""
743 + ffmpeg_target_arch=arm64
744 + elif [[ $myarch = arm ]] ; then
745 + myconf_gn+=" target_cpu=\"arm\""
746 + ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
747 + elif [[ $myarch = ppc64 ]] ; then
748 + myconf_gn+=" target_cpu=\"ppc64\""
749 + ffmpeg_target_arch=ppc64
750 + else
751 + die "Failed to determine target arch, got '$myarch'."
752 + fi
753 +
754 + # Make sure that -Werror doesn't get added to CFLAGS by the build system.
755 + # Depending on GCC version the warnings are different and we don't want
756 + # the build to fail because of that.
757 + myconf_gn+=" treat_warnings_as_errors=false"
758 +
759 + # Disable fatal linker warnings, bug 506268.
760 + myconf_gn+=" fatal_linker_warnings=false"
761 +
762 + # Bug 491582.
763 + export TMPDIR="${WORKDIR}/temp"
764 + mkdir -p -m 755 "${TMPDIR}" || die
765 +
766 + # https://bugs.gentoo.org/654216
767 + addpredict /dev/dri/ #nowarn
768 +
769 + #if ! use system-ffmpeg; then
770 + if false; then
771 + local build_ffmpeg_args=""
772 + if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
773 + build_ffmpeg_args+=" --disable-asm"
774 + fi
775 +
776 + # Re-configure bundled ffmpeg. See bug #491378 for example reasons.
777 + einfo "Configuring bundled ffmpeg..."
778 + pushd third_party/ffmpeg > /dev/null || die
779 + chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
780 + --branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
781 + chromium/scripts/copy_config.sh || die
782 + chromium/scripts/generate_gn.py || die
783 + popd > /dev/null || die
784 + fi
785 +
786 + # Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470
787 + append-cxxflags $(test-flags-CXX -flax-vector-conversions=all)
788 +
789 + # Disable unknown warning message from clang.
790 + tc-is-clang && append-flags -Wno-unknown-warning-option
791 +
792 + # Explicitly disable ICU data file support for system-icu builds.
793 + if use system-icu; then
794 + myconf_gn+=" icu_use_data_file=false"
795 + fi
796 +
797 + # Enable ozone wayland and/or headless support
798 + myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
799 + myconf_gn+=" ozone_platform_headless=true"
800 + myconf_gn+=" ozone_platform_x11=$(usex headless false true)"
801 + if use wayland || use headless; then
802 + if use headless; then
803 + myconf_gn+=" ozone_platform=\"headless\""
804 + myconf_gn+=" use_x11=false"
805 + else
806 + myconf_gn+=" ozone_platform_wayland=true"
807 + myconf_gn+=" use_system_libdrm=true"
808 + myconf_gn+=" use_system_minigbm=true"
809 + myconf_gn+=" use_xkbcommon=true"
810 + myconf_gn+=" ozone_platform=\"wayland\""
811 + fi
812 + else
813 + myconf_gn+=" ozone_platform=\"x11\""
814 + fi
815 +
816 + # Enable official builds
817 + myconf_gn+=" is_official_build=$(usex official true false)"
818 + myconf_gn+=" use_thin_lto=false"
819 + if use official; then
820 + # Allow building against system libraries in official builds
821 + sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
822 + tools/generate_shim_headers/generate_shim_headers.py || die
823 + # Disable CFI: unsupported for GCC, requires clang+lto+lld
824 + myconf_gn+=" is_cfi=false"
825 + # Disable PGO, because profile data is only compatible with >=clang-11
826 + myconf_gn+=" chrome_pgo_phase=0"
827 + # Don't add symbols to build
828 + myconf_gn+=" symbol_level=0"
829 + fi
830 +
831 + einfo "Configuring Chromium..."
832 + set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
833 + echo "$@"
834 + "$@" || die
835 +}
836 +
837 +src_compile() {
838 + # Final link uses lots of file descriptors.
839 + ulimit -n 2048
840 +
841 + # Calling this here supports resumption via FEATURES=keepwork
842 + python_setup
843 +
844 + # Don't inherit PYTHONPATH from environment, bug #789021, #812689
845 + local -x PYTHONPATH=
846 +
847 + #"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
848 +
849 + # Build mksnapshot and pax-mark it.
850 + local x
851 + for x in mksnapshot v8_context_snapshot_generator; do
852 + if tc-is-cross-compiler; then
853 + eninja -C out/Release "host/${x}"
854 + pax-mark m "out/Release/host/${x}"
855 + else
856 + eninja -C out/Release "${x}"
857 + pax-mark m "out/Release/${x}"
858 + fi
859 + done
860 +
861 + # Even though ninja autodetects number of CPUs, we respect
862 + # user's options, for debugging with -j 1 or any other reason.
863 + eninja -C out/Release chrome chromedriver
864 + use suid && eninja -C out/Release chrome_sandbox
865 +
866 + pax-mark m out/Release/chrome
867 +
868 + mv out/Release/chromedriver{.unstripped,} || die
869 +
870 + # Build manpage; bug #684550
871 + sed -e 's|@@PACKAGE@@|chromium-browser|g;
872 + s|@@MENUNAME@@|Chromium|g;' \
873 + chrome/app/resources/manpage.1.in > \
874 + out/Release/chromium-browser.1 || die
875 +
876 + # Build desktop file; bug #706786
877 + sed -e 's|@@MENUNAME@@|Chromium|g;
878 + s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
879 + s|@@PACKAGE@@|chromium-browser|g;
880 + s|\(^Exec=\)/usr/bin/|\1|g;' \
881 + chrome/installer/linux/common/desktop.template > \
882 + out/Release/chromium-browser-chromium.desktop || die
883 +}
884 +
885 +src_install() {
886 + local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
887 + exeinto "${CHROMIUM_HOME}"
888 + doexe out/Release/chrome
889 +
890 + if use suid; then
891 + newexe out/Release/chrome_sandbox chrome-sandbox
892 + fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
893 + fi
894 +
895 + doexe out/Release/chromedriver
896 + doexe out/Release/chrome_crashpad_handler
897 +
898 + ozone_auto_session () {
899 + use wayland && ! use headless && echo true || echo false
900 + }
901 + local sedargs=( -e
902 + "s:/usr/lib/:/usr/$(get_libdir)/:g;
903 + s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
904 + )
905 + sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
906 + doexe chromium-launcher.sh
907 +
908 + # It is important that we name the target "chromium-browser",
909 + # xdg-utils expect it; bug #355517.
910 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
911 + # keep the old symlink around for consistency
912 + dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
913 +
914 + dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
915 +
916 + # Allow users to override command-line options, bug #357629.
917 + insinto /etc/chromium
918 + newins "${FILESDIR}/chromium.default" "default"
919 +
920 + pushd out/Release/locales > /dev/null || die
921 + chromium_remove_language_paks
922 + popd
923 +
924 + insinto "${CHROMIUM_HOME}"
925 + doins out/Release/*.bin
926 + doins out/Release/*.pak
927 + (
928 + shopt -s nullglob
929 + local files=(out/Release/*.so out/Release/*.so.[0-9])
930 + [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
931 + )
932 +
933 + if ! use system-icu; then
934 + doins out/Release/icudtl.dat
935 + fi
936 +
937 + doins -r out/Release/locales
938 + doins -r out/Release/resources
939 + doins -r out/Release/MEIPreload
940 +
941 + if [[ -d out/Release/swiftshader ]]; then
942 + insinto "${CHROMIUM_HOME}/swiftshader"
943 + doins out/Release/swiftshader/*.so
944 + fi
945 +
946 + # Install icons
947 + local branding size
948 + for size in 16 24 32 48 64 128 256 ; do
949 + case ${size} in
950 + 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
951 + *) branding="chrome/app/theme/chromium" ;;
952 + esac
953 + newicon -s ${size} "${branding}/product_logo_${size}.png" \
954 + chromium-browser.png
955 + done
956 +
957 + # Install desktop entry
958 + domenu out/Release/chromium-browser-chromium.desktop
959 +
960 + # Install GNOME default application entry (bug #303100).
961 + insinto /usr/share/gnome-control-center/default-apps
962 + newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
963 +
964 + # Install manpage; bug #684550
965 + doman out/Release/chromium-browser.1
966 + dosym chromium-browser.1 /usr/share/man/man1/chromium.1
967 +
968 + readme.gentoo_create_doc
969 +}
970 +
971 +pkg_postrm() {
972 + xdg_icon_cache_update
973 + xdg_desktop_database_update
974 +}
975 +
976 +pkg_postinst() {
977 + xdg_icon_cache_update
978 + xdg_desktop_database_update
979 + readme.gentoo_print_elog
980 +
981 + if use vaapi; then
982 + elog "VA-API is disabled by default at runtime. You have to enable it"
983 + elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
984 + elog "in /etc/chromium/default."
985 + fi
986 + if use screencast; then
987 + elog "Screencast is disabled by default at runtime. Either enable it"
988 + elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
989 + elog "inside Chromium or add --enable-webrtc-pipewire-capturer"
990 + elog "to CHROMIUM_FLAGS in /etc/chromium/default."
991 + fi
992 +}
993
994 diff --git a/www-client/chromium/files/chromium-98-EnumTable-crash.patch b/www-client/chromium/files/chromium-98-EnumTable-crash.patch
995 new file mode 100644
996 index 000000000000..f058ec18327a
997 --- /dev/null
998 +++ b/www-client/chromium/files/chromium-98-EnumTable-crash.patch
999 @@ -0,0 +1,76 @@
1000 +diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h
1001 +index 842553a..89de703 100644
1002 +--- a/components/cast_channel/enum_table.h
1003 ++++ b/components/cast_channel/enum_table.h
1004 +@@ -8,6 +8,7 @@
1005 + #include <cstdint>
1006 + #include <cstring>
1007 + #include <ostream>
1008 ++#include <vector>
1009 +
1010 + #include "base/check_op.h"
1011 + #include "base/notreached.h"
1012 +@@ -187,7 +188,6 @@ class
1013 + inline constexpr GenericEnumTableEntry(int32_t value);
1014 + inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
1015 +
1016 +- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
1017 + GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
1018 +
1019 + private:
1020 +@@ -253,7 +253,6 @@ class EnumTable {
1021 + constexpr Entry(E value, base::StringPiece str)
1022 + : GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
1023 +
1024 +- Entry(const Entry&) = delete;
1025 + Entry& operator=(const Entry&) = delete;
1026 + };
1027 +
1028 +@@ -312,15 +311,14 @@ class EnumTable {
1029 + if (is_sorted_) {
1030 + const std::size_t index = static_cast<std::size_t>(value);
1031 + if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
1032 +- const auto& entry = data_.begin()[index];
1033 ++ const auto& entry = data_[index];
1034 + if (ANALYZER_ASSUME_TRUE(entry.has_str()))
1035 + return entry.str();
1036 + }
1037 + return absl::nullopt;
1038 + }
1039 + return GenericEnumTableEntry::FindByValue(
1040 +- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
1041 +- data_.size(), static_cast<int32_t>(value));
1042 ++ &data_[0], data_.size(), static_cast<int32_t>(value));
1043 + }
1044 +
1045 + // This overload of GetString is designed for cases where the argument is a
1046 +@@ -348,8 +346,7 @@ class EnumTable {
1047 + // enum value directly.
1048 + absl::optional<E> GetEnum(base::StringPiece str) const {
1049 + auto* entry = GenericEnumTableEntry::FindByString(
1050 +- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
1051 +- data_.size(), str);
1052 ++ &data_[0], data_.size(), str);
1053 + return entry ? static_cast<E>(entry->value) : absl::optional<E>();
1054 + }
1055 +
1056 +@@ -364,7 +361,7 @@ class EnumTable {
1057 + // Align the data on a cache line boundary.
1058 + alignas(64)
1059 + #endif
1060 +- std::initializer_list<Entry> data_;
1061 ++ const std::vector<Entry> data_;
1062 + bool is_sorted_;
1063 +
1064 + constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
1065 +@@ -376,8 +373,8 @@ class EnumTable {
1066 +
1067 + for (std::size_t i = 0; i < data.size(); i++) {
1068 + for (std::size_t j = i + 1; j < data.size(); j++) {
1069 +- const Entry& ei = data.begin()[i];
1070 +- const Entry& ej = data.begin()[j];
1071 ++ const Entry& ei = data[i];
1072 ++ const Entry& ej = data[j];
1073 + DCHECK(ei.value != ej.value)
1074 + << "Found duplicate enum values at indices " << i << " and " << j;
1075 + DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))
1076
1077 diff --git a/www-client/chromium/files/chromium-98-system-libdrm.patch b/www-client/chromium/files/chromium-98-system-libdrm.patch
1078 new file mode 100644
1079 index 000000000000..f2f18beda3db
1080 --- /dev/null
1081 +++ b/www-client/chromium/files/chromium-98-system-libdrm.patch
1082 @@ -0,0 +1,34 @@
1083 +diff --git a/media/gpu/chromeos/BUILD.gn b/media/gpu/chromeos/BUILD.gn
1084 +index a5c8945..d742d80 100644
1085 +--- a/media/gpu/chromeos/BUILD.gn
1086 ++++ b/media/gpu/chromeos/BUILD.gn
1087 +@@ -32,6 +32,7 @@ source_set("chromeos") {
1088 +
1089 + if (use_vaapi) {
1090 + deps += [
1091 ++ "//build/config/linux/libdrm",
1092 + "//media/gpu/vaapi",
1093 + "//media/gpu/vaapi:common",
1094 + ]
1095 +diff --git a/media/gpu/chromeos/video_decoder_pipeline.cc b/media/gpu/chromeos/video_decoder_pipeline.cc
1096 +index 2d77cd9..1883fd4 100644
1097 +--- a/media/gpu/chromeos/video_decoder_pipeline.cc
1098 ++++ b/media/gpu/chromeos/video_decoder_pipeline.cc
1099 +@@ -4,6 +4,9 @@
1100 +
1101 + #include "media/gpu/chromeos/video_decoder_pipeline.h"
1102 +
1103 ++#if BUILDFLAG(USE_VAAPI)
1104 ++#include <drm_fourcc.h>
1105 ++#endif
1106 + #include <memory>
1107 +
1108 + #include "base/bind.h"
1109 +@@ -28,7 +31,6 @@
1110 +
1111 + #if BUILDFLAG(USE_VAAPI)
1112 + #include "media/gpu/vaapi/vaapi_video_decoder.h"
1113 +-#include "third_party/libdrm/src/include/drm/drm_fourcc.h"
1114 + #elif BUILDFLAG(USE_V4L2_CODEC)
1115 + #include "media/gpu/v4l2/v4l2_video_decoder.h"
1116 + #else
1117
1118 diff --git a/www-client/chromium/metadata.xml b/www-client/chromium/metadata.xml
1119 index 6797780530d5..dcdaa4ce4a04 100644
1120 --- a/www-client/chromium/metadata.xml
1121 +++ b/www-client/chromium/metadata.xml
1122 @@ -19,6 +19,7 @@
1123 <flag name="system-ffmpeg">Use system ffmpeg instead of the bundled one</flag>
1124 <flag name="system-harfbuzz">Use system harfbuzz instead of the bundled one.</flag>
1125 <flag name="system-icu">Use system icu instead of the bundled one</flag>
1126 + <flag name="system-png">Use system libpng instead of the bundled one.</flag>
1127 <flag name="widevine">Unsupported closed-source DRM capability (required by Netflix VOD)</flag>
1128 </use>
1129 </pkgmetadata>