www-client/chromium: automate management of versions

This commit is contained in:
Jared Allard 2024-02-25 12:27:09 -08:00
parent 7c7f52bd4d
commit 1d02dba8b4
Signed by: jaredallard
SSH key fingerprint: SHA256:wyRyyv28jBYw8Yp/oABNPUYvbGd6hyZj23XVXEm5G/U
8 changed files with 2866 additions and 2 deletions

View file

@ -0,0 +1,15 @@
diff --git a/@@EBUILD@@ b/@@EBUILD@@
index 63466f33a755..1e1575885791 100644
--- a/@@EBUILD@@
+++ b/@@EBUILD@@
@@ -401,6 +401,10 @@ src_prepare() {
"${FILESDIR}/chromium-117-system-zstd.patch"
)
+ if use widevine; then
+ PATCHES+=("${FILESDIR}/chromium-001-widevine-support-for-arm.patch")
+ fi
+
if use system-toolchain; then
# The patchset is really only required if we're not using the system-toolchain
PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}" )

View file

@ -0,0 +1,15 @@
diff --git a/chromium-122.0.6261.57.ebuild b/chromium-122.0.6261.57.ebuild
index 63466f33a755..1e1575885791 100644
--- a/chromium-122.0.6261.57.ebuild
+++ b/chromium-122.0.6261.57.ebuild
@@ -401,6 +401,10 @@ src_prepare() {
"${FILESDIR}/chromium-117-system-zstd.patch"
)
+ if use widevine; then
+ PATCHES+=("${FILESDIR}/chromium-001-widevine-support-for-arm.patch")
+ fi
+
if use system-toolchain; then
# The patchset is really only required if we're not using the system-toolchain
PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}" )

View file

@ -0,0 +1,24 @@
From b412032d8f94674c59056d69087f28ad7e597a22 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Thu, 18 Feb 2021 19:35:58 -0700
Subject: [PATCH 1/3] widevine support for arm
---
third_party/widevine/cdm/widevine.gni | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/third_party/widevine/cdm/widevine.gni b/third_party/widevine/cdm/widevine.gni
index 45e984205885f..3cf8c290728fd 100644
--- a/third_party/widevine/cdm/widevine.gni
+++ b/third_party/widevine/cdm/widevine.gni
@@ -26,7 +26,7 @@ if (is_chromeos && !is_chromeos_device) {
library_widevine_cdm_available =
(is_chromeos &&
(target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) ||
- (target_os == "linux" && target_cpu == "x64") ||
+ (target_os == "linux" && (target_cpu == "x64" || target_cpu == "arm" || target_cpu == "arm64")) ||
(target_os == "mac" && (target_cpu == "x64" || target_cpu == "arm64")) ||
(target_os == "win" &&
(target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm64"))
--
2.39.1

48
www-client/chromium/.update.sh Executable file
View file

@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Updates the chromium package to use the versions inside from the
# gentoo repository while persisting the patches we need.
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
pushd "${DIR}" >/dev/null || exit 1
# Remove everything but dotfiles (us)
rm -rf ./*
popd >/dev/null || exit 1
# Fetch the ebuilds from the gentoo repository
tempDir=$(mktemp -d)
git clone --filter=tree:0 --no-checkout --depth 1 --sparse https://github.com/gentoo/gentoo "${tempDir}"
pushd "${tempDir}" >/dev/null || exit 1
git sparse-checkout add www-client/chromium
git checkout
popd >/dev/null || exit 1
# Copy the ebuilds to the current directory
cp -r "${tempDir}"/www-client/chromium/* "${DIR}"/
# Patch all the ebuilds.
for ebuild in *.ebuild; do
for patch in .patches/ebuilds/*.patch; do
# Copy the patch to a temporary file and rescope it to use this
# file.
cp "${patch}" "${patch}.tmp"
sed -i.bak "s|@@EBUILD@@|${ebuild}|g" "${patch}.tmp"
patch -p1 <"${patch}.tmp"
done
# Mutate KEYWORDS to only be scoped to arm64. Determine if stable or
# not based on the amd64 keyword.
if grep -q 'KEYWORDS=".*~amd64' "${ebuild}"; then
sed -i.bak 's|KEYWORDS=".*|KEYWORDS="~arm64"|' "${ebuild}"
else
sed -i.bak 's|KEYWORDS=".*|KEYWORDS="arm64"|' "${ebuild}"
fi
done
# Copy over patches to the source files
cp -r .patches/files/* files/
# Remove .orig and .bak files
find . -name '*.orig' -delete
find . -name '*.bak' -delete

View file

@ -1,7 +1,13 @@
DIST chromium-121.0.6167.184-clang.tar.xz 50276852 BLAKE2B 9aa9eefeeb3b03bb8187c28b8de2f97ef26babdbec390b9d639c543dfc33e22dd338cc033419efada7fc4405ffdc7f7135c8f96b4a735df06dd883c114a9190d SHA512 5d7561ccc48121a56e29674aefb11d5184e65e1d055a94a8c3203768a8792b65418f0606a6ca40774bc8ba34172286d04c69584c1f56a5ba84d94b4c6e9c73bd
DIST chromium-121.0.6167.184-rust.tar.xz 140303948 BLAKE2B 24b6d1cbf9d2bcf1a5a4bea4b509ad326a1dce6671250f6b3a93717ea21d4d1f09b12b4e820919b35814536609569ad52d26e3c8eb7afead92881facbd12e04c SHA512 bd7feb5426e66f304291f6f79ce1d8a5b845dff1b420854406951f702ae6ec44f2edfed431893dcf87c97d0f9c9f9b504d3e8ad3ad5ec99b053c4e0d3cbc642c
DIST chromium-121.0.6167.184.tar.xz 3351296496 BLAKE2B 8990baaa5671740cf7b7e3e82fab7dc47d7a3b7ecde9c163afefd730495bc57ab7a2408dec14f3e9e11edbf2a2aef54ffb0e987136d1653a9bd884866e1a0568 SHA512 881cf86ea41159d4eec4ad59693090797320e7f3e95befffa65ebc850577dbfa4aefb8d5ed067c7311cf6e81215f553030829f1bc90d53024f17e68661f8526f
DIST chromium-122-clang.tar.xz 50107164 BLAKE2B 6b07470aa9a3606d27784c4abfd1577ead70cc2c310c2db47d486a64d93d9984d9b7737493a9c30ea7e0f0868291f3aac8058ba23f81f940469d23bafa260bf1 SHA512 a46a7869bff2e5edd34167751257453fd89eae92bd5e291c4408ff0234997b04fae3df7906f46d83f72da5c4f11199489a14d8a55251d0efc3c0ffc1c56d9e22
DIST chromium-122-rust.tar.xz 140507448 BLAKE2B cb00e65a617801b59a852d921ec1600f577a5a4d16a2df37d413de5cfa9d7274fd8e54d9bf8d21a94f93230e2a27a50f55a36d65e774daf38ba08ba292f52a45 SHA512 2cec9e9a84a494babe581aa900bc76babb3ba7c4622bf050537adf234644f054426eea87c01a037dc7e5f850dec55498d45e982ae334b8d6e99a85679c8aed79
DIST chromium-122.0.6261.39.tar.xz 3406634528 BLAKE2B 6b6805a3f9eaa263e6a8c03bf23378dc7afd9943e1072f769120cc95ad207b7c8088818760f3fe7d68c8e3e56aaa6e1d3c144faad1a28d096228982185b68c7f SHA512 23d09f1ef31d9177c4dafda75537ef4118a1a1d4ab83724a042006c5e17471c17767eb9e4bb68f60c5984a0f94b4887d9fe18a6f6e890046056b627705d68b8b
DIST chromium-122.0.6261.57.tar.xz 3413129956 BLAKE2B afaf14fa77f65758bc0caefdd61261387c9f0fcdb862ca75cbe488aac7363c707d9541eaa9f5dbbfe4de1784c1cab1a0bbc40514a02d3ac1ad86a251609c4572 SHA512 71a221999a74054a637921f3dadc95eb51ccd8fa1161db423dd70c8aff097b54a4485c9e358875f24f57537389c9a2e9b7ddc82eaee40bca4d1f4a959eb40bbf
DIST chromium-patches-121-3.tar.bz2 14100 BLAKE2B e068c07a0954b72b447cfb82605654ad5c6b15ba0efe9eb4804cdb019db27dddb6ae54ee94cc63c247cf7575e63c5ec09eee10e35906d85d9ae9d79763b35803 SHA512 4dbf69e903cc8d7e2eaa6c0c54c9fb59393d0f89bff5eaaa32bb3fd0e2b5bc9007b326dd7a7e0d590cc5e9d29a85a61a2540293317dc29e9dd4b8596eee1d587
DIST chromium-patches-122-2.tar.bz2 5038 BLAKE2B fd104a7c1d81ecb9bf82da30a71916ff3d712ae710f1de8965cd0fb7395b6dced780f3a1af1ece8201dfe388fecff7b506cbb5cc5b32621895f37bb380cdc5aa SHA512 331401d324ca4b1b90a44019ba7d823f8461188bd19864216320bd97580d835ef3151da49c71aff695159440ed2b48fcec7afc1bcbc2c0f629cbbce7d80faf74
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_121.0.6167.160-1raptor0~deb12u1.debian.tar.xz 543004 BLAKE2B 9fd261dde6e1682d1cc68b1d4e0a72162c229c0df83f2bedbcdd152375e20baaaa34a16c8b22e4c436b5d7d5ea9edabb7d35277bc4d6dea52fa42c837e812bce SHA512 f6f806c9f52eaff7bc12882421541257f956d48fc8e802d6e028b181ceed015fa33416806fbb1d0fc71b8b9d0678d5b4295502d674048486f9649bd18936f101
DIST chromium_121.0.6167.85-1raptor0~deb12u1.debian.tar.xz 542644 BLAKE2B 298b383b8f311c55c42b75dbaf7d14e1af52e9934a78c9c1b7d6e7d8a5e415d1ef51fc488f0205e851113ca8bb9982707c78485939438d4ddc7c14d5945b5a2c SHA512 f2a8f460d45d1a2302c7958ac1e163276779e5fb76c2efbbd631a21d84a068926dffe064a37cf605bbb34780efc16e32de24ecc729e421ac851fb142c112185a

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -77,7 +77,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}
LICENSE="BSD"
SLOT="0/stable"
KEYWORDS="arm64"
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+=" qt5 qt6 screencast selinux +system-toolchain vaapi wayland widevine"
@ -401,7 +401,6 @@ src_prepare() {
"${FILESDIR}/chromium-117-system-zstd.patch"
)
if use widevine; then
PATCHES+=("${FILESDIR}/chromium-001-widevine-support-for-arm.patch")
fi