www-client/chromium: sync with upstream

This commit is contained in:
github-actions[bot] 2025-01-20 00:03:05 +00:00 committed by GitHub
parent 724c9f9501
commit a0cfb31b04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 285 additions and 1563 deletions

View file

@ -1,15 +1,15 @@
DIST chromium-131.0.6778.139-linux-testdata.tar.xz 279152856 BLAKE2B 41f96d726ed0be06735d78f8430031b083e46652a3f94e7ef664502564f850975e3a8755963ee61458d47d779a9676452216322026cd891ae0eb85f664e9bd87 SHA512 99b4b08948ad5dcb9ed931b7b7019bcd015dbdc2bd420be1383d662a179c61e260ff94b7038f2f7a086a91bf2f733d973c2f1b45581f883da877946123b7e096
DIST chromium-131.0.6778.139-linux.tar.xz 2189495224 BLAKE2B 5e32ffa9de17df58b4017c90dd19b9cf1699c94f2ea1f38890821ef4bc3ed5c558c31cb0d57fb5b00c9bede6a953efc553fd8efa14354fd2314ca6e79bdac27e SHA512 b5aa8045edf483c9c53fe9fc253cd6f62ebef51f2b9dc9d59c225705d68ae7fdd88870fac5162ca7d9d9c4e0e778cdf27e4f9bd93bed8c059e0d1eab5ccac767
DIST chromium-131.0.6778.264-linux-testdata.tar.xz 279207424 BLAKE2B c3da4c4e00717ea53ae2fa774bf313b805966ba96ad6c5dbe72cd0b6e50f414023e475026b87b58e8b06dfc6bf9890852ca8a76f3c12004aa5e7f9b84e5cc665 SHA512 fb28a206102a5e85c28e8bd2a2c1077b8dc67edba7633783edf5e3a57b01e402fcd0638f8f0b268c839c3ed74d87d82a3ef52b41e3c1755973c27f9b824c817a
DIST chromium-131.0.6778.264-linux.tar.xz 2189651292 BLAKE2B aa9277ce7211b253f5f38641eeb7531be9edb7fc97f668a23a931f98d6671d3ebeda1b2e900a117acac9edb432f7a0ceb75e7b545752b642e27288ac44043827 SHA512 63bc7c79589ceffed2d089fec9fffcaa1f0b50aa1929da4b173de838ad13bf9c8c989001978d8f5d8a667a946124f897595a2ee206c5f04d05e5b05460b115a1
DIST chromium-132.0.6834.83-linux-testdata.tar.xz 299789728 BLAKE2B 043d122ef3ee62012cf55ca2754df932d0e48f08df06b78551cb79ec0c4781a52d5333b02645a981748c2c75928ebc91a21d7caf5e248d94b55fbf6ba4f8c974 SHA512 8122b750f22bb61e257b201bac731975f001a801b626d1ca0b037bc8f6cba34fcd104e47efc48c5122838e8196cdec720fb4a30af8ed0f00eb8943bda67da2d0 DIST chromium-132.0.6834.83-linux-testdata.tar.xz 299789728 BLAKE2B 043d122ef3ee62012cf55ca2754df932d0e48f08df06b78551cb79ec0c4781a52d5333b02645a981748c2c75928ebc91a21d7caf5e248d94b55fbf6ba4f8c974 SHA512 8122b750f22bb61e257b201bac731975f001a801b626d1ca0b037bc8f6cba34fcd104e47efc48c5122838e8196cdec720fb4a30af8ed0f00eb8943bda67da2d0
DIST chromium-132.0.6834.83-linux.tar.xz 2193406712 BLAKE2B 65cd156a97bcb4888ed30fc29f30e58e5c701e371454ad16427898ec8c51d54da10c36d1bc05157ad64ad4ca3e4b8c54cdd81c82f7f4c57abe6af71c8c050b13 SHA512 f5f1e1f620988ae5cbf042eb0acad5cc00bcf1854d3fb78574ea123dbeb8f5b065dff3fbd5f169c6acf3ed4bc7394d066b1bf6de53b8ccf1ac0432cfde8585fe DIST chromium-132.0.6834.83-linux.tar.xz 2193406712 BLAKE2B 65cd156a97bcb4888ed30fc29f30e58e5c701e371454ad16427898ec8c51d54da10c36d1bc05157ad64ad4ca3e4b8c54cdd81c82f7f4c57abe6af71c8c050b13 SHA512 f5f1e1f620988ae5cbf042eb0acad5cc00bcf1854d3fb78574ea123dbeb8f5b065dff3fbd5f169c6acf3ed4bc7394d066b1bf6de53b8ccf1ac0432cfde8585fe
DIST chromium-133.0.6943.6-linux-testdata.tar.xz 299258632 BLAKE2B 55e59061701aa0a2da4822519c3d267bf2d5da99c1b4bfe139423f4c085a9972b648c5ab3e2463ad768f6fd14207b6c1d26c2424af1ccc50144cc4e402265566 SHA512 b099e1136e7c58952a6c0d25904c41c0e929db2fe7124f76f8ee82b8c56ae118ce02b784b7ca898d2f02d2703999f158803988aceeced17d824c6047e8fddc47 DIST chromium-133.0.6943.16-linux-testdata.tar.xz 299224176 BLAKE2B 80850cdc182cd8825d3b4ed7392ca00d2b35bd208815ad900e59f493a1d64644c7575b496ee67d761591fa66e6b3b3856b3508abd109a49398c4cd7041073fde SHA512 3c2c3e1236787c39796d6b2b61cc7660d8d6f6b46d5cb554631e3e5a82b209ebcbec0a75174305434bc732af616e48f59a8111153d7d69d4def4919bda604af1
DIST chromium-133.0.6943.6-linux.tar.xz 2297438504 BLAKE2B 58b09f6e1bde370a1ff02ea94356e9a3e241b205ff63146aa25823023acbd7052d1a05d77c14c796962ccd35fd29c0ee7554906f58b3b3a40dea02115b4cc352 SHA512 e1378af355ae503426af127fd3bfe7d85ff77f8fe66bb3c6f00b38cc872de43566e31e5d2200bc25c721077dae69462d7af5b67bedeaf644819f04f81d55adfe DIST chromium-133.0.6943.16-linux.tar.xz 2300561364 BLAKE2B 017121eae6209b12faa07cfae86d7c81f4a544f8cf7ec7b20d36150902fcc238c76124317a42b59952134a6804411c8a664ac50403edcd4be71d19450c020bee SHA512 942ab013749b7038c143cc4ced89dba28d3420bf50831ab28ed5bc769896ed23aa3a3c51312767a2bc6708cc0800493a6f62fe3b403d5488bdd5b8867fb26e01
DIST chromium-134-clang.tar.xz 54177680 BLAKE2B ebe3e42ba0950f067b0febec65e575ec510f64a056e0a1a9dfffebde02809429c98461638784149dc31423ade29f1dbe4b060af06d8371c0ca8d10d83c7d8617 SHA512 4cf26e6f895ca1b268afcde296f2e7c761f99584170e1f3deecb1c5501be2121f173934a4598124bed69d0bd266f799bf03adfdb2190cb9f23c1212072a8bace
DIST chromium-134-rust.tar.xz 124591376 BLAKE2B c062e7283994ef15055a37f66a1c01dfcbcf03d16b7de48e7d017cec479f306999112dcd0f016157cfd0334349b55ae29512be3063dc6c3de90311520e90a5c1 SHA512 09be07ff0adfcc2928b28f5763a7e18bb7ef1f0cbf4a2475e3e6ae19a0a310a4a8f323375b947a48247853412119781bc9fa1422e24b96423c071f68337d6766
DIST chromium-134.0.6958.2-linux-testdata.tar.xz 299837732 BLAKE2B 68060ea0c84e951d2cd8427842e5a4bd3cb15a0b4bdd05ec068f8b38c3a14453c02659cdeb77106ac892a88750ea88db124e13bdccdb97eb4bde6d5dd2cdd776 SHA512 ccc7f985b69c72fabbfb9de86aba0872663076d20154338f8ab93e00c883e07040edaf1c1fa8e5c6e76c65fabf70d408fa7fd43149ac2d8c063492c82b7efd99
DIST chromium-134.0.6958.2-linux.tar.xz 2282858364 BLAKE2B e615acbae612d186445a5e14254dd9f3f9a4cea3ccaf89bdaa0333e3f9ecc21fe7ff000c1df433e64568f298cc0c08e471f019312e894356701a9daa66b1c384 SHA512 061a5625a243df3b3d2144503f8562112cc358f71b4eebf08947343f1bc87cbd5dd6c56f30f1c432bd19d2f339e40fc5d31ae7058123a0952fcb6f47b1e83234
DIST chromium-openpower-a85b64f07b.tar.bz2 387899 BLAKE2B b01fda2d64ce73068d1536a10cc0896f07a4b714cdb25698b1df8b3252baa0c21c4209b307cf1cb554854f6d0bfe3cd35e06aaa8d02ac5d409a119335084c324 SHA512 05eee81677e8766808441c939bee68e2e6c58ec91f471d88a40181d2eda78614a0a6d27d92ff8f9dda564d12f3451bace4ff2727594748c5c238a3533038019b DIST chromium-openpower-a85b64f07b.tar.bz2 387899 BLAKE2B b01fda2d64ce73068d1536a10cc0896f07a4b714cdb25698b1df8b3252baa0c21c4209b307cf1cb554854f6d0bfe3cd35e06aaa8d02ac5d409a119335084c324 SHA512 05eee81677e8766808441c939bee68e2e6c58ec91f471d88a40181d2eda78614a0a6d27d92ff8f9dda564d12f3451bace4ff2727594748c5c238a3533038019b
DIST chromium-openpower-c11b515d9a.tar.bz2 396039 BLAKE2B c05653e6bb62188c18864e783197853f4c41f88d1c928044a0ea0cb4677bc17806fac266ab100cbbcec3cb0d964bf2172917df95679927c1f1a88fa34aef4f53 SHA512 e9d9bbb2dd8d998060c78dfd5bbaedc548a8c44b442f6259304797326c585046144a6bb8aa4e24c44b3b56068189bee8a01267db2a392e90fd5603d06c0ef9ff DIST chromium-openpower-c11b515d9a.tar.bz2 396039 BLAKE2B c05653e6bb62188c18864e783197853f4c41f88d1c928044a0ea0cb4677bc17806fac266ab100cbbcec3cb0d964bf2172917df95679927c1f1a88fa34aef4f53 SHA512 e9d9bbb2dd8d998060c78dfd5bbaedc548a8c44b442f6259304797326c585046144a6bb8aa4e24c44b3b56068189bee8a01267db2a392e90fd5603d06c0ef9ff
DIST chromium-patches-131-1.tar.bz2 4932 BLAKE2B 72006a6d751ae1207352547cdeef87f8cc9f9639283238da201d879c6fcd0f8bc499669cb030d8b4c2216fcd2730de46b0a071007b3d69a2bbdd22ba38bcd279 SHA512 11d7f861c007e9e28e5192fb354940180aea0e01e6e8ae77547e2dffd7b541b11f1acfe0fd0c8b6b4cbfc6c39ddfa79c8c08db42c1292ad329d49027d1406fc3
DIST chromium-patches-132.tar.bz2 5040 BLAKE2B d5bd84dd90b395c6a15135637f51f931c72a2f301b1c24e9b938c744f2767fa36857b8edfdf5c44cf085a1efcb40475401fec226ce43446442f32fb174b55355 SHA512 29833b306a34ab6562ee58eb03669818da7235cd36666b27d829bcbd3c4d0035a530fb6be1c33cf88c1c11d43e68e3781f9b9602c0c004e7a37ffa69f9ee17c7 DIST chromium-patches-132.tar.bz2 5040 BLAKE2B d5bd84dd90b395c6a15135637f51f931c72a2f301b1c24e9b938c744f2767fa36857b8edfdf5c44cf085a1efcb40475401fec226ce43446442f32fb174b55355 SHA512 29833b306a34ab6562ee58eb03669818da7235cd36666b27d829bcbd3c4d0035a530fb6be1c33cf88c1c11d43e68e3781f9b9602c0c004e7a37ffa69f9ee17c7
DIST chromium-patches-133-1.tar.bz2 10661 BLAKE2B c8a141bd10e628533e373b08969f95443eb6ae7f4497359db02f370147ac6132fbc31db28915ebdd9f150c13be78f06af938bd7dffdf2c23d90e1b9e07bd92ab SHA512 48a356872acc41c96c92366bd09de5a1c4af87fe4c480dccc7bd7a2aae5c3be8e6411151ed36303a127022001248bd25ef8305e83bd0d533660e3f11943af686 DIST chromium-patches-133-1.tar.bz2 10661 BLAKE2B c8a141bd10e628533e373b08969f95443eb6ae7f4497359db02f370147ac6132fbc31db28915ebdd9f150c13be78f06af938bd7dffdf2c23d90e1b9e07bd92ab SHA512 48a356872acc41c96c92366bd09de5a1c4af87fe4c480dccc7bd7a2aae5c3be8e6411151ed36303a127022001248bd25ef8305e83bd0d533660e3f11943af686
DIST chromium-patches-134.tar.bz2 10184 BLAKE2B 5ff1022205ef3e0e88b43e6c20d33a86386d80b837135eaa5451b004f09290de3b765694e31c9e6e840ec7e0537bbe6164a61224a55e17cd04356f1d5af8ee37 SHA512 29fc1f70a95501e0f82e2bb66f7eefab2bd75995d660271ab0dd043b18663107547faddf71b555b82da39e31393c7220893e09d4b28a71b18855d82399e3512b
DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c
DIST chromium-testfonts-f26f29c9d3.tar.gz 32750602 BLAKE2B 498f8b2e0811c98dc3d4aaa75559e69c782afb4bd12328cfdb7244ddba5cae7ee47becd27b2549d7b36bed417601f70f4c192934b0f08496cef1547d0502d93c SHA512 96b090446862997c8134e2971f0e38793ecc1208d547e554c9b651ccfb4127c4de86754903fea57a7292a2823c45117bae0ec13ed87aed20c248fb779579fbde DIST chromium-testfonts-f26f29c9d3.tar.gz 32750602 BLAKE2B 498f8b2e0811c98dc3d4aaa75559e69c782afb4bd12328cfdb7244ddba5cae7ee47becd27b2549d7b36bed417601f70f4c192934b0f08496cef1547d0502d93c SHA512 96b090446862997c8134e2971f0e38793ecc1208d547e554c9b651ccfb4127c4de86754903fea57a7292a2823c45117bae0ec13ed87aed20c248fb779579fbde

File diff suppressed because it is too large Load diff

View file

@ -5,17 +5,8 @@ EAPI=8
# PACKAGING NOTES # PACKAGING NOTES
# Since m133 (and backported a bit...) we are using CI-generated tarballs from # This uses a gentoo-created tarball due to Google CI Failures.
# https://github.com/chromium-linux-tarballs/chromium-tarballs/ (uploaded to S3 # Use 133(?) as a base for new official tarballs.
# and made available via https://chromium-tarballs.distfiles.gentoo.org/).
# We do this because upstream tarballs weigh in at about 3.5x the size of our
# new "Distro tarballs" and include binaries (etc) that are not useful for
# downstream consumers (like distributions).
# It is probably still possible to download the google Rust and Clang toolchains
# and use them to build this package, however we removed this when upstream CI
# broke for m131 and haven't re-added it.
GN_MIN_VER=0.2165 GN_MIN_VER=0.2165
# chromium-tools/get-chromium-toolchain-strings.py # chromium-tools/get-chromium-toolchain-strings.py
@ -52,7 +43,7 @@ SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}-linux.tar.xz
pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )" pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )"
LICENSE="BSD" LICENSE="BSD"
SLOT="0/dev" SLOT="0/beta"
# Dev exists mostly to give devs some breathing room for beta/stable releases; # Dev exists mostly to give devs some breathing room for beta/stable releases;
# it shouldn't be keyworded but adventurous users can select it. # it shouldn't be keyworded but adventurous users can select it.
if [[ ${SLOT} != "0/dev" ]]; then if [[ ${SLOT} != "0/dev" ]]; then
@ -61,7 +52,7 @@ fi
IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd" 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 +official pax-kernel pgo +proprietary-codecs pulseaudio" IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos +official pax-kernel pgo +proprietary-codecs pulseaudio"
IUSE+=" qt5 qt6 +screencast selinux test +vaapi +wayland +widevine cpu_flags_ppc_vsx3" IUSE+=" qt5 qt6 +screencast selinux test +vaapi +wayland +widevine"
RESTRICT=" RESTRICT="
!bindist? ( bindist ) !bindist? ( bindist )
!test? ( test ) !test? ( test )
@ -402,7 +393,6 @@ src_prepare() {
done done
shopt -u globstar nullglob shopt -u globstar nullglob
# We can't use the bundled compiler builtins with the system toolchain # We can't use the bundled compiler builtins with the system toolchain
# `grep` is a development convenience to ensure we fail early when google changes something. # `grep` is a development convenience to ensure we fail early when google changes something.
local builtins_match="if (is_clang && !is_nacl && !is_cronet_build) {" local builtins_match="if (is_clang && !is_nacl && !is_cronet_build) {"
@ -545,6 +535,7 @@ src_prepare() {
third_party/fp16 third_party/fp16
third_party/freetype third_party/freetype
third_party/fusejs third_party/fusejs
third_party/fuzztest
third_party/fxdiv third_party/fxdiv
third_party/gemmlowp third_party/gemmlowp
third_party/google_input_tools third_party/google_input_tools
@ -708,12 +699,12 @@ src_prepare() {
third_party/zlib/google third_party/zlib/google
third_party/zxcvbn-cpp third_party/zxcvbn-cpp
url/third_party/mozilla url/third_party/mozilla
v8/third_party/siphash
v8/third_party/utf8-decoder
v8/third_party/valgrind
v8/third_party/glibc v8/third_party/glibc
v8/third_party/inspector_protocol v8/third_party/inspector_protocol
v8/third_party/siphash
v8/third_party/utf8-decoder
v8/third_party/v8 v8/third_party/v8
v8/third_party/valgrind
# gyp -> gn leftovers # gyp -> gn leftovers
third_party/speech-dispatcher third_party/speech-dispatcher
@ -722,10 +713,9 @@ src_prepare() {
) )
if use test; then if use test; then
# tar tvf /var/cache/distfiles/${P}-testdata.tar.xz | grep '^d' | grep 'third_party' | awk '{print $NF}' # tar tvf /var/cache/distfiles/${P}-linux-testdata.tar.xz | grep '^d' | grep 'third_party' | awk '{print $NF}'
keeplibs+=( keeplibs+=(
third_party/breakpad/breakpad/src/processor third_party/breakpad/breakpad/src/processor
third_party/fuzztest
third_party/google_benchmark/src/include/benchmark third_party/google_benchmark/src/include/benchmark
third_party/google_benchmark/src/src third_party/google_benchmark/src/src
third_party/perfetto/protos/third_party/pprof third_party/perfetto/protos/third_party/pprof

View file

@ -5,12 +5,28 @@ EAPI=8
# PACKAGING NOTES # PACKAGING NOTES
# This uses a gentoo-created tarball due to Google CI Failures. # Upstream roll their bundled Clang every two weeks, and the bundled Rust
# Use 133(?) as a base for new official tarballs. # is rolled regularly and depends on that. While we do our best to build
# with system Clang, we may eventually hit the point where we need to use
# the bundled Clang due to the use of prerelease features.
GN_MIN_VER=0.2165 # USE=bundled-toolchain is intended for users who want to use the same toolchain
# as the upstream releases. It's also a good fallback in case we fall behind
# and need to get a release out quickly (less likely with `dev` in-tree).
# Since m133 we are using CI-generated tarballs from
# https://github.com/chromium-linux-tarballs/chromium-tarballs/ (uploaded to S3
# and made available via https://chromium-tarballs.distfiles.gentoo.org/).
# We do this because upstream tarballs weigh in at about 3.5x the size of our
# new "Distro tarballs" and include binaries (etc) that are not useful for
# downstream consumers (like distributions).
GN_MIN_VER=0.2207
# chromium-tools/get-chromium-toolchain-strings.py # chromium-tools/get-chromium-toolchain-strings.py
TEST_FONT=f26f29c9d3bfae588207bbc9762de8d142e58935c62a86f67332819b15203b35 TEST_FONT=f26f29c9d3bfae588207bbc9762de8d142e58935c62a86f67332819b15203b35
BUNDLED_CLANG_VER=llvmorg-20-init-17108-g29ed6000-1
BUNDLED_RUST_VER=ad211ced81509462cdfe4c29ed10f97279a0acae-1
VIRTUALX_REQUIRED="pgo" VIRTUALX_REQUIRED="pgo"
@ -23,6 +39,7 @@ PYTHON_COMPAT=( python3_{11..13} )
PYTHON_REQ_USE="xml(+)" PYTHON_REQ_USE="xml(+)"
RUST_MIN_VER=1.78.0 RUST_MIN_VER=1.78.0
RUST_NEEDS_LLVM="yes please" RUST_NEEDS_LLVM="yes please"
RUST_OPTIONAL="yes" # Not actually optional, but we don't need system Rust (or LLVM) with USE=bundled-toolchain
inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils inherit check-reqs chromium-2 desktop flag-o-matic llvm-r1 multiprocessing ninja-utils pax-utils
inherit python-any-r1 qmake-utils readme.gentoo-r1 rust systemd toolchain-funcs virtualx xdg-utils inherit python-any-r1 qmake-utils readme.gentoo-r1 rust systemd toolchain-funcs virtualx xdg-utils
@ -30,29 +47,37 @@ inherit python-any-r1 qmake-utils readme.gentoo-r1 rust systemd toolchain-funcs
DESCRIPTION="Open-source version of Google Chrome web browser" DESCRIPTION="Open-source version of Google Chrome web browser"
HOMEPAGE="https://www.chromium.org/" HOMEPAGE="https://www.chromium.org/"
PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6" PPC64_HASH="a85b64f07b489b8c6fdb13ecf79c16c56c560fc6"
PATCH_V="${PV%%\.*}-1" PATCH_V="${PV%%\.*}"
SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}-linux.tar.xz SRC_URI="https://chromium-tarballs.distfiles.gentoo.org/${P}-linux.tar.xz
!bundled-toolchain? (
https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2 https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2
)
bundled-toolchain? (
https://gsdview.appspot.com/chromium-browser-clang/Linux_x64/clang-${BUNDLED_CLANG_VER}.tar.xz
-> chromium-${PV%%\.*}-clang.tar.xz
https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${BUNDLED_RUST_VER}-${BUNDLED_CLANG_VER%-*}.tar.xz
-> chromium-${PV%%\.*}-rust.tar.xz
)
test? ( test? (
https://chromium-tarballs.distfiles.gentoo.org/${P}-linux-testdata.tar.xz https://chromium-tarballs.distfiles.gentoo.org/${P}-linux-testdata.tar.xz
https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz https://chromium-fonts.storage.googleapis.com/${TEST_FONT} -> chromium-testfonts-${TEST_FONT:0:10}.tar.gz
) )
ppc64? ( ppc64? (
https://gitlab.solidsilicon.io/public-development/open-source/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2 https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches/-/archive/${PPC64_HASH}/openpower-patches-${PPC64_HASH}.tar.bz2 -> chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
) )
pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )" pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )"
LICENSE="BSD" LICENSE="BSD"
SLOT="0/stable" SLOT="0/dev"
# Dev exists mostly to give devs some breathing room for beta/stable releases; # Dev exists mostly to give devs some breathing room for beta/stable releases;
# it shouldn't be keyworded but adventurous users can select it. # it shouldn't be keyworded but adventurous users can select it.
if [[ ${SLOT} != "0/dev" ]]; then if [[ ${SLOT} != "0/dev" ]]; then
KEYWORDS="arm64" KEYWORDS="~arm64"
fi fi
IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd" 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 +official pax-kernel pgo +proprietary-codecs pulseaudio" IUSE="+X ${IUSE_SYSTEM_LIBS} bindist bundled-toolchain cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos +official pax-kernel pgo"
IUSE+=" qt5 qt6 +screencast selinux test +vaapi +wayland +widevine" IUSE+=" +proprietary-codecs pulseaudio qt5 qt6 +screencast selinux test +vaapi +wayland +widevine cpu_flags_ppc_vsx3"
RESTRICT=" RESTRICT="
!bindist? ( bindist ) !bindist? ( bindist )
!test? ( test ) !test? ( test )
@ -94,7 +119,6 @@ COMMON_SNAPSHOT_DEPEND="
media-libs/mesa:=[gbm(+)] media-libs/mesa:=[gbm(+)]
>=media-libs/openh264-1.6.0:= >=media-libs/openh264-1.6.0:=
sys-libs/zlib:= sys-libs/zlib:=
x11-libs/libdrm:=
!headless? ( !headless? (
dev-libs/glib:2 dev-libs/glib:2
>=media-libs/alsa-lib-1.0.19:= >=media-libs/alsa-lib-1.0.19:=
@ -175,14 +199,15 @@ BDEPEND="
qt5? ( dev-qt/qtcore:5 ) qt5? ( dev-qt/qtcore:5 )
qt6? ( dev-qt/qtbase:6 ) qt6? ( dev-qt/qtbase:6 )
) )
$(llvm_gen_dep ' !bundled-toolchain? ( $(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT} llvm-core/clang:${LLVM_SLOT}
llvm-core/llvm:${LLVM_SLOT} llvm-core/llvm:${LLVM_SLOT}
llvm-core/lld:${LLVM_SLOT} llvm-core/lld:${LLVM_SLOT}
official? ( official? (
!ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] ) !ppc64? ( llvm-runtimes/compiler-rt-sanitizers:${LLVM_SLOT}[cfi] )
) ) ')
') ${RUST_DEPEND}
)
pgo? ( pgo? (
>=dev-python/selenium-3.141.0 >=dev-python/selenium-3.141.0
>=dev-util/web_page_replay_go-20220314 >=dev-util/web_page_replay_go-20220314
@ -314,8 +339,10 @@ pkg_setup() {
die "Please switch to a different linker." die "Please switch to a different linker."
fi fi
llvm-r1_pkg_setup if use !bundled-toolchain; then
rust_pkg_setup llvm-r1_pkg_setup
rust_pkg_setup
fi
# Forcing clang; respect llvm_slot_x to enable selection of impl from LLVM_COMPAT # Forcing clang; respect llvm_slot_x to enable selection of impl from LLVM_COMPAT
AR=llvm-ar AR=llvm-ar
@ -344,7 +371,8 @@ pkg_setup() {
src_unpack() { src_unpack() {
unpack ${P}-linux.tar.xz unpack ${P}-linux.tar.xz
unpack chromium-patches-${PATCH_V}.tar.bz2 # These should only be required when we're not using the official toolchain
use !bundled-toolchain && unpack chromium-patches-${PATCH_V}.tar.bz2
use pgo && unpack chromium-profiler-0.2.tar use pgo && unpack chromium-profiler-0.2.tar
@ -359,6 +387,18 @@ src_unpack() {
tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts" tar xf "${testfonts_tar}" -C "${testfonts_dir}" || die "Failed to unpack testfonts"
fi fi
# We need to manually unpack this since M126 else we'd unpack one toolchain over the other.
# Since we're doing that anyway let's unpack to sensible locations to make symlink creation easier.
if use bundled-toolchain; then
einfo "Unpacking bundled Clang ..."
mkdir -p "${WORKDIR}"/clang || die "Failed to create clang directory"
tar xf "${DISTDIR}/chromium-${PV%%\.*}-clang.tar.xz" -C "${WORKDIR}/clang" || die "Failed to unpack Clang"
einfo "Unpacking bundled Rust ..."
local rust_dir="${WORKDIR}/rust-toolchain"
mkdir -p ${rust_dir} || die "Failed to create rust toolchain directory"
tar xf "${DISTDIR}/chromium-${PV%%\.*}-rust.tar.xz" -C ${rust_dir} || die "Failed to unpack Rust"
fi
if use ppc64; then if use ppc64; then
unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2 unpack chromium-openpower-${PPC64_HASH:0:10}.tar.bz2
fi fi
@ -368,19 +408,12 @@ src_prepare() {
# Calling this here supports resumption via FEATURES=keepwork # Calling this here supports resumption via FEATURES=keepwork
python_setup 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"
local PATCHES=( local PATCHES=(
"${FILESDIR}/chromium-cross-compile.patch" "${FILESDIR}/chromium-cross-compile.patch"
"${FILESDIR}/chromium-109-system-zlib.patch" "${FILESDIR}/chromium-109-system-zlib.patch"
"${FILESDIR}/chromium-111-InkDropHost-crash.patch" "${FILESDIR}/chromium-111-InkDropHost-crash.patch"
"${FILESDIR}/chromium-127-bindgen-custom-toolchain.patch"
"${FILESDIR}/chromium-131-unbundle-icu-target.patch" "${FILESDIR}/chromium-131-unbundle-icu-target.patch"
"${FILESDIR}/chromium-131-oauth2-client-switches.patch" "${FILESDIR}/chromium-134-oauth2-client-switches.patch"
"${FILESDIR}/chromium-131-const-atomicstring-conversion.patch"
) )
if use widevine; then if use widevine; then
@ -388,22 +421,94 @@ src_prepare() {
fi fi
PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}" ) if use bundled-toolchain; then
# We can't use the bundled compiler builtins with the system toolchain # We need to symlink the toolchain into the expected location
# `grep` is a development convenience to ensure we fail early when google changes something. einfo "Symlinking Clang toolchain to expected location ..."
local builtins_match="if (is_clang && !is_nacl && !is_cronet_build) {" mkdir -p third_party/llvm-build/ || die "Failed to create llvm-build directory"
grep -q "${builtins_match}" build/config/compiler/BUILD.gn || die "Failed to disable bundled compiler builtins" # the 'Chromium Linux Tarballs' seem to already have 'Release+Asserts/{lib,bin}'; not sure if this is an
sed -i -e "/${builtins_match}/,+2d" build/config/compiler/BUILD.gn # upstream change - we're using the same scripts to build, theoretically. We'll still attempt to create
# llvm-build, but we'll rm Release+Asserts and symlink directly.
if use ppc64 ; then if [[ -d third_party/llvm-build/Release+Asserts ]]; then
local p rm -r third_party/llvm-build/Release+Asserts || die "Failed to remove third_party/llvm-build/Release+Asserts"
for p in $(grep -v "^#" "${WORKDIR}"/debian/patches/series | grep "^ppc64le" || die); do fi
if [[ ! $p =~ "fix-breakpad-compile.patch" ]]; then ln -s "${WORKDIR}"/clang third_party/llvm-build/Release+Asserts || die "Failed to bundle Clang"
eapply "${WORKDIR}/debian/patches/${p}" einfo "Symlinking Rust toolchain to expected location ..."
# As above, so below
if [[ -d third_party/rust-toolchain ]]; then
rm -r third_party/rust-toolchain || die "Failed to remove third_party/rust-toolchain"
fi
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"
else
# This patch breaks bundled-toolchain builds as the required path_suffix clearly differs
# between the two. Probably just need to update the patch to gate updating this value on the 'unbundle'
# toolchain? Alternative: move to chromium-patches, but this is probably something that we
# can upstream, so let's try to do it properly. For now apply conditionally so that we have _a_ dev
# channel ebuild.
# Currently evaluates to:
# `-resource-dir', `'../../third_party/llvm-build/Release+Asserts/include'`
# This is correct if the first part of the concatenated variable points to /usr/lib/clang/<majver>
# Correct for bundled toolchain is:
# `-resource-dir', `'../../third_party/llvm-build/Release+Asserts/lib/clang/<majver>/include'`
# TODO: fix before this leaves dev.
PATCHES+=( "${FILESDIR}/chromium-132-bindgen-custom-toolchain.patch" )
# We don't need our toolchain patches if we're using the official toolchain
shopt -s globstar nullglob
# 130: moved the PPC64 patches into the chromium-patches repo
local patch
for patch in "${WORKDIR}/chromium-patches-${PATCH_V}"/**/*.patch; do
if [[ ${patch} == *"ppc64le"* ]]; then
use ppc64 && PATCHES+=( "${patch}" )
else
PATCHES+=( "${patch}" )
fi fi
done done
PATCHES+=( "${WORKDIR}/ppc64le" )
PATCHES+=( "${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" ) shopt -u globstar nullglob
# We can't use the bundled compiler builtins with the system toolchain
# `grep` is a development convenience to ensure we fail early when google changes something.
local builtins_match="if (is_clang && !is_nacl && !is_cronet_build) {"
grep -q "${builtins_match}" build/config/compiler/BUILD.gn || die "Failed to disable bundled compiler builtins"
sed -i -e "/${builtins_match}/,+2d" build/config/compiler/BUILD.gn
# Strictly speaking this doesn't need to be gated (no bundled toolchain for ppc64); it keeps the logic together
if use ppc64; then
local patchset_dir="${WORKDIR}/openpower-patches-${PPC64_HASH}/patches"
# patch causes build errors on 4K page systems (https://bugs.gentoo.org/show_bug.cgi?id=940304)
local page_size_patch="ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch"
local isa_3_patch="ppc64le/core/baseline-isa-3-0.patch"
# Apply the OpenPOWER patches (check for page size and isa 3.0)
openpower_patches=( $(grep -E "^ppc64le|^upstream" "${patchset_dir}/series" | grep -v "${page_size_patch}" |
grep -v "${isa_3_patch}" || die) )
for patch in "${openpower_patches[@]}"; do
PATCHES+=( "${patchset_dir}/${patch}" )
done
if [[ $(getconf PAGESIZE) == 65536 ]]; then
PATCHES+=( "${patchset_dir}/${page_size_patch}" )
fi
# We use vsx3 as a proxy for 'want isa3.0' (POWER9)
if use cpu_flags_ppc_vsx3 ; then
PATCHES+=( +"${patchset_dir}/${isa_3_patch}" )
fi
fi
# Oxidised hacks, let's keep 'em all in one place
# This is a nightly option that does not exist in older releases
# https://github.com/rust-lang/rust/commit/389a399a501a626ebf891ae0bb076c25e325ae64
if ver_test ${RUST_SLOT} -lt "1.83.0"; then
sed '/rustflags = \[ "-Zdefault-visibility=hidden" \]/d' -i build/config/gcc/BUILD.gn ||
die "Failed to remove default visibility nightly option"
fi
# Upstream Rust replaced adler with adler2, for older versions of Rust we still need
# to tell GN that we have the older lib when it tries to copy the Rust sysroot
# into the bulid directory.
if ver_test ${RUST_SLOT} -lt "1.85.0"; then
sed -i 's/adler2/adler/' build/rust/std/BUILD.gn ||
die "Failed to tell GN that we have adler and not adler2"
fi
fi fi
default default
@ -539,7 +644,6 @@ src_prepare() {
third_party/ipcz third_party/ipcz
third_party/jinja2 third_party/jinja2
third_party/jsoncpp third_party/jsoncpp
third_party/jstemplate
third_party/khronos third_party/khronos
third_party/lens_server_proto third_party/lens_server_proto
third_party/leveldatabase third_party/leveldatabase
@ -551,13 +655,16 @@ src_prepare() {
third_party/libaom/source/libaom/third_party/x86inc third_party/libaom/source/libaom/third_party/x86inc
third_party/libavif third_party/libavif
third_party/libc++ third_party/libc++
third_party/libevent third_party/libdrm
third_party/libgav1 third_party/libgav1
third_party/libjingle third_party/libjingle
third_party/libphonenumber third_party/libphonenumber
third_party/libsecret third_party/libsecret
third_party/libsrtp third_party/libsrtp
third_party/libsync third_party/libsync
third_party/libtess2/libtess2
third_party/libtess2/src/Include
third_party/libtess2/src/Source
third_party/liburlpattern third_party/liburlpattern
third_party/libva_protected_content third_party/libva_protected_content
third_party/libvpx third_party/libvpx
@ -569,6 +676,8 @@ src_prepare() {
third_party/libyuv third_party/libyuv
third_party/libzip third_party/libzip
third_party/lit third_party/lit
third_party/llvm-libc
third_party/llvm-libc/src/shared/
third_party/lottie third_party/lottie
third_party/lss third_party/lss
third_party/lzma_sdk third_party/lzma_sdk
@ -610,7 +719,6 @@ src_prepare() {
third_party/puffin third_party/puffin
third_party/pyjson5 third_party/pyjson5
third_party/pyyaml third_party/pyyaml
third_party/qcms
third_party/rapidhash third_party/rapidhash
third_party/re2 third_party/re2
third_party/rnnoise third_party/rnnoise
@ -622,6 +730,7 @@ src_prepare() {
third_party/sentencepiece third_party/sentencepiece
third_party/sentencepiece/src/third_party/darts_clone third_party/sentencepiece/src/third_party/darts_clone
third_party/shell-encryption third_party/shell-encryption
third_party/simdutf
third_party/simplejson third_party/simplejson
third_party/six third_party/six
third_party/skia third_party/skia
@ -653,6 +762,7 @@ src_prepare() {
third_party/unrar third_party/unrar
third_party/utf third_party/utf
third_party/vulkan third_party/vulkan
third_party/wasm_tts_engine
third_party/wayland third_party/wayland
third_party/webdriver third_party/webdriver
third_party/webgpu-cts third_party/webgpu-cts
@ -673,9 +783,9 @@ src_prepare() {
third_party/zlib/google third_party/zlib/google
third_party/zxcvbn-cpp third_party/zxcvbn-cpp
url/third_party/mozilla url/third_party/mozilla
v8/src/third_party/siphash v8/third_party/siphash
v8/src/third_party/utf8-decoder v8/third_party/utf8-decoder
v8/src/third_party/valgrind v8/third_party/valgrind
v8/third_party/glibc v8/third_party/glibc
v8/third_party/inspector_protocol v8/third_party/inspector_protocol
v8/third_party/v8 v8/third_party/v8
@ -689,6 +799,8 @@ src_prepare() {
if use test; then if use test; then
# tar tvf /var/cache/distfiles/${P}-testdata.tar.xz | grep '^d' | grep 'third_party' | awk '{print $NF}' # tar tvf /var/cache/distfiles/${P}-testdata.tar.xz | grep '^d' | grep 'third_party' | awk '{print $NF}'
keeplibs+=( keeplibs+=(
third_party/breakpad/breakpad/src/processor
third_party/fuzztest
third_party/google_benchmark/src/include/benchmark third_party/google_benchmark/src/include/benchmark
third_party/google_benchmark/src/src third_party/google_benchmark/src/src
third_party/perfetto/protos/third_party/pprof third_party/perfetto/protos/third_party/pprof
@ -768,8 +880,6 @@ src_prepare() {
einfo "Unbundling third-party libraries ..." einfo "Unbundling third-party libraries ..."
build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
# TODO: From 127 chromium includes a bunch of binaries? Unbundle them; they're not needed.
# bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries # 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 mkdir -p buildtools/third_party/eu-strip/bin || die
ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die
@ -781,64 +891,66 @@ chromium_configure() {
local myconf_gn="" local myconf_gn=""
# We already forced the "correct" clang via pkg_setup if use !bundled-toolchain; then
# We already forced the "correct" clang via pkg_setup
if tc-is-cross-compiler; then if tc-is-cross-compiler; then
CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}" CC="${CC} -target ${CHOST} --sysroot ${ESYSROOT}"
CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}" CXX="${CXX} -target ${CHOST} --sysroot ${ESYSROOT}"
BUILD_AR=${AR} BUILD_AR=${AR}
BUILD_CC=${CC} BUILD_CC=${CC}
BUILD_CXX=${CXX} BUILD_CXX=${CXX}
BUILD_NM=${NM} BUILD_NM=${NM}
fi
strip-unsupported-flags
myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
# https://bugs.gentoo.org/918897#c32
append-ldflags -Wl,--undefined-version
myconf_gn+=" use_lld=true"
# Make sure the build system will use the right tools, bug #340795.
tc-export AR CC CXX NM
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 fi
# Don't inherit PKG_CONFIG_PATH from environment strip-unsupported-flags
local -x PKG_CONFIG_PATH=
else myconf_gn+=" is_clang=true clang_use_chrome_plugins=false"
myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" # https://bugs.gentoo.org/918897#c32
append-ldflags -Wl,--undefined-version
myconf_gn+=" use_lld=true"
# Make sure the build system will use the right tools, bug #340795.
tc-export AR CC CXX NM
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
# bindgen settings
# From 127, to make bindgen work, we need to provide a location for libclang.
# We patch this in for gentoo - see chromium-*-bindgen-custom-toolchain.patch
# rust_bindgen_root = directory with `bin/bindgen` beneath it.
myconf_gn+=" rust_bindgen_root=\"${EPREFIX}/usr/\""
myconf_gn+=" bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
# We don't need to set 'clang_base_bath' for anything in our build
# and it defaults to the google toolchain location. Instead provide a location
# to where system clang lives sot that bindgen can find system headers (e.g. stddef.h)
myconf_gn+=" clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
myconf_gn+=" rust_sysroot_absolute=\"$(get_rust_prefix)\""
myconf_gn+=" rustc_version=\"${RUST_SLOT}\""
fi fi
# bindgen settings
# From 127, to make bindgen work, we need to provide a location for libclang.
# We patch this in for gentoo - see chromium-*-bindgen-custom-toolchain.patch
# rust_bindgen_root = directory with `bin/bindgen` beneath it.
myconf_gn+=" rust_bindgen_root=\"${EPREFIX}/usr/\""
myconf_gn+=" bindgen_libclang_path=\"$(get_llvm_prefix)/$(get_libdir)\""
# We don't need to set 'clang_base_bath' for anything in our build
# and it defaults to the google toolchain location. Instead provide a location
# to where system clang lives sot that bindgen can find system headers (e.g. stddef.h)
myconf_gn+=" clang_base_path=\"${EPREFIX}/usr/lib/clang/${LLVM_SLOT}/\""
myconf_gn+=" rust_sysroot_absolute=\"$(get_rust_prefix)\""
myconf_gn+=" rustc_version=\"${RUST_SLOT}\""
# GN needs explicit config for Debug/Release as opposed to inferring it from build directory. # GN needs explicit config for Debug/Release as opposed to inferring it from build directory.
myconf_gn+=" is_debug=false" myconf_gn+=" is_debug=false"
@ -867,7 +979,6 @@ chromium_configure() {
freetype freetype
# Need harfbuzz_from_pkgconfig target # Need harfbuzz_from_pkgconfig target
#harfbuzz-ng #harfbuzz-ng
libdrm
libjpeg libjpeg
libwebp libwebp
libxml libxml
@ -1051,7 +1162,6 @@ chromium_configure() {
myconf_gn+=" enable_print_preview=false" myconf_gn+=" enable_print_preview=false"
myconf_gn+=" enable_remoting=false" myconf_gn+=" enable_remoting=false"
else else
myconf_gn+=" use_system_libdrm=true"
myconf_gn+=" use_system_minigbm=true" myconf_gn+=" use_system_minigbm=true"
myconf_gn+=" use_xkbcommon=true" myconf_gn+=" use_xkbcommon=true"
if use qt5 || use qt6; then if use qt5 || use qt6; then
@ -1158,6 +1268,24 @@ chromium_compile() {
pax-mark m out/Release/chrome pax-mark m out/Release/chrome
# This codepath does minimal patching, so we're at the mercy of upstream
# CFLAGS. This is fine - we're not intending to force this on users
# and we do a lot of flag 'management' anyway.
if use bundled-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 # This function is called from virtx, and must always return so that Xvfb
@ -1271,6 +1399,7 @@ src_test() {
NumberFormattingTest.FormatPercent NumberFormattingTest.FormatPercent
PathServiceTest.CheckedGetFailure PathServiceTest.CheckedGetFailure
PlatformThreadTest.CanChangeThreadType PlatformThreadTest.CanChangeThreadType
RustLogIntegrationTest.CheckAllSeverity
StackCanary.ChangingStackCanaryCrashesOnReturn StackCanary.ChangingStackCanaryCrashesOnReturn
StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree StackTraceDeathTest.StackDumpSignalHandlerIsMallocFree
SysStrings.SysNativeMBAndWide SysStrings.SysNativeMBAndWide
@ -1279,6 +1408,7 @@ src_test() {
TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest TestLauncherTools.TruncateSnippetFocusedMatchesFatalMessagesTest
ToolsSanityTest.BadVirtualCallNull ToolsSanityTest.BadVirtualCallNull
ToolsSanityTest.BadVirtualCallWrongType ToolsSanityTest.BadVirtualCallWrongType
CancelableEventTest.BothCancelFailureAndSucceedOccurUnderContention #new m133: TODO investigate
) )
local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")" local test_filter="-$(IFS=:; printf '%s' "${skip_tests[*]}")"
# test-launcher-bot-mode enables parallelism and plain output # test-launcher-bot-mode enables parallelism and plain output

View file

@ -0,0 +1,35 @@
From 628c8aad603791ec1276c6a5b8d3704a03840f86 Mon Sep 17 00:00:00 2001
From: Matt Jolly <kangie@gentoo.org>
Date: Sat, 18 Jan 2025 11:09:46 +1000
Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials
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.
--- a/google_apis/api_key_cache.cc
+++ b/google_apis/api_key_cache.cc
@@ -192,13 +192,13 @@ ApiKeyCache::ApiKeyCache(const DefaultApiKeys& default_api_keys) {
std::string default_client_id = CalculateKeyValue(
default_api_keys.google_default_client_id,
- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr, std::string(),
+ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID, std::string(),
environment.get(), command_line, gaia_config,
default_api_keys.allow_override_via_environment,
default_api_keys.allow_unset_values);
std::string default_client_secret = CalculateKeyValue(
default_api_keys.google_default_client_secret,
- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
+ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientID,
std::string(), environment.get(), command_line, gaia_config,
default_api_keys.allow_override_via_environment,
default_api_keys.allow_unset_values);
--
2.48.0

View file

@ -10,11 +10,12 @@
<name>Matt Jolly</name> <name>Matt Jolly</name>
</maintainer> </maintainer>
<use> <use>
<flag name="ffmpeg-chromium">(binpkg only) Use Chromium FFmpeg fork (<pkg>media-video/ffmpeg-chromium</pkg>) rather than mainline FFmpeg (<pkg>media-video/ffmpeg</pkg>)</flag> <flag name="bundled-toolchain">Download and use the upstream binary toolchain(s) to build Chromium</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="debug">Enable DCHECK feature with severity configurable at runtime. Mostly intended for debugging and development, NOT RECOMMENDED for general use.</flag>
<flag name="ffmpeg-chromium">(binpkg only) Use Chromium FFmpeg fork (<pkg>media-video/ffmpeg-chromium</pkg>) rather than mainline FFmpeg (<pkg>media-video/ffmpeg</pkg>)</flag>
<flag name="gtk4">Build with GTK4 headers.</flag> <flag name="gtk4">Build with GTK4 headers.</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="hangouts">Enable support for Google Hangouts features such as screen sharing</flag>
<flag name="headless">Build Ozone only with headless backend, NOT RECOMMENDED for general use.</flag>
<flag name="official">Enable Official build instead of Developer build.</flag> <flag name="official">Enable Official build instead of Developer build.</flag>
<flag name="pax-kernel">Allow building on a PaX-enabled kernel</flag> <flag name="pax-kernel">Allow building on a PaX-enabled kernel</flag>
<flag name="pgo">Build with Profile Guided Optimizations (2-stage compilation)</flag> <flag name="pgo">Build with Profile Guided Optimizations (2-stage compilation)</flag>