File chromium-124-shims.patch of Package nodejs-signal-ringrtc

From 2dbfa6e2b441914dad108f6823ca91fd1a17ee16 Mon Sep 17 00:00:00 2001
From: Bruno Pitrus <brunopitrus@hotmail.com>
Date: Tue, 18 Jun 2024 21:56:47 +0000
Subject: [PATCH] Update unbundle shims for chromium 124

Change-Id: I5501a379835a65a42f874ccde86e440108fdb3f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5591128
Reviewed-by: Lei Zhang <thestig@chromium.org>
Auto-Submit: Bruno Pitrus <brunopitrus@hotmail.com>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1316713}
---
 build/linux/unbundle/absl_container.gn |  2 ++
 build/linux/unbundle/absl_flags.gn     | 38 +++++++++++++++++++++
 build/linux/unbundle/absl_log.gn       | 46 ++++++++++++++++++++++++++
 build/linux/unbundle/re2.gn            |  7 +++-
 4 files changed, 92 insertions(+), 1 deletion(-)

diff --git a/build/linux/unbundle/absl_container.gn b/build/linux/unbundle/absl_container.gn
index 9d1a0dea8e718b..e211c911c2d343 100644
--- a/build/linux/unbundle/absl_container.gn
+++ b/build/linux/unbundle/absl_container.gn
@@ -117,6 +117,8 @@ source_set("flat_hash_map_test") {
 }
 source_set("flat_hash_set_test") {
 }
+source_set("hash_function_defaults_test") {
+}
 source_set("inlined_vector_test") {
 }
 source_set("node_slot_policy_test") {
diff --git a/build/linux/unbundle/absl_flags.gn b/build/linux/unbundle/absl_flags.gn
index 56b65c61a169a6..cb0358399e0e00 100644
--- a/build/linux/unbundle/absl_flags.gn
+++ b/build/linux/unbundle/absl_flags.gn
@@ -1,6 +1,12 @@
 import("//build/config/linux/pkg_config.gni")
 import("//build/shim_headers.gni")
 
+pkg_config("absl_flags_config") {
+  # This target is referenced by //third_party/abseil-cpp:absl_full_deps
+  # and as such must be named like this and not like system_
+  packages = [ "absl_flags_config" ]
+}
+
 pkg_config("system_absl_flags") {
   packages = [ "absl_flags" ]
 }
@@ -9,10 +15,28 @@ pkg_config("system_absl_flags_parse") {
   packages = [ "absl_flags_parse" ]
 }
 
+pkg_config("system_absl_flags_reflection") {
+  packages = [ "absl_flags_reflection" ]
+}
+
 pkg_config("system_absl_flags_usage") {
   packages = [ "absl_flags_usage" ]
 }
 
+shim_headers("flags_config_shim") {
+  root_path = "."
+  prefix = "absl/flags/"
+  headers = [
+    "config.h",
+    "usage_config.h",
+  ]
+}
+
+source_set("config") {
+  deps = [ ":flags_config_shim" ]
+  public_configs = [ ":absl_flags_config" ]
+}
+
 shim_headers("flag_shim") {
   root_path = "."
   prefix = "absl/flags/"
@@ -38,6 +62,20 @@ source_set("parse") {
   public_configs = [ ":system_absl_flags_parse" ]
 }
 
+shim_headers("flags_reflection_shim") {
+  root_path = "."
+  prefix = "absl/flags/"
+  headers = [
+    "internal/registry.h",
+    "reflection.h",
+  ]
+}
+
+source_set("reflection") {
+  deps = [ ":flags_reflection_shim" ]
+  public_configs = [ ":system_absl_flags_reflection" ]
+}
+
 shim_headers("usage_shim") {
   root_path = "."
   prefix = "absl/flags/"
diff --git a/build/linux/unbundle/absl_log.gn b/build/linux/unbundle/absl_log.gn
index b78d5e495d7eed..d5c06506d6fc05 100644
--- a/build/linux/unbundle/absl_log.gn
+++ b/build/linux/unbundle/absl_log.gn
@@ -9,6 +9,10 @@ pkg_config("system_absl_absl_log") {
   packages = [ "absl_absl_log" ]
 }
 
+pkg_config("system_absl_check") {
+  packages = [ "absl_check" ]
+}
+
 pkg_config("system_absl_die_if_null") {
   packages = [ "absl_die_if_null" ]
 }
@@ -16,6 +20,15 @@ pkg_config("system_absl_die_if_null") {
 pkg_config("system_absl_log") {
   packages = [ "absl_log" ]
 }
+
+pkg_config("system_absl_log_globals") {
+  packages = [ "absl_log_globals" ]
+}
+
+pkg_config("system_absl_log_initialize") {
+  packages = [ "absl_log_initialize" ]
+}
+
 shim_headers("absl_check_shim") {
   root_path = "."
   prefix = "absl/log/"
@@ -38,6 +51,17 @@ source_set("absl_log") {
   public_configs = [ ":system_absl_absl_log" ]
 }
 
+shim_headers("check_shim") {
+  root_path = "."
+  prefix = "absl/log/"
+  headers = [ "check.h" ]
+}
+
+source_set("check") {
+  deps = [ ":check_shim" ]
+  public_configs = [ ":system_absl_check" ]
+}
+
 shim_headers("die_if_null_shim") {
   root_path = "."
   prefix = "absl/log/"
@@ -49,6 +73,28 @@ source_set("die_if_null") {
   public_configs = [ ":system_absl_die_if_null" ]
 }
 
+shim_headers("globals_shim") {
+  root_path = "."
+  prefix = "absl/log/"
+  headers = [ "globals.h" ]
+}
+
+source_set("globals") {
+  deps = [ ":globals_shim" ]
+  public_configs = [ ":system_absl_log_globals" ]
+}
+
+shim_headers("initialize_shim") {
+  root_path = "."
+  prefix = "absl/log/"
+  headers = [ "initialize.h" ]
+}
+
+source_set("initialize") {
+  deps = [ ":initialize_shim" ]
+  public_configs = [ ":system_absl_log_initialize" ]
+}
+
 shim_headers("log_shim") {
   root_path = "."
   prefix = "absl/log/"
diff --git a/build/linux/unbundle/re2.gn b/build/linux/unbundle/re2.gn
index d8e4d79b182f58..d587619d047933 100644
--- a/build/linux/unbundle/re2.gn
+++ b/build/linux/unbundle/re2.gn
@@ -3,6 +3,7 @@
 # found in the LICENSE file.
 
 import("//build/config/c++/c++.gni")
+import("//build/config/linux/pkg_config.gni")
 import("//build/shim_headers.gni")
 
 assert(!use_custom_libcxx,
@@ -10,6 +11,10 @@ assert(!use_custom_libcxx,
            "use_custom_libcxx=true because the library's interface relies on " +
            "libstdc++'s std::string and std::vector.")
 
+pkg_config("re2_config") {
+  packages = [ "re2" ]
+}
+
 shim_headers("re2_shim") {
   root_path = "src"
   headers = [
@@ -23,5 +28,5 @@ shim_headers("re2_shim") {
 
 source_set("re2") {
   deps = [ ":re2_shim" ]
-  libs = [ "re2" ]
+  public_configs = [ ":re2_config" ]
 }
openSUSE Build Service is sponsored by