summaryrefslogtreecommitdiff
path: root/www-client/chromium
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-27 13:01:55 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-27 13:01:55 +0000
commitf9dd41d94a755be4b93be4655558eb79bb87113b (patch)
tree2794ea86a1752fe099308731fedd7bd527c3bd0f /www-client/chromium
parente5558bb40ba46b03d0c8e82ae60dce9a32933989 (diff)
gentoo auto-resync : 27:03:2024 - 13:01:55
Diffstat (limited to 'www-client/chromium')
-rw-r--r--www-client/chromium/Manifest10
-rw-r--r--www-client/chromium/chromium-124.0.6367.8.ebuild (renamed from www-client/chromium/chromium-123.0.6312.46.ebuild)150
-rw-r--r--www-client/chromium/files/chromium-124-libwebp-shim-sharpyuv.patch36
-rw-r--r--www-client/chromium/metadata.xml1
4 files changed, 147 insertions, 50 deletions
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
index 0e49abb78620..c555d5bb5463 100644
--- a/www-client/chromium/Manifest
+++ b/www-client/chromium/Manifest
@@ -3,6 +3,7 @@ AUX chromium-109-system-zlib.patch 440 BLAKE2B 95bb1099055e3e0e122d4d8a77cddec0a
AUX chromium-111-InkDropHost-crash.patch 1066 BLAKE2B ee0b42803a59ef4731e4f316849c2062870b92040ff4e339c3f3f2562999b54fa3176b27e432f31ada76559087631fd623d9f57f1961a42acd0684041c322a01 SHA512 dfa3ab6a84b57b6e66053be2597f0d6c7f4caf54b0e45a359774a56dfbe1e65bdea91120134e77b1e7c38c336a4fd8d05a7c26e9d3bf4bdc0fe40ad7cd832a54
AUX chromium-117-system-zstd.patch 998 BLAKE2B def8ed87b1d100a4272b3e13fe928a40f429546e77818ccac2cc2c15682ef3aec0d78ba158079facd0ce770049b5ef190c82d4d829f56043f7f08b51ef9b41e4 SHA512 b3beb98b539fe160fbc493ba410ae0f68540cc4b6834f1f8ce9a22c3f4f59ef5d583ad48793e10549fd02a701f833a3969791ef4524322cd1e715ca5bf226bc8
AUX chromium-119.0.6045.159-icu-74.patch 827 BLAKE2B 4290eadddb010984df9248d8b0f8d4c442bac191447e8f104db98e8f0106a81fe1d344c1a22b0aaa710d823de7bbdd250901a547ea71f446114ec59ba3bf83d2 SHA512 5e39575f344ab201334332c0373eebe0999cb45b777865e539eaa6a59337358ee69d377f312f8bf3b153fe70a9ef4d784fef1284a853dd235178ea7870ebff94
+AUX chromium-124-libwebp-shim-sharpyuv.patch 870 BLAKE2B 10b34ca3c84ec1aa95376d43c3b4c356450127493ff055bfb5fc3fbabc4fe8cda0a899041b105748c229b2a943be57c0410f1cfb0ce38c5a10e40edad02bf67b SHA512 f01e616440a0f877823edacc5762ab068e25e25f984d1b3f22f9fbdec64272c43953edec15de40ad993f1bd35aeabf88034a3c8a2e40893b2d4308b8d28e0df5
AUX chromium-browser.xml 407 BLAKE2B 168d78b0855546ca559cfb51aff0bc85d5e6ae974c25eb76e4a02f6d11659489c6e40397a0b2f7bc1fda336fd2c6dd8c863fccc3340719210b41c7fef51927f4 SHA512 b767fb4fd1925029d95560fc14cb7ab12ae43b2fe923e92d75e733b9723cbe1dcdf6df041a2b62554e98b79b47ef3f6028c773e72e6fd53166a021d49657aeca
AUX chromium-cross-compile.patch 323 BLAKE2B 8d5091ce5287422c9688ede2563360a96b8bd34b9750dc1c8f0b6ca9aeff2c066fac2da169396baa131d971c087c78f9af53999df0e102d1f57176f5e8d3dd57 SHA512 06d3afc1aa19e57daac0e4bad37e1f365a68408240430e5e818e5a4f12e3b7519214eafa463633e447e7029f4ae13ea864ca347ad1fac117702a0be88718a954
AUX chromium-launcher-r7.sh 1631 BLAKE2B ae28d758264446511fd2b64ba69fe920144b351e8833e0e98f43d00633e850094c288b5d97d1a84801ea13aceb294623692c86c1b9be5811b7b97fa8a07a1ecd SHA512 1e97f8394bd8bb4b29570b1b85176efe6258314a596f079bee1c4018113e0023aa54a93690ba8de2a00d127af10dbe2cc3fb3127b72b841c6f28f9e7bed820e0
@@ -14,10 +15,13 @@ DIST chromium-122.0.6261.111.tar.xz 3422993788 BLAKE2B 14e010fcb658aed85b6b83169
DIST chromium-122.0.6261.128.tar.xz 3431043088 BLAKE2B ebf62de75c2bdddd81500fd0c537a8595dc5698e4f93ff4046063cc3c68c75f0785bf347b88d0d062e3625ac07ffd3e095e83f94075ca55f7cb70f245a9ab30c SHA512 73294900cb400e184252f58ef18e0074072f85bf07e69ef5f3e962ed678107fcd37f299bc5b22db5def87db4e9f4486fdeb5bb3a001dea3137a87163a4a476be
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.46.tar.xz 3460145864 BLAKE2B 6a2355dae72e73be6aa80664bdcd33c6b986d44d6adfcd53c5159128ed1c1c58abd8f7e9fb5e118f676be4f6aa9cca7762158ec747b9bdea575ca6b681a94ee7 SHA512 b3f2b975a7b1c3d288eb2a9a60a16b5279f4458abd5cdcec2249abdaf76047ce6edcca2afe3e5dbd11be64ce156b0c5f70576b2e448d0d3c7c01e95191049865
DIST chromium-123.0.6312.58.tar.xz 3465099244 BLAKE2B d0b85e740924a33350c5b6d3a6d1e94c8b946c52ac760237b2391127c99326c64b50de29751850dc368331b66402ab0c4fc65b9aeef09302857a1f5300a0d17b SHA512 4cb08767b8a6fe268c44bd7b621632c71f7d2f3f6c1b7bae9e0373dfc2eada397ab511a068582c2d17bbf3ee9ff16f05fccd454d610d63dd2fd14d6ca355a0c0
+DIST chromium-124-clang.tar.xz 50212876 BLAKE2B f4786d4192306c005ce790ec3fc2595055d7a835b438e3c7a101b2c56653ad0ef3eb7b797224c9fe910c7ccd31c7cad50d502411ef220d151a8a1b432610d6b8 SHA512 4fb7bbb8abc9b3ae065b32215327d5de58e27c20c0199a8c243a9bfb89bf95b932ac1c2162e65acc954bde5975373a40ccada346cd0340d89889a12e4b8b96df
+DIST chromium-124-rust.tar.xz 145977368 BLAKE2B 3fccaed3a1f7b85a303f5e4281d0d7fe0d194f3203751bae4a937f3447260ecfa5141d49b945705d69d36e89901b99fd0955ce0e5bcff0c17c7096fd78782722 SHA512 272ef52b5b201aeb056db7339387504b78252411899ea13ed5829b77bab8c76fd84125d68678064ac204fa48caf16f86ee1d99c64d599d955fb1097d5e46fc51
+DIST chromium-124.0.6367.8.tar.xz 3422269904 BLAKE2B 9541accb7d2da845bab31dde9733eef69cca36d29e7b3bcc9bac0f1739c409bdf9c989a0bf63408a15f97a17d9f430e369e7958e8c342a2272e0e433be936c5f SHA512 3a8678bcef91764729059bdb52717f19bbc0596acf48e042a65282d3a27214fd086e8cd0d44d1a3fb06d53bd42ef1bf66cdbe553a28fd70f6e5d78191d9c04db
DIST chromium-patches-122-2.tar.bz2 5038 BLAKE2B fd104a7c1d81ecb9bf82da30a71916ff3d712ae710f1de8965cd0fb7395b6dced780f3a1af1ece8201dfe388fecff7b506cbb5cc5b32621895f37bb380cdc5aa SHA512 331401d324ca4b1b90a44019ba7d823f8461188bd19864216320bd97580d835ef3151da49c71aff695159440ed2b48fcec7afc1bcbc2c0f629cbbce7d80faf74
DIST chromium-patches-123.tar.bz2 4697 BLAKE2B 8a7dd76edb23afb7b2f65084696bce5d6e54d63ca34c4590052db1086ed0a422b1efde863c4daad4e2526f329eb65276b9ad5406017cd97fb75b1a9556c1f933 SHA512 ea47255deac1893896f64496629d34c7092f266a175b8400fcf4f01b9d038ae240e911bff488558bb28e6f5795bbcf276adf20ed1e0ccb8ac99f9ddd260742f9
+DIST chromium-patches-124.tar.bz2 4706 BLAKE2B 5acae233ce7b43669dbf65c368467f94c9a0ec509713ec4510943ede12d495dad1670a5c0a7435e0e16251c7429145e575cb1c9661439ff1c626d709856b6a94 SHA512 3d0d365b6d484def626153b07c0ab187195f27ebada63bd2547b52ed1e2157aab2415a6140c293a140d7a0545ae0fc1cdd431b37fa0c4a212a34c13baccb358c
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.111-1raptor0~deb12u1.debian.tar.xz 550216 BLAKE2B fc193f3fb822b0373cdb189ffdcb40bfad03e1a043b4854dd5c1d56690fc674abda4cfeb171d29987d785cde19770f895af63811b27f681dcba6882044f5dd34 SHA512 fe8132d702e8d8f5b9e8c97ff810b964eb035d951d90cda8f31a9d80a4bd5544081020aa9aed829cb8c86517f68147cd9645b82a3e4bbcd745f696fc32f9d3f4
@@ -25,6 +29,6 @@ DIST chromium_122.0.6261.57-1raptor0~deb12u1.debian.tar.xz 551860 BLAKE2B b3f9be
DIST chromium_122.0.6261.94-1raptor0~deb12u1.debian.tar.xz 551764 BLAKE2B bda6d527626fc5ec99d7d889390ec361c64e51fcdb331addfe43773a761bb0a50d536ca1b62e29e0a11c51e31dcacee5346580b75939c31d02700d629b6b6f90 SHA512 85d19616792f0b313e2157e64b22290ec425d34cd97cc61fdea8cd51d9fe46ea2375f513340a3c4f8f3bfc31117bb8e5a4be95bc792576752dd9733b38bb93ca
EBUILD chromium-122.0.6261.111.ebuild 44773 BLAKE2B 0aa43c0b60fd5ca4e0a753b7d13a5dbbb3f3634ebc888e1a895d990c723709eebfdf5c7af8835c67e6dee659fec6bda947153f21b235daa0b3e9404cee38da79 SHA512 cbc12d20a6a014dec390b43169e9de43107a0d6b9a1c960739ca51dc619fa00d2b857b357b5b125c55259449b17786c419132d5363d562bf22a0f968075c541c
EBUILD chromium-122.0.6261.128.ebuild 44776 BLAKE2B 928440e43d3550fea015cb3eec1962d63e2b7ccbcc8b783f42eb01d77454513b43d011b5563f4c44796698c34219cd67ce620377153efb4ec459754c4932a8be SHA512 3b449d4f98833acc98635f61722c3cda5e0a457b6ec9e1ee74a64620e35f025b93dfb3b9bf5446ba80aa6fb72332f6ae0be8c4e73d7c0d9df33807635bc0cc16
-EBUILD chromium-123.0.6312.46.ebuild 44492 BLAKE2B dafb48b3da55bf7ca16a5d92197a2431523559cc417d364b69278310f5ae66b395ba1202fea7e85c6892703dfef1c7d3b2888a34a425f37e421c48a1cee9a595 SHA512 bfca78fee1e17939ba22a098d1116086c4422c1054cb2e35fcaaf88ec277f8bf1916979c47fe0adff90e08d942acebf29cae58117ae58ab0157f9d015b34e9d1
EBUILD chromium-123.0.6312.58.ebuild 45012 BLAKE2B 255c282ef99785f255edafdb722e26eed78c9eeabb5ba66e2fcc80c4ecad142c2d33ec18305932ede9505627a5a605091fe986d9a78b074c144279ea06dbd10d SHA512 a30b7897eb52b7a72f0e7e89bcfb765bb4824268e84aecbc1e0b0fedda13323ec4e73610c8758f5b5534c8f77e0c15e3e5907460b386cb70efb593875466beb7
-MISC metadata.xml 2071 BLAKE2B ce2b047cbf7d335e62f382cb1d95845c1a87be0cc95bc708be9efc9ef65f91b34fa8516fb68bac4611eaf0a335557f71e6cb59d174096c1a25cf28d468cee916 SHA512 b295b4fe1ac6c7c97330d39be32e0ef1f8f8d5adcbfc5a8e1bbc811a66fc5892aadf1ec38beba40d00f92168dd854cd8a4313b2c0beabd7afda3a6e782f891a1
+EBUILD chromium-124.0.6367.8.ebuild 47267 BLAKE2B 4e4db91f9bc507d8c8bf1e183f99136fa1888a42069ade08e3c0073c70e16edf423bde9089caa79af2495d21d07cb02d4915322c075aa7975ac44eef69d5edbd SHA512 a95c20b540f51d0f09c25b55b5d67797cc590144f932dfde038eb3f31cda1c8d4020c96258ef4312b4a2715c54de06fe4d8addf0f36e9ca5e19d28e09c465566
+MISC metadata.xml 2249 BLAKE2B 42e914e06d12ce6ebff4251fa81c28970676bb6cad7e9b1591dbbf79e45a8805fad6ee3bfb7c1b81f47e91e101091fbfcd565a0cc47f8280b9f169559ca61f2c SHA512 a30553dc4878fdb70546a1dbcb8c38ac42b0bddd500e1d09ba5a8414f681b3304e9a6a02e734c1e7eb58e782f30f6390be97b4a22996788e7639e8a9feb01ee9
diff --git a/www-client/chromium/chromium-123.0.6312.46.ebuild b/www-client/chromium/chromium-124.0.6367.8.ebuild
index 915ecb3998c2..73b37ab1e00e 100644
--- a/www-client/chromium/chromium-123.0.6312.46.ebuild
+++ b/www-client/chromium/chromium-124.0.6367.8.ebuild
@@ -6,15 +6,16 @@ EAPI=8
PYTHON_COMPAT=( python3_{11..12} )
PYTHON_REQ_USE="xml(+)"
-# PACKAGING NOTES:
+# 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 libcxx, but sometimes it is unavoidable.
-# Remember to force the use of Clang when this is forced.
+# 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
@@ -24,18 +25,29 @@ PYTHON_REQ_USE="xml(+)"
# 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
-LLVM_MAX_SLOT=17
-LLVM_MIN_SLOT=16
+# 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
-# grep 'CLANG_REVISION = ' ${S}/tools/clang/scripts/update.py -A1 | cut -c 18-
-GOOGLE_CLANG_VER="llvmorg-19-init-2319-g7c4c2746-1"
-# grep 'RUST_REVISION = ' ${S}/tools/rust/update_rust.py -A1 | cut -c 17-
-GOOGLE_RUST_VER="340bb19fea20fd5f9357bbfac542fad84fc7ea2b-3"
+# chromium-tools/get-chromium-toolchain-strings.sh
+GOOGLE_CLANG_VER=llvmorg-19-init-2941-ga0b3dbaf-22
+GOOGLE_RUST_VER=7168c13579a550f2c47f7eea22f5e226a436cd00-1
# 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'
@@ -65,7 +77,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}
!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
+ 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? (
@@ -78,14 +90,17 @@ LICENSE="BSD"
SLOT="0/beta"
KEYWORDS="~amd64 ~arm64"
IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd"
-IUSE="+X ${IUSE_SYSTEM_LIBS} cups debug gtk4 +hangouts headless kerberos libcxx lto +official pax-kernel pgo +proprietary-codecs pulseaudio"
+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="
@@ -173,6 +188,10 @@ RDEPEND="${COMMON_DEPEND}
)
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? (
@@ -209,7 +228,6 @@ depend_clang_llvm_versions() {
fi
}
-# #923010 - add `profiler` USE to rust-bin
BDEPEND="
${COMMON_SNAPSHOT_DEPEND}
${PYTHON_DEPS}
@@ -229,7 +247,7 @@ BDEPEND="
>=dev-util/web_page_replay_go-20220314
$(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT})
)
- >=dev-lang/rust-${RUST_MIN_VER}[profiler]
+ >=virtual/rust-${RUST_MIN_VER}[profiler(-)]
)
>=dev-build/gn-${GN_MIN_VER}
dev-lang/perl
@@ -338,44 +356,56 @@ pre_build_checks() {
}
pkg_pretend() {
- pre_build_checks
+ 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} since USE=headless is set."
+ use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set."
done
fi
-}
-pkg_setup() {
- if use system-toolchain && needs_clang; then
- llvm_pkg_setup
+ if ! use bindist && use ffmpeg-chromium; then
+ ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
fi
+}
- pre_build_checks
+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 [[ ${MERGE_TYPE} != binary ]] && 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"
+ 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 ver_test "$(clang-major-version)" -lt ${LLVM_MIN_SLOT}; then
- die "At least Clang ${LLVM_MIN_SLOT} is required"
+ 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"
+ die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
fi
fi
@@ -397,10 +427,11 @@ src_prepare() {
"${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"
)
if use system-toolchain; then
- # The patchset is really only required if we're not using the system-toolchain
+ # 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 \
@@ -520,7 +551,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
@@ -602,7 +632,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
@@ -829,13 +858,17 @@ chromium_configure() {
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"
+ 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"
+ 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+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\""
myconf_gn+=" rustc_version=\"${rustc_ver}\""
fi
@@ -941,9 +974,19 @@ chromium_configure() {
# 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}\""
+ 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,
@@ -1294,6 +1337,19 @@ src_install() {
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])
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 000000000000..fa038731cd4a
--- /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
diff --git a/www-client/chromium/metadata.xml b/www-client/chromium/metadata.xml
index 2499b3f5ccaf..46230c585260 100644
--- a/www-client/chromium/metadata.xml
+++ b/www-client/chromium/metadata.xml
@@ -10,6 +10,7 @@
<name>Matt Jolly</name>
</maintainer>
<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="debug">Enable DCHECK feature with severity configurable at runtime. Mostly intended for debugging and development, NOT RECOMMENDED for general use.</flag>
<flag name="gtk4">Build with GTK4 headers.</flag>
<flag name="headless">Build Ozone only with headless backend, NOT RECOMMENDED for general use.</flag>