File system-gtest.patch of Package nodejs-electron

We don't need this huge test-only dependency in the tarball. Only one header is needed in prod code, so unbundling is not a problem even on old targets.

--- a/testing/gtest/include/gtest/gtest_prod.h
+++ b/testing/gtest/include/gtest/gtest_prod.h
@@ -10,6 +10,6 @@
 // and testing/gmock, instead of directly including files in
 // third_party/googletest.
 
-#include "third_party/googletest/src/googletest/include/gtest/gtest_prod.h"  // IWYU pragma: export
+#include <gtest/gtest_prod.h>
 
 #endif  // TESTING_GTEST_INCLUDE_GTEST_GTEST_PROD_H_
--- a/third_party/electron_node/deps/googletest/BUILD.gn	2022-07-22 14:56:38.984761919 +0200
+++ b/third_party/electron_node/deps/googletest/BUILD.gn	2022-07-29 19:21:57.655767809 +0200
@@ -1,61 +1,11 @@
-config("gtest_config") {
-  include_dirs = [ "include" ]
-  defines = [ "UNIT_TEST" ]
-}
+import("//build/config/linux/pkg_config.gni")
 
-static_library("gtest") {
-  include_dirs = [
-    "include",
-    "." # src
-  ]
+pkg_config("gtest_config") {
+  packages = [ "gtest" ]
+}
 
+source_set("gtest") {
   public_configs = [ ":gtest_config" ]
-
-  cflags_cc = [
-    "-Wno-c++98-compat-extra-semi",
-    "-Wno-unused-const-variable",
-    "-Wno-unreachable-code-return",
-  ]
-
-  defines = [
-    "GTEST_HAS_POSIX_RE=0",
-    "GTEST_LANG_CXX11=1",
-  ]
-
-  sources = [
-    "include/gtest/gtest_pred_impl.h",
-    "include/gtest/gtest_prod.h",
-    "include/gtest/gtest-death-test.h",
-    "include/gtest/gtest-matchers.h",
-    "include/gtest/gtest-message.h",
-    "include/gtest/gtest-param-test.h",
-    "include/gtest/gtest-printers.h",
-    "include/gtest/gtest-spi.h",
-    "include/gtest/gtest-test-part.h",
-    "include/gtest/gtest-typed-test.h",
-    "include/gtest/gtest.h",
-    "include/gtest/internal/gtest-death-test-internal.h",
-    "include/gtest/internal/gtest-filepath.h",
-    "include/gtest/internal/gtest-internal.h",
-    "include/gtest/internal/gtest-param-util.h",
-    "include/gtest/internal/gtest-port-arch.h",
-    "include/gtest/internal/gtest-port.h",
-    "include/gtest/internal/gtest-string.h",
-    "include/gtest/internal/gtest-type-util.h",
-    "include/gtest/internal/custom/gtest-port.h",
-    "include/gtest/internal/custom/gtest-printers.h",
-    "include/gtest/internal/custom/gtest.h",
-    "src/gtest-all.cc",
-    "src/gtest-death-test.cc",
-    "src/gtest-filepath.cc",
-    "src/gtest-internal-inl.h",
-    "src/gtest-matchers.cc",
-    "src/gtest-port.cc",
-    "src/gtest-printers.cc",
-    "src/gtest-test-part.cc",
-    "src/gtest-typed-test.cc",
-    "src/gtest.cc",
-  ]
 }
 
 static_library("gtest_main") {
openSUSE Build Service is sponsored by