public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/riscv:master commit in: www-client/chromium/files/, www-client/chromium/
@ 2021-12-14  9:25 Yixun Lan
  0 siblings, 0 replies; 4+ messages in thread
From: Yixun Lan @ 2021-12-14  9:25 UTC (permalink / raw
  To: gentoo-commits

commit:     8c94b1452b69a7673c69e1985d8e5747f8b938f2
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 14 08:37:56 2021 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Dec 14 08:38:01 2021 +0000
URL:        https://gitweb.gentoo.org/proj/riscv.git/commit/?id=8c94b145

www-client/chromium: initial import chromium-98

from commit: c4437ce25f70c016fb51c438f421ddafd580ad9a

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 www-client/chromium/Manifest                       |   7 +
 www-client/chromium/chromium-96.0.4664.93.ebuild   | 963 +++++++++++++++++++++
 www-client/chromium/chromium-97.0.4692.45.ebuild   | 957 ++++++++++++++++++++
 www-client/chromium/chromium-98.0.4750.0.ebuild    | 963 +++++++++++++++++++++
 .../files/chromium-93-InkDropHost-crash.patch      |  25 +
 .../files/chromium-96-EnumTable-crash.patch        |  76 ++
 .../files/chromium-96-freetype-unbundle.patch      |  10 +
 .../files/chromium-98-EnumTable-crash.patch        |  76 ++
 .../chromium/files/chromium-98-system-libdrm.patch |  34 +
 www-client/chromium/files/chromium-browser.xml     |  13 +
 .../chromium/files/chromium-glibc-2.34.patch       |  50 ++
 www-client/chromium/files/chromium-launcher-r7.sh  |  59 ++
 .../chromium/files/chromium-shim_headers.patch     |  48 +
 ...ium-use-oauth2-client-switches-as-default.patch |  17 +
 www-client/chromium/files/chromium.default         |   5 +
 www-client/chromium/metadata.xml                   |  25 +
 16 files changed, 3328 insertions(+)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
new file mode 100644
index 0000000..9786162
--- /dev/null
+++ b/www-client/chromium/Manifest
@@ -0,0 +1,7 @@
+DIST chromium-96-patchset-4.tar.xz 4812 BLAKE2B 5d82d212b8ec1689be6f4a7a0646256311d06c17e74ee0e5b2035c32125a5235e4b6b7605cefffa367cc53e651be17b75f5e339149b4c80dca50cd959b1623f1 SHA512 a72c1bb2c58e9e2912a641093c153f01ad7239dc971c7c96481ba4164204afe41741f3253e8af03070dab8276179784dc6a11761b39ad7902ed2553016778282
+DIST chromium-96-ppc64le-1.tar.xz 29224 BLAKE2B 3369a3b15eb4f42761e01758135995a1f34e40cecbfc0372a4bc17b393d50b276ea5a0813d1c57f73f0dd34cf2a021356d25c2b4dcaa95998ffc082545dc915c SHA512 256d64fbf192e55d77c6580d36766a67dadfbd0f1e34e49bfc6d55114da7f2252d783db0dd09123996a71a01ec4a3d5c70fd1a5c8852db135857b8495f7cfbf1
+DIST chromium-96.0.4664.93.tar.xz 1209670724 BLAKE2B ebc99f6232fb65874dc73af6157c7175c1b7bf98f800819c343bdb37c42f49369b6af0146a093663a09a2588652eeb196526e9de776098f69e5ba8d75d205e69 SHA512 3441380372014dc338418f494fcd7407dd3888cea07af3415c9e8ff2c3547abbd516ae03eb4b831b89923817046a6d1549fb9558db9aa271aa0ba397e514c0b3
+DIST chromium-97-patchset-4.tar.xz 4240 BLAKE2B 450d013b6fd68f7e0bcb21a2b0828d531eda86965e636fe24fc36c2e7e1f74fe93f27f0d4b1d03e67c605797e28db37de4949ff78d5106e07b0362bec4bc5d8a SHA512 181c706c83bdbe07b2e7f02b654922a860aea761ad267e6545fb7d56b66373b003c1c79fae5cd45eeb3be8917782fa45df1c05bbb00e170f0146e7385f4246c4
+DIST chromium-97.0.4692.45.tar.xz 1213732240 BLAKE2B cd722330f4f84f29331974a0663fc39b021fb4cc7b1e96e4c355397bf7e37386938e5be05618c37692d29e8cfb514fdd069cbdf9ca44073d8da10fafaba598f8 SHA512 bac8367c7494dea46477d70af9dc2f8fa360936c4996cea92c623a503f2965a24afc1f83c15ccfa10bb3d331d21ed65f9c73799c0efe5b6180767ae36c17c2e1
+DIST chromium-98-patchset-3.tar.xz 6164 BLAKE2B be4fa2997e13e89a0c8db1e99fa80adb937c0c02f1e18bd0ec93bdbdd484da4a8507baf13c5e6e602d5f5ecb2921f33bc3afdc3c3103b1b5314b62f59c1a71ad SHA512 47026635ca5c2e1d3965c82a449077380e6518b33e16b83bd105085cca50f512d08027eebd34d7ce5ce39d988f0120deccfb72697abac0d41e4502b6ad8abdf3
+DIST chromium-98.0.4750.0.tar.xz 1230864580 BLAKE2B b8b5d05bf15a9429f3f5fa851415d21f6e757a99fce9ac47bdeb7f534f9eefc77d13c5f8ba93bfa140bdb536c13e1b6141ac4d7e0f17b742039c403044789c56 SHA512 7f8cc349aa50af0d149ba08e5ed60171e94943bbd52cb0f820f3c7d56749d9e2fd6d71761262ac012cfcad1f7e4f63c0404f39f044df531e776ae6fce951544f

diff --git a/www-client/chromium/chromium-96.0.4664.93.ebuild b/www-client/chromium/chromium-96.0.4664.93.ebuild
new file mode 100644
index 0000000..54fa899
--- /dev/null
+++ b/www-client/chromium/chromium-96.0.4664.93.ebuild
@@ -0,0 +1,963 @@
+# Copyright 2009-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="xml"
+
+CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
+	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
+	sv sw ta te th tr uk vi zh-CN zh-TW"
+
+inherit check-reqs chromium-2 desktop flag-o-matic ninja-utils pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="Open-source version of Google Chrome web browser"
+HOMEPAGE="https://chromium.org/"
+PATCHSET="4"
+PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
+PPC64LE_PATCHSET="1"
+SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
+	https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz
+	ppc64? ( https://dev.gentoo.org/~gyakovlev/distfiles/${PN}-$(ver_cut 1)-ppc64le-${PPC64LE_PATCHSET}.tar.xz )"
+
+LICENSE="BSD"
+SLOT="0/stable"
+KEYWORDS="amd64 arm64 ~x86"
+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 vaapi wayland widevine"
+REQUIRED_USE="
+	component-build? ( !suid )
+	screencast? ( wayland )
+"
+
+COMMON_X_DEPEND="
+	media-libs/mesa:=[gbm(+)]
+	x11-libs/libX11:=
+	x11-libs/libXcomposite:=
+	x11-libs/libXcursor:=
+	x11-libs/libXdamage:=
+	x11-libs/libXext:=
+	x11-libs/libXfixes:=
+	>=x11-libs/libXi-1.6.0:=
+	x11-libs/libXrandr:=
+	x11-libs/libXrender:=
+	x11-libs/libXtst:=
+	x11-libs/libxcb:=
+	x11-libs/libxshmfence:=
+	vaapi? ( >=x11-libs/libva-2.7:=[X,drm] )
+"
+
+COMMON_DEPEND="
+	app-arch/bzip2:=
+	cups? ( >=net-print/cups-1.3.11:= )
+	dev-libs/expat:=
+	dev-libs/glib:2
+	>=dev-libs/libxml2-2.9.4-r3:=[icu]
+	dev-libs/nspr:=
+	>=dev-libs/nss-3.26:=
+	>=media-libs/alsa-lib-1.0.19:=
+	media-libs/fontconfig:=
+	>=media-libs/freetype-2.11.0-r1:=
+	system-harfbuzz? ( >=media-libs/harfbuzz-2.9.0:0=[icu(-)] )
+	media-libs/libjpeg-turbo:=
+	media-libs/libpng:=
+	pulseaudio? ( media-sound/pulseaudio:= )
+	system-ffmpeg? (
+		>=media-video/ffmpeg-4.3:=
+		|| (
+			media-video/ffmpeg[-samba]
+			>=net-fs/samba-4.5.10-r1[-debug(-)]
+		)
+		>=media-libs/opus-1.3.1:=
+	)
+	net-misc/curl[ssl]
+	sys-apps/dbus:=
+	sys-apps/pciutils:=
+	virtual/udev
+	x11-libs/cairo:=
+	x11-libs/gdk-pixbuf:2
+	x11-libs/libxkbcommon:=
+	x11-libs/pango:=
+	media-libs/flac:=
+	>=media-libs/libwebp-0.4.0:=
+	sys-libs/zlib:=[minizip]
+	kerberos? ( virtual/krb5 )
+	!headless? (
+		${COMMON_X_DEPEND}
+		>=app-accessibility/at-spi2-atk-2.26:2
+		>=app-accessibility/at-spi2-core-2.26:2
+		>=dev-libs/atk-2.26
+		x11-libs/gtk+:3[X]
+		wayland? (
+			dev-libs/wayland:=
+			screencast? ( media-video/pipewire:0/0.3 )
+			x11-libs/gtk+:3[wayland,X]
+			x11-libs/libdrm:=
+		)
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	x11-misc/xdg-utils
+	virtual/opengl
+	virtual/ttf-fonts
+	selinux? ( sec-policy/selinux-chromium )
+"
+DEPEND="${COMMON_DEPEND}
+"
+# dev-vcs/git - https://bugs.gentoo.org/593476
+BDEPEND="
+	${PYTHON_DEPS}
+	$(python_gen_any_dep '
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	')
+	>=app-arch/gzip-1.7
+	dev-lang/perl
+	>=dev-util/gn-0.1807
+	dev-vcs/git
+	>=dev-util/gperf-3.0.3
+	>=dev-util/ninja-1.7.2
+	>=net-libs/nodejs-7.6.0[inspector]
+	>=sys-devel/bison-2.4.3
+	sys-devel/flex
+	virtual/pkgconfig
+	js-type-check? ( virtual/jre )
+"
+
+# These are intended for ebuild maintainer use to force clang if GCC is broken.
+: ${CHROMIUM_FORCE_CLANG=no}
+: ${CHROMIUM_FORCE_LIBCXX=no}
+
+if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
+	BDEPEND+=" >=sys-devel/clang-12"
+fi
+
+if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+	RDEPEND+=" >=sys-libs/libcxx-12"
+	DEPEND+=" >=sys-libs/libcxx-12"
+else
+	COMMON_DEPEND="
+		dev-libs/libxslt:=
+		>=dev-libs/re2-0.2019.08.01:=
+		>=media-libs/openh264-1.6.0:=
+		system-icu? ( >=dev-libs/icu-69.1:= )
+	"
+	RDEPEND+="${COMMON_DEPEND}"
+	DEPEND+="${COMMON_DEPEND}"
+fi
+
+if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
+	EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
+fi
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Some web pages may require additional fonts to display properly.
+Try installing some of the following packages if some characters
+are not displayed properly:
+- media-fonts/arphicfonts
+- media-fonts/droid
+- media-fonts/ipamonafont
+- media-fonts/noto
+- media-fonts/ja-ipafonts
+- media-fonts/takao-fonts
+- media-fonts/wqy-microhei
+- media-fonts/wqy-zenhei
+
+To fix broken icons on the Downloads page, you should install an icon
+theme that covers the appropriate MIME types, and configure this as your
+GTK+ icon theme.
+
+For native file dialogs in KDE, install kde-apps/kdialog.
+
+To make password storage work with your desktop environment you may
+have install one of the supported credentials management applications:
+- app-crypt/libsecret (GNOME)
+- kde-frameworks/kwallet (KDE)
+If you have one of above packages installed, but don't want to use
+them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
+in /etc/chromium/default.
+"
+
+python_check_deps() {
+	has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
+}
+
+pre_build_checks() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		local -x CPP="$(tc-getCXX) -E"
+		if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
+			die "At least gcc 9.2 is required"
+		fi
+		if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then
+			CPP="${CHOST}-clang++ -E"
+			if ! ver_test "$(clang-major-version)" -ge 12; then
+				die "At least clang 12 is required"
+			fi
+		fi
+	fi
+
+	# Check build requirements, bug #541816 and bug #471810 .
+	CHECKREQS_MEMORY="4G"
+	CHECKREQS_DISK_BUILD="9G"
+	if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
+		if use custom-cflags || use component-build; then
+			CHECKREQS_DISK_BUILD="25G"
+		fi
+		if ! use component-build; then
+			CHECKREQS_MEMORY="16G"
+		fi
+	fi
+	check-reqs_pkg_setup
+}
+
+pkg_pretend() {
+	pre_build_checks
+}
+
+pkg_setup() {
+	pre_build_checks
+
+	chromium_suid_sandbox_check_kernel_config
+
+	# nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams
+	if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then
+		ewarn "Proprietary nVidia driver does not work with Wayland. You can disable"
+		ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default."
+	fi
+}
+
+src_prepare() {
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	local PATCHES=(
+		"${WORKDIR}/patches"
+		"${FILESDIR}/chromium-93-InkDropHost-crash.patch"
+		"${FILESDIR}/chromium-96-EnumTable-crash.patch"
+		"${FILESDIR}/chromium-96-freetype-unbundle.patch"
+		"${FILESDIR}/chromium-glibc-2.34.patch"
+		"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
+		"${FILESDIR}/chromium-shim_headers.patch"
+	)
+
+	use ppc64 && PATCHES+=( "${WORKDIR}/${PN}-ppc64le" )
+
+	default
+
+	mkdir -p third_party/node/linux/node-linux-x64/bin || die
+	ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
+
+	# adjust python interpreter version
+	sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
+
+	local keeplibs=(
+		base/third_party/cityhash
+		base/third_party/double_conversion
+		base/third_party/dynamic_annotations
+		base/third_party/icu
+		base/third_party/nspr
+		base/third_party/superfasthash
+		base/third_party/symbolize
+		base/third_party/valgrind
+		base/third_party/xdg_mime
+		base/third_party/xdg_user_dirs
+		buildtools/third_party/libc++
+		buildtools/third_party/libc++abi
+		chrome/third_party/mozilla_security_manager
+		courgette/third_party
+		net/third_party/mozilla_security_manager
+		net/third_party/nss
+		net/third_party/quic
+		net/third_party/uri_template
+		third_party/abseil-cpp
+		third_party/angle
+		third_party/angle/src/common/third_party/base
+		third_party/angle/src/common/third_party/smhasher
+		third_party/angle/src/common/third_party/xxhash
+		third_party/angle/src/third_party/libXNVCtrl
+		third_party/angle/src/third_party/trace_event
+		third_party/angle/src/third_party/volk
+		third_party/apple_apsl
+		third_party/axe-core
+		third_party/blink
+		third_party/boringssl
+		third_party/boringssl/src/third_party/fiat
+		third_party/breakpad
+		third_party/breakpad/breakpad/src/third_party/curl
+		third_party/brotli
+		third_party/catapult
+		third_party/catapult/common/py_vulcanize/third_party/rcssmin
+		third_party/catapult/common/py_vulcanize/third_party/rjsmin
+		third_party/catapult/third_party/beautifulsoup4-4.9.3
+		third_party/catapult/third_party/html5lib-1.1
+		third_party/catapult/third_party/polymer
+		third_party/catapult/third_party/six
+		third_party/catapult/tracing/third_party/d3
+		third_party/catapult/tracing/third_party/gl-matrix
+		third_party/catapult/tracing/third_party/jpeg-js
+		third_party/catapult/tracing/third_party/jszip
+		third_party/catapult/tracing/third_party/mannwhitneyu
+		third_party/catapult/tracing/third_party/oboe
+		third_party/catapult/tracing/third_party/pako
+		third_party/ced
+		third_party/cld_3
+		third_party/closure_compiler
+		third_party/crashpad
+		third_party/crashpad/crashpad/third_party/lss
+		third_party/crashpad/crashpad/third_party/zlib
+		third_party/crc32c
+		third_party/cros_system_api
+		third_party/dav1d
+		third_party/dawn
+		third_party/dawn/third_party/khronos
+		third_party/dawn/third_party/tint
+		third_party/depot_tools
+		third_party/devscripts
+		third_party/devtools-frontend
+		third_party/devtools-frontend/src/front_end/third_party/acorn
+		third_party/devtools-frontend/src/front_end/third_party/axe-core
+		third_party/devtools-frontend/src/front_end/third_party/chromium
+		third_party/devtools-frontend/src/front_end/third_party/codemirror
+		third_party/devtools-frontend/src/front_end/third_party/diff
+		third_party/devtools-frontend/src/front_end/third_party/i18n
+		third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
+		third_party/devtools-frontend/src/front_end/third_party/lighthouse
+		third_party/devtools-frontend/src/front_end/third_party/lit-html
+		third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
+		third_party/devtools-frontend/src/front_end/third_party/marked
+		third_party/devtools-frontend/src/front_end/third_party/puppeteer
+		third_party/devtools-frontend/src/front_end/third_party/wasmparser
+		third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
+		third_party/devtools-frontend/src/third_party
+		third_party/distributed_point_functions
+		third_party/dom_distiller_js
+		third_party/eigen3
+		third_party/emoji-segmenter
+		third_party/farmhash
+		third_party/fdlibm
+		third_party/fft2d
+		third_party/flatbuffers
+		third_party/freetype
+		third_party/fusejs
+		third_party/highway
+		third_party/libgifcodec
+		third_party/liburlpattern
+		third_party/libzip
+		third_party/gemmlowp
+		third_party/google_input_tools
+		third_party/google_input_tools/third_party/closure_library
+		third_party/google_input_tools/third_party/closure_library/third_party/closure
+		third_party/googletest
+		third_party/hunspell
+		third_party/iccjpeg
+		third_party/inspector_protocol
+		third_party/jinja2
+		third_party/jsoncpp
+		third_party/jstemplate
+		third_party/khronos
+		third_party/leveldatabase
+		third_party/libXNVCtrl
+		third_party/libaddressinput
+		third_party/libaom
+		third_party/libaom/source/libaom/third_party/fastfeat
+		third_party/libaom/source/libaom/third_party/vector
+		third_party/libaom/source/libaom/third_party/x86inc
+		third_party/libavif
+		third_party/libgav1
+		third_party/libjingle
+		third_party/libjxl
+		third_party/libphonenumber
+		third_party/libsecret
+		third_party/libsrtp
+		third_party/libsync
+		third_party/libudev
+		third_party/libva_protected_content
+		third_party/libvpx
+		third_party/libvpx/source/libvpx/third_party/x86inc
+		third_party/libwebm
+		third_party/libx11
+		third_party/libxcb-keysyms
+		third_party/libxml/chromium
+		third_party/libyuv
+		third_party/llvm
+		third_party/lottie
+		third_party/lss
+		third_party/lzma_sdk
+		third_party/mako
+		third_party/maldoca
+		third_party/maldoca/src/third_party/tensorflow_protos
+		third_party/maldoca/src/third_party/zlibwrapper
+		third_party/markupsafe
+		third_party/mesa
+		third_party/metrics_proto
+		third_party/minigbm
+		third_party/modp_b64
+		third_party/nasm
+		third_party/nearby
+		third_party/neon_2_sse
+		third_party/node
+		third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
+		third_party/one_euro_filter
+		third_party/opencv
+		third_party/openscreen
+		third_party/openscreen/src/third_party/mozilla
+		third_party/openscreen/src/third_party/tinycbor/src/src
+		third_party/ots
+		third_party/pdfium
+		third_party/pdfium/third_party/agg23
+		third_party/pdfium/third_party/base
+		third_party/pdfium/third_party/bigint
+		third_party/pdfium/third_party/freetype
+		third_party/pdfium/third_party/lcms
+		third_party/pdfium/third_party/libopenjpeg20
+		third_party/pdfium/third_party/libpng16
+		third_party/pdfium/third_party/libtiff
+		third_party/pdfium/third_party/skia_shared
+		third_party/perfetto
+		third_party/perfetto/protos/third_party/chromium
+		third_party/pffft
+		third_party/ply
+		third_party/polymer
+		third_party/private-join-and-compute
+		third_party/private_membership
+		third_party/protobuf
+		third_party/protobuf/third_party/six
+		third_party/pyjson5
+		third_party/qcms
+		third_party/rnnoise
+		third_party/s2cellid
+		third_party/securemessage
+		third_party/shell-encryption
+		third_party/simplejson
+		third_party/skia
+		third_party/skia/include/third_party/skcms
+		third_party/skia/include/third_party/vulkan
+		third_party/skia/third_party/skcms
+		third_party/skia/third_party/vulkan
+		third_party/smhasher
+		third_party/snappy
+		third_party/sqlite
+		third_party/swiftshader
+		third_party/swiftshader/third_party/astc-encoder
+		third_party/swiftshader/third_party/llvm-subzero
+		third_party/swiftshader/third_party/marl
+		third_party/swiftshader/third_party/subzero
+		third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
+		third_party/tcmalloc
+		third_party/tensorflow-text
+		third_party/tflite
+		third_party/tflite/src/third_party/eigen3
+		third_party/tflite/src/third_party/fft2d
+		third_party/ruy
+		third_party/six
+		third_party/ukey2
+		third_party/unrar
+		third_party/usrsctp
+		third_party/utf
+		third_party/vulkan
+		third_party/web-animations-js
+		third_party/webdriver
+		third_party/webgpu-cts
+		third_party/webrtc
+		third_party/webrtc/common_audio/third_party/ooura
+		third_party/webrtc/common_audio/third_party/spl_sqrt_floor
+		third_party/webrtc/modules/third_party/fft
+		third_party/webrtc/modules/third_party/g711
+		third_party/webrtc/modules/third_party/g722
+		third_party/webrtc/rtc_base/third_party/base64
+		third_party/webrtc/rtc_base/third_party/sigslot
+		third_party/widevine
+		third_party/woff2
+		third_party/wuffs
+		third_party/x11proto
+		third_party/xcbproto
+		third_party/zxcvbn-cpp
+		third_party/zlib/google
+		url/third_party/mozilla
+		v8/src/third_party/siphash
+		v8/src/third_party/valgrind
+		v8/src/third_party/utf8-decoder
+		v8/third_party/inspector_protocol
+		v8/third_party/v8
+
+		# gyp -> gn leftovers
+		base/third_party/libevent
+		third_party/speech-dispatcher
+		third_party/usb_ids
+		third_party/xdg-utils
+	)
+	if ! use system-ffmpeg; then
+		keeplibs+=( third_party/ffmpeg third_party/opus )
+	fi
+	if ! use system-icu; then
+		keeplibs+=( third_party/icu )
+	fi
+	if use system-harfbuzz; then
+		keeplibs+=( third_party/harfbuzz-ng/utils )
+	else
+		keeplibs+=( third_party/harfbuzz-ng )
+	fi
+	if use wayland && ! use headless ; then
+		keeplibs+=( third_party/wayland )
+	fi
+	if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+		keeplibs+=( third_party/libxml )
+		keeplibs+=( third_party/libxslt )
+		keeplibs+=( third_party/openh264 )
+		keeplibs+=( third_party/re2 )
+		if use system-icu; then
+			keeplibs+=( third_party/icu )
+		fi
+	fi
+	if use arm64 || use ppc64 ; then
+		keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
+	fi
+	# we need to generate ppc64 stuff because upstream does not ship it yet
+	# it has to be done before unbundling.
+	if use ppc64; then
+		pushd third_party/libvpx >/dev/null || die
+		mkdir -p source/config/linux/ppc64 || die
+		./generate_gni.sh || die
+		popd >/dev/null || die
+	fi
+
+	# Remove most bundled libraries. Some are still needed.
+	build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
+
+	if use js-type-check; then
+		ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die
+	fi
+
+	# bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
+	mkdir -p buildtools/third_party/eu-strip/bin || die
+	ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
+}
+
+src_configure() {
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	local myconf_gn=""
+
+	# Make sure the build system will use the right tools, bug #340795.
+	tc-export AR CC CXX NM
+
+	if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
+		# Force clang since gcc is pretty broken at the moment.
+		CC=${CHOST}-clang
+		CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	if tc-is-clang; then
+		myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
+	else
+		if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+			die "Compiling with sys-libs/libcxx requires clang."
+		fi
+		myconf_gn+=" is_clang=false"
+	fi
+
+	# Define a custom toolchain for GN
+	myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
+
+	if tc-is-cross-compiler; then
+		tc-export BUILD_{AR,CC,CXX,NM}
+		myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
+		myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
+	else
+		myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
+	fi
+
+	# GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
+	myconf_gn+=" is_debug=false"
+
+	# enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
+	# DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
+	myconf_gn+=" dcheck_always_on=$(usex debug true false)"
+	myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
+
+	# Component build isn't generally intended for use by end users. It's mostly useful
+	# for development and debugging.
+	myconf_gn+=" is_component_build=$(usex component-build true false)"
+
+	# Disable nacl, we can't build without pnacl (http://crbug.com/269560).
+	myconf_gn+=" enable_nacl=false"
+
+	# Use system-provided libraries.
+	# TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
+	# TODO: use_system_hunspell (upstream changes needed).
+	# TODO: use_system_protobuf (bug #525560).
+	# TODO: use_system_sqlite (http://crbug.com/22208).
+
+	# libevent: https://bugs.gentoo.org/593458
+	local gn_system_libraries=(
+		flac
+		fontconfig
+		freetype
+		# Need harfbuzz_from_pkgconfig target
+		#harfbuzz-ng
+		libdrm
+		libjpeg
+		libpng
+		libwebp
+		zlib
+	)
+	if use system-ffmpeg; then
+		gn_system_libraries+=( ffmpeg opus )
+	fi
+	if use system-icu; then
+		gn_system_libraries+=( icu )
+	fi
+	if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then
+		# unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++
+		gn_system_libraries+=( libxml )
+		gn_system_libraries+=( libxslt )
+		gn_system_libraries+=( openh264 )
+		gn_system_libraries+=( re2 )
+	fi
+	build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
+
+	# See dependency logic in third_party/BUILD.gn
+	myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
+
+	# Disable deprecated libgnome-keyring dependency, bug #713012
+	myconf_gn+=" use_gnome_keyring=false"
+
+	# Optional dependencies.
+	myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)"
+	myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
+	myconf_gn+=" enable_widevine=$(usex widevine true false)"
+	myconf_gn+=" use_cups=$(usex cups true false)"
+	myconf_gn+=" use_kerberos=$(usex kerberos true false)"
+	myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
+	myconf_gn+=" use_vaapi=$(usex vaapi true false)"
+	myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
+
+	# TODO: link_pulseaudio=true for GN.
+
+	myconf_gn+=" disable_fieldtrial_testing_config=true"
+
+	# Never use bundled gold binary. Disable gold linker flags for now.
+	# Do not use bundled clang.
+	# Trying to use gold results in linker crash.
+	myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false"
+
+	# Disable forced lld, bug 641556
+	myconf_gn+=" use_lld=false"
+
+	# Disable pseudolocales, only used for testing
+	myconf_gn+=" enable_pseudolocales=false"
+
+	# Disable code formating of generated files
+	myconf_gn+=" blink_enable_generated_code_formatting=false"
+
+	ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
+	myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
+	myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
+
+	# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
+	# Note: these are for Gentoo use ONLY. For your own distribution,
+	# please get your own set of keys. Feel free to contact chromium@gentoo.org
+	# for more info. The OAuth2 credentials, however, have been left out.
+	# Those OAuth2 credentials have been broken for quite some time anyway.
+	# Instead we apply a patch to use the --oauth2-client-id= and
+	# --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
+	# GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
+	# Chromium without baked-in values.
+	local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
+	myconf_gn+=" google_api_key=\"${google_api_key}\""
+	local myarch="$(tc-arch)"
+
+	# Avoid CFLAGS problems, bug #352457, bug #390147.
+	if ! use custom-cflags; then
+		replace-flags "-Os" "-O2"
+		strip-flags
+
+		# Debug info section overflows without component build
+		# Prevent linker from running out of address space, bug #471810 .
+		if ! use component-build || use x86; then
+			filter-flags "-g*"
+		fi
+
+		# Prevent libvpx build failures. Bug 530248, 544702, 546984.
+		if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
+			filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4
+		fi
+	fi
+
+	if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+		append-flags -stdlib=libc++
+		append-ldflags -stdlib=libc++
+	fi
+
+	if [[ $myarch = amd64 ]] ; then
+		myconf_gn+=" target_cpu=\"x64\""
+		ffmpeg_target_arch=x64
+	elif [[ $myarch = x86 ]] ; then
+		myconf_gn+=" target_cpu=\"x86\""
+		ffmpeg_target_arch=ia32
+
+		# This is normally defined by compiler_cpu_abi in
+		# build/config/compiler/BUILD.gn, but we patch that part out.
+		append-flags -msse2 -mfpmath=sse -mmmx
+	elif [[ $myarch = arm64 ]] ; then
+		myconf_gn+=" target_cpu=\"arm64\""
+		ffmpeg_target_arch=arm64
+	elif [[ $myarch = arm ]] ; then
+		myconf_gn+=" target_cpu=\"arm\""
+		ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
+	elif [[ $myarch = ppc64 ]] ; then
+		myconf_gn+=" target_cpu=\"ppc64\""
+		ffmpeg_target_arch=ppc64
+	else
+		die "Failed to determine target arch, got '$myarch'."
+	fi
+
+	# Make sure that -Werror doesn't get added to CFLAGS by the build system.
+	# Depending on GCC version the warnings are different and we don't want
+	# the build to fail because of that.
+	myconf_gn+=" treat_warnings_as_errors=false"
+
+	# Disable fatal linker warnings, bug 506268.
+	myconf_gn+=" fatal_linker_warnings=false"
+
+	# Bug 491582.
+	export TMPDIR="${WORKDIR}/temp"
+	mkdir -p -m 755 "${TMPDIR}" || die
+
+	# https://bugs.gentoo.org/654216
+	addpredict /dev/dri/ #nowarn
+
+	#if ! use system-ffmpeg; then
+	if false; then
+		local build_ffmpeg_args=""
+		if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
+			build_ffmpeg_args+=" --disable-asm"
+		fi
+
+		# Re-configure bundled ffmpeg. See bug #491378 for example reasons.
+		einfo "Configuring bundled ffmpeg..."
+		pushd third_party/ffmpeg > /dev/null || die
+		chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
+			--branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
+		chromium/scripts/copy_config.sh || die
+		chromium/scripts/generate_gn.py || die
+		popd > /dev/null || die
+	fi
+
+	# Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470
+	append-cxxflags $(test-flags-CXX -flax-vector-conversions=all)
+
+	# highway/libjxl fail on ppc64 without extra patches, disable for now.
+	use ppc64 && myconf_gn+=" enable_jxl_decoder=false"
+
+	# Disable unknown warning message from clang.
+	tc-is-clang && append-flags -Wno-unknown-warning-option
+
+	# Explicitly disable ICU data file support for system-icu builds.
+	if use system-icu; then
+		myconf_gn+=" icu_use_data_file=false"
+	fi
+
+	# Enable ozone wayland and/or headless support
+	myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
+	myconf_gn+=" ozone_platform_headless=true"
+	myconf_gn+=" ozone_platform_x11=$(usex headless false true)"
+	if use wayland || use headless; then
+		if use headless; then
+			myconf_gn+=" ozone_platform=\"headless\""
+			myconf_gn+=" use_x11=false"
+		else
+			myconf_gn+=" ozone_platform_wayland=true"
+			myconf_gn+=" use_system_libdrm=true"
+			myconf_gn+=" use_system_minigbm=true"
+			myconf_gn+=" use_xkbcommon=true"
+			myconf_gn+=" ozone_platform=\"wayland\""
+		fi
+	else
+		myconf_gn+=" ozone_platform=\"x11\""
+	fi
+
+	# Enable official builds
+	myconf_gn+=" is_official_build=$(usex official true false)"
+	myconf_gn+=" use_thin_lto=false"
+	if use official; then
+		# Allow building against system libraries in official builds
+		sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+			tools/generate_shim_headers/generate_shim_headers.py || die
+		# Disable CFI: unsupported for GCC, requires clang+lto+lld
+		myconf_gn+=" is_cfi=false"
+		# Disable PGO, because profile data is only compatible with >=clang-11
+		myconf_gn+=" chrome_pgo_phase=0"
+	fi
+
+	einfo "Configuring Chromium..."
+	set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
+	echo "$@"
+	"$@" || die
+}
+
+src_compile() {
+	# Final link uses lots of file descriptors.
+	ulimit -n 2048
+
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	# Don't inherit PYTHONPATH from environment, bug #789021, #812689
+	local -x PYTHONPATH=
+
+	#"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
+
+	# Build mksnapshot and pax-mark it.
+	local x
+	for x in mksnapshot v8_context_snapshot_generator; do
+		if tc-is-cross-compiler; then
+			eninja -C out/Release "host/${x}"
+			pax-mark m "out/Release/host/${x}"
+		else
+			eninja -C out/Release "${x}"
+			pax-mark m "out/Release/${x}"
+		fi
+	done
+
+	# Even though ninja autodetects number of CPUs, we respect
+	# user's options, for debugging with -j 1 or any other reason.
+	eninja -C out/Release chrome chromedriver
+	use suid && eninja -C out/Release chrome_sandbox
+
+	pax-mark m out/Release/chrome
+
+	mv out/Release/chromedriver{.unstripped,} || die
+
+	# Build manpage; bug #684550
+	sed -e 's|@@PACKAGE@@|chromium-browser|g;
+		s|@@MENUNAME@@|Chromium|g;' \
+		chrome/app/resources/manpage.1.in > \
+		out/Release/chromium-browser.1 || die
+
+	# Build desktop file; bug #706786
+	sed -e 's|@@MENUNAME@@|Chromium|g;
+		s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
+		s|@@PACKAGE@@|chromium-browser|g;
+		s|\(^Exec=\)/usr/bin/|\1|g;' \
+		chrome/installer/linux/common/desktop.template > \
+		out/Release/chromium-browser-chromium.desktop || die
+
+	# Build vk_swiftshader_icd.json; bug #827861
+	sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \
+		third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \
+		out/Release/vk_swiftshader_icd.json || die
+}
+
+src_install() {
+	local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
+	exeinto "${CHROMIUM_HOME}"
+	doexe out/Release/chrome
+
+	if use suid; then
+		newexe out/Release/chrome_sandbox chrome-sandbox
+		fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
+	fi
+
+	doexe out/Release/chromedriver
+	doexe out/Release/chrome_crashpad_handler
+
+	ozone_auto_session () {
+		use wayland && ! use headless && echo true || echo false
+	}
+	local sedargs=( -e
+			"s:/usr/lib/:/usr/$(get_libdir)/:g;
+			s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
+	)
+	sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
+	doexe chromium-launcher.sh
+
+	# It is important that we name the target "chromium-browser",
+	# xdg-utils expect it; bug #355517.
+	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
+	# keep the old symlink around for consistency
+	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
+
+	dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
+
+	# Allow users to override command-line options, bug #357629.
+	insinto /etc/chromium
+	newins "${FILESDIR}/chromium.default" "default"
+
+	pushd out/Release/locales > /dev/null || die
+	chromium_remove_language_paks
+	popd
+
+	insinto "${CHROMIUM_HOME}"
+	doins out/Release/*.bin
+	doins out/Release/*.pak
+	(
+		shopt -s nullglob
+		local files=(out/Release/*.so out/Release/*.so.[0-9])
+		[[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
+	)
+
+	if ! use system-icu; then
+		doins out/Release/icudtl.dat
+	fi
+
+	doins -r out/Release/locales
+	doins -r out/Release/resources
+	doins -r out/Release/MEIPreload
+
+	# Install vk_swiftshader_icd.json; bug #827861
+	doins out/Release/vk_swiftshader_icd.json
+
+	if [[ -d out/Release/swiftshader ]]; then
+		insinto "${CHROMIUM_HOME}/swiftshader"
+		doins out/Release/swiftshader/*.so
+	fi
+
+	# Install icons
+	local branding size
+	for size in 16 24 32 48 64 128 256 ; do
+		case ${size} in
+			16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
+				*) branding="chrome/app/theme/chromium" ;;
+		esac
+		newicon -s ${size} "${branding}/product_logo_${size}.png" \
+			chromium-browser.png
+	done
+
+	# Install desktop entry
+	domenu out/Release/chromium-browser-chromium.desktop
+
+	# Install GNOME default application entry (bug #303100).
+	insinto /usr/share/gnome-control-center/default-apps
+	newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
+
+	# Install manpage; bug #684550
+	doman out/Release/chromium-browser.1
+	dosym chromium-browser.1 /usr/share/man/man1/chromium.1
+
+	readme.gentoo_create_doc
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+	readme.gentoo_print_elog
+
+	if use vaapi; then
+		elog "VA-API is disabled by default at runtime. You have to enable it"
+		elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
+		elog "in /etc/chromium/default."
+	fi
+	if use screencast; then
+		elog "Screencast is disabled by default at runtime. Either enable it"
+		elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
+		elog "inside Chromium or add --enable-webrtc-pipewire-capturer"
+		elog "to CHROMIUM_FLAGS in /etc/chromium/default."
+	fi
+}

diff --git a/www-client/chromium/chromium-97.0.4692.45.ebuild b/www-client/chromium/chromium-97.0.4692.45.ebuild
new file mode 100644
index 0000000..7d53bac
--- /dev/null
+++ b/www-client/chromium/chromium-97.0.4692.45.ebuild
@@ -0,0 +1,957 @@
+# Copyright 2009-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="xml"
+
+CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
+	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
+	sv sw ta te th tr uk vi zh-CN zh-TW"
+
+inherit check-reqs chromium-2 desktop flag-o-matic ninja-utils pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="Open-source version of Google Chrome web browser"
+HOMEPAGE="https://chromium.org/"
+PATCHSET="4"
+PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
+SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
+	https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0/beta"
+KEYWORDS="~amd64 ~arm64 ~x86"
+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 vaapi wayland widevine"
+REQUIRED_USE="
+	component-build? ( !suid )
+	screencast? ( wayland )
+"
+
+COMMON_X_DEPEND="
+	media-libs/mesa:=[gbm(+)]
+	x11-libs/libX11:=
+	x11-libs/libXcomposite:=
+	x11-libs/libXcursor:=
+	x11-libs/libXdamage:=
+	x11-libs/libXext:=
+	x11-libs/libXfixes:=
+	>=x11-libs/libXi-1.6.0:=
+	x11-libs/libXrandr:=
+	x11-libs/libXrender:=
+	x11-libs/libXtst:=
+	x11-libs/libxcb:=
+	x11-libs/libxshmfence:=
+	vaapi? ( >=x11-libs/libva-2.7:=[X,drm] )
+"
+
+COMMON_DEPEND="
+	app-arch/bzip2:=
+	cups? ( >=net-print/cups-1.3.11:= )
+	dev-libs/expat:=
+	dev-libs/glib:2
+	>=dev-libs/libxml2-2.9.4-r3:=[icu]
+	dev-libs/nspr:=
+	>=dev-libs/nss-3.26:=
+	>=media-libs/alsa-lib-1.0.19:=
+	media-libs/fontconfig:=
+	>=media-libs/freetype-2.11.0-r1:=
+	system-harfbuzz? ( >=media-libs/harfbuzz-2.9.0:0=[icu(-)] )
+	media-libs/libjpeg-turbo:=
+	media-libs/libpng:=
+	pulseaudio? ( media-sound/pulseaudio:= )
+	system-ffmpeg? (
+		>=media-video/ffmpeg-4.3:=
+		|| (
+			media-video/ffmpeg[-samba]
+			>=net-fs/samba-4.5.10-r1[-debug(-)]
+		)
+		>=media-libs/opus-1.3.1:=
+	)
+	net-misc/curl[ssl]
+	sys-apps/dbus:=
+	sys-apps/pciutils:=
+	virtual/udev
+	x11-libs/cairo:=
+	x11-libs/gdk-pixbuf:2
+	x11-libs/libxkbcommon:=
+	x11-libs/pango:=
+	media-libs/flac:=
+	>=media-libs/libwebp-0.4.0:=
+	sys-libs/zlib:=[minizip]
+	kerberos? ( virtual/krb5 )
+	!headless? (
+		${COMMON_X_DEPEND}
+		>=app-accessibility/at-spi2-atk-2.26:2
+		>=app-accessibility/at-spi2-core-2.26:2
+		>=dev-libs/atk-2.26
+		x11-libs/gtk+:3[X]
+		wayland? (
+			dev-libs/wayland:=
+			screencast? ( media-video/pipewire:0/0.3 )
+			x11-libs/gtk+:3[wayland,X]
+			x11-libs/libdrm:=
+		)
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	x11-misc/xdg-utils
+	virtual/opengl
+	virtual/ttf-fonts
+	selinux? ( sec-policy/selinux-chromium )
+"
+DEPEND="${COMMON_DEPEND}
+"
+# dev-vcs/git - https://bugs.gentoo.org/593476
+BDEPEND="
+	${PYTHON_DEPS}
+	$(python_gen_any_dep '
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	')
+	>=app-arch/gzip-1.7
+	dev-lang/perl
+	>=dev-util/gn-0.1807
+	dev-vcs/git
+	>=dev-util/gperf-3.0.3
+	>=dev-util/ninja-1.7.2
+	>=net-libs/nodejs-7.6.0[inspector]
+	>=sys-devel/bison-2.4.3
+	sys-devel/flex
+	virtual/pkgconfig
+	js-type-check? ( virtual/jre )
+"
+
+# These are intended for ebuild maintainer use to force clang if GCC is broken.
+: ${CHROMIUM_FORCE_CLANG=no}
+: ${CHROMIUM_FORCE_LIBCXX=no}
+
+if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
+	BDEPEND+=" >=sys-devel/clang-12"
+fi
+
+if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+	RDEPEND+=" >=sys-libs/libcxx-12"
+	DEPEND+=" >=sys-libs/libcxx-12"
+else
+	COMMON_DEPEND="
+		dev-libs/libxslt:=
+		>=dev-libs/re2-0.2019.08.01:=
+		>=media-libs/openh264-1.6.0:=
+		system-icu? ( >=dev-libs/icu-69.1:= )
+	"
+	RDEPEND+="${COMMON_DEPEND}"
+	DEPEND+="${COMMON_DEPEND}"
+fi
+
+if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
+	EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
+fi
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Some web pages may require additional fonts to display properly.
+Try installing some of the following packages if some characters
+are not displayed properly:
+- media-fonts/arphicfonts
+- media-fonts/droid
+- media-fonts/ipamonafont
+- media-fonts/noto
+- media-fonts/ja-ipafonts
+- media-fonts/takao-fonts
+- media-fonts/wqy-microhei
+- media-fonts/wqy-zenhei
+
+To fix broken icons on the Downloads page, you should install an icon
+theme that covers the appropriate MIME types, and configure this as your
+GTK+ icon theme.
+
+For native file dialogs in KDE, install kde-apps/kdialog.
+
+To make password storage work with your desktop environment you may
+have install one of the supported credentials management applications:
+- app-crypt/libsecret (GNOME)
+- kde-frameworks/kwallet (KDE)
+If you have one of above packages installed, but don't want to use
+them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
+in /etc/chromium/default.
+"
+
+python_check_deps() {
+	has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
+}
+
+pre_build_checks() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		local -x CPP="$(tc-getCXX) -E"
+		if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
+			die "At least gcc 9.2 is required"
+		fi
+		if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then
+			CPP="${CHOST}-clang++ -E"
+			if ! ver_test "$(clang-major-version)" -ge 12; then
+				die "At least clang 12 is required"
+			fi
+		fi
+	fi
+
+	# Check build requirements, bug #541816 and bug #471810 .
+	CHECKREQS_MEMORY="4G"
+	CHECKREQS_DISK_BUILD="9G"
+	if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
+		if use custom-cflags || use component-build; then
+			CHECKREQS_DISK_BUILD="25G"
+		fi
+		if ! use component-build; then
+			CHECKREQS_MEMORY="16G"
+		fi
+	fi
+	check-reqs_pkg_setup
+}
+
+pkg_pretend() {
+	pre_build_checks
+}
+
+pkg_setup() {
+	pre_build_checks
+
+	chromium_suid_sandbox_check_kernel_config
+
+	# nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams
+	if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then
+		ewarn "Proprietary nVidia driver does not work with Wayland. You can disable"
+		ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default."
+	fi
+}
+
+src_prepare() {
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	local PATCHES=(
+		"${WORKDIR}/patches"
+		"${FILESDIR}/chromium-93-InkDropHost-crash.patch"
+		"${FILESDIR}/chromium-96-EnumTable-crash.patch"
+		"${FILESDIR}/chromium-glibc-2.34.patch"
+		"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
+		"${FILESDIR}/chromium-shim_headers.patch"
+	)
+
+	default
+
+	mkdir -p third_party/node/linux/node-linux-x64/bin || die
+	ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
+
+	# adjust python interpreter version
+	sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
+
+	local keeplibs=(
+		base/third_party/cityhash
+		base/third_party/double_conversion
+		base/third_party/dynamic_annotations
+		base/third_party/icu
+		base/third_party/nspr
+		base/third_party/superfasthash
+		base/third_party/symbolize
+		base/third_party/valgrind
+		base/third_party/xdg_mime
+		base/third_party/xdg_user_dirs
+		buildtools/third_party/libc++
+		buildtools/third_party/libc++abi
+		chrome/third_party/mozilla_security_manager
+		courgette/third_party
+		net/third_party/mozilla_security_manager
+		net/third_party/nss
+		net/third_party/quic
+		net/third_party/uri_template
+		third_party/abseil-cpp
+		third_party/angle
+		third_party/angle/src/common/third_party/base
+		third_party/angle/src/common/third_party/smhasher
+		third_party/angle/src/common/third_party/xxhash
+		third_party/angle/src/third_party/libXNVCtrl
+		third_party/angle/src/third_party/trace_event
+		third_party/angle/src/third_party/volk
+		third_party/apple_apsl
+		third_party/axe-core
+		third_party/blink
+		third_party/boringssl
+		third_party/boringssl/src/third_party/fiat
+		third_party/breakpad
+		third_party/breakpad/breakpad/src/third_party/curl
+		third_party/brotli
+		third_party/catapult
+		third_party/catapult/common/py_vulcanize/third_party/rcssmin
+		third_party/catapult/common/py_vulcanize/third_party/rjsmin
+		third_party/catapult/third_party/beautifulsoup4-4.9.3
+		third_party/catapult/third_party/html5lib-1.1
+		third_party/catapult/third_party/polymer
+		third_party/catapult/third_party/six
+		third_party/catapult/tracing/third_party/d3
+		third_party/catapult/tracing/third_party/gl-matrix
+		third_party/catapult/tracing/third_party/jpeg-js
+		third_party/catapult/tracing/third_party/jszip
+		third_party/catapult/tracing/third_party/mannwhitneyu
+		third_party/catapult/tracing/third_party/oboe
+		third_party/catapult/tracing/third_party/pako
+		third_party/ced
+		third_party/cld_3
+		third_party/closure_compiler
+		third_party/crashpad
+		third_party/crashpad/crashpad/third_party/lss
+		third_party/crashpad/crashpad/third_party/zlib
+		third_party/crc32c
+		third_party/cros_system_api
+		third_party/dav1d
+		third_party/dawn
+		third_party/dawn/third_party/khronos
+		third_party/dawn/third_party/tint
+		third_party/depot_tools
+		third_party/devscripts
+		third_party/devtools-frontend
+		third_party/devtools-frontend/src/front_end/third_party/acorn
+		third_party/devtools-frontend/src/front_end/third_party/axe-core
+		third_party/devtools-frontend/src/front_end/third_party/chromium
+		third_party/devtools-frontend/src/front_end/third_party/codemirror
+		third_party/devtools-frontend/src/front_end/third_party/diff
+		third_party/devtools-frontend/src/front_end/third_party/i18n
+		third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
+		third_party/devtools-frontend/src/front_end/third_party/lighthouse
+		third_party/devtools-frontend/src/front_end/third_party/lit-html
+		third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
+		third_party/devtools-frontend/src/front_end/third_party/marked
+		third_party/devtools-frontend/src/front_end/third_party/puppeteer
+		third_party/devtools-frontend/src/front_end/third_party/wasmparser
+		third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
+		third_party/devtools-frontend/src/third_party
+		third_party/distributed_point_functions
+		third_party/dom_distiller_js
+		third_party/eigen3
+		third_party/emoji-segmenter
+		third_party/farmhash
+		third_party/fdlibm
+		third_party/fft2d
+		third_party/flatbuffers
+		third_party/freetype
+		third_party/fusejs
+		third_party/highway
+		third_party/libgifcodec
+		third_party/liburlpattern
+		third_party/libzip
+		third_party/gemmlowp
+		third_party/google_input_tools
+		third_party/google_input_tools/third_party/closure_library
+		third_party/google_input_tools/third_party/closure_library/third_party/closure
+		third_party/googletest
+		third_party/hunspell
+		third_party/iccjpeg
+		third_party/inspector_protocol
+		third_party/jinja2
+		third_party/jsoncpp
+		third_party/jstemplate
+		third_party/khronos
+		third_party/leveldatabase
+		third_party/libXNVCtrl
+		third_party/libaddressinput
+		third_party/libaom
+		third_party/libaom/source/libaom/third_party/fastfeat
+		third_party/libaom/source/libaom/third_party/vector
+		third_party/libaom/source/libaom/third_party/x86inc
+		third_party/libavif
+		third_party/libgav1
+		third_party/libjingle
+		third_party/libjxl
+		third_party/libphonenumber
+		third_party/libsecret
+		third_party/libsrtp
+		third_party/libsync
+		third_party/libudev
+		third_party/libva_protected_content
+		third_party/libvpx
+		third_party/libvpx/source/libvpx/third_party/x86inc
+		third_party/libwebm
+		third_party/libx11
+		third_party/libxcb-keysyms
+		third_party/libxml/chromium
+		third_party/libyuv
+		third_party/llvm
+		third_party/lottie
+		third_party/lss
+		third_party/lzma_sdk
+		third_party/mako
+		third_party/maldoca
+		third_party/maldoca/src/third_party/tensorflow_protos
+		third_party/maldoca/src/third_party/zlibwrapper
+		third_party/markupsafe
+		third_party/mesa
+		third_party/metrics_proto
+		third_party/minigbm
+		third_party/modp_b64
+		third_party/nasm
+		third_party/nearby
+		third_party/neon_2_sse
+		third_party/node
+		third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
+		third_party/one_euro_filter
+		third_party/opencv
+		third_party/openscreen
+		third_party/openscreen/src/third_party/mozilla
+		third_party/openscreen/src/third_party/tinycbor/src/src
+		third_party/ots
+		third_party/pdfium
+		third_party/pdfium/third_party/agg23
+		third_party/pdfium/third_party/base
+		third_party/pdfium/third_party/bigint
+		third_party/pdfium/third_party/freetype
+		third_party/pdfium/third_party/lcms
+		third_party/pdfium/third_party/libopenjpeg20
+		third_party/pdfium/third_party/libpng16
+		third_party/pdfium/third_party/libtiff
+		third_party/pdfium/third_party/skia_shared
+		third_party/perfetto
+		third_party/perfetto/protos/third_party/chromium
+		third_party/pffft
+		third_party/ply
+		third_party/polymer
+		third_party/private-join-and-compute
+		third_party/private_membership
+		third_party/protobuf
+		third_party/protobuf/third_party/six
+		third_party/pyjson5
+		third_party/qcms
+		third_party/rnnoise
+		third_party/s2cellid
+		third_party/securemessage
+		third_party/shell-encryption
+		third_party/simplejson
+		third_party/skia
+		third_party/skia/include/third_party/skcms
+		third_party/skia/include/third_party/vulkan
+		third_party/skia/third_party/skcms
+		third_party/skia/third_party/vulkan
+		third_party/smhasher
+		third_party/snappy
+		third_party/sqlite
+		third_party/swiftshader
+		third_party/swiftshader/third_party/astc-encoder
+		third_party/swiftshader/third_party/llvm-subzero
+		third_party/swiftshader/third_party/marl
+		third_party/swiftshader/third_party/subzero
+		third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
+		third_party/tcmalloc
+		third_party/tensorflow-text
+		third_party/tflite
+		third_party/tflite/src/third_party/eigen3
+		third_party/tflite/src/third_party/fft2d
+		third_party/ruy
+		third_party/six
+		third_party/ukey2
+		third_party/unrar
+		third_party/usrsctp
+		third_party/utf
+		third_party/vulkan
+		third_party/web-animations-js
+		third_party/webdriver
+		third_party/webgpu-cts
+		third_party/webrtc
+		third_party/webrtc/common_audio/third_party/ooura
+		third_party/webrtc/common_audio/third_party/spl_sqrt_floor
+		third_party/webrtc/modules/third_party/fft
+		third_party/webrtc/modules/third_party/g711
+		third_party/webrtc/modules/third_party/g722
+		third_party/webrtc/rtc_base/third_party/base64
+		third_party/webrtc/rtc_base/third_party/sigslot
+		third_party/widevine
+		third_party/woff2
+		third_party/wuffs
+		third_party/x11proto
+		third_party/xcbproto
+		third_party/zxcvbn-cpp
+		third_party/zlib/google
+		url/third_party/mozilla
+		v8/src/third_party/siphash
+		v8/src/third_party/valgrind
+		v8/src/third_party/utf8-decoder
+		v8/third_party/inspector_protocol
+		v8/third_party/v8
+
+		# gyp -> gn leftovers
+		base/third_party/libevent
+		third_party/speech-dispatcher
+		third_party/usb_ids
+		third_party/xdg-utils
+	)
+	if ! use system-ffmpeg; then
+		keeplibs+=( third_party/ffmpeg third_party/opus )
+	fi
+	if ! use system-icu; then
+		keeplibs+=( third_party/icu )
+	fi
+	if use system-harfbuzz; then
+		keeplibs+=( third_party/harfbuzz-ng/utils )
+	else
+		keeplibs+=( third_party/harfbuzz-ng )
+	fi
+	if use wayland && ! use headless ; then
+		keeplibs+=( third_party/wayland )
+	fi
+	if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+		keeplibs+=( third_party/libxml )
+		keeplibs+=( third_party/libxslt )
+		keeplibs+=( third_party/openh264 )
+		keeplibs+=( third_party/re2 )
+		if use system-icu; then
+			keeplibs+=( third_party/icu )
+		fi
+	fi
+	if use arm64 || use ppc64 ; then
+		keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
+	fi
+	# we need to generate ppc64 stuff because upstream does not ship it yet
+	# it has to be done before unbundling.
+	if use ppc64; then
+		pushd third_party/libvpx >/dev/null || die
+		mkdir -p source/config/linux/ppc64 || die
+		./generate_gni.sh || die
+		popd >/dev/null || die
+	fi
+
+	# Remove most bundled libraries. Some are still needed.
+	build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
+
+	if use js-type-check; then
+		ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die
+	fi
+
+	# bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
+	mkdir -p buildtools/third_party/eu-strip/bin || die
+	ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
+}
+
+src_configure() {
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	local myconf_gn=""
+
+	# Make sure the build system will use the right tools, bug #340795.
+	tc-export AR CC CXX NM
+
+	if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
+		# Force clang since gcc is pretty broken at the moment.
+		CC=${CHOST}-clang
+		CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	if tc-is-clang; then
+		myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
+	else
+		if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+			die "Compiling with sys-libs/libcxx requires clang."
+		fi
+		myconf_gn+=" is_clang=false"
+	fi
+
+	# Define a custom toolchain for GN
+	myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
+
+	if tc-is-cross-compiler; then
+		tc-export BUILD_{AR,CC,CXX,NM}
+		myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
+		myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
+	else
+		myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
+	fi
+
+	# GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
+	myconf_gn+=" is_debug=false"
+
+	# enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
+	# DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
+	myconf_gn+=" dcheck_always_on=$(usex debug true false)"
+	myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
+
+	# Component build isn't generally intended for use by end users. It's mostly useful
+	# for development and debugging.
+	myconf_gn+=" is_component_build=$(usex component-build true false)"
+
+	# Disable nacl, we can't build without pnacl (http://crbug.com/269560).
+	myconf_gn+=" enable_nacl=false"
+
+	# Use system-provided libraries.
+	# TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
+	# TODO: use_system_hunspell (upstream changes needed).
+	# TODO: use_system_protobuf (bug #525560).
+	# TODO: use_system_sqlite (http://crbug.com/22208).
+
+	# libevent: https://bugs.gentoo.org/593458
+	local gn_system_libraries=(
+		flac
+		fontconfig
+		freetype
+		# Need harfbuzz_from_pkgconfig target
+		#harfbuzz-ng
+		libdrm
+		libjpeg
+		libpng
+		libwebp
+		zlib
+	)
+	if use system-ffmpeg; then
+		gn_system_libraries+=( ffmpeg opus )
+	fi
+	if use system-icu; then
+		gn_system_libraries+=( icu )
+	fi
+	if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then
+		# unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++
+		gn_system_libraries+=( libxml )
+		gn_system_libraries+=( libxslt )
+		gn_system_libraries+=( openh264 )
+		gn_system_libraries+=( re2 )
+	fi
+	build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
+
+	# See dependency logic in third_party/BUILD.gn
+	myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
+
+	# Disable deprecated libgnome-keyring dependency, bug #713012
+	myconf_gn+=" use_gnome_keyring=false"
+
+	# Optional dependencies.
+	myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)"
+	myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
+	myconf_gn+=" enable_widevine=$(usex widevine true false)"
+	myconf_gn+=" use_cups=$(usex cups true false)"
+	myconf_gn+=" use_kerberos=$(usex kerberos true false)"
+	myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
+	myconf_gn+=" use_vaapi=$(usex vaapi true false)"
+	myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
+
+	# TODO: link_pulseaudio=true for GN.
+
+	myconf_gn+=" disable_fieldtrial_testing_config=true"
+
+	# Never use bundled gold binary. Disable gold linker flags for now.
+	# Do not use bundled clang.
+	# Trying to use gold results in linker crash.
+	myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false"
+
+	# Disable forced lld, bug 641556
+	myconf_gn+=" use_lld=false"
+
+	# Disable pseudolocales, only used for testing
+	myconf_gn+=" enable_pseudolocales=false"
+
+	# Disable code formating of generated files
+	myconf_gn+=" blink_enable_generated_code_formatting=false"
+
+	ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
+	myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
+	myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
+
+	# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
+	# Note: these are for Gentoo use ONLY. For your own distribution,
+	# please get your own set of keys. Feel free to contact chromium@gentoo.org
+	# for more info. The OAuth2 credentials, however, have been left out.
+	# Those OAuth2 credentials have been broken for quite some time anyway.
+	# Instead we apply a patch to use the --oauth2-client-id= and
+	# --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
+	# GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
+	# Chromium without baked-in values.
+	local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
+	myconf_gn+=" google_api_key=\"${google_api_key}\""
+	local myarch="$(tc-arch)"
+
+	# Avoid CFLAGS problems, bug #352457, bug #390147.
+	if ! use custom-cflags; then
+		replace-flags "-Os" "-O2"
+		strip-flags
+
+		# Debug info section overflows without component build
+		# Prevent linker from running out of address space, bug #471810 .
+		if ! use component-build || use x86; then
+			filter-flags "-g*"
+		fi
+
+		# Prevent libvpx build failures. Bug 530248, 544702, 546984.
+		if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
+			filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4
+		fi
+	fi
+
+	if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+		append-flags -stdlib=libc++
+		append-ldflags -stdlib=libc++
+	fi
+
+	if [[ $myarch = amd64 ]] ; then
+		myconf_gn+=" target_cpu=\"x64\""
+		ffmpeg_target_arch=x64
+	elif [[ $myarch = x86 ]] ; then
+		myconf_gn+=" target_cpu=\"x86\""
+		ffmpeg_target_arch=ia32
+
+		# This is normally defined by compiler_cpu_abi in
+		# build/config/compiler/BUILD.gn, but we patch that part out.
+		append-flags -msse2 -mfpmath=sse -mmmx
+	elif [[ $myarch = arm64 ]] ; then
+		myconf_gn+=" target_cpu=\"arm64\""
+		ffmpeg_target_arch=arm64
+	elif [[ $myarch = arm ]] ; then
+		myconf_gn+=" target_cpu=\"arm\""
+		ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
+	elif [[ $myarch = ppc64 ]] ; then
+		myconf_gn+=" target_cpu=\"ppc64\""
+		ffmpeg_target_arch=ppc64
+	else
+		die "Failed to determine target arch, got '$myarch'."
+	fi
+
+	# Make sure that -Werror doesn't get added to CFLAGS by the build system.
+	# Depending on GCC version the warnings are different and we don't want
+	# the build to fail because of that.
+	myconf_gn+=" treat_warnings_as_errors=false"
+
+	# Disable fatal linker warnings, bug 506268.
+	myconf_gn+=" fatal_linker_warnings=false"
+
+	# Bug 491582.
+	export TMPDIR="${WORKDIR}/temp"
+	mkdir -p -m 755 "${TMPDIR}" || die
+
+	# https://bugs.gentoo.org/654216
+	addpredict /dev/dri/ #nowarn
+
+	#if ! use system-ffmpeg; then
+	if false; then
+		local build_ffmpeg_args=""
+		if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
+			build_ffmpeg_args+=" --disable-asm"
+		fi
+
+		# Re-configure bundled ffmpeg. See bug #491378 for example reasons.
+		einfo "Configuring bundled ffmpeg..."
+		pushd third_party/ffmpeg > /dev/null || die
+		chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
+			--branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
+		chromium/scripts/copy_config.sh || die
+		chromium/scripts/generate_gn.py || die
+		popd > /dev/null || die
+	fi
+
+	# Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470
+	append-cxxflags $(test-flags-CXX -flax-vector-conversions=all)
+
+	# Disable unknown warning message from clang.
+	tc-is-clang && append-flags -Wno-unknown-warning-option
+
+	# Explicitly disable ICU data file support for system-icu builds.
+	if use system-icu; then
+		myconf_gn+=" icu_use_data_file=false"
+	fi
+
+	# Enable ozone wayland and/or headless support
+	myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
+	myconf_gn+=" ozone_platform_headless=true"
+	myconf_gn+=" ozone_platform_x11=$(usex headless false true)"
+	if use wayland || use headless; then
+		if use headless; then
+			myconf_gn+=" ozone_platform=\"headless\""
+			myconf_gn+=" use_x11=false"
+		else
+			myconf_gn+=" ozone_platform_wayland=true"
+			myconf_gn+=" use_system_libdrm=true"
+			myconf_gn+=" use_system_minigbm=true"
+			myconf_gn+=" use_xkbcommon=true"
+			myconf_gn+=" ozone_platform=\"wayland\""
+		fi
+	else
+		myconf_gn+=" ozone_platform=\"x11\""
+	fi
+
+	# Enable official builds
+	myconf_gn+=" is_official_build=$(usex official true false)"
+	myconf_gn+=" use_thin_lto=false"
+	if use official; then
+		# Allow building against system libraries in official builds
+		sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+			tools/generate_shim_headers/generate_shim_headers.py || die
+		# Disable CFI: unsupported for GCC, requires clang+lto+lld
+		myconf_gn+=" is_cfi=false"
+		# Disable PGO, because profile data is only compatible with >=clang-11
+		myconf_gn+=" chrome_pgo_phase=0"
+		# Don't add symbols to build
+		myconf_gn+=" symbol_level=0"
+	fi
+
+	einfo "Configuring Chromium..."
+	set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
+	echo "$@"
+	"$@" || die
+}
+
+src_compile() {
+	# Final link uses lots of file descriptors.
+	ulimit -n 2048
+
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	# Don't inherit PYTHONPATH from environment, bug #789021, #812689
+	local -x PYTHONPATH=
+
+	#"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
+
+	# Build mksnapshot and pax-mark it.
+	local x
+	for x in mksnapshot v8_context_snapshot_generator; do
+		if tc-is-cross-compiler; then
+			eninja -C out/Release "host/${x}"
+			pax-mark m "out/Release/host/${x}"
+		else
+			eninja -C out/Release "${x}"
+			pax-mark m "out/Release/${x}"
+		fi
+	done
+
+	# Even though ninja autodetects number of CPUs, we respect
+	# user's options, for debugging with -j 1 or any other reason.
+	eninja -C out/Release chrome chromedriver
+	use suid && eninja -C out/Release chrome_sandbox
+
+	pax-mark m out/Release/chrome
+
+	mv out/Release/chromedriver{.unstripped,} || die
+
+	# Build manpage; bug #684550
+	sed -e 's|@@PACKAGE@@|chromium-browser|g;
+		s|@@MENUNAME@@|Chromium|g;' \
+		chrome/app/resources/manpage.1.in > \
+		out/Release/chromium-browser.1 || die
+
+	# Build desktop file; bug #706786
+	sed -e 's|@@MENUNAME@@|Chromium|g;
+		s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
+		s|@@PACKAGE@@|chromium-browser|g;
+		s|\(^Exec=\)/usr/bin/|\1|g;' \
+		chrome/installer/linux/common/desktop.template > \
+		out/Release/chromium-browser-chromium.desktop || die
+
+	# Build vk_swiftshader_icd.json; bug #827861
+	sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \
+		third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \
+		out/Release/vk_swiftshader_icd.json || die
+}
+
+src_install() {
+	local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
+	exeinto "${CHROMIUM_HOME}"
+	doexe out/Release/chrome
+
+	if use suid; then
+		newexe out/Release/chrome_sandbox chrome-sandbox
+		fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
+	fi
+
+	doexe out/Release/chromedriver
+	doexe out/Release/chrome_crashpad_handler
+
+	ozone_auto_session () {
+		use wayland && ! use headless && echo true || echo false
+	}
+	local sedargs=( -e
+			"s:/usr/lib/:/usr/$(get_libdir)/:g;
+			s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
+	)
+	sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
+	doexe chromium-launcher.sh
+
+	# It is important that we name the target "chromium-browser",
+	# xdg-utils expect it; bug #355517.
+	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
+	# keep the old symlink around for consistency
+	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
+
+	dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
+
+	# Allow users to override command-line options, bug #357629.
+	insinto /etc/chromium
+	newins "${FILESDIR}/chromium.default" "default"
+
+	pushd out/Release/locales > /dev/null || die
+	chromium_remove_language_paks
+	popd
+
+	insinto "${CHROMIUM_HOME}"
+	doins out/Release/*.bin
+	doins out/Release/*.pak
+	(
+		shopt -s nullglob
+		local files=(out/Release/*.so out/Release/*.so.[0-9])
+		[[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
+	)
+
+	if ! use system-icu; then
+		doins out/Release/icudtl.dat
+	fi
+
+	doins -r out/Release/locales
+	doins -r out/Release/resources
+	doins -r out/Release/MEIPreload
+
+	# Install vk_swiftshader_icd.json; bug #827861
+	doins out/Release/vk_swiftshader_icd.json
+
+	if [[ -d out/Release/swiftshader ]]; then
+		insinto "${CHROMIUM_HOME}/swiftshader"
+		doins out/Release/swiftshader/*.so
+	fi
+
+	# Install icons
+	local branding size
+	for size in 16 24 32 48 64 128 256 ; do
+		case ${size} in
+			16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
+				*) branding="chrome/app/theme/chromium" ;;
+		esac
+		newicon -s ${size} "${branding}/product_logo_${size}.png" \
+			chromium-browser.png
+	done
+
+	# Install desktop entry
+	domenu out/Release/chromium-browser-chromium.desktop
+
+	# Install GNOME default application entry (bug #303100).
+	insinto /usr/share/gnome-control-center/default-apps
+	newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
+
+	# Install manpage; bug #684550
+	doman out/Release/chromium-browser.1
+	dosym chromium-browser.1 /usr/share/man/man1/chromium.1
+
+	readme.gentoo_create_doc
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+	readme.gentoo_print_elog
+
+	if use vaapi; then
+		elog "VA-API is disabled by default at runtime. You have to enable it"
+		elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
+		elog "in /etc/chromium/default."
+	fi
+	if use screencast; then
+		elog "Screencast is disabled by default at runtime. Either enable it"
+		elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
+		elog "inside Chromium or add --enable-webrtc-pipewire-capturer"
+		elog "to CHROMIUM_FLAGS in /etc/chromium/default."
+	fi
+}

diff --git a/www-client/chromium/chromium-98.0.4750.0.ebuild b/www-client/chromium/chromium-98.0.4750.0.ebuild
new file mode 100644
index 0000000..840aa82
--- /dev/null
+++ b/www-client/chromium/chromium-98.0.4750.0.ebuild
@@ -0,0 +1,963 @@
+# Copyright 2009-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="xml"
+
+CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
+	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
+	sv sw ta te th tr uk vi zh-CN zh-TW"
+
+inherit check-reqs chromium-2 desktop flag-o-matic ninja-utils pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
+
+DESCRIPTION="Open-source version of Google Chrome web browser"
+HOMEPAGE="https://chromium.org/"
+PATCHSET="3"
+PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
+SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
+	https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0/dev"
+KEYWORDS="~amd64 ~arm64 ~x86"
+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"
+REQUIRED_USE="
+	component-build? ( !suid )
+	screencast? ( wayland )
+"
+
+COMMON_X_DEPEND="
+	media-libs/mesa:=[gbm(+)]
+	x11-libs/libX11:=
+	x11-libs/libXcomposite:=
+	x11-libs/libXcursor:=
+	x11-libs/libXdamage:=
+	x11-libs/libXext:=
+	x11-libs/libXfixes:=
+	>=x11-libs/libXi-1.6.0:=
+	x11-libs/libXrandr:=
+	x11-libs/libXrender:=
+	x11-libs/libXtst:=
+	x11-libs/libxcb:=
+	x11-libs/libxshmfence:=
+	vaapi? ( >=x11-libs/libva-2.7:=[X,drm] )
+"
+
+COMMON_DEPEND="
+	app-arch/bzip2:=
+	cups? ( >=net-print/cups-1.3.11:= )
+	dev-libs/expat:=
+	dev-libs/glib:2
+	>=dev-libs/libxml2-2.9.4-r3:=[icu]
+	dev-libs/nspr:=
+	>=dev-libs/nss-3.26:=
+	>=media-libs/alsa-lib-1.0.19:=
+	media-libs/fontconfig:=
+	>=media-libs/freetype-2.11.0-r1:=
+	system-harfbuzz? ( >=media-libs/harfbuzz-2.9.0:0=[icu(-)] )
+	media-libs/libjpeg-turbo:=
+	system-png? ( media-libs/libpng:=[-apng] )
+	pulseaudio? ( media-sound/pulseaudio:= )
+	system-ffmpeg? (
+		>=media-video/ffmpeg-4.3:=
+		|| (
+			media-video/ffmpeg[-samba]
+			>=net-fs/samba-4.5.10-r1[-debug(-)]
+		)
+		>=media-libs/opus-1.3.1:=
+	)
+	net-misc/curl[ssl]
+	sys-apps/dbus:=
+	sys-apps/pciutils:=
+	virtual/udev
+	x11-libs/cairo:=
+	x11-libs/gdk-pixbuf:2
+	x11-libs/libxkbcommon:=
+	x11-libs/pango:=
+	media-libs/flac:=
+	>=media-libs/libwebp-0.4.0:=
+	sys-libs/zlib:=[minizip]
+	kerberos? ( virtual/krb5 )
+	!headless? (
+		${COMMON_X_DEPEND}
+		>=app-accessibility/at-spi2-atk-2.26:2
+		>=app-accessibility/at-spi2-core-2.26:2
+		>=dev-libs/atk-2.26
+		x11-libs/gtk+:3[X]
+		wayland? (
+			dev-libs/wayland:=
+			screencast? ( media-video/pipewire:0/0.3 )
+			x11-libs/gtk+:3[wayland,X]
+			x11-libs/libdrm:=
+		)
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	x11-misc/xdg-utils
+	virtual/opengl
+	virtual/ttf-fonts
+	selinux? ( sec-policy/selinux-chromium )
+"
+DEPEND="${COMMON_DEPEND}
+"
+# dev-vcs/git - https://bugs.gentoo.org/593476
+BDEPEND="
+	${PYTHON_DEPS}
+	$(python_gen_any_dep '
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	')
+	>=app-arch/gzip-1.7
+	dev-lang/perl
+	>=dev-util/gn-0.1807
+	dev-vcs/git
+	>=dev-util/gperf-3.0.3
+	>=dev-util/ninja-1.7.2
+	>=net-libs/nodejs-7.6.0[inspector]
+	>=sys-devel/bison-2.4.3
+	sys-devel/flex
+	virtual/pkgconfig
+	js-type-check? ( virtual/jre )
+"
+
+# These are intended for ebuild maintainer use to force clang if GCC is broken.
+: ${CHROMIUM_FORCE_CLANG=no}
+: ${CHROMIUM_FORCE_LIBCXX=no}
+
+if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
+	BDEPEND+=" >=sys-devel/clang-12"
+fi
+
+if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+	RDEPEND+=" >=sys-libs/libcxx-12"
+	DEPEND+=" >=sys-libs/libcxx-12"
+else
+	COMMON_DEPEND="
+		dev-libs/libxslt:=
+		>=dev-libs/re2-0.2019.08.01:=
+		>=media-libs/openh264-1.6.0:=
+		system-icu? ( >=dev-libs/icu-69.1:= )
+	"
+	RDEPEND+="${COMMON_DEPEND}"
+	DEPEND+="${COMMON_DEPEND}"
+fi
+
+if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
+	EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
+fi
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Some web pages may require additional fonts to display properly.
+Try installing some of the following packages if some characters
+are not displayed properly:
+- media-fonts/arphicfonts
+- media-fonts/droid
+- media-fonts/ipamonafont
+- media-fonts/noto
+- media-fonts/ja-ipafonts
+- media-fonts/takao-fonts
+- media-fonts/wqy-microhei
+- media-fonts/wqy-zenhei
+
+To fix broken icons on the Downloads page, you should install an icon
+theme that covers the appropriate MIME types, and configure this as your
+GTK+ icon theme.
+
+For native file dialogs in KDE, install kde-apps/kdialog.
+
+To make password storage work with your desktop environment you may
+have install one of the supported credentials management applications:
+- app-crypt/libsecret (GNOME)
+- kde-frameworks/kwallet (KDE)
+If you have one of above packages installed, but don't want to use
+them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
+in /etc/chromium/default.
+"
+
+python_check_deps() {
+	has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
+}
+
+pre_build_checks() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		local -x CPP="$(tc-getCXX) -E"
+		if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
+			die "At least gcc 9.2 is required"
+		fi
+		if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then
+			CPP="${CHOST}-clang++ -E"
+			if ! ver_test "$(clang-major-version)" -ge 12; then
+				die "At least clang 12 is required"
+			fi
+		fi
+	fi
+
+	# Check build requirements, bug #541816 and bug #471810 .
+	CHECKREQS_MEMORY="4G"
+	CHECKREQS_DISK_BUILD="9G"
+	if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
+		if use custom-cflags || use component-build; then
+			CHECKREQS_DISK_BUILD="25G"
+		fi
+		if ! use component-build; then
+			CHECKREQS_MEMORY="16G"
+		fi
+	fi
+	check-reqs_pkg_setup
+}
+
+pkg_pretend() {
+	pre_build_checks
+}
+
+pkg_setup() {
+	pre_build_checks
+
+	chromium_suid_sandbox_check_kernel_config
+
+	# nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams
+	if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then
+		ewarn "Proprietary nVidia driver does not work with Wayland. You can disable"
+		ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default."
+	fi
+}
+
+src_prepare() {
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	local PATCHES=(
+		"${WORKDIR}/patches"
+		"${FILESDIR}/chromium-93-InkDropHost-crash.patch"
+		"${FILESDIR}/chromium-98-EnumTable-crash.patch"
+		"${FILESDIR}/chromium-98-system-libdrm.patch"
+		"${FILESDIR}/chromium-glibc-2.34.patch"
+		"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
+		"${FILESDIR}/chromium-shim_headers.patch"
+	)
+
+	default
+
+	mkdir -p third_party/node/linux/node-linux-x64/bin || die
+	ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
+
+	# adjust python interpreter version
+	sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
+
+	local keeplibs=(
+		base/third_party/cityhash
+		base/third_party/double_conversion
+		base/third_party/dynamic_annotations
+		base/third_party/icu
+		base/third_party/nspr
+		base/third_party/superfasthash
+		base/third_party/symbolize
+		base/third_party/valgrind
+		base/third_party/xdg_mime
+		base/third_party/xdg_user_dirs
+		buildtools/third_party/libc++
+		buildtools/third_party/libc++abi
+		chrome/third_party/mozilla_security_manager
+		courgette/third_party
+		net/third_party/mozilla_security_manager
+		net/third_party/nss
+		net/third_party/quic
+		net/third_party/uri_template
+		third_party/abseil-cpp
+		third_party/angle
+		third_party/angle/src/common/third_party/base
+		third_party/angle/src/common/third_party/smhasher
+		third_party/angle/src/common/third_party/xxhash
+		third_party/angle/src/third_party/libXNVCtrl
+		third_party/angle/src/third_party/trace_event
+		third_party/angle/src/third_party/volk
+		third_party/apple_apsl
+		third_party/axe-core
+		third_party/blink
+		third_party/boringssl
+		third_party/boringssl/src/third_party/fiat
+		third_party/breakpad
+		third_party/breakpad/breakpad/src/third_party/curl
+		third_party/brotli
+		third_party/catapult
+		third_party/catapult/common/py_vulcanize/third_party/rcssmin
+		third_party/catapult/common/py_vulcanize/third_party/rjsmin
+		third_party/catapult/third_party/beautifulsoup4-4.9.3
+		third_party/catapult/third_party/html5lib-1.1
+		third_party/catapult/third_party/polymer
+		third_party/catapult/third_party/six
+		third_party/catapult/tracing/third_party/d3
+		third_party/catapult/tracing/third_party/gl-matrix
+		third_party/catapult/tracing/third_party/jpeg-js
+		third_party/catapult/tracing/third_party/jszip
+		third_party/catapult/tracing/third_party/mannwhitneyu
+		third_party/catapult/tracing/third_party/oboe
+		third_party/catapult/tracing/third_party/pako
+		third_party/ced
+		third_party/cld_3
+		third_party/closure_compiler
+		third_party/crashpad
+		third_party/crashpad/crashpad/third_party/lss
+		third_party/crashpad/crashpad/third_party/zlib
+		third_party/crc32c
+		third_party/cros_system_api
+		third_party/dav1d
+		third_party/dawn
+		third_party/dawn/third_party/khronos
+		third_party/dawn/third_party/tint
+		third_party/depot_tools
+		third_party/devscripts
+		third_party/devtools-frontend
+		third_party/devtools-frontend/src/front_end/third_party/acorn
+		third_party/devtools-frontend/src/front_end/third_party/axe-core
+		third_party/devtools-frontend/src/front_end/third_party/chromium
+		third_party/devtools-frontend/src/front_end/third_party/codemirror
+		third_party/devtools-frontend/src/front_end/third_party/diff
+		third_party/devtools-frontend/src/front_end/third_party/i18n
+		third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
+		third_party/devtools-frontend/src/front_end/third_party/lighthouse
+		third_party/devtools-frontend/src/front_end/third_party/lit-html
+		third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
+		third_party/devtools-frontend/src/front_end/third_party/marked
+		third_party/devtools-frontend/src/front_end/third_party/puppeteer
+		third_party/devtools-frontend/src/front_end/third_party/wasmparser
+		third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
+		third_party/devtools-frontend/src/third_party
+		third_party/distributed_point_functions
+		third_party/dom_distiller_js
+		third_party/eigen3
+		third_party/emoji-segmenter
+		third_party/farmhash
+		third_party/fdlibm
+		third_party/fft2d
+		third_party/flatbuffers
+		third_party/freetype
+		third_party/fusejs
+		third_party/highway
+		third_party/libgifcodec
+		third_party/liburlpattern
+		third_party/libzip
+		third_party/gemmlowp
+		third_party/google_input_tools
+		third_party/google_input_tools/third_party/closure_library
+		third_party/google_input_tools/third_party/closure_library/third_party/closure
+		third_party/googletest
+		third_party/hunspell
+		third_party/iccjpeg
+		third_party/inspector_protocol
+		third_party/jinja2
+		third_party/jsoncpp
+		third_party/jstemplate
+		third_party/khronos
+		third_party/leveldatabase
+		third_party/libXNVCtrl
+		third_party/libaddressinput
+		third_party/libaom
+		third_party/libaom/source/libaom/third_party/fastfeat
+		third_party/libaom/source/libaom/third_party/vector
+		third_party/libaom/source/libaom/third_party/x86inc
+		third_party/libavif
+		third_party/libgav1
+		third_party/libjingle
+		third_party/libjxl
+		third_party/libphonenumber
+		third_party/libsecret
+		third_party/libsrtp
+		third_party/libsync
+		third_party/libudev
+		third_party/libva_protected_content
+		third_party/libvpx
+		third_party/libvpx/source/libvpx/third_party/x86inc
+		third_party/libwebm
+		third_party/libx11
+		third_party/libxcb-keysyms
+		third_party/libxml/chromium
+		third_party/libyuv
+		third_party/llvm
+		third_party/lottie
+		third_party/lss
+		third_party/lzma_sdk
+		third_party/mako
+		third_party/maldoca
+		third_party/maldoca/src/third_party/tensorflow_protos
+		third_party/maldoca/src/third_party/zlibwrapper
+		third_party/markupsafe
+		third_party/mesa
+		third_party/metrics_proto
+		third_party/minigbm
+		third_party/modp_b64
+		third_party/nasm
+		third_party/nearby
+		third_party/neon_2_sse
+		third_party/node
+		third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
+		third_party/one_euro_filter
+		third_party/opencv
+		third_party/openscreen
+		third_party/openscreen/src/third_party/mozilla
+		third_party/openscreen/src/third_party/tinycbor/src/src
+		third_party/ots
+		third_party/pdfium
+		third_party/pdfium/third_party/agg23
+		third_party/pdfium/third_party/base
+		third_party/pdfium/third_party/bigint
+		third_party/pdfium/third_party/freetype
+		third_party/pdfium/third_party/lcms
+		third_party/pdfium/third_party/libopenjpeg20
+		third_party/pdfium/third_party/libpng16
+		third_party/pdfium/third_party/libtiff
+		third_party/pdfium/third_party/skia_shared
+		third_party/perfetto
+		third_party/perfetto/protos/third_party/chromium
+		third_party/pffft
+		third_party/ply
+		third_party/polymer
+		third_party/private-join-and-compute
+		third_party/private_membership
+		third_party/protobuf
+		third_party/protobuf/third_party/six
+		third_party/pyjson5
+		third_party/qcms
+		third_party/rnnoise
+		third_party/s2cellid
+		third_party/securemessage
+		third_party/shell-encryption
+		third_party/simplejson
+		third_party/skia
+		third_party/skia/include/third_party/skcms
+		third_party/skia/include/third_party/vulkan
+		third_party/skia/third_party/skcms
+		third_party/skia/third_party/vulkan
+		third_party/smhasher
+		third_party/snappy
+		third_party/sqlite
+		third_party/swiftshader
+		third_party/swiftshader/third_party/astc-encoder
+		third_party/swiftshader/third_party/llvm-subzero
+		third_party/swiftshader/third_party/marl
+		third_party/swiftshader/third_party/subzero
+		third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
+		third_party/tcmalloc
+		third_party/tensorflow-text
+		third_party/tflite
+		third_party/tflite/src/third_party/eigen3
+		third_party/tflite/src/third_party/fft2d
+		third_party/ruy
+		third_party/six
+		third_party/ukey2
+		third_party/unrar
+		third_party/usrsctp
+		third_party/utf
+		third_party/vulkan
+		third_party/web-animations-js
+		third_party/webdriver
+		third_party/webgpu-cts
+		third_party/webrtc
+		third_party/webrtc/common_audio/third_party/ooura
+		third_party/webrtc/common_audio/third_party/spl_sqrt_floor
+		third_party/webrtc/modules/third_party/fft
+		third_party/webrtc/modules/third_party/g711
+		third_party/webrtc/modules/third_party/g722
+		third_party/webrtc/rtc_base/third_party/base64
+		third_party/webrtc/rtc_base/third_party/sigslot
+		third_party/widevine
+		third_party/woff2
+		third_party/wuffs
+		third_party/x11proto
+		third_party/xcbproto
+		third_party/zxcvbn-cpp
+		third_party/zlib/google
+		url/third_party/mozilla
+		v8/src/third_party/siphash
+		v8/src/third_party/valgrind
+		v8/src/third_party/utf8-decoder
+		v8/third_party/inspector_protocol
+		v8/third_party/v8
+
+		# gyp -> gn leftovers
+		base/third_party/libevent
+		third_party/speech-dispatcher
+		third_party/usb_ids
+		third_party/xdg-utils
+	)
+	if ! use system-ffmpeg; then
+		keeplibs+=( third_party/ffmpeg third_party/opus )
+	fi
+	if ! use system-icu; then
+		keeplibs+=( third_party/icu )
+	fi
+	if ! use system-png; then
+		keeplibs+=( third_party/libpng )
+	fi
+	if use system-harfbuzz; then
+		keeplibs+=( third_party/harfbuzz-ng/utils )
+	else
+		keeplibs+=( third_party/harfbuzz-ng )
+	fi
+	if use wayland && ! use headless ; then
+		keeplibs+=( third_party/wayland )
+	fi
+	if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+		keeplibs+=( third_party/libxml )
+		keeplibs+=( third_party/libxslt )
+		keeplibs+=( third_party/openh264 )
+		keeplibs+=( third_party/re2 )
+		if use system-icu; then
+			keeplibs+=( third_party/icu )
+		fi
+	fi
+	if use arm64 || use ppc64 ; then
+		keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
+	fi
+	# we need to generate ppc64 stuff because upstream does not ship it yet
+	# it has to be done before unbundling.
+	if use ppc64; then
+		pushd third_party/libvpx >/dev/null || die
+		mkdir -p source/config/linux/ppc64 || die
+		./generate_gni.sh || die
+		popd >/dev/null || die
+	fi
+
+	# Remove most bundled libraries. Some are still needed.
+	build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
+
+	if use js-type-check; then
+		ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die
+	fi
+
+	# bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
+	mkdir -p buildtools/third_party/eu-strip/bin || die
+	ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
+}
+
+src_configure() {
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	local myconf_gn=""
+
+	# Make sure the build system will use the right tools, bug #340795.
+	tc-export AR CC CXX NM
+
+	if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
+		# Force clang since gcc is pretty broken at the moment.
+		CC=${CHOST}-clang
+		CXX=${CHOST}-clang++
+		strip-unsupported-flags
+	fi
+
+	if tc-is-clang; then
+		myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
+	else
+		if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+			die "Compiling with sys-libs/libcxx requires clang."
+		fi
+		myconf_gn+=" is_clang=false"
+	fi
+
+	# Define a custom toolchain for GN
+	myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
+
+	if tc-is-cross-compiler; then
+		tc-export BUILD_{AR,CC,CXX,NM}
+		myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
+		myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
+	else
+		myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
+	fi
+
+	# GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
+	myconf_gn+=" is_debug=false"
+
+	# enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
+	# DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
+	myconf_gn+=" dcheck_always_on=$(usex debug true false)"
+	myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
+
+	# Component build isn't generally intended for use by end users. It's mostly useful
+	# for development and debugging.
+	myconf_gn+=" is_component_build=$(usex component-build true false)"
+
+	# Disable nacl, we can't build without pnacl (http://crbug.com/269560).
+	myconf_gn+=" enable_nacl=false"
+
+	# Use system-provided libraries.
+	# TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
+	# TODO: use_system_hunspell (upstream changes needed).
+	# TODO: use_system_protobuf (bug #525560).
+	# TODO: use_system_sqlite (http://crbug.com/22208).
+
+	# libevent: https://bugs.gentoo.org/593458
+	local gn_system_libraries=(
+		flac
+		fontconfig
+		freetype
+		# Need harfbuzz_from_pkgconfig target
+		#harfbuzz-ng
+		libdrm
+		libjpeg
+		libwebp
+		zlib
+	)
+	if use system-ffmpeg; then
+		gn_system_libraries+=( ffmpeg opus )
+	fi
+	if use system-icu; then
+		gn_system_libraries+=( icu )
+	fi
+	if use system-png; then
+		gn_system_libraries+=( libpng )
+	fi
+	if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then
+		# unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++
+		gn_system_libraries+=( libxml )
+		gn_system_libraries+=( libxslt )
+		gn_system_libraries+=( openh264 )
+		gn_system_libraries+=( re2 )
+	fi
+	build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
+
+	# See dependency logic in third_party/BUILD.gn
+	myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
+
+	# Disable deprecated libgnome-keyring dependency, bug #713012
+	myconf_gn+=" use_gnome_keyring=false"
+
+	# Optional dependencies.
+	myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)"
+	myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
+	myconf_gn+=" enable_widevine=$(usex widevine true false)"
+	myconf_gn+=" use_cups=$(usex cups true false)"
+	myconf_gn+=" use_kerberos=$(usex kerberos true false)"
+	myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
+	myconf_gn+=" use_vaapi=$(usex vaapi true false)"
+	myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
+
+	# TODO: link_pulseaudio=true for GN.
+
+	myconf_gn+=" disable_fieldtrial_testing_config=true"
+
+	# Never use bundled gold binary. Disable gold linker flags for now.
+	# Do not use bundled clang.
+	# Trying to use gold results in linker crash.
+	myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false"
+
+	# Disable forced lld, bug 641556
+	myconf_gn+=" use_lld=false"
+
+	# Disable pseudolocales, only used for testing
+	myconf_gn+=" enable_pseudolocales=false"
+
+	# Disable code formating of generated files
+	myconf_gn+=" blink_enable_generated_code_formatting=false"
+
+	ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
+	myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
+	myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
+
+	# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
+	# Note: these are for Gentoo use ONLY. For your own distribution,
+	# please get your own set of keys. Feel free to contact chromium@gentoo.org
+	# for more info. The OAuth2 credentials, however, have been left out.
+	# Those OAuth2 credentials have been broken for quite some time anyway.
+	# Instead we apply a patch to use the --oauth2-client-id= and
+	# --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
+	# GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
+	# Chromium without baked-in values.
+	local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
+	myconf_gn+=" google_api_key=\"${google_api_key}\""
+	local myarch="$(tc-arch)"
+
+	# Avoid CFLAGS problems, bug #352457, bug #390147.
+	if ! use custom-cflags; then
+		replace-flags "-Os" "-O2"
+		strip-flags
+
+		# Debug info section overflows without component build
+		# Prevent linker from running out of address space, bug #471810 .
+		if ! use component-build || use x86; then
+			filter-flags "-g*"
+		fi
+
+		# Prevent libvpx build failures. Bug 530248, 544702, 546984.
+		if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
+			filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4
+		fi
+	fi
+
+	if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+		append-flags -stdlib=libc++
+		append-ldflags -stdlib=libc++
+	fi
+
+	if [[ $myarch = amd64 ]] ; then
+		myconf_gn+=" target_cpu=\"x64\""
+		ffmpeg_target_arch=x64
+	elif [[ $myarch = x86 ]] ; then
+		myconf_gn+=" target_cpu=\"x86\""
+		ffmpeg_target_arch=ia32
+
+		# This is normally defined by compiler_cpu_abi in
+		# build/config/compiler/BUILD.gn, but we patch that part out.
+		append-flags -msse2 -mfpmath=sse -mmmx
+	elif [[ $myarch = arm64 ]] ; then
+		myconf_gn+=" target_cpu=\"arm64\""
+		ffmpeg_target_arch=arm64
+	elif [[ $myarch = arm ]] ; then
+		myconf_gn+=" target_cpu=\"arm\""
+		ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
+	elif [[ $myarch = ppc64 ]] ; then
+		myconf_gn+=" target_cpu=\"ppc64\""
+		ffmpeg_target_arch=ppc64
+	else
+		die "Failed to determine target arch, got '$myarch'."
+	fi
+
+	# Make sure that -Werror doesn't get added to CFLAGS by the build system.
+	# Depending on GCC version the warnings are different and we don't want
+	# the build to fail because of that.
+	myconf_gn+=" treat_warnings_as_errors=false"
+
+	# Disable fatal linker warnings, bug 506268.
+	myconf_gn+=" fatal_linker_warnings=false"
+
+	# Bug 491582.
+	export TMPDIR="${WORKDIR}/temp"
+	mkdir -p -m 755 "${TMPDIR}" || die
+
+	# https://bugs.gentoo.org/654216
+	addpredict /dev/dri/ #nowarn
+
+	#if ! use system-ffmpeg; then
+	if false; then
+		local build_ffmpeg_args=""
+		if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
+			build_ffmpeg_args+=" --disable-asm"
+		fi
+
+		# Re-configure bundled ffmpeg. See bug #491378 for example reasons.
+		einfo "Configuring bundled ffmpeg..."
+		pushd third_party/ffmpeg > /dev/null || die
+		chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
+			--branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
+		chromium/scripts/copy_config.sh || die
+		chromium/scripts/generate_gn.py || die
+		popd > /dev/null || die
+	fi
+
+	# Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470
+	append-cxxflags $(test-flags-CXX -flax-vector-conversions=all)
+
+	# Disable unknown warning message from clang.
+	tc-is-clang && append-flags -Wno-unknown-warning-option
+
+	# Explicitly disable ICU data file support for system-icu builds.
+	if use system-icu; then
+		myconf_gn+=" icu_use_data_file=false"
+	fi
+
+	# Enable ozone wayland and/or headless support
+	myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
+	myconf_gn+=" ozone_platform_headless=true"
+	myconf_gn+=" ozone_platform_x11=$(usex headless false true)"
+	if use wayland || use headless; then
+		if use headless; then
+			myconf_gn+=" ozone_platform=\"headless\""
+			myconf_gn+=" use_x11=false"
+		else
+			myconf_gn+=" ozone_platform_wayland=true"
+			myconf_gn+=" use_system_libdrm=true"
+			myconf_gn+=" use_system_minigbm=true"
+			myconf_gn+=" use_xkbcommon=true"
+			myconf_gn+=" ozone_platform=\"wayland\""
+		fi
+	else
+		myconf_gn+=" ozone_platform=\"x11\""
+	fi
+
+	# Enable official builds
+	myconf_gn+=" is_official_build=$(usex official true false)"
+	myconf_gn+=" use_thin_lto=false"
+	if use official; then
+		# Allow building against system libraries in official builds
+		sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+			tools/generate_shim_headers/generate_shim_headers.py || die
+		# Disable CFI: unsupported for GCC, requires clang+lto+lld
+		myconf_gn+=" is_cfi=false"
+		# Disable PGO, because profile data is only compatible with >=clang-11
+		myconf_gn+=" chrome_pgo_phase=0"
+		# Don't add symbols to build
+		myconf_gn+=" symbol_level=0"
+	fi
+
+	einfo "Configuring Chromium..."
+	set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
+	echo "$@"
+	"$@" || die
+}
+
+src_compile() {
+	# Final link uses lots of file descriptors.
+	ulimit -n 2048
+
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	# Don't inherit PYTHONPATH from environment, bug #789021, #812689
+	local -x PYTHONPATH=
+
+	#"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
+
+	# Build mksnapshot and pax-mark it.
+	local x
+	for x in mksnapshot v8_context_snapshot_generator; do
+		if tc-is-cross-compiler; then
+			eninja -C out/Release "host/${x}"
+			pax-mark m "out/Release/host/${x}"
+		else
+			eninja -C out/Release "${x}"
+			pax-mark m "out/Release/${x}"
+		fi
+	done
+
+	# Even though ninja autodetects number of CPUs, we respect
+	# user's options, for debugging with -j 1 or any other reason.
+	eninja -C out/Release chrome chromedriver
+	use suid && eninja -C out/Release chrome_sandbox
+
+	pax-mark m out/Release/chrome
+
+	mv out/Release/chromedriver{.unstripped,} || die
+
+	# Build manpage; bug #684550
+	sed -e 's|@@PACKAGE@@|chromium-browser|g;
+		s|@@MENUNAME@@|Chromium|g;' \
+		chrome/app/resources/manpage.1.in > \
+		out/Release/chromium-browser.1 || die
+
+	# Build desktop file; bug #706786
+	sed -e 's|@@MENUNAME@@|Chromium|g;
+		s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
+		s|@@PACKAGE@@|chromium-browser|g;
+		s|\(^Exec=\)/usr/bin/|\1|g;' \
+		chrome/installer/linux/common/desktop.template > \
+		out/Release/chromium-browser-chromium.desktop || die
+
+	# Build vk_swiftshader_icd.json; bug #827861
+	sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \
+		third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \
+		out/Release/vk_swiftshader_icd.json || die
+}
+
+src_install() {
+	local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
+	exeinto "${CHROMIUM_HOME}"
+	doexe out/Release/chrome
+
+	if use suid; then
+		newexe out/Release/chrome_sandbox chrome-sandbox
+		fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
+	fi
+
+	doexe out/Release/chromedriver
+	doexe out/Release/chrome_crashpad_handler
+
+	ozone_auto_session () {
+		use wayland && ! use headless && echo true || echo false
+	}
+	local sedargs=( -e
+			"s:/usr/lib/:/usr/$(get_libdir)/:g;
+			s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
+	)
+	sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
+	doexe chromium-launcher.sh
+
+	# It is important that we name the target "chromium-browser",
+	# xdg-utils expect it; bug #355517.
+	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
+	# keep the old symlink around for consistency
+	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
+
+	dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
+
+	# Allow users to override command-line options, bug #357629.
+	insinto /etc/chromium
+	newins "${FILESDIR}/chromium.default" "default"
+
+	pushd out/Release/locales > /dev/null || die
+	chromium_remove_language_paks
+	popd
+
+	insinto "${CHROMIUM_HOME}"
+	doins out/Release/*.bin
+	doins out/Release/*.pak
+	(
+		shopt -s nullglob
+		local files=(out/Release/*.so out/Release/*.so.[0-9])
+		[[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
+	)
+
+	if ! use system-icu; then
+		doins out/Release/icudtl.dat
+	fi
+
+	doins -r out/Release/locales
+	doins -r out/Release/resources
+	doins -r out/Release/MEIPreload
+
+	# Install vk_swiftshader_icd.json; bug #827861
+	doins out/Release/vk_swiftshader_icd.json
+
+	if [[ -d out/Release/swiftshader ]]; then
+		insinto "${CHROMIUM_HOME}/swiftshader"
+		doins out/Release/swiftshader/*.so
+	fi
+
+	# Install icons
+	local branding size
+	for size in 16 24 32 48 64 128 256 ; do
+		case ${size} in
+			16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
+				*) branding="chrome/app/theme/chromium" ;;
+		esac
+		newicon -s ${size} "${branding}/product_logo_${size}.png" \
+			chromium-browser.png
+	done
+
+	# Install desktop entry
+	domenu out/Release/chromium-browser-chromium.desktop
+
+	# Install GNOME default application entry (bug #303100).
+	insinto /usr/share/gnome-control-center/default-apps
+	newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
+
+	# Install manpage; bug #684550
+	doman out/Release/chromium-browser.1
+	dosym chromium-browser.1 /usr/share/man/man1/chromium.1
+
+	readme.gentoo_create_doc
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+	readme.gentoo_print_elog
+
+	if use vaapi; then
+		elog "VA-API is disabled by default at runtime. You have to enable it"
+		elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
+		elog "in /etc/chromium/default."
+	fi
+	if use screencast; then
+		elog "Screencast is disabled by default at runtime. Either enable it"
+		elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
+		elog "inside Chromium or add --enable-webrtc-pipewire-capturer"
+		elog "to CHROMIUM_FLAGS in /etc/chromium/default."
+	fi
+}

diff --git a/www-client/chromium/files/chromium-93-InkDropHost-crash.patch b/www-client/chromium/files/chromium-93-InkDropHost-crash.patch
new file mode 100644
index 0000000..54d16db
--- /dev/null
+++ b/www-client/chromium/files/chromium-93-InkDropHost-crash.patch
@@ -0,0 +1,25 @@
+diff --git a/ui/views/animation/ink_drop_host_view.h b/ui/views/animation/ink_drop_host_view.h
+index bd0975b..e5df288 100644
+--- a/ui/views/animation/ink_drop_host_view.h
++++ b/ui/views/animation/ink_drop_host_view.h
+@@ -238,6 +238,11 @@ class VIEWS_EXPORT InkDropHost {
+   // Used to observe View and inform the InkDrop of host-transform changes.
+   ViewLayerTransformObserver host_view_transform_observer_;
+ 
++  // Declared before |ink_drop_|, because InkDropImpl may call
++  // RemoveInkDropLayer on partly destructed InkDropHost. In
++  // that case |ink_drop_mask_| must be still valid.
++  std::unique_ptr<views::InkDropMask> ink_drop_mask_;
++
+   // Should not be accessed directly. Use GetInkDrop() instead.
+   std::unique_ptr<InkDrop> ink_drop_;
+ 
+@@ -261,8 +266,6 @@ class VIEWS_EXPORT InkDropHost {
+   int ink_drop_small_corner_radius_ = 2;
+   int ink_drop_large_corner_radius_ = 4;
+ 
+-  std::unique_ptr<views::InkDropMask> ink_drop_mask_;
+-
+   base::RepeatingCallback<std::unique_ptr<InkDrop>()> create_ink_drop_callback_;
+   base::RepeatingCallback<std::unique_ptr<InkDropRipple>()>
+       create_ink_drop_ripple_callback_;

diff --git a/www-client/chromium/files/chromium-96-EnumTable-crash.patch b/www-client/chromium/files/chromium-96-EnumTable-crash.patch
new file mode 100644
index 0000000..9736739
--- /dev/null
+++ b/www-client/chromium/files/chromium-96-EnumTable-crash.patch
@@ -0,0 +1,76 @@
+diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h
+index aad9e08..2f3fcad 100644
+--- a/components/cast_channel/enum_table.h
++++ b/components/cast_channel/enum_table.h
+@@ -8,6 +8,7 @@
+ #include <cstdint>
+ #include <cstring>
+ #include <ostream>
++#include <vector>
+ 
+ #include "base/check_op.h"
+ #include "base/macros.h"
+@@ -188,7 +189,6 @@ class
+   inline constexpr GenericEnumTableEntry(int32_t value);
+   inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
+ 
+-  GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
+   GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
+ 
+  private:
+@@ -254,7 +254,6 @@ class EnumTable {
+     constexpr Entry(E value, base::StringPiece str)
+         : GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
+ 
+-    Entry(const Entry&) = delete;
+     Entry& operator=(const Entry&) = delete;
+   };
+ 
+@@ -313,15 +312,14 @@ class EnumTable {
+     if (is_sorted_) {
+       const std::size_t index = static_cast<std::size_t>(value);
+       if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
+-        const auto& entry = data_.begin()[index];
++        const auto& entry = data_[index];
+         if (ANALYZER_ASSUME_TRUE(entry.has_str()))
+           return entry.str();
+       }
+       return absl::nullopt;
+     }
+     return GenericEnumTableEntry::FindByValue(
+-        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
+-        data_.size(), static_cast<int32_t>(value));
++        &data_[0], data_.size(), static_cast<int32_t>(value));
+   }
+ 
+   // This overload of GetString is designed for cases where the argument is a
+@@ -349,8 +347,7 @@ class EnumTable {
+   // enum value directly.
+   absl::optional<E> GetEnum(base::StringPiece str) const {
+     auto* entry = GenericEnumTableEntry::FindByString(
+-        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
+-        data_.size(), str);
++        &data_[0], data_.size(), str);
+     return entry ? static_cast<E>(entry->value) : absl::optional<E>();
+   }
+ 
+@@ -365,7 +362,7 @@ class EnumTable {
+   // Align the data on a cache line boundary.
+   alignas(64)
+ #endif
+-      std::initializer_list<Entry> data_;
++      const std::vector<Entry> data_;
+   bool is_sorted_;
+ 
+   constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
+@@ -377,8 +374,8 @@ class EnumTable {
+ 
+     for (std::size_t i = 0; i < data.size(); i++) {
+       for (std::size_t j = i + 1; j < data.size(); j++) {
+-        const Entry& ei = data.begin()[i];
+-        const Entry& ej = data.begin()[j];
++        const Entry& ei = data[i];
++        const Entry& ej = data[j];
+         DCHECK(ei.value != ej.value)
+             << "Found duplicate enum values at indices " << i << " and " << j;
+         DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

diff --git a/www-client/chromium/files/chromium-96-freetype-unbundle.patch b/www-client/chromium/files/chromium-96-freetype-unbundle.patch
new file mode 100644
index 0000000..6ef5ff6
--- /dev/null
+++ b/www-client/chromium/files/chromium-96-freetype-unbundle.patch
@@ -0,0 +1,10 @@
+--- a/build/linux/BUILD.gn
++++ b/build/linux/BUILD.gn
+@@ -23,6 +23,7 @@
+   # the system, use with caution,for details see build/config/freetype/BUILD.gn.
+   pkg_config("freetype_from_pkgconfig") {
+     visibility = [
++      "//build/config/freetype:freetype",
+       "//third_party:freetype_harfbuzz",
+       "//third_party/harfbuzz-ng:harfbuzz_source",
+     ]

diff --git a/www-client/chromium/files/chromium-98-EnumTable-crash.patch b/www-client/chromium/files/chromium-98-EnumTable-crash.patch
new file mode 100644
index 0000000..f058ec1
--- /dev/null
+++ b/www-client/chromium/files/chromium-98-EnumTable-crash.patch
@@ -0,0 +1,76 @@
+diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h
+index 842553a..89de703 100644
+--- a/components/cast_channel/enum_table.h
++++ b/components/cast_channel/enum_table.h
+@@ -8,6 +8,7 @@
+ #include <cstdint>
+ #include <cstring>
+ #include <ostream>
++#include <vector>
+ 
+ #include "base/check_op.h"
+ #include "base/notreached.h"
+@@ -187,7 +188,6 @@ class
+   inline constexpr GenericEnumTableEntry(int32_t value);
+   inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
+ 
+-  GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
+   GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
+ 
+  private:
+@@ -253,7 +253,6 @@ class EnumTable {
+     constexpr Entry(E value, base::StringPiece str)
+         : GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
+ 
+-    Entry(const Entry&) = delete;
+     Entry& operator=(const Entry&) = delete;
+   };
+ 
+@@ -312,15 +311,14 @@ class EnumTable {
+     if (is_sorted_) {
+       const std::size_t index = static_cast<std::size_t>(value);
+       if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
+-        const auto& entry = data_.begin()[index];
++        const auto& entry = data_[index];
+         if (ANALYZER_ASSUME_TRUE(entry.has_str()))
+           return entry.str();
+       }
+       return absl::nullopt;
+     }
+     return GenericEnumTableEntry::FindByValue(
+-        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
+-        data_.size(), static_cast<int32_t>(value));
++        &data_[0], data_.size(), static_cast<int32_t>(value));
+   }
+ 
+   // This overload of GetString is designed for cases where the argument is a
+@@ -348,8 +346,7 @@ class EnumTable {
+   // enum value directly.
+   absl::optional<E> GetEnum(base::StringPiece str) const {
+     auto* entry = GenericEnumTableEntry::FindByString(
+-        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
+-        data_.size(), str);
++        &data_[0], data_.size(), str);
+     return entry ? static_cast<E>(entry->value) : absl::optional<E>();
+   }
+ 
+@@ -364,7 +361,7 @@ class EnumTable {
+   // Align the data on a cache line boundary.
+   alignas(64)
+ #endif
+-      std::initializer_list<Entry> data_;
++      const std::vector<Entry> data_;
+   bool is_sorted_;
+ 
+   constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
+@@ -376,8 +373,8 @@ class EnumTable {
+ 
+     for (std::size_t i = 0; i < data.size(); i++) {
+       for (std::size_t j = i + 1; j < data.size(); j++) {
+-        const Entry& ei = data.begin()[i];
+-        const Entry& ej = data.begin()[j];
++        const Entry& ei = data[i];
++        const Entry& ej = data[j];
+         DCHECK(ei.value != ej.value)
+             << "Found duplicate enum values at indices " << i << " and " << j;
+         DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

diff --git a/www-client/chromium/files/chromium-98-system-libdrm.patch b/www-client/chromium/files/chromium-98-system-libdrm.patch
new file mode 100644
index 0000000..f2f18be
--- /dev/null
+++ b/www-client/chromium/files/chromium-98-system-libdrm.patch
@@ -0,0 +1,34 @@
+diff --git a/media/gpu/chromeos/BUILD.gn b/media/gpu/chromeos/BUILD.gn
+index a5c8945..d742d80 100644
+--- a/media/gpu/chromeos/BUILD.gn
++++ b/media/gpu/chromeos/BUILD.gn
+@@ -32,6 +32,7 @@ source_set("chromeos") {
+ 
+   if (use_vaapi) {
+     deps += [
++      "//build/config/linux/libdrm",
+       "//media/gpu/vaapi",
+       "//media/gpu/vaapi:common",
+     ]
+diff --git a/media/gpu/chromeos/video_decoder_pipeline.cc b/media/gpu/chromeos/video_decoder_pipeline.cc
+index 2d77cd9..1883fd4 100644
+--- a/media/gpu/chromeos/video_decoder_pipeline.cc
++++ b/media/gpu/chromeos/video_decoder_pipeline.cc
+@@ -4,6 +4,9 @@
+ 
+ #include "media/gpu/chromeos/video_decoder_pipeline.h"
+ 
++#if BUILDFLAG(USE_VAAPI)
++#include <drm_fourcc.h>
++#endif
+ #include <memory>
+ 
+ #include "base/bind.h"
+@@ -28,7 +31,6 @@
+ 
+ #if BUILDFLAG(USE_VAAPI)
+ #include "media/gpu/vaapi/vaapi_video_decoder.h"
+-#include "third_party/libdrm/src/include/drm/drm_fourcc.h"
+ #elif BUILDFLAG(USE_V4L2_CODEC)
+ #include "media/gpu/v4l2/v4l2_video_decoder.h"
+ #else

diff --git a/www-client/chromium/files/chromium-browser.xml b/www-client/chromium/files/chromium-browser.xml
new file mode 100644
index 0000000..2c95a55
--- /dev/null
+++ b/www-client/chromium/files/chromium-browser.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
+<default-apps>
+  <web-browsers>
+    <web-browser>
+      <name>Chromium</name>
+      <executable>chromium-browser</executable>
+      <command>chromium-browser %s</command>
+      <icon-name>chromium-browser</icon-name>
+      <run-in-terminal>false</run-in-terminal>
+    </web-browser>
+  </web-browsers>
+</default-apps>

diff --git a/www-client/chromium/files/chromium-glibc-2.34.patch b/www-client/chromium/files/chromium-glibc-2.34.patch
new file mode 100644
index 0000000..64c03a6
--- /dev/null
+++ b/www-client/chromium/files/chromium-glibc-2.34.patch
@@ -0,0 +1,50 @@
+From 600d63c2c59a9892dbc5423d7d8bb1565a9f91e7 Mon Sep 17 00:00:00 2001
+From: Michel Salim <michel@fb.com>
+Date: Thu, 04 Nov 2021 14:22:40 -0700
+Subject: [PATCH] Handle long SIGSTKSZ in glibc > 2.33
+
+`SIGSTKSZ` is no longer constant in glibc > 2.33 but a function
+returning a long. Cast before taking `max`.
+
+See https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=85e84fe53699fe9e392edffa993612ce08b2954a;hb=HEAD
+
+Signed-off-by: Michel Salim <michel@fb.com>
+Change-Id: I197f8ff3053eede80d6aed096be4f0113dd43241
+(relocated to chromium repo, removed static)
+---
+
+diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+index ca353c4..5cdabcf 100644
+--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
++++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@
+   // SIGSTKSZ may be too small to prevent the signal handlers from overrunning
+   // the alternative stack. Ensure that the size of the alternative stack is
+   // large enough.
+-  static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
++  const unsigned kSigStackSize = std::max(16384U, (unsigned)SIGSTKSZ);
+ 
+   // Only set an alternative stack if there isn't already one, or if the current
+   // one is too small.
+diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
+index ca6b595..1c1ee42 100644
+--- a/sandbox/linux/services/credentials.cc
++++ b/sandbox/linux/services/credentials.cc
+@@ -11,6 +11,7 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <sys/syscall.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+@@ -100,7 +101,8 @@ bool ChrootToSafeEmptyDir() {
+   // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
+   clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
+ 
+-  char tls_buf[PTHREAD_STACK_MIN] = {0};
++  char tls_buf[PTHREAD_STACK_MIN];
++  memset(tls_buf, 0, PTHREAD_STACK_MIN);
+   tls = tls_buf;
+ #endif
+ 

diff --git a/www-client/chromium/files/chromium-launcher-r7.sh b/www-client/chromium/files/chromium-launcher-r7.sh
new file mode 100644
index 0000000..1163ff3
--- /dev/null
+++ b/www-client/chromium/files/chromium-launcher-r7.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+# Allow the user to override command-line flags, bug #357629.
+# This is based on Debian's chromium-browser package, and is intended
+# to be consistent with Debian.
+for f in /etc/chromium/*; do
+    [[ -f ${f} ]] && source "${f}"
+done
+
+# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
+# default CHROMIUM_FLAGS (from /etc/chromium/default).
+CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"}
+
+# Let the wrapped binary know that it has been run through the wrapper
+export CHROME_WRAPPER=$(readlink -f "$0")
+
+PROGDIR=${CHROME_WRAPPER%/*}
+
+case ":$PATH:" in
+  *:$PROGDIR:*)
+    # $PATH already contains $PROGDIR
+    ;;
+  *)
+    # Append $PROGDIR to $PATH
+    export PATH="$PATH:$PROGDIR"
+    ;;
+esac
+
+if [[ ${EUID} == 0 && -O ${XDG_CONFIG_HOME:-${HOME}} ]]; then
+	# Running as root with HOME owned by root.
+	# Pass --user-data-dir to work around upstream failsafe.
+	CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-${HOME}/.config}/chromium
+		${CHROMIUM_FLAGS}"
+fi
+
+# Select session type and platform
+if @@OZONE_AUTO_SESSION@@; then
+	platform=
+	if [[ ${XDG_SESSION_TYPE} == x11 ]]; then
+		platform=x11
+	elif [[ ${XDG_SESSION_TYPE} == wayland ]]; then
+		platform=wayland
+	else
+		if [[ -n ${WAYLAND_DISPLAY} ]]; then
+			platform=wayland
+		else
+			platform=x11
+		fi
+	fi
+	if ${DISABLE_OZONE_PLATFORM:-false}; then
+		platform=x11
+	fi
+	CHROMIUM_FLAGS="--ozone-platform=${platform} ${CHROMIUM_FLAGS}"
+fi
+
+# Set the .desktop file name
+export CHROME_DESKTOP="chromium-browser-chromium.desktop"
+
+exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins ${CHROMIUM_FLAGS} "$@"

diff --git a/www-client/chromium/files/chromium-shim_headers.patch b/www-client/chromium/files/chromium-shim_headers.patch
new file mode 100644
index 0000000..9372632
--- /dev/null
+++ b/www-client/chromium/files/chromium-shim_headers.patch
@@ -0,0 +1,48 @@
+From e273172bbafedca36984fc40f4aa6c44b79ac2ef Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Fri, 25 Dec 2020 09:10:32 +0000
+Subject: [PATCH] shim_headers: fix outputs generation
+
+---
+ build/shim_headers.gni | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/build/shim_headers.gni b/build/shim_headers.gni
+index 0900cba..5138647 100644
+--- a/build/shim_headers.gni
++++ b/build/shim_headers.gni
+@@ -6,6 +6,8 @@ template("shim_headers") {
+   action_name = "gen_${target_name}"
+   config_name = "${target_name}_config"
+   shim_headers_path = "${root_gen_dir}/shim_headers/${target_name}"
++  shim_root_path    = rebase_path(invoker.root_path)
++  shim_rel_path     = rebase_path("${shim_root_path}", rebase_path("//"))
+ 
+   config(config_name) {
+     include_dirs = [ shim_headers_path ]
+@@ -16,7 +18,7 @@ template("shim_headers") {
+     args = [
+       "--generate",
+       "--headers-root",
+-      rebase_path(invoker.root_path),
++      "${shim_root_path}",
+       "--output-directory",
+       rebase_path(shim_headers_path),
+     ]
+@@ -27,9 +29,10 @@ template("shim_headers") {
+       ]
+     }
+     args += invoker.headers
+-
+-    outputs = process_file_template(invoker.headers,
+-                                    "${shim_headers_path}/{{source_file_part}}")
++    outputs = []
++    foreach(shim_header, invoker.headers) {
++      outputs += [ "${shim_headers_path}/${shim_rel_path}/" + shim_header ]
++    }
+   }
+ 
+   group(target_name) {
+-- 
+2.26.2
+

diff --git a/www-client/chromium/files/chromium-use-oauth2-client-switches-as-default.patch b/www-client/chromium/files/chromium-use-oauth2-client-switches-as-default.patch
new file mode 100644
index 0000000..9d9c57b
--- /dev/null
+++ b/www-client/chromium/files/chromium-use-oauth2-client-switches-as-default.patch
@@ -0,0 +1,17 @@
+diff -upr chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc chromium-89.0.4389.58/google_apis/google_api_keys.cc
+--- chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc	2021-02-24 22:37:18.494007649 +0000
++++ chromium-89.0.4389.58/google_apis/google_api_keys.cc	2021-02-24 22:35:00.865777600 +0000
+@@ -154,11 +154,11 @@ class APIKeyCache {
+ 
+     std::string default_client_id = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_ID,
+-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
++        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
+         std::string(), environment.get(), command_line, gaia_config);
+     std::string default_client_secret = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_SECRET,
+-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
++        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
+         std::string(), environment.get(), command_line, gaia_config);
+ 
+     // We currently only allow overriding the baked-in values for the

diff --git a/www-client/chromium/files/chromium.default b/www-client/chromium/files/chromium.default
new file mode 100644
index 0000000..c140cde
--- /dev/null
+++ b/www-client/chromium/files/chromium.default
@@ -0,0 +1,5 @@
+# Default settings for chromium. This file is sourced by /bin/bash from
+# the chromium launcher.
+
+# Options to pass to chromium.
+#CHROMIUM_FLAGS=""

diff --git a/www-client/chromium/metadata.xml b/www-client/chromium/metadata.xml
new file mode 100644
index 0000000..dcdaa4c
--- /dev/null
+++ b/www-client/chromium/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>chromium@gentoo.org</email>
+		<name>Chromium in Gentoo Project</name>
+	</maintainer>
+	<use>
+		<flag name="js-type-check">Enable JavaScript type-checking for Chrome's web technology-based UI. Requires Java.</flag>
+		<flag name="component-build">Split build into more shared libraries to speed up linking. Mostly intended for debugging and development, NOT RECOMMENDED for general use.</flag>
+		<flag name="debug">Enable DCHECK feature with severity configurable at runtime. Mostly intended for debugging and development, NOT RECOMMENDED for general use.</flag>
+		<flag name="headless">Build Ozone only with headless backend, NOT RECOMMENDED for general use.</flag>
+		<flag name="hangouts">Enable support for Google Hangouts features such as screen sharing</flag>
+		<flag name="official">Enable Official build instead of Developer build.</flag>
+		<flag name="pic">Disable optimized assembly code that is not PIC friendly</flag>
+		<flag name="proprietary-codecs">Enable codecs for patent-encumbered audio and video formats.</flag>
+		<flag name="screencast">Enable support for remote desktop and screen cast using <pkg>media-video/pipewire</pkg></flag>
+		<flag name="suid">Build the SUID sandbox, which is only needed on CONFIG_USER_NS=n kernels</flag>
+		<flag name="system-ffmpeg">Use system ffmpeg instead of the bundled one</flag>
+		<flag name="system-harfbuzz">Use system harfbuzz instead of the bundled one.</flag>
+		<flag name="system-icu">Use system icu instead of the bundled one</flag>
+		<flag name="system-png">Use system libpng instead of the bundled one.</flag>
+		<flag name="widevine">Unsupported closed-source DRM capability (required by Netflix VOD)</flag>
+	</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/riscv:master commit in: www-client/chromium/files/, www-client/chromium/
@ 2024-04-12  4:09 Yixun Lan
  0 siblings, 0 replies; 4+ messages in thread
From: Yixun Lan @ 2024-04-12  4:09 UTC (permalink / raw
  To: gentoo-commits

commit:     755ae4bd759dfafd7fe64890f3294f2a64a94485
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 11 04:17:27 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Apr 11 04:17:46 2024 +0000
URL:        https://gitweb.gentoo.org/proj/riscv.git/commit/?id=755ae4bd

www-client/chromium: drop 98.0.4750.0

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 www-client/chromium/Manifest                       |   3 -
 www-client/chromium/chromium-98.0.4750.0.ebuild    | 968 ---------------------
 www-client/chromium/files/11cpuinfo.patch          |  11 -
 .../files/chromium-108-EnumTable-crash.patch       |  76 --
 .../chromium/files/chromium-119-minizip-cast.patch |  23 -
 .../files/chromium-119.0.6045.159-icu-74.patch     |  21 -
 .../files/chromium-93-InkDropHost-crash.patch      |  25 -
 .../files/chromium-96-EnumTable-crash.patch        |  76 --
 .../files/chromium-96-freetype-unbundle.patch      |  10 -
 .../files/chromium-98-EnumTable-crash.patch        |  76 --
 .../chromium/files/chromium-98-system-libdrm.patch |  34 -
 .../chromium/files/chromium-glibc-2.34.patch       |  50 --
 .../chromium/files/chromium-shim_headers.patch     |  48 -
 13 files changed, 1421 deletions(-)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index 7b7e129..3e9db3c 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -1,9 +1,6 @@
 DIST chromium-123-clang.tar.xz 50178332 BLAKE2B 4b5c4f81a83c7b0c809c93a713e869fde6fe559477665cb3b2f03c62d2175f821b81fb03b0ddd127c6eaf77c41011b4de06561f09a58384153d80fe2b3aa7427 SHA512 17108b9579f16d0da383bd5e41d012f94bcb8445a517ff823aa49b66d3861b0a124b6cce6183fbc64e8050f1ebcd65a9daa2acbda5fdaa42390bfbf4ecb16bd3
 DIST chromium-123-rust.tar.xz 145295100 BLAKE2B ae6603a0e0218e4e39d3e8b7aa48a2cd946c90779dac48be26582926963c8a10a48e3e58fd00a23cb8cd9a3584d9d4a142e843f93c761e862253817635f18c2c SHA512 b4f8dce6d74be4be495d9948d7593ec9664c0b93e87456fab33d3ae5ac0e486a4e8576b26a9ab9890285a7c0d566afb803b98225c0692b6cac9f623a10b954a2
 DIST chromium-123.0.6312.58.tar.xz 3465099244 BLAKE2B d0b85e740924a33350c5b6d3a6d1e94c8b946c52ac760237b2391127c99326c64b50de29751850dc368331b66402ab0c4fc65b9aeef09302857a1f5300a0d17b SHA512 4cb08767b8a6fe268c44bd7b621632c71f7d2f3f6c1b7bae9e0373dfc2eada397ab511a068582c2d17bbf3ee9ff16f05fccd454d610d63dd2fd14d6ca355a0c0
-DIST chromium-98-extra-patchset-0.tar.xz 187228 BLAKE2B 094c716b274de559f848ed7f55cd2584892b6d43ba0e79bc3b458bb56320a0de7bd06bed475404004b83e464dc5554987318783eb7bd4838a84e69788e30c567 SHA512 565a69262e353b2eda8bc7c97c88e78972e047146b810f3d9f09bb19aa963a0600a104cfdacafd8794e2b393cb31381b8e73086c246b6b1267defd065367fced
-DIST chromium-98-patchset-3.tar.xz 6164 BLAKE2B be4fa2997e13e89a0c8db1e99fa80adb937c0c02f1e18bd0ec93bdbdd484da4a8507baf13c5e6e602d5f5ecb2921f33bc3afdc3c3103b1b5314b62f59c1a71ad SHA512 47026635ca5c2e1d3965c82a449077380e6518b33e16b83bd105085cca50f512d08027eebd34d7ce5ce39d988f0120deccfb72697abac0d41e4502b6ad8abdf3
-DIST chromium-98.0.4750.0.tar.xz 1230864580 BLAKE2B b8b5d05bf15a9429f3f5fa851415d21f6e757a99fce9ac47bdeb7f534f9eefc77d13c5f8ba93bfa140bdb536c13e1b6141ac4d7e0f17b742039c403044789c56 SHA512 7f8cc349aa50af0d149ba08e5ed60171e94943bbd52cb0f820f3c7d56749d9e2fd6d71761262ac012cfcad1f7e4f63c0404f39f044df531e776ae6fce951544f
 DIST chromium-patches-123.tar.bz2 4697 BLAKE2B 8a7dd76edb23afb7b2f65084696bce5d6e54d63ca34c4590052db1086ed0a422b1efde863c4daad4e2526f329eb65276b9ad5406017cd97fb75b1a9556c1f933 SHA512 ea47255deac1893896f64496629d34c7092f266a175b8400fcf4f01b9d038ae240e911bff488558bb28e6f5795bbcf276adf20ed1e0ccb8ac99f9ddd260742f9
 DIST chromium-ppc64le-gentoo-patches-1.tar.xz 5636 BLAKE2B 1d898939df023c59285b27bee552470483ea06375d1ee8d6947b89c5927c23cc7bfec6b49f3b376ece931d11a56f8e2a45791e0f92ad61974fc8c34c1082d89c SHA512 8a71cb007e47cda8e5fe5d185729389e65c48bd322c8ee8b3986bee8571427b959628f2666bda646a3f89ae64197c0957d3626845ff03461dbd5dee4c964d07c
 DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c

diff --git a/www-client/chromium/chromium-98.0.4750.0.ebuild b/www-client/chromium/chromium-98.0.4750.0.ebuild
deleted file mode 100644
index e12c50a..0000000
--- a/www-client/chromium/chromium-98.0.4750.0.ebuild
+++ /dev/null
@@ -1,968 +0,0 @@
-# Copyright 2009-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE="xml"
-
-CHROMIUM_LANGS="am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
-	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
-	sv sw ta te th tr uk vi zh-CN zh-TW"
-
-inherit check-reqs chromium-2 desktop flag-o-matic ninja-utils pax-utils python-any-r1 readme.gentoo-r1 toolchain-funcs xdg-utils
-
-DESCRIPTION="Open-source version of Google Chrome web browser"
-HOMEPAGE="https://chromium.org/"
-PATCHSET="3"
-PATCHSET_NAME="chromium-$(ver_cut 1)-patchset-${PATCHSET}"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
-	https://github.com/stha09/chromium-patches/releases/download/${PATCHSET_NAME}/${PATCHSET_NAME}.tar.xz"
-SRC_URI+=" https://dev.gentoo.org/~dlan/distfiles/${CATEGORY}/${PN}/chromium-$(ver_cut 1)-extra-patchset-0.tar.xz"
-
-LICENSE="BSD"
-SLOT="0/dev"
-KEYWORDS="~amd64 ~arm64 ~x86"
-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"
-REQUIRED_USE="
-	component-build? ( !suid )
-	screencast? ( wayland )
-"
-
-COMMON_X_DEPEND="
-	media-libs/mesa:=[gbm(+)]
-	x11-libs/libX11:=
-	x11-libs/libXcomposite:=
-	x11-libs/libXcursor:=
-	x11-libs/libXdamage:=
-	x11-libs/libXext:=
-	x11-libs/libXfixes:=
-	>=x11-libs/libXi-1.6.0:=
-	x11-libs/libXrandr:=
-	x11-libs/libXrender:=
-	x11-libs/libXtst:=
-	x11-libs/libxcb:=
-	x11-libs/libxshmfence:=
-	vaapi? ( >=x11-libs/libva-2.7:=[X,drm] )
-"
-
-COMMON_DEPEND="
-	app-arch/bzip2:=
-	cups? ( >=net-print/cups-1.3.11:= )
-	dev-libs/expat:=
-	dev-libs/glib:2
-	>=dev-libs/libxml2-2.9.4-r3:=[icu]
-	dev-libs/nspr:=
-	>=dev-libs/nss-3.26:=
-	>=media-libs/alsa-lib-1.0.19:=
-	media-libs/fontconfig:=
-	>=media-libs/freetype-2.11.0-r1:=
-	system-harfbuzz? ( >=media-libs/harfbuzz-2.9.0:0=[icu(-)] )
-	media-libs/libjpeg-turbo:=
-	system-png? ( media-libs/libpng:=[-apng] )
-	pulseaudio? ( media-sound/pulseaudio:= )
-	system-ffmpeg? (
-		>=media-video/ffmpeg-4.3:=
-		|| (
-			media-video/ffmpeg[-samba]
-			>=net-fs/samba-4.5.10-r1[-debug(-)]
-		)
-		>=media-libs/opus-1.3.1:=
-	)
-	net-misc/curl[ssl]
-	sys-apps/dbus:=
-	sys-apps/pciutils:=
-	virtual/udev
-	x11-libs/cairo:=
-	x11-libs/gdk-pixbuf:2
-	x11-libs/libxkbcommon:=
-	x11-libs/pango:=
-	media-libs/flac:=
-	>=media-libs/libwebp-0.4.0:=
-	sys-libs/zlib:=[minizip]
-	kerberos? ( virtual/krb5 )
-	!headless? (
-		${COMMON_X_DEPEND}
-		>=app-accessibility/at-spi2-atk-2.26:2
-		>=app-accessibility/at-spi2-core-2.26:2
-		>=dev-libs/atk-2.26
-		x11-libs/gtk+:3[X]
-		wayland? (
-			dev-libs/wayland:=
-			screencast? ( media-video/pipewire:0/0.3 )
-			x11-libs/gtk+:3[wayland,X]
-			x11-libs/libdrm:=
-		)
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	x11-misc/xdg-utils
-	virtual/opengl
-	virtual/ttf-fonts
-	selinux? ( sec-policy/selinux-chromium )
-"
-DEPEND="${COMMON_DEPEND}
-"
-# dev-vcs/git - https://bugs.gentoo.org/593476
-BDEPEND="
-	${PYTHON_DEPS}
-	$(python_gen_any_dep '
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	')
-	>=app-arch/gzip-1.7
-	dev-lang/perl
-	>=dev-util/gn-0.1807
-	dev-vcs/git
-	>=dev-util/gperf-3.0.3
-	>=dev-util/ninja-1.7.2
-	>=net-libs/nodejs-7.6.0[inspector]
-	>=sys-devel/bison-2.4.3
-	sys-devel/flex
-	virtual/pkgconfig
-	js-type-check? ( virtual/jre )
-"
-
-# These are intended for ebuild maintainer use to force clang if GCC is broken.
-: ${CHROMIUM_FORCE_CLANG=no}
-: ${CHROMIUM_FORCE_LIBCXX=no}
-
-if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
-	BDEPEND+=" >=sys-devel/clang-12"
-fi
-
-if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
-	RDEPEND+=" >=sys-libs/libcxx-12"
-	DEPEND+=" >=sys-libs/libcxx-12"
-else
-	COMMON_DEPEND="
-		dev-libs/libxslt:=
-		>=dev-libs/re2-0.2019.08.01:=
-		>=media-libs/openh264-1.6.0:=
-		system-icu? ( >=dev-libs/icu-69.1:= )
-	"
-	RDEPEND+="${COMMON_DEPEND}"
-	DEPEND+="${COMMON_DEPEND}"
-fi
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
-	EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-python_check_deps() {
-	has_version -b "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-pre_build_checks() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		local -x CPP="$(tc-getCXX) -E"
-		if tc-is-gcc && ! ver_test "$(gcc-version)" -ge 9.2; then
-			die "At least gcc 9.2 is required"
-		fi
-		if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || tc-is-clang; then
-			CPP="${CHOST}-clang++ -E"
-			if ! ver_test "$(clang-major-version)" -ge 12; then
-				die "At least clang 12 is required"
-			fi
-		fi
-	fi
-
-	# Check build requirements, bug #541816 and bug #471810 .
-	CHECKREQS_MEMORY="4G"
-	CHECKREQS_DISK_BUILD="9G"
-	if ( shopt -s extglob; is-flagq '-g?(gdb)?([1-9])' ); then
-		if use custom-cflags || use component-build; then
-			CHECKREQS_DISK_BUILD="25G"
-		fi
-		if ! use component-build; then
-			CHECKREQS_MEMORY="16G"
-		fi
-	fi
-	check-reqs_pkg_setup
-}
-
-pkg_pretend() {
-	pre_build_checks
-}
-
-pkg_setup() {
-	pre_build_checks
-
-	chromium_suid_sandbox_check_kernel_config
-
-	# nvidia-drivers does not work correctly with Wayland due to unsupported EGLStreams
-	if use wayland && ! use headless && has_version "x11-drivers/nvidia-drivers"; then
-		ewarn "Proprietary nVidia driver does not work with Wayland. You can disable"
-		ewarn "Wayland by setting DISABLE_OZONE_PLATFORM=true in /etc/chromium/default."
-	fi
-}
-
-src_prepare() {
-	# Calling this here supports resumption via FEATURES=keepwork
-	python_setup
-
-	local PATCHES=(
-		"${WORKDIR}/patches"
-		"${FILESDIR}/chromium-93-InkDropHost-crash.patch"
-		"${FILESDIR}/chromium-98-EnumTable-crash.patch"
-		"${FILESDIR}/chromium-98-system-libdrm.patch"
-		"${FILESDIR}/chromium-glibc-2.34.patch"
-		"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
-		"${FILESDIR}/chromium-shim_headers.patch"
-		"${WORKDIR}/extra-patches"
-	)
-
-	default
-
-	mkdir -p third_party/node/linux/node-linux-x64/bin || die
-	ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
-	# adjust python interpreter version
-	sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
-	local keeplibs=(
-		base/third_party/cityhash
-		base/third_party/double_conversion
-		base/third_party/dynamic_annotations
-		base/third_party/icu
-		base/third_party/nspr
-		base/third_party/superfasthash
-		base/third_party/symbolize
-		base/third_party/valgrind
-		base/third_party/xdg_mime
-		base/third_party/xdg_user_dirs
-		buildtools/third_party/libc++
-		buildtools/third_party/libc++abi
-		chrome/third_party/mozilla_security_manager
-		courgette/third_party
-		net/third_party/mozilla_security_manager
-		net/third_party/nss
-		net/third_party/quic
-		net/third_party/uri_template
-		third_party/abseil-cpp
-		third_party/angle
-		third_party/angle/src/common/third_party/base
-		third_party/angle/src/common/third_party/smhasher
-		third_party/angle/src/common/third_party/xxhash
-		third_party/angle/src/third_party/libXNVCtrl
-		third_party/angle/src/third_party/trace_event
-		third_party/angle/src/third_party/volk
-		third_party/apple_apsl
-		third_party/axe-core
-		third_party/blink
-		third_party/boringssl
-		third_party/boringssl/src/third_party/fiat
-		third_party/breakpad
-		third_party/breakpad/breakpad/src/third_party/curl
-		third_party/brotli
-		third_party/catapult
-		third_party/catapult/common/py_vulcanize/third_party/rcssmin
-		third_party/catapult/common/py_vulcanize/third_party/rjsmin
-		third_party/catapult/third_party/beautifulsoup4-4.9.3
-		third_party/catapult/third_party/html5lib-1.1
-		third_party/catapult/third_party/polymer
-		third_party/catapult/third_party/six
-		third_party/catapult/tracing/third_party/d3
-		third_party/catapult/tracing/third_party/gl-matrix
-		third_party/catapult/tracing/third_party/jpeg-js
-		third_party/catapult/tracing/third_party/jszip
-		third_party/catapult/tracing/third_party/mannwhitneyu
-		third_party/catapult/tracing/third_party/oboe
-		third_party/catapult/tracing/third_party/pako
-		third_party/ced
-		third_party/cld_3
-		third_party/closure_compiler
-		third_party/crashpad
-		third_party/crashpad/crashpad/third_party/lss
-		third_party/crashpad/crashpad/third_party/zlib
-		third_party/crc32c
-		third_party/cros_system_api
-		third_party/dav1d
-		third_party/dawn
-		third_party/dawn/third_party/khronos
-		third_party/dawn/third_party/tint
-		third_party/depot_tools
-		third_party/devscripts
-		third_party/devtools-frontend
-		third_party/devtools-frontend/src/front_end/third_party/acorn
-		third_party/devtools-frontend/src/front_end/third_party/axe-core
-		third_party/devtools-frontend/src/front_end/third_party/chromium
-		third_party/devtools-frontend/src/front_end/third_party/codemirror
-		third_party/devtools-frontend/src/front_end/third_party/diff
-		third_party/devtools-frontend/src/front_end/third_party/i18n
-		third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
-		third_party/devtools-frontend/src/front_end/third_party/lighthouse
-		third_party/devtools-frontend/src/front_end/third_party/lit-html
-		third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
-		third_party/devtools-frontend/src/front_end/third_party/marked
-		third_party/devtools-frontend/src/front_end/third_party/puppeteer
-		third_party/devtools-frontend/src/front_end/third_party/wasmparser
-		third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
-		third_party/devtools-frontend/src/third_party
-		third_party/distributed_point_functions
-		third_party/dom_distiller_js
-		third_party/eigen3
-		third_party/emoji-segmenter
-		third_party/farmhash
-		third_party/fdlibm
-		third_party/fft2d
-		third_party/flatbuffers
-		third_party/freetype
-		third_party/fusejs
-		third_party/highway
-		third_party/libgifcodec
-		third_party/liburlpattern
-		third_party/libzip
-		third_party/gemmlowp
-		third_party/google_input_tools
-		third_party/google_input_tools/third_party/closure_library
-		third_party/google_input_tools/third_party/closure_library/third_party/closure
-		third_party/googletest
-		third_party/hunspell
-		third_party/iccjpeg
-		third_party/inspector_protocol
-		third_party/jinja2
-		third_party/jsoncpp
-		third_party/jstemplate
-		third_party/khronos
-		third_party/leveldatabase
-		third_party/libXNVCtrl
-		third_party/libaddressinput
-		third_party/libaom
-		third_party/libaom/source/libaom/third_party/fastfeat
-		third_party/libaom/source/libaom/third_party/vector
-		third_party/libaom/source/libaom/third_party/x86inc
-		third_party/libavif
-		third_party/libgav1
-		third_party/libjingle
-		third_party/libjxl
-		third_party/libphonenumber
-		third_party/libsecret
-		third_party/libsrtp
-		third_party/libsync
-		third_party/libudev
-		third_party/libva_protected_content
-		third_party/libvpx
-		third_party/libvpx/source/libvpx/third_party/x86inc
-		third_party/libwebm
-		third_party/libx11
-		third_party/libxcb-keysyms
-		third_party/libxml/chromium
-		third_party/libyuv
-		third_party/llvm
-		third_party/lottie
-		third_party/lss
-		third_party/lzma_sdk
-		third_party/mako
-		third_party/maldoca
-		third_party/maldoca/src/third_party/tensorflow_protos
-		third_party/maldoca/src/third_party/zlibwrapper
-		third_party/markupsafe
-		third_party/mesa
-		third_party/metrics_proto
-		third_party/minigbm
-		third_party/modp_b64
-		third_party/nasm
-		third_party/nearby
-		third_party/neon_2_sse
-		third_party/node
-		third_party/node/node_modules/polymer-bundler/lib/third_party/UglifyJS2
-		third_party/one_euro_filter
-		third_party/opencv
-		third_party/openscreen
-		third_party/openscreen/src/third_party/mozilla
-		third_party/openscreen/src/third_party/tinycbor/src/src
-		third_party/ots
-		third_party/pdfium
-		third_party/pdfium/third_party/agg23
-		third_party/pdfium/third_party/base
-		third_party/pdfium/third_party/bigint
-		third_party/pdfium/third_party/freetype
-		third_party/pdfium/third_party/lcms
-		third_party/pdfium/third_party/libopenjpeg20
-		third_party/pdfium/third_party/libpng16
-		third_party/pdfium/third_party/libtiff
-		third_party/pdfium/third_party/skia_shared
-		third_party/perfetto
-		third_party/perfetto/protos/third_party/chromium
-		third_party/pffft
-		third_party/ply
-		third_party/polymer
-		third_party/private-join-and-compute
-		third_party/private_membership
-		third_party/protobuf
-		third_party/protobuf/third_party/six
-		third_party/pyjson5
-		third_party/qcms
-		third_party/rnnoise
-		third_party/s2cellid
-		third_party/securemessage
-		third_party/shell-encryption
-		third_party/simplejson
-		third_party/skia
-		third_party/skia/include/third_party/skcms
-		third_party/skia/include/third_party/vulkan
-		third_party/skia/third_party/skcms
-		third_party/skia/third_party/vulkan
-		third_party/smhasher
-		third_party/snappy
-		third_party/sqlite
-		third_party/swiftshader
-		third_party/swiftshader/third_party/astc-encoder
-		third_party/swiftshader/third_party/llvm-subzero
-		third_party/swiftshader/third_party/marl
-		third_party/swiftshader/third_party/subzero
-		third_party/swiftshader/third_party/SPIRV-Headers/include/spirv/unified1
-		third_party/tcmalloc
-		third_party/tensorflow-text
-		third_party/tflite
-		third_party/tflite/src/third_party/eigen3
-		third_party/tflite/src/third_party/fft2d
-		third_party/ruy
-		third_party/six
-		third_party/ukey2
-		third_party/unrar
-		third_party/usrsctp
-		third_party/utf
-		third_party/vulkan
-		third_party/web-animations-js
-		third_party/webdriver
-		third_party/webgpu-cts
-		third_party/webrtc
-		third_party/webrtc/common_audio/third_party/ooura
-		third_party/webrtc/common_audio/third_party/spl_sqrt_floor
-		third_party/webrtc/modules/third_party/fft
-		third_party/webrtc/modules/third_party/g711
-		third_party/webrtc/modules/third_party/g722
-		third_party/webrtc/rtc_base/third_party/base64
-		third_party/webrtc/rtc_base/third_party/sigslot
-		third_party/widevine
-		third_party/woff2
-		third_party/wuffs
-		third_party/x11proto
-		third_party/xcbproto
-		third_party/zxcvbn-cpp
-		third_party/zlib/google
-		url/third_party/mozilla
-		v8/src/third_party/siphash
-		v8/src/third_party/valgrind
-		v8/src/third_party/utf8-decoder
-		v8/third_party/inspector_protocol
-		v8/third_party/v8
-
-		# gyp -> gn leftovers
-		base/third_party/libevent
-		third_party/speech-dispatcher
-		third_party/usb_ids
-		third_party/xdg-utils
-	)
-	if ! use system-ffmpeg; then
-		keeplibs+=( third_party/ffmpeg third_party/opus )
-	fi
-	if ! use system-icu; then
-		keeplibs+=( third_party/icu )
-	fi
-	if ! use system-png; then
-		keeplibs+=( third_party/libpng )
-	fi
-	if use system-harfbuzz; then
-		keeplibs+=( third_party/harfbuzz-ng/utils )
-	else
-		keeplibs+=( third_party/harfbuzz-ng )
-	fi
-	if use wayland && ! use headless ; then
-		keeplibs+=( third_party/wayland )
-	fi
-	if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
-		keeplibs+=( third_party/libxml )
-		keeplibs+=( third_party/libxslt )
-		keeplibs+=( third_party/openh264 )
-		keeplibs+=( third_party/re2 )
-		if use system-icu; then
-			keeplibs+=( third_party/icu )
-		fi
-	fi
-	if use arm64 || use ppc64 || use riscv; then
-		keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
-	fi
-	# we need to generate ppc64 stuff because upstream does not ship it yet
-	# it has to be done before unbundling.
-	if use ppc64; then
-		pushd third_party/libvpx >/dev/null || die
-		mkdir -p source/config/linux/ppc64 || die
-		./generate_gni.sh || die
-		popd >/dev/null || die
-	fi
-
-	# Remove most bundled libraries. Some are still needed.
-	build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
-	if use js-type-check; then
-		ln -s "${EPREFIX}"/usr/bin/java third_party/jdk/current/bin/java || die
-	fi
-
-	# bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
-	mkdir -p buildtools/third_party/eu-strip/bin || die
-	ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
-}
-
-src_configure() {
-	# Calling this here supports resumption via FEATURES=keepwork
-	python_setup
-
-	local myconf_gn=""
-
-	# Make sure the build system will use the right tools, bug #340795.
-	tc-export AR CC CXX NM
-
-	if [[ ${CHROMIUM_FORCE_CLANG} == yes ]] && ! tc-is-clang; then
-		# Force clang since gcc is pretty broken at the moment.
-		CC=${CHOST}-clang
-		CXX=${CHOST}-clang++
-		strip-unsupported-flags
-	fi
-
-	if tc-is-clang; then
-		myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
-	else
-		if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
-			die "Compiling with sys-libs/libcxx requires clang."
-		fi
-		myconf_gn+=" is_clang=false"
-	fi
-
-	# Define a custom toolchain for GN
-	myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
-
-	if tc-is-cross-compiler; then
-		tc-export BUILD_{AR,CC,CXX,NM}
-		myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
-		myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
-	else
-		myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
-	fi
-
-	# GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
-	myconf_gn+=" is_debug=false"
-
-	# enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
-	# DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
-	myconf_gn+=" dcheck_always_on=$(usex debug true false)"
-	myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
-
-	# Component build isn't generally intended for use by end users. It's mostly useful
-	# for development and debugging.
-	myconf_gn+=" is_component_build=$(usex component-build true false)"
-
-	# Disable nacl, we can't build without pnacl (http://crbug.com/269560).
-	myconf_gn+=" enable_nacl=false"
-
-	# Use system-provided libraries.
-	# TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
-	# TODO: use_system_hunspell (upstream changes needed).
-	# TODO: use_system_protobuf (bug #525560).
-	# TODO: use_system_sqlite (http://crbug.com/22208).
-
-	# libevent: https://bugs.gentoo.org/593458
-	local gn_system_libraries=(
-		flac
-		fontconfig
-		freetype
-		# Need harfbuzz_from_pkgconfig target
-		#harfbuzz-ng
-		libdrm
-		libjpeg
-		libwebp
-		zlib
-	)
-	if use system-ffmpeg; then
-		gn_system_libraries+=( ffmpeg opus )
-	fi
-	if use system-icu; then
-		gn_system_libraries+=( icu )
-	fi
-	if use system-png; then
-		gn_system_libraries+=( libpng )
-	fi
-	if [[ ${CHROMIUM_FORCE_LIBCXX} != yes ]]; then
-		# unbundle only without libc++, because libc++ is not fully ABI compatible with libstdc++
-		gn_system_libraries+=( libxml )
-		gn_system_libraries+=( libxslt )
-		gn_system_libraries+=( openh264 )
-		gn_system_libraries+=( re2 )
-	fi
-	build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
-
-	# See dependency logic in third_party/BUILD.gn
-	myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
-
-	# Disable deprecated libgnome-keyring dependency, bug #713012
-	myconf_gn+=" use_gnome_keyring=false"
-
-	# Optional dependencies.
-	myconf_gn+=" enable_js_type_check=$(usex js-type-check true false)"
-	myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
-	myconf_gn+=" enable_widevine=$(usex widevine true false)"
-	myconf_gn+=" use_cups=$(usex cups true false)"
-	myconf_gn+=" use_kerberos=$(usex kerberos true false)"
-	myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
-	myconf_gn+=" use_vaapi=$(usex vaapi true false)"
-	myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
-
-	# TODO: link_pulseaudio=true for GN.
-
-	myconf_gn+=" disable_fieldtrial_testing_config=true"
-
-	# Never use bundled gold binary. Disable gold linker flags for now.
-	# Do not use bundled clang.
-	# Trying to use gold results in linker crash.
-	myconf_gn+=" use_gold=false use_sysroot=false use_custom_libcxx=false"
-
-	# Disable forced lld, bug 641556
-	myconf_gn+=" use_lld=false"
-
-	# Disable pseudolocales, only used for testing
-	myconf_gn+=" enable_pseudolocales=false"
-
-	# Disable code formating of generated files
-	myconf_gn+=" blink_enable_generated_code_formatting=false"
-
-	ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
-	myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
-	myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
-
-	# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
-	# Note: these are for Gentoo use ONLY. For your own distribution,
-	# please get your own set of keys. Feel free to contact chromium@gentoo.org
-	# for more info. The OAuth2 credentials, however, have been left out.
-	# Those OAuth2 credentials have been broken for quite some time anyway.
-	# Instead we apply a patch to use the --oauth2-client-id= and
-	# --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
-	# GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
-	# Chromium without baked-in values.
-	local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
-	myconf_gn+=" google_api_key=\"${google_api_key}\""
-	local myarch="$(tc-arch)"
-
-	# Avoid CFLAGS problems, bug #352457, bug #390147.
-	if ! use custom-cflags; then
-		replace-flags "-Os" "-O2"
-		strip-flags
-
-		# Debug info section overflows without component build
-		# Prevent linker from running out of address space, bug #471810 .
-		if ! use component-build || use x86; then
-			filter-flags "-g*"
-		fi
-
-		# Prevent libvpx build failures. Bug 530248, 544702, 546984.
-		if [[ ${myarch} == amd64 || ${myarch} == x86 ]]; then
-			filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4
-		fi
-	fi
-
-	if [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
-		append-flags -stdlib=libc++
-		append-ldflags -stdlib=libc++
-	fi
-
-	if [[ $myarch = amd64 ]] ; then
-		myconf_gn+=" target_cpu=\"x64\""
-		ffmpeg_target_arch=x64
-	elif [[ $myarch = x86 ]] ; then
-		myconf_gn+=" target_cpu=\"x86\""
-		ffmpeg_target_arch=ia32
-
-		# This is normally defined by compiler_cpu_abi in
-		# build/config/compiler/BUILD.gn, but we patch that part out.
-		append-flags -msse2 -mfpmath=sse -mmmx
-	elif [[ $myarch = arm64 ]] ; then
-		myconf_gn+=" target_cpu=\"arm64\""
-		ffmpeg_target_arch=arm64
-	elif [[ $myarch = arm ]] ; then
-		myconf_gn+=" target_cpu=\"arm\""
-		ffmpeg_target_arch=$(usex cpu_flags_arm_neon arm-neon arm)
-	elif [[ $myarch = ppc64 ]] ; then
-		myconf_gn+=" target_cpu=\"ppc64\""
-		ffmpeg_target_arch=ppc64
-	elif [[ $myarch = riscv ]] ; then
-		myconf_gn+=" target_cpu=\"riscv64\""
-		ffmpeg_target_arch=riscv64
-	else
-		die "Failed to determine target arch, got '$myarch'."
-	fi
-
-	# Make sure that -Werror doesn't get added to CFLAGS by the build system.
-	# Depending on GCC version the warnings are different and we don't want
-	# the build to fail because of that.
-	myconf_gn+=" treat_warnings_as_errors=false"
-
-	# Disable fatal linker warnings, bug 506268.
-	myconf_gn+=" fatal_linker_warnings=false"
-
-	# Bug 491582.
-	export TMPDIR="${WORKDIR}/temp"
-	mkdir -p -m 755 "${TMPDIR}" || die
-
-	# https://bugs.gentoo.org/654216
-	addpredict /dev/dri/ #nowarn
-
-	#if ! use system-ffmpeg; then
-	if false; then
-		local build_ffmpeg_args=""
-		if use pic && [[ "${ffmpeg_target_arch}" == "ia32" ]]; then
-			build_ffmpeg_args+=" --disable-asm"
-		fi
-
-		# Re-configure bundled ffmpeg. See bug #491378 for example reasons.
-		einfo "Configuring bundled ffmpeg..."
-		pushd third_party/ffmpeg > /dev/null || die
-		chromium/scripts/build_ffmpeg.py linux ${ffmpeg_target_arch} \
-			--branding ${ffmpeg_branding} -- ${build_ffmpeg_args} || die
-		chromium/scripts/copy_config.sh || die
-		chromium/scripts/generate_gn.py || die
-		popd > /dev/null || die
-	fi
-
-	# Chromium relies on this, but was disabled in >=clang-10, crbug.com/1042470
-	append-cxxflags $(test-flags-CXX -flax-vector-conversions=all)
-
-	# Disable unknown warning message from clang.
-	tc-is-clang && append-flags -Wno-unknown-warning-option
-
-	# Explicitly disable ICU data file support for system-icu builds.
-	if use system-icu; then
-		myconf_gn+=" icu_use_data_file=false"
-	fi
-
-	# Enable ozone wayland and/or headless support
-	myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
-	myconf_gn+=" ozone_platform_headless=true"
-	myconf_gn+=" ozone_platform_x11=$(usex headless false true)"
-	if use wayland || use headless; then
-		if use headless; then
-			myconf_gn+=" ozone_platform=\"headless\""
-			myconf_gn+=" use_x11=false"
-		else
-			myconf_gn+=" ozone_platform_wayland=true"
-			myconf_gn+=" use_system_libdrm=true"
-			myconf_gn+=" use_system_minigbm=true"
-			myconf_gn+=" use_xkbcommon=true"
-			myconf_gn+=" ozone_platform=\"wayland\""
-		fi
-	else
-		myconf_gn+=" ozone_platform=\"x11\""
-	fi
-
-	# Enable official builds
-	myconf_gn+=" is_official_build=$(usex official true false)"
-	myconf_gn+=" use_thin_lto=false"
-	if use official; then
-		# Allow building against system libraries in official builds
-		sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
-			tools/generate_shim_headers/generate_shim_headers.py || die
-		# Disable CFI: unsupported for GCC, requires clang+lto+lld
-		myconf_gn+=" is_cfi=false"
-		# Disable PGO, because profile data is only compatible with >=clang-11
-		myconf_gn+=" chrome_pgo_phase=0"
-		# Don't add symbols to build
-		myconf_gn+=" symbol_level=0"
-	fi
-
-	einfo "Configuring Chromium..."
-	set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
-	echo "$@"
-	"$@" || die
-}
-
-src_compile() {
-	# Final link uses lots of file descriptors.
-	ulimit -n 2048
-
-	# Calling this here supports resumption via FEATURES=keepwork
-	python_setup
-
-	# Don't inherit PYTHONPATH from environment, bug #789021, #812689
-	local -x PYTHONPATH=
-
-	#"${EPYTHON}" tools/clang/scripts/update.py --force-local-build --gcc-toolchain /usr --skip-checkout --use-system-cmake --without-android || die
-
-	# Build mksnapshot and pax-mark it.
-	local x
-	for x in mksnapshot v8_context_snapshot_generator; do
-		if tc-is-cross-compiler; then
-			eninja -C out/Release "host/${x}"
-			pax-mark m "out/Release/host/${x}"
-		else
-			eninja -C out/Release "${x}"
-			pax-mark m "out/Release/${x}"
-		fi
-	done
-
-	# Even though ninja autodetects number of CPUs, we respect
-	# user's options, for debugging with -j 1 or any other reason.
-	eninja -C out/Release chrome chromedriver
-	use suid && eninja -C out/Release chrome_sandbox
-
-	pax-mark m out/Release/chrome
-
-	mv out/Release/chromedriver{.unstripped,} || die
-
-	# Build manpage; bug #684550
-	sed -e 's|@@PACKAGE@@|chromium-browser|g;
-		s|@@MENUNAME@@|Chromium|g;' \
-		chrome/app/resources/manpage.1.in > \
-		out/Release/chromium-browser.1 || die
-
-	# Build desktop file; bug #706786
-	sed -e 's|@@MENUNAME@@|Chromium|g;
-		s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
-		s|@@PACKAGE@@|chromium-browser|g;
-		s|\(^Exec=\)/usr/bin/|\1|g;' \
-		chrome/installer/linux/common/desktop.template > \
-		out/Release/chromium-browser-chromium.desktop || die
-
-	# Build vk_swiftshader_icd.json; bug #827861
-	sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \
-		third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \
-		out/Release/vk_swiftshader_icd.json || die
-}
-
-src_install() {
-	local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
-	exeinto "${CHROMIUM_HOME}"
-	doexe out/Release/chrome
-
-	if use suid; then
-		newexe out/Release/chrome_sandbox chrome-sandbox
-		fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-	fi
-
-	doexe out/Release/chromedriver
-	doexe out/Release/chrome_crashpad_handler
-
-	ozone_auto_session () {
-		use wayland && ! use headless && echo true || echo false
-	}
-	local sedargs=( -e
-			"s:/usr/lib/:/usr/$(get_libdir)/:g;
-			s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
-	)
-	sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
-	doexe chromium-launcher.sh
-
-	# It is important that we name the target "chromium-browser",
-	# xdg-utils expect it; bug #355517.
-	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
-	# keep the old symlink around for consistency
-	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
-
-	dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
-
-	# Allow users to override command-line options, bug #357629.
-	insinto /etc/chromium
-	newins "${FILESDIR}/chromium.default" "default"
-
-	pushd out/Release/locales > /dev/null || die
-	chromium_remove_language_paks
-	popd
-
-	insinto "${CHROMIUM_HOME}"
-	doins out/Release/*.bin
-	doins out/Release/*.pak
-	(
-		shopt -s nullglob
-		local files=(out/Release/*.so out/Release/*.so.[0-9])
-		[[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
-	)
-
-	if ! use system-icu; then
-		doins out/Release/icudtl.dat
-	fi
-
-	doins -r out/Release/locales
-	doins -r out/Release/resources
-	doins -r out/Release/MEIPreload
-
-	# Install vk_swiftshader_icd.json; bug #827861
-	doins out/Release/vk_swiftshader_icd.json
-
-	if [[ -d out/Release/swiftshader ]]; then
-		insinto "${CHROMIUM_HOME}/swiftshader"
-		doins out/Release/swiftshader/*.so
-	fi
-
-	# Install icons
-	local branding size
-	for size in 16 24 32 48 64 128 256 ; do
-		case ${size} in
-			16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
-				*) branding="chrome/app/theme/chromium" ;;
-		esac
-		newicon -s ${size} "${branding}/product_logo_${size}.png" \
-			chromium-browser.png
-	done
-
-	# Install desktop entry
-	domenu out/Release/chromium-browser-chromium.desktop
-
-	# Install GNOME default application entry (bug #303100).
-	insinto /usr/share/gnome-control-center/default-apps
-	newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
-
-	# Install manpage; bug #684550
-	doman out/Release/chromium-browser.1
-	dosym chromium-browser.1 /usr/share/man/man1/chromium.1
-
-	readme.gentoo_create_doc
-}
-
-pkg_postrm() {
-	xdg_icon_cache_update
-	xdg_desktop_database_update
-}
-
-pkg_postinst() {
-	xdg_icon_cache_update
-	xdg_desktop_database_update
-	readme.gentoo_print_elog
-
-	if use vaapi; then
-		elog "VA-API is disabled by default at runtime. You have to enable it"
-		elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
-		elog "in /etc/chromium/default."
-	fi
-	if use screencast; then
-		elog "Screencast is disabled by default at runtime. Either enable it"
-		elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
-		elog "inside Chromium or add --enable-webrtc-pipewire-capturer"
-		elog "to CHROMIUM_FLAGS in /etc/chromium/default."
-	fi
-}

diff --git a/www-client/chromium/files/11cpuinfo.patch b/www-client/chromium/files/11cpuinfo.patch
deleted file mode 100644
index 99c5cdd..0000000
--- a/www-client/chromium/files/11cpuinfo.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur a/third_party/cpuinfo/src/src/riscv/linux/riscv-hw.c b/third_party/cpuinfo/src/src/riscv/linux/riscv-hw.c
---- a/third_party/cpuinfo/src/src/riscv/linux/riscv-hw.c	2024-03-16 12:12:29.835536873 +0000
-+++ b/third_party/cpuinfo/src/src/riscv/linux/riscv-hw.c	2024-03-16 12:06:55.888004794 +0000
-@@ -14,7 +14,6 @@
- #endif
- 
- #include <sched.h>
--#include <sys/hwprobe.h>
- 
- #include <cpuinfo/log.h>
- #include <riscv/api.h>

diff --git a/www-client/chromium/files/chromium-108-EnumTable-crash.patch b/www-client/chromium/files/chromium-108-EnumTable-crash.patch
deleted file mode 100644
index 661ec33..0000000
--- a/www-client/chromium/files/chromium-108-EnumTable-crash.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff --git a/components/media_router/common/providers/cast/channel/enum_table.h b/components/media_router/common/providers/cast/channel/enum_table.h
-index 842553a..89de703 100644
---- a/components/media_router/common/providers/cast/channel/enum_table.h
-+++ b/components/media_router/common/providers/cast/channel/enum_table.h
-@@ -8,6 +8,7 @@
- #include <cstdint>
- #include <cstring>
- #include <ostream>
-+#include <vector>
- 
- #include "base/check_op.h"
- #include "base/notreached.h"
-@@ -187,7 +188,6 @@ class
-   inline constexpr GenericEnumTableEntry(int32_t value);
-   inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
- 
--  GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
-   GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
- 
-  private:
-@@ -253,7 +253,6 @@ class EnumTable {
-     constexpr Entry(E value, base::StringPiece str)
-         : GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
- 
--    Entry(const Entry&) = delete;
-     Entry& operator=(const Entry&) = delete;
-   };
- 
-@@ -312,15 +311,14 @@ class EnumTable {
-     if (is_sorted_) {
-       const std::size_t index = static_cast<std::size_t>(value);
-       if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
--        const auto& entry = data_.begin()[index];
-+        const auto& entry = data_[index];
-         if (ANALYZER_ASSUME_TRUE(entry.has_str()))
-           return entry.str();
-       }
-       return absl::nullopt;
-     }
-     return GenericEnumTableEntry::FindByValue(
--        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
--        data_.size(), static_cast<int32_t>(value));
-+        &data_[0], data_.size(), static_cast<int32_t>(value));
-   }
- 
-   // This overload of GetString is designed for cases where the argument is a
-@@ -348,8 +346,7 @@ class EnumTable {
-   // enum value directly.
-   absl::optional<E> GetEnum(base::StringPiece str) const {
-     auto* entry = GenericEnumTableEntry::FindByString(
--        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
--        data_.size(), str);
-+        &data_[0], data_.size(), str);
-     return entry ? static_cast<E>(entry->value) : absl::optional<E>();
-   }
- 
-@@ -364,7 +361,7 @@ class EnumTable {
-   // Align the data on a cache line boundary.
-   alignas(64)
- #endif
--      std::initializer_list<Entry> data_;
-+      const std::vector<Entry> data_;
-   bool is_sorted_;
- 
-   constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
-@@ -376,8 +373,8 @@ class EnumTable {
- 
-     for (std::size_t i = 0; i < data.size(); i++) {
-       for (std::size_t j = i + 1; j < data.size(); j++) {
--        const Entry& ei = data.begin()[i];
--        const Entry& ej = data.begin()[j];
-+        const Entry& ei = data[i];
-+        const Entry& ej = data[j];
-         DCHECK(ei.value != ej.value)
-             << "Found duplicate enum values at indices " << i << " and " << j;
-         DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

diff --git a/www-client/chromium/files/chromium-119-minizip-cast.patch b/www-client/chromium/files/chromium-119-minizip-cast.patch
deleted file mode 100644
index 0d03e8e..0000000
--- a/www-client/chromium/files/chromium-119-minizip-cast.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-clang-16 does not get the types for an aggregate right and fails with narrowing error
---- a/third_party/zlib/google/zip_internal.cc
-+++ b/third_party/zlib/google/zip_internal.cc
-@@ -260,13 +260,12 @@ zip_fileinfo TimeToZipFileInfo(const base::Time& file_time) {
-     // It assumes that dates below 1980 are in the double digit format.
-     // Hence the fail safe option is to leave the date unset. Some programs
-     // might show the unset date as 1980-0-0 which is invalid.
--    zip_info.tmz_date = {
--        .tm_sec = static_cast<uInt>(file_time_parts.second),
--        .tm_min = static_cast<uInt>(file_time_parts.minute),
--        .tm_hour = static_cast<uInt>(file_time_parts.hour),
--        .tm_mday = static_cast<uInt>(file_time_parts.day_of_month),
--        .tm_mon = static_cast<uInt>(file_time_parts.month - 1),
--        .tm_year = static_cast<uInt>(file_time_parts.year)};
-+    zip_info.tmz_date.tm_sec = static_cast<uInt>(file_time_parts.second);
-+    zip_info.tmz_date.tm_min = static_cast<uInt>(file_time_parts.minute);
-+    zip_info.tmz_date.tm_hour = static_cast<uInt>(file_time_parts.hour);
-+    zip_info.tmz_date.tm_mday = static_cast<uInt>(file_time_parts.day_of_month);
-+    zip_info.tmz_date.tm_mon = static_cast<uInt>(file_time_parts.month - 1);
-+    zip_info.tmz_date.tm_year = static_cast<uInt>(file_time_parts.year);
-   }
- 
-   return zip_info;

diff --git a/www-client/chromium/files/chromium-119.0.6045.159-icu-74.patch b/www-client/chromium/files/chromium-119.0.6045.159-icu-74.patch
deleted file mode 100644
index efb8fb1..0000000
--- a/www-client/chromium/files/chromium-119.0.6045.159-icu-74.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://bugs.gentoo.org/917645
-(copied patch from qtwebengine:6 - https://bugs.gentoo.org/917633)
-
-Quick fix for a static_assert failure with icu74. Still waiting
-for a proper upstream fix and unknown if entirely right, but is
-an extension of [1] (is now 48 rather than 43).
-
-[1] https://crrev.com/e60b571faa3f14dd9119a6792dccf12f8bf80192
---- a/third_party/blink/renderer/platform/text/text_break_iterator.cc
-+++ b/third_party/blink/renderer/platform/text/text_break_iterator.cc
-@@ -161,7 +161,9 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar
- };
- // clang-format on
- 
--#if U_ICU_VERSION_MAJOR_NUM >= 58
-+#if U_ICU_VERSION_MAJOR_NUM >= 74
-+#define BA_LB_COUNT (U_LB_COUNT - 8)
-+#elif U_ICU_VERSION_MAJOR_NUM >= 58
- #define BA_LB_COUNT (U_LB_COUNT - 3)
- #else
- #define BA_LB_COUNT U_LB_COUNT

diff --git a/www-client/chromium/files/chromium-93-InkDropHost-crash.patch b/www-client/chromium/files/chromium-93-InkDropHost-crash.patch
deleted file mode 100644
index 54d16db..0000000
--- a/www-client/chromium/files/chromium-93-InkDropHost-crash.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/ui/views/animation/ink_drop_host_view.h b/ui/views/animation/ink_drop_host_view.h
-index bd0975b..e5df288 100644
---- a/ui/views/animation/ink_drop_host_view.h
-+++ b/ui/views/animation/ink_drop_host_view.h
-@@ -238,6 +238,11 @@ class VIEWS_EXPORT InkDropHost {
-   // Used to observe View and inform the InkDrop of host-transform changes.
-   ViewLayerTransformObserver host_view_transform_observer_;
- 
-+  // Declared before |ink_drop_|, because InkDropImpl may call
-+  // RemoveInkDropLayer on partly destructed InkDropHost. In
-+  // that case |ink_drop_mask_| must be still valid.
-+  std::unique_ptr<views::InkDropMask> ink_drop_mask_;
-+
-   // Should not be accessed directly. Use GetInkDrop() instead.
-   std::unique_ptr<InkDrop> ink_drop_;
- 
-@@ -261,8 +266,6 @@ class VIEWS_EXPORT InkDropHost {
-   int ink_drop_small_corner_radius_ = 2;
-   int ink_drop_large_corner_radius_ = 4;
- 
--  std::unique_ptr<views::InkDropMask> ink_drop_mask_;
--
-   base::RepeatingCallback<std::unique_ptr<InkDrop>()> create_ink_drop_callback_;
-   base::RepeatingCallback<std::unique_ptr<InkDropRipple>()>
-       create_ink_drop_ripple_callback_;

diff --git a/www-client/chromium/files/chromium-96-EnumTable-crash.patch b/www-client/chromium/files/chromium-96-EnumTable-crash.patch
deleted file mode 100644
index 9736739..0000000
--- a/www-client/chromium/files/chromium-96-EnumTable-crash.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h
-index aad9e08..2f3fcad 100644
---- a/components/cast_channel/enum_table.h
-+++ b/components/cast_channel/enum_table.h
-@@ -8,6 +8,7 @@
- #include <cstdint>
- #include <cstring>
- #include <ostream>
-+#include <vector>
- 
- #include "base/check_op.h"
- #include "base/macros.h"
-@@ -188,7 +189,6 @@ class
-   inline constexpr GenericEnumTableEntry(int32_t value);
-   inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
- 
--  GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
-   GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
- 
-  private:
-@@ -254,7 +254,6 @@ class EnumTable {
-     constexpr Entry(E value, base::StringPiece str)
-         : GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
- 
--    Entry(const Entry&) = delete;
-     Entry& operator=(const Entry&) = delete;
-   };
- 
-@@ -313,15 +312,14 @@ class EnumTable {
-     if (is_sorted_) {
-       const std::size_t index = static_cast<std::size_t>(value);
-       if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
--        const auto& entry = data_.begin()[index];
-+        const auto& entry = data_[index];
-         if (ANALYZER_ASSUME_TRUE(entry.has_str()))
-           return entry.str();
-       }
-       return absl::nullopt;
-     }
-     return GenericEnumTableEntry::FindByValue(
--        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
--        data_.size(), static_cast<int32_t>(value));
-+        &data_[0], data_.size(), static_cast<int32_t>(value));
-   }
- 
-   // This overload of GetString is designed for cases where the argument is a
-@@ -349,8 +347,7 @@ class EnumTable {
-   // enum value directly.
-   absl::optional<E> GetEnum(base::StringPiece str) const {
-     auto* entry = GenericEnumTableEntry::FindByString(
--        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
--        data_.size(), str);
-+        &data_[0], data_.size(), str);
-     return entry ? static_cast<E>(entry->value) : absl::optional<E>();
-   }
- 
-@@ -365,7 +362,7 @@ class EnumTable {
-   // Align the data on a cache line boundary.
-   alignas(64)
- #endif
--      std::initializer_list<Entry> data_;
-+      const std::vector<Entry> data_;
-   bool is_sorted_;
- 
-   constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
-@@ -377,8 +374,8 @@ class EnumTable {
- 
-     for (std::size_t i = 0; i < data.size(); i++) {
-       for (std::size_t j = i + 1; j < data.size(); j++) {
--        const Entry& ei = data.begin()[i];
--        const Entry& ej = data.begin()[j];
-+        const Entry& ei = data[i];
-+        const Entry& ej = data[j];
-         DCHECK(ei.value != ej.value)
-             << "Found duplicate enum values at indices " << i << " and " << j;
-         DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

diff --git a/www-client/chromium/files/chromium-96-freetype-unbundle.patch b/www-client/chromium/files/chromium-96-freetype-unbundle.patch
deleted file mode 100644
index 6ef5ff6..0000000
--- a/www-client/chromium/files/chromium-96-freetype-unbundle.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/build/linux/BUILD.gn
-+++ b/build/linux/BUILD.gn
-@@ -23,6 +23,7 @@
-   # the system, use with caution,for details see build/config/freetype/BUILD.gn.
-   pkg_config("freetype_from_pkgconfig") {
-     visibility = [
-+      "//build/config/freetype:freetype",
-       "//third_party:freetype_harfbuzz",
-       "//third_party/harfbuzz-ng:harfbuzz_source",
-     ]

diff --git a/www-client/chromium/files/chromium-98-EnumTable-crash.patch b/www-client/chromium/files/chromium-98-EnumTable-crash.patch
deleted file mode 100644
index f058ec1..0000000
--- a/www-client/chromium/files/chromium-98-EnumTable-crash.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h
-index 842553a..89de703 100644
---- a/components/cast_channel/enum_table.h
-+++ b/components/cast_channel/enum_table.h
-@@ -8,6 +8,7 @@
- #include <cstdint>
- #include <cstring>
- #include <ostream>
-+#include <vector>
- 
- #include "base/check_op.h"
- #include "base/notreached.h"
-@@ -187,7 +188,6 @@ class
-   inline constexpr GenericEnumTableEntry(int32_t value);
-   inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
- 
--  GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
-   GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
- 
-  private:
-@@ -253,7 +253,6 @@ class EnumTable {
-     constexpr Entry(E value, base::StringPiece str)
-         : GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
- 
--    Entry(const Entry&) = delete;
-     Entry& operator=(const Entry&) = delete;
-   };
- 
-@@ -312,15 +311,14 @@ class EnumTable {
-     if (is_sorted_) {
-       const std::size_t index = static_cast<std::size_t>(value);
-       if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
--        const auto& entry = data_.begin()[index];
-+        const auto& entry = data_[index];
-         if (ANALYZER_ASSUME_TRUE(entry.has_str()))
-           return entry.str();
-       }
-       return absl::nullopt;
-     }
-     return GenericEnumTableEntry::FindByValue(
--        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
--        data_.size(), static_cast<int32_t>(value));
-+        &data_[0], data_.size(), static_cast<int32_t>(value));
-   }
- 
-   // This overload of GetString is designed for cases where the argument is a
-@@ -348,8 +346,7 @@ class EnumTable {
-   // enum value directly.
-   absl::optional<E> GetEnum(base::StringPiece str) const {
-     auto* entry = GenericEnumTableEntry::FindByString(
--        reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
--        data_.size(), str);
-+        &data_[0], data_.size(), str);
-     return entry ? static_cast<E>(entry->value) : absl::optional<E>();
-   }
- 
-@@ -364,7 +361,7 @@ class EnumTable {
-   // Align the data on a cache line boundary.
-   alignas(64)
- #endif
--      std::initializer_list<Entry> data_;
-+      const std::vector<Entry> data_;
-   bool is_sorted_;
- 
-   constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
-@@ -376,8 +373,8 @@ class EnumTable {
- 
-     for (std::size_t i = 0; i < data.size(); i++) {
-       for (std::size_t j = i + 1; j < data.size(); j++) {
--        const Entry& ei = data.begin()[i];
--        const Entry& ej = data.begin()[j];
-+        const Entry& ei = data[i];
-+        const Entry& ej = data[j];
-         DCHECK(ei.value != ej.value)
-             << "Found duplicate enum values at indices " << i << " and " << j;
-         DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

diff --git a/www-client/chromium/files/chromium-98-system-libdrm.patch b/www-client/chromium/files/chromium-98-system-libdrm.patch
deleted file mode 100644
index f2f18be..0000000
--- a/www-client/chromium/files/chromium-98-system-libdrm.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-diff --git a/media/gpu/chromeos/BUILD.gn b/media/gpu/chromeos/BUILD.gn
-index a5c8945..d742d80 100644
---- a/media/gpu/chromeos/BUILD.gn
-+++ b/media/gpu/chromeos/BUILD.gn
-@@ -32,6 +32,7 @@ source_set("chromeos") {
- 
-   if (use_vaapi) {
-     deps += [
-+      "//build/config/linux/libdrm",
-       "//media/gpu/vaapi",
-       "//media/gpu/vaapi:common",
-     ]
-diff --git a/media/gpu/chromeos/video_decoder_pipeline.cc b/media/gpu/chromeos/video_decoder_pipeline.cc
-index 2d77cd9..1883fd4 100644
---- a/media/gpu/chromeos/video_decoder_pipeline.cc
-+++ b/media/gpu/chromeos/video_decoder_pipeline.cc
-@@ -4,6 +4,9 @@
- 
- #include "media/gpu/chromeos/video_decoder_pipeline.h"
- 
-+#if BUILDFLAG(USE_VAAPI)
-+#include <drm_fourcc.h>
-+#endif
- #include <memory>
- 
- #include "base/bind.h"
-@@ -28,7 +31,6 @@
- 
- #if BUILDFLAG(USE_VAAPI)
- #include "media/gpu/vaapi/vaapi_video_decoder.h"
--#include "third_party/libdrm/src/include/drm/drm_fourcc.h"
- #elif BUILDFLAG(USE_V4L2_CODEC)
- #include "media/gpu/v4l2/v4l2_video_decoder.h"
- #else

diff --git a/www-client/chromium/files/chromium-glibc-2.34.patch b/www-client/chromium/files/chromium-glibc-2.34.patch
deleted file mode 100644
index 64c03a6..0000000
--- a/www-client/chromium/files/chromium-glibc-2.34.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 600d63c2c59a9892dbc5423d7d8bb1565a9f91e7 Mon Sep 17 00:00:00 2001
-From: Michel Salim <michel@fb.com>
-Date: Thu, 04 Nov 2021 14:22:40 -0700
-Subject: [PATCH] Handle long SIGSTKSZ in glibc > 2.33
-
-`SIGSTKSZ` is no longer constant in glibc > 2.33 but a function
-returning a long. Cast before taking `max`.
-
-See https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=85e84fe53699fe9e392edffa993612ce08b2954a;hb=HEAD
-
-Signed-off-by: Michel Salim <michel@fb.com>
-Change-Id: I197f8ff3053eede80d6aed096be4f0113dd43241
-(relocated to chromium repo, removed static)
----
-
-diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
-index ca353c4..5cdabcf 100644
---- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
-+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
-@@ -138,7 +138,7 @@
-   // SIGSTKSZ may be too small to prevent the signal handlers from overrunning
-   // the alternative stack. Ensure that the size of the alternative stack is
-   // large enough.
--  static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
-+  const unsigned kSigStackSize = std::max(16384U, (unsigned)SIGSTKSZ);
- 
-   // Only set an alternative stack if there isn't already one, or if the current
-   // one is too small.
-diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
-index ca6b595..1c1ee42 100644
---- a/sandbox/linux/services/credentials.cc
-+++ b/sandbox/linux/services/credentials.cc
-@@ -11,6 +11,7 @@
- #include <stddef.h>
- #include <stdint.h>
- #include <stdio.h>
-+#include <string.h>
- #include <sys/syscall.h>
- #include <sys/types.h>
- #include <sys/wait.h>
-@@ -100,7 +101,8 @@ bool ChrootToSafeEmptyDir() {
-   // TODO(crbug.com/1247458) Broken in MSan builds after LLVM f1bb30a4956f.
-   clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
- 
--  char tls_buf[PTHREAD_STACK_MIN] = {0};
-+  char tls_buf[PTHREAD_STACK_MIN];
-+  memset(tls_buf, 0, PTHREAD_STACK_MIN);
-   tls = tls_buf;
- #endif
- 

diff --git a/www-client/chromium/files/chromium-shim_headers.patch b/www-client/chromium/files/chromium-shim_headers.patch
deleted file mode 100644
index 9372632..0000000
--- a/www-client/chromium/files/chromium-shim_headers.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From e273172bbafedca36984fc40f4aa6c44b79ac2ef Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09@googlemail.com>
-Date: Fri, 25 Dec 2020 09:10:32 +0000
-Subject: [PATCH] shim_headers: fix outputs generation
-
----
- build/shim_headers.gni | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/build/shim_headers.gni b/build/shim_headers.gni
-index 0900cba..5138647 100644
---- a/build/shim_headers.gni
-+++ b/build/shim_headers.gni
-@@ -6,6 +6,8 @@ template("shim_headers") {
-   action_name = "gen_${target_name}"
-   config_name = "${target_name}_config"
-   shim_headers_path = "${root_gen_dir}/shim_headers/${target_name}"
-+  shim_root_path    = rebase_path(invoker.root_path)
-+  shim_rel_path     = rebase_path("${shim_root_path}", rebase_path("//"))
- 
-   config(config_name) {
-     include_dirs = [ shim_headers_path ]
-@@ -16,7 +18,7 @@ template("shim_headers") {
-     args = [
-       "--generate",
-       "--headers-root",
--      rebase_path(invoker.root_path),
-+      "${shim_root_path}",
-       "--output-directory",
-       rebase_path(shim_headers_path),
-     ]
-@@ -27,9 +29,10 @@ template("shim_headers") {
-       ]
-     }
-     args += invoker.headers
--
--    outputs = process_file_template(invoker.headers,
--                                    "${shim_headers_path}/{{source_file_part}}")
-+    outputs = []
-+    foreach(shim_header, invoker.headers) {
-+      outputs += [ "${shim_headers_path}/${shim_rel_path}/" + shim_header ]
-+    }
-   }
- 
-   group(target_name) {
--- 
-2.26.2
-


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/riscv:master commit in: www-client/chromium/files/, www-client/chromium/
@ 2024-04-12  4:09 Yixun Lan
  0 siblings, 0 replies; 4+ messages in thread
From: Yixun Lan @ 2024-04-12  4:09 UTC (permalink / raw
  To: gentoo-commits

commit:     afda4a50bf7de01b268a57d527896effc924e93f
Author:     Andrew Cameron <apcameron <AT> gmail <DOT> com>
AuthorDate: Wed Apr 10 21:38:04 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Apr 12 03:45:24 2024 +0000
URL:        https://gitweb.gentoo.org/proj/riscv.git/commit/?id=afda4a50

www-client/chromium: Update to 123.0.6312.105

Closes: https://github.com/gentoo/riscv/pull/13
Signed-off-by: Andrew Cameron <apcameron <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 www-client/chromium/Manifest                       |    2 +
 www-client/chromium/chromium-123.0.6312.105.ebuild | 1453 ++++++++++++++++++++
 .../files/chromium-124-libwebp-shim-sharpyuv.patch |   36 +
 3 files changed, 1491 insertions(+)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index 3e9db3c..fd20d18 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -1,7 +1,9 @@
 DIST chromium-123-clang.tar.xz 50178332 BLAKE2B 4b5c4f81a83c7b0c809c93a713e869fde6fe559477665cb3b2f03c62d2175f821b81fb03b0ddd127c6eaf77c41011b4de06561f09a58384153d80fe2b3aa7427 SHA512 17108b9579f16d0da383bd5e41d012f94bcb8445a517ff823aa49b66d3861b0a124b6cce6183fbc64e8050f1ebcd65a9daa2acbda5fdaa42390bfbf4ecb16bd3
 DIST chromium-123-rust.tar.xz 145295100 BLAKE2B ae6603a0e0218e4e39d3e8b7aa48a2cd946c90779dac48be26582926963c8a10a48e3e58fd00a23cb8cd9a3584d9d4a142e843f93c761e862253817635f18c2c SHA512 b4f8dce6d74be4be495d9948d7593ec9664c0b93e87456fab33d3ae5ac0e486a4e8576b26a9ab9890285a7c0d566afb803b98225c0692b6cac9f623a10b954a2
+DIST chromium-123.0.6312.105.tar.xz 3481204616 BLAKE2B 8adbc4a0c96ea53b45b26a48c8eb94e29b31b981471a0d5fda4cdea1f7aa69714a9e5a5729a61a49a92b6322889ee794b4c7ac5e243bc495ff5bd04cdc59f616 SHA512 a1abbba78c96fd7bc44a23b21d8180ebff015d17abcb186dece595513fda9d4443ac67498a78181589884c384a48e6c3abfe72e6ee806fdfc764d05f13fb5cb6
 DIST chromium-123.0.6312.58.tar.xz 3465099244 BLAKE2B d0b85e740924a33350c5b6d3a6d1e94c8b946c52ac760237b2391127c99326c64b50de29751850dc368331b66402ab0c4fc65b9aeef09302857a1f5300a0d17b SHA512 4cb08767b8a6fe268c44bd7b621632c71f7d2f3f6c1b7bae9e0373dfc2eada397ab511a068582c2d17bbf3ee9ff16f05fccd454d610d63dd2fd14d6ca355a0c0
 DIST chromium-patches-123.tar.bz2 4697 BLAKE2B 8a7dd76edb23afb7b2f65084696bce5d6e54d63ca34c4590052db1086ed0a422b1efde863c4daad4e2526f329eb65276b9ad5406017cd97fb75b1a9556c1f933 SHA512 ea47255deac1893896f64496629d34c7092f266a175b8400fcf4f01b9d038ae240e911bff488558bb28e6f5795bbcf276adf20ed1e0ccb8ac99f9ddd260742f9
 DIST chromium-ppc64le-gentoo-patches-1.tar.xz 5636 BLAKE2B 1d898939df023c59285b27bee552470483ea06375d1ee8d6947b89c5927c23cc7bfec6b49f3b376ece931d11a56f8e2a45791e0f92ad61974fc8c34c1082d89c SHA512 8a71cb007e47cda8e5fe5d185729389e65c48bd322c8ee8b3986bee8571427b959628f2666bda646a3f89ae64197c0957d3626845ff03461dbd5dee4c964d07c
 DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c
 DIST chromium_122.0.6261.57-1raptor0~deb12u1.debian.tar.xz 551860 BLAKE2B b3f9bef07a38061553816d6f0faf610cc19cc8565605bb520c163906a02e91795a6c6ae05c92ebbb6ccaf95e130438c8bf3c70d26a04951e8438074edb48b63d SHA512 6037a47e1011304ee33447ac11fa84a3355176b5452ad9f7132eebf2527eb3e4fc42635e148731b77b17db243b42172203feacb0443e6071dc9cc7c52d41f7d6
+DIST chromium_123.0.6312.86-1raptor0~deb12u1.debian.tar.xz 579124 BLAKE2B a27996211fbed198480e50934e39b0eda4c39e5e78a03f9b290cb90a6c8d7003b6aa828bf35e6744e9d7aa9a922f43baa77d6c9768140baf5749a797c2dad664 SHA512 cfb51fd910f3330100a2dc9ea993d537f126329ff2c590744954a3bfbb712d7bf1d7ad9066628aba5d28c98f2f9b069cf02f8c6048d2ad0a1a376468bdbd9196

diff --git a/www-client/chromium/chromium-123.0.6312.105.ebuild b/www-client/chromium/chromium-123.0.6312.105.ebuild
new file mode 100644
index 0000000..5388d0d
--- /dev/null
+++ b/www-client/chromium/chromium-123.0.6312.105.ebuild
@@ -0,0 +1,1453 @@
+# Copyright 2009-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..12} )
+PYTHON_REQ_USE="xml(+)"
+
+# PACKAGING NOTES
+
+# Google roll their bundled Clang every two weeks, and the bundled Rust
+# is rolled regularly and depends on that. While we do our best to build
+# with system Clang, we will eventually hit the point where we need to use
+# the bundled Clang due to the use of prerelease features. We've been lucky
+# enough so far that this hasn't been an issue.
+
+# We try and avoid forcing the use of the custom/bundled libcxx, but sometimes
+# it is unavoidable. Remember to force the use of Clang when this is forced.
+
+# GCC is _not_ supported upstream, though patches are welcome. We do our
+# best to enable builds with GCC but reserve the right to force Clang
+# builds if we can't keep up with upstream's changes. Please comment
+# when forcing Clang builds so we can track the need for it.
+
+# GN is bundled with Chromium, but we always use the system version. Remember to
+# check for upstream changes to GN and update ebuild (and version below) as required.
+
+# For binhost users, if USE=bindist is set, we configure Chromium in a way that it is able
+# to use proprietary codecs, and so that ffmpeg is an external component (libffmpeg.so),
+# then we remove ffmpeg from the image to ensure that the built package is distributable
+# (i.e. we don't owe royalties). A suitable libffmpeg.so is symlinked in its place;
+# as a result of this, ffmpeg[chromium] or ffmpeg-chromium must be installed on the system.
+
+# For non-binhost builds, we build the bundled ffmpeg and enable proprietary codecs because there's
+# no reason not to. Todo: Re-enable USE=system-ffmpeg.
+
+# These variables let us easily bound supported major dependency versions in one place.
+GCC_MIN_VER=12
+GN_MIN_VER=0.2154
+# Since Google use prerelease llvm we can let any adventurous users try to build with prerelease
+# ebuilds; try to keep this up to date with the latest version in the tree.
+LLVM_MAX_SLOT=19
+LLVM_MIN_SLOT=17
+RUST_MIN_VER=1.72.0
+# chromium-tools/get-chromium-toolchain-strings.sh
+GOOGLE_CLANG_VER=llvmorg-19-init-2319-g7c4c2746-1
+GOOGLE_RUST_VER=340bb19fea20fd5f9357bbfac542fad84fc7ea2b-3
+
+# https://bugs.chromium.org/p/v8/issues/detail?id=14449 - V8 used in 120 can't build with GCC
+# Resolved upstream, requires testing and some backporting I'm sure
+: ${CHROMIUM_FORCE_CLANG=yes}
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101227 - Chromium 120:
+#    webrtc -  no matching member function for call to 'emplace'
+: ${CHROMIUM_FORCE_LIBCXX=yes}
+# 121's 'gcc_link_wrapper.py' currently fails if not using lld due to the addition of rust
+: ${CHROMIUM_FORCE_LLD=yes}
+
+: ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN=no}
+
+VIRTUALX_REQUIRED="pgo"
+
+CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
+	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
+	sv sw ta te th tr uk ur vi zh-CN zh-TW"
+
+inherit check-reqs chromium-2 desktop flag-o-matic llvm ninja-utils pax-utils
+inherit python-any-r1 qmake-utils readme.gentoo-r1 toolchain-funcs virtualx xdg-utils
+
+DESCRIPTION="Open-source version of Google Chrome web browser"
+HOMEPAGE="https://www.chromium.org/"
+PATCHSET_PPC64="123.0.6312.86-1raptor0~deb12u1"
+PATCH_V="${PV%%\.*}"
+SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
+	system-toolchain? (
+		https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
+	)
+	!system-toolchain? (
+		https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${GOOGLE_CLANG_VER}.tar.xz
+			-> chromium-${PV%%\.*}-clang.tar.xz
+		https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${GOOGLE_RUST_VER}-${GOOGLE_CLANG_VER%??}.tar.xz
+			-> chromium-${PV%%\.*}-rust.tar.xz
+	)
+	ppc64? (
+		https://quickbuild.io/~raptor-engineering-public/+archive/ubuntu/chromium/+files/chromium_${PATCHSET_PPC64}.debian.tar.xz
+		https://deps.gentoo.zip/chromium-ppc64le-gentoo-patches-1.tar.xz
+	)
+	pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )"
+
+LICENSE="BSD"
+SLOT="0/stable"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd"
+IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos libcxx lto +official pax-kernel pgo +proprietary-codecs pulseaudio"
+IUSE+=" qt5 qt6 +screencast selinux +system-toolchain +vaapi +wayland +widevine"
+RESTRICT="!bindist? ( bindist )"
+
+REQUIRED_USE="
+	!headless? ( || ( X wayland ) )
+	pgo? ( X !wayland )
+	qt6? ( qt5 )
+	screencast? ( wayland )
+	!system-toolchain? ( libcxx )
+	ffmpeg-chromium? ( bindist proprietary-codecs )
+"
+
+COMMON_X_DEPEND="
+	x11-libs/libXcomposite:=
+	x11-libs/libXcursor:=
+	x11-libs/libXdamage:=
+	x11-libs/libXfixes:=
+	>=x11-libs/libXi-1.6.0:=
+	x11-libs/libXrandr:=
+	x11-libs/libXrender:=
+	x11-libs/libXtst:=
+	x11-libs/libxshmfence:=
+"
+
+COMMON_SNAPSHOT_DEPEND="
+	system-icu? ( >=dev-libs/icu-71.1:= )
+	>=dev-libs/libxml2-2.12.4:=[icu]
+	dev-libs/nspr:=
+	>=dev-libs/nss-3.26:=
+	dev-libs/libxslt:=
+	media-libs/fontconfig:=
+	>=media-libs/freetype-2.11.0-r1:=
+	system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
+	media-libs/libjpeg-turbo:=
+	system-png? ( media-libs/libpng:=[-apng(-)] )
+	system-zstd? ( >=app-arch/zstd-1.5.5:= )
+	>=media-libs/libwebp-0.4.0:=
+	media-libs/mesa:=[gbm(+)]
+	>=media-libs/openh264-1.6.0:=
+	sys-libs/zlib:=
+	x11-libs/libdrm:=
+	!headless? (
+		dev-libs/glib:2
+		>=media-libs/alsa-lib-1.0.19:=
+		pulseaudio? ( media-libs/libpulse:= )
+		sys-apps/pciutils:=
+		kerberos? ( virtual/krb5 )
+		vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
+		X? (
+			x11-libs/libX11:=
+			x11-libs/libXext:=
+			x11-libs/libxcb:=
+		)
+		x11-libs/libxkbcommon:=
+		wayland? (
+			dev-libs/libffi:=
+			dev-libs/wayland:=
+			screencast? ( media-video/pipewire:= )
+		)
+	)
+"
+
+COMMON_DEPEND="
+	${COMMON_SNAPSHOT_DEPEND}
+	app-arch/bzip2:=
+	dev-libs/expat:=
+	net-misc/curl[ssl]
+	sys-apps/dbus:=
+	media-libs/flac:=
+	sys-libs/zlib:=[minizip]
+	!headless? (
+		X? ( ${COMMON_X_DEPEND} )
+		>=app-accessibility/at-spi2-core-2.46.0:2
+		media-libs/mesa:=[X?,wayland?]
+		cups? ( >=net-print/cups-1.3.11:= )
+		virtual/udev
+		x11-libs/cairo:=
+		x11-libs/gdk-pixbuf:2
+		x11-libs/pango:=
+		qt5? (
+			dev-qt/qtcore:5
+			dev-qt/qtwidgets:5
+		)
+		qt6? ( dev-qt/qtbase:6[gui,widgets] )
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	!headless? (
+		|| (
+			x11-libs/gtk+:3[X?,wayland?]
+			gui-libs/gtk:4[X?,wayland?]
+		)
+		qt5? ( dev-qt/qtgui:5[X?,wayland?] )
+		qt6? ( dev-qt/qtbase:6[X?,wayland?] )
+	)
+	virtual/ttf-fonts
+	selinux? ( sec-policy/selinux-chromium )
+	bindist? (
+		!ffmpeg-chromium? ( >=media-video/ffmpeg-6.1-r1:0/58.60.60[chromium] )
+		ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	!headless? (
+		gtk4? ( gui-libs/gtk:4[X?,wayland?] )
+		!gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
+	)
+"
+
+depend_clang_llvm_version() {
+	echo "sys-devel/clang:$1"
+	echo "sys-devel/llvm:$1"
+	echo "=sys-devel/lld-$1*"
+}
+
+# When passed multiple arguments we assume that
+# we want a range of versions, inclusive.
+depend_clang_llvm_versions() {
+	local _v
+	if [[ $# -eq 1 ]]; then
+		depend_clang_llvm_version "$1"
+	elif [[ $# -eq 2 ]]; then
+		if [[ $1 -eq $2 ]]; then
+			depend_clang_llvm_version "$1"
+		fi
+		echo "|| ("
+		for ((i=$1; i<=$2; i++)); do
+			echo "("
+			depend_clang_llvm_version "${i}"
+			echo ")"
+		done
+		echo ")"
+	else
+		die "depend_clang_llvm_versions() requires 1 or 2 arguments"
+	fi
+}
+
+BDEPEND="
+	${COMMON_SNAPSHOT_DEPEND}
+	${PYTHON_DEPS}
+	$(python_gen_any_dep '
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	')
+	>=app-arch/gzip-1.7
+	!headless? (
+		qt5? ( dev-qt/qtcore:5 )
+		qt6? ( dev-qt/qtbase:6 )
+	)
+	system-toolchain? (
+		libcxx? ( >=sys-devel/clang-${LLVM_MIN_SLOT} )
+		lto? ( $(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT}) )
+		pgo? (
+			>=dev-python/selenium-3.141.0
+			>=dev-util/web_page_replay_go-20220314
+			$(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT})
+		)
+		>=virtual/rust-${RUST_MIN_VER}[profiler(-)]
+	)
+	>=dev-build/gn-${GN_MIN_VER}
+	dev-lang/perl
+	>=dev-build/ninja-1.7.2
+	>=dev-util/gperf-3.0.3
+	dev-vcs/git
+	>=net-libs/nodejs-7.6.0[inspector]
+	>=sys-devel/bison-2.4.3
+	sys-devel/flex
+	virtual/pkgconfig
+"
+
+if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
+	BDEPEND+="system-toolchain? ( >=sys-devel/clang-${LLVM_MIN_SLOT} ) "
+fi
+
+if [[ ${CHROMIUM_FORCE_LLD} == yes ]]; then
+	BDEPEND+="system-toolchain? ( >=sys-devel/lld-${LLVM_MIN_SLOT} ) "
+else
+	# #918897: Hack for arm64
+	BDEPEND+=" arm64? ( >=sys-devel/lld-${LLVM_MIN_SLOT} )"
+fi
+
+if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
+	EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
+fi
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Some web pages may require additional fonts to display properly.
+Try installing some of the following packages if some characters
+are not displayed properly:
+- media-fonts/arphicfonts
+- media-fonts/droid
+- media-fonts/ipamonafont
+- media-fonts/noto
+- media-fonts/ja-ipafonts
+- media-fonts/takao-fonts
+- media-fonts/wqy-microhei
+- media-fonts/wqy-zenhei
+
+To fix broken icons on the Downloads page, you should install an icon
+theme that covers the appropriate MIME types, and configure this as your
+GTK+ icon theme.
+
+For native file dialogs in KDE, install kde-apps/kdialog.
+
+To make password storage work with your desktop environment you may
+have install one of the supported credentials management applications:
+- app-crypt/libsecret (GNOME)
+- kde-frameworks/kwallet (KDE)
+If you have one of above packages installed, but don't want to use
+them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
+in /etc/chromium/default.
+"
+
+python_check_deps() {
+	python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
+}
+
+needs_clang() {
+	[[ ${CHROMIUM_FORCE_CLANG} == yes ]] || use libcxx || use lto || use pgo
+}
+
+needs_lld() {
+	# #641556: Force lld for lto and pgo builds, otherwise disable
+	# #918897: Temporary hack w/ use arm64
+	[[ ${CHROMIUM_FORCE_LLD} == yes ]] || use lto || use pgo || use arm64
+}
+
+llvm_check_deps() {
+	if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+		einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+		return 1
+	fi
+
+	if ( use lto || use pgo ) && ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
+		einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+		return 1
+	fi
+
+	einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+pre_build_checks() {
+	# Check build requirements: bugs #471810, #541816, #914220
+	# We're going to start doing maths here on the size of an unpacked source tarball,
+	# this should make updates easier as chromium continues to balloon in size.
+	local BASE_DISK=18
+	local EXTRA_DISK=1
+	local CHECKREQS_MEMORY="4G"
+	tc-is-cross-compiler && EXTRA_DISK=2
+	if use lto || use pgo; then
+		CHECKREQS_MEMORY="9G"
+		tc-is-cross-compiler && EXTRA_DISK=4
+		use pgo && EXTRA_DISK=8
+	fi
+	if is-flagq '-g?(gdb)?([1-9])'; then
+		if use custom-cflags; then
+			EXTRA_DISK=13
+		fi
+		CHECKREQS_MEMORY="16G"
+	fi
+	CHECKREQS_DISK_BUILD="$((BASE_DISK + EXTRA_DISK))G"
+	check-reqs_${EBUILD_PHASE_FUNC}
+}
+
+pkg_pretend() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		# The pre_build_checks are all about compilation resources, no need to run it for a binpkg
+		pre_build_checks
+	fi
+
+	if use headless; then
+		local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt5" "qt6" "vaapi" "wayland")
+		for myiuse in ${headless_unused_flags[@]}; do
+			use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
+		done
+	fi
+
+	if ! use bindist && use ffmpeg-chromium; then
+		ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
+	fi
+}
+
+pkg_setup() {
+	if [[ ${MERGE_TYPE} != binary ]]; then
+		# The pre_build_checks are all about compilation resources, no need to run it for a binpkg
+		pre_build_checks
+
+		if use system-toolchain; then
+			local -x CPP="$(tc-getCXX) -E"
+			if tc-is-gcc && ! ver_test "$(gcc-version)" -ge ${GCC_MIN_VER}; then
+				die "At least gcc ${GCC_MIN_VER} is required"
+			fi
+			if use pgo && tc-is-cross-compiler; then
+				die "The pgo USE flag cannot be used when cross-compiling"
+			fi
+			if needs_clang && ! tc-is-clang; then
+				if tc-is-cross-compiler; then
+					CPP="${CBUILD}-clang++ -E"
+				else
+					CPP="${CHOST}-clang++ -E"
+				fi
+			fi
+			if needs_clang || tc-is-clang; then
+				if ver_test "$(clang-major-version)" -lt ${LLVM_MIN_SLOT}; then
+					die "At least Clang ${LLVM_MIN_SLOT} is required"
+				fi
+				# Ideally we never see this, but it should help prevent bugs like 927154
+				if ver_test "$(clang-major-version)" -gt ${LLVM_MAX_SLOT}; then
+					die "Clang $(clang-major-version) is too new; ${LLVM_MAX_SLOT} is the highest supported version"
+				fi
+			fi
+		fi
+		# Users should never hit this, it's purely a development convenience
+		if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
+			die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
+		fi
+	fi
+
+	chromium_suid_sandbox_check_kernel_config
+}
+
+src_prepare() {
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	# disable global media controls, crashes with libstdc++
+	sed -i -e \
+		"/\"GlobalMediaControlsCastStartStop\"/,+4{s/ENABLED/DISABLED/;}" \
+		"chrome/browser/media/router/media_router_feature.cc" || die
+
+	local PATCHES=(
+		"${FILESDIR}/chromium-cross-compile.patch"
+		"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
+		"${FILESDIR}/chromium-109-system-zlib.patch"
+		"${FILESDIR}/chromium-111-InkDropHost-crash.patch"
+		"${FILESDIR}/chromium-117-system-zstd.patch"
+		"${FILESDIR}/chromium-124-libwebp-shim-sharpyuv.patch"
+        "${FILESDIR}/00swiftshader-MCDissassembler.patch"
+        "${FILESDIR}/00swiftshader-use-llvm16.patch"
+        "${FILESDIR}/01fix-rust-target.patch"
+        "${FILESDIR}/02Debian-fix-rust-linking.patch"
+        "${FILESDIR}/03riscv-dav1d.patch"
+        "${FILESDIR}/05riscv-sandbox.patch"
+        "${FILESDIR}/06riscv-ffmpeg.patch"
+        "${FILESDIR}/09riscv.patch"
+        "${FILESDIR}/10cpuinfo.patch"
+	)
+
+	if use system-toolchain; then
+		# The patchset is really only required if we're using the system-toolchain
+		PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}" )
+		# We can't use the bundled compiler builtins
+		sed -i -e \
+			"/if (is_clang && toolchain_has_rust) {/,+2d" \
+			build/config/compiler/BUILD.gn || die "Failed to disable bundled compiler builtins"
+	else
+		mkdir -p third_party/llvm-build/Release+Asserts || die "Failed to bundle llvm"
+		ln -s "${WORKDIR}"/bin third_party/llvm-build/Release+Asserts/bin || die "Failed to symlink llvm bin"
+		ln -s "${WORKDIR}"/lib third_party/llvm-build/Release+Asserts/lib || die "Failed to symlink llvm lib"
+		echo "${GOOGLE_CLANG_VER}" > third_party/llvm-build/Release+Asserts/cr_build_revision || \
+			die "Failed to set clang version"
+		ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
+		cp "${WORKDIR}"/rust-toolchain/VERSION \
+			"${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
+	fi
+
+	if use ppc64 ; then
+		local p
+		for p in $(grep -v "^#" "${WORKDIR}"/debian/patches/series | grep "^ppc64le" || die); do
+			if [[ ! $p =~ "fix-breakpad-compile.patch" ]]; then
+				eapply "${WORKDIR}/debian/patches/${p}"
+			fi
+		done
+		PATCHES+=( "${WORKDIR}/ppc64le" )
+		PATCHES+=( "${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" )
+	fi
+
+	default
+
+	mkdir -p third_party/node/linux/node-linux-x64/bin || die
+	ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
+
+	# adjust python interpreter version
+	sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
+
+	local keeplibs=(
+		base/third_party/cityhash
+		base/third_party/double_conversion
+		base/third_party/dynamic_annotations
+		base/third_party/icu
+		base/third_party/nspr
+		base/third_party/superfasthash
+		base/third_party/symbolize
+		base/third_party/valgrind
+		base/third_party/xdg_user_dirs
+		buildtools/third_party/libc++
+		buildtools/third_party/libc++abi
+		chrome/third_party/mozilla_security_manager
+		courgette/third_party
+		net/third_party/mozilla_security_manager
+		net/third_party/nss
+		net/third_party/quic
+		net/third_party/uri_template
+		third_party/abseil-cpp
+		third_party/angle
+		third_party/angle/src/common/third_party/xxhash
+		third_party/angle/src/third_party/ceval
+		third_party/angle/src/third_party/libXNVCtrl
+		third_party/angle/src/third_party/volk
+		third_party/anonymous_tokens
+		third_party/apple_apsl
+		third_party/axe-core
+		third_party/blink
+		third_party/bidimapper
+		third_party/boringssl
+		third_party/boringssl/src/third_party/fiat
+		third_party/breakpad
+		third_party/breakpad/breakpad/src/third_party/curl
+		third_party/brotli
+		third_party/catapult
+		third_party/catapult/common/py_vulcanize/third_party/rcssmin
+		third_party/catapult/common/py_vulcanize/third_party/rjsmin
+		third_party/catapult/third_party/beautifulsoup4-4.9.3
+		third_party/catapult/third_party/html5lib-1.1
+		third_party/catapult/third_party/polymer
+		third_party/catapult/third_party/six
+		third_party/catapult/tracing/third_party/d3
+		third_party/catapult/tracing/third_party/gl-matrix
+		third_party/catapult/tracing/third_party/jpeg-js
+		third_party/catapult/tracing/third_party/jszip
+		third_party/catapult/tracing/third_party/mannwhitneyu
+		third_party/catapult/tracing/third_party/oboe
+		third_party/catapult/tracing/third_party/pako
+		third_party/ced
+		third_party/cld_3
+		third_party/closure_compiler
+		third_party/content_analysis_sdk
+		third_party/cpuinfo
+		third_party/crashpad
+		third_party/crashpad/crashpad/third_party/lss
+		third_party/crashpad/crashpad/third_party/zlib
+		third_party/crc32c
+		third_party/cros_system_api
+		third_party/d3
+		third_party/dav1d
+		third_party/dawn
+		third_party/dawn/third_party/gn/webgpu-cts
+		third_party/dawn/third_party/khronos
+		third_party/depot_tools
+		third_party/devscripts
+		third_party/devtools-frontend
+		third_party/devtools-frontend/src/front_end/third_party/acorn
+		third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
+		third_party/devtools-frontend/src/front_end/third_party/axe-core
+		third_party/devtools-frontend/src/front_end/third_party/chromium
+		third_party/devtools-frontend/src/front_end/third_party/codemirror
+		third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
+		third_party/devtools-frontend/src/front_end/third_party/diff
+		third_party/devtools-frontend/src/front_end/third_party/i18n
+		third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
+		third_party/devtools-frontend/src/front_end/third_party/lighthouse
+		third_party/devtools-frontend/src/front_end/third_party/lit
+		third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
+		third_party/devtools-frontend/src/front_end/third_party/marked
+		third_party/devtools-frontend/src/front_end/third_party/puppeteer
+		third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
+		third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
+		third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
+		third_party/devtools-frontend/src/front_end/third_party/wasmparser
+		third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
+		third_party/devtools-frontend/src/third_party
+		third_party/distributed_point_functions
+		third_party/dom_distiller_js
+		third_party/eigen3
+		third_party/emoji-segmenter
+		third_party/farmhash
+		third_party/fdlibm
+		third_party/ffmpeg
+		third_party/fft2d
+		third_party/flatbuffers
+		third_party/fp16
+		third_party/freetype
+		third_party/fusejs
+		third_party/fxdiv
+		third_party/highway
+		third_party/liburlpattern
+		third_party/libzip
+		third_party/lit
+		third_party/gemmlowp
+		third_party/google_input_tools
+		third_party/google_input_tools/third_party/closure_library
+		third_party/google_input_tools/third_party/closure_library/third_party/closure
+		third_party/googletest
+		third_party/hunspell
+		third_party/iccjpeg
+		third_party/inspector_protocol
+		third_party/ipcz
+		third_party/jinja2
+		third_party/jsoncpp
+		third_party/jstemplate
+		third_party/khronos
+		third_party/leveldatabase
+		third_party/libaddressinput
+		third_party/libaom
+		third_party/libaom/source/libaom/third_party/fastfeat
+		third_party/libaom/source/libaom/third_party/SVT-AV1
+		third_party/libaom/source/libaom/third_party/vector
+		third_party/libaom/source/libaom/third_party/x86inc
+		third_party/libavif
+		third_party/libevent
+		third_party/libgav1
+		third_party/libjingle
+		third_party/libphonenumber
+		third_party/libsecret
+		third_party/libsrtp
+		third_party/libsync
+		third_party/libudev
+		third_party/libva_protected_content
+		third_party/libvpx
+		third_party/libvpx/source/libvpx/third_party/x86inc
+		third_party/libwebm
+		third_party/libx11
+		third_party/libxcb-keysyms
+		third_party/libxml/chromium
+		third_party/libyuv
+		third_party/lottie
+		third_party/lss
+		third_party/lzma_sdk
+		third_party/mako
+		third_party/maldoca
+		third_party/maldoca/src/third_party/tensorflow_protos
+		third_party/maldoca/src/third_party/zlibwrapper
+		third_party/markupsafe
+		third_party/material_color_utilities
+		third_party/mesa
+		third_party/metrics_proto
+		third_party/minigbm
+		third_party/modp_b64
+		third_party/nasm
+		third_party/nearby
+		third_party/neon_2_sse
+		third_party/node
+		third_party/omnibox_proto
+		third_party/one_euro_filter
+		third_party/openscreen
+		third_party/openscreen/src/third_party/
+		third_party/openscreen/src/third_party/tinycbor/src/src
+		third_party/opus
+		third_party/ots
+		third_party/pdfium
+		third_party/pdfium/third_party/agg23
+		third_party/pdfium/third_party/base
+		third_party/pdfium/third_party/bigint
+		third_party/pdfium/third_party/freetype
+		third_party/pdfium/third_party/lcms
+		third_party/pdfium/third_party/libopenjpeg
+		third_party/pdfium/third_party/libtiff
+		third_party/perfetto
+		third_party/perfetto/protos/third_party/chromium
+		third_party/pffft
+		third_party/ply
+		third_party/polymer
+		third_party/private-join-and-compute
+		third_party/private_membership
+		third_party/protobuf
+		third_party/pthreadpool
+		third_party/puffin
+		third_party/pyjson5
+		third_party/pyyaml
+		third_party/qcms
+		third_party/re2
+		third_party/rnnoise
+		third_party/rust
+		third_party/s2cellid
+		third_party/securemessage
+		third_party/selenium-atoms
+		third_party/shell-encryption
+		third_party/simplejson
+		third_party/skia
+		third_party/skia/include/third_party/vulkan
+		third_party/skia/third_party/vulkan
+		third_party/smhasher
+		third_party/snappy
+		third_party/sqlite
+		third_party/swiftshader
+		third_party/swiftshader/third_party/astc-encoder
+		third_party/swiftshader/third_party/llvm-subzero
+		third_party/swiftshader/third_party/marl
+		third_party/swiftshader/third_party/subzero
+		third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
+		third_party/swiftshader/third_party/SPIRV-Tools
+		third_party/tensorflow_models
+		third_party/tensorflow-text
+		third_party/tflite
+		third_party/tflite/src/third_party/eigen3
+		third_party/tflite/src/third_party/fft2d
+		third_party/tflite/src/third_party/xla/third_party/tsl
+		third_party/ruy
+		third_party/six
+		third_party/ukey2
+		third_party/unrar
+		third_party/utf
+		third_party/vulkan
+		third_party/wayland
+		third_party/webdriver
+		third_party/webgpu-cts
+		third_party/webrtc
+		third_party/webrtc/common_audio/third_party/ooura
+		third_party/webrtc/common_audio/third_party/spl_sqrt_floor
+		third_party/webrtc/modules/third_party/fft
+		third_party/webrtc/modules/third_party/g711
+		third_party/webrtc/modules/third_party/g722
+		third_party/webrtc/rtc_base/third_party/base64
+		third_party/webrtc/rtc_base/third_party/sigslot
+		third_party/widevine
+		third_party/woff2
+		third_party/wuffs
+		third_party/x11proto
+		third_party/xcbproto
+		third_party/xnnpack
+		third_party/zxcvbn-cpp
+		third_party/zlib/google
+		url/third_party/mozilla
+		v8/src/third_party/siphash
+		v8/src/third_party/valgrind
+		v8/src/third_party/utf8-decoder
+		v8/third_party/glibc
+		v8/third_party/inspector_protocol
+		v8/third_party/v8
+
+		# gyp -> gn leftovers
+		third_party/speech-dispatcher
+		third_party/usb_ids
+		third_party/xdg-utils
+	)
+
+	# USE=system-*
+	if ! use system-harfbuzz; then
+		keeplibs+=( third_party/harfbuzz-ng )
+	fi
+
+	if ! use system-icu; then
+		keeplibs+=( third_party/icu )
+	fi
+
+	if ! use system-png; then
+		keeplibs+=( third_party/libpng )
+	fi
+
+	if ! use system-zstd; then
+		keeplibs+=( third_party/zstd )
+	fi
+
+	if use libcxx || [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+		keeplibs+=( third_party/libc++ )
+	fi
+
+	if ! use system-toolchain || [[ ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN} == yes ]]; then
+			keeplibs+=( third_party/llvm )
+	fi
+
+	# Arch-specific
+	if use arm64 || use ppc64 ; then
+		keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
+	fi
+	if use riscv  ; then
+		keeplibs+=( third_party/swiftshader/third_party/llvm-16.0 )
+	fi
+	# we need to generate ppc64 stuff because upstream does not ship it yet
+	# it has to be done before unbundling.
+	if use ppc64; then
+		pushd third_party/libvpx >/dev/null || die
+		mkdir -p source/config/linux/ppc64 || die
+		# requires git and clang, bug #832803
+		# Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
+		# and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
+		# since we're not in a git repo
+		sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
+			generate_gni.sh || die
+		./generate_gni.sh || die
+		popd >/dev/null || die
+
+		pushd third_party/ffmpeg >/dev/null || die
+		cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
+		cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
+		popd >/dev/null || die
+	fi
+
+	einfo "Unbundling third-party libraries ..."
+	# Remove most bundled libraries. Some are still needed.
+	build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
+
+	# bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
+	mkdir -p buildtools/third_party/eu-strip/bin || die
+	ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
+}
+
+chromium_rust_version_check() {
+	[[ ${MERGE_TYPE} == binary ]] && return
+	local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
+	rustc_version=${rustc_version[0]#rust-bin-}
+	rustc_version=${rustc_version#rust-}
+
+	[[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
+
+	echo $rustc_version
+}
+
+chromium_configure() {
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	local myconf_gn=""
+
+	if use system-toolchain && [[ ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN} == no ]]; then
+		# Make sure the build system will use the right tools, bug #340795.
+		tc-export AR CC CXX NM
+
+		if needs_clang && ! tc-is-clang; then
+			# Force clang since gcc is either broken or build is using libcxx.
+			if tc-is-cross-compiler; then
+				CC="${CBUILD}-clang -target ${CHOST} --sysroot ${ESYSROOT}"
+				CXX="${CBUILD}-clang++ -target ${CHOST} --sysroot ${ESYSROOT}"
+				BUILD_CC=${CBUILD}-clang
+				BUILD_CXX=${CBUILD}-clang++
+			else
+				CC=${CHOST}-clang
+				CXX=${CHOST}-clang++
+			fi
+			strip-unsupported-flags
+		fi
+
+		if tc-is-clang; then
+			myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
+		else
+			myconf_gn+=" is_clang=false"
+		fi
+
+		if needs_lld ; then
+			# https://bugs.gentoo.org/918897#c32
+			append-ldflags -Wl,--undefined-version
+			myconf_gn+=" use_lld=true"
+		else
+			# This doesn't prevent lld from being used, but rather prevents gn from forcing it
+			myconf_gn+=" use_lld=false"
+		fi
+
+		if use lto; then
+			AR=llvm-ar
+			NM=llvm-nm
+			if tc-is-cross-compiler; then
+				BUILD_AR=llvm-ar
+				BUILD_NM=llvm-nm
+			fi
+		fi
+
+		myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
+
+		if tc-is-cross-compiler; then
+			tc-export BUILD_{AR,CC,CXX,NM}
+			myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
+			myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
+			myconf_gn+=" pkg_config=\"$(tc-getPKG_CONFIG)\""
+			myconf_gn+=" host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
+
+			# setup cups-config, build system only uses --libs option
+			if use cups; then
+				mkdir "${T}/cups-config" || die
+				cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
+				export PATH="${PATH}:${T}/cups-config"
+			fi
+
+			# Don't inherit PKG_CONFIG_PATH from environment
+			local -x PKG_CONFIG_PATH=
+		else
+			myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
+		fi
+
+		local rustc_ver
+		rustc_ver=$(chromium_rust_version_check)
+		if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then
+				eerror "Rust >=${RUST_MIN_VER} is required"
+				eerror "Please run 'eselect rust' and select the correct rust version"
+				die "Selected rust version is too old"
+		else
+				einfo "Using rust ${rustc_ver} to build"
+		fi
+		if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then
+				myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\""
+		else
+				myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\""
+		fi
+		myconf_gn+=" rustc_version=\"${rustc_ver}\""
+	fi
+
+	# GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
+	myconf_gn+=" is_debug=false"
+
+	# enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
+	# DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
+	myconf_gn+=" dcheck_always_on=$(usex debug true false)"
+	myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
+
+	# Component build isn't generally intended for use by end users. It's mostly useful
+	# for development and debugging.
+	myconf_gn+=" is_component_build=false"
+
+	# Disable nacl, we can't build without pnacl (http://crbug.com/269560).
+	myconf_gn+=" enable_nacl=false"
+
+	# Use system-provided libraries.
+	# TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
+	# TODO: use_system_hunspell (upstream changes needed).
+	# TODO: use_system_protobuf (bug #525560).
+	# TODO: use_system_sqlite (http://crbug.com/22208).
+
+	# libevent: https://bugs.gentoo.org/593458
+	local gn_system_libraries=(
+		flac
+		fontconfig
+		freetype
+		# Need harfbuzz_from_pkgconfig target
+		#harfbuzz-ng
+		libdrm
+		libjpeg
+		libwebp
+		libxml
+		libxslt
+		openh264
+		zlib
+	)
+	if use system-icu; then
+		gn_system_libraries+=( icu )
+	fi
+	if use system-png; then
+		gn_system_libraries+=( libpng )
+	fi
+	if use system-zstd; then
+		gn_system_libraries+=( zstd )
+	fi
+
+	build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
+
+	# See dependency logic in third_party/BUILD.gn
+	myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
+
+	# Optional dependencies.
+	myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
+	myconf_gn+=" enable_widevine=$(usex widevine true false)"
+
+	if use headless; then
+		myconf_gn+=" use_cups=false"
+		myconf_gn+=" use_kerberos=false"
+		myconf_gn+=" use_pulseaudio=false"
+		myconf_gn+=" use_vaapi=false"
+		myconf_gn+=" rtc_use_pipewire=false"
+	else
+		myconf_gn+=" use_cups=$(usex cups true false)"
+		myconf_gn+=" use_kerberos=$(usex kerberos true false)"
+		myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
+		myconf_gn+=" use_vaapi=$(usex vaapi true false)"
+		myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
+		myconf_gn+=" gtk_version=$(usex gtk4 4 3)"
+	fi
+
+	# Allows distributions to link pulseaudio directly (DT_NEEDED) instead of
+	# using dlopen. This helps with automated detection of ABI mismatches and
+	# prevents silent errors.
+	if use pulseaudio; then
+		myconf_gn+=" link_pulseaudio=true"
+	fi
+
+	# Non-developer builds of Chromium (for example, non-Chrome browsers, or
+	# Chromium builds provided by Linux distros) should disable the testing config
+	myconf_gn+=" disable_fieldtrial_testing_config=true"
+
+	if use system-toolchain; then
+		myconf_gn+=" use_gold=false"
+	fi
+
+	# The sysroot is the oldest debian image that chromium supports, we don't need it
+	myconf_gn+=" use_sysroot=false"
+
+	# This determines whether or not GN uses the bundled libcxx
+	# default: true
+	if use libcxx || [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
+		myconf_gn+=" use_custom_libcxx=true"
+	else
+		myconf_gn+=" use_custom_libcxx=false"
+	fi
+
+	# Disable pseudolocales, only used for testing
+	myconf_gn+=" enable_pseudolocales=false"
+
+	# Disable code formating of generated files
+	myconf_gn+=" blink_enable_generated_code_formatting=false"
+
+	if use bindist ; then
+		# proprietary_codecs just forces Chromium to say that it can use h264/aac,
+		# the work is still done by ffmpeg. If this is set to no Chromium
+		# won't be able to load the codec even if the library can handle it
+		myconf_gn+=" proprietary_codecs=true"
+		myconf_gn+=" ffmpeg_branding=\"Chrome\""
+		# build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
+		myconf_gn+=" is_component_ffmpeg=true"
+	else
+		ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
+		myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
+		myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
+	fi
+
+	# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
+	# Note: these are for Gentoo use ONLY. For your own distribution,
+	# please get your own set of keys. Feel free to contact chromium@gentoo.org
+	# for more info. The OAuth2 credentials, however, have been left out.
+	# Those OAuth2 credentials have been broken for quite some time anyway.
+	# Instead we apply a patch to use the --oauth2-client-id= and
+	# --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
+	# GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
+	# Chromium without baked-in values.
+	local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
+	myconf_gn+=" google_api_key=\"${google_api_key}\""
+	local myarch="$(tc-arch)"
+
+	# Avoid CFLAGS problems, bug #352457, bug #390147.
+	if ! use custom-cflags; then
+		replace-flags "-Os" "-O2"
+		strip-flags
+
+		# Debug info section overflows without component build
+		# Prevent linker from running out of address space, bug #471810 .
+		filter-flags "-g*"
+
+		# Prevent libvpx/xnnpack build failures. Bug 530248, 544702, 546984, 853646.
+		if [[ ${myarch} == amd64 ]]; then
+			filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
+		fi
+
+		if tc-is-gcc; then
+			# https://bugs.gentoo.org/904455
+			local -x CPP="$(tc-getCXX) -E"
+			# https://bugs.gentoo.org/912381
+			filter-lto
+		fi
+	fi
+
+	if [[ $myarch = amd64 ]] ; then
+		myconf_gn+=" target_cpu=\"x64\""
+		ffmpeg_target_arch=x64
+	elif [[ $myarch = arm64 ]] ; then
+		myconf_gn+=" target_cpu=\"arm64\""
+		ffmpeg_target_arch=arm64
+	elif [[ $myarch = ppc64 ]] ; then
+		myconf_gn+=" target_cpu=\"ppc64\""
+		ffmpeg_target_arch=ppc64
+    elif [[ $myarch = riscv ]] ; then
+        myconf_gn+=" target_cpu=\"riscv64\""
+        ffmpeg_target_arch=riscv64
+	else
+		die "Failed to determine target arch, got '$myarch'."
+	fi
+
+	# Make sure that -Werror doesn't get added to CFLAGS by the build system.
+	# Depending on GCC version the warnings are different and we don't want
+	# the build to fail because of that.
+	myconf_gn+=" treat_warnings_as_errors=false"
+
+	# Disable fatal linker warnings, bug 506268.
+	myconf_gn+=" fatal_linker_warnings=false"
+
+	# Disable external code space for V8 for ppc64. It is disabled for ppc64
+	# by default, but cross-compiling on amd64 enables it again.
+	if tc-is-cross-compiler; then
+		if ! use amd64 && ! use arm64; then
+			myconf_gn+=" v8_enable_external_code_space=false"
+		fi
+	fi
+
+	# Only enabled for clang, but gcc has endian macros too
+	myconf_gn+=" v8_use_libm_trig_functions=true"
+
+	# Bug 491582.
+	export TMPDIR="${WORKDIR}/temp"
+	mkdir -p -m 755 "${TMPDIR}" || die
+
+	# https://bugs.gentoo.org/654216
+	addpredict /dev/dri/ #nowarn
+
+	# Disable unknown warning message from clang.
+	if tc-is-clang; then
+		append-flags -Wno-unknown-warning-option
+		if tc-is-cross-compiler; then
+			export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
+			export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
+		fi
+	fi
+
+	# Explicitly disable ICU data file support for system-icu/headless builds.
+	if use system-icu || use headless; then
+		myconf_gn+=" icu_use_data_file=false"
+	fi
+
+	# Don't need nocompile checks and GN crashes with our config
+	myconf_gn+=" enable_nocompile_tests=false"
+
+	# Enable ozone wayland and/or headless support
+	myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
+	myconf_gn+=" ozone_platform_headless=true"
+	if use headless; then
+		myconf_gn+=" ozone_platform=\"headless\""
+		myconf_gn+=" use_xkbcommon=false use_gtk=false use_qt=false"
+		myconf_gn+=" use_glib=false use_gio=false"
+		myconf_gn+=" use_pangocairo=false use_alsa=false"
+		myconf_gn+=" use_libpci=false use_udev=false"
+		myconf_gn+=" enable_print_preview=false"
+		myconf_gn+=" enable_remoting=false"
+	else
+		myconf_gn+=" use_system_libdrm=true"
+		myconf_gn+=" use_system_minigbm=true"
+		myconf_gn+=" use_xkbcommon=true"
+		if use qt5 || use qt6; then
+			local cbuild_libdir=$(get_libdir)
+			if tc-is-cross-compiler; then
+				# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
+				local cbuild_libdir=$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)
+				cbuild_libdir=${cbuild_libdir:2}
+				cbuild_libdir=${cbuild_libdir/% }
+			fi
+			if use qt5; then
+				if tc-is-cross-compiler; then
+					myconf_gn+=" moc_qt5_path=\"${EPREFIX}/${cbuild_libdir}/qt5/bin\""
+				else
+					myconf_gn+=" moc_qt5_path=\"$(qt5_get_bindir)\""
+				fi
+			fi
+			if use qt6; then
+				myconf_gn+=" moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
+			fi
+
+			myconf_gn+=" use_qt=true"
+			myconf_gn+=" use_qt6=$(usex qt6 true false)"
+		else
+			myconf_gn+=" use_qt=false"
+		fi
+		myconf_gn+=" ozone_platform_x11=$(usex X true false)"
+		myconf_gn+=" ozone_platform_wayland=$(usex wayland true false)"
+		myconf_gn+=" ozone_platform=$(usex wayland \"wayland\" \"x11\")"
+		use wayland && myconf_gn+=" use_system_libffi=true"
+	fi
+
+	# Results in undefined references in chrome linking, may require CFI to work
+	if use arm64; then
+		myconf_gn+=" arm_control_flow_integrity=\"none\""
+	fi
+
+	# Enable official builds
+	myconf_gn+=" is_official_build=$(usex official true false)"
+	myconf_gn+=" use_thin_lto=$(usex lto true false)"
+	myconf_gn+=" thin_lto_enable_optimizations=$(usex lto true false)"
+	if use official; then
+		# Allow building against system libraries in official builds
+		sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+			tools/generate_shim_headers/generate_shim_headers.py || die
+		# Disable CFI: unsupported for GCC, requires clang+lto+lld
+		myconf_gn+=" is_cfi=false"
+		# Don't add symbols to build
+		myconf_gn+=" symbol_level=0"
+	fi
+
+	if use pgo; then
+		myconf_gn+=" chrome_pgo_phase=${1}"
+		if [[ "$1" == "2" ]]; then
+			myconf_gn+=" pgo_data_path=\"${2}\""
+		fi
+	else
+		# Disable PGO
+		myconf_gn+=" chrome_pgo_phase=0"
+	fi
+
+	# user CXXFLAGS might overwrite -march=armv8-a+crc+crypto, bug #851639
+	if use arm64 && tc-is-gcc; then
+		sed -i '/^#if HAVE_ARM64_CRC32C/a #pragma GCC target ("+crc+crypto")' \
+			third_party/crc32c/src/src/crc32c_arm64.cc || die
+	fi
+
+	# skipping typecheck is only supported on amd64, bug #876157
+	if ! use amd64; then
+		myconf_gn+=" devtools_skip_typecheck=false"
+	fi
+
+	einfo "Configuring Chromium ..."
+	set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
+	echo "$@"
+	"$@" || die
+}
+
+src_configure() {
+	chromium_configure $(usex pgo 1 0)
+}
+
+chromium_compile() {
+	# Final link uses lots of file descriptors.
+	ulimit -n 2048
+
+	# Calling this here supports resumption via FEATURES=keepwork
+	python_setup
+
+	# Don't inherit PYTHONPATH from environment, bug #789021, #812689
+	local -x PYTHONPATH=
+
+	# Build mksnapshot and pax-mark it.
+	if use pax-kernel; then
+		local x
+		for x in mksnapshot v8_context_snapshot_generator; do
+			if tc-is-cross-compiler; then
+				eninja -C out/Release "host/${x}"
+				pax-mark m "out/Release/host/${x}"
+			else
+				eninja -C out/Release "${x}"
+				pax-mark m "out/Release/${x}"
+			fi
+		done
+	fi
+
+	# Even though ninja autodetects number of CPUs, we respect
+	# user's options, for debugging with -j 1 or any other reason.
+	eninja -C out/Release chrome chromedriver chrome_sandbox
+
+	pax-mark m out/Release/chrome
+
+	if ! use system-toolchain; then
+		QA_FLAGS_IGNORED="
+			usr/lib64/chromium-browser/chrome
+			usr/lib64/chromium-browser/chrome-sandbox
+			usr/lib64/chromium-browser/chromedriver
+			usr/lib64/chromium-browser/chrome_crashpad_handler
+			usr/lib64/chromium-browser/libEGL.so
+			usr/lib64/chromium-browser/libGLESv2.so
+			usr/lib64/chromium-browser/libVkICD_mock_icd.so
+			usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
+			usr/lib64/chromium-browser/libqt5_shim.so
+			usr/lib64/chromium-browser/libvk_swiftshader.so
+			usr/lib64/chromium-browser/libvulkan.so.1
+		"
+	fi
+}
+
+# This function is called from virtx, and must always return so that Xvfb
+# session isn't left running. If we return 1, virtx will call die().
+chromium_profile() {
+	einfo "Profiling for PGO"
+
+	pushd "${WORKDIR}/chromium-profiler-"* >/dev/null || return 1
+
+	# Remove old profdata in case profiling was interrupted.
+	rm -rf "${1}" || return 1
+
+	if ! "${EPYTHON}" ./chromium_profiler.py \
+		--chrome-executable "${S}/out/Release/chrome" \
+		--chromedriver-executable "${S}/out/Release/chromedriver.unstripped" \
+		--add-arg no-sandbox --add-arg disable-dev-shm-usage \
+		--profile-output "${1}"; then
+		eerror "Profiling failed"
+		return 1
+	fi
+
+	popd >/dev/null || return 1
+}
+
+src_compile() {
+	if use pgo; then
+		local profdata
+
+		profdata="${WORKDIR}/chromium.profdata"
+
+		if [[ ! -e "${WORKDIR}/.pgo-profiled" ]]; then
+			chromium_compile
+			virtx chromium_profile "$profdata"
+
+			touch "${WORKDIR}/.pgo-profiled" || die
+		fi
+
+		if [[ ! -e "${WORKDIR}/.pgo-phase-2-configured" ]]; then
+			# Remove phase 1 output
+			rm -r out/Release || die
+
+			chromium_configure 2 "$profdata"
+
+			touch "${WORKDIR}/.pgo-phase-2-configured" || die
+		fi
+
+		if [[ ! -e "${WORKDIR}/.pgo-phase-2-compiled" ]]; then
+			chromium_compile
+			touch "${WORKDIR}/.pgo-phase-2-compiled" || die
+		fi
+	else
+		chromium_compile
+	fi
+
+	mv out/Release/chromedriver{.unstripped,} || die
+
+	rm -f out/Release/locales/*.pak.info || die
+
+	# Build manpage; bug #684550
+	sed -e 's|@@PACKAGE@@|chromium-browser|g;
+		s|@@MENUNAME@@|Chromium|g;' \
+		chrome/app/resources/manpage.1.in > \
+		out/Release/chromium-browser.1 || die
+
+	# Build desktop file; bug #706786
+	sed -e 's|@@MENUNAME@@|Chromium|g;
+		s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
+		s|@@PACKAGE@@|chromium-browser|g;
+		s|\(^Exec=\)/usr/bin/|\1|g;' \
+		chrome/installer/linux/common/desktop.template > \
+		out/Release/chromium-browser-chromium.desktop || die
+
+	# Build vk_swiftshader_icd.json; bug #827861
+	sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \
+		third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \
+		out/Release/vk_swiftshader_icd.json || die
+}
+
+src_install() {
+	local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
+	exeinto "${CHROMIUM_HOME}"
+	doexe out/Release/chrome
+
+	newexe out/Release/chrome_sandbox chrome-sandbox
+	fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
+
+	doexe out/Release/chromedriver
+	doexe out/Release/chrome_crashpad_handler
+
+	ozone_auto_session () {
+		use X && use wayland && ! use headless && echo true || echo false
+	}
+	local sedargs=( -e
+			"s:/usr/lib/:/usr/$(get_libdir)/:g;
+			s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
+	)
+	sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
+	doexe chromium-launcher.sh
+
+	# It is important that we name the target "chromium-browser",
+	# xdg-utils expect it; bug #355517.
+	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
+	# keep the old symlink around for consistency
+	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
+
+	dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
+
+	# Allow users to override command-line options, bug #357629.
+	insinto /etc/chromium
+	newins "${FILESDIR}/chromium.default" "default"
+
+	pushd out/Release/locales > /dev/null || die
+	chromium_remove_language_paks
+	popd
+
+	insinto "${CHROMIUM_HOME}"
+	doins out/Release/*.bin
+	doins out/Release/*.pak
+
+	if use bindist; then
+		# We built libffmpeg as a component library, but we can't distribute it
+		# with proprietary codec support. Remove it and make a symlink to the requested
+		# system library.
+		rm -f out/Release/libffmpeg.so \
+			|| die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
+		# symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
+		einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
+		dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
+			/usr/$(get_libdir)/chromium-browser/libffmpeg.so
+	fi
+
+	(
+		shopt -s nullglob
+		local files=(out/Release/*.so out/Release/*.so.[0-9])
+		[[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
+	)
+
+	# Install bundled xdg-utils, avoids installing X11 libraries with USE="-X wayland"
+	doins out/Release/xdg-{settings,mime}
+
+	if ! use system-icu && ! use headless; then
+		doins out/Release/icudtl.dat
+	fi
+
+	doins -r out/Release/locales
+	doins -r out/Release/MEIPreload
+
+	# Install vk_swiftshader_icd.json; bug #827861
+	doins out/Release/vk_swiftshader_icd.json
+
+	if [[ -d out/Release/swiftshader ]]; then
+		insinto "${CHROMIUM_HOME}/swiftshader"
+		doins out/Release/swiftshader/*.so
+	fi
+
+	# Install icons
+	local branding size
+	for size in 16 24 32 48 64 128 256 ; do
+		case ${size} in
+			16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
+				*) branding="chrome/app/theme/chromium" ;;
+		esac
+		newicon -s ${size} "${branding}/product_logo_${size}.png" \
+			chromium-browser.png
+	done
+
+	# Install desktop entry
+	domenu out/Release/chromium-browser-chromium.desktop
+
+	# Install GNOME default application entry (bug #303100).
+	insinto /usr/share/gnome-control-center/default-apps
+	newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
+
+	# Install manpage; bug #684550
+	doman out/Release/chromium-browser.1
+	dosym chromium-browser.1 /usr/share/man/man1/chromium.1
+
+	readme.gentoo_create_doc
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+}
+
+pkg_postinst() {
+	xdg_icon_cache_update
+	xdg_desktop_database_update
+	readme.gentoo_print_elog
+
+	if ! use headless; then
+		if use vaapi; then
+			elog "VA-API is disabled by default at runtime. You have to enable it"
+			elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
+			elog "in /etc/chromium/default."
+		fi
+		if use screencast; then
+			elog "Screencast is disabled by default at runtime. Either enable it"
+			elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
+			elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
+			elog "to CHROMIUM_FLAGS in /etc/chromium/default."
+		fi
+		if use gtk4; then
+			elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
+			elog "behavior you need to pass --gtk-version=4, e.g. by adding it"
+			elog "to CHROMIUM_FLAGS in /etc/chromium/default."
+		fi
+		if use qt5 && use qt6; then
+			elog "Chromium automatically selects Qt5 or Qt6 based on your desktop"
+			elog "environment. To override you need to pass --qt-version=5 or"
+			elog "--qt-version=6, e.g. by adding it to CHROMIUM_FLAGS in"
+			elog "/etc/chromium/default."
+		fi
+	fi
+}

diff --git a/www-client/chromium/files/chromium-124-libwebp-shim-sharpyuv.patch b/www-client/chromium/files/chromium-124-libwebp-shim-sharpyuv.patch
new file mode 100644
index 0000000..fa03873
--- /dev/null
+++ b/www-client/chromium/files/chromium-124-libwebp-shim-sharpyuv.patch
@@ -0,0 +1,36 @@
+From 40c466949bd8ccb61cb55655848d23684a9f8a94 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <kangie@gentoo.org>
+Date: Mon, 25 Mar 2024 21:38:35 +1000
+Subject: [PATCH] libwebp shim: add libwebp_sharpyuv target
+
+Signed-off-by: Matt Jolly <Kangie@gentoo.org>
+--- a/build/linux/unbundle/libwebp.gn
++++ b/build/linux/unbundle/libwebp.gn
+@@ -22,14 +22,24 @@ shim_headers("libwebp_shim") {
+     "webp/mux.h",
+     "webp/mux_types.h",
+     "webp/types.h",
++    "webp/sharpyuv/sharpyuv.h",
++    "webp/sharpyuv/sharpyuv_csp.h",
+   ]
+ }
+ 
++source_set("libwebp_sharpyuv") {
++  deps = [ ":libwebp_shim" ]
++  public_configs = [ ":system_libwebp" ]
++}
++
+ source_set("libwebp_webp") {
+   deps = [ ":libwebp_shim" ]
+   public_configs = [ ":system_libwebp" ]
+ }
+ 
+ group("libwebp") {
+-  deps = [ ":libwebp_webp" ]
++  deps = [
++    ":libwebp_webp",
++    ":libwebp_sharpyuv"
++  ]
+ }
+-- 
+2.44.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] proj/riscv:master commit in: www-client/chromium/files/, www-client/chromium/
@ 2024-06-25 23:55 Yixun Lan
  0 siblings, 0 replies; 4+ messages in thread
From: Yixun Lan @ 2024-06-25 23:55 UTC (permalink / raw
  To: gentoo-commits

commit:     a7dfb559023514cba7e10f1808086cfef85a8288
Author:     Andrew Cameron <apcameron <AT> gmail <DOT> com>
AuthorDate: Fri Jun 14 12:58:30 2024 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Jun 25 23:55:10 2024 +0000
URL:        https://gitweb.gentoo.org/proj/riscv.git/commit/?id=a7dfb559

Update Chromium to 126.0.6478.114

Tested on my Visonfive 2

Closes: https://github.com/gentoo/riscv/pull/15
Signed-off-by: Andrew Cameron <apcameron <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 www-client/chromium/Manifest                       |   12 +-
 www-client/chromium/chromium-123.0.6312.105.ebuild | 1453 --------------------
 ...2.122.ebuild => chromium-126.0.6478.114.ebuild} |   68 +-
 ...linking.patch => Debian-fix-rust-linking.patch} |    0
 .../chromium/files/chromium-125-ninja-1-12.patch   |   17 +
 .../chromium-125-oauth2-client-switches.patch      |   45 +
 .../chromium/files/chromium-125-system-zstd.patch  |   53 +
 .../chromium-126-oauth2-client-switches.patch      |   45 +
 .../files/{10cpuinfo.patch => cpuinfo.patch}       |    0
 ...fix-rust-target.patch => fix-rust-target.patch} |    0
 .../{03riscv-dav1d.patch => riscv-dav1d.patch}     |    0
 .../{06riscv-ffmpeg.patch => riscv-ffmpeg.patch}   |  569 +++-----
 .../{05riscv-sandbox.patch => riscv-sandbox.patch} |  451 ++++--
 .../chromium/files/{09riscv.patch => riscv.patch}  |    0
 ...ler.patch => swiftshader-MCDissassembler.patch} |    0
 ...e-llvm16.patch => swiftshader-use-llvm16.patch} |    0
 16 files changed, 744 insertions(+), 1969 deletions(-)

diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index 3786d14..726d054 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -1,9 +1,7 @@
-DIST chromium-123-clang.tar.xz 50178332 BLAKE2B 4b5c4f81a83c7b0c809c93a713e869fde6fe559477665cb3b2f03c62d2175f821b81fb03b0ddd127c6eaf77c41011b4de06561f09a58384153d80fe2b3aa7427 SHA512 17108b9579f16d0da383bd5e41d012f94bcb8445a517ff823aa49b66d3861b0a124b6cce6183fbc64e8050f1ebcd65a9daa2acbda5fdaa42390bfbf4ecb16bd3
-DIST chromium-123-rust.tar.xz 145295100 BLAKE2B ae6603a0e0218e4e39d3e8b7aa48a2cd946c90779dac48be26582926963c8a10a48e3e58fd00a23cb8cd9a3584d9d4a142e843f93c761e862253817635f18c2c SHA512 b4f8dce6d74be4be495d9948d7593ec9664c0b93e87456fab33d3ae5ac0e486a4e8576b26a9ab9890285a7c0d566afb803b98225c0692b6cac9f623a10b954a2
-DIST chromium-123.0.6312.105.tar.xz 3481204616 BLAKE2B 8adbc4a0c96ea53b45b26a48c8eb94e29b31b981471a0d5fda4cdea1f7aa69714a9e5a5729a61a49a92b6322889ee794b4c7ac5e243bc495ff5bd04cdc59f616 SHA512 a1abbba78c96fd7bc44a23b21d8180ebff015d17abcb186dece595513fda9d4443ac67498a78181589884c384a48e6c3abfe72e6ee806fdfc764d05f13fb5cb6
-DIST chromium-123.0.6312.122.tar.xz 3488275388 BLAKE2B 9f7e6c4984a41dbed6849eee08d4f6b8241c86ece0250d67786038980f3d7f208897f42b279c20ffbb965e8e49427ce74e896c34b40390321780b9cc2ba685ce SHA512 23e13d1d5758aa771f4c66e1a55068438e7c4890456dcb0b7a1fc1839b750e612e29d59e744c8b773935757aad01b78a5fecc3e03057a8acbb7e997dbb98f007
-DIST chromium-patches-123.tar.bz2 4697 BLAKE2B 8a7dd76edb23afb7b2f65084696bce5d6e54d63ca34c4590052db1086ed0a422b1efde863c4daad4e2526f329eb65276b9ad5406017cd97fb75b1a9556c1f933 SHA512 ea47255deac1893896f64496629d34c7092f266a175b8400fcf4f01b9d038ae240e911bff488558bb28e6f5795bbcf276adf20ed1e0ccb8ac99f9ddd260742f9
+DIST chromium-126-clang.tar.xz 50615992 BLAKE2B 293709399ddf343ba195cec452974178228ebb72921931ad58136351956b881f8dc0bc8ca740252bcd4971701c9ee8ccc0a33648aee25a5b1cece56e0af6b83f SHA512 7bb2938b1df452585d0ee93da3bcf9c3e64e88e39059a713fe21758df670190b12ca002ef2764dc99efdb4284b4c4b7cde861e2e495d99956c21120a51b8c3dc
+DIST chromium-126-rust.tar.xz 150643432 BLAKE2B d9c827008a2fae07977628beccdf3cf4e5d9bf3c9728e4b2839c8bc86ee2f87844921064e30c067a1b620a3d53cbf54a74053172b1436239332fc668f772924d SHA512 431c0305a81e59da231d56f1b119226b661d7f5a93d0da92afbfc384b0e5be28f282c2911137983298a5369c93b60184d41875ec63b47048a782ee2b1301fc77
+DIST chromium-126.0.6478.114.tar.xz 4167281776 BLAKE2B 4ca720b0280dc6f0aafb5da5d31f97d8d55faec9ac187fc7f3e16e447d147a6912b2b8f26247503390755146e42b32458e4c71a80e6a132cc456f414454ecf53 SHA512 49ca506eb7ac52cdfb5b491bff10deec46d62686feeb3392803eecd61a570ce6c9e6c97d61c79907aaaee39b6d32a4da399c92b8078dbdf2df097f37c757d286
+DIST chromium-patches-126.tar.bz2 4538 BLAKE2B c1f224015618ec908ef09d0c04a2243923371e2caeccd60d93747599fd1434b284291a5b4326008db21749cf78827d5a4b50d22fc805dcd3c1fd86303dc82729 SHA512 6692075adac0379b5f27d1023de1a051cf7f7f7138efd32dfc3af0d501b714142a16daf18022bb46d92218587f364f4dafe9f4aea24f6826e88b0e7cc2be7d0b
 DIST chromium-ppc64le-gentoo-patches-1.tar.xz 5636 BLAKE2B 1d898939df023c59285b27bee552470483ea06375d1ee8d6947b89c5927c23cc7bfec6b49f3b376ece931d11a56f8e2a45791e0f92ad61974fc8c34c1082d89c SHA512 8a71cb007e47cda8e5fe5d185729389e65c48bd322c8ee8b3986bee8571427b959628f2666bda646a3f89ae64197c0957d3626845ff03461dbd5dee4c964d07c
 DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c
-DIST chromium_123.0.6312.105-1raptor0~deb12u1.debian.tar.xz 579484 BLAKE2B 587082358377f7bc0dca0dec83772abb7e040ad894ca4d456a294b7f5c19297acbc5b1dac725d3c1dbaaeefd480328c6c06c607438e560aa6359c1e98c4b1c9c SHA512 6b670a139e284cc96da65ff3c1b3e715cd9b436de2404792d619cfad23e2040fd931e7cc49f0b1ac17e11522804a4c9a621cb943e0dab33fb5bf422e954c5421
-DIST chromium_123.0.6312.86-1raptor0~deb12u1.debian.tar.xz 579124 BLAKE2B a27996211fbed198480e50934e39b0eda4c39e5e78a03f9b290cb90a6c8d7003b6aa828bf35e6744e9d7aa9a922f43baa77d6c9768140baf5749a797c2dad664 SHA512 cfb51fd910f3330100a2dc9ea993d537f126329ff2c590744954a3bfbb712d7bf1d7ad9066628aba5d28c98f2f9b069cf02f8c6048d2ad0a1a376468bdbd9196
+DIST chromium_126.0.6478.56-1raptor0~deb12u2.debian.tar.xz 613448 BLAKE2B 35af65461a5132ac7a28e004f3b8a5e1afc10924726154dd47a23371ebe5508765e0bfd3c1b1d56ff5671039b522536fa21ec22dcb9f14426929a5905976e8a0 SHA512 870b864620e48e6aefa2b36026553b06dde0afc8e8de6cbaf0e4db2333d02164a95fa5f243066e026aa3dff4b3a7366853f49c02f607dec36cec77e4b4683736

diff --git a/www-client/chromium/chromium-123.0.6312.105.ebuild b/www-client/chromium/chromium-123.0.6312.105.ebuild
deleted file mode 100644
index 5388d0d..0000000
--- a/www-client/chromium/chromium-123.0.6312.105.ebuild
+++ /dev/null
@@ -1,1453 +0,0 @@
-# Copyright 2009-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{11..12} )
-PYTHON_REQ_USE="xml(+)"
-
-# PACKAGING NOTES
-
-# Google roll their bundled Clang every two weeks, and the bundled Rust
-# is rolled regularly and depends on that. While we do our best to build
-# with system Clang, we will eventually hit the point where we need to use
-# the bundled Clang due to the use of prerelease features. We've been lucky
-# enough so far that this hasn't been an issue.
-
-# We try and avoid forcing the use of the custom/bundled libcxx, but sometimes
-# it is unavoidable. Remember to force the use of Clang when this is forced.
-
-# GCC is _not_ supported upstream, though patches are welcome. We do our
-# best to enable builds with GCC but reserve the right to force Clang
-# builds if we can't keep up with upstream's changes. Please comment
-# when forcing Clang builds so we can track the need for it.
-
-# GN is bundled with Chromium, but we always use the system version. Remember to
-# check for upstream changes to GN and update ebuild (and version below) as required.
-
-# For binhost users, if USE=bindist is set, we configure Chromium in a way that it is able
-# to use proprietary codecs, and so that ffmpeg is an external component (libffmpeg.so),
-# then we remove ffmpeg from the image to ensure that the built package is distributable
-# (i.e. we don't owe royalties). A suitable libffmpeg.so is symlinked in its place;
-# as a result of this, ffmpeg[chromium] or ffmpeg-chromium must be installed on the system.
-
-# For non-binhost builds, we build the bundled ffmpeg and enable proprietary codecs because there's
-# no reason not to. Todo: Re-enable USE=system-ffmpeg.
-
-# These variables let us easily bound supported major dependency versions in one place.
-GCC_MIN_VER=12
-GN_MIN_VER=0.2154
-# Since Google use prerelease llvm we can let any adventurous users try to build with prerelease
-# ebuilds; try to keep this up to date with the latest version in the tree.
-LLVM_MAX_SLOT=19
-LLVM_MIN_SLOT=17
-RUST_MIN_VER=1.72.0
-# chromium-tools/get-chromium-toolchain-strings.sh
-GOOGLE_CLANG_VER=llvmorg-19-init-2319-g7c4c2746-1
-GOOGLE_RUST_VER=340bb19fea20fd5f9357bbfac542fad84fc7ea2b-3
-
-# https://bugs.chromium.org/p/v8/issues/detail?id=14449 - V8 used in 120 can't build with GCC
-# Resolved upstream, requires testing and some backporting I'm sure
-: ${CHROMIUM_FORCE_CLANG=yes}
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101227 - Chromium 120:
-#    webrtc -  no matching member function for call to 'emplace'
-: ${CHROMIUM_FORCE_LIBCXX=yes}
-# 121's 'gcc_link_wrapper.py' currently fails if not using lld due to the addition of rust
-: ${CHROMIUM_FORCE_LLD=yes}
-
-: ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN=no}
-
-VIRTUALX_REQUIRED="pgo"
-
-CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he
-	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
-	sv sw ta te th tr uk ur vi zh-CN zh-TW"
-
-inherit check-reqs chromium-2 desktop flag-o-matic llvm ninja-utils pax-utils
-inherit python-any-r1 qmake-utils readme.gentoo-r1 toolchain-funcs virtualx xdg-utils
-
-DESCRIPTION="Open-source version of Google Chrome web browser"
-HOMEPAGE="https://www.chromium.org/"
-PATCHSET_PPC64="123.0.6312.86-1raptor0~deb12u1"
-PATCH_V="${PV%%\.*}"
-SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
-	system-toolchain? (
-		https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
-	)
-	!system-toolchain? (
-		https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${GOOGLE_CLANG_VER}.tar.xz
-			-> chromium-${PV%%\.*}-clang.tar.xz
-		https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${GOOGLE_RUST_VER}-${GOOGLE_CLANG_VER%??}.tar.xz
-			-> chromium-${PV%%\.*}-rust.tar.xz
-	)
-	ppc64? (
-		https://quickbuild.io/~raptor-engineering-public/+archive/ubuntu/chromium/+files/chromium_${PATCHSET_PPC64}.debian.tar.xz
-		https://deps.gentoo.zip/chromium-ppc64le-gentoo-patches-1.tar.xz
-	)
-	pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )"
-
-LICENSE="BSD"
-SLOT="0/stable"
-KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
-IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd"
-IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos libcxx lto +official pax-kernel pgo +proprietary-codecs pulseaudio"
-IUSE+=" qt5 qt6 +screencast selinux +system-toolchain +vaapi +wayland +widevine"
-RESTRICT="!bindist? ( bindist )"
-
-REQUIRED_USE="
-	!headless? ( || ( X wayland ) )
-	pgo? ( X !wayland )
-	qt6? ( qt5 )
-	screencast? ( wayland )
-	!system-toolchain? ( libcxx )
-	ffmpeg-chromium? ( bindist proprietary-codecs )
-"
-
-COMMON_X_DEPEND="
-	x11-libs/libXcomposite:=
-	x11-libs/libXcursor:=
-	x11-libs/libXdamage:=
-	x11-libs/libXfixes:=
-	>=x11-libs/libXi-1.6.0:=
-	x11-libs/libXrandr:=
-	x11-libs/libXrender:=
-	x11-libs/libXtst:=
-	x11-libs/libxshmfence:=
-"
-
-COMMON_SNAPSHOT_DEPEND="
-	system-icu? ( >=dev-libs/icu-71.1:= )
-	>=dev-libs/libxml2-2.12.4:=[icu]
-	dev-libs/nspr:=
-	>=dev-libs/nss-3.26:=
-	dev-libs/libxslt:=
-	media-libs/fontconfig:=
-	>=media-libs/freetype-2.11.0-r1:=
-	system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] )
-	media-libs/libjpeg-turbo:=
-	system-png? ( media-libs/libpng:=[-apng(-)] )
-	system-zstd? ( >=app-arch/zstd-1.5.5:= )
-	>=media-libs/libwebp-0.4.0:=
-	media-libs/mesa:=[gbm(+)]
-	>=media-libs/openh264-1.6.0:=
-	sys-libs/zlib:=
-	x11-libs/libdrm:=
-	!headless? (
-		dev-libs/glib:2
-		>=media-libs/alsa-lib-1.0.19:=
-		pulseaudio? ( media-libs/libpulse:= )
-		sys-apps/pciutils:=
-		kerberos? ( virtual/krb5 )
-		vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] )
-		X? (
-			x11-libs/libX11:=
-			x11-libs/libXext:=
-			x11-libs/libxcb:=
-		)
-		x11-libs/libxkbcommon:=
-		wayland? (
-			dev-libs/libffi:=
-			dev-libs/wayland:=
-			screencast? ( media-video/pipewire:= )
-		)
-	)
-"
-
-COMMON_DEPEND="
-	${COMMON_SNAPSHOT_DEPEND}
-	app-arch/bzip2:=
-	dev-libs/expat:=
-	net-misc/curl[ssl]
-	sys-apps/dbus:=
-	media-libs/flac:=
-	sys-libs/zlib:=[minizip]
-	!headless? (
-		X? ( ${COMMON_X_DEPEND} )
-		>=app-accessibility/at-spi2-core-2.46.0:2
-		media-libs/mesa:=[X?,wayland?]
-		cups? ( >=net-print/cups-1.3.11:= )
-		virtual/udev
-		x11-libs/cairo:=
-		x11-libs/gdk-pixbuf:2
-		x11-libs/pango:=
-		qt5? (
-			dev-qt/qtcore:5
-			dev-qt/qtwidgets:5
-		)
-		qt6? ( dev-qt/qtbase:6[gui,widgets] )
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	!headless? (
-		|| (
-			x11-libs/gtk+:3[X?,wayland?]
-			gui-libs/gtk:4[X?,wayland?]
-		)
-		qt5? ( dev-qt/qtgui:5[X?,wayland?] )
-		qt6? ( dev-qt/qtbase:6[X?,wayland?] )
-	)
-	virtual/ttf-fonts
-	selinux? ( sec-policy/selinux-chromium )
-	bindist? (
-		!ffmpeg-chromium? ( >=media-video/ffmpeg-6.1-r1:0/58.60.60[chromium] )
-		ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} )
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	!headless? (
-		gtk4? ( gui-libs/gtk:4[X?,wayland?] )
-		!gtk4? ( x11-libs/gtk+:3[X?,wayland?] )
-	)
-"
-
-depend_clang_llvm_version() {
-	echo "sys-devel/clang:$1"
-	echo "sys-devel/llvm:$1"
-	echo "=sys-devel/lld-$1*"
-}
-
-# When passed multiple arguments we assume that
-# we want a range of versions, inclusive.
-depend_clang_llvm_versions() {
-	local _v
-	if [[ $# -eq 1 ]]; then
-		depend_clang_llvm_version "$1"
-	elif [[ $# -eq 2 ]]; then
-		if [[ $1 -eq $2 ]]; then
-			depend_clang_llvm_version "$1"
-		fi
-		echo "|| ("
-		for ((i=$1; i<=$2; i++)); do
-			echo "("
-			depend_clang_llvm_version "${i}"
-			echo ")"
-		done
-		echo ")"
-	else
-		die "depend_clang_llvm_versions() requires 1 or 2 arguments"
-	fi
-}
-
-BDEPEND="
-	${COMMON_SNAPSHOT_DEPEND}
-	${PYTHON_DEPS}
-	$(python_gen_any_dep '
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	')
-	>=app-arch/gzip-1.7
-	!headless? (
-		qt5? ( dev-qt/qtcore:5 )
-		qt6? ( dev-qt/qtbase:6 )
-	)
-	system-toolchain? (
-		libcxx? ( >=sys-devel/clang-${LLVM_MIN_SLOT} )
-		lto? ( $(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT}) )
-		pgo? (
-			>=dev-python/selenium-3.141.0
-			>=dev-util/web_page_replay_go-20220314
-			$(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT})
-		)
-		>=virtual/rust-${RUST_MIN_VER}[profiler(-)]
-	)
-	>=dev-build/gn-${GN_MIN_VER}
-	dev-lang/perl
-	>=dev-build/ninja-1.7.2
-	>=dev-util/gperf-3.0.3
-	dev-vcs/git
-	>=net-libs/nodejs-7.6.0[inspector]
-	>=sys-devel/bison-2.4.3
-	sys-devel/flex
-	virtual/pkgconfig
-"
-
-if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then
-	BDEPEND+="system-toolchain? ( >=sys-devel/clang-${LLVM_MIN_SLOT} ) "
-fi
-
-if [[ ${CHROMIUM_FORCE_LLD} == yes ]]; then
-	BDEPEND+="system-toolchain? ( >=sys-devel/lld-${LLVM_MIN_SLOT} ) "
-else
-	# #918897: Hack for arm64
-	BDEPEND+=" arm64? ( >=sys-devel/lld-${LLVM_MIN_SLOT} )"
-fi
-
-if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then
-	EBUILD_DEATH_HOOKS+=" chromium_pkg_die";
-fi
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Some web pages may require additional fonts to display properly.
-Try installing some of the following packages if some characters
-are not displayed properly:
-- media-fonts/arphicfonts
-- media-fonts/droid
-- media-fonts/ipamonafont
-- media-fonts/noto
-- media-fonts/ja-ipafonts
-- media-fonts/takao-fonts
-- media-fonts/wqy-microhei
-- media-fonts/wqy-zenhei
-
-To fix broken icons on the Downloads page, you should install an icon
-theme that covers the appropriate MIME types, and configure this as your
-GTK+ icon theme.
-
-For native file dialogs in KDE, install kde-apps/kdialog.
-
-To make password storage work with your desktop environment you may
-have install one of the supported credentials management applications:
-- app-crypt/libsecret (GNOME)
-- kde-frameworks/kwallet (KDE)
-If you have one of above packages installed, but don't want to use
-them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS
-in /etc/chromium/default.
-"
-
-python_check_deps() {
-	python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
-}
-
-needs_clang() {
-	[[ ${CHROMIUM_FORCE_CLANG} == yes ]] || use libcxx || use lto || use pgo
-}
-
-needs_lld() {
-	# #641556: Force lld for lto and pgo builds, otherwise disable
-	# #918897: Temporary hack w/ use arm64
-	[[ ${CHROMIUM_FORCE_LLD} == yes ]] || use lto || use pgo || use arm64
-}
-
-llvm_check_deps() {
-	if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
-		einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
-		return 1
-	fi
-
-	if ( use lto || use pgo ) && ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
-		einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
-		return 1
-	fi
-
-	einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
-}
-
-pre_build_checks() {
-	# Check build requirements: bugs #471810, #541816, #914220
-	# We're going to start doing maths here on the size of an unpacked source tarball,
-	# this should make updates easier as chromium continues to balloon in size.
-	local BASE_DISK=18
-	local EXTRA_DISK=1
-	local CHECKREQS_MEMORY="4G"
-	tc-is-cross-compiler && EXTRA_DISK=2
-	if use lto || use pgo; then
-		CHECKREQS_MEMORY="9G"
-		tc-is-cross-compiler && EXTRA_DISK=4
-		use pgo && EXTRA_DISK=8
-	fi
-	if is-flagq '-g?(gdb)?([1-9])'; then
-		if use custom-cflags; then
-			EXTRA_DISK=13
-		fi
-		CHECKREQS_MEMORY="16G"
-	fi
-	CHECKREQS_DISK_BUILD="$((BASE_DISK + EXTRA_DISK))G"
-	check-reqs_${EBUILD_PHASE_FUNC}
-}
-
-pkg_pretend() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		# The pre_build_checks are all about compilation resources, no need to run it for a binpkg
-		pre_build_checks
-	fi
-
-	if use headless; then
-		local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt5" "qt6" "vaapi" "wayland")
-		for myiuse in ${headless_unused_flags[@]}; do
-			use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
-		done
-	fi
-
-	if ! use bindist && use ffmpeg-chromium; then
-		ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
-	fi
-}
-
-pkg_setup() {
-	if [[ ${MERGE_TYPE} != binary ]]; then
-		# The pre_build_checks are all about compilation resources, no need to run it for a binpkg
-		pre_build_checks
-
-		if use system-toolchain; then
-			local -x CPP="$(tc-getCXX) -E"
-			if tc-is-gcc && ! ver_test "$(gcc-version)" -ge ${GCC_MIN_VER}; then
-				die "At least gcc ${GCC_MIN_VER} is required"
-			fi
-			if use pgo && tc-is-cross-compiler; then
-				die "The pgo USE flag cannot be used when cross-compiling"
-			fi
-			if needs_clang && ! tc-is-clang; then
-				if tc-is-cross-compiler; then
-					CPP="${CBUILD}-clang++ -E"
-				else
-					CPP="${CHOST}-clang++ -E"
-				fi
-			fi
-			if needs_clang || tc-is-clang; then
-				if ver_test "$(clang-major-version)" -lt ${LLVM_MIN_SLOT}; then
-					die "At least Clang ${LLVM_MIN_SLOT} is required"
-				fi
-				# Ideally we never see this, but it should help prevent bugs like 927154
-				if ver_test "$(clang-major-version)" -gt ${LLVM_MAX_SLOT}; then
-					die "Clang $(clang-major-version) is too new; ${LLVM_MAX_SLOT} is the highest supported version"
-				fi
-			fi
-		fi
-		# Users should never hit this, it's purely a development convenience
-		if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then
-			die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
-		fi
-	fi
-
-	chromium_suid_sandbox_check_kernel_config
-}
-
-src_prepare() {
-	# Calling this here supports resumption via FEATURES=keepwork
-	python_setup
-
-	# disable global media controls, crashes with libstdc++
-	sed -i -e \
-		"/\"GlobalMediaControlsCastStartStop\"/,+4{s/ENABLED/DISABLED/;}" \
-		"chrome/browser/media/router/media_router_feature.cc" || die
-
-	local PATCHES=(
-		"${FILESDIR}/chromium-cross-compile.patch"
-		"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
-		"${FILESDIR}/chromium-109-system-zlib.patch"
-		"${FILESDIR}/chromium-111-InkDropHost-crash.patch"
-		"${FILESDIR}/chromium-117-system-zstd.patch"
-		"${FILESDIR}/chromium-124-libwebp-shim-sharpyuv.patch"
-        "${FILESDIR}/00swiftshader-MCDissassembler.patch"
-        "${FILESDIR}/00swiftshader-use-llvm16.patch"
-        "${FILESDIR}/01fix-rust-target.patch"
-        "${FILESDIR}/02Debian-fix-rust-linking.patch"
-        "${FILESDIR}/03riscv-dav1d.patch"
-        "${FILESDIR}/05riscv-sandbox.patch"
-        "${FILESDIR}/06riscv-ffmpeg.patch"
-        "${FILESDIR}/09riscv.patch"
-        "${FILESDIR}/10cpuinfo.patch"
-	)
-
-	if use system-toolchain; then
-		# The patchset is really only required if we're using the system-toolchain
-		PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}" )
-		# We can't use the bundled compiler builtins
-		sed -i -e \
-			"/if (is_clang && toolchain_has_rust) {/,+2d" \
-			build/config/compiler/BUILD.gn || die "Failed to disable bundled compiler builtins"
-	else
-		mkdir -p third_party/llvm-build/Release+Asserts || die "Failed to bundle llvm"
-		ln -s "${WORKDIR}"/bin third_party/llvm-build/Release+Asserts/bin || die "Failed to symlink llvm bin"
-		ln -s "${WORKDIR}"/lib third_party/llvm-build/Release+Asserts/lib || die "Failed to symlink llvm lib"
-		echo "${GOOGLE_CLANG_VER}" > third_party/llvm-build/Release+Asserts/cr_build_revision || \
-			die "Failed to set clang version"
-		ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust"
-		cp "${WORKDIR}"/rust-toolchain/VERSION \
-			"${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version"
-	fi
-
-	if use ppc64 ; then
-		local p
-		for p in $(grep -v "^#" "${WORKDIR}"/debian/patches/series | grep "^ppc64le" || die); do
-			if [[ ! $p =~ "fix-breakpad-compile.patch" ]]; then
-				eapply "${WORKDIR}/debian/patches/${p}"
-			fi
-		done
-		PATCHES+=( "${WORKDIR}/ppc64le" )
-		PATCHES+=( "${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" )
-	fi
-
-	default
-
-	mkdir -p third_party/node/linux/node-linux-x64/bin || die
-	ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die
-
-	# adjust python interpreter version
-	sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die
-
-	local keeplibs=(
-		base/third_party/cityhash
-		base/third_party/double_conversion
-		base/third_party/dynamic_annotations
-		base/third_party/icu
-		base/third_party/nspr
-		base/third_party/superfasthash
-		base/third_party/symbolize
-		base/third_party/valgrind
-		base/third_party/xdg_user_dirs
-		buildtools/third_party/libc++
-		buildtools/third_party/libc++abi
-		chrome/third_party/mozilla_security_manager
-		courgette/third_party
-		net/third_party/mozilla_security_manager
-		net/third_party/nss
-		net/third_party/quic
-		net/third_party/uri_template
-		third_party/abseil-cpp
-		third_party/angle
-		third_party/angle/src/common/third_party/xxhash
-		third_party/angle/src/third_party/ceval
-		third_party/angle/src/third_party/libXNVCtrl
-		third_party/angle/src/third_party/volk
-		third_party/anonymous_tokens
-		third_party/apple_apsl
-		third_party/axe-core
-		third_party/blink
-		third_party/bidimapper
-		third_party/boringssl
-		third_party/boringssl/src/third_party/fiat
-		third_party/breakpad
-		third_party/breakpad/breakpad/src/third_party/curl
-		third_party/brotli
-		third_party/catapult
-		third_party/catapult/common/py_vulcanize/third_party/rcssmin
-		third_party/catapult/common/py_vulcanize/third_party/rjsmin
-		third_party/catapult/third_party/beautifulsoup4-4.9.3
-		third_party/catapult/third_party/html5lib-1.1
-		third_party/catapult/third_party/polymer
-		third_party/catapult/third_party/six
-		third_party/catapult/tracing/third_party/d3
-		third_party/catapult/tracing/third_party/gl-matrix
-		third_party/catapult/tracing/third_party/jpeg-js
-		third_party/catapult/tracing/third_party/jszip
-		third_party/catapult/tracing/third_party/mannwhitneyu
-		third_party/catapult/tracing/third_party/oboe
-		third_party/catapult/tracing/third_party/pako
-		third_party/ced
-		third_party/cld_3
-		third_party/closure_compiler
-		third_party/content_analysis_sdk
-		third_party/cpuinfo
-		third_party/crashpad
-		third_party/crashpad/crashpad/third_party/lss
-		third_party/crashpad/crashpad/third_party/zlib
-		third_party/crc32c
-		third_party/cros_system_api
-		third_party/d3
-		third_party/dav1d
-		third_party/dawn
-		third_party/dawn/third_party/gn/webgpu-cts
-		third_party/dawn/third_party/khronos
-		third_party/depot_tools
-		third_party/devscripts
-		third_party/devtools-frontend
-		third_party/devtools-frontend/src/front_end/third_party/acorn
-		third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json
-		third_party/devtools-frontend/src/front_end/third_party/axe-core
-		third_party/devtools-frontend/src/front_end/third_party/chromium
-		third_party/devtools-frontend/src/front_end/third_party/codemirror
-		third_party/devtools-frontend/src/front_end/third_party/csp_evaluator
-		third_party/devtools-frontend/src/front_end/third_party/diff
-		third_party/devtools-frontend/src/front_end/third_party/i18n
-		third_party/devtools-frontend/src/front_end/third_party/intl-messageformat
-		third_party/devtools-frontend/src/front_end/third_party/lighthouse
-		third_party/devtools-frontend/src/front_end/third_party/lit
-		third_party/devtools-frontend/src/front_end/third_party/lodash-isequal
-		third_party/devtools-frontend/src/front_end/third_party/marked
-		third_party/devtools-frontend/src/front_end/third_party/puppeteer
-		third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt
-		third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
-		third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
-		third_party/devtools-frontend/src/front_end/third_party/wasmparser
-		third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
-		third_party/devtools-frontend/src/third_party
-		third_party/distributed_point_functions
-		third_party/dom_distiller_js
-		third_party/eigen3
-		third_party/emoji-segmenter
-		third_party/farmhash
-		third_party/fdlibm
-		third_party/ffmpeg
-		third_party/fft2d
-		third_party/flatbuffers
-		third_party/fp16
-		third_party/freetype
-		third_party/fusejs
-		third_party/fxdiv
-		third_party/highway
-		third_party/liburlpattern
-		third_party/libzip
-		third_party/lit
-		third_party/gemmlowp
-		third_party/google_input_tools
-		third_party/google_input_tools/third_party/closure_library
-		third_party/google_input_tools/third_party/closure_library/third_party/closure
-		third_party/googletest
-		third_party/hunspell
-		third_party/iccjpeg
-		third_party/inspector_protocol
-		third_party/ipcz
-		third_party/jinja2
-		third_party/jsoncpp
-		third_party/jstemplate
-		third_party/khronos
-		third_party/leveldatabase
-		third_party/libaddressinput
-		third_party/libaom
-		third_party/libaom/source/libaom/third_party/fastfeat
-		third_party/libaom/source/libaom/third_party/SVT-AV1
-		third_party/libaom/source/libaom/third_party/vector
-		third_party/libaom/source/libaom/third_party/x86inc
-		third_party/libavif
-		third_party/libevent
-		third_party/libgav1
-		third_party/libjingle
-		third_party/libphonenumber
-		third_party/libsecret
-		third_party/libsrtp
-		third_party/libsync
-		third_party/libudev
-		third_party/libva_protected_content
-		third_party/libvpx
-		third_party/libvpx/source/libvpx/third_party/x86inc
-		third_party/libwebm
-		third_party/libx11
-		third_party/libxcb-keysyms
-		third_party/libxml/chromium
-		third_party/libyuv
-		third_party/lottie
-		third_party/lss
-		third_party/lzma_sdk
-		third_party/mako
-		third_party/maldoca
-		third_party/maldoca/src/third_party/tensorflow_protos
-		third_party/maldoca/src/third_party/zlibwrapper
-		third_party/markupsafe
-		third_party/material_color_utilities
-		third_party/mesa
-		third_party/metrics_proto
-		third_party/minigbm
-		third_party/modp_b64
-		third_party/nasm
-		third_party/nearby
-		third_party/neon_2_sse
-		third_party/node
-		third_party/omnibox_proto
-		third_party/one_euro_filter
-		third_party/openscreen
-		third_party/openscreen/src/third_party/
-		third_party/openscreen/src/third_party/tinycbor/src/src
-		third_party/opus
-		third_party/ots
-		third_party/pdfium
-		third_party/pdfium/third_party/agg23
-		third_party/pdfium/third_party/base
-		third_party/pdfium/third_party/bigint
-		third_party/pdfium/third_party/freetype
-		third_party/pdfium/third_party/lcms
-		third_party/pdfium/third_party/libopenjpeg
-		third_party/pdfium/third_party/libtiff
-		third_party/perfetto
-		third_party/perfetto/protos/third_party/chromium
-		third_party/pffft
-		third_party/ply
-		third_party/polymer
-		third_party/private-join-and-compute
-		third_party/private_membership
-		third_party/protobuf
-		third_party/pthreadpool
-		third_party/puffin
-		third_party/pyjson5
-		third_party/pyyaml
-		third_party/qcms
-		third_party/re2
-		third_party/rnnoise
-		third_party/rust
-		third_party/s2cellid
-		third_party/securemessage
-		third_party/selenium-atoms
-		third_party/shell-encryption
-		third_party/simplejson
-		third_party/skia
-		third_party/skia/include/third_party/vulkan
-		third_party/skia/third_party/vulkan
-		third_party/smhasher
-		third_party/snappy
-		third_party/sqlite
-		third_party/swiftshader
-		third_party/swiftshader/third_party/astc-encoder
-		third_party/swiftshader/third_party/llvm-subzero
-		third_party/swiftshader/third_party/marl
-		third_party/swiftshader/third_party/subzero
-		third_party/swiftshader/third_party/SPIRV-Headers/include/spirv
-		third_party/swiftshader/third_party/SPIRV-Tools
-		third_party/tensorflow_models
-		third_party/tensorflow-text
-		third_party/tflite
-		third_party/tflite/src/third_party/eigen3
-		third_party/tflite/src/third_party/fft2d
-		third_party/tflite/src/third_party/xla/third_party/tsl
-		third_party/ruy
-		third_party/six
-		third_party/ukey2
-		third_party/unrar
-		third_party/utf
-		third_party/vulkan
-		third_party/wayland
-		third_party/webdriver
-		third_party/webgpu-cts
-		third_party/webrtc
-		third_party/webrtc/common_audio/third_party/ooura
-		third_party/webrtc/common_audio/third_party/spl_sqrt_floor
-		third_party/webrtc/modules/third_party/fft
-		third_party/webrtc/modules/third_party/g711
-		third_party/webrtc/modules/third_party/g722
-		third_party/webrtc/rtc_base/third_party/base64
-		third_party/webrtc/rtc_base/third_party/sigslot
-		third_party/widevine
-		third_party/woff2
-		third_party/wuffs
-		third_party/x11proto
-		third_party/xcbproto
-		third_party/xnnpack
-		third_party/zxcvbn-cpp
-		third_party/zlib/google
-		url/third_party/mozilla
-		v8/src/third_party/siphash
-		v8/src/third_party/valgrind
-		v8/src/third_party/utf8-decoder
-		v8/third_party/glibc
-		v8/third_party/inspector_protocol
-		v8/third_party/v8
-
-		# gyp -> gn leftovers
-		third_party/speech-dispatcher
-		third_party/usb_ids
-		third_party/xdg-utils
-	)
-
-	# USE=system-*
-	if ! use system-harfbuzz; then
-		keeplibs+=( third_party/harfbuzz-ng )
-	fi
-
-	if ! use system-icu; then
-		keeplibs+=( third_party/icu )
-	fi
-
-	if ! use system-png; then
-		keeplibs+=( third_party/libpng )
-	fi
-
-	if ! use system-zstd; then
-		keeplibs+=( third_party/zstd )
-	fi
-
-	if use libcxx || [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
-		keeplibs+=( third_party/libc++ )
-	fi
-
-	if ! use system-toolchain || [[ ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN} == yes ]]; then
-			keeplibs+=( third_party/llvm )
-	fi
-
-	# Arch-specific
-	if use arm64 || use ppc64 ; then
-		keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 )
-	fi
-	if use riscv  ; then
-		keeplibs+=( third_party/swiftshader/third_party/llvm-16.0 )
-	fi
-	# we need to generate ppc64 stuff because upstream does not ship it yet
-	# it has to be done before unbundling.
-	if use ppc64; then
-		pushd third_party/libvpx >/dev/null || die
-		mkdir -p source/config/linux/ppc64 || die
-		# requires git and clang, bug #832803
-		# Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh
-		# and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh
-		# since we're not in a git repo
-		sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \
-			generate_gni.sh || die
-		./generate_gni.sh || die
-		popd >/dev/null || die
-
-		pushd third_party/ffmpeg >/dev/null || die
-		cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die
-		cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die
-		popd >/dev/null || die
-	fi
-
-	einfo "Unbundling third-party libraries ..."
-	# Remove most bundled libraries. Some are still needed.
-	build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
-
-	# bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries
-	mkdir -p buildtools/third_party/eu-strip/bin || die
-	ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
-}
-
-chromium_rust_version_check() {
-	[[ ${MERGE_TYPE} == binary ]] && return
-	local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
-	rustc_version=${rustc_version[0]#rust-bin-}
-	rustc_version=${rustc_version#rust-}
-
-	[[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
-
-	echo $rustc_version
-}
-
-chromium_configure() {
-	# Calling this here supports resumption via FEATURES=keepwork
-	python_setup
-
-	local myconf_gn=""
-
-	if use system-toolchain && [[ ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN} == no ]]; then
-		# Make sure the build system will use the right tools, bug #340795.
-		tc-export AR CC CXX NM
-
-		if needs_clang && ! tc-is-clang; then
-			# Force clang since gcc is either broken or build is using libcxx.
-			if tc-is-cross-compiler; then
-				CC="${CBUILD}-clang -target ${CHOST} --sysroot ${ESYSROOT}"
-				CXX="${CBUILD}-clang++ -target ${CHOST} --sysroot ${ESYSROOT}"
-				BUILD_CC=${CBUILD}-clang
-				BUILD_CXX=${CBUILD}-clang++
-			else
-				CC=${CHOST}-clang
-				CXX=${CHOST}-clang++
-			fi
-			strip-unsupported-flags
-		fi
-
-		if tc-is-clang; then
-			myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
-		else
-			myconf_gn+=" is_clang=false"
-		fi
-
-		if needs_lld ; then
-			# https://bugs.gentoo.org/918897#c32
-			append-ldflags -Wl,--undefined-version
-			myconf_gn+=" use_lld=true"
-		else
-			# This doesn't prevent lld from being used, but rather prevents gn from forcing it
-			myconf_gn+=" use_lld=false"
-		fi
-
-		if use lto; then
-			AR=llvm-ar
-			NM=llvm-nm
-			if tc-is-cross-compiler; then
-				BUILD_AR=llvm-ar
-				BUILD_NM=llvm-nm
-			fi
-		fi
-
-		myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\""
-
-		if tc-is-cross-compiler; then
-			tc-export BUILD_{AR,CC,CXX,NM}
-			myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\""
-			myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\""
-			myconf_gn+=" pkg_config=\"$(tc-getPKG_CONFIG)\""
-			myconf_gn+=" host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\""
-
-			# setup cups-config, build system only uses --libs option
-			if use cups; then
-				mkdir "${T}/cups-config" || die
-				cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die
-				export PATH="${PATH}:${T}/cups-config"
-			fi
-
-			# Don't inherit PKG_CONFIG_PATH from environment
-			local -x PKG_CONFIG_PATH=
-		else
-			myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\""
-		fi
-
-		local rustc_ver
-		rustc_ver=$(chromium_rust_version_check)
-		if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then
-				eerror "Rust >=${RUST_MIN_VER} is required"
-				eerror "Please run 'eselect rust' and select the correct rust version"
-				die "Selected rust version is too old"
-		else
-				einfo "Using rust ${rustc_ver} to build"
-		fi
-		if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then
-				myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\""
-		else
-				myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\""
-		fi
-		myconf_gn+=" rustc_version=\"${rustc_ver}\""
-	fi
-
-	# GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
-	myconf_gn+=" is_debug=false"
-
-	# enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138.
-	# DCHECK is fatal by default, make it configurable at runtime, #bug 807881.
-	myconf_gn+=" dcheck_always_on=$(usex debug true false)"
-	myconf_gn+=" dcheck_is_configurable=$(usex debug true false)"
-
-	# Component build isn't generally intended for use by end users. It's mostly useful
-	# for development and debugging.
-	myconf_gn+=" is_component_build=false"
-
-	# Disable nacl, we can't build without pnacl (http://crbug.com/269560).
-	myconf_gn+=" enable_nacl=false"
-
-	# Use system-provided libraries.
-	# TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733).
-	# TODO: use_system_hunspell (upstream changes needed).
-	# TODO: use_system_protobuf (bug #525560).
-	# TODO: use_system_sqlite (http://crbug.com/22208).
-
-	# libevent: https://bugs.gentoo.org/593458
-	local gn_system_libraries=(
-		flac
-		fontconfig
-		freetype
-		# Need harfbuzz_from_pkgconfig target
-		#harfbuzz-ng
-		libdrm
-		libjpeg
-		libwebp
-		libxml
-		libxslt
-		openh264
-		zlib
-	)
-	if use system-icu; then
-		gn_system_libraries+=( icu )
-	fi
-	if use system-png; then
-		gn_system_libraries+=( libpng )
-	fi
-	if use system-zstd; then
-		gn_system_libraries+=( zstd )
-	fi
-
-	build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
-
-	# See dependency logic in third_party/BUILD.gn
-	myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)"
-
-	# Optional dependencies.
-	myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)"
-	myconf_gn+=" enable_widevine=$(usex widevine true false)"
-
-	if use headless; then
-		myconf_gn+=" use_cups=false"
-		myconf_gn+=" use_kerberos=false"
-		myconf_gn+=" use_pulseaudio=false"
-		myconf_gn+=" use_vaapi=false"
-		myconf_gn+=" rtc_use_pipewire=false"
-	else
-		myconf_gn+=" use_cups=$(usex cups true false)"
-		myconf_gn+=" use_kerberos=$(usex kerberos true false)"
-		myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)"
-		myconf_gn+=" use_vaapi=$(usex vaapi true false)"
-		myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)"
-		myconf_gn+=" gtk_version=$(usex gtk4 4 3)"
-	fi
-
-	# Allows distributions to link pulseaudio directly (DT_NEEDED) instead of
-	# using dlopen. This helps with automated detection of ABI mismatches and
-	# prevents silent errors.
-	if use pulseaudio; then
-		myconf_gn+=" link_pulseaudio=true"
-	fi
-
-	# Non-developer builds of Chromium (for example, non-Chrome browsers, or
-	# Chromium builds provided by Linux distros) should disable the testing config
-	myconf_gn+=" disable_fieldtrial_testing_config=true"
-
-	if use system-toolchain; then
-		myconf_gn+=" use_gold=false"
-	fi
-
-	# The sysroot is the oldest debian image that chromium supports, we don't need it
-	myconf_gn+=" use_sysroot=false"
-
-	# This determines whether or not GN uses the bundled libcxx
-	# default: true
-	if use libcxx || [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then
-		myconf_gn+=" use_custom_libcxx=true"
-	else
-		myconf_gn+=" use_custom_libcxx=false"
-	fi
-
-	# Disable pseudolocales, only used for testing
-	myconf_gn+=" enable_pseudolocales=false"
-
-	# Disable code formating of generated files
-	myconf_gn+=" blink_enable_generated_code_formatting=false"
-
-	if use bindist ; then
-		# proprietary_codecs just forces Chromium to say that it can use h264/aac,
-		# the work is still done by ffmpeg. If this is set to no Chromium
-		# won't be able to load the codec even if the library can handle it
-		myconf_gn+=" proprietary_codecs=true"
-		myconf_gn+=" ffmpeg_branding=\"Chrome\""
-		# build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute
-		myconf_gn+=" is_component_ffmpeg=true"
-	else
-		ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)"
-		myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)"
-		myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\""
-	fi
-
-	# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys .
-	# Note: these are for Gentoo use ONLY. For your own distribution,
-	# please get your own set of keys. Feel free to contact chromium@gentoo.org
-	# for more info. The OAuth2 credentials, however, have been left out.
-	# Those OAuth2 credentials have been broken for quite some time anyway.
-	# Instead we apply a patch to use the --oauth2-client-id= and
-	# --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and
-	# GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into
-	# Chromium without baked-in values.
-	local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc"
-	myconf_gn+=" google_api_key=\"${google_api_key}\""
-	local myarch="$(tc-arch)"
-
-	# Avoid CFLAGS problems, bug #352457, bug #390147.
-	if ! use custom-cflags; then
-		replace-flags "-Os" "-O2"
-		strip-flags
-
-		# Debug info section overflows without component build
-		# Prevent linker from running out of address space, bug #471810 .
-		filter-flags "-g*"
-
-		# Prevent libvpx/xnnpack build failures. Bug 530248, 544702, 546984, 853646.
-		if [[ ${myarch} == amd64 ]]; then
-			filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a
-		fi
-
-		if tc-is-gcc; then
-			# https://bugs.gentoo.org/904455
-			local -x CPP="$(tc-getCXX) -E"
-			# https://bugs.gentoo.org/912381
-			filter-lto
-		fi
-	fi
-
-	if [[ $myarch = amd64 ]] ; then
-		myconf_gn+=" target_cpu=\"x64\""
-		ffmpeg_target_arch=x64
-	elif [[ $myarch = arm64 ]] ; then
-		myconf_gn+=" target_cpu=\"arm64\""
-		ffmpeg_target_arch=arm64
-	elif [[ $myarch = ppc64 ]] ; then
-		myconf_gn+=" target_cpu=\"ppc64\""
-		ffmpeg_target_arch=ppc64
-    elif [[ $myarch = riscv ]] ; then
-        myconf_gn+=" target_cpu=\"riscv64\""
-        ffmpeg_target_arch=riscv64
-	else
-		die "Failed to determine target arch, got '$myarch'."
-	fi
-
-	# Make sure that -Werror doesn't get added to CFLAGS by the build system.
-	# Depending on GCC version the warnings are different and we don't want
-	# the build to fail because of that.
-	myconf_gn+=" treat_warnings_as_errors=false"
-
-	# Disable fatal linker warnings, bug 506268.
-	myconf_gn+=" fatal_linker_warnings=false"
-
-	# Disable external code space for V8 for ppc64. It is disabled for ppc64
-	# by default, but cross-compiling on amd64 enables it again.
-	if tc-is-cross-compiler; then
-		if ! use amd64 && ! use arm64; then
-			myconf_gn+=" v8_enable_external_code_space=false"
-		fi
-	fi
-
-	# Only enabled for clang, but gcc has endian macros too
-	myconf_gn+=" v8_use_libm_trig_functions=true"
-
-	# Bug 491582.
-	export TMPDIR="${WORKDIR}/temp"
-	mkdir -p -m 755 "${TMPDIR}" || die
-
-	# https://bugs.gentoo.org/654216
-	addpredict /dev/dri/ #nowarn
-
-	# Disable unknown warning message from clang.
-	if tc-is-clang; then
-		append-flags -Wno-unknown-warning-option
-		if tc-is-cross-compiler; then
-			export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option"
-			export BUILD_CFLAGS+=" -Wno-unknown-warning-option"
-		fi
-	fi
-
-	# Explicitly disable ICU data file support for system-icu/headless builds.
-	if use system-icu || use headless; then
-		myconf_gn+=" icu_use_data_file=false"
-	fi
-
-	# Don't need nocompile checks and GN crashes with our config
-	myconf_gn+=" enable_nocompile_tests=false"
-
-	# Enable ozone wayland and/or headless support
-	myconf_gn+=" use_ozone=true ozone_auto_platforms=false"
-	myconf_gn+=" ozone_platform_headless=true"
-	if use headless; then
-		myconf_gn+=" ozone_platform=\"headless\""
-		myconf_gn+=" use_xkbcommon=false use_gtk=false use_qt=false"
-		myconf_gn+=" use_glib=false use_gio=false"
-		myconf_gn+=" use_pangocairo=false use_alsa=false"
-		myconf_gn+=" use_libpci=false use_udev=false"
-		myconf_gn+=" enable_print_preview=false"
-		myconf_gn+=" enable_remoting=false"
-	else
-		myconf_gn+=" use_system_libdrm=true"
-		myconf_gn+=" use_system_minigbm=true"
-		myconf_gn+=" use_xkbcommon=true"
-		if use qt5 || use qt6; then
-			local cbuild_libdir=$(get_libdir)
-			if tc-is-cross-compiler; then
-				# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
-				local cbuild_libdir=$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt)
-				cbuild_libdir=${cbuild_libdir:2}
-				cbuild_libdir=${cbuild_libdir/% }
-			fi
-			if use qt5; then
-				if tc-is-cross-compiler; then
-					myconf_gn+=" moc_qt5_path=\"${EPREFIX}/${cbuild_libdir}/qt5/bin\""
-				else
-					myconf_gn+=" moc_qt5_path=\"$(qt5_get_bindir)\""
-				fi
-			fi
-			if use qt6; then
-				myconf_gn+=" moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\""
-			fi
-
-			myconf_gn+=" use_qt=true"
-			myconf_gn+=" use_qt6=$(usex qt6 true false)"
-		else
-			myconf_gn+=" use_qt=false"
-		fi
-		myconf_gn+=" ozone_platform_x11=$(usex X true false)"
-		myconf_gn+=" ozone_platform_wayland=$(usex wayland true false)"
-		myconf_gn+=" ozone_platform=$(usex wayland \"wayland\" \"x11\")"
-		use wayland && myconf_gn+=" use_system_libffi=true"
-	fi
-
-	# Results in undefined references in chrome linking, may require CFI to work
-	if use arm64; then
-		myconf_gn+=" arm_control_flow_integrity=\"none\""
-	fi
-
-	# Enable official builds
-	myconf_gn+=" is_official_build=$(usex official true false)"
-	myconf_gn+=" use_thin_lto=$(usex lto true false)"
-	myconf_gn+=" thin_lto_enable_optimizations=$(usex lto true false)"
-	if use official; then
-		# Allow building against system libraries in official builds
-		sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
-			tools/generate_shim_headers/generate_shim_headers.py || die
-		# Disable CFI: unsupported for GCC, requires clang+lto+lld
-		myconf_gn+=" is_cfi=false"
-		# Don't add symbols to build
-		myconf_gn+=" symbol_level=0"
-	fi
-
-	if use pgo; then
-		myconf_gn+=" chrome_pgo_phase=${1}"
-		if [[ "$1" == "2" ]]; then
-			myconf_gn+=" pgo_data_path=\"${2}\""
-		fi
-	else
-		# Disable PGO
-		myconf_gn+=" chrome_pgo_phase=0"
-	fi
-
-	# user CXXFLAGS might overwrite -march=armv8-a+crc+crypto, bug #851639
-	if use arm64 && tc-is-gcc; then
-		sed -i '/^#if HAVE_ARM64_CRC32C/a #pragma GCC target ("+crc+crypto")' \
-			third_party/crc32c/src/src/crc32c_arm64.cc || die
-	fi
-
-	# skipping typecheck is only supported on amd64, bug #876157
-	if ! use amd64; then
-		myconf_gn+=" devtools_skip_typecheck=false"
-	fi
-
-	einfo "Configuring Chromium ..."
-	set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release
-	echo "$@"
-	"$@" || die
-}
-
-src_configure() {
-	chromium_configure $(usex pgo 1 0)
-}
-
-chromium_compile() {
-	# Final link uses lots of file descriptors.
-	ulimit -n 2048
-
-	# Calling this here supports resumption via FEATURES=keepwork
-	python_setup
-
-	# Don't inherit PYTHONPATH from environment, bug #789021, #812689
-	local -x PYTHONPATH=
-
-	# Build mksnapshot and pax-mark it.
-	if use pax-kernel; then
-		local x
-		for x in mksnapshot v8_context_snapshot_generator; do
-			if tc-is-cross-compiler; then
-				eninja -C out/Release "host/${x}"
-				pax-mark m "out/Release/host/${x}"
-			else
-				eninja -C out/Release "${x}"
-				pax-mark m "out/Release/${x}"
-			fi
-		done
-	fi
-
-	# Even though ninja autodetects number of CPUs, we respect
-	# user's options, for debugging with -j 1 or any other reason.
-	eninja -C out/Release chrome chromedriver chrome_sandbox
-
-	pax-mark m out/Release/chrome
-
-	if ! use system-toolchain; then
-		QA_FLAGS_IGNORED="
-			usr/lib64/chromium-browser/chrome
-			usr/lib64/chromium-browser/chrome-sandbox
-			usr/lib64/chromium-browser/chromedriver
-			usr/lib64/chromium-browser/chrome_crashpad_handler
-			usr/lib64/chromium-browser/libEGL.so
-			usr/lib64/chromium-browser/libGLESv2.so
-			usr/lib64/chromium-browser/libVkICD_mock_icd.so
-			usr/lib64/chromium-browser/libVkLayer_khronos_validation.so
-			usr/lib64/chromium-browser/libqt5_shim.so
-			usr/lib64/chromium-browser/libvk_swiftshader.so
-			usr/lib64/chromium-browser/libvulkan.so.1
-		"
-	fi
-}
-
-# This function is called from virtx, and must always return so that Xvfb
-# session isn't left running. If we return 1, virtx will call die().
-chromium_profile() {
-	einfo "Profiling for PGO"
-
-	pushd "${WORKDIR}/chromium-profiler-"* >/dev/null || return 1
-
-	# Remove old profdata in case profiling was interrupted.
-	rm -rf "${1}" || return 1
-
-	if ! "${EPYTHON}" ./chromium_profiler.py \
-		--chrome-executable "${S}/out/Release/chrome" \
-		--chromedriver-executable "${S}/out/Release/chromedriver.unstripped" \
-		--add-arg no-sandbox --add-arg disable-dev-shm-usage \
-		--profile-output "${1}"; then
-		eerror "Profiling failed"
-		return 1
-	fi
-
-	popd >/dev/null || return 1
-}
-
-src_compile() {
-	if use pgo; then
-		local profdata
-
-		profdata="${WORKDIR}/chromium.profdata"
-
-		if [[ ! -e "${WORKDIR}/.pgo-profiled" ]]; then
-			chromium_compile
-			virtx chromium_profile "$profdata"
-
-			touch "${WORKDIR}/.pgo-profiled" || die
-		fi
-
-		if [[ ! -e "${WORKDIR}/.pgo-phase-2-configured" ]]; then
-			# Remove phase 1 output
-			rm -r out/Release || die
-
-			chromium_configure 2 "$profdata"
-
-			touch "${WORKDIR}/.pgo-phase-2-configured" || die
-		fi
-
-		if [[ ! -e "${WORKDIR}/.pgo-phase-2-compiled" ]]; then
-			chromium_compile
-			touch "${WORKDIR}/.pgo-phase-2-compiled" || die
-		fi
-	else
-		chromium_compile
-	fi
-
-	mv out/Release/chromedriver{.unstripped,} || die
-
-	rm -f out/Release/locales/*.pak.info || die
-
-	# Build manpage; bug #684550
-	sed -e 's|@@PACKAGE@@|chromium-browser|g;
-		s|@@MENUNAME@@|Chromium|g;' \
-		chrome/app/resources/manpage.1.in > \
-		out/Release/chromium-browser.1 || die
-
-	# Build desktop file; bug #706786
-	sed -e 's|@@MENUNAME@@|Chromium|g;
-		s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g;
-		s|@@PACKAGE@@|chromium-browser|g;
-		s|\(^Exec=\)/usr/bin/|\1|g;' \
-		chrome/installer/linux/common/desktop.template > \
-		out/Release/chromium-browser-chromium.desktop || die
-
-	# Build vk_swiftshader_icd.json; bug #827861
-	sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \
-		third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \
-		out/Release/vk_swiftshader_icd.json || die
-}
-
-src_install() {
-	local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser"
-	exeinto "${CHROMIUM_HOME}"
-	doexe out/Release/chrome
-
-	newexe out/Release/chrome_sandbox chrome-sandbox
-	fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox"
-
-	doexe out/Release/chromedriver
-	doexe out/Release/chrome_crashpad_handler
-
-	ozone_auto_session () {
-		use X && use wayland && ! use headless && echo true || echo false
-	}
-	local sedargs=( -e
-			"s:/usr/lib/:/usr/$(get_libdir)/:g;
-			s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g"
-	)
-	sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die
-	doexe chromium-launcher.sh
-
-	# It is important that we name the target "chromium-browser",
-	# xdg-utils expect it; bug #355517.
-	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser
-	# keep the old symlink around for consistency
-	dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium
-
-	dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver
-
-	# Allow users to override command-line options, bug #357629.
-	insinto /etc/chromium
-	newins "${FILESDIR}/chromium.default" "default"
-
-	pushd out/Release/locales > /dev/null || die
-	chromium_remove_language_paks
-	popd
-
-	insinto "${CHROMIUM_HOME}"
-	doins out/Release/*.bin
-	doins out/Release/*.pak
-
-	if use bindist; then
-		# We built libffmpeg as a component library, but we can't distribute it
-		# with proprietary codec support. Remove it and make a symlink to the requested
-		# system library.
-		rm -f out/Release/libffmpeg.so \
-			|| die "Failed to remove bundled libffmpeg.so (with proprietary codecs)"
-		# symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium].
-		einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..."
-		dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \
-			/usr/$(get_libdir)/chromium-browser/libffmpeg.so
-	fi
-
-	(
-		shopt -s nullglob
-		local files=(out/Release/*.so out/Release/*.so.[0-9])
-		[[ ${#files[@]} -gt 0 ]] && doins "${files[@]}"
-	)
-
-	# Install bundled xdg-utils, avoids installing X11 libraries with USE="-X wayland"
-	doins out/Release/xdg-{settings,mime}
-
-	if ! use system-icu && ! use headless; then
-		doins out/Release/icudtl.dat
-	fi
-
-	doins -r out/Release/locales
-	doins -r out/Release/MEIPreload
-
-	# Install vk_swiftshader_icd.json; bug #827861
-	doins out/Release/vk_swiftshader_icd.json
-
-	if [[ -d out/Release/swiftshader ]]; then
-		insinto "${CHROMIUM_HOME}/swiftshader"
-		doins out/Release/swiftshader/*.so
-	fi
-
-	# Install icons
-	local branding size
-	for size in 16 24 32 48 64 128 256 ; do
-		case ${size} in
-			16|32) branding="chrome/app/theme/default_100_percent/chromium" ;;
-				*) branding="chrome/app/theme/chromium" ;;
-		esac
-		newicon -s ${size} "${branding}/product_logo_${size}.png" \
-			chromium-browser.png
-	done
-
-	# Install desktop entry
-	domenu out/Release/chromium-browser-chromium.desktop
-
-	# Install GNOME default application entry (bug #303100).
-	insinto /usr/share/gnome-control-center/default-apps
-	newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml
-
-	# Install manpage; bug #684550
-	doman out/Release/chromium-browser.1
-	dosym chromium-browser.1 /usr/share/man/man1/chromium.1
-
-	readme.gentoo_create_doc
-}
-
-pkg_postrm() {
-	xdg_icon_cache_update
-	xdg_desktop_database_update
-}
-
-pkg_postinst() {
-	xdg_icon_cache_update
-	xdg_desktop_database_update
-	readme.gentoo_print_elog
-
-	if ! use headless; then
-		if use vaapi; then
-			elog "VA-API is disabled by default at runtime. You have to enable it"
-			elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS"
-			elog "in /etc/chromium/default."
-		fi
-		if use screencast; then
-			elog "Screencast is disabled by default at runtime. Either enable it"
-			elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer"
-			elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer"
-			elog "to CHROMIUM_FLAGS in /etc/chromium/default."
-		fi
-		if use gtk4; then
-			elog "Chromium prefers GTK3 over GTK4 at runtime. To override this"
-			elog "behavior you need to pass --gtk-version=4, e.g. by adding it"
-			elog "to CHROMIUM_FLAGS in /etc/chromium/default."
-		fi
-		if use qt5 && use qt6; then
-			elog "Chromium automatically selects Qt5 or Qt6 based on your desktop"
-			elog "environment. To override you need to pass --qt-version=5 or"
-			elog "--qt-version=6, e.g. by adding it to CHROMIUM_FLAGS in"
-			elog "/etc/chromium/default."
-		fi
-	fi
-}

diff --git a/www-client/chromium/chromium-123.0.6312.122.ebuild b/www-client/chromium/chromium-126.0.6478.114.ebuild
similarity index 96%
rename from www-client/chromium/chromium-123.0.6312.122.ebuild
rename to www-client/chromium/chromium-126.0.6478.114.ebuild
index d9b1d00..6416959 100644
--- a/www-client/chromium/chromium-123.0.6312.122.ebuild
+++ b/www-client/chromium/chromium-126.0.6478.114.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{11..12} )
+PYTHON_COMPAT=( python3_{11..13} )
 PYTHON_REQ_USE="xml(+)"
 
 # PACKAGING NOTES
@@ -36,15 +36,15 @@ PYTHON_REQ_USE="xml(+)"
 
 # These variables let us easily bound supported major dependency versions in one place.
 GCC_MIN_VER=12
-GN_MIN_VER=0.2154
+GN_MIN_VER=0.2165
 # Since Google use prerelease llvm we can let any adventurous users try to build with prerelease
 # ebuilds; try to keep this up to date with the latest version in the tree.
 LLVM_MAX_SLOT=19
 LLVM_MIN_SLOT=17
 RUST_MIN_VER=1.72.0
 # chromium-tools/get-chromium-toolchain-strings.sh
-GOOGLE_CLANG_VER=llvmorg-19-init-2319-g7c4c2746-1
-GOOGLE_RUST_VER=340bb19fea20fd5f9357bbfac542fad84fc7ea2b-3
+GOOGLE_CLANG_VER=llvmorg-19-init-9433-g76ea5feb-1
+GOOGLE_RUST_VER=31e6e8c6c5b6ce62656c922c7384d3376018c980-2
 
 # https://bugs.chromium.org/p/v8/issues/detail?id=14449 - V8 used in 120 can't build with GCC
 # Resolved upstream, requires testing and some backporting I'm sure
@@ -64,11 +64,11 @@ CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu
 	sv sw ta te th tr uk ur vi zh-CN zh-TW"
 
 inherit check-reqs chromium-2 desktop flag-o-matic llvm ninja-utils pax-utils
-inherit python-any-r1 qmake-utils readme.gentoo-r1 toolchain-funcs virtualx xdg-utils
+inherit python-any-r1 qmake-utils readme.gentoo-r1 systemd toolchain-funcs virtualx xdg-utils
 
 DESCRIPTION="Open-source version of Google Chrome web browser"
 HOMEPAGE="https://www.chromium.org/"
-PATCHSET_PPC64="123.0.6312.105-1raptor0~deb12u1"
+PATCHSET_PPC64="126.0.6478.56-1raptor0~deb12u2"
 PATCH_V="${PV%%\.*}"
 SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz
 	system-toolchain? (
@@ -88,7 +88,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}
 
 LICENSE="BSD"
 SLOT="0/stable"
-KEYWORDS="~amd64 arm64 ~ppc64 ~riscv"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
 IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd"
 IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos libcxx lto +official pax-kernel pgo +proprietary-codecs pulseaudio"
 IUSE+=" qt5 qt6 +screencast selinux +system-toolchain +vaapi +wayland +widevine"
@@ -250,8 +250,8 @@ BDEPEND="
 		>=virtual/rust-${RUST_MIN_VER}[profiler(-)]
 	)
 	>=dev-build/gn-${GN_MIN_VER}
+	dev-build/ninja
 	dev-lang/perl
-	>=dev-build/ninja-1.7.2
 	>=dev-util/gperf-3.0.3
 	dev-vcs/git
 	>=net-libs/nodejs-7.6.0[inspector]
@@ -336,7 +336,7 @@ pre_build_checks() {
 	# Check build requirements: bugs #471810, #541816, #914220
 	# We're going to start doing maths here on the size of an unpacked source tarball,
 	# this should make updates easier as chromium continues to balloon in size.
-	local BASE_DISK=18
+	local BASE_DISK=22
 	local EXTRA_DISK=1
 	local CHECKREQS_MEMORY="4G"
 	tc-is-cross-compiler && EXTRA_DISK=2
@@ -422,22 +422,20 @@ src_prepare() {
 		"chrome/browser/media/router/media_router_feature.cc" || die
 
 	local PATCHES=(
-		"${FILESDIR}/chromium-cross-compile.patch"
-		"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
 		"${FILESDIR}/chromium-109-system-zlib.patch"
 		"${FILESDIR}/chromium-111-InkDropHost-crash.patch"
-		"${FILESDIR}/chromium-117-system-zstd.patch"
-		"${FILESDIR}/chromium-124-libwebp-shim-sharpyuv.patch"
-		"${FILESDIR}/chromium-123-qt-gui-check.patch"
-		"${FILESDIR}/00swiftshader-MCDissassembler.patch"
-		"${FILESDIR}/00swiftshader-use-llvm16.patch"
-		"${FILESDIR}/01fix-rust-target.patch"
-		"${FILESDIR}/02Debian-fix-rust-linking.patch"
-		"${FILESDIR}/03riscv-dav1d.patch"
-		"${FILESDIR}/05riscv-sandbox.patch"
-		"${FILESDIR}/06riscv-ffmpeg.patch"
-		"${FILESDIR}/09riscv.patch"
-		"${FILESDIR}/10cpuinfo.patch"
+		"${FILESDIR}/chromium-125-system-zstd.patch"
+		"${FILESDIR}/chromium-126-oauth2-client-switches.patch"
+		"${FILESDIR}/chromium-cross-compile.patch"
+        "${FILESDIR}/swiftshader-MCDissassembler.patch"
+        "${FILESDIR}/swiftshader-use-llvm16.patch"
+        "${FILESDIR}/fix-rust-target.patch"
+        "${FILESDIR}/Debian-fix-rust-linking.patch"
+        "${FILESDIR}/riscv-dav1d.patch"
+        "${FILESDIR}/riscv-sandbox.patch"
+        "${FILESDIR}/riscv-ffmpeg.patch"
+        "${FILESDIR}/riscv.patch"
+        "${FILESDIR}/cpuinfo.patch"
 	)
 
 	if use system-toolchain; then
@@ -467,7 +465,6 @@ src_prepare() {
 		done
 		PATCHES+=( "${WORKDIR}/ppc64le" )
 		PATCHES+=( "${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" )
-		PATCHES+=( "${WORKDIR}/debian/patches/fixes/blink-fonts-shape-result.patch" )
 	fi
 
 	default
@@ -481,7 +478,6 @@ src_prepare() {
 	local keeplibs=(
 		base/third_party/cityhash
 		base/third_party/double_conversion
-		base/third_party/dynamic_annotations
 		base/third_party/icu
 		base/third_party/nspr
 		base/third_party/superfasthash
@@ -562,7 +558,6 @@ src_prepare() {
 		third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs
 		third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data
 		third_party/devtools-frontend/src/front_end/third_party/wasmparser
-		third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n
 		third_party/devtools-frontend/src/third_party
 		third_party/distributed_point_functions
 		third_party/dom_distiller_js
@@ -594,6 +589,7 @@ src_prepare() {
 		third_party/jsoncpp
 		third_party/jstemplate
 		third_party/khronos
+		third_party/lens_server_proto
 		third_party/leveldatabase
 		third_party/libaddressinput
 		third_party/libaom
@@ -644,7 +640,6 @@ src_prepare() {
 		third_party/ots
 		third_party/pdfium
 		third_party/pdfium/third_party/agg23
-		third_party/pdfium/third_party/base
 		third_party/pdfium/third_party/bigint
 		third_party/pdfium/third_party/freetype
 		third_party/pdfium/third_party/lcms
@@ -669,6 +664,8 @@ src_prepare() {
 		third_party/s2cellid
 		third_party/securemessage
 		third_party/selenium-atoms
+		third_party/sentencepiece
+		third_party/sentencepiece/src/third_party/darts_clone
 		third_party/shell-encryption
 		third_party/simplejson
 		third_party/skia
@@ -690,6 +687,7 @@ src_prepare() {
 		third_party/tflite/src/third_party/eigen3
 		third_party/tflite/src/third_party/fft2d
 		third_party/tflite/src/third_party/xla/third_party/tsl
+		third_party/tflite/src/third_party/xla/xla/tsl/util
 		third_party/ruy
 		third_party/six
 		third_party/ukey2
@@ -827,6 +825,12 @@ chromium_configure() {
 
 		if tc-is-clang; then
 			myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
+			# Workaround for build failure with clang-18 and -march=native without
+			# avx512. Does not affect e.g. -march=skylake, only native (bug #931623).
+			use amd64 && is-flagq -march=native &&
+				[[ $(clang-major-version) -eq 18 ]] && [[ $(clang-minor-version) -lt 6 ]] &&
+				tc-cpp-is-true "!defined(__AVX512F__)" ${CXXFLAGS} &&
+				append-flags -mevex512
 		else
 			myconf_gn+=" is_clang=false"
 		fi
@@ -1051,7 +1055,7 @@ chromium_configure() {
     elif [[ $myarch = riscv ]] ; then
         myconf_gn+=" target_cpu=\"riscv64\""
         ffmpeg_target_arch=riscv64
-    else
+	else
 		die "Failed to determine target arch, got '$myarch'."
 	fi
 
@@ -1452,4 +1456,12 @@ pkg_postinst() {
 			elog "/etc/chromium/default."
 		fi
 	fi
+
+	if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then
+		ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd"
+		ewarn "indicates that the Gentoo handbook was not followed to completion."
+		ewarn ""
+		ewarn "Chromium is known to behave unpredictably with this system configuration;"
+		ewarn "please complete the configuration of this system before logging any bugs."
+	fi
 }

diff --git a/www-client/chromium/files/02Debian-fix-rust-linking.patch b/www-client/chromium/files/Debian-fix-rust-linking.patch
similarity index 100%
rename from www-client/chromium/files/02Debian-fix-rust-linking.patch
rename to www-client/chromium/files/Debian-fix-rust-linking.patch

diff --git a/www-client/chromium/files/chromium-125-ninja-1-12.patch b/www-client/chromium/files/chromium-125-ninja-1-12.patch
new file mode 100644
index 0000000..55d0887
--- /dev/null
+++ b/www-client/chromium/files/chromium-125-ninja-1-12.patch
@@ -0,0 +1,17 @@
+https://chromium-review.googlesource.com/c/chromium/src/+/5487538
+commit a976cb05b4024b7a6452d1541378d718cdfe33e6
+Author: Takuto Ikuta <tikuta@chromium.org>
+Date:   Thu Apr 25 07:25:32 2024
+
+    [devtools] fix a missing build dependency to a generated file
+
+--- a/chrome/browser/devtools/BUILD.gn
++++ b/chrome/browser/devtools/BUILD.gn
+@@ -117,6 +117,7 @@
+     "//chrome/browser/autofill:autofill",
+     "//components/autofill/content/browser:browser",
+     "//components/autofill/core/browser:browser",
++    "//components/enterprise/buildflags",
+     "//components/paint_preview/buildflags:buildflags",
+     "//components/variations/service:service",
+     "//components/webapps/common:common",

diff --git a/www-client/chromium/files/chromium-125-oauth2-client-switches.patch b/www-client/chromium/files/chromium-125-oauth2-client-switches.patch
new file mode 100644
index 0000000..6c7f56b
--- /dev/null
+++ b/www-client/chromium/files/chromium-125-oauth2-client-switches.patch
@@ -0,0 +1,45 @@
+From 6a84205d0399a94e8b526176a7dcafd6c2051a95 Mon Sep 17 00:00:00 2001
+From: Matt Jolly <Matt.Jolly@footclan.ninja>
+Date: Thu, 18 Apr 2024 21:15:20 +1000
+Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials -
+ 125 update
+
+125 moved the content to a new file.
+
+Google doesn't let us bake in OAuth2 credentials, and for some time,
+Google sign-in has been broken. Arch dealt with this in March, and so
+did we to some degree, but in the last few months, our sign-in
+credentials have been broken. It appears that we actually did remove API
+credentials in March around Chrome 89, but they got added back, perhaps
+when rotating newer versions to replace older versions. Work around this
+by following Arch's lead: we remove the predefined credentials, as
+before, but also we patch Chromium so that people can use their own
+easily, using Arch's patch for that.
+
+For more info, see:
+
+https://archlinux.org/news/chromium-losing-sync-support-in-early-march/
+https://bodhi.fedoraproject.org/updates/FEDORA-2021-48866282e5
+https://hackaday.com/2021/01/26/whats-the-deal-with-chromium-on-linux-google-at-odds-with-package-maintainers/
+
+Bug: https://bugs.gentoo.org/791871
+Signed-off-by: Matt Jolly <kangie@gentoo.org>
+--- a/google_apis/google_api_keys-inc.cc
++++ b/google_apis/google_api_keys-inc.cc
+@@ -182,11 +182,11 @@ class APIKeyCache {
+ 
+     std::string default_client_id = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_ID,
+-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
++        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
+         std::string(), environment.get(), command_line, gaia_config);
+     std::string default_client_secret = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_SECRET,
+-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
++        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
+         std::string(), environment.get(), command_line, gaia_config);
+ 
+     // We currently only allow overriding the baked-in values for the
+-- 
+2.44.0
+

diff --git a/www-client/chromium/files/chromium-125-system-zstd.patch b/www-client/chromium/files/chromium-125-system-zstd.patch
new file mode 100644
index 0000000..6211662
--- /dev/null
+++ b/www-client/chromium/files/chromium-125-system-zstd.patch
@@ -0,0 +1,53 @@
+From 4ac5e29c999c7bbcb8409a2008b0061e1ae365dd Mon Sep 17 00:00:00 2001
+From: Matt Jolly <Matt.Jolly@footclan.ninja>
+Date: Thu, 18 Apr 2024 21:54:54 +1000
+Subject: [PATCH] Zstd now needs compress, too
+
+Existing patch updated for 125, added source_set("compress")
+
+--- a/build/linux/unbundle/replace_gn_files.py
++++ b/build/linux/unbundle/replace_gn_files.py
+@@ -80,6 +80,7 @@ REPLACEMENTS = {
+   'vulkan_memory_allocator' : 'third_party/vulkan_memory_allocator/BUILD.gn',
+   'woff2': 'third_party/woff2/BUILD.gn',
+   'zlib': 'third_party/zlib/BUILD.gn',
++  'zstd': 'third_party/zstd/BUILD.gn',
+ }
+ 
+ 
+--- /dev/null
++++ b/build/linux/unbundle/zstd.gn
+@@ -0,0 +1,30 @@
++import("//build/config/linux/pkg_config.gni")
++import("//build/shim_headers.gni")
++
++pkg_config("system_zstd") {
++  packages = [ "libzstd" ]
++}
++
++shim_headers("zstd_shim") {
++  root_path = "src/lib"
++  headers = [
++    "zdict.h",
++    "zstd.h",
++    "zstd_errors.h",
++  ]
++}
++
++source_set("zstd") {
++  deps = [ ":zstd_shim" ]
++  public_configs = [ ":system_zstd" ]
++}
++
++source_set("compress") {
++  deps = [ ":zstd_shim" ]
++  public_configs = [ ":system_zstd" ]
++}
++
++source_set("decompress") {
++  deps = [ ":zstd_shim" ]
++  public_configs = [ ":system_zstd" ]
++}
+-- 
+2.44.0
+

diff --git a/www-client/chromium/files/chromium-126-oauth2-client-switches.patch b/www-client/chromium/files/chromium-126-oauth2-client-switches.patch
new file mode 100644
index 0000000..b7ddf79
--- /dev/null
+++ b/www-client/chromium/files/chromium-126-oauth2-client-switches.patch
@@ -0,0 +1,45 @@
+From b6cda4bc2283a02a5b5209c0f4282a8365f6f33e Mon Sep 17 00:00:00 2001
+From: Matt Jolly <Matt.Jolly@footclan.ninja>
+Date: Tue, 21 May 2024 10:04:24 +1000
+Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials -
+ 126 update
+
+126 changed the function proto; patch rebased.
+
+Google doesn't let us bake in OAuth2 credentials, and for some time,
+Google sign-in has been broken. Arch dealt with this in March, and so
+did we to some degree, but in the last few months, our sign-in
+credentials have been broken. It appears that we actually did remove API
+credentials in March around Chrome 89, but they got added back, perhaps
+when rotating newer versions to replace older versions. Work around this
+by following Arch's lead: we remove the predefined credentials, as
+before, but also we patch Chromium so that people can use their own
+easily, using Arch's patch for that.
+
+For more info, see:
+
+https://archlinux.org/news/chromium-losing-sync-support-in-early-march/
+https://bodhi.fedoraproject.org/updates/FEDORA-2021-48866282e5
+https://hackaday.com/2021/01/26/whats-the-deal-with-chromium-on-linux-google-at-odds-with-package-maintainers/
+
+Bug: https://bugs.gentoo.org/791871
+Signed-off-by: Matt Jolly <kangie@gentoo.org>
+--- a/google_apis/google_api_keys-inc.cc
++++ b/google_apis/google_api_keys-inc.cc
+@@ -193,11 +193,11 @@ class APIKeyCache {
+     std::string default_client_id = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_ID,
+         STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), std::string(),
+-        nullptr, std::string(), environment.get(), command_line, gaia_config);
++        ::switches::kOAuth2ClientID, std::string(), environment.get(), command_line, gaia_config);
+     std::string default_client_secret = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_SECRET,
+         STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), std::string(),
+-        nullptr, std::string(), environment.get(), command_line, gaia_config);
++        ::switches::kOAuth2ClientSecret, std::string(), environment.get(), command_line, gaia_config);
+ 
+     // We currently only allow overriding the baked-in values for the
+     // default OAuth2 client ID and secret using a command-line
+-- 
+2.45.1
+

diff --git a/www-client/chromium/files/10cpuinfo.patch b/www-client/chromium/files/cpuinfo.patch
similarity index 100%
rename from www-client/chromium/files/10cpuinfo.patch
rename to www-client/chromium/files/cpuinfo.patch

diff --git a/www-client/chromium/files/01fix-rust-target.patch b/www-client/chromium/files/fix-rust-target.patch
similarity index 100%
rename from www-client/chromium/files/01fix-rust-target.patch
rename to www-client/chromium/files/fix-rust-target.patch

diff --git a/www-client/chromium/files/03riscv-dav1d.patch b/www-client/chromium/files/riscv-dav1d.patch
similarity index 100%
rename from www-client/chromium/files/03riscv-dav1d.patch
rename to www-client/chromium/files/riscv-dav1d.patch

diff --git a/www-client/chromium/files/06riscv-ffmpeg.patch b/www-client/chromium/files/riscv-ffmpeg.patch
similarity index 94%
rename from www-client/chromium/files/06riscv-ffmpeg.patch
rename to www-client/chromium/files/riscv-ffmpeg.patch
index 2914148..9bb4826 100644
--- a/www-client/chromium/files/06riscv-ffmpeg.patch
+++ b/www-client/chromium/files/riscv-ffmpeg.patch
@@ -1,24 +1,20 @@
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
-@@ -0,0 +1,768 @@
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
+@@ -0,0 +1,775 @@
 +/* Automatically generated by configure - do not modify! */
 +#ifndef FFMPEG_CONFIG_H
 +#define FFMPEG_CONFIG_H
-+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=riscv64 --enable-
 decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
++/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --arch=riscv64 --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld
 ' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */
 +#define FFMPEG_LICENSE "LGPL version 2.1 or later"
 +#define CONFIG_THIS_YEAR 2024
 +#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
 +#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-+#define CC_IDENT "gcc 13.2.1 (GCC) 20230801"
++#define CC_IDENT "Debian clang version 16.0.6 (27)"
 +#define OS_NAME linux
-+#define av_restrict restrict
 +#define EXTERN_PREFIX ""
 +#define EXTERN_ASM 
 +#define BUILDSUF ""
 +#define SLIBSUF ".so"
-+#define HAVE_MMX2 HAVE_MMXEXT
 +#define SWS_MAX_FILTER_SIZE 256
 +#define ARCH_AARCH64 0
 +#define ARCH_ALPHA 0
@@ -63,8 +59,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define HAVE_POWER8 0
 +#define HAVE_PPC4XX 0
 +#define HAVE_VSX 0
-+#define HAVE_RV 1
-+#define HAVE_RVV 1
++#define HAVE_RV 0
++#define HAVE_RVV 0
 +#define HAVE_AESNI 0
 +#define HAVE_AMD3DNOW 0
 +#define HAVE_AMD3DNOWEXT 0
@@ -250,6 +246,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define HAVE_OPENCV2_CORE_CORE_C_H 0
 +#define HAVE_OPENGL_GL3_H 0
 +#define HAVE_POLL_H 1
++#define HAVE_PTHREAD_NP_H 0
 +#define HAVE_SYS_PARAM_H 1
 +#define HAVE_SYS_RESOURCE_H 1
 +#define HAVE_SYS_SELECT_H 1
@@ -340,6 +337,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define HAVE_POSIX_MEMALIGN 1
 +#define HAVE_PRCTL 0 /* #define HAVE_PRCTL 1 -- forced to 0 for Fuchsia */
 +#define HAVE_PTHREAD_CANCEL 1
++#define HAVE_PTHREAD_SET_NAME_NP 0
++#define HAVE_PTHREAD_SETNAME_NP 0
 +#define HAVE_SCHED_GETAFFINITY 1
 +#define HAVE_SECITEMIMPORT 0
 +#define HAVE_SETCONSOLETEXTATTRIBUTE 0
@@ -383,7 +382,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
 +#define HAVE_PRAGMA_DEPRECATED 1
 +#define HAVE_RSYNC_CONTIMEOUT 0
-+#define HAVE_SYMVER_ASM_LABEL 0
++#define HAVE_SYMVER_ASM_LABEL 1
 +#define HAVE_SYMVER_GNU_ASM 1
 +#define HAVE_VFP_ARGS 0
 +#define HAVE_XFORM_ASM 0
@@ -423,18 +422,19 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0
 +#define HAVE_GZIP 1
 +#define HAVE_LIBDRM_GETFB2 0
-+#define HAVE_MAKEINFO 1
-+#define HAVE_MAKEINFO_HTML 1
++#define HAVE_MAKEINFO 0
++#define HAVE_MAKEINFO_HTML 0
 +#define HAVE_OPENCL_D3D11 0
 +#define HAVE_OPENCL_DRM_ARM 0
 +#define HAVE_OPENCL_DRM_BEIGNET 0
 +#define HAVE_OPENCL_DXVA2 0
 +#define HAVE_OPENCL_VAAPI_BEIGNET 0
 +#define HAVE_OPENCL_VAAPI_INTEL_MEDIA 0
++#define HAVE_OPENCL_VIDEOTOOLBOX 0
 +#define HAVE_PERL 1
 +#define HAVE_POD2MAN 1
 +#define HAVE_TEXI2HTML 0
-+#define HAVE_XMLLINT 1
++#define HAVE_XMLLINT 0
 +#define HAVE_ZLIB_GZIP 0
 +#define HAVE_OPENVINO2 0
 +#define CONFIG_DOC 0
@@ -470,6 +470,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define CONFIG_FREI0R 0
 +#define CONFIG_LIBCDIO 0
 +#define CONFIG_LIBDAVS2 0
++#define CONFIG_LIBDVDNAV 0
++#define CONFIG_LIBDVDREAD 0
 +#define CONFIG_LIBRUBBERBAND 0
 +#define CONFIG_LIBVIDSTAB 0
 +#define CONFIG_LIBX264 0
@@ -549,6 +551,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define CONFIG_LIBTENSORFLOW 0
 +#define CONFIG_LIBTESSERACT 0
 +#define CONFIG_LIBTHEORA 0
++#define CONFIG_LIBTORCH 0
 +#define CONFIG_LIBTWOLAME 0
 +#define CONFIG_LIBUAVS3D 0
 +#define CONFIG_LIBV4L2 0
@@ -598,7 +601,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define CONFIG_OPENCL 0
 +#define CONFIG_AMF 0
 +#define CONFIG_AUDIOTOOLBOX 0
-+#define CONFIG_CRYSTALHD 0
 +#define CONFIG_CUDA 0
 +#define CONFIG_CUDA_LLVM 0
 +#define CONFIG_CUVID 0
@@ -711,10 +713,12 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define CONFIG_H264_SEI 1
 +#define CONFIG_HEVCPARSE 0
 +#define CONFIG_HEVC_SEI 0
-+#define CONFIG_HPELDSP 1
++#define CONFIG_HPELDSP 0
 +#define CONFIG_HUFFMAN 0
 +#define CONFIG_HUFFYUVDSP 0
 +#define CONFIG_HUFFYUVENCDSP 0
++#define CONFIG_IAMFDEC 0
++#define CONFIG_IAMFENC 0
 +#define CONFIG_IDCTDSP 0
 +#define CONFIG_IIRFILTER 0
 +#define CONFIG_INFLATE_WRAPPER 0
@@ -724,6 +728,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define CONFIG_JPEGTABLES 0
 +#define CONFIG_LGPLV3 0
 +#define CONFIG_LIBX262 0
++#define CONFIG_LIBX264_HDR10 0
 +#define CONFIG_LLAUDDSP 0
 +#define CONFIG_LLVIDDSP 0
 +#define CONFIG_LLVIDENCDSP 0
@@ -765,17 +770,15 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h
 +#define CONFIG_VAAPI_ENCODE 0
 +#define CONFIG_VC1DSP 0
 +#define CONFIG_VIDEODSP 1
-+#define CONFIG_VP3DSP 1
++#define CONFIG_VP3DSP 0
 +#define CONFIG_VP56DSP 0
-+#define CONFIG_VP8DSP 1
++#define CONFIG_VP8DSP 0
 +#define CONFIG_WMA_FREQS 0
 +#define CONFIG_WMV2DSP 0
 +#endif /* FFMPEG_CONFIG_H */
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_components.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_components.h
-@@ -0,0 +1,2217 @@
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_components.h
+@@ -0,0 +1,2210 @@
 +/* Automatically generated by configure - do not modify! */
 +#ifndef FFMPEG_CONFIG_COMPONENTS_H
 +#define FFMPEG_CONFIG_COMPONENTS_H
@@ -801,7 +804,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_MEDIA100_TO_MJPEGB_BSF 0
 +#define CONFIG_MJPEG2JPEG_BSF 0
 +#define CONFIG_MJPEGA_DUMP_HEADER_BSF 0
-+#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 0
 +#define CONFIG_MPEG2_METADATA_BSF 0
 +#define CONFIG_MPEG4_UNPACK_BFRAMES_BSF 0
 +#define CONFIG_MOV2TEXTSUB_BSF 0
@@ -813,6 +815,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_PRORES_METADATA_BSF 0
 +#define CONFIG_REMOVE_EXTRADATA_BSF 0
 +#define CONFIG_SETTS_BSF 0
++#define CONFIG_SHOWINFO_BSF 0
 +#define CONFIG_TEXT2MOVSUB_BSF 0
 +#define CONFIG_TRACE_HEADERS_BSF 0
 +#define CONFIG_TRUEHD_CORE_BSF 0
@@ -841,7 +844,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_AVRN_DECODER 0
 +#define CONFIG_AVS_DECODER 0
 +#define CONFIG_AVUI_DECODER 0
-+#define CONFIG_AYUV_DECODER 0
 +#define CONFIG_BETHSOFTVID_DECODER 0
 +#define CONFIG_BFI_DECODER 0
 +#define CONFIG_BINK_DECODER 0
@@ -908,7 +910,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_H263P_DECODER 0
 +#define CONFIG_H263_V4L2M2M_DECODER 0
 +#define CONFIG_H264_DECODER 1
-+#define CONFIG_H264_CRYSTALHD_DECODER 0
 +#define CONFIG_H264_V4L2M2M_DECODER 0
 +#define CONFIG_H264_MEDIACODEC_DECODER 0
 +#define CONFIG_H264_MMAL_DECODER 0
@@ -956,13 +957,11 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_MPEG1VIDEO_DECODER 0
 +#define CONFIG_MPEG2VIDEO_DECODER 0
 +#define CONFIG_MPEG4_DECODER 0
-+#define CONFIG_MPEG4_CRYSTALHD_DECODER 0
 +#define CONFIG_MPEG4_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG4_MMAL_DECODER 0
 +#define CONFIG_MPEGVIDEO_DECODER 0
 +#define CONFIG_MPEG1_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG2_MMAL_DECODER 0
-+#define CONFIG_MPEG2_CRYSTALHD_DECODER 0
 +#define CONFIG_MPEG2_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG2_QSV_DECODER 0
 +#define CONFIG_MPEG2_MEDIACODEC_DECODER 0
@@ -971,7 +970,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_MSMPEG4V1_DECODER 0
 +#define CONFIG_MSMPEG4V2_DECODER 0
 +#define CONFIG_MSMPEG4V3_DECODER 0
-+#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0
 +#define CONFIG_MSP2_DECODER 0
 +#define CONFIG_MSRLE_DECODER 0
 +#define CONFIG_MSS1_DECODER 0
@@ -1048,7 +1046,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_TARGA_DECODER 0
 +#define CONFIG_TARGA_Y216_DECODER 0
 +#define CONFIG_TDSC_DECODER 0
-+#define CONFIG_THEORA_DECODER 1
++#define CONFIG_THEORA_DECODER 0
 +#define CONFIG_THP_DECODER 0
 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 0
 +#define CONFIG_TIFF_DECODER 0
@@ -1070,7 +1068,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_VBN_DECODER 0
 +#define CONFIG_VBLE_DECODER 0
 +#define CONFIG_VC1_DECODER 0
-+#define CONFIG_VC1_CRYSTALHD_DECODER 0
 +#define CONFIG_VC1IMAGE_DECODER 0
 +#define CONFIG_VC1_MMAL_DECODER 0
 +#define CONFIG_VC1_QSV_DECODER 0
@@ -1079,14 +1076,14 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_VMDVIDEO_DECODER 0
 +#define CONFIG_VMIX_DECODER 0
 +#define CONFIG_VMNC_DECODER 0
-+#define CONFIG_VP3_DECODER 1
++#define CONFIG_VP3_DECODER 0
 +#define CONFIG_VP4_DECODER 0
 +#define CONFIG_VP5_DECODER 0
 +#define CONFIG_VP6_DECODER 0
 +#define CONFIG_VP6A_DECODER 0
 +#define CONFIG_VP6F_DECODER 0
 +#define CONFIG_VP7_DECODER 0
-+#define CONFIG_VP8_DECODER 1
++#define CONFIG_VP8_DECODER 0
 +#define CONFIG_VP8_RKMPP_DECODER 0
 +#define CONFIG_VP8_V4L2M2M_DECODER 0
 +#define CONFIG_VP9_DECODER 0
@@ -1102,7 +1099,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_WMV1_DECODER 0
 +#define CONFIG_WMV2_DECODER 0
 +#define CONFIG_WMV3_DECODER 0
-+#define CONFIG_WMV3_CRYSTALHD_DECODER 0
 +#define CONFIG_WMV3IMAGE_DECODER 0
 +#define CONFIG_WNV1_DECODER 0
 +#define CONFIG_XAN_WC3_DECODER 0
@@ -1416,7 +1412,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_ASV2_ENCODER 0
 +#define CONFIG_AVRP_ENCODER 0
 +#define CONFIG_AVUI_ENCODER 0
-+#define CONFIG_AYUV_ENCODER 0
 +#define CONFIG_BITPACKED_ENCODER 0
 +#define CONFIG_BMP_ENCODER 0
 +#define CONFIG_CFHD_ENCODER 0
@@ -1426,6 +1421,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_DNXHD_ENCODER 0
 +#define CONFIG_DPX_ENCODER 0
 +#define CONFIG_DVVIDEO_ENCODER 0
++#define CONFIG_DXV_ENCODER 0
 +#define CONFIG_EXR_ENCODER 0
 +#define CONFIG_FFV1_ENCODER 0
 +#define CONFIG_FFVHUFF_ENCODER 0
@@ -1786,8 +1782,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_TAK_PARSER 0
 +#define CONFIG_VC1_PARSER 0
 +#define CONFIG_VORBIS_PARSER 1
-+#define CONFIG_VP3_PARSER 1
-+#define CONFIG_VP8_PARSER 1
++#define CONFIG_VP3_PARSER 0
++#define CONFIG_VP8_PARSER 0
 +#define CONFIG_VP9_PARSER 1
 +#define CONFIG_VVC_PARSER 0
 +#define CONFIG_WEBP_PARSER 0
@@ -2399,8 +2395,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_AVSYNCTEST_FILTER 0
 +#define CONFIG_AMOVIE_FILTER 0
 +#define CONFIG_MOVIE_FILTER 0
-+#define CONFIG_AFIFO_FILTER 0
-+#define CONFIG_FIFO_FILTER 0
 +#define CONFIG_AA_DEMUXER 0
 +#define CONFIG_AAC_DEMUXER 1
 +#define CONFIG_AAX_DEMUXER 0
@@ -2484,6 +2478,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_DV_DEMUXER 0
 +#define CONFIG_DVBSUB_DEMUXER 0
 +#define CONFIG_DVBTXT_DEMUXER 0
++#define CONFIG_DVDVIDEO_DEMUXER 0
 +#define CONFIG_DXA_DEMUXER 0
 +#define CONFIG_EA_DEMUXER 0
 +#define CONFIG_EA_CDATA_DEMUXER 0
@@ -2765,6 +2760,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_AC4_MUXER 0
 +#define CONFIG_ADTS_MUXER 0
 +#define CONFIG_ADX_MUXER 0
++#define CONFIG_AEA_MUXER 0
 +#define CONFIG_AIFF_MUXER 0
 +#define CONFIG_ALP_MUXER 0
 +#define CONFIG_AMR_MUXER 0
@@ -2804,7 +2800,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_F4V_MUXER 0
 +#define CONFIG_FFMETADATA_MUXER 0
 +#define CONFIG_FIFO_MUXER 0
-+#define CONFIG_FIFO_TEST_MUXER 0
 +#define CONFIG_FILMSTRIP_MUXER 0
 +#define CONFIG_FITS_MUXER 0
 +#define CONFIG_FLAC_MUXER 0
@@ -2894,6 +2889,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_PCM_U8_MUXER 0
 +#define CONFIG_PSP_MUXER 0
 +#define CONFIG_RAWVIDEO_MUXER 0
++#define CONFIG_RCWT_MUXER 0
 +#define CONFIG_RM_MUXER 0
 +#define CONFIG_ROQ_MUXER 0
 +#define CONFIG_RSO_MUXER 0
@@ -2993,23 +2989,16 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon
 +#define CONFIG_IPFS_GATEWAY_PROTOCOL 0
 +#define CONFIG_IPNS_GATEWAY_PROTOCOL 0
 +#endif /* FFMPEG_CONFIG_COMPONENTS_H */
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/bsf_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/bsf_list.c
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/bsf_list.c
 @@ -0,0 +1,2 @@
 +static const FFBitStreamFilter * const bitstream_filters[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/codec_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/codec_list.c
-@@ -0,0 +1,20 @@
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/codec_list.c
+@@ -0,0 +1,17 @@
 +static const FFCodec * const codec_list[] = {
 +    &ff_h264_decoder,
-+    &ff_theora_decoder,
-+    &ff_vp3_decoder,
-+    &ff_vp8_decoder,
 +    &ff_aac_decoder,
 +    &ff_flac_decoder,
 +    &ff_mp3_decoder,
@@ -3025,11 +3014,9 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/co
 +    &ff_pcm_u8_decoder,
 +    &ff_libopus_decoder,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/parser_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/parser_list.c
-@@ -0,0 +1,11 @@
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/parser_list.c
+@@ -0,0 +1,9 @@
 +static const AVCodecParser * const parser_list[] = {
 +    &ff_aac_parser,
 +    &ff_flac_parser,
@@ -3037,16 +3024,12 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/pa
 +    &ff_mpegaudio_parser,
 +    &ff_opus_parser,
 +    &ff_vorbis_parser,
-+    &ff_vp3_parser,
-+    &ff_vp8_parser,
 +    &ff_vp9_parser,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/demuxer_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/demuxer_list.c
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/demuxer_list.c
 @@ -0,0 +1,9 @@
-+static const AVInputFormat * const demuxer_list[] = {
++static const FFInputFormat * const demuxer_list[] = {
 +    &ff_aac_demuxer,
 +    &ff_flac_demuxer,
 +    &ff_matroska_demuxer,
@@ -3055,24 +3038,18 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/d
 +    &ff_ogg_demuxer,
 +    &ff_wav_demuxer,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/muxer_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/muxer_list.c
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/muxer_list.c
 @@ -0,0 +1,2 @@
 +static const FFOutputFormat * const muxer_list[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/protocol_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/protocol_list.c
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/protocol_list.c
 @@ -0,0 +1,2 @@
 +static const URLProtocol * const url_protocols[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/avconfig.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/avconfig.h
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/avconfig.h
 @@ -0,0 +1,6 @@
 +/* Generated by ffmpeg configure */
 +#ifndef AVUTIL_AVCONFIG_H
@@ -3080,37 +3057,31 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/avc
 +#define AV_HAVE_BIGENDIAN 0
 +#define AV_HAVE_FAST_UNALIGNED 0
 +#endif /* AVUTIL_AVCONFIG_H */
-Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/ffversion.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/ffversion.h
++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/ffversion.h
 @@ -0,0 +1,5 @@
 +/* Automatically generated by version.sh, do not manually edit! */
 +#ifndef AVUTIL_FFVERSION_H
 +#define AVUTIL_FFVERSION_H
 +#define FFMPEG_VERSION "5.1.git"
 +#endif /* AVUTIL_FFVERSION_H */
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
-@@ -0,0 +1,768 @@
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
+@@ -0,0 +1,775 @@
 +/* Automatically generated by configure - do not modify! */
 +#ifndef FFMPEG_CONFIG_H
 +#define FFMPEG_CONFIG_H
-+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=riscv64 --enable-decoder='aac,h264' --enable
 -demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */
++/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --arch=riscv64 --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h26
 4' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */
 +#define FFMPEG_LICENSE "LGPL version 2.1 or later"
 +#define CONFIG_THIS_YEAR 2024
 +#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
 +#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-+#define CC_IDENT "gcc 13.2.1 (GCC) 20230801"
++#define CC_IDENT "Debian clang version 16.0.6 (27)"
 +#define OS_NAME linux
-+#define av_restrict restrict
 +#define EXTERN_PREFIX ""
 +#define EXTERN_ASM 
 +#define BUILDSUF ""
 +#define SLIBSUF ".so"
-+#define HAVE_MMX2 HAVE_MMXEXT
 +#define SWS_MAX_FILTER_SIZE 256
 +#define ARCH_AARCH64 0
 +#define ARCH_ALPHA 0
@@ -3155,8 +3126,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define HAVE_POWER8 0
 +#define HAVE_PPC4XX 0
 +#define HAVE_VSX 0
-+#define HAVE_RV 1
-+#define HAVE_RVV 1
++#define HAVE_RV 0
++#define HAVE_RVV 0
 +#define HAVE_AESNI 0
 +#define HAVE_AMD3DNOW 0
 +#define HAVE_AMD3DNOWEXT 0
@@ -3342,6 +3313,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define HAVE_OPENCV2_CORE_CORE_C_H 0
 +#define HAVE_OPENGL_GL3_H 0
 +#define HAVE_POLL_H 1
++#define HAVE_PTHREAD_NP_H 0
 +#define HAVE_SYS_PARAM_H 1
 +#define HAVE_SYS_RESOURCE_H 1
 +#define HAVE_SYS_SELECT_H 1
@@ -3432,6 +3404,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define HAVE_POSIX_MEMALIGN 1
 +#define HAVE_PRCTL 0 /* #define HAVE_PRCTL 1 -- forced to 0 for Fuchsia */
 +#define HAVE_PTHREAD_CANCEL 1
++#define HAVE_PTHREAD_SET_NAME_NP 0
++#define HAVE_PTHREAD_SETNAME_NP 0
 +#define HAVE_SCHED_GETAFFINITY 1
 +#define HAVE_SECITEMIMPORT 0
 +#define HAVE_SETCONSOLETEXTATTRIBUTE 0
@@ -3475,7 +3449,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
 +#define HAVE_PRAGMA_DEPRECATED 1
 +#define HAVE_RSYNC_CONTIMEOUT 0
-+#define HAVE_SYMVER_ASM_LABEL 0
++#define HAVE_SYMVER_ASM_LABEL 1
 +#define HAVE_SYMVER_GNU_ASM 1
 +#define HAVE_VFP_ARGS 0
 +#define HAVE_XFORM_ASM 0
@@ -3515,18 +3489,19 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0
 +#define HAVE_GZIP 1
 +#define HAVE_LIBDRM_GETFB2 0
-+#define HAVE_MAKEINFO 1
-+#define HAVE_MAKEINFO_HTML 1
++#define HAVE_MAKEINFO 0
++#define HAVE_MAKEINFO_HTML 0
 +#define HAVE_OPENCL_D3D11 0
 +#define HAVE_OPENCL_DRM_ARM 0
 +#define HAVE_OPENCL_DRM_BEIGNET 0
 +#define HAVE_OPENCL_DXVA2 0
 +#define HAVE_OPENCL_VAAPI_BEIGNET 0
 +#define HAVE_OPENCL_VAAPI_INTEL_MEDIA 0
++#define HAVE_OPENCL_VIDEOTOOLBOX 0
 +#define HAVE_PERL 1
 +#define HAVE_POD2MAN 1
 +#define HAVE_TEXI2HTML 0
-+#define HAVE_XMLLINT 1
++#define HAVE_XMLLINT 0
 +#define HAVE_ZLIB_GZIP 0
 +#define HAVE_OPENVINO2 0
 +#define CONFIG_DOC 0
@@ -3562,6 +3537,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define CONFIG_FREI0R 0
 +#define CONFIG_LIBCDIO 0
 +#define CONFIG_LIBDAVS2 0
++#define CONFIG_LIBDVDNAV 0
++#define CONFIG_LIBDVDREAD 0
 +#define CONFIG_LIBRUBBERBAND 0
 +#define CONFIG_LIBVIDSTAB 0
 +#define CONFIG_LIBX264 0
@@ -3641,6 +3618,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define CONFIG_LIBTENSORFLOW 0
 +#define CONFIG_LIBTESSERACT 0
 +#define CONFIG_LIBTHEORA 0
++#define CONFIG_LIBTORCH 0
 +#define CONFIG_LIBTWOLAME 0
 +#define CONFIG_LIBUAVS3D 0
 +#define CONFIG_LIBV4L2 0
@@ -3690,7 +3668,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define CONFIG_OPENCL 0
 +#define CONFIG_AMF 0
 +#define CONFIG_AUDIOTOOLBOX 0
-+#define CONFIG_CRYSTALHD 0
 +#define CONFIG_CUDA 0
 +#define CONFIG_CUDA_LLVM 0
 +#define CONFIG_CUVID 0
@@ -3807,6 +3784,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define CONFIG_HUFFMAN 0
 +#define CONFIG_HUFFYUVDSP 0
 +#define CONFIG_HUFFYUVENCDSP 0
++#define CONFIG_IAMFDEC 0
++#define CONFIG_IAMFENC 0
 +#define CONFIG_IDCTDSP 1
 +#define CONFIG_IIRFILTER 0
 +#define CONFIG_INFLATE_WRAPPER 0
@@ -3816,6 +3795,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define CONFIG_JPEGTABLES 0
 +#define CONFIG_LGPLV3 0
 +#define CONFIG_LIBX262 0
++#define CONFIG_LIBX264_HDR10 0
 +#define CONFIG_LLAUDDSP 0
 +#define CONFIG_LLVIDDSP 0
 +#define CONFIG_LLVIDENCDSP 0
@@ -3857,17 +3837,15 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h
 +#define CONFIG_VAAPI_ENCODE 0
 +#define CONFIG_VC1DSP 0
 +#define CONFIG_VIDEODSP 1
-+#define CONFIG_VP3DSP 1
++#define CONFIG_VP3DSP 0
 +#define CONFIG_VP56DSP 0
-+#define CONFIG_VP8DSP 1
++#define CONFIG_VP8DSP 0
 +#define CONFIG_WMA_FREQS 0
 +#define CONFIG_WMV2DSP 0
 +#endif /* FFMPEG_CONFIG_H */
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_components.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_components.h
-@@ -0,0 +1,2217 @@
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_components.h
+@@ -0,0 +1,2210 @@
 +/* Automatically generated by configure - do not modify! */
 +#ifndef FFMPEG_CONFIG_COMPONENTS_H
 +#define FFMPEG_CONFIG_COMPONENTS_H
@@ -3893,7 +3871,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_MEDIA100_TO_MJPEGB_BSF 0
 +#define CONFIG_MJPEG2JPEG_BSF 0
 +#define CONFIG_MJPEGA_DUMP_HEADER_BSF 0
-+#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 0
 +#define CONFIG_MPEG2_METADATA_BSF 0
 +#define CONFIG_MPEG4_UNPACK_BFRAMES_BSF 0
 +#define CONFIG_MOV2TEXTSUB_BSF 0
@@ -3905,6 +3882,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_PRORES_METADATA_BSF 0
 +#define CONFIG_REMOVE_EXTRADATA_BSF 0
 +#define CONFIG_SETTS_BSF 0
++#define CONFIG_SHOWINFO_BSF 0
 +#define CONFIG_TEXT2MOVSUB_BSF 0
 +#define CONFIG_TRACE_HEADERS_BSF 0
 +#define CONFIG_TRUEHD_CORE_BSF 0
@@ -3933,7 +3911,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_AVRN_DECODER 0
 +#define CONFIG_AVS_DECODER 0
 +#define CONFIG_AVUI_DECODER 0
-+#define CONFIG_AYUV_DECODER 0
 +#define CONFIG_BETHSOFTVID_DECODER 0
 +#define CONFIG_BFI_DECODER 0
 +#define CONFIG_BINK_DECODER 0
@@ -4000,7 +3977,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_H263P_DECODER 0
 +#define CONFIG_H263_V4L2M2M_DECODER 0
 +#define CONFIG_H264_DECODER 1
-+#define CONFIG_H264_CRYSTALHD_DECODER 0
 +#define CONFIG_H264_V4L2M2M_DECODER 0
 +#define CONFIG_H264_MEDIACODEC_DECODER 0
 +#define CONFIG_H264_MMAL_DECODER 0
@@ -4048,13 +4024,11 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_MPEG1VIDEO_DECODER 0
 +#define CONFIG_MPEG2VIDEO_DECODER 0
 +#define CONFIG_MPEG4_DECODER 1
-+#define CONFIG_MPEG4_CRYSTALHD_DECODER 0
 +#define CONFIG_MPEG4_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG4_MMAL_DECODER 0
 +#define CONFIG_MPEGVIDEO_DECODER 0
 +#define CONFIG_MPEG1_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG2_MMAL_DECODER 0
-+#define CONFIG_MPEG2_CRYSTALHD_DECODER 0
 +#define CONFIG_MPEG2_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG2_QSV_DECODER 0
 +#define CONFIG_MPEG2_MEDIACODEC_DECODER 0
@@ -4063,7 +4037,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_MSMPEG4V1_DECODER 0
 +#define CONFIG_MSMPEG4V2_DECODER 0
 +#define CONFIG_MSMPEG4V3_DECODER 0
-+#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0
 +#define CONFIG_MSP2_DECODER 0
 +#define CONFIG_MSRLE_DECODER 0
 +#define CONFIG_MSS1_DECODER 0
@@ -4140,7 +4113,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_TARGA_DECODER 0
 +#define CONFIG_TARGA_Y216_DECODER 0
 +#define CONFIG_TDSC_DECODER 0
-+#define CONFIG_THEORA_DECODER 1
++#define CONFIG_THEORA_DECODER 0
 +#define CONFIG_THP_DECODER 0
 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 0
 +#define CONFIG_TIFF_DECODER 0
@@ -4162,7 +4135,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_VBN_DECODER 0
 +#define CONFIG_VBLE_DECODER 0
 +#define CONFIG_VC1_DECODER 0
-+#define CONFIG_VC1_CRYSTALHD_DECODER 0
 +#define CONFIG_VC1IMAGE_DECODER 0
 +#define CONFIG_VC1_MMAL_DECODER 0
 +#define CONFIG_VC1_QSV_DECODER 0
@@ -4171,14 +4143,14 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_VMDVIDEO_DECODER 0
 +#define CONFIG_VMIX_DECODER 0
 +#define CONFIG_VMNC_DECODER 0
-+#define CONFIG_VP3_DECODER 1
++#define CONFIG_VP3_DECODER 0
 +#define CONFIG_VP4_DECODER 0
 +#define CONFIG_VP5_DECODER 0
 +#define CONFIG_VP6_DECODER 0
 +#define CONFIG_VP6A_DECODER 0
 +#define CONFIG_VP6F_DECODER 0
 +#define CONFIG_VP7_DECODER 0
-+#define CONFIG_VP8_DECODER 1
++#define CONFIG_VP8_DECODER 0
 +#define CONFIG_VP8_RKMPP_DECODER 0
 +#define CONFIG_VP8_V4L2M2M_DECODER 0
 +#define CONFIG_VP9_DECODER 0
@@ -4194,7 +4166,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_WMV1_DECODER 0
 +#define CONFIG_WMV2_DECODER 0
 +#define CONFIG_WMV3_DECODER 0
-+#define CONFIG_WMV3_CRYSTALHD_DECODER 0
 +#define CONFIG_WMV3IMAGE_DECODER 0
 +#define CONFIG_WNV1_DECODER 0
 +#define CONFIG_XAN_WC3_DECODER 0
@@ -4508,7 +4479,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_ASV2_ENCODER 0
 +#define CONFIG_AVRP_ENCODER 0
 +#define CONFIG_AVUI_ENCODER 0
-+#define CONFIG_AYUV_ENCODER 0
 +#define CONFIG_BITPACKED_ENCODER 0
 +#define CONFIG_BMP_ENCODER 0
 +#define CONFIG_CFHD_ENCODER 0
@@ -4518,6 +4488,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_DNXHD_ENCODER 0
 +#define CONFIG_DPX_ENCODER 0
 +#define CONFIG_DVVIDEO_ENCODER 0
++#define CONFIG_DXV_ENCODER 0
 +#define CONFIG_EXR_ENCODER 0
 +#define CONFIG_FFV1_ENCODER 0
 +#define CONFIG_FFVHUFF_ENCODER 0
@@ -4878,8 +4849,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_TAK_PARSER 0
 +#define CONFIG_VC1_PARSER 0
 +#define CONFIG_VORBIS_PARSER 1
-+#define CONFIG_VP3_PARSER 1
-+#define CONFIG_VP8_PARSER 1
++#define CONFIG_VP3_PARSER 0
++#define CONFIG_VP8_PARSER 0
 +#define CONFIG_VP9_PARSER 1
 +#define CONFIG_VVC_PARSER 0
 +#define CONFIG_WEBP_PARSER 0
@@ -5491,8 +5462,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_AVSYNCTEST_FILTER 0
 +#define CONFIG_AMOVIE_FILTER 0
 +#define CONFIG_MOVIE_FILTER 0
-+#define CONFIG_AFIFO_FILTER 0
-+#define CONFIG_FIFO_FILTER 0
 +#define CONFIG_AA_DEMUXER 0
 +#define CONFIG_AAC_DEMUXER 1
 +#define CONFIG_AAX_DEMUXER 0
@@ -5576,6 +5545,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_DV_DEMUXER 0
 +#define CONFIG_DVBSUB_DEMUXER 0
 +#define CONFIG_DVBTXT_DEMUXER 0
++#define CONFIG_DVDVIDEO_DEMUXER 0
 +#define CONFIG_DXA_DEMUXER 0
 +#define CONFIG_EA_DEMUXER 0
 +#define CONFIG_EA_CDATA_DEMUXER 0
@@ -5857,6 +5827,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_AC4_MUXER 0
 +#define CONFIG_ADTS_MUXER 0
 +#define CONFIG_ADX_MUXER 0
++#define CONFIG_AEA_MUXER 0
 +#define CONFIG_AIFF_MUXER 0
 +#define CONFIG_ALP_MUXER 0
 +#define CONFIG_AMR_MUXER 0
@@ -5896,7 +5867,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_F4V_MUXER 0
 +#define CONFIG_FFMETADATA_MUXER 0
 +#define CONFIG_FIFO_MUXER 0
-+#define CONFIG_FIFO_TEST_MUXER 0
 +#define CONFIG_FILMSTRIP_MUXER 0
 +#define CONFIG_FITS_MUXER 0
 +#define CONFIG_FLAC_MUXER 0
@@ -5986,6 +5956,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_PCM_U8_MUXER 0
 +#define CONFIG_PSP_MUXER 0
 +#define CONFIG_RAWVIDEO_MUXER 0
++#define CONFIG_RCWT_MUXER 0
 +#define CONFIG_RM_MUXER 0
 +#define CONFIG_ROQ_MUXER 0
 +#define CONFIG_RSO_MUXER 0
@@ -6085,25 +6056,18 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp
 +#define CONFIG_IPFS_GATEWAY_PROTOCOL 0
 +#define CONFIG_IPNS_GATEWAY_PROTOCOL 0
 +#endif /* FFMPEG_CONFIG_COMPONENTS_H */
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/bsf_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/bsf_list.c
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/bsf_list.c
 @@ -0,0 +1,2 @@
 +static const FFBitStreamFilter * const bitstream_filters[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/codec_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/codec_list.c
-@@ -0,0 +1,22 @@
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/codec_list.c
+@@ -0,0 +1,19 @@
 +static const FFCodec * const codec_list[] = {
 +    &ff_h263_decoder,
 +    &ff_h264_decoder,
 +    &ff_mpeg4_decoder,
-+    &ff_theora_decoder,
-+    &ff_vp3_decoder,
-+    &ff_vp8_decoder,
 +    &ff_aac_decoder,
 +    &ff_flac_decoder,
 +    &ff_mp3_decoder,
@@ -6119,11 +6083,9 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/
 +    &ff_pcm_u8_decoder,
 +    &ff_libopus_decoder,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/parser_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/parser_list.c
-@@ -0,0 +1,13 @@
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/parser_list.c
+@@ -0,0 +1,11 @@
 +static const AVCodecParser * const parser_list[] = {
 +    &ff_aac_parser,
 +    &ff_flac_parser,
@@ -6133,16 +6095,12 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/
 +    &ff_mpegaudio_parser,
 +    &ff_opus_parser,
 +    &ff_vorbis_parser,
-+    &ff_vp3_parser,
-+    &ff_vp8_parser,
 +    &ff_vp9_parser,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/demuxer_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/demuxer_list.c
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/demuxer_list.c
 @@ -0,0 +1,10 @@
-+static const AVInputFormat * const demuxer_list[] = {
++static const FFInputFormat * const demuxer_list[] = {
 +    &ff_aac_demuxer,
 +    &ff_avi_demuxer,
 +    &ff_flac_demuxer,
@@ -6152,24 +6110,18 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat
 +    &ff_ogg_demuxer,
 +    &ff_wav_demuxer,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/muxer_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/muxer_list.c
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/muxer_list.c
 @@ -0,0 +1,2 @@
 +static const FFOutputFormat * const muxer_list[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/protocol_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/protocol_list.c
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/protocol_list.c
 @@ -0,0 +1,2 @@
 +static const URLProtocol * const url_protocols[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/avconfig.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/avconfig.h
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/avconfig.h
 @@ -0,0 +1,6 @@
 +/* Generated by ffmpeg configure */
 +#ifndef AVUTIL_AVCONFIG_H
@@ -6177,37 +6129,31 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/a
 +#define AV_HAVE_BIGENDIAN 0
 +#define AV_HAVE_FAST_UNALIGNED 0
 +#endif /* AVUTIL_AVCONFIG_H */
-Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/ffversion.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/ffversion.h
++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/ffversion.h
 @@ -0,0 +1,5 @@
 +/* Automatically generated by version.sh, do not manually edit! */
 +#ifndef AVUTIL_FFVERSION_H
 +#define AVUTIL_FFVERSION_H
 +#define FFMPEG_VERSION "5.1.git"
 +#endif /* AVUTIL_FFVERSION_H */
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
-@@ -0,0 +1,768 @@
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
+@@ -0,0 +1,775 @@
 +/* Automatically generated by configure - do not modify! */
 +#ifndef FFMPEG_CONFIG_H
 +#define FFMPEG_CONFIG_H
-+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=riscv64" -- elide
  long configuration string from binary */
++/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --arch=riscv64 --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld
 '" -- elide long configuration string from binary */
 +#define FFMPEG_LICENSE "LGPL version 2.1 or later"
 +#define CONFIG_THIS_YEAR 2024
 +#define FFMPEG_DATADIR "/usr/local/share/ffmpeg"
 +#define AVCONV_DATADIR "/usr/local/share/ffmpeg"
-+#define CC_IDENT "gcc 13.2.1 (GCC) 20230801"
++#define CC_IDENT "Debian clang version 16.0.6 (27)"
 +#define OS_NAME linux
-+#define av_restrict restrict
 +#define EXTERN_PREFIX ""
 +#define EXTERN_ASM 
 +#define BUILDSUF ""
 +#define SLIBSUF ".so"
-+#define HAVE_MMX2 HAVE_MMXEXT
 +#define SWS_MAX_FILTER_SIZE 256
 +#define ARCH_AARCH64 0
 +#define ARCH_ALPHA 0
@@ -6252,8 +6198,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define HAVE_POWER8 0
 +#define HAVE_PPC4XX 0
 +#define HAVE_VSX 0
-+#define HAVE_RV 1
-+#define HAVE_RVV 1
++#define HAVE_RV 0
++#define HAVE_RVV 0
 +#define HAVE_AESNI 0
 +#define HAVE_AMD3DNOW 0
 +#define HAVE_AMD3DNOWEXT 0
@@ -6439,6 +6385,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define HAVE_OPENCV2_CORE_CORE_C_H 0
 +#define HAVE_OPENGL_GL3_H 0
 +#define HAVE_POLL_H 1
++#define HAVE_PTHREAD_NP_H 0
 +#define HAVE_SYS_PARAM_H 1
 +#define HAVE_SYS_RESOURCE_H 1
 +#define HAVE_SYS_SELECT_H 1
@@ -6529,6 +6476,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define HAVE_POSIX_MEMALIGN 1
 +#define HAVE_PRCTL 0 /* #define HAVE_PRCTL 1 -- forced to 0 for Fuchsia */
 +#define HAVE_PTHREAD_CANCEL 1
++#define HAVE_PTHREAD_SET_NAME_NP 0
++#define HAVE_PTHREAD_SETNAME_NP 0
 +#define HAVE_SCHED_GETAFFINITY 1
 +#define HAVE_SECITEMIMPORT 0
 +#define HAVE_SETCONSOLETEXTATTRIBUTE 0
@@ -6572,7 +6521,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1
 +#define HAVE_PRAGMA_DEPRECATED 1
 +#define HAVE_RSYNC_CONTIMEOUT 0
-+#define HAVE_SYMVER_ASM_LABEL 0
++#define HAVE_SYMVER_ASM_LABEL 1
 +#define HAVE_SYMVER_GNU_ASM 1
 +#define HAVE_VFP_ARGS 0
 +#define HAVE_XFORM_ASM 0
@@ -6612,18 +6561,19 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0
 +#define HAVE_GZIP 1
 +#define HAVE_LIBDRM_GETFB2 0
-+#define HAVE_MAKEINFO 1
-+#define HAVE_MAKEINFO_HTML 1
++#define HAVE_MAKEINFO 0
++#define HAVE_MAKEINFO_HTML 0
 +#define HAVE_OPENCL_D3D11 0
 +#define HAVE_OPENCL_DRM_ARM 0
 +#define HAVE_OPENCL_DRM_BEIGNET 0
 +#define HAVE_OPENCL_DXVA2 0
 +#define HAVE_OPENCL_VAAPI_BEIGNET 0
 +#define HAVE_OPENCL_VAAPI_INTEL_MEDIA 0
++#define HAVE_OPENCL_VIDEOTOOLBOX 0
 +#define HAVE_PERL 1
 +#define HAVE_POD2MAN 1
 +#define HAVE_TEXI2HTML 0
-+#define HAVE_XMLLINT 1
++#define HAVE_XMLLINT 0
 +#define HAVE_ZLIB_GZIP 0
 +#define HAVE_OPENVINO2 0
 +#define CONFIG_DOC 0
@@ -6659,6 +6609,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define CONFIG_FREI0R 0
 +#define CONFIG_LIBCDIO 0
 +#define CONFIG_LIBDAVS2 0
++#define CONFIG_LIBDVDNAV 0
++#define CONFIG_LIBDVDREAD 0
 +#define CONFIG_LIBRUBBERBAND 0
 +#define CONFIG_LIBVIDSTAB 0
 +#define CONFIG_LIBX264 0
@@ -6738,6 +6690,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define CONFIG_LIBTENSORFLOW 0
 +#define CONFIG_LIBTESSERACT 0
 +#define CONFIG_LIBTHEORA 0
++#define CONFIG_LIBTORCH 0
 +#define CONFIG_LIBTWOLAME 0
 +#define CONFIG_LIBUAVS3D 0
 +#define CONFIG_LIBV4L2 0
@@ -6787,7 +6740,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define CONFIG_OPENCL 0
 +#define CONFIG_AMF 0
 +#define CONFIG_AUDIOTOOLBOX 0
-+#define CONFIG_CRYSTALHD 0
 +#define CONFIG_CUDA 0
 +#define CONFIG_CUDA_LLVM 0
 +#define CONFIG_CUVID 0
@@ -6895,15 +6847,17 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define CONFIG_H264CHROMA 0
 +#define CONFIG_H264DSP 0
 +#define CONFIG_H264PARSE 0
-+#define CONFIG_H264PRED 1
++#define CONFIG_H264PRED 0
 +#define CONFIG_H264QPEL 0
 +#define CONFIG_H264_SEI 0
 +#define CONFIG_HEVCPARSE 0
 +#define CONFIG_HEVC_SEI 0
-+#define CONFIG_HPELDSP 1
++#define CONFIG_HPELDSP 0
 +#define CONFIG_HUFFMAN 0
 +#define CONFIG_HUFFYUVDSP 0
 +#define CONFIG_HUFFYUVENCDSP 0
++#define CONFIG_IAMFDEC 0
++#define CONFIG_IAMFENC 0
 +#define CONFIG_IDCTDSP 0
 +#define CONFIG_IIRFILTER 0
 +#define CONFIG_INFLATE_WRAPPER 0
@@ -6913,6 +6867,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define CONFIG_JPEGTABLES 0
 +#define CONFIG_LGPLV3 0
 +#define CONFIG_LIBX262 0
++#define CONFIG_LIBX264_HDR10 0
 +#define CONFIG_LLAUDDSP 0
 +#define CONFIG_LLVIDDSP 0
 +#define CONFIG_LLVIDENCDSP 0
@@ -6953,18 +6908,16 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h
 +#define CONFIG_VAAPI_1 0
 +#define CONFIG_VAAPI_ENCODE 0
 +#define CONFIG_VC1DSP 0
-+#define CONFIG_VIDEODSP 1
-+#define CONFIG_VP3DSP 1
++#define CONFIG_VIDEODSP 0
++#define CONFIG_VP3DSP 0
 +#define CONFIG_VP56DSP 0
-+#define CONFIG_VP8DSP 1
++#define CONFIG_VP8DSP 0
 +#define CONFIG_WMA_FREQS 0
 +#define CONFIG_WMV2DSP 0
 +#endif /* FFMPEG_CONFIG_H */
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_components.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_components.h
-@@ -0,0 +1,2217 @@
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_components.h
+@@ -0,0 +1,2210 @@
 +/* Automatically generated by configure - do not modify! */
 +#ifndef FFMPEG_CONFIG_COMPONENTS_H
 +#define FFMPEG_CONFIG_COMPONENTS_H
@@ -6990,7 +6943,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_MEDIA100_TO_MJPEGB_BSF 0
 +#define CONFIG_MJPEG2JPEG_BSF 0
 +#define CONFIG_MJPEGA_DUMP_HEADER_BSF 0
-+#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 0
 +#define CONFIG_MPEG2_METADATA_BSF 0
 +#define CONFIG_MPEG4_UNPACK_BFRAMES_BSF 0
 +#define CONFIG_MOV2TEXTSUB_BSF 0
@@ -7002,6 +6954,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_PRORES_METADATA_BSF 0
 +#define CONFIG_REMOVE_EXTRADATA_BSF 0
 +#define CONFIG_SETTS_BSF 0
++#define CONFIG_SHOWINFO_BSF 0
 +#define CONFIG_TEXT2MOVSUB_BSF 0
 +#define CONFIG_TRACE_HEADERS_BSF 0
 +#define CONFIG_TRUEHD_CORE_BSF 0
@@ -7030,7 +6983,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_AVRN_DECODER 0
 +#define CONFIG_AVS_DECODER 0
 +#define CONFIG_AVUI_DECODER 0
-+#define CONFIG_AYUV_DECODER 0
 +#define CONFIG_BETHSOFTVID_DECODER 0
 +#define CONFIG_BFI_DECODER 0
 +#define CONFIG_BINK_DECODER 0
@@ -7097,7 +7049,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_H263P_DECODER 0
 +#define CONFIG_H263_V4L2M2M_DECODER 0
 +#define CONFIG_H264_DECODER 0
-+#define CONFIG_H264_CRYSTALHD_DECODER 0
 +#define CONFIG_H264_V4L2M2M_DECODER 0
 +#define CONFIG_H264_MEDIACODEC_DECODER 0
 +#define CONFIG_H264_MMAL_DECODER 0
@@ -7145,13 +7096,11 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_MPEG1VIDEO_DECODER 0
 +#define CONFIG_MPEG2VIDEO_DECODER 0
 +#define CONFIG_MPEG4_DECODER 0
-+#define CONFIG_MPEG4_CRYSTALHD_DECODER 0
 +#define CONFIG_MPEG4_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG4_MMAL_DECODER 0
 +#define CONFIG_MPEGVIDEO_DECODER 0
 +#define CONFIG_MPEG1_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG2_MMAL_DECODER 0
-+#define CONFIG_MPEG2_CRYSTALHD_DECODER 0
 +#define CONFIG_MPEG2_V4L2M2M_DECODER 0
 +#define CONFIG_MPEG2_QSV_DECODER 0
 +#define CONFIG_MPEG2_MEDIACODEC_DECODER 0
@@ -7160,7 +7109,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_MSMPEG4V1_DECODER 0
 +#define CONFIG_MSMPEG4V2_DECODER 0
 +#define CONFIG_MSMPEG4V3_DECODER 0
-+#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0
 +#define CONFIG_MSP2_DECODER 0
 +#define CONFIG_MSRLE_DECODER 0
 +#define CONFIG_MSS1_DECODER 0
@@ -7237,7 +7185,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_TARGA_DECODER 0
 +#define CONFIG_TARGA_Y216_DECODER 0
 +#define CONFIG_TDSC_DECODER 0
-+#define CONFIG_THEORA_DECODER 1
++#define CONFIG_THEORA_DECODER 0
 +#define CONFIG_THP_DECODER 0
 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 0
 +#define CONFIG_TIFF_DECODER 0
@@ -7259,7 +7207,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_VBN_DECODER 0
 +#define CONFIG_VBLE_DECODER 0
 +#define CONFIG_VC1_DECODER 0
-+#define CONFIG_VC1_CRYSTALHD_DECODER 0
 +#define CONFIG_VC1IMAGE_DECODER 0
 +#define CONFIG_VC1_MMAL_DECODER 0
 +#define CONFIG_VC1_QSV_DECODER 0
@@ -7268,14 +7215,14 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_VMDVIDEO_DECODER 0
 +#define CONFIG_VMIX_DECODER 0
 +#define CONFIG_VMNC_DECODER 0
-+#define CONFIG_VP3_DECODER 1
++#define CONFIG_VP3_DECODER 0
 +#define CONFIG_VP4_DECODER 0
 +#define CONFIG_VP5_DECODER 0
 +#define CONFIG_VP6_DECODER 0
 +#define CONFIG_VP6A_DECODER 0
 +#define CONFIG_VP6F_DECODER 0
 +#define CONFIG_VP7_DECODER 0
-+#define CONFIG_VP8_DECODER 1
++#define CONFIG_VP8_DECODER 0
 +#define CONFIG_VP8_RKMPP_DECODER 0
 +#define CONFIG_VP8_V4L2M2M_DECODER 0
 +#define CONFIG_VP9_DECODER 0
@@ -7291,7 +7238,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_WMV1_DECODER 0
 +#define CONFIG_WMV2_DECODER 0
 +#define CONFIG_WMV3_DECODER 0
-+#define CONFIG_WMV3_CRYSTALHD_DECODER 0
 +#define CONFIG_WMV3IMAGE_DECODER 0
 +#define CONFIG_WNV1_DECODER 0
 +#define CONFIG_XAN_WC3_DECODER 0
@@ -7605,7 +7551,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_ASV2_ENCODER 0
 +#define CONFIG_AVRP_ENCODER 0
 +#define CONFIG_AVUI_ENCODER 0
-+#define CONFIG_AYUV_ENCODER 0
 +#define CONFIG_BITPACKED_ENCODER 0
 +#define CONFIG_BMP_ENCODER 0
 +#define CONFIG_CFHD_ENCODER 0
@@ -7615,6 +7560,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_DNXHD_ENCODER 0
 +#define CONFIG_DPX_ENCODER 0
 +#define CONFIG_DVVIDEO_ENCODER 0
++#define CONFIG_DXV_ENCODER 0
 +#define CONFIG_EXR_ENCODER 0
 +#define CONFIG_FFV1_ENCODER 0
 +#define CONFIG_FFVHUFF_ENCODER 0
@@ -7975,8 +7921,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_TAK_PARSER 0
 +#define CONFIG_VC1_PARSER 0
 +#define CONFIG_VORBIS_PARSER 1
-+#define CONFIG_VP3_PARSER 1
-+#define CONFIG_VP8_PARSER 1
++#define CONFIG_VP3_PARSER 0
++#define CONFIG_VP8_PARSER 0
 +#define CONFIG_VP9_PARSER 1
 +#define CONFIG_VVC_PARSER 0
 +#define CONFIG_WEBP_PARSER 0
@@ -8588,8 +8534,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_AVSYNCTEST_FILTER 0
 +#define CONFIG_AMOVIE_FILTER 0
 +#define CONFIG_MOVIE_FILTER 0
-+#define CONFIG_AFIFO_FILTER 0
-+#define CONFIG_FIFO_FILTER 0
 +#define CONFIG_AA_DEMUXER 0
 +#define CONFIG_AAC_DEMUXER 0
 +#define CONFIG_AAX_DEMUXER 0
@@ -8673,6 +8617,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_DV_DEMUXER 0
 +#define CONFIG_DVBSUB_DEMUXER 0
 +#define CONFIG_DVBTXT_DEMUXER 0
++#define CONFIG_DVDVIDEO_DEMUXER 0
 +#define CONFIG_DXA_DEMUXER 0
 +#define CONFIG_EA_DEMUXER 0
 +#define CONFIG_EA_CDATA_DEMUXER 0
@@ -8954,6 +8899,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_AC4_MUXER 0
 +#define CONFIG_ADTS_MUXER 0
 +#define CONFIG_ADX_MUXER 0
++#define CONFIG_AEA_MUXER 0
 +#define CONFIG_AIFF_MUXER 0
 +#define CONFIG_ALP_MUXER 0
 +#define CONFIG_AMR_MUXER 0
@@ -8993,7 +8939,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_F4V_MUXER 0
 +#define CONFIG_FFMETADATA_MUXER 0
 +#define CONFIG_FIFO_MUXER 0
-+#define CONFIG_FIFO_TEST_MUXER 0
 +#define CONFIG_FILMSTRIP_MUXER 0
 +#define CONFIG_FITS_MUXER 0
 +#define CONFIG_FLAC_MUXER 0
@@ -9083,6 +9028,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_PCM_U8_MUXER 0
 +#define CONFIG_PSP_MUXER 0
 +#define CONFIG_RAWVIDEO_MUXER 0
++#define CONFIG_RCWT_MUXER 0
 +#define CONFIG_RM_MUXER 0
 +#define CONFIG_ROQ_MUXER 0
 +#define CONFIG_RSO_MUXER 0
@@ -9182,22 +9128,15 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp
 +#define CONFIG_IPFS_GATEWAY_PROTOCOL 0
 +#define CONFIG_IPNS_GATEWAY_PROTOCOL 0
 +#endif /* FFMPEG_CONFIG_COMPONENTS_H */
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/bsf_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/bsf_list.c
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/bsf_list.c
 @@ -0,0 +1,2 @@
 +static const FFBitStreamFilter * const bitstream_filters[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/codec_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/codec_list.c
-@@ -0,0 +1,18 @@
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/codec_list.c
+@@ -0,0 +1,15 @@
 +static const FFCodec * const codec_list[] = {
-+    &ff_theora_decoder,
-+    &ff_vp3_decoder,
-+    &ff_vp8_decoder,
 +    &ff_flac_decoder,
 +    &ff_mp3_decoder,
 +    &ff_vorbis_decoder,
@@ -9212,26 +9151,20 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/
 +    &ff_pcm_u8_decoder,
 +    &ff_libopus_decoder,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/parser_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/parser_list.c
-@@ -0,0 +1,9 @@
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/parser_list.c
+@@ -0,0 +1,7 @@
 +static const AVCodecParser * const parser_list[] = {
 +    &ff_flac_parser,
 +    &ff_mpegaudio_parser,
 +    &ff_opus_parser,
 +    &ff_vorbis_parser,
-+    &ff_vp3_parser,
-+    &ff_vp8_parser,
 +    &ff_vp9_parser,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/demuxer_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/demuxer_list.c
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/demuxer_list.c
 @@ -0,0 +1,8 @@
-+static const AVInputFormat * const demuxer_list[] = {
++static const FFInputFormat * const demuxer_list[] = {
 +    &ff_flac_demuxer,
 +    &ff_matroska_demuxer,
 +    &ff_mov_demuxer,
@@ -9239,24 +9172,18 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat
 +    &ff_ogg_demuxer,
 +    &ff_wav_demuxer,
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/muxer_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/muxer_list.c
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/muxer_list.c
 @@ -0,0 +1,2 @@
 +static const FFOutputFormat * const muxer_list[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/protocol_list.c
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/protocol_list.c
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/protocol_list.c
 @@ -0,0 +1,2 @@
 +static const URLProtocol * const url_protocols[] = {
 +    NULL };
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/avconfig.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/avconfig.h
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/avconfig.h
 @@ -0,0 +1,6 @@
 +/* Generated by ffmpeg configure */
 +#ifndef AVUTIL_AVCONFIG_H
@@ -9264,30 +9191,83 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/a
 +#define AV_HAVE_BIGENDIAN 0
 +#define AV_HAVE_FAST_UNALIGNED 0
 +#endif /* AVUTIL_AVCONFIG_H */
-Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/ffversion.h
-===================================================================
 --- /dev/null
-+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/ffversion.h
++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/ffversion.h
 @@ -0,0 +1,5 @@
 +/* Automatically generated by version.sh, do not manually edit! */
 +#ifndef AVUTIL_FFVERSION_H
 +#define AVUTIL_FFVERSION_H
 +#define FFMPEG_VERSION "5.1.git"
 +#endif /* AVUTIL_FFVERSION_H */
-Index: src/third_party/ffmpeg/ffmpeg_generated.gni
-===================================================================
---- src.orig/third_party/ffmpeg/ffmpeg_generated.gni
-+++ src/third_party/ffmpeg/ffmpeg_generated.gni
-@@ -638,3 +638,64 @@ if (use_linux_config && current_cpu == "
-   ]
+--- a/media/ffmpeg/scripts/build_ffmpeg.py
++++ b/media/ffmpeg/scripts/build_ffmpeg.py
+@@ -43,7 +43,7 @@
+ 
+ ARCH_MAP = {
+     'android': ['ia32', 'x64', 'arm-neon', 'arm64'],
+-    'linux': ['ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64'],
++    'linux': ['ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64', 'riscv64'],
+     'mac': ['x64', 'arm64'],
+     'win': ['ia32', 'x64', 'arm64'],
  }
+@@ -672,7 +672,7 @@
+         '--disable-securetransport',
+         '--disable-faan',
+         '--disable-alsa',
+-        '--disable-iamf',
++        # '--disable-iamf',
  
+         # Disable automatically detected external libraries. This prevents
+         # automatic inclusion of things like hardware decoders. Each roll should
+@@ -898,6 +898,10 @@
+                     '--extra-cflags=--target=mips64el-linux-gnuabi64',
+                     '--extra-ldflags=--target=mips64el-linux-gnuabi64',
+                 ])
++        elif target_arch == 'riscv64':
++            configure_flags['Common'].extend([
++                '--arch=riscv64',
++            ])
+         else:
+             print('Error: Unknown target arch %r for target OS %r!' %
+                   (target_arch, target_os),
+--- a/third_party/ffmpeg/chromium/scripts/generate_gn.py
++++ b/third_party/ffmpeg/chromium/scripts/generate_gn.py
+@@ -77,7 +77,7 @@
+ _Attrs = ('ARCHITECTURE', 'TARGET', 'PLATFORM')
+ Attr = collections.namedtuple('Attr', _Attrs)(*_Attrs)
+ SUPPORT_MATRIX = {
+-    Attr.ARCHITECTURE: set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon']),
++    Attr.ARCHITECTURE: set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon', 'riscv64']),
+     Attr.TARGET: set(['Chromium', 'Chrome', 'ChromeOS']),
+     Attr.PLATFORM: set(['android', 'linux', 'win', 'mac'])
+ }
+--- a/media/ffmpeg/scripts/robo_lib/config.py
++++ b/media/ffmpeg/scripts/robo_lib/config.py
+@@ -189,6 +189,8 @@
+             self._host_architecture = "mips64el"
+         elif platform.machine().startswith("arm"):
+             self._host_architecture = "arm"
++        elif platform.machine() == "riscv64":
++            self._host_architecture = "riscv64"
+         else:
+             raise ValueError(
+                 f"Unrecognized CPU architecture: {platform.machine()}")
+--- a/third_party/ffmpeg/ffmpeg_generated.gni
++++ b/third_party/ffmpeg/ffmpeg_generated.gni
+@@ -697,3 +697,90 @@
+ if (use_linux_config && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") {
+   ffmpeg_asm_sources += [ "libavcodec/x86/simple_idct10.asm" ]
+ }
++
 +if (use_linux_config && current_cpu == "riscv64") {
 +  ffmpeg_c_sources += [
++    "libavcodec/riscv/aacencdsp_init.c",
 +    "libavcodec/riscv/aacpsdsp_init.c",
 +    "libavcodec/riscv/ac3dsp_init.c",
 +    "libavcodec/riscv/alacdsp_init.c",
 +    "libavcodec/riscv/audiodsp_init.c",
++    "libavcodec/riscv/blockdsp_init.c",
++    "libavcodec/riscv/bswapdsp_init.c",
 +    "libavcodec/riscv/exrdsp_init.c",
 +    "libavcodec/riscv/flacdsp_init.c",
 +    "libavcodec/riscv/fmtconvert_init.c",
@@ -9298,12 +9278,20 @@ Index: src/third_party/ffmpeg/ffmpeg_generated.gni
 +    "libavcodec/riscv/jpeg2000dsp_init.c",
 +    "libavcodec/riscv/llauddsp_init.c",
 +    "libavcodec/riscv/llviddsp_init.c",
++    "libavcodec/riscv/llvidencdsp_init.c",
++    "libavcodec/riscv/lpc_init.c",
++    "libavcodec/riscv/me_cmp_init.c",
 +    "libavcodec/riscv/opusdsp_init.c",
 +    "libavcodec/riscv/pixblockdsp_init.c",
++    "libavcodec/riscv/rv34dsp_init.c",
 +    "libavcodec/riscv/sbrdsp_init.c",
++    "libavcodec/riscv/svqenc_init.c",
++    "libavcodec/riscv/takdsp_init.c",
 +    "libavcodec/riscv/utvideodsp_init.c",
++    "libavcodec/riscv/vc1dsp_init.c",
 +    "libavcodec/riscv/vorbisdsp_init.c",
-+    "libavcodec/riscv/bswapdsp_init.c",
++    "libavcodec/riscv/vp8dsp_init.c",
++    "libavfilter/riscv/af_afir_init.c",
 +    "libavutil/riscv/cpu.c",
 +    "libavutil/riscv/fixed_dsp_init.c",
 +    "libavutil/riscv/float_dsp_init.c",
@@ -9314,11 +9302,14 @@ Index: src/third_party/ffmpeg/ffmpeg_generated.gni
 +    "libavutil/riscv/timer.h",
 +  ]
 +  ffmpeg_gas_sources += [
++    "libavcodec/riscv/aacencdsp_rvv.S",
 +    "libavcodec/riscv/aacpsdsp_rvv.S",
 +    "libavcodec/riscv/ac3dsp_rvb.S",
++    "libavcodec/riscv/ac3dsp_rvv.S",
 +    "libavcodec/riscv/alacdsp_rvv.S",
 +    "libavcodec/riscv/audiodsp_rvf.S",
 +    "libavcodec/riscv/audiodsp_rvv.S",
++    "libavcodec/riscv/blockdsp_rvv.S",
 +    "libavcodec/riscv/bswapdsp_rvb.S",
 +    "libavcodec/riscv/bswapdsp_rvv.S",
 +    "libavcodec/riscv/exrdsp_rvv.S",
@@ -9331,141 +9322,27 @@ Index: src/third_party/ffmpeg/ffmpeg_generated.gni
 +    "libavcodec/riscv/jpeg2000dsp_rvv.S",
 +    "libavcodec/riscv/llauddsp_rvv.S",
 +    "libavcodec/riscv/llviddsp_rvv.S",
++    "libavcodec/riscv/llvidencdsp_rvv.S",
++    "libavcodec/riscv/lpc_rvv.S",
++    "libavcodec/riscv/me_cmp_rvv.S",
 +    "libavcodec/riscv/opusdsp_rvv.S",
 +    "libavcodec/riscv/pixblockdsp_rvi.S",
 +    "libavcodec/riscv/pixblockdsp_rvv.S",
++    "libavcodec/riscv/rv34dsp_rvv.S",
 +    "libavcodec/riscv/sbrdsp_rvv.S",
++    "libavcodec/riscv/svqenc_rvv.S",
++    "libavcodec/riscv/takdsp_rvv.S",
 +    "libavcodec/riscv/utvideodsp_rvv.S",
++    "libavcodec/riscv/vc1dsp_rvv.S",
 +    "libavcodec/riscv/vorbisdsp_rvv.S",
++    "libavcodec/riscv/vp8dsp_rvv.S",
++    "libavfilter/riscv/af_afir_rvv.S",
 +    "libavutil/riscv/asm.S",
++    "libavutil/riscv/bswap_rvb.S",
 +    "libavutil/riscv/fixed_dsp_rvv.S",
 +    "libavutil/riscv/float_dsp_rvv.S",
++    "libswscale/riscv/rgb2rgb_rvb.S",
 +    "libswscale/riscv/rgb2rgb_rvv.S",
 +  ]
 +}
-Index: src/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
-===================================================================
---- src.orig/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
-+++ src/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py
-@@ -43,7 +43,7 @@ BRANDINGS = [
- ARCH_MAP = {
-     'android': ['ia32', 'x64', 'arm-neon', 'arm64'],
-     'linux': [
--        'ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64'
-+        'ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64', 'riscv64'
-     ],
-     'mac': ['x64', 'arm64'],
-     'win': ['ia32', 'x64', 'arm64'],
-@@ -889,6 +889,10 @@ def ConfigureAndBuild(target_arch, targe
-             '--extra-cflags=--target=mips64el-linux-gnuabi64',
-             '--extra-ldflags=--target=mips64el-linux-gnuabi64',
-         ])
-+    elif target_arch == 'riscv64':
-+      configure_flags['Common'].extend([
-+        '--arch=riscv64',
-+      ])
-     else:
-       print(
-           'Error: Unknown target arch %r for target OS %r!' % (target_arch,
-@@ -902,7 +906,7 @@ def ConfigureAndBuild(target_arch, targe
-         '--disable-inline-asm',
-     ])
- 
--  if 'win' not in target_os and 'android' not in target_os:
-+  if 'win' not in target_os and 'android' not in target_os and 'riscv64' not in target_arch:
-     configure_flags['Common'].extend([
-         '--enable-pic',
-         '--cc=clang',
-Index: src/third_party/ffmpeg/chromium/scripts/copy_config.sh
-===================================================================
---- src.orig/third_party/ffmpeg/chromium/scripts/copy_config.sh
-+++ src/third_party/ffmpeg/chromium/scripts/copy_config.sh
-@@ -10,7 +10,7 @@ for os in android linux linux-noasm mac
-     # Copy config files for various architectures:
-     #   - ia32/x64 have config.asm, config.h
-     #   - arm/arm-neon have config.h
--    for arch in arm arm-neon arm64 ia32 x64 mipsel mips64el; do
-+    for arch in arm arm-neon arm64 ia32 x64 mipsel mips64el riscv64; do
-       # Don't waste time on non-existent configs, if no config.h then skip.
-       [ ! -e "build.$arch.$os/$target/config.h" ] && continue
-       for f in config.h config_components.h config.asm libavutil/avconfig.h libavutil/ffversion.h libavcodec/bsf_list.c libavcodec/codec_list.c libavcodec/parser_list.c libavformat/demuxer_list.c libavformat/muxer_list.c libavformat/protocol_list.c; do
-Index: src/third_party/ffmpeg/chromium/scripts/generate_gn.py
-===================================================================
---- src.orig/third_party/ffmpeg/chromium/scripts/generate_gn.py
-+++ src/third_party/ffmpeg/chromium/scripts/generate_gn.py
-@@ -82,7 +82,7 @@ _Attrs = ('ARCHITECTURE', 'TARGET', 'PLA
- Attr = collections.namedtuple('Attr', _Attrs)(*_Attrs)
- SUPPORT_MATRIX = {
-     Attr.ARCHITECTURE:
--        set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon']),
-+        set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon', 'riscv64']),
-     Attr.TARGET:
-         set(['Chromium', 'Chrome', 'ChromeOS']),
-     Attr.PLATFORM:
-Index: src/third_party/ffmpeg/chromium/scripts/generate_gn_unittest.py
-===================================================================
---- src.orig/third_party/ffmpeg/chromium/scripts/generate_gn_unittest.py
-+++ src/third_party/ffmpeg/chromium/scripts/generate_gn_unittest.py
-@@ -329,6 +329,10 @@ class SourceSetUnittest(unittest.TestCas
-     f = SourceSet(
-         set(['common', 'arm-neon', 'chrome', 'chromeos']),
-         set([SourceListCondition('arm-neon', 'ChromeOS', 'linux')]))
-+    g = SourceSet(
-+        set(['common']),
-+        set([SourceListCondition('riscv64', 'Chromium', 'linux')]))
-+
- 
-     expected = set()
-     expected.add(
-@@ -340,7 +344,8 @@ class SourceSetUnittest(unittest.TestCas
-                 SourceListCondition('x64', 'Chromium', 'linux'),
-                 SourceListCondition('x64', 'Chrome', 'linux'),
-                 SourceListCondition('arm', 'Chromium', 'linux'),
--                SourceListCondition('arm-neon', 'ChromeOS', 'linux')
-+                SourceListCondition('arm-neon', 'ChromeOS', 'linux'),
-+                SourceListCondition('riscv64', 'Chromium', 'linux')
-             ])))
-     expected.add(
-         SourceSet(
-@@ -368,7 +373,7 @@ class SourceSetUnittest(unittest.TestCas
-             set(['arm-neon', 'chromeos']),
-             set([SourceListCondition('arm-neon', 'ChromeOS', 'linux')])))
- 
--    source_sets = gg.CreatePairwiseDisjointSets([a, b, c, d, e, f])
-+    source_sets = gg.CreatePairwiseDisjointSets([a, b, c, d, e, f, g])
-     self.assertEqualSourceSets(expected, set(source_sets))
- 
-   def testReduceConditions(self):
-@@ -381,6 +386,7 @@ class SourceSetUnittest(unittest.TestCas
-             SourceListCondition('arm', 'Chromium', 'linux'),
-             SourceListCondition('arm64', 'Chromium', 'linux'),
-             SourceListCondition('arm-neon', 'Chromium', 'linux'),
-+            SourceListCondition('riscv64', 'Chromium', 'linux'),
-         ]))
-     gg.ReduceConditionalLogic(a)
- 
-Index: src/third_party/ffmpeg/chromium/scripts/robo_lib/config.py
-===================================================================
---- src.orig/third_party/ffmpeg/chromium/scripts/robo_lib/config.py
-+++ src/third_party/ffmpeg/chromium/scripts/robo_lib/config.py
-@@ -162,6 +162,8 @@ class RoboConfiguration:
-       self._host_architecture = "mips64el"
-     elif platform.machine().startswith("arm"):
-       self._host_architecture = "arm"
-+    elif platform.machine() == "riscv64":
-+      self._host_architecture = "riscv64"
-     else:
-       raise ValueError(f"Unrecognized CPU architecture: {platform.machine()}")
- 
-@@ -235,9 +237,7 @@ class RoboConfiguration:
-   def EnsureNoMakeInfo(self):
-     """Ensure that makeinfo is not available."""
-     if os.system("makeinfo --version > /dev/null 2>&1") == 0:
--      raise errors.UserInstructions(
--          "makeinfo is available and we don't need it, so please remove it\nExample: sudo apt-get remove texinfo"
--      )
-+      pass
- 
-   def llvm_path(self):
-     return self._llvm_path
 

diff --git a/www-client/chromium/files/05riscv-sandbox.patch b/www-client/chromium/files/riscv-sandbox.patch
similarity index 79%
rename from www-client/chromium/files/05riscv-sandbox.patch
rename to www-client/chromium/files/riscv-sandbox.patch
index eb14a7d..0753bb1 100644
--- a/www-client/chromium/files/05riscv-sandbox.patch
+++ b/www-client/chromium/files/riscv-sandbox.patch
@@ -1,33 +1,13 @@
-From 50538ec46b4ef930fedf96aa8d5519f678240dfa Mon Sep 17 00:00:00 2001
-From: kxxt <rsworktech@outlook.com>
-Date: Sat, 12 Aug 2023 08:34:05 +0800
-Subject: [PATCH] upgpatch: fix sandbox for chromium
+From 90499f55f949f95b01c84257d306cf209c04b431 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@suse.de>
+Date: Fri, 04 Mar 2022 15:27:35 +0100
+Subject: [PATCH] Add support for riscv64-linux
 
+Change-Id: Ibcdaaba1b0c92a1cd85361b9859370c686832c49
 ---
- sandbox/features.gni                          |    3 +-
- sandbox/linux/bpf_dsl/linux_syscall_ranges.h  |    7 +
- sandbox/linux/bpf_dsl/seccomp_macros.h        |   40 +
- .../seccomp-bpf-helpers/baseline_policy.cc    |   11 +-
- .../syscall_parameters_restrictions.cc        |    3 +-
- .../linux/seccomp-bpf-helpers/syscall_sets.cc |   69 +-
- .../linux/seccomp-bpf-helpers/syscall_sets.h  |   14 +-
- sandbox/linux/seccomp-bpf/syscall.cc          |   36 +-
- sandbox/linux/services/credentials.cc         |    2 +-
- sandbox/linux/services/syscall_wrappers.cc    |    2 +-
- .../linux/syscall_broker/broker_process.cc    |   20 +-
- sandbox/linux/system_headers/linux_seccomp.h  |    8 +
- sandbox/linux/system_headers/linux_signal.h   |    2 +-
- sandbox/linux/system_headers/linux_stat.h     |    2 +-
- sandbox/linux/system_headers/linux_syscalls.h |    4 +
- .../system_headers/riscv64_linux_syscalls.h   | 1222 +++++++++++++++++
- .../linux/bpf_cros_amd_gpu_policy_linux.cc    |    2 +-
- sandbox/policy/linux/bpf_gpu_policy_linux.cc  |    2 +-
- .../policy/linux/bpf_network_policy_linux.cc  |    2 +-
- 19 files changed, 1397 insertions(+), 54 deletions(-)
- create mode 100644 sandbox/linux/system_headers/riscv64_linux_syscalls.h
 
 diff --git a/sandbox/features.gni b/sandbox/features.gni
-index 8434144118b49..8aa52983f78f8 100644
+index 8434144..8aa52983 100644
 --- a/sandbox/features.gni
 +++ b/sandbox/features.gni
 @@ -9,7 +9,8 @@
@@ -41,7 +21,7 @@ index 8434144118b49..8aa52983f78f8 100644
  # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4.
  # As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site
 diff --git a/sandbox/linux/bpf_dsl/linux_syscall_ranges.h b/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
-index 1d0590b7dd6ce..b722fbc95ee3e 100644
+index 1d0590b..b722fbc9 100644
 --- a/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
 +++ b/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
 @@ -56,6 +56,13 @@
@@ -59,10 +39,10 @@ index 1d0590b7dd6ce..b722fbc95ee3e 100644
  #error "Unsupported architecture"
  #endif
 diff --git a/sandbox/linux/bpf_dsl/seccomp_macros.h b/sandbox/linux/bpf_dsl/seccomp_macros.h
-index 87d5825aa3ddb..cc9b89ba3714a 100644
+index 87d5825..49fc9a6 100644
 --- a/sandbox/linux/bpf_dsl/seccomp_macros.h
 +++ b/sandbox/linux/bpf_dsl/seccomp_macros.h
-@@ -343,6 +343,46 @@ struct regs_struct {
+@@ -343,6 +343,48 @@
  #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
  #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
  #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
@@ -85,6 +65,7 @@ index 87d5825aa3ddb..cc9b89ba3714a 100644
 +#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, REG_A0+3)
 +#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, REG_A0+4)
 +#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, REG_A0+5)
++#define SECCOMP_PARM7(_ctx) SECCOMP_REG(_ctx, REG_A0+6)
 +
 +#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
 +#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
@@ -106,24 +87,82 @@ index 87d5825aa3ddb..cc9b89ba3714a 100644
 +#define SECCOMP_PT_PARM4(_regs) (_regs).regs[REG_A0+3]
 +#define SECCOMP_PT_PARM5(_regs) (_regs).regs[REG_A0+4]
 +#define SECCOMP_PT_PARM6(_regs) (_regs).regs[REG_A0+5]
++#define SECCOMP_PT_PARM7(_regs) (_regs).regs[REG_A0+6]
  #else
  #error Unsupported target platform
  
+diff --git a/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc b/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc
+index 4a2721c..8ef9f51a 100644
+--- a/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc
++++ b/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc
+@@ -17,6 +17,7 @@
+ #include <sys/types.h>
+ #include <sys/utsname.h>
+ #include <unistd.h>
++#include <linux/elf.h>
+ 
+ #include <memory>
+ #include <vector>
+@@ -2029,7 +2030,15 @@
+     BPF_ASSERT_EQ(kTraceData, data);
+ 
+     regs_struct regs;
++#if defined(__riscv)
++    iovec iov;
++    iov.iov_base = &regs;
++    iov.iov_len = sizeof(regs);
++    BPF_ASSERT_NE(-1, ptrace(PTRACE_GETREGSET, pid,
++                             reinterpret_case<void*>(NT_PRSTATUS), &iov));
++#else
+     BPF_ASSERT_NE(-1, ptrace(PTRACE_GETREGS, pid, NULL, &regs));
++#endif
+     switch (SECCOMP_PT_SYSCALL(regs)) {
+       case __NR_write:
+         // Skip writes to stdout, make it return kExpectedReturnValue.  Allow
+@@ -2037,7 +2046,14 @@
+         if (SECCOMP_PT_PARM1(regs) == STDOUT_FILENO) {
+           BPF_ASSERT_NE(-1, SetSyscall(pid, &regs, -1));
+           SECCOMP_PT_RESULT(regs) = kExpectedReturnValue;
++#if defined(__riscv)
++          iov.iov_len = sizeof(regs);
++          BPF_ASSERT_NE(-1, ptrace(PTRACE_SETREGSET, pid,
++                                   reinterpret_cast<void*>(NT_PRSTATUS),
++                                   &iov));
++#else
+           BPF_ASSERT_NE(-1, ptrace(PTRACE_SETREGS, pid, NULL, &regs));
++#endif
+         }
+         break;
+ 
+@@ -2045,7 +2061,13 @@
+         // Rewrite to exit(kExpectedReturnValue).
+         BPF_ASSERT_NE(-1, SetSyscall(pid, &regs, __NR_exit));
+         SECCOMP_PT_PARM1(regs) = kExpectedReturnValue;
++#if defined(__riscv)
++        iov.iov_len = sizeof(regs);
++        BPF_ASSERT_NE(-1, ptrace(PTRACE_SETREGSET, pid,
++                                 reinterpret_cast<void*>(NT_PRSTATUS), &iov));
++#else
+         BPF_ASSERT_NE(-1, ptrace(PTRACE_SETREGS, pid, NULL, &regs));
++#endif
+         break;
+ 
+       default:
 diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
-index 7bde501115bdf..b92ab3901acd8 100644
+index 7bde501..b92ab39 100644
 --- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
 +++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
-@@ -59,6 +59,9 @@ bool IsBaselinePolicyAllowed(int sysno) {
- #endif
+@@ -60,6 +60,9 @@
  #if defined(__mips__)
           SyscallSets::IsMipsPrivate(sysno) ||
-+#endif
+ #endif
 +#if defined(__riscv)
 +         SyscallSets::IsRiscvPrivate(sysno) ||
- #endif
++#endif
           SyscallSets::IsAllowedOperationOnFd(sysno);
    // clang-format on
-@@ -193,7 +196,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
+ }
+@@ -193,7 +196,7 @@
      return RestrictFcntlCommands();
  #endif
  
@@ -132,7 +171,7 @@ index 7bde501115bdf..b92ab3901acd8 100644
    // fork() is never used as a system call (clone() is used instead), but we
    // have seen it in fallback code on Android.
    if (sysno == __NR_fork) {
-@@ -255,7 +258,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
+@@ -255,7 +258,7 @@
    }
  
  #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -141,7 +180,7 @@ index 7bde501115bdf..b92ab3901acd8 100644
    if (sysno == __NR_mmap)
      return RestrictMmapFlags();
  #endif
-@@ -276,7 +279,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
+@@ -276,7 +279,7 @@
      return RestrictPrctl();
  
  #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
@@ -150,7 +189,7 @@ index 7bde501115bdf..b92ab3901acd8 100644
    if (sysno == __NR_socketpair) {
      // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
      static_assert(AF_UNIX == PF_UNIX,
-@@ -366,7 +369,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno,
+@@ -366,7 +369,7 @@
    // Allow creating pipes, but don't allow weird flags to pipe2().
    // O_NOTIFICATION_PIPE (== O_EXCL) can be used to create
    // "notification pipes", which are rarely used.
@@ -159,8 +198,39 @@ index 7bde501115bdf..b92ab3901acd8 100644
    if (sysno == __NR_pipe) {
      return Allow();
    }
+diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
+index a0a8796..8bea4c9 100644
+--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
++++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
+@@ -270,7 +270,7 @@
+ }
+ 
+ // Not all architectures can restrict the domain for socketpair().
+-#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
++#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
+ BPF_DEATH_TEST_C(BaselinePolicy,
+                  SocketpairWrongDomain,
+                  DEATH_SEGV_MESSAGE(GetErrorMessageContentForTests()),
+@@ -279,7 +279,7 @@
+   std::ignore = socketpair(AF_INET, SOCK_STREAM, 0, sv);
+   _exit(1);
+ }
+-#endif  // defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
++#endif  // defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
+ 
+ BPF_TEST_C(BaselinePolicy, EPERM_open, BaselinePolicy) {
+   errno = 0;
+@@ -343,7 +343,7 @@
+ TEST_BASELINE_SIGSYS(__NR_syslog)
+ TEST_BASELINE_SIGSYS(__NR_timer_create)
+ 
+-#if !defined(__aarch64__)
++#if !defined(__aarch64__) && !defined(__riscv)
+ TEST_BASELINE_SIGSYS(__NR_inotify_init)
+ TEST_BASELINE_SIGSYS(__NR_vserver)
+ #endif
 diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
-index 026e86bd85bec..ebb72ddcd5f67 100644
+index 74112e8..b451c19 100644
 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
 +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
 @@ -37,6 +37,7 @@
@@ -171,20 +241,35 @@ index 026e86bd85bec..ebb72ddcd5f67 100644
      !defined(PTRACE_GET_THREAD_AREA)
  // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
  // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
-@@ -449,7 +450,7 @@ ResultExpr RestrictPtrace() {
+@@ -463,8 +464,10 @@
  #endif
    return Switch(request)
        .Cases({
 -#if !defined(__aarch64__)
 +#if !defined(__aarch64__) && !defined(__riscv)
                   PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
++#endif
++#if !defined(__aarch64__)
                   PTRACE_GETREGSET,
  #endif
+ #if defined(__arm__)
+diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
+index 10e64a2c..ddfd6a7 100644
+--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
++++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
+@@ -7,6 +7,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <linux/elf.h>
++#include <asm/ptrace.h>
+ #include <sched.h>
+ #include <sys/prctl.h>
+ #include <sys/ptrace.h>
 diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
-index 27ea264070dcd..8fc2d3c354adb 100644
+index 4cde283..bc680424 100644
 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
 +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
-@@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) {
+@@ -103,7 +103,7 @@
  // Both EPERM and ENOENT are valid errno unless otherwise noted in comment.
  bool SyscallSets::IsFileSystem(int sysno) {
    switch (sysno) {
@@ -193,7 +278,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_access:  // EPERM not a valid errno.
      case __NR_chmod:
      case __NR_chown:
-@@ -136,7 +136,7 @@ bool SyscallSets::IsFileSystem(int sysno) {
+@@ -136,7 +136,7 @@
      case __NR_faccessat2:
      case __NR_fchmodat:
      case __NR_fchownat:  // Should be called chownat ?
@@ -202,7 +287,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_newfstatat:  // fstatat(). EPERM not a valid errno.
  #elif defined(__i386__) || defined(__arm__) || \
      (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
-@@ -241,7 +241,7 @@ bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) {
+@@ -241,7 +241,7 @@
      case __NR_oldfstat:
  #endif
  #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -211,7 +296,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_sync_file_range:  // EPERM not a valid errno.
  #elif defined(__arm__)
      case __NR_arm_sync_file_range:  // EPERM not a valid errno.
-@@ -260,7 +260,7 @@ bool SyscallSets::IsDeniedFileSystemAccessViaFd(int sysno) {
+@@ -260,7 +260,7 @@
  #if defined(__i386__) || defined(__arm__)
      case __NR_fchown32:
  #endif
@@ -220,7 +305,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_getdents:    // EPERM not a valid errno.
  #endif
      case __NR_getdents64:  // EPERM not a valid errno.
-@@ -339,7 +339,7 @@ bool SyscallSets::IsProcessPrivilegeChange(int sysno) {
+@@ -339,7 +339,7 @@
  bool SyscallSets::IsProcessGroupOrSession(int sysno) {
    switch (sysno) {
      case __NR_setpgid:
@@ -229,7 +314,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_getpgrp:
  #endif
      case __NR_setsid:
-@@ -373,7 +373,7 @@ bool SyscallSets::IsAllowedSignalHandling(int sysno) {
+@@ -373,7 +373,7 @@
      case __NR_rt_sigqueueinfo:
      case __NR_rt_sigsuspend:
      case __NR_rt_tgsigqueueinfo:
@@ -238,7 +323,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_signalfd:
  #endif
      case __NR_signalfd4:
-@@ -397,12 +397,12 @@ bool SyscallSets::IsAllowedOperationOnFd(int sysno) {
+@@ -397,12 +397,12 @@
    switch (sysno) {
      case __NR_close:
      case __NR_dup:
@@ -253,7 +338,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_shutdown:
  #endif
        return true;
-@@ -441,7 +441,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
+@@ -441,7 +441,7 @@
        return true;
      case __NR_clone:  // Should be parameter-restricted.
      case __NR_setns:  // Privileged.
@@ -262,7 +347,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_fork:
  #endif
  #if defined(__i386__) || defined(__x86_64__)
-@@ -452,7 +452,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
+@@ -452,7 +452,7 @@
  #endif
      case __NR_set_tid_address:
      case __NR_unshare:
@@ -271,7 +356,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_vfork:
  #endif
      default:
-@@ -477,7 +477,7 @@ bool SyscallSets::IsAllowedFutex(int sysno) {
+@@ -477,7 +477,7 @@
  
  bool SyscallSets::IsAllowedEpoll(int sysno) {
    switch (sysno) {
@@ -280,7 +365,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_epoll_create:
      case __NR_epoll_wait:
  #endif
-@@ -499,7 +499,7 @@ bool SyscallSets::IsAllowedEpoll(int sysno) {
+@@ -499,7 +499,7 @@
  bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
    switch (sysno) {
  #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
@@ -289,7 +374,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_accept:
      case __NR_accept4:
      case __NR_bind:
-@@ -553,7 +553,7 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
+@@ -553,7 +553,7 @@
      case __NR_mincore:
      case __NR_mlockall:
  #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -298,7 +383,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_mmap:
  #endif
  #if defined(__i386__) || defined(__arm__) || \
-@@ -586,7 +586,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
+@@ -586,7 +586,7 @@
      (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
      case __NR__llseek:
  #endif
@@ -307,7 +392,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_poll:
  #endif
      case __NR_ppoll:
-@@ -607,7 +607,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
+@@ -607,7 +607,7 @@
      case __NR_recv:
  #endif
  #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
@@ -316,7 +401,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_recvfrom:  // Could specify source.
      case __NR_recvmsg:   // Could specify source.
  #endif
-@@ -622,7 +622,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) {
+@@ -622,7 +622,7 @@
      case __NR_send:
  #endif
  #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
@@ -325,7 +410,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_sendmsg:  // Could specify destination.
      case __NR_sendto:   // Could specify destination.
  #endif
-@@ -671,7 +671,7 @@ bool SyscallSets::IsSeccomp(int sysno) {
+@@ -671,7 +671,7 @@
  bool SyscallSets::IsAllowedBasicScheduler(int sysno) {
    switch (sysno) {
      case __NR_sched_yield:
@@ -334,7 +419,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_pause:
  #endif
      case __NR_nanosleep:
-@@ -755,7 +755,7 @@ bool SyscallSets::IsNuma(int sysno) {
+@@ -755,7 +755,7 @@
      case __NR_getcpu:
      case __NR_mbind:
  #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -343,7 +428,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_migrate_pages:
  #endif
      case __NR_move_pages:
-@@ -790,7 +790,7 @@ bool SyscallSets::IsGlobalProcessEnvironment(int sysno) {
+@@ -790,7 +790,7 @@
    switch (sysno) {
      case __NR_acct:  // Privileged.
  #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
@@ -352,7 +437,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_getrlimit:
  #endif
  #if defined(__i386__) || defined(__arm__)
-@@ -825,7 +825,7 @@ bool SyscallSets::IsDebug(int sysno) {
+@@ -825,7 +825,7 @@
  
  bool SyscallSets::IsGlobalSystemStatus(int sysno) {
    switch (sysno) {
@@ -361,7 +446,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR__sysctl:
      case __NR_sysfs:
  #endif
-@@ -843,7 +843,7 @@ bool SyscallSets::IsGlobalSystemStatus(int sysno) {
+@@ -843,7 +843,7 @@
  
  bool SyscallSets::IsEventFd(int sysno) {
    switch (sysno) {
@@ -370,47 +455,40 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_eventfd:
  #endif
      case __NR_eventfd2:
-@@ -895,7 +895,8 @@ bool SyscallSets::IsKeyManagement(int sysno) {
+@@ -895,6 +895,7 @@
  }
  
  #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
--    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
-+    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
-+    defined(__riscv)
++    defined(__riscv) ||                                                \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
  bool SyscallSets::IsSystemVSemaphores(int sysno) {
    switch (sysno) {
-     case __NR_semctl:
-@@ -915,7 +916,8 @@ bool SyscallSets::IsSystemVSemaphores(int sysno) {
+@@ -914,7 +915,7 @@
+ #endif
  
  #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
-     defined(__aarch64__) ||                                         \
--    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
-+    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
-+    defined(__riscv)
+-    defined(__aarch64__) ||                                         \
++    defined(__aarch64__) || defined(__riscv) ||                     \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
  // These give a lot of ambient authority and bypass the setuid sandbox.
  bool SyscallSets::IsSystemVSharedMemory(int sysno) {
-   switch (sysno) {
-@@ -931,7 +933,8 @@ bool SyscallSets::IsSystemVSharedMemory(int sysno) {
+@@ -931,6 +932,7 @@
  #endif
  
  #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
--    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
-+    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
-+    defined(__riscv)
++    defined(__riscv) ||                                                \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
  bool SyscallSets::IsSystemVMessageQueue(int sysno) {
    switch (sysno) {
-     case __NR_msgctl:
-@@ -962,7 +965,8 @@ bool SyscallSets::IsSystemVIpc(int sysno) {
+@@ -962,6 +964,7 @@
  
  bool SyscallSets::IsAnySystemV(int sysno) {
  #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
--    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
-+    (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
-+    defined(__riscv)
++    defined(__riscv) ||                                                \
+     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
    return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
           IsSystemVSharedMemory(sysno);
- #elif defined(__i386__) || \
-@@ -999,7 +1003,7 @@ bool SyscallSets::IsAdvancedScheduler(int sysno) {
+@@ -999,7 +1002,7 @@
  bool SyscallSets::IsInotify(int sysno) {
    switch (sysno) {
      case __NR_inotify_add_watch:
@@ -419,7 +497,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_inotify_init:
  #endif
      case __NR_inotify_init1:
-@@ -1137,7 +1141,7 @@ bool SyscallSets::IsMisc(int sysno) {
+@@ -1134,7 +1137,7 @@
  #if defined(__x86_64__)
      case __NR_tuxcall:
  #endif
@@ -428,13 +506,14 @@ index 27ea264070dcd..8fc2d3c354adb 100644
      case __NR_vserver:
  #endif
        return true;
-@@ -1196,6 +1200,17 @@ bool SyscallSets::IsMipsMisc(int sysno) {
+@@ -1193,6 +1196,18 @@
  }
  #endif  // defined(__mips__)
  
 +#if defined(__riscv)
 +bool SyscallSets::IsRiscvPrivate(int sysno) {
 +  switch (sysno) {
++    case __NR_riscv_hwprobe:
 +    case __NR_riscv_flush_icache:
 +      return true;
 +    default:
@@ -447,10 +526,10 @@ index 27ea264070dcd..8fc2d3c354adb 100644
    switch (sysno) {
      case __NR_getitimer:
 diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
-index 9be7b03ec4377..41b3605dce15d 100644
+index 9be7b03..41b3605 100644
 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
 +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
-@@ -52,7 +52,7 @@ class SANDBOX_EXPORT SyscallSets {
+@@ -52,7 +52,7 @@
  #endif
  
  #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
@@ -459,7 +538,7 @@ index 9be7b03ec4377..41b3605dce15d 100644
    static bool IsNetworkSocketInformation(int sysno);
  #endif
  
-@@ -79,18 +79,21 @@ class SANDBOX_EXPORT SyscallSets {
+@@ -79,18 +79,21 @@
    static bool IsAsyncIo(int sysno);
    static bool IsKeyManagement(int sysno);
  #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \
@@ -484,7 +563,7 @@ index 9be7b03ec4377..41b3605dce15d 100644
    static bool IsSystemVMessageQueue(int sysno);
  #endif
  
-@@ -117,6 +120,9 @@ class SANDBOX_EXPORT SyscallSets {
+@@ -117,6 +120,9 @@
    static bool IsMipsPrivate(int sysno);
    static bool IsMipsMisc(int sysno);
  #endif  // defined(__mips__)
@@ -495,10 +574,10 @@ index 9be7b03ec4377..41b3605dce15d 100644
  };
  
 diff --git a/sandbox/linux/seccomp-bpf/syscall.cc b/sandbox/linux/seccomp-bpf/syscall.cc
-index 02cbb047c1558..57da8c1754f46 100644
+index 02cbb04..9eb97f27 100644
 --- a/sandbox/linux/seccomp-bpf/syscall.cc
 +++ b/sandbox/linux/seccomp-bpf/syscall.cc
-@@ -18,7 +18,7 @@ namespace sandbox {
+@@ -18,7 +18,7 @@
  namespace {
  
  #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
@@ -507,7 +586,7 @@ index 02cbb047c1558..57da8c1754f46 100644
  // Number that's not currently used by any Linux kernel ABIs.
  const int kInvalidSyscallNumber = 0x351d3;
  #else
-@@ -308,6 +308,28 @@ asm(// We need to be able to tell the kernel exactly where we made a
+@@ -308,6 +308,28 @@
      "2:ret\n"
      ".cfi_endproc\n"
      ".size SyscallAsm, .-SyscallAsm\n"
@@ -518,16 +597,16 @@ index 02cbb047c1558..57da8c1754f46 100644
 +    "SyscallAsm:\n"
 +    ".cfi_startproc\n"
 +    "bgez a0,1f\n"
-+    "la a0,2f\n"
++    "lla a0,2f\n"
 +    "j 2f\n"
 +    "1:mv a7, a0\n"
-+    "ld a0, (t0)\n"
-+    "ld a1, 8(t0)\n"
-+    "ld a2, 16(t0)\n"
-+    "ld a3, 24(t0)\n"
-+    "ld a4, 32(t0)\n"
-+    "ld a5, 40(t0)\n"
-+    "ld a6, 48(t0)\n"
++    "ld a0, (a1)\n"
++    "ld a2, 16(a1)\n"
++    "ld a3, 24(a1)\n"
++    "ld a4, 32(a1)\n"
++    "ld a5, 40(a1)\n"
++    "ld a6, 48(a1)\n"
++    "ld a1, 8(a1)\n"
 +    // Enter the kernel
 +    "scall\n"
 +    "2:ret\n"
@@ -536,30 +615,65 @@ index 02cbb047c1558..57da8c1754f46 100644
  #endif
      );  // asm
  
-@@ -425,6 +447,18 @@ intptr_t Syscall::Call(int nr,
+@@ -319,6 +341,10 @@
+ extern "C" {
+ intptr_t SyscallAsm(intptr_t nr, const intptr_t args[8]);
+ }
++#elif defined(__riscv)
++extern "C" {
++intptr_t SyscallAsm(intptr_t nr, const intptr_t args[7]);
++}
+ #endif
+ 
+ }  // namespace
+@@ -351,6 +377,10 @@
+   //                 where that makes sense.
+ #if defined(__mips__)
+   const intptr_t args[8] = {p0, p1, p2, p3, p4, p5, p6, p7};
++#elif defined(__riscv)
++  DCHECK_EQ(p7, 0) << " Support for syscalls with more than seven arguments "
++                      "not added for this architecture";
++  const intptr_t args[7] = {p0, p1, p2, p3, p4, p5, p6};
+ #else
+   DCHECK_EQ(p6, 0) << " Support for syscalls with more than six arguments not "
+                       "added for this architecture";
+@@ -425,6 +455,8 @@
      ret = inout;
    }
  
 +#elif defined(__riscv)
-+  intptr_t ret;
-+  {
-+    register intptr_t inout __asm__("a0") = nr;
-+    register const intptr_t* data __asm__("t0") = args;
-+    asm volatile("jal SyscallAsm\n"
-+                 : "=r"(inout)
-+                 : "0"(inout), "r"(data)
-+                 : "memory", "a1", "a2", "a3", "a4", "a5", "a6", "a7");
-+    ret = inout;
-+  }
-+
++  intptr_t ret = SyscallAsm(nr, args);
  #else
  #error "Unimplemented architecture"
  #endif
+diff --git a/sandbox/linux/seccomp-bpf/trap.cc b/sandbox/linux/seccomp-bpf/trap.cc
+index d466e62..a5ed98b7 100644
+--- a/sandbox/linux/seccomp-bpf/trap.cc
++++ b/sandbox/linux/seccomp-bpf/trap.cc
+@@ -216,6 +216,18 @@
+                        SECCOMP_PARM6(ctx),
+                        SECCOMP_PARM7(ctx),
+                        SECCOMP_PARM8(ctx));
++#elif defined(__riscv)
++    // RISC-V supports up to seven arguments for syscall.
++    // However, seccomp bpf can filter only up to six arguments, so using seven
++    // arguments has sense only when using UnsafeTrap() handler.
++    rc = Syscall::Call(SECCOMP_SYSCALL(ctx),
++                       SECCOMP_PARM1(ctx),
++                       SECCOMP_PARM2(ctx),
++                       SECCOMP_PARM3(ctx),
++                       SECCOMP_PARM4(ctx),
++                       SECCOMP_PARM5(ctx),
++                       SECCOMP_PARM6(ctx),
++                       SECCOMP_PARM7(ctx));
+ #else
+     rc = Syscall::Call(SECCOMP_SYSCALL(ctx),
+                        SECCOMP_PARM1(ctx),
 diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
-index e284c59d239ae..5b5346a2778bc 100644
+index a33597c..d4180ac 100644
 --- a/sandbox/linux/services/credentials.cc
 +++ b/sandbox/linux/services/credentials.cc
-@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() {
+@@ -80,7 +80,7 @@
    pid_t pid = -1;
    alignas(16) char stack_buf[PTHREAD_STACK_MIN];
  #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
@@ -569,10 +683,10 @@ index e284c59d239ae..5b5346a2778bc 100644
    void* stack = stack_buf + sizeof(stack_buf);
  #else
 diff --git a/sandbox/linux/services/syscall_wrappers.cc b/sandbox/linux/services/syscall_wrappers.cc
-index 7650e983b3802..bb4bd33236381 100644
+index 7650e98..bb4bd332 100644
 --- a/sandbox/linux/services/syscall_wrappers.cc
 +++ b/sandbox/linux/services/syscall_wrappers.cc
-@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags,
+@@ -61,7 +61,7 @@
  #if defined(ARCH_CPU_X86_64)
    return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
  #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
@@ -582,10 +696,10 @@ index 7650e983b3802..bb4bd33236381 100644
    return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
  #endif
 diff --git a/sandbox/linux/syscall_broker/broker_process.cc b/sandbox/linux/syscall_broker/broker_process.cc
-index a55b548a8ec75..39279b947828e 100644
+index c6c1117..779065a 100644
 --- a/sandbox/linux/syscall_broker/broker_process.cc
 +++ b/sandbox/linux/syscall_broker/broker_process.cc
-@@ -122,44 +122,46 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const {
+@@ -122,44 +122,46 @@
    // and are default disabled in Android. So, we should refuse to broker them
    // to be consistent with the platform's restrictions.
    switch (sysno) {
@@ -639,7 +753,7 @@ index a55b548a8ec75..39279b947828e 100644
      case __NR_stat:
      case __NR_lstat:
  #endif
-@@ -169,7 +171,7 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const {
+@@ -169,7 +171,7 @@
  #if defined(__NR_fstatat64)
      case __NR_fstatat64:
  #endif
@@ -648,7 +762,7 @@ index a55b548a8ec75..39279b947828e 100644
      case __NR_newfstatat:
  #endif
        return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
-@@ -184,7 +186,7 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const {
+@@ -184,7 +186,7 @@
        return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
  #endif
  
@@ -658,7 +772,7 @@ index a55b548a8ec75..39279b947828e 100644
        return !fast_check || policy_->allowed_command_set.test(COMMAND_UNLINK);
  #endif
 diff --git a/sandbox/linux/system_headers/linux_seccomp.h b/sandbox/linux/system_headers/linux_seccomp.h
-index 8690a96eb01b1..dec2afc744985 100644
+index 8690a96..dec2afc7 100644
 --- a/sandbox/linux/system_headers/linux_seccomp.h
 +++ b/sandbox/linux/system_headers/linux_seccomp.h
 @@ -39,6 +39,10 @@
@@ -684,7 +798,7 @@ index 8690a96eb01b1..dec2afc744985 100644
  #ifndef PR_SET_SECCOMP
  #define PR_SET_SECCOMP               22
 diff --git a/sandbox/linux/system_headers/linux_signal.h b/sandbox/linux/system_headers/linux_signal.h
-index 69ccaf1081578..2ffe30973cd32 100644
+index 69ccaf1..2ffe3097 100644
 --- a/sandbox/linux/system_headers/linux_signal.h
 +++ b/sandbox/linux/system_headers/linux_signal.h
 @@ -13,7 +13,7 @@
@@ -697,10 +811,10 @@ index 69ccaf1081578..2ffe30973cd32 100644
  #define LINUX_SIGHUP 1
  #define LINUX_SIGINT 2
 diff --git a/sandbox/linux/system_headers/linux_stat.h b/sandbox/linux/system_headers/linux_stat.h
-index 3aae8cbced775..74977adb53caf 100644
+index 3aae8cb..74977adb 100644
 --- a/sandbox/linux/system_headers/linux_stat.h
 +++ b/sandbox/linux/system_headers/linux_stat.h
-@@ -150,7 +150,7 @@ struct kernel_stat {
+@@ -150,7 +150,7 @@
    int st_blocks;
    int st_pad4[14];
  };
@@ -710,7 +824,7 @@ index 3aae8cbced775..74977adb53caf 100644
    unsigned long st_dev;
    unsigned long st_ino;
 diff --git a/sandbox/linux/system_headers/linux_syscalls.h b/sandbox/linux/system_headers/linux_syscalls.h
-index 438147b4018b6..d6de8c1cb2340 100644
+index 438147b..d6de8c1 100644
 --- a/sandbox/linux/system_headers/linux_syscalls.h
 +++ b/sandbox/linux/system_headers/linux_syscalls.h
 @@ -35,5 +35,9 @@
@@ -725,10 +839,10 @@ index 438147b4018b6..d6de8c1cb2340 100644
  
 diff --git a/sandbox/linux/system_headers/riscv64_linux_syscalls.h b/sandbox/linux/system_headers/riscv64_linux_syscalls.h
 new file mode 100644
-index 0000000000000..822f660dc5086
+index 0000000..50e043d0
 --- /dev/null
 +++ b/sandbox/linux/system_headers/riscv64_linux_syscalls.h
-@@ -0,0 +1,1222 @@
+@@ -0,0 +1,1226 @@
 +// Copyright 2014 The Chromium Authors
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -1714,6 +1828,10 @@ index 0000000000000..822f660dc5086
 +#define __NR_recvmmsg 243
 +#endif
 +
++#if !defined(__NR_riscv_hwprobe)
++#define __NR_riscv_hwprobe 258
++#endif
++
 +#if !defined(__NR_riscv_flush_icache)
 +#define __NR_riscv_flush_icache 259
 +#endif
@@ -1951,11 +2069,24 @@ index 0000000000000..822f660dc5086
 +#endif
 +
 +#endif  // SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_
+diff --git a/sandbox/policy/linux/bpf_cdm_policy_linux.cc b/sandbox/policy/linux/bpf_cdm_policy_linux.cc
+index 433720f..482ce1d 100644
+--- a/sandbox/policy/linux/bpf_cdm_policy_linux.cc
++++ b/sandbox/policy/linux/bpf_cdm_policy_linux.cc
+@@ -33,7 +33,7 @@
+     case __NR_ftruncate:
+     case __NR_fallocate:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_getrlimit:
+ #endif
+ #if defined(__i386__) || defined(__arm__)
 diff --git a/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc b/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
-index df2567f74981f..41e158a292369 100644
+index df2567f..41e158a 100644
 --- a/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
 +++ b/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
-@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::EvaluateSyscall(int sysno) const {
+@@ -38,7 +38,7 @@
      case __NR_sched_setscheduler:
      case __NR_sysinfo:
      case __NR_uname:
@@ -1965,10 +2096,10 @@ index df2567f74981f..41e158a292369 100644
      case __NR_stat:
  #endif
 diff --git a/sandbox/policy/linux/bpf_gpu_policy_linux.cc b/sandbox/policy/linux/bpf_gpu_policy_linux.cc
-index 35ccbb7a7f82b..65a0587e25af5 100644
+index 35ccbb7..65a0587 100644
 --- a/sandbox/policy/linux/bpf_gpu_policy_linux.cc
 +++ b/sandbox/policy/linux/bpf_gpu_policy_linux.cc
-@@ -73,7 +73,7 @@ ResultExpr GpuProcessPolicy::EvaluateSyscall(int sysno) const {
+@@ -73,7 +73,7 @@
      (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
      case __NR_ftruncate64:
  #endif
@@ -1978,10 +2109,10 @@ index 35ccbb7a7f82b..65a0587e25af5 100644
  #endif
      case __NR_getdents64:
 diff --git a/sandbox/policy/linux/bpf_network_policy_linux.cc b/sandbox/policy/linux/bpf_network_policy_linux.cc
-index 98e738a7e38be..b72914eafc775 100644
+index e5168ff0..3e6f821 100644
 --- a/sandbox/policy/linux/bpf_network_policy_linux.cc
 +++ b/sandbox/policy/linux/bpf_network_policy_linux.cc
-@@ -255,7 +255,7 @@ ResultExpr NetworkProcessPolicy::EvaluateSyscall(int sysno) const {
+@@ -260,7 +260,7 @@
      case __NR_fdatasync:
      case __NR_fsync:
      case __NR_mremap:
@@ -1990,6 +2121,56 @@ index 98e738a7e38be..b72914eafc775 100644
      case __NR_getdents:
  #endif
      case __NR_getdents64:
--- 
-2.41.0
+diff --git a/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc b/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc
+index bff338a..36acee52 100644
+--- a/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc
++++ b/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc
+@@ -33,7 +33,7 @@
+     case __NR_fdatasync:
+     case __NR_fsync:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined (__riscv)
+     case __NR_getrlimit:
+ #endif
+ #if defined(__i386__) || defined(__arm__)
+diff --git a/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+index 0555a85..8f8907f 100644
+--- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc
++++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc
+@@ -82,7 +82,7 @@
+     case __NR_ftruncate64:
+ #endif
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_getrlimit:
+     case __NR_setrlimit:
+ // We allow setrlimit to dynamically adjust the address space limit as
+diff --git a/sandbox/policy/linux/bpf_service_policy_linux.cc b/sandbox/policy/linux/bpf_service_policy_linux.cc
+index 32754e6..3f42eabb 100644
+--- a/sandbox/policy/linux/bpf_service_policy_linux.cc
++++ b/sandbox/policy/linux/bpf_service_policy_linux.cc
+@@ -26,7 +26,7 @@
+       return RestrictIoctl();
+       // Allow the system calls below.
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_getrlimit:
+ #endif
+ #if defined(__i386__) || defined(__arm__)
+diff --git a/sandbox/policy/linux/bpf_utility_policy_linux.cc b/sandbox/policy/linux/bpf_utility_policy_linux.cc
+index e299ce99..ed110689 100644
+--- a/sandbox/policy/linux/bpf_utility_policy_linux.cc
++++ b/sandbox/policy/linux/bpf_utility_policy_linux.cc
+@@ -34,7 +34,7 @@
+     case __NR_fdatasync:
+     case __NR_fsync:
+ #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
+-    defined(__aarch64__)
++    defined(__aarch64__) || defined(__riscv)
+     case __NR_getrlimit:
+ #endif
+ #if defined(__i386__) || defined(__arm__)
 

diff --git a/www-client/chromium/files/09riscv.patch b/www-client/chromium/files/riscv.patch
similarity index 100%
rename from www-client/chromium/files/09riscv.patch
rename to www-client/chromium/files/riscv.patch

diff --git a/www-client/chromium/files/00swiftshader-MCDissassembler.patch b/www-client/chromium/files/swiftshader-MCDissassembler.patch
similarity index 100%
rename from www-client/chromium/files/00swiftshader-MCDissassembler.patch
rename to www-client/chromium/files/swiftshader-MCDissassembler.patch

diff --git a/www-client/chromium/files/00swiftshader-use-llvm16.patch b/www-client/chromium/files/swiftshader-use-llvm16.patch
similarity index 100%
rename from www-client/chromium/files/00swiftshader-use-llvm16.patch
rename to www-client/chromium/files/swiftshader-use-llvm16.patch


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-25 23:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12  4:09 [gentoo-commits] proj/riscv:master commit in: www-client/chromium/files/, www-client/chromium/ Yixun Lan
  -- strict thread matches above, loose matches on Subject: below --
2024-06-25 23:55 Yixun Lan
2024-04-12  4:09 Yixun Lan
2021-12-14  9:25 Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox