[bug#77991,2/4] gnu: scotch: Keep *.cmake in the main output.
Commit Message
From: Ludovic Courtès <ludovic.courtes@inria.fr>
This fixes a bug whereby ‘SCOTCHConfig.cmake’ would fail to find
‘scotchmetisTargets.cmake’ because it expects it to be in the same
directory as itself, ${CMAKE_CURRENT_LIST_DIR}.
* gnu/packages/maths.scm (scotch)[arguments]: Adjust ‘install-metis’
phase to keep *.cmake in “out”.
Change-Id: If8d8f890852c35cede6e81c33d18b9101988a635
---
gnu/packages/maths.scm | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
@@ -5220,15 +5220,22 @@ (define-public scotch
(modify-phases %standard-phases
(add-after 'install 'install-metis
(lambda* (#:key outputs #:allow-other-keys)
+ ;; Move the METIS compatibility library to a separate output to
+ ;; avoid a name clash on <metis.h>.
(let* ((out (assoc-ref outputs "out"))
(metis (assoc-ref outputs "metis"))
(prefix (string-length out)))
(for-each (lambda (file)
- (let ((target (string-append
- metis
- (string-drop file prefix))))
- (mkdir-p (dirname target))
- (rename-file file target)))
+ ;; 'SCOTCHConfig.cmake' includes
+ ;; *metisTargets.cmake from
+ ;; ${CMAKE_CURRENT_LIST_DIR} so keep all *.cmake
+ ;; files in "out".
+ (unless (string-suffix? ".cmake" file)
+ (let ((target (string-append
+ metis
+ (string-drop file prefix))))
+ (mkdir-p (dirname target))
+ (rename-file file target))))
(find-files out "metis"))))))))
(home-page "https://www.labri.fr/perso/pelegrin/scotch/")
(properties