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_
--- src/third_party/electron_node/deps/googletest/unofficial.gni.orig	2025-04-11 12:06:33.194184022 +0200
+++ src/third_party/electron_node/deps/googletest/unofficial.gni	2025-04-11 20:55:32.455520889 +0200
@@ -1,3 +1,5 @@
+import("//build/config/linux/pkg_config.gni")
+
 # This file is used by GN for building, which is NOT the build system used for
 # building official binaries.
 # Please edit the gyp files if you are making changes to build system.
@@ -5,27 +7,14 @@
 # The actual configurations are put inside a template in unofficial.gni to
 # prevent accidental edits from contributors.
 template("googletest_gn_build") {
-  config("googletest_config") {
-    include_dirs = [ "include" ]
+  pkg_config("googletest_config") {
+    packages = [ "gtest" ]
   }
 
-  gypi_values = exec_script("../../tools/gypi_to_gn.py",
-                            [ rebase_path("googletest.gyp") ],
-                            "scope",
-                            [ "googletest.gyp" ])
 
   source_set(target_name) {
     forward_variables_from(invoker, "*")
-    testonly = true
-    include_dirs = [
-      "include",
-      ".",
-    ]
-    defines = [
-      "GTEST_HAS_POSIX_RE=0",
-      "GTEST_LANG_CXX11=1",
-    ]
-    sources = gypi_values.googletest_sources
+    public_configs = [ ":googletest_config" ]
   }
 
   source_set("gtest_main") {
openSUSE Build Service is sponsored by