gnu: hypre: Use gexps.

* gnu/packages/maths.scm (hypre)[arguments]: Use gexps.
(hypre-openmpi)[arguments]: Likewise.

Change-Id: I3064b7606b97076e2fb2947b1fb93319eeb184c9
This commit is contained in:
Ludovic Courtès 2024-09-05 09:30:56 +02:00 committed by Ludovic Courtès
parent 6bf70cf9a6
commit ed1b4f56fc
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -7222,9 +7222,9 @@ set.")
(inputs (inputs
(list openblas)) (list openblas))
(arguments (arguments
`(#:modules ((srfi srfi-1) (list #:modules `((srfi srfi-1)
,@%default-gnu-modules) ,@%default-gnu-modules)
#:configure-flags '("--enable-shared" #:configure-flags #~'("--enable-shared"
"--disable-fortran" "--disable-fortran"
"--without-MPI" "--without-MPI"
"--with-openmp" "--with-openmp"
@ -7232,9 +7232,10 @@ set.")
"--with-lapack" "--with-lapack"
"--with-blas") "--with-blas")
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'configure 'chdir-src (add-before 'configure 'chdir-src
(lambda _ (chdir "src"))) (lambda _
(chdir "src")))
(replace 'configure (replace 'configure
(lambda* (#:key build target configure-flags (lambda* (#:key build target configure-flags
#:allow-other-keys #:rest args) #:allow-other-keys #:rest args)
@ -7242,8 +7243,8 @@ set.")
(apply configure (apply configure
(append args (append args
(list #:configure-flags (list #:configure-flags
(cons (string-append (cons (string-append "--host="
"--host=" (or target build)) (or target build))
configure-flags))))))) configure-flags)))))))
(add-after 'build 'build-docs (add-after 'build 'build-docs
(lambda _ (lambda _
@ -7254,8 +7255,7 @@ set.")
(setenv "LD_LIBRARY_PATH" (setenv "LD_LIBRARY_PATH"
(string-append (getcwd) "/hypre/lib")) (string-append (getcwd) "/hypre/lib"))
(setenv "PATH" (setenv "PATH"
(string-append "." ":" (string-append "." ":" (getenv "PATH")))
(getenv "PATH")))
(invoke "make" "check" "CHECKRUN=") (invoke "make" "check" "CHECKRUN=")
(for-each (lambda (filename) (for-each (lambda (filename)
(let ((size (stat:size (stat filename)))) (let ((size (stat:size (stat filename))))
@ -7268,12 +7268,16 @@ set.")
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; Custom install because docs/Makefile doesn't honor ${docdir}. ;; Custom install because docs/Makefile doesn't honor ${docdir}.
(let* ((doc (assoc-ref outputs "doc")) (let* ((doc (assoc-ref outputs "doc"))
(docdir (string-append doc "/share/doc/hypre-" ,version))) (docdir (string-append doc "/share/doc/hypre-"
#$version)))
(with-directory-excursion "docs" (with-directory-excursion "docs"
(for-each (lambda (base) (for-each (lambda (base)
(install-file (string-append base ".pdf") docdir) (install-file (string-append base
(copy-recursively (string-append base "-html") ".pdf") docdir)
(string-append docdir "/" base))) (copy-recursively (string-append base
"-html")
(string-append docdir
"/" base)))
'("usr-manual" "ref-manual"))))))))) '("usr-manual" "ref-manual")))))))))
(home-page "https://computing.llnl.gov/projects\ (home-page "https://computing.llnl.gov/projects\
/hypre-scalable-linear-solvers-multigrid-methods") /hypre-scalable-linear-solvers-multigrid-methods")
@ -7295,12 +7299,11 @@ problems.")
(arguments (arguments
(substitute-keyword-arguments (package-arguments hypre) (substitute-keyword-arguments (package-arguments hypre)
((#:configure-flags flags) ((#:configure-flags flags)
``("--with-MPI" #~`("--with-MPI" ,@(delete "--without-MPI" #$flags)))
,@(delete "--without-MPI" ,flags)))
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases #~(modify-phases #$phases
(add-before 'check 'mpi-setup (add-before 'check 'mpi-setup
,%openmpi-setup))))) #$%openmpi-setup)))))
(synopsis "Parallel solvers and preconditioners for linear equations") (synopsis "Parallel solvers and preconditioners for linear equations")
(description (description
"HYPRE is a software library of high performance preconditioners and "HYPRE is a software library of high performance preconditioners and