git: 7bfbd1d1f55a - main - devel/fbthrift: Fix build with ninja >= 1.12.0

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Wed, 08 May 2024 09:49:12 UTC
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7bfbd1d1f55a76537ef8923b903507f9a682bcb8

commit 7bfbd1d1f55a76537ef8923b903507f9a682bcb8
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-05-08 09:44:49 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-05-08 09:48:58 +0000

    devel/fbthrift: Fix build with ninja >= 1.12.0
    
    Address a potential race condition where generated headers not created
    before they used in the build.
    
    https://github.com/facebook/fbthrift/pull/599
    
    PR:             278693
    Approved by:    portmgr (blanket)
---
 .../files/patch-thrift_lib_cpp2_CMakeLists.txt         | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/devel/fbthrift/files/patch-thrift_lib_cpp2_CMakeLists.txt b/devel/fbthrift/files/patch-thrift_lib_cpp2_CMakeLists.txt
new file mode 100644
index 000000000000..b5d6202999fc
--- /dev/null
+++ b/devel/fbthrift/files/patch-thrift_lib_cpp2_CMakeLists.txt
@@ -0,0 +1,18 @@
+Fix race condition with Ninja >= 1.12.0 where any_rep_types.h is not generated
+before Any.cpp is compiled.
+
+https://github.com/facebook/fbthrift/pull/599
+
+--- thrift/lib/cpp2/CMakeLists.txt.orig	2024-05-02 22:42:02 UTC
++++ thrift/lib/cpp2/CMakeLists.txt
+@@ -109,8 +109,8 @@ add_library(
+   type/TypeRegistry.cpp
+   type/UniversalName.cpp
+ )
+-add_dependencies(thrifttype type-cpp2-target thriftannotation thrifttyperep
+-  thriftprotocol)
++add_dependencies(thrifttype any_rep-cpp2-target type-cpp2-target
++  thriftannotation thrifttyperep thriftprotocol)
+ target_link_libraries(
+   thrifttype
+   PUBLIC