void-packages/srcpkgs/freecad/patches/103-find-coin3v4-doc.patch
yopito 2a5d702940 freecad: libexecinfo usage, rebuild with coin3 4.0.0
libexecinfo's usage is incomplete: 002-execinfo.patch still needed

[ci skip]
2020-11-24 16:01:33 +01:00

50 lines
1.9 KiB
Diff

From 04833a5f1cbc07f8f6ae94453c4535e13789aa05 Mon Sep 17 00:00:00 2001
From: yopito <pierre.bourgin@free.fr>
Date: Mon, 6 Jul 2020 06:54:07 +0200
Subject: [PATCH] build: fix Coin 3d documentation discovering
* coin3d 4.0.0 default location is /usr/share/doc/Coin/html/
* misuses of find_files() if several candidates for filename
* export variable COIN3D_DOC_FOUND that is used by cMake/FreeCAD_Helpers/PrintFinalReport.cmake
---
cMake/FindCoin3DDoc.cmake | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git cMake/FindCoin3DDoc.cmake cMake/FindCoin3DDoc.cmake
index 883368445..c6c92f260 100644
--- cMake/FindCoin3DDoc.cmake
+++ cMake/FindCoin3DDoc.cmake
@@ -23,18 +23,19 @@ IF (COIN3D_FOUND)
find_path(COIN3D_DOC_PATH index.html
/usr/share/doc/libcoin80-doc/html
/usr/share/doc/coin/html
+ /usr/share/doc/Coin/html
)
IF( EXISTS ${COIN3D_DOC_PATH})
message(STATUS "Coin3D doc is installed")
- find_file(COIN3D_DOC_TAGFILE coin.tag Coin.tag
- ${COIN3D_DOC_PATH}
+ find_file(COIN3D_DOC_TAGFILE NAMES coin.tag Coin.tag
+ PATHS ${COIN3D_DOC_PATH}
)
IF( EXISTS ${COIN3D_DOC_TAGFILE})
SET( COIN3D_DOC_FOUND "YES"
)
ELSE( EXISTS ${COIN3D_DOC_TAGFILE})
- find_file(COIN3D_DOC_TAGFILE_GZ coin.tag.gz Coin.tag.gz
- ${COIN3D_DOC_PATH}
+ find_file(COIN3D_DOC_TAGFILE_GZ NAMES coin.tag.gz Coin.tag.gz
+ PATHS ${COIN3D_DOC_PATH}
)
IF( EXISTS ${COIN3D_DOC_TAGFILE_GZ})
message(STATUS " Found ${COIN3D_DOC_TAGFILE_GZ}")
@@ -85,4 +86,5 @@ if(COIN3D_DOC_FOUND)
message(STATUS " Location: ${COIN3D_DOC_PATH}")
endif(COIN3D_DOC_FOUND)
-
+# export for others
+SET( COIN3D_DOC_FOUND "${COIN3D_DOC_FOUND}" CACHE BOOL "Coin3d documentation available")
--
2.27.0