summaryrefslogtreecommitdiff
path: root/media-gfx/openvdb/files/openvdb-4.0.2-fix-build-docs.patch
blob: cdbb9440a1a407c3c1475f0f31e1167c7766d427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
When building with doc USE flag enabled, the doc target is not built by
default and the missing docs cause an install failure.

This patch ensures that when the doc target is defined, it will be
built. Otherwise it might be possible to fix it using a separate step
in src_compile to build the documentation specifically, prior to running
install.

This has been tested and is required on 4.0.2 and 5.2.0, but is not
needed in >=openvdb-6

To reproduce the bug, enable the doc USE flag and emerge openvdb 4 or 5
without this patch. The install fails as the doc file is missing.

To show it is fixed. enable the doc USE flag and this patch and emerge
again. The install succeeds and the documentation can be found at
/usr/share/doc/openvdb-X

Patch by Adrian Grigo

diff -Naur a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt
--- a/openvdb/CMakeLists.txt	2020-08-18 12:17:15.261321103 +1000
+++ b/openvdb/CMakeLists.txt	2020-08-18 12:17:37.101397373 +1000
@@ -394,7 +394,7 @@
   FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config ${DOXYGEN_CONFIG_CONTENT} )
   FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config "OUTPUT_DIRECTORY=${CMAKE_CURRENT_BINARY_DIR}/doc\n" )
 
-  ADD_CUSTOM_TARGET ( doc
+  ADD_CUSTOM_TARGET ( doc ALL
     ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config
     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     COMMENT "Generating API documentation with Doxygen" VERBATIM