extra/chromium to 121.0.6167.139-2

This commit is contained in:
Kevin Mihelich 2024-02-01 00:28:56 +00:00
parent 36599b23c6
commit 93ee6012c2
4 changed files with 97 additions and 13 deletions

View file

@ -1,7 +1,7 @@
pkgbase = chromium
pkgdesc = A web browser built for speed, simplicity, and security
pkgver = 121.0.6167.139
pkgrel = 1
pkgrel = 2
url = https://www.chromium.org/Home
arch = x86_64
license = BSD-3-Clause
@ -13,6 +13,7 @@ pkgbase = chromium
makedepends = gperf
makedepends = nodejs
makedepends = pipewire
makedepends = rust
makedepends = qt5-base
makedepends = java-runtime-headless
makedepends = git
@ -39,6 +40,7 @@ pkgbase = chromium
depends = flac
depends = libxml2
depends = libwebp
depends = minizip
depends = opus
depends = harfbuzz
depends = libxslt
@ -54,14 +56,20 @@ pkgbase = chromium
source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-121.0.6167.139.tar.xz
source = https://github.com/foutrelis/chromium-launcher/archive/v8/chromium-launcher-8.tar.gz
source = https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/121/chromium-patches-121.tar.bz2
source = REVERT-simplify-blink-NativeValueTraitsBase.patch::https://github.com/chromium/chromium/commit/940af9f2c87b.patch
source = icu-74.patch
source = chromium-121-constexpr.patch
source = drop-flags-unsupported-by-clang16.patch
source = compiler-rt-16.patch
source = use-oauth2-client-switches-as-default.patch
sha256sums = e12cc967bef7a79630828792f02d95297a06eb905c98e4c6e065fd5e74d6f9ff
sha256sums = 213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a
sha256sums = e9113c1ed2900b84b488e608774ce25212d3c60094abdae005d8a943df9b505e
sha256sums = 318df8f8662071cebcdf953698408058e17f59f184500b7e12e01a04a4206b50
sha256sums = ff9ebd86b0010e1c604d47303ab209b1d76c3e888c423166779cefbc22de297f
sha256sums = 09677c39ff9b910c732a049252969bfa03587e70502765d68b0345bac396c0b2
sha256sums = 8d1cdf3ddd8ff98f302c90c13953f39cd804b3479b13b69b8ef138ac57c83556
sha256sums = 8a2649dcc6ff8d8f24ddbe40dc2a171824f681c6f33c39c4792b645b87c9dcab
sha256sums = e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711
pkgname = chromium

View file

@ -16,7 +16,7 @@ highmem=1
pkgname=chromium
pkgver=121.0.6167.139
pkgrel=1
pkgrel=2
_launcher_ver=8
_manual_clone=0
_system_clang=1
@ -28,7 +28,7 @@ depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
'libffi' 'desktop-file-utils' 'hicolor-icon-theme')
makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
'qt5-base' 'java-runtime-headless' 'git')
'rust' 'qt5-base' 'java-runtime-headless' 'git')
optdepends=('pipewire: WebRTC desktop sharing under Wayland'
'kdialog: support for native dialogs in Plasma'
'qt5-base: enable Qt5 with --enable-features=AllowQt'
@ -39,8 +39,11 @@ options=('!lto') # Chromium adds its own flags for ThinLTO
source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${pkgver%%.*}/chromium-patches-${pkgver%%.*}.tar.bz2
REVERT-simplify-blink-NativeValueTraitsBase.patch::https://github.com/chromium/chromium/commit/940af9f2c87b.patch
icu-74.patch
chromium-121-constexpr.patch
drop-flags-unsupported-by-clang16.patch
compiler-rt-16.patch
use-oauth2-client-switches-as-default.patch
0001-widevine-support-for-arm.patch
0002-Run-blink-bindings-generation-single-threaded.patch
@ -48,8 +51,11 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom
sha256sums=('e12cc967bef7a79630828792f02d95297a06eb905c98e4c6e065fd5e74d6f9ff'
'213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
'e9113c1ed2900b84b488e608774ce25212d3c60094abdae005d8a943df9b505e'
'318df8f8662071cebcdf953698408058e17f59f184500b7e12e01a04a4206b50'
'ff9ebd86b0010e1c604d47303ab209b1d76c3e888c423166779cefbc22de297f'
'09677c39ff9b910c732a049252969bfa03587e70502765d68b0345bac396c0b2'
'8d1cdf3ddd8ff98f302c90c13953f39cd804b3479b13b69b8ef138ac57c83556'
'8a2649dcc6ff8d8f24ddbe40dc2a171824f681c6f33c39c4792b645b87c9dcab'
'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711'
'b5bb3d0e2cd06aa92bb0ea62d6915dac1635cee79e9e1405cf17fe471baa393e'
'01c8742f987e158245959561db7f7529254a81491954174be2ef8a4f226cbf42'
@ -85,7 +91,7 @@ declare -gA _system_libs=(
#[re2]=re2 # needs libstdc++
#[snappy]=snappy # needs libstdc++
#[woff2]=woff2 # needs libstdc++
#[zlib]=minizip
[zlib]=minizip
)
_unwanted_bundled_libs=(
$(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')
@ -141,25 +147,38 @@ prepare() {
# Fix build with ICU 74
patch -Np1 -i ../icu-74.patch
# Fix "error: defaulted definition of equality comparison operator cannot
# be declared constexpr because it invokes a non-constexpr comparison
# function" (patch from Fedora)
patch -Np1 -i ../chromium-121-constexpr.patch
# Revert usage of C++20 features which likely need newer clang
patch -Rp1 -i ../REVERT-simplify-blink-NativeValueTraitsBase.patch
# Drop compiler flags that need newer clang
#patch -Np1 -i ../drop-flags-unsupported-by-clang16.patch
patch -Np1 -i ../drop-flags-unsupported-by-clang16.patch
# Allow libclang_rt.builtins from compiler-rt 16 to be used
patch -Np1 -i ../compiler-rt-16.patch
# Fixes for building with libstdc++ instead of libc++
#patch -Np1 -i ../chromium-patches-*/chromium-114-ruy-include.patch
#patch -Np1 -i ../chromium-patches-*/chromium-117-material-color-include.patch
#patch -Np1 -i ../chromium-patches-*/chromium-119-clang16.patch
patch -Np1 -i ../chromium-patches-*/chromium-114-ruy-include.patch
patch -Np1 -i ../chromium-patches-*/chromium-117-material-color-include.patch
patch -Np1 -i ../chromium-patches-*/chromium-119-clang16.patch
# Link to system tools required by the build
mkdir -p third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
ln -s /usr/bin/java third_party/jdk/current/bin/
# Use prebuilt rust as system rust cannot be used due to the error:
# error: the option `Z` is only accepted on the nightly compiler
#./tools/rust/update_rust.py
if (( !_system_clang )); then
# Use prebuilt rust as system rust cannot be used due to the error:
# error: the option `Z` is only accepted on the nightly compiler
./tools/rust/update_rust.py
# To link to rust libraries we need to compile with prebuilt clang
#./tools/clang/scripts/update.py
# To link to rust libraries we need to compile with prebuilt clang
./tools/clang/scripts/update.py
fi
# Remove bundled libraries for which we will use the system copies; this
# *should* do what the remove_bundled_libraries.py script does, with the
@ -241,6 +260,15 @@ build() {
"clang_version=\"$_clang_version\""
'chrome_pgo_phase=0' # needs newer clang to read the bundled PGO profile
)
# Allow the use of nightly features with stable Rust compiler
# https://github.com/ungoogled-software/ungoogled-chromium/pull/2696#issuecomment-1918173198
export RUSTC_BOOTSTRAP=1
_flags+=(
'rust_sysroot_absolute="/usr"'
"rustc_version=\"$(rustc --version)\""
)
fi
if [[ $CARCH == "armv7h" ]]; then

View file

@ -0,0 +1,12 @@
diff -up chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h.me chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h
--- chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h.me 2024-01-18 17:00:24.791582422 +0100
+++ chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h 2024-01-18 17:22:21.521682845 +0100
@@ -27,7 +27,7 @@ struct QueryParams {
QueryParams(const QueryParams& other);
QueryParams& operator=(const QueryParams& other);
- friend constexpr bool operator==(const QueryParams&,
+ friend bool operator==(const QueryParams&,
const QueryParams&) = default;
// Individual resource contexts to measure.

View file

@ -0,0 +1,36 @@
diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn
index d4de2e0cca0..57359c32121 100644
--- a/build/config/clang/BUILD.gn
+++ b/build/config/clang/BUILD.gn
@@ -130,12 +130,15 @@ template("clang_lib") {
} else if (is_linux || is_chromeos) {
if (current_cpu == "x64") {
_dir = "x86_64-unknown-linux-gnu"
+ _suffix = "-x86_64"
} else if (current_cpu == "x86") {
_dir = "i386-unknown-linux-gnu"
+ _suffix = "-i386"
} else if (current_cpu == "arm") {
_dir = "armv7-unknown-linux-gnueabihf"
} else if (current_cpu == "arm64") {
_dir = "aarch64-unknown-linux-gnu"
+ _suffix = "-aarch64"
} else {
assert(false) # Unhandled cpu type
}
@@ -166,6 +169,15 @@ template("clang_lib") {
assert(false) # Unhandled target platform
}
+ # Bit of a hack to make this find builtins from compiler-rt 16
+ if (is_linux || is_chromeos) {
+ if (clang_version == "16") {
+ _dir = "linux"
+ } else {
+ _suffix = ""
+ }
+ }
+
_clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]