commit:     16de86f43e671eb7c88d16d0b4065234223e3938
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 13 12:27:31 2025 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Sun Apr 13 21:49:16 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16de86f4

www-client/chromium: remove unused patches

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 .../chromium-131-oauth2-client-switches.patch      |  39 ------
 .../chromium-132-bindgen-custom-toolchain.patch    | 104 ----------------
 .../chromium/files/chromium-134-qt5-optional.patch | 133 ---------------------
 3 files changed, 276 deletions(-)

diff --git 
a/www-client/chromium/files/chromium-131-oauth2-client-switches.patch 
b/www-client/chromium/files/chromium-131-oauth2-client-switches.patch
deleted file mode 100644
index 350775c93e18..000000000000
--- a/www-client/chromium/files/chromium-131-oauth2-client-switches.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 54951636d20fa798e148228118863b89a4580479 Mon Sep 17 00:00:00 2001
-From: Matt Jolly <[email protected]>
-Date: Sat, 12 Oct 2024 12:40:16 +1000
-Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials -
- 131 update
-
-131 moved a ton of things around; this is now in api_key_cache.cc
-
-Google doesn't let us bake in OAuth2 credentials, and for some time,
-Google sign-in has been broken. Arch dealt with this in March, and so
-did we to some degree, but in the last few months, our sign-in
-credentials have been broken. It appears that we actually did remove API
-credentials in March around Chrome 89, but they got added back, perhaps
-when rotating newer versions to replace older versions. Work around this
-by following Arch's lead: we remove the predefined credentials, as
-before, but also we patch Chromium so that people can use their own
-easily, using Arch's patch for that.
---- a/google_apis/api_key_cache.cc
-+++ b/google_apis/api_key_cache.cc
-@@ -214,14 +214,14 @@ ApiKeyCache::ApiKeyCache(const DefaultApiKeys& 
default_api_keys) {
- 
-   std::string default_client_id = CalculateKeyValue(
-       default_api_keys.google_default_client_id,
--      STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), std::string(), 
nullptr,
-+      STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), std::string(), 
::switches::kOAuth2ClientID,
-       std::string(), environment.get(), command_line, gaia_config,
-       default_api_keys.allow_override_via_environment,
-       default_api_keys.allow_unset_values);
-   std::string default_client_secret = CalculateKeyValue(
-       default_api_keys.google_default_client_secret,
-       STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), std::string(),
--      nullptr, std::string(), environment.get(), command_line, gaia_config,
-+      ::switches::kOAuth2ClientSecret, std::string(), environment.get(), 
command_line, gaia_config,
-       default_api_keys.allow_override_via_environment,
-       default_api_keys.allow_unset_values);
- 
--- 
-2.46.2
-

diff --git 
a/www-client/chromium/files/chromium-132-bindgen-custom-toolchain.patch 
b/www-client/chromium/files/chromium-132-bindgen-custom-toolchain.patch
deleted file mode 100644
index f0cf20a50837..000000000000
--- a/www-client/chromium/files/chromium-132-bindgen-custom-toolchain.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 84b3b8335f7efbb8ed5ab9c9a260ea4f5d77192b Mon Sep 17 00:00:00 2001
-From: Matt Jolly <[email protected]>
-Date: Mon, 11 Nov 2024 20:52:48 +1000
-Subject: [PATCH] Make bindgen wrapper work with unbundled toolchain
-
-The `run_bindgen.py` wrapper takes a --libclang-path option
-and uses it to set the appropriate environment variable.
-
-This is currently hardcoded to use libclang shipped alongside
-bindgen (in our rust toolchain), but distributions may want to
-override this and use a system path.
-
-Additionally enable distros to feed in appropriate library paths.
---- a/build/config/rust.gni
-+++ b/build/config/rust.gni
-@@ -60,6 +60,17 @@ declare_args() {
-   # the bindgen exectuable).
-   rust_bindgen_root = "//third_party/rust-toolchain"
- 
-+  # Directory under which to find one of `libclang.{dll,so}` (a `lib[64]` or
-+  # `bin` directory containing the libclang shared library).
-+  # We don't need to worry about multlib, but specify the full path here
-+  # in case a distribution does.
-+  if (host_os == "win") {
-+    bindgen_libclang_path = "//third_party/rust-toolchain/bin"
-+  } else {
-+    bindgen_libclang_path = "//third_party/rust-toolchain/lib"
-+  }
-+
-+
-   # If you're using a Rust toolchain as specified by rust_sysroot_absolute,
-   # set this to the output of `rustc -V`. Changing this string will cause all
-   # Rust targets to be rebuilt, which allows you to update your toolchain and
---- a/build/rust/rust_bindgen.gni
-+++ b/build/rust/rust_bindgen.gni
-@@ -17,13 +17,13 @@ if (host_os == "win") {
-   _bindgen_path = "${_bindgen_path}.exe"
- }
- 
--# On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
--# ../lib.
--_libclang_path = rust_bindgen_root
--if (host_os == "win") {
--  _libclang_path += "/bin"
-+if (clang_base_path != default_clang_base_path && custom_toolchain == 
"//build/toolchain/linux/unbundle:default") {
-+  # Assume that the user has set this up properly, including handling multilib
-+  _clang_libpath = clang_base_path + "/include"
-+  _clang_ld_libpath  = bindgen_libclang_path
- } else {
--  _libclang_path += "/lib"
-+  _clang_libpath = clang_base_path + "/lib/clang/" + clang_version
-+  _clang_ld_libpath = clang_base_path + "/lib"
- }
- 
- # Template to build Rust/C bindings with bindgen.
---- a/build/rust/rust_bindgen_generator.gni
-+++ b/build/rust/rust_bindgen_generator.gni
-@@ -151,7 +151,7 @@ template("rust_bindgen_generator") {
-       "--output",
-       rebase_path(output_file, root_build_dir),
-       "--libclang-path",
--      rebase_path(_libclang_path, root_build_dir),
-+      rebase_path(bindgen_libclang_path, root_build_dir),
-     ]
- 
-     if (_wrap_static_fns) {
-@@ -172,7 +172,7 @@ template("rust_bindgen_generator") {
-       # point to.
-       args += [
-         "--ld-library-path",
--        rebase_path(clang_base_path + "/lib", root_build_dir),
-+        rebase_path(bindgen_libclang_path, root_build_dir),
-       ]
-     }
- 
-@@ -215,9 +215,7 @@ template("rust_bindgen_generator") {
-     # says the wrong thing. We point it to our clang's resource dir which will
-     # make it behave consistently with our other command line flags and allows
-     # system headers to be found.
--    clang_resource_dir =
--        rebase_path(clang_base_path + "/lib/clang/" + clang_version,
--                    root_build_dir)
-+    clang_resource_dir = rebase_path(clang_base_path + "/include", 
root_build_dir)
-     args += [
-       "-resource-dir",
-       clang_resource_dir,
-@@ -238,6 +236,15 @@ template("rust_bindgen_generator") {
-       }
-     }
- 
-+    if (custom_toolchain == "//build/toolchain/linux/unbundle:default") {
-+      # We need to pass the path to the libstdc++ headers to bindgen so that 
it
-+      # can find them when parsing C++ headers.
-+      args += [
-+        "-I",
-+        rebase_path(clang_base_path + "/include/", root_build_dir),
-+      ]
-+    }
-+
-     if (is_win) {
-       # On Windows we fall back to using system headers from a sysroot from
-       # depot_tools. This is negotiated by python scripts and the result is
--- 
-2.47.0

diff --git a/www-client/chromium/files/chromium-134-qt5-optional.patch 
b/www-client/chromium/files/chromium-134-qt5-optional.patch
deleted file mode 100644
index 57606f8bf3e0..000000000000
--- a/www-client/chromium/files/chromium-134-qt5-optional.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-https://chromium.googlesource.com/chromium/src/+/0d8d0e0943489b59e452b4d0214959821880ad7f
-From: Matt Jolly <[email protected]>
-Date: Tue, 28 Jan 2025 12:00:57 -0800
-Subject: [PATCH] UI: make QT5 optional
-
-To build with `use_qt6`, QT5 (`use_qt`) is also required.
-This is undesirable for downstreams who are actively working
-to drop support for QT5 (e.g. Gentoo).
-
-To resolve this:
-
-- Add `use_qt5`
-- Replace most `use_qt` conditionals with this option;
-  these appear to be from before QT6 support was added.
-- Use `use_qt5` to gate some previously unconditional QT5-related
-  items in chrome/installer/linux
-- Remove `use_qt` as an argument, instead set to `use_qt5 || use_qt6`.
-
-This change should not impact the current behaviour; if no options
-are selected QT5 and QT6 support will be enabled, using existing logic
-unless one is explicitly disabled with `use_qt{x}=false`.
-
-See-also: https://bugs.gentoo.org/926166, https://bugs.gentoo.org/948836
-Signed-off-by: Matt Jolly <[email protected]>
-Fixed: 328182252
-Change-Id: I22ec7a068356412d3f9fce68a19aee4f8c89892c
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6205488
-Reviewed-by: Thomas Anderson <[email protected]>
-Commit-Queue: Lei Zhang <[email protected]>
-Reviewed-by: Lei Zhang <[email protected]>
-Cr-Commit-Position: refs/heads/main@{#1412471}
---- a/chrome/installer/linux/BUILD.gn
-+++ b/chrome/installer/linux/BUILD.gn
-@@ -77,10 +77,10 @@ if (enable_swiftshader) {
-   packaging_files += [ "$root_out_dir/vk_swiftshader_icd.json" ]
- }
- 
--if (use_qt) {
--  # Even though this is a shared library, add it to `packaging_files` instead 
of
--  # `packaging_files_shlibs` to skip the dependency check.  This is 
intentional
--  # to prevent a hard dependency on QT for the package.
-+# Even though this is a shared library, add it to `packaging_files` instead of
-+# `packaging_files_shlibs` to skip the dependency check.  This is intentional
-+# to prevent a hard dependency on QT for the package.
-+if (use_qt5) {
-   packaging_files += [ "$root_out_dir/libqt5_shim.so" ]
- }
- if (use_qt6) {
-@@ -206,7 +206,7 @@ if (build_with_internal_optimization_guide) {
-   }
- }
- 
--if (use_qt) {
-+if (use_qt5) {
-   strip_binary("strip_qt5_shim") {
-     binary_input = "$root_out_dir/libqt5_shim.so"
-     deps = [ "//ui/qt:qt5_shim" ]
-@@ -399,7 +399,7 @@ group("installer_deps") {
-       "//components/optimization_guide/internal:optimization_guide_internal",
-     ]
-   }
--  if (use_qt) {
-+  if (use_qt5) {
-     public_deps += [
-       ":strip_qt5_shim",
-       "//ui/qt:qt5_shim",
---- a/ui/qt/BUILD.gn
-+++ b/ui/qt/BUILD.gn
-@@ -101,10 +101,12 @@ template("qt_shim") {
-     }
-   }
- }
--qt_shim("qt5_shim") {
--  qt_version = "5"
--  if (!use_sysroot) {
--    moc_qt_path = "$moc_qt5_path"
-+if (use_qt5) {
-+  qt_shim("qt5_shim") {
-+    qt_version = "5"
-+    if (!use_sysroot) {
-+      moc_qt_path = "$moc_qt5_path"
-+    }
-   }
- }
- if (use_qt6) {
-@@ -122,7 +124,10 @@ component("qt") {
-   defines = [ "IS_QT_IMPL" ]
- 
-   # qt_shim is in data_deps since we want to load it manually.
--  data_deps = [ ":qt5_shim" ]
-+  data_deps = []
-+  if (use_qt5) {
-+    data_deps += [ ":qt5_shim" ]
-+  }
-   if (use_qt6) {
-     data_deps += [ ":qt6_shim" ]
-   }
---- a/ui/qt/qt.gni
-+++ b/ui/qt/qt.gni
-@@ -6,27 +6,20 @@ import("//build/config/cast.gni")
- import("//build/config/sanitizers/sanitizers.gni")
- import("//build/config/sysroot.gni")
- 
-+# TODO(crbug.com/40260415): Allow QT in MSAN builds once QT is
-+# added to the instrumented libraries.
- declare_args() {
--  # TODO(crbug.com/40260415): Allow QT in MSAN builds once QT is
--  # added to the instrumented libraries.
--  use_qt = is_linux && !is_castos && !is_msan
-+  use_qt5 = use_sysroot && is_linux && !is_castos && !is_msan
-+  use_qt6 = use_sysroot && is_linux && !is_castos && !is_msan
- }
- 
- declare_args() {
--  if (!use_sysroot && use_qt) {
-+  if (!use_sysroot && use_qt5) {
-     moc_qt5_path = ""
-   }
--}
--
--declare_args() {
--  use_qt6 = use_qt && use_sysroot
--}
--
--declare_args() {
-   if (!use_sysroot && use_qt6) {
-     moc_qt6_path = ""
-   }
- }
- 
--# use_qt6 => use_qt
--assert(!use_qt6 || use_qt)
-+use_qt = use_qt5 || use_qt6

Reply via email to