From 6cc4907550b33af4432caf21489c89247f9e9ac7 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Wed, 11 Aug 2021 21:37:28 -0400 Subject: [PATCH 4/6] gnu: sundials: Clean up. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/maths.scm (sundials): Capitalize and punctuate comments. [source]{sha256}: Join base32 line. [inputs]: Rename gfortran label from “fortran” to “gfortran”. Sort the inputs. [arguments]<#:configure-flags>: Extract assoc-ref form into a let. (sundials-openmpi): Use package/inherit. Replace tab with spaces. [arguments]<#:configure-flags>: Join some lines. [synopsis]: Reuse sundials's synopsis and mention MPI support in parentheses (thus conforming to the usual style followed by other package definitions). --- gnu/packages/maths.scm | 56 +++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 5195dd6180..8ca9505985 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -5686,31 +5686,28 @@ and comparisons are supported.") (uri (string-append "https://computation.llnl.gov/projects/sundials/download/" "sundials-" version ".tar.gz")) (sha256 - (base32 - "090s8ymhd0g1s1d44fa73r5yi32hb4biwahhbfi327zd64yn8kd2")))) + (base32 "090s8ymhd0g1s1d44fa73r5yi32hb4biwahhbfi327zd64yn8kd2")))) (build-system cmake-build-system) (native-inputs - `(("python" ,python-2))) ;for tests; syntax incompatible with python 3 + `(("python" ,python-2))) ; For tests; syntax incompatible with Python 3. (inputs - `(("fortran" ,gfortran) ;for fcmix - ("blas" ,openblas) + `(("blas" ,openblas) + ("gfortran" ,gfortran) ; For FCMIX. ("suitesparse" ,suitesparse))) (arguments - `(#:configure-flags `("-DEXAMPLES_ENABLE_C:BOOL=ON" - "-DEXAMPLES_ENABLE_CXX:BOOL=ON" - "-DEXAMPLES_ENABLE_F77:BOOL=ON" - "-DEXAMPLES_ENABLE_F90:BOOL=ON" - "-DEXAMPLES_INSTALL:BOOL=OFF" - - "-DFCMIX_ENABLE:BOOL=ON" - - "-DKLU_ENABLE:BOOL=ON" - ,(string-append "-DKLU_INCLUDE_DIR=" - (assoc-ref %build-inputs "suitesparse") - "/include") - ,(string-append "-DKLU_LIBRARY_DIR=" - (assoc-ref %build-inputs "suitesparse") - "/lib")))) + `(#:configure-flags + (let ((suitesparse (assoc-ref %build-inputs "suitesparse"))) + `("-DEXAMPLES_ENABLE_C:BOOL=ON" + "-DEXAMPLES_ENABLE_CXX:BOOL=ON" + "-DEXAMPLES_ENABLE_F77:BOOL=ON" + "-DEXAMPLES_ENABLE_F90:BOOL=ON" + "-DEXAMPLES_INSTALL:BOOL=OFF" + + "-DFCMIX_ENABLE:BOOL=ON" + + "-DKLU_ENABLE:BOOL=ON" + ,(string-append "-DKLU_INCLUDE_DIR=" suitesparse "/include") + ,(string-append "-DKLU_LIBRARY_DIR=" suitesparse "/lib"))))) (home-page "https://computation.llnl.gov/projects/sundials") (synopsis "Suite of nonlinear and differential/algebraic equation solvers") (description "SUNDIALS is a family of software packages implemented with @@ -5719,7 +5716,7 @@ easily be incorporated into existing simulation codes.") (license license:bsd-3))) (define-public sundials-openmpi - (package (inherit sundials) + (package/inherit sundials (name "sundials-openmpi") (propagated-inputs `(("mpi" ,openmpi) @@ -5733,24 +5730,21 @@ easily be incorporated into existing simulation codes.") `(cons* "-DMPI_ENABLE:BOOL=ON" "-DHYPRE_ENABLE:BOOL=ON" (string-append "-DHYPRE_INCLUDE_DIR=" - (assoc-ref %build-inputs "hypre") - "/include") + (assoc-ref %build-inputs "hypre") "/include") (string-append "-DHYPRE_LIBRARY_DIR=" - (assoc-ref %build-inputs "hypre") - "/lib") + (assoc-ref %build-inputs "hypre") "/lib") "-DPETSC_ENABLE:BOOL=ON" (string-append "-DPETSC_INCLUDE_DIR=" - (assoc-ref %build-inputs "petsc") - "/include") + (assoc-ref %build-inputs "petsc") "/include") (string-append "-DPETSC_LIBRARY_DIR=" - (assoc-ref %build-inputs "petsc") - "/lib") + (assoc-ref %build-inputs "petsc") "/lib") ,flags)) ((#:phases phases '%standard-phases) `(modify-phases ,phases (add-before 'check 'mpi-setup - ,%openmpi-setup))))) - (synopsis "SUNDIALS with OpenMPI support"))) + ,%openmpi-setup))))) + (synopsis "Suite of nonlinear and differential/algebraic equation solvers +(with MPI support)"))) (define-public combinatorial-blas (package -- 2.32.0