* update chromium to 120.0.6099.109-2

This commit is contained in:
Alexander Baldeck 2024-01-07 08:14:30 +01:00
parent 951da16f9e
commit ea3e85bbc9
5 changed files with 148 additions and 96 deletions

View File

@ -5,11 +5,11 @@
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=chromium
pkgver=118.0.5993.117
pkgver=120.0.6099.109
pkgrel=2
_launcher_ver=8
_manual_clone=0
_archpower_patchset=118.0
_archpower_patchset=120.0
pkgdesc="A web browser built for speed, simplicity, and security"
arch=(x86_64 powerpc64le)
url="https://www.chromium.org/Home"
@ -19,30 +19,31 @@ depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
'libffi' 'desktop-file-utils' 'hicolor-icon-theme')
makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
'java-runtime-headless' 'git')
makedepends_x86_64=('qt5-base')
optdepends=('pipewire: WebRTC desktop sharing under Wayland'
'kdialog: support for native dialogs in Plasma'
'gtk4: for --gtk-version=4 (GTK4 IME might work better on Wayland)'
'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
'kwallet: support for storing passwords in KWallet on Plasma')
optdepends_x86_64=(
'qt5-base: enable Qt5 with --enable-features=AllowQt'
)
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
free-the-X11-pixmap-in-the-NativePixmapEGLX11Bind.patch
libxml2-2.12.patch
icu-74.patch
drop-flags-unsupported-by-clang16.patch
use-oauth2-client-switches-as-default.patch
https://repo.archlinuxpower.org/distfiles/chromium/patchsets/archpower-chromium-patchset-${_archpower_patchset}.tar.zst{,.asc})
https://repo.archlinuxpower.org/distfiles/chromium/patchsets/archpower-chromium-patchset-${_archpower_patchset}.tar.zst{,.asc})
validpgpkeys=(
8D3D6CE8D4F0625F4D7109022205B7A06C2656A3 # Alexander Baleck <alex.bldck@gmail.com>
)
sha256sums=('7029d851e4a2e8d5a145a6f6ba76f18f5c3043f57b2c750b35d96e92f3453786'
sha256sums=('87c00c525ee07c2233b78dbece1496b697f686244a67fac2c71e4a30bd96849b'
'213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
'0d1eb054965711a2d4ed6b4cb7f06cbda5b374a48e1b99c8c38ebf6375a781a9'
'ab1eb107ec1c915065dc59cf4832da27e17d60eb29038e2aec633daeb946cc6a'
'ffee1082fbe3d0c9e79dacb8405d5a0e1aa94d6745089a30b093f647354894d2'
'1808df5ba4d1e2f9efa07ac6b510bec866fa6d60e44505d82aea3f6072105a71'
'ff9ebd86b0010e1c604d47303ab209b1d76c3e888c423166779cefbc22de297f'
'8d1cdf3ddd8ff98f302c90c13953f39cd804b3479b13b69b8ef138ac57c83556'
'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711'
'c4a58f46b4158bb4adde0e7328b461c65a247f34e9607cccce97bfb7f0e5fb9c'
'bbfcd36f5bacaee83941e89b18a631559b4e3397483e6d820ebc98d4f45fa22b'
'SKIP')
if (( _manual_clone )); then
@ -55,17 +56,17 @@ fi
declare -gA _system_libs=(
#[brotli]=brotli
[dav1d]=dav1d
[ffmpeg]=ffmpeg
[libevent]=libevent
#[ffmpeg]=ffmpeg # YouTube playback stopped working in Chromium 120
[flac]=flac
[fontconfig]=fontconfig
[freetype]=freetype2
[harfbuzz-ng]=harfbuzz
[icu]=icu
[jsoncpp]=jsoncpp
#[jsoncpp]=jsoncpp # needs libstdc++
#[libaom]=aom
[libavif]=libavif
#[libavif]=libavif # needs https://github.com/AOMediaCodec/libavif/commit/5410b23f76
[libdrm]=
[libevent]=libevent
[libjpeg]=libjpeg
[libpng]=libpng
#[libvpx]=libvpx
@ -73,9 +74,9 @@ declare -gA _system_libs=(
[libxml]=libxml2
[libxslt]=libxslt
[opus]=opus
[re2]=re2
[snappy]=snappy
[woff2]=woff2
#[re2]=re2 # needs libstdc++
#[snappy]=snappy # needs libstdc++
#[woff2]=woff2 # needs libstdc++
[zlib]=minizip
)
_unwanted_bundled_libs=(
@ -114,14 +115,20 @@ prepare() {
patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
# Upstream fixes
patch -Np1 -i ../free-the-X11-pixmap-in-the-NativePixmapEGLX11Bind.patch
patch -Np1 -i ../libxml2-2.12.patch
# Fix build with ICU 74
patch -Np1 -i ../icu-74.patch
# Drop compiler flags that need newer clang
patch -Np1 -i ../drop-flags-unsupported-by-clang16.patch
# Fixes for building with libstdc++ instead of libc++
patch -Np1 -i ../chromium-patches-*/chromium-114-maldoca-include.patch
patch -Np1 -i ../chromium-patches-*/chromium-114-ruy-include.patch
patch -Np1 -i ../chromium-patches-*/chromium-114-vk_mem_alloc-include.patch
patch -Np1 -i ../chromium-patches-*/chromium-117-material-color-include.patch
patch -Np1 -i ../chromium-patches-*/chromium-118-SensorReadingField-include.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-at-spi-variable-consumption.patch
patch -Np1 -i ../chromium-patches-*/chromium-119-clang16.patch
#patch -Np1 -i ../chromium-patches-*/chromium-120-std-nullptr_t.patch
# ArchPOWER patchset
sh ${srcdir}/archpower-chromium-patchset-${_archpower_patchset}/apply.sh
@ -164,7 +171,6 @@ build() {
cd chromium-$pkgver
#export PATH=/usr/lib/ccache/bin:/usr/lib/llvm14/bin:$PATH
export CC=clang
export CXX=clang++
export AR=ar
@ -185,7 +191,7 @@ build() {
'proprietary_codecs=true'
'rtc_use_pipewire=true'
'link_pulseaudio=true'
'use_custom_libcxx=false'
'use_custom_libcxx=true' # https://github.com/llvm/llvm-project/issues/61705
'use_sysroot=false'
'use_system_libffi=true'
'enable_hangout_services_extension=true'
@ -193,6 +199,7 @@ build() {
'enable_nacl=false'
'enable_rust=false'
"google_api_key=\"$_google_api_key\""
'use_qt=false'
)
case "${CARCH}" in
@ -201,7 +208,6 @@ build() {
'enable_swiftshader=false'
'dawn_use_swiftshader=false'
'use_system_libdrm=true'
'use_qt=false'
)
;;
esac
@ -291,7 +297,6 @@ package() {
case "${CARCH}" in
x86_64)
toplevel_files+=(
libqt5_shim.so
libvk_swiftshader.so
vk_swiftshader_icd.json
)

View File

@ -0,0 +1,51 @@
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 80bc79e5fb3..13b200e4cb0 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -616,24 +616,6 @@ config("compiler") {
}
}
- # TODO(crbug.com/1488374): This causes binary size growth and potentially
- # other problems.
- # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
- if (default_toolchain != "//build/toolchain/cros:target" &&
- !llvm_android_mainline) {
- cflags += [
- "-mllvm",
- "-split-threshold-for-reg-with-hint=0",
- ]
- if (use_thin_lto && is_a_target_toolchain) {
- if (is_win) {
- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
- } else {
- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
- }
- }
- }
-
# TODO(crbug.com/1235145): Investigate why/if this should be needed.
if (is_win) {
cflags += [ "/clang:-ffp-contract=off" ]
@@ -768,7 +750,6 @@ config("compiler") {
ldflags += [
"/opt:lldltojobs=all",
"-mllvm:-import-instr-limit=$import_instr_limit",
- "-mllvm:-disable-auto-upgrade-debug-info",
]
} else {
ldflags += [ "-flto=thin" ]
@@ -800,13 +781,6 @@ config("compiler") {
if (is_apple) {
ldflags += [ "-Wcrl,object_path_lto" ]
}
- if (!is_chromeos) {
- # TODO(https://crbug.com/972449): turn on for ChromeOS when that
- # toolchain has this flag.
- # We only use one version of LLVM within a build so there's no need to
- # upgrade debug info, which can be expensive since it runs the verifier.
- ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
- }
}
# TODO(https://crbug.com/1211155): investigate why this isn't effective on

View File

@ -1,67 +0,0 @@
From 42d57d016f5fb6d2a1a354743b9be911c1be87e8 Mon Sep 17 00:00:00 2001
From: Jianhui Dai <jianhui.j.dai@intel.com>
Date: Fri, 22 Sep 2023 21:30:04 +0000
Subject: [PATCH] [GL] Free the X11 pixmap in the NativePixmapEGLX11Binding
destructor
This CL frees the X11 pixmap in the NativePixmapEGLX11Binding destructor
to prevent a memory leak in the X server.
Bug: 1467689
Change-Id: Id4cba30825417db52176f9165db34d7234a05a05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4886249
Reviewed-by: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Reviewed-by: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1200486}
---
.../platform/x11/native_pixmap_egl_x11_binding.cc | 12 +++++++++---
.../platform/x11/native_pixmap_egl_x11_binding.h | 2 ++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.cc b/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.cc
index 46a2d3274b9..b46eb67b9de 100644
--- a/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.cc
+++ b/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.cc
@@ -147,9 +147,17 @@ NativePixmapEGLX11Binding::~NativePixmapEGLX11Binding() {
if (surface_) {
eglDestroySurface(display_, surface_);
}
+
+ if (pixmap_ != x11::Pixmap::None) {
+ auto* connection = x11::Connection::Get();
+ connection->FreePixmap({pixmap_});
+ }
}
bool NativePixmapEGLX11Binding::Initialize(x11::Pixmap pixmap) {
+ CHECK_NE(pixmap, x11::Pixmap::None);
+ pixmap_ = pixmap;
+
if (eglInitialize(display_, nullptr, nullptr) != EGL_TRUE) {
return false;
}
@@ -223,9 +231,7 @@ std::unique_ptr<NativePixmapGLBinding> NativePixmapEGLX11Binding::Create(
return nullptr;
}
- // TODO(https://crbug.com/1411749): if we early out below, should we call
- // FreePixmap()?
-
+ // Transfer the ownership of `pixmap` to `NativePixmapEGLX11Binding`.
if (!binding->Initialize(std::move(pixmap))) {
VLOG(1) << "Unable to initialize binding from pixmap";
return nullptr;
diff --git a/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.h b/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.h
index 013df3f776a..99b262b82ce 100644
--- a/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.h
+++ b/ui/ozone/platform/x11/native_pixmap_egl_x11_binding.h
@@ -47,6 +47,8 @@ class NativePixmapEGLX11Binding : public NativePixmapGLBinding {
EGLSurface surface_ = nullptr;
EGLDisplay display_;
gfx::BufferFormat format_;
+
+ x11::Pixmap pixmap_ = x11::Pixmap::None;
};
} // namespace ui

21
chromium/icu-74.patch Normal file
View File

@ -0,0 +1,21 @@
https://bugs.gentoo.org/917645
(copied patch from qtwebengine:6 - https://bugs.gentoo.org/917633)
Quick fix for a static_assert failure with icu74. Still waiting
for a proper upstream fix and unknown if entirely right, but is
an extension of [1] (is now 48 rather than 43).
[1] https://crrev.com/e60b571faa3f14dd9119a6792dccf12f8bf80192
--- a/third_party/blink/renderer/platform/text/text_break_iterator.cc
+++ b/third_party/blink/renderer/platform/text/text_break_iterator.cc
@@ -161,7 +161,9 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar
};
// clang-format on
-#if U_ICU_VERSION_MAJOR_NUM >= 58
+#if U_ICU_VERSION_MAJOR_NUM >= 74
+#define BA_LB_COUNT (U_LB_COUNT - 8)
+#elif U_ICU_VERSION_MAJOR_NUM >= 58
#define BA_LB_COUNT (U_LB_COUNT - 3)
#else
#define BA_LB_COUNT U_LB_COUNT

View File

@ -0,0 +1,42 @@
From 871f8ae9b65ce2679b0bc0be36902d65edf0c1e4 Mon Sep 17 00:00:00 2001
From: Joey Arhar <jarhar@chromium.org>
Date: Thu, 2 Nov 2023 20:45:11 +0000
Subject: [PATCH] Roll libxml from b8961a75 to 7a2d412f
Bug: 934413
Change-Id: I6fb176d76dba9a9adf411395fa5f6b950b52920a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4985186
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1219084}
---
third_party/blink/renderer/core/xml/xslt_processor.h | 2 +-
third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
index d53835e9675..2eaea31ed29 100644
--- a/third_party/blink/renderer/core/xml/xslt_processor.h
+++ b/third_party/blink/renderer/core/xml/xslt_processor.h
@@ -77,7 +77,7 @@ class XSLTProcessor final : public ScriptWrappable {
void reset();
- static void ParseErrorFunc(void* user_data, xmlError*);
+ static void ParseErrorFunc(void* user_data, const xmlError*);
static void GenericErrorFunc(void* user_data, const char* msg, ...);
// Only for libXSLT callbacks
diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
index 133e0b3355d..f424077089d 100644
--- a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+++ b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
@@ -66,7 +66,7 @@ void XSLTProcessor::GenericErrorFunc(void*, const char*, ...) {
// It would be nice to do something with this error message.
}
-void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
+void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
FrameConsole* console = static_cast<FrameConsole*>(user_data);
if (!console)
return;