git: 8fed35cd38a5 - main - devel/electron29: Fix build with ninja 1.12.0

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Wed, 15 May 2024 04:18:23 UTC
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8fed35cd38a5a5ded99113e7f23044d32d1190a8

commit 8fed35cd38a5a5ded99113e7f23044d32d1190a8
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-05-15 04:06:03 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-05-15 04:11:25 +0000

    devel/electron29: Fix build with ninja 1.12.0
    
    Fix race conditions where generated headers are not created before they
    are needed in the build.
    
    Ninja 1.12.0 removed the `-w dupbuild` option and the default behavior
    is now equivalent to passing `-w dupbuild=err` in previous versions.
    
    PR:             278693
    Approved by:    portmgr (blanket)
---
 devel/electron29/files/patch-net_dns_BUILD.gn            | 16 +++++++++++++---
 .../files/patch-tools_gn_bootstrap_bootstrap.py          | 11 +++++++++++
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/devel/electron29/files/patch-net_dns_BUILD.gn b/devel/electron29/files/patch-net_dns_BUILD.gn
index d68c15ad483c..c2fde7db3711 100644
--- a/devel/electron29/files/patch-net_dns_BUILD.gn
+++ b/devel/electron29/files/patch-net_dns_BUILD.gn
@@ -1,4 +1,4 @@
---- net/dns/BUILD.gn.orig	2024-02-27 21:36:00 UTC
+--- net/dns/BUILD.gn.orig	2024-05-15 04:02:38 UTC
 +++ net/dns/BUILD.gn
 @@ -134,7 +134,7 @@ source_set("dns") {
        "dns_config_service_android.cc",
@@ -9,7 +9,17 @@
      sources += [
        "dns_config_service_linux.cc",
        "dns_config_service_linux.h",
-@@ -175,6 +175,7 @@ source_set("dns") {
+@@ -168,6 +168,9 @@ source_set("dns") {
+   }
+ 
+   deps = [ "//net:net_deps" ]
++  if (is_bsd) {
++    deps += [ "//components/services/screen_ai/buildflags" ]
++  }
+ 
+   public_deps = [
+     ":dns_client",
+@@ -175,6 +178,7 @@ source_set("dns") {
      ":host_resolver_manager",
      ":mdns_client",
      "//net:net_public_deps",
@@ -17,7 +27,7 @@
    ]
  
    allow_circular_includes_from = [
-@@ -442,9 +443,9 @@ source_set("tests") {
+@@ -442,9 +446,9 @@ source_set("tests") {
  
    if (is_android) {
      sources += [ "dns_config_service_android_unittest.cc" ]
diff --git a/devel/electron29/files/patch-tools_gn_bootstrap_bootstrap.py b/devel/electron29/files/patch-tools_gn_bootstrap_bootstrap.py
new file mode 100644
index 000000000000..a9c00cd3ce53
--- /dev/null
+++ b/devel/electron29/files/patch-tools_gn_bootstrap_bootstrap.py
@@ -0,0 +1,11 @@
+--- tools/gn/bootstrap/bootstrap.py.orig	2024-03-13 00:26:15 UTC
++++ tools/gn/bootstrap/bootstrap.py
+@@ -122,7 +122,7 @@ def main(argv):
+ 
+   shutil.copy2(
+       os.path.join(BOOTSTRAP_DIR, 'last_commit_position.h'), gn_build_dir)
+-  cmd = [ninja_binary, '-C', gn_build_dir, '-w', 'dupbuild=err', 'gn']
++  cmd = [ninja_binary, '-C', gn_build_dir, 'gn']
+   if options.jobs:
+     cmd += ['-j', str(options.jobs)]
+   subprocess.check_call(cmd)