git: 1e427708a651 - main - devel/doxygen: Fix build with ninja 1.13.1

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Sun, 24 Aug 2025 06:01:10 UTC
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1e427708a651f672b7224f2391c75b34323b6cea

commit 1e427708a651f672b7224f2391c75b34323b6cea
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2025-08-23 13:11:20 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-08-24 06:00:49 +0000

    devel/doxygen: Fix build with ninja 1.13.1
    
    Add missing dependencies in examples. Upstream added baseexample.cfg in
    [1], but example_test.cpp and include_test.cpp race to be copied into
    BUILD_WRKSRC. This error manifests itself especially when building using
    a single job as is the default case in poudriere.
    
    [1] https://github.com/doxygen/doxygen/commit/ceed504cb5e64a1b8a04174489642391a02ed7e3
    
    PR:             279187
    Approved by:    portmgr (blanket)
---
 devel/doxygen/files/patch-examples_CMakeLists.txt | 29 +++++++++++++++++++----
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/devel/doxygen/files/patch-examples_CMakeLists.txt b/devel/doxygen/files/patch-examples_CMakeLists.txt
index c4f60834d17d..5eb24420b6f0 100644
--- a/devel/doxygen/files/patch-examples_CMakeLists.txt
+++ b/devel/doxygen/files/patch-examples_CMakeLists.txt
@@ -1,6 +1,27 @@
 --- examples/CMakeLists.txt.orig	2022-11-18 19:47:51 UTC
 +++ examples/CMakeLists.txt
-@@ -74,9 +74,9 @@ foreach (f_inp  ${BASIC_EXAMPLES})
+@@ -37,8 +37,8 @@ set(EXAMPLE_overload   overload       cpp)
+ set(EXAMPLE_author     author         cpp)
+ set(EXAMPLE_par        par            cpp)
+ set(EXAMPLE_overload   overload       cpp)
+-set(EXAMPLE_example    example        cpp)
+-set(EXAMPLE_include    include        cpp)
++set(EXAMPLE_example    example        cpp        example_test)
++set(EXAMPLE_include    include        cpp        include_test)
+ set(EXAMPLE_qtstyle    qtstyle        cpp)
+ set(EXAMPLE_jdstyle    jdstyle        cpp)
+ set(EXAMPLE_autolink   autolink       cpp)
+@@ -69,14 +69,18 @@ foreach (f_inp  ${BASIC_EXAMPLES})
+ 	set(f_dep "")
+ 	if (${f_len} GREATER 2)
+ 	  list(GET  ${f_inp} 2 f_dep)
+-	  set(f_dep "${PROJECT_BINARY_DIR}/html/examples/${f_dep}/html/index.html")
++	  if (${f_dep} MATCHES _test$)
++	    set(f_dep "${CMAKE_CURRENT_BINARY_DIR}/${f_dep}.${f_ext}")
++	  else()
++	    set(f_dep "${PROJECT_BINARY_DIR}/html/examples/${f_dep}/html/index.html")
++	  endif()
+ 	endif()
      add_custom_command(
          COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/html/examples/${f}
          COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/latex/examples/${f}
@@ -8,11 +29,11 @@
 +        COMMAND ${CMAKE_COMMAND} -E env PROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} ${EXECUTABLE_OUTPUT_PATH}/doxygen ${CMAKE_CURRENT_BINARY_DIR}/${f}.cfg
          COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/latex/examples/${f}/latex/refman.tex > ${PROJECT_BINARY_DIR}/latex/examples/${f}/latex/refman_doc.tex
 -	DEPENDS doxygen ${f}.${f_ext} ${f}.cfg ${TOP}/examples/strip_example.py ${f_dep}
-+	DEPENDS doxygen ${CMAKE_CURRENT_BINARY_DIR}/${f}.${f_ext} ${CMAKE_CURRENT_BINARY_DIR}/${f}.cfg ${TOP}/examples/strip_example.py ${f_dep}
++	DEPENDS doxygen ${CMAKE_CURRENT_BINARY_DIR}/${f}.${f_ext} ${CMAKE_CURRENT_BINARY_DIR}/${f}.cfg ${TOP}/examples/strip_example.py ${f_dep} ${CMAKE_CURRENT_BINARY_DIR}/baseexample.cfg
  	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/${f}/html/index.html ${PROJECT_BINARY_DIR}/latex/examples/${f}/latex/refman_doc.tex
      )
      set(EXAMPLES_RES ${EXAMPLES_RES} "" ${PROJECT_BINARY_DIR}/html/examples/${f}/html/index.html)
-@@ -93,9 +93,9 @@ if (DOT)
+@@ -93,9 +97,9 @@ if (DOT)
    add_custom_command(
          COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/html/examples/diagrams
          COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/latex/examples/diagrams
@@ -20,7 +41,7 @@
 +        COMMAND ${CMAKE_COMMAND} -E env PROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} ${EXECUTABLE_OUTPUT_PATH}/doxygen ${CMAKE_CURRENT_BINARY_DIR}/diagrams.cfg
          COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/latex/examples/diagrams/latex/refman.tex > ${PROJECT_BINARY_DIR}/latex/examples/diagrams/latex/refman_doc.tex
 -	DEPENDS doxygen diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg ${TOP}/examples/strip_example.py
-+	DEPENDS doxygen ${CMAKE_CURRENT_BINARY_DIR}/diagrams_a.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams_b.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams_c.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams_d.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams_e.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams.cfg ${TOP}/examples/strip_example.py
++	DEPENDS doxygen ${CMAKE_CURRENT_BINARY_DIR}/diagrams_a.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams_b.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams_c.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams_d.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams_e.h ${CMAKE_CURRENT_BINARY_DIR}/diagrams.cfg ${TOP}/examples/strip_example.py ${CMAKE_CURRENT_BINARY_DIR}/baseexample.cfg
  	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/diagrams/html/index.html ${PROJECT_BINARY_DIR}/latex/examples/diagrams/latex/refman_doc.tex
    )
  endif(DOT)