unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49500] [PATCH] gnu: dealii: Update to 9.3.0 and clean up.
@ 2021-07-09 20:27 Paul A. Patience
  2021-07-09 22:53 ` Paul A. Patience
  0 siblings, 1 reply; 4+ messages in thread
From: Paul A. Patience @ 2021-07-09 20:27 UTC (permalink / raw)
  To: 49500

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Empty Message

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-dealii-Update-to-9.3.0-and-clean-up.patch --]
[-- Type: text/x-patch; name=0001-gnu-dealii-Update-to-9.3.0-and-clean-up.patch, Size: 7937 bytes --]

From 9e8aa19cf0e4d4963b58478e7ee353b5b079d6e0 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Fri, 9 Jul 2021 16:06:34 -0400
Subject: [PATCH] gnu: dealii: Update to 9.3.0 and clean up.

The cleanup notably:

* Builds and installs the documentation into a separate doc output (in
the process moving around some files erroneously installed into the root
directory); and
* Removes unnecessary inputs, adds missing inputs and moves some inputs
into propagated-inputs (the candidates of which were determined with a
search for "include.*LIBNAME" in include/deal.II).

* gnu/packages/maths.scm (dealii): Reword comments.
[version]: Update to 9.3.0.
[outputs]: New field including doc output.
[native-inputs]: New field.
[inputs]: Sort them. Add perl and python-wrapper. Remove p4est (deal.II
interfaces with it only when MPI is enabled). Move boost, suitesparse
and tbb to...
[propagated-inputs]: ...here. New field including hdf5, which is
actually supported in deal.II without MPI.
[arguments]<#:tests?>: New argument. The tests were not being run before
anyway.
<#:configure-flags>[-DDEAL_II_COMPONENT_DOCUMENTATION]: New flag.
[-DDEAL_II_DOCREADME_RELDIR]: New flag. Prevents the LICENSE.md,
README.md, detailed.log and summary.log files from being installed in
the root directory (though note that the logs are removed in the new
remove-build-logs phase).
[-DDEAL_II_DOCHTML_RELDIR]: New flag.
[-DDEAL_II_COMPILE_EXAMPLES]: New flag.
[-DDEAL_II_EXAMPLES_RELDIR]: New flag. Prevents the examples directory
from being installed in the root directory.
[-DCMAKE_POSITION_INDEPENDENT_CODE]: Remove flag. The issue has been
resolved.
<#:phases>{remove-build-logs}: New phase.
[home-page]: Add trailing slash.
(dealii-openmpi): Use package/inherit.
[inputs]: Sort them. Remove mumps-metis-openmpi (deal.II no longer
interfaces with MUMPS). Move hdf5-parallel-openmpi, openmpi,
p4est-openmpi, petsc-openmpi and slepc-openmpi to...
[propagated-inputs]: ...here. New field.
[arguments]<#:configure-flags>: Rename cf variable to flags.
<#:phases>{mpi-setup}: Remove phase which is unused because the tests
are disabled.
---
 gnu/packages/maths.scm | 92 +++++++++++++++++++++++++++---------------
 1 file changed, 59 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b8e9a31be7..79b198e644 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4436,40 +4436,72 @@ revised simplex and the branch-and-bound methods.")
 (define-public dealii
   (package
     (name "dealii")
-    (version "9.2.0")
+    (version "9.3.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/dealii/dealii/releases/"
                            "download/v" version "/dealii-" version ".tar.gz"))
        (sha256
-        (base32
-         "0fm4xzrnb7dfn4415j24d8v3jkh0lssi86250x2f5wgi83xq4nnh"))
+        (base32 "0cdr74l4ymdjcmxgm5lzq16h10pzggnx9gg3z9yq5khhfnlcgy5f"))
        (modules '((guix build utils)))
        (snippet
-        ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
         '(begin
+           ;; Remove bundled boost, muparser, TBB and UMFPACK.
            (delete-file-recursively "bundled")
            #t))))
     (build-system cmake-build-system)
+    (outputs '("out" "doc"))
+    (native-inputs
+     ;; Required to build the documentation.
+     ;; (Also required is perl, which is in inputs.)
+     `(("dot" ,graphviz)
+       ("doxygen" ,doxygen)))
     (inputs
-     `(("tbb" ,tbb)
-       ("zlib" ,zlib)
-       ("boost" ,boost)
-       ("p4est" ,p4est)
+     `(("arpack" ,arpack-ng)
        ("blas" ,openblas)
+       ("gfortran" ,gfortran)
        ("lapack" ,lapack)
-       ("arpack" ,arpack-ng)
        ("muparser" ,muparser)
-       ("gfortran" ,gfortran)
-       ("suitesparse" ,suitesparse)))   ;for UMFPACK
+       ("zlib" ,zlib)
+       ;; Required only for scripts installed in share/deal.II/scripts.
+       ;; (perl is also required to build the documentation.)
+       ("perl" ,perl)
+       ("python" ,python-wrapper)))
+    (propagated-inputs
+     `(("boost" ,boost)
+       ("hdf5" ,hdf5)
+       ("suitesparse" ,suitesparse)     ; For UMFPACK.
+       ("tbb" ,tbb)))
     (arguments
-     `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease
+     `(#:build-type "DebugRelease" ; Supports only Debug, Release and DebugRelease.
+       ;; The tests take too long and must be explicitly enabled with "make
+       ;; setup_tests".
+       ;; See https://www.dealii.org/developer/developers/testsuite.html.
+       ;; (They can also be run for an already installed deal.II.)
+       #:tests? #f
        #:configure-flags
-       ;; Work around a bug in libsuitesparseconfig linking
-       ;; see https://github.com/dealii/dealii/issues/4745
-       '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON")))
-    (home-page "https://www.dealii.org")
+       (let ((doc (string-append (assoc-ref %outputs "doc")
+                                 "/share/doc/" ,name "-" ,version)))
+         `("-DDEAL_II_COMPONENT_DOCUMENTATION=ON"
+           ,(string-append "-DDEAL_II_DOCREADME_RELDIR=" doc)
+           ,(string-append "-DDEAL_II_DOCHTML_RELDIR=" doc "/html")
+           ;; Don't compile the examples because the source and CMakeLists.txt
+           ;; are installed anyway, allowing users to do so for themselves.
+           "-DDEAL_II_COMPILE_EXAMPLES=OFF"
+           ,(string-append "-DDEAL_II_EXAMPLES_RELDIR=" doc "/examples")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-build-logs
+           ;; These build logs leak the name of the build directory by storing
+           ;; the values of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((doc (string-append (assoc-ref outputs "doc")
+                                       "/share/doc/" ,name "-" ,version)))
+               (for-each delete-file (map (lambda (f) (string-append doc "/" f))
+                                          '("detailed.log" "summary.log"))))
+             #t)))))
+    (home-page "https://www.dealii.org/")
     (synopsis "Finite element library")
     (description
      "Deal.II is a C++ program library targeted at the computational solution
@@ -4480,30 +4512,24 @@ in finite element programs.")
     (license license:lgpl2.1+)))
 
 (define-public dealii-openmpi
-  (package (inherit dealii)
+  (package/inherit dealii
     (name "dealii-openmpi")
     (inputs
-     `(("mpi" ,openmpi)
-       ;;Supported only with MPI:
-       ("hdf5" ,hdf5-parallel-openmpi)  ;TODO: have petsc-openmpi propagate?
+     `(("arpack" ,arpack-ng-openmpi)
+       ("metis" ,metis)
+       ("scalapack" ,scalapack)
+       ,@(alist-delete "arpack" (package-inputs dealii))))
+    (propagated-inputs
+     `(("hdf5" ,hdf5-parallel-openmpi)
+       ("mpi" ,openmpi)
        ("p4est" ,p4est-openmpi)
        ("petsc" ,petsc-openmpi)
        ("slepc" ,slepc-openmpi)
-       ("metis" ,metis)               ;for MUMPS
-       ("scalapack" ,scalapack)       ;for MUMPS
-       ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings
-       ("arpack" ,arpack-ng-openmpi)
-       ,@(fold alist-delete (package-inputs dealii)
-               '("p4est" "arpack"))))
+       ,@(alist-delete "hdf5" (package-propagated-inputs dealii))))
     (arguments
      (substitute-keyword-arguments (package-arguments dealii)
-       ((#:configure-flags cf)
-        `(cons "-DDEAL_II_WITH_MPI:BOOL=ON"
-               ,cf))
-       ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (add-before 'check 'mpi-setup
-             ,%openmpi-setup)))))
+       ((#:configure-flags flags)
+        `(cons "-DDEAL_II_WITH_MPI=ON" ,flags))))
     (synopsis "Finite element library (with MPI support)")))
 
 (define-public flann
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#49500] [PATCH] gnu: dealii: Update to 9.3.0 and clean up.
  2021-07-09 20:27 [bug#49500] [PATCH] gnu: dealii: Update to 9.3.0 and clean up Paul A. Patience
@ 2021-07-09 22:53 ` Paul A. Patience
  2021-07-14  1:32   ` Paul A. Patience
  0 siblings, 1 reply; 4+ messages in thread
From: Paul A. Patience @ 2021-07-09 22:53 UTC (permalink / raw)
  To: 49500

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

This revised patch removes perl and python from the inputs,
because if they were included it would have had to be in propagated
inputs because the scripts they are required for are not
executable.
Anyway, see the comment in the patch for more info.

Best regards,
Paul

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-dealii-Update-to-9.3.0-and-clean-up.patch --]
[-- Type: text/x-patch; name=0001-gnu-dealii-Update-to-9.3.0-and-clean-up.patch, Size: 8125 bytes --]

From 30429d0b48cf61d0ebfaf6fac96ae9c67755a072 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Fri, 9 Jul 2021 18:48:19 -0400
Subject: [PATCH] gnu: dealii: Update to 9.3.0 and clean up.

The cleanup notably:

* Builds and installs the documentation into a separate doc output (in
the process moving around some files erroneously installed into the root
directory); and
* Removes unnecessary inputs and moves some inputs into
propagated-inputs (the candidates of which were determined with a search
for "include.*LIBNAME" in include/deal.II).

* gnu/packages/maths.scm (dealii): Reword comments.
[version]: Update to 9.3.0.
[outputs]: New field including doc output.
[native-inputs]: New field.
[inputs]: Sort them. Remove p4est (deal.II interfaces with it only when
MPI is enabled). Move boost, suitesparse and tbb to...
[propagated-inputs]: ...here. New field including hdf5, which is
actually supported in deal.II without MPI.
[arguments]<#:tests?>: New argument. The tests were not being run before
anyway.
<#:configure-flags>[-DDEAL_II_COMPONENT_DOCUMENTATION]: New flag.
[-DDEAL_II_DOCREADME_RELDIR]: New flag. Prevents the LICENSE.md,
README.md, detailed.log and summary.log files from being installed in
the root directory (though note that the logs are removed in the new
remove-build-logs phase).
[-DDEAL_II_DOCHTML_RELDIR]: New flag.
[-DDEAL_II_COMPILE_EXAMPLES]: New flag.
[-DDEAL_II_EXAMPLES_RELDIR]: New flag. Prevents the examples directory
from being installed in the root directory.
[-DCMAKE_POSITION_INDEPENDENT_CODE]: Remove flag. The issue has been
resolved.
<#:phases>{remove-build-logs}: New phase.
[home-page]: Add trailing slash.
(dealii-openmpi): Use package/inherit.
[inputs]: Sort them. Remove mumps-metis-openmpi (deal.II no longer
interfaces with MUMPS). Move hdf5-parallel-openmpi, openmpi,
p4est-openmpi, petsc-openmpi and slepc-openmpi to...
[propagated-inputs]: ...here. New field.
[arguments]<#:configure-flags>: Rename cf variable to flags.
<#:phases>{mpi-setup}: Remove phase which is unused because the tests
are disabled.
---
 gnu/packages/maths.scm | 95 +++++++++++++++++++++++++++---------------
 1 file changed, 62 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b8e9a31be7..9e40b681c1 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4436,40 +4436,75 @@ revised simplex and the branch-and-bound methods.")
 (define-public dealii
   (package
     (name "dealii")
-    (version "9.2.0")
+    (version "9.3.0")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/dealii/dealii/releases/"
                            "download/v" version "/dealii-" version ".tar.gz"))
        (sha256
-        (base32
-         "0fm4xzrnb7dfn4415j24d8v3jkh0lssi86250x2f5wgi83xq4nnh"))
+        (base32 "0cdr74l4ymdjcmxgm5lzq16h10pzggnx9gg3z9yq5khhfnlcgy5f"))
        (modules '((guix build utils)))
        (snippet
-        ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
         '(begin
+           ;; Remove bundled boost, muparser, TBB and UMFPACK.
            (delete-file-recursively "bundled")
            #t))))
     (build-system cmake-build-system)
+    (outputs '("out" "doc"))
+    (native-inputs
+     ;; Required to build the documentation.
+     `(("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("perl" ,perl)))
     (inputs
-     `(("tbb" ,tbb)
-       ("zlib" ,zlib)
-       ("boost" ,boost)
-       ("p4est" ,p4est)
+     `(("arpack" ,arpack-ng)
        ("blas" ,openblas)
+       ("gfortran" ,gfortran)
        ("lapack" ,lapack)
-       ("arpack" ,arpack-ng)
        ("muparser" ,muparser)
-       ("gfortran" ,gfortran)
-       ("suitesparse" ,suitesparse)))   ;for UMFPACK
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     ;; Some scripts are installed into share/deal.II/scripts that require
+     ;; perl and python, but they are not executable (and some are missing the
+     ;; shebang line) and therefore must be explicitly passed to the
+     ;; interpreter.
+     ;; Anyway, they are meant to be used at build time, so rather than adding
+     ;; the interpreters here, any package depending on them should just add
+     ;; the requisite interpreter to its native inputs.
+     `(("boost" ,boost)
+       ("hdf5" ,hdf5)
+       ("suitesparse" ,suitesparse)     ; For UMFPACK.
+       ("tbb" ,tbb)))
     (arguments
-     `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease
+     `(#:build-type "DebugRelease" ; Supports only Debug, Release and DebugRelease.
+       ;; The tests take too long and must be explicitly enabled with "make
+       ;; setup_tests".
+       ;; See https://www.dealii.org/developer/developers/testsuite.html.
+       ;; (They can also be run for an already installed deal.II.)
+       #:tests? #f
        #:configure-flags
-       ;; Work around a bug in libsuitesparseconfig linking
-       ;; see https://github.com/dealii/dealii/issues/4745
-       '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON")))
-    (home-page "https://www.dealii.org")
+       (let ((doc (string-append (assoc-ref %outputs "doc")
+                                 "/share/doc/" ,name "-" ,version)))
+         `("-DDEAL_II_COMPONENT_DOCUMENTATION=ON"
+           ,(string-append "-DDEAL_II_DOCREADME_RELDIR=" doc)
+           ,(string-append "-DDEAL_II_DOCHTML_RELDIR=" doc "/html")
+           ;; Don't compile the examples because the source and CMakeLists.txt
+           ;; are installed anyway, allowing users to do so for themselves.
+           "-DDEAL_II_COMPILE_EXAMPLES=OFF"
+           ,(string-append "-DDEAL_II_EXAMPLES_RELDIR=" doc "/examples")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-build-logs
+           ;; These build logs leak the name of the build directory by storing
+           ;; the values of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((doc (string-append (assoc-ref outputs "doc")
+                                       "/share/doc/" ,name "-" ,version)))
+               (for-each delete-file (map (lambda (f) (string-append doc "/" f))
+                                          '("detailed.log" "summary.log"))))
+             #t)))))
+    (home-page "https://www.dealii.org/")
     (synopsis "Finite element library")
     (description
      "Deal.II is a C++ program library targeted at the computational solution
@@ -4480,30 +4515,24 @@ in finite element programs.")
     (license license:lgpl2.1+)))
 
 (define-public dealii-openmpi
-  (package (inherit dealii)
+  (package/inherit dealii
     (name "dealii-openmpi")
     (inputs
-     `(("mpi" ,openmpi)
-       ;;Supported only with MPI:
-       ("hdf5" ,hdf5-parallel-openmpi)  ;TODO: have petsc-openmpi propagate?
+     `(("arpack" ,arpack-ng-openmpi)
+       ("metis" ,metis)
+       ("scalapack" ,scalapack)
+       ,@(alist-delete "arpack" (package-inputs dealii))))
+    (propagated-inputs
+     `(("hdf5" ,hdf5-parallel-openmpi)
+       ("mpi" ,openmpi)
        ("p4est" ,p4est-openmpi)
        ("petsc" ,petsc-openmpi)
        ("slepc" ,slepc-openmpi)
-       ("metis" ,metis)               ;for MUMPS
-       ("scalapack" ,scalapack)       ;for MUMPS
-       ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings
-       ("arpack" ,arpack-ng-openmpi)
-       ,@(fold alist-delete (package-inputs dealii)
-               '("p4est" "arpack"))))
+       ,@(alist-delete "hdf5" (package-propagated-inputs dealii))))
     (arguments
      (substitute-keyword-arguments (package-arguments dealii)
-       ((#:configure-flags cf)
-        `(cons "-DDEAL_II_WITH_MPI:BOOL=ON"
-               ,cf))
-       ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (add-before 'check 'mpi-setup
-             ,%openmpi-setup)))))
+       ((#:configure-flags flags)
+        `(cons "-DDEAL_II_WITH_MPI=ON" ,flags))))
     (synopsis "Finite element library (with MPI support)")))
 
 (define-public flann
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#49500] [PATCH] gnu: dealii: Update to 9.3.0 and clean up.
  2021-07-09 22:53 ` Paul A. Patience
@ 2021-07-14  1:32   ` Paul A. Patience
  2021-07-20 20:38     ` bug#49500: " Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Paul A. Patience @ 2021-07-14  1:32 UTC (permalink / raw)
  To: 49500

[-- Attachment #1: Type: text/plain, Size: 93 bytes --]

deal.II 9.3.1 has been released in the meantime,
so update to that.

Best regards,
Paul

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-dealii-Update-to-9.3.1-and-clean-up.patch --]
[-- Type: text/x-patch; name=0001-gnu-dealii-Update-to-9.3.1-and-clean-up.patch, Size: 8126 bytes --]

From 3e4b62a5af1e71eb37474ab9f719e0b9a9cc66a0 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Tue, 13 Jul 2021 21:29:51 -0400
Subject: [PATCH] gnu: dealii: Update to 9.3.1 and clean up.

The cleanup notably:

* Builds and installs the documentation into a separate doc output (in
the process moving around some files erroneously installed into the root
directory); and
* Removes unnecessary inputs and moves some inputs into
propagated-inputs (the candidates of which were determined with a search
for "include.*LIBNAME" in include/deal.II).

* gnu/packages/maths.scm (dealii): Reword comments.
[version]: Update to 9.3.1.
[outputs]: New field including doc output.
[native-inputs]: New field.
[inputs]: Sort them. Remove p4est (deal.II interfaces with it only when
MPI is enabled). Move boost, suitesparse and tbb to...
[propagated-inputs]: ...here. New field including hdf5, which is
actually supported in deal.II without MPI.
[arguments]<#:tests?>: New argument. The tests were not being run before
anyway.
<#:configure-flags>[-DDEAL_II_COMPONENT_DOCUMENTATION]: New flag.
[-DDEAL_II_DOCREADME_RELDIR]: New flag. Prevents the LICENSE.md,
README.md, detailed.log and summary.log files from being installed in
the root directory (though note that the logs are removed in the new
remove-build-logs phase).
[-DDEAL_II_DOCHTML_RELDIR]: New flag.
[-DDEAL_II_COMPILE_EXAMPLES]: New flag.
[-DDEAL_II_EXAMPLES_RELDIR]: New flag. Prevents the examples directory
from being installed in the root directory.
[-DCMAKE_POSITION_INDEPENDENT_CODE]: Remove flag. The issue has been
resolved.
<#:phases>{remove-build-logs}: New phase.
[home-page]: Add trailing slash.
(dealii-openmpi): Use package/inherit.
[inputs]: Sort them. Remove mumps-metis-openmpi (deal.II no longer
interfaces with MUMPS). Move hdf5-parallel-openmpi, openmpi,
p4est-openmpi, petsc-openmpi and slepc-openmpi to...
[propagated-inputs]: ...here. New field.
[arguments]<#:configure-flags>: Rename cf variable to flags.
<#:phases>{mpi-setup}: Remove phase which is unused because the tests
are disabled.
---
 gnu/packages/maths.scm | 95 +++++++++++++++++++++++++++---------------
 1 file changed, 62 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b8e9a31be7..3242e47834 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4436,40 +4436,75 @@ revised simplex and the branch-and-bound methods.")
 (define-public dealii
   (package
     (name "dealii")
-    (version "9.2.0")
+    (version "9.3.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/dealii/dealii/releases/"
                            "download/v" version "/dealii-" version ".tar.gz"))
        (sha256
-        (base32
-         "0fm4xzrnb7dfn4415j24d8v3jkh0lssi86250x2f5wgi83xq4nnh"))
+        (base32 "1f0sqvlxvl0myqcn0q6xrn1vnp5pgx143lai4a4jkh1dmdv4cbx6"))
        (modules '((guix build utils)))
        (snippet
-        ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
         '(begin
+           ;; Remove bundled boost, muparser, TBB and UMFPACK.
            (delete-file-recursively "bundled")
            #t))))
     (build-system cmake-build-system)
+    (outputs '("out" "doc"))
+    (native-inputs
+     ;; Required to build the documentation.
+     `(("dot" ,graphviz)
+       ("doxygen" ,doxygen)
+       ("perl" ,perl)))
     (inputs
-     `(("tbb" ,tbb)
-       ("zlib" ,zlib)
-       ("boost" ,boost)
-       ("p4est" ,p4est)
+     `(("arpack" ,arpack-ng)
        ("blas" ,openblas)
+       ("gfortran" ,gfortran)
        ("lapack" ,lapack)
-       ("arpack" ,arpack-ng)
        ("muparser" ,muparser)
-       ("gfortran" ,gfortran)
-       ("suitesparse" ,suitesparse)))   ;for UMFPACK
+       ("zlib" ,zlib)))
+    (propagated-inputs
+     ;; Some scripts are installed into share/deal.II/scripts that require
+     ;; perl and python, but they are not executable (and some are missing the
+     ;; shebang line) and therefore must be explicitly passed to the
+     ;; interpreter.
+     ;; Anyway, they are meant to be used at build time, so rather than adding
+     ;; the interpreters here, any package depending on them should just add
+     ;; the requisite interpreter to its native inputs.
+     `(("boost" ,boost)
+       ("hdf5" ,hdf5)
+       ("suitesparse" ,suitesparse)     ; For UMFPACK.
+       ("tbb" ,tbb)))
     (arguments
-     `(#:build-type "DebugRelease" ;only supports Release, Debug, or DebugRelease
+     `(#:build-type "DebugRelease" ; Supports only Debug, Release and DebugRelease.
+       ;; The tests take too long and must be explicitly enabled with "make
+       ;; setup_tests".
+       ;; See https://www.dealii.org/developer/developers/testsuite.html.
+       ;; (They can also be run for an already installed deal.II.)
+       #:tests? #f
        #:configure-flags
-       ;; Work around a bug in libsuitesparseconfig linking
-       ;; see https://github.com/dealii/dealii/issues/4745
-       '("-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON")))
-    (home-page "https://www.dealii.org")
+       (let ((doc (string-append (assoc-ref %outputs "doc")
+                                 "/share/doc/" ,name "-" ,version)))
+         `("-DDEAL_II_COMPONENT_DOCUMENTATION=ON"
+           ,(string-append "-DDEAL_II_DOCREADME_RELDIR=" doc)
+           ,(string-append "-DDEAL_II_DOCHTML_RELDIR=" doc "/html")
+           ;; Don't compile the examples because the source and CMakeLists.txt
+           ;; are installed anyway, allowing users to do so for themselves.
+           "-DDEAL_II_COMPILE_EXAMPLES=OFF"
+           ,(string-append "-DDEAL_II_EXAMPLES_RELDIR=" doc "/examples")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-build-logs
+           ;; These build logs leak the name of the build directory by storing
+           ;; the values of CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((doc (string-append (assoc-ref outputs "doc")
+                                       "/share/doc/" ,name "-" ,version)))
+               (for-each delete-file (map (lambda (f) (string-append doc "/" f))
+                                          '("detailed.log" "summary.log"))))
+             #t)))))
+    (home-page "https://www.dealii.org/")
     (synopsis "Finite element library")
     (description
      "Deal.II is a C++ program library targeted at the computational solution
@@ -4480,30 +4515,24 @@ in finite element programs.")
     (license license:lgpl2.1+)))
 
 (define-public dealii-openmpi
-  (package (inherit dealii)
+  (package/inherit dealii
     (name "dealii-openmpi")
     (inputs
-     `(("mpi" ,openmpi)
-       ;;Supported only with MPI:
-       ("hdf5" ,hdf5-parallel-openmpi)  ;TODO: have petsc-openmpi propagate?
+     `(("arpack" ,arpack-ng-openmpi)
+       ("metis" ,metis)
+       ("scalapack" ,scalapack)
+       ,@(alist-delete "arpack" (package-inputs dealii))))
+    (propagated-inputs
+     `(("hdf5" ,hdf5-parallel-openmpi)
+       ("mpi" ,openmpi)
        ("p4est" ,p4est-openmpi)
        ("petsc" ,petsc-openmpi)
        ("slepc" ,slepc-openmpi)
-       ("metis" ,metis)               ;for MUMPS
-       ("scalapack" ,scalapack)       ;for MUMPS
-       ("mumps" ,mumps-metis-openmpi) ;configure supports only metis orderings
-       ("arpack" ,arpack-ng-openmpi)
-       ,@(fold alist-delete (package-inputs dealii)
-               '("p4est" "arpack"))))
+       ,@(alist-delete "hdf5" (package-propagated-inputs dealii))))
     (arguments
      (substitute-keyword-arguments (package-arguments dealii)
-       ((#:configure-flags cf)
-        `(cons "-DDEAL_II_WITH_MPI:BOOL=ON"
-               ,cf))
-       ((#:phases phases '%standard-phases)
-        `(modify-phases ,phases
-           (add-before 'check 'mpi-setup
-             ,%openmpi-setup)))))
+       ((#:configure-flags flags)
+        `(cons "-DDEAL_II_WITH_MPI=ON" ,flags))))
     (synopsis "Finite element library (with MPI support)")))
 
 (define-public flann
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#49500: [PATCH] gnu: dealii: Update to 9.3.0 and clean up.
  2021-07-14  1:32   ` Paul A. Patience
@ 2021-07-20 20:38     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2021-07-20 20:38 UTC (permalink / raw)
  To: Paul A. Patience; +Cc: 49500-done

Hi Paul,

"Paul A. Patience" <paul@apatience.com> skribis:

> From 3e4b62a5af1e71eb37474ab9f719e0b9a9cc66a0 Mon Sep 17 00:00:00 2001
> From: "Paul A. Patience" <paul@apatience.com>
> Date: Tue, 13 Jul 2021 21:29:51 -0400
> Subject: [PATCH] gnu: dealii: Update to 9.3.1 and clean up.
>
> The cleanup notably:
>
> * Builds and installs the documentation into a separate doc output (in
> the process moving around some files erroneously installed into the root
> directory); and
> * Removes unnecessary inputs and moves some inputs into
> propagated-inputs (the candidates of which were determined with a search
> for "include.*LIBNAME" in include/deal.II).
>
> * gnu/packages/maths.scm (dealii): Reword comments.
> [version]: Update to 9.3.1.
> [outputs]: New field including doc output.
> [native-inputs]: New field.
> [inputs]: Sort them. Remove p4est (deal.II interfaces with it only when
> MPI is enabled). Move boost, suitesparse and tbb to...
> [propagated-inputs]: ...here. New field including hdf5, which is
> actually supported in deal.II without MPI.
> [arguments]<#:tests?>: New argument. The tests were not being run before
> anyway.
> <#:configure-flags>[-DDEAL_II_COMPONENT_DOCUMENTATION]: New flag.
> [-DDEAL_II_DOCREADME_RELDIR]: New flag. Prevents the LICENSE.md,
> README.md, detailed.log and summary.log files from being installed in
> the root directory (though note that the logs are removed in the new
> remove-build-logs phase).
> [-DDEAL_II_DOCHTML_RELDIR]: New flag.
> [-DDEAL_II_COMPILE_EXAMPLES]: New flag.
> [-DDEAL_II_EXAMPLES_RELDIR]: New flag. Prevents the examples directory
> from being installed in the root directory.
> [-DCMAKE_POSITION_INDEPENDENT_CODE]: Remove flag. The issue has been
> resolved.
> <#:phases>{remove-build-logs}: New phase.
> [home-page]: Add trailing slash.
> (dealii-openmpi): Use package/inherit.
> [inputs]: Sort them. Remove mumps-metis-openmpi (deal.II no longer
> interfaces with MUMPS). Move hdf5-parallel-openmpi, openmpi,
> p4est-openmpi, petsc-openmpi and slepc-openmpi to...
> [propagated-inputs]: ...here. New field.
> [arguments]<#:configure-flags>: Rename cf variable to flags.
> <#:phases>{mpi-setup}: Remove phase which is unused because the tests
> are disabled.
> ---
>  gnu/packages/maths.scm | 95 +++++++++++++++++++++++++++---------------
>  1 file changed, 62 insertions(+), 33 deletions(-)

Impressive piece of work.

Pushed as 4a136a3b7fed201805f3ef3c8569abf0cbf8b014, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-20 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 20:27 [bug#49500] [PATCH] gnu: dealii: Update to 9.3.0 and clean up Paul A. Patience
2021-07-09 22:53 ` Paul A. Patience
2021-07-14  1:32   ` Paul A. Patience
2021-07-20 20:38     ` bug#49500: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).