www-client/chromium: sync

This commit is contained in:
Jared Allard 2024-03-29 13:49:10 +07:00
parent 59db75848a
commit 6406a42315
Signed by: jaredallard
SSH key fingerprint: SHA256:wyRyyv28jBYw8Yp/oABNPUYvbGd6hyZj23XVXEm5G/U
6 changed files with 293 additions and 137 deletions

View file

@ -2,13 +2,16 @@ DIST chromium-122-clang.tar.xz 50107164 BLAKE2B 6b07470aa9a3606d27784c4abfd1577e
DIST chromium-122-rust.tar.xz 140507448 BLAKE2B cb00e65a617801b59a852d921ec1600f577a5a4d16a2df37d413de5cfa9d7274fd8e54d9bf8d21a94f93230e2a27a50f55a36d65e774daf38ba08ba292f52a45 SHA512 2cec9e9a84a494babe581aa900bc76babb3ba7c4622bf050537adf234644f054426eea87c01a037dc7e5f850dec55498d45e982ae334b8d6e99a85679c8aed79
DIST chromium-122.0.6261.111.tar.xz 3422993788 BLAKE2B 14e010fcb658aed85b6b8316912b5c69216668364aa280d8b7eade67e3bfae59433999de4d77b2e53b5810c59707911a0e257ee06a7b049006b2559391d99e7e SHA512 c2383c9a8910e05b29238bdeb555881cfece8c93c2741ca336327fd72690f3d993d2f20dd835b290871ad1bd77757e8ba88fa7c3acfe630dba60b1e5445e74c7
DIST chromium-122.0.6261.128.tar.xz 3431043088 BLAKE2B ebf62de75c2bdddd81500fd0c537a8595dc5698e4f93ff4046063cc3c68c75f0785bf347b88d0d062e3625ac07ffd3e095e83f94075ca55f7cb70f245a9ab30c SHA512 73294900cb400e184252f58ef18e0074072f85bf07e69ef5f3e962ed678107fcd37f299bc5b22db5def87db4e9f4486fdeb5bb3a001dea3137a87163a4a476be
DIST chromium-122.0.6261.94.tar.xz 3418040128 BLAKE2B 96c22f3842aacf533eac75495bc98b4dda519de1bc0c90e6c4a7587050ff4d5536b40bedaeb5eb01622acf6137242b8bb2d51ff47951fdea22427e164d1f8537 SHA512 4ebe03c74a9fce572e3cc7ed86a75a552da5a469be7fb6d5d9a37f2b75a06d392417578b33a720d4f85a48038c447543be38d58acb2f400b23a6ee7909fcdf43
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.28.tar.xz 3453261468 BLAKE2B 0e319d5ea58f4ca582449e6d416788e25d5f9231cf8463bc20c224b2adc8ebc4e066c6a0256820f1e3b707157002129b6e07141876fde9617af633e9b286cb5e SHA512 eac41ae78404b27768d6f3b9fbb732690eb44864e374d27d3e33d41ae7b6224c5cff0bdef8b7c51809e9865ce6eb50e43ef80a1a6af535c403c36d1813709004
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-123.0.6312.86.tar.xz 3472393888 BLAKE2B 542adf3ef909404f140a32cd965ded7e0c55d1108047430eebbab6a28b104089bda4b6df0b929179313cd46ca8c8c8a0067301251cdf74a0362d1e28c0a99013 SHA512 e2be69f3f82460560be915d666349c807822d955a729aee41f8bded5d34b00823a7ac0740c3bc68a4162bcfcb5656f7b192e42b5c79769c18a0bae6b091fb0f0
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

View file

@ -27,13 +27,14 @@ 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
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-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
: ${CHROMIUM_FORCE_CLANG=yes}
@ -75,7 +76,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}
pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )"
LICENSE="BSD"
SLOT="0/beta"
SLOT="0/stable"
KEYWORDS="~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"
@ -209,7 +210,6 @@ depend_clang_llvm_versions() {
fi
}
# #923010 - add `profiler` USE to rust-bin
BDEPEND="
${COMMON_SNAPSHOT_DEPEND}
${PYTHON_DEPS}
@ -229,7 +229,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,7 +338,10 @@ 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")
@ -349,33 +352,38 @@ pkg_pretend() {
}
pkg_setup() {
if use system-toolchain && needs_clang; then
llvm_pkg_setup
fi
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
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 ver_test "$(clang-major-version)" -lt ${LLVM_MIN_SLOT}; then
die "At least Clang ${LLVM_MIN_SLOT} is required"
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"
die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
fi
fi

View file

@ -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-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'
@ -75,17 +87,20 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}
pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )"
LICENSE="BSD"
SLOT="0/beta"
SLOT="0/stable"
KEYWORDS="~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
if ! use bindist && use ffmpeg-chromium; then
ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
fi
}
pkg_setup() {
if use system-toolchain && needs_clang; then
llvm_pkg_setup
fi
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
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 ver_test "$(clang-major-version)" -lt ${LLVM_MIN_SLOT}; then
die "At least Clang ${LLVM_MIN_SLOT} is required"
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"
die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium"
fi
fi
@ -397,6 +427,7 @@ 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 widevine; then
@ -404,7 +435,7 @@ src_prepare() {
fi
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 \
@ -833,13 +864,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
@ -945,9 +980,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,
@ -1298,6 +1343,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])

View file

@ -3,19 +3,19 @@
EAPI=8
# Can't do 12 yet: heavy use of imp, among other things (bug #915001, bug #915062)
PYTHON_COMPAT=( python3_{10..11} )
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
@ -25,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.2143
LLVM_MAX_SLOT=17
LLVM_MIN_SLOT=16
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
# grep 'CLANG_REVISION = ' ${S}/tools/clang/scripts/update.py -A1 | cut -c 18-
GOOGLE_CLANG_VER="llvmorg-18-init-16072-gc4146121e940-5"
# grep 'RUST_REVISION = ' ${S}/tools/rust/update_rust.py -A1 | cut -c 17-
GOOGLE_RUST_VER="df0295f07175acc7325ce3ca4152eb05752af1f2-5"
# 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'
@ -58,7 +69,7 @@ inherit python-any-r1 qmake-utils readme.gentoo-r1 toolchain-funcs virtualx xdg-
DESCRIPTION="Open-source version of Google Chrome web browser"
HOMEPAGE="https://www.chromium.org/"
PATCHSET_PPC64="122.0.6261.57-1raptor0~deb12u1"
PATCH_V="${PV%%\.*}-2"
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
@ -66,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? (
@ -76,17 +87,20 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}
pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )"
LICENSE="BSD"
SLOT="0/stable"
KEYWORDS="arm64"
SLOT="0/beta"
KEYWORDS="~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="
@ -174,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? (
@ -210,7 +228,6 @@ depend_clang_llvm_versions() {
fi
}
# #923010 - add `profiler` USE to rust-bin
BDEPEND="
${COMMON_SNAPSHOT_DEPEND}
${PYTHON_DEPS}
@ -230,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
@ -339,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
if ! use bindist && use ffmpeg-chromium; then
ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set."
fi
}
pkg_setup() {
if use system-toolchain && needs_clang; then
llvm_pkg_setup
fi
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
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 ver_test "$(clang-major-version)" -lt ${LLVM_MIN_SLOT}; then
die "At least Clang ${LLVM_MIN_SLOT} is required"
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-util/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
@ -395,10 +424,10 @@ src_prepare() {
local PATCHES=(
"${FILESDIR}/chromium-cross-compile.patch"
"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
"${FILESDIR}/chromium-108-EnumTable-crash.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"
)
if use widevine; then
@ -406,7 +435,7 @@ src_prepare() {
fi
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 \
@ -434,10 +463,6 @@ src_prepare() {
PATCHES+=( "${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" )
fi
if has_version ">=dev-libs/icu-74.1" && use system-icu ; then
PATCHES+=( "${FILESDIR}/chromium-119.0.6045.159-icu-74.patch" )
fi
default
mkdir -p third_party/node/linux/node-linux-x64/bin || die
@ -530,7 +555,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
@ -612,7 +636,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
@ -839,13 +862,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
@ -951,9 +978,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,
@ -1304,6 +1341,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])

View file

@ -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

View file

@ -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>