mailmap: Update entries for Nikita.
[jackhill/guix/guix.git] / gnu / packages / maths.scm
index 5ac3bd1..d60c033 100644 (file)
@@ -1,22 +1,22 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019, 2020 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Fabian Harfert <fhmgufs@web.de>
 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2016, 2018 Kei Kebreau <kkebreau@posteo.net>
-;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2018, 2020 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2017, 2018, 2019, 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
-;;; Copyright © 2017 ng0 <ng0@n0.is>
+;;; Copyright © 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2017 Theodoros Foradis <theodoros@foradis.org>
 ;;; Copyright © 2017, 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
 ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com>
 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
-;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2018 Amin Bandali <mab@gnu.org>
+;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
 ;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -60,6 +65,7 @@
   #:use-module (guix utils)
   #:use-module ((guix build utils) #:select (alist-replace))
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (guix build-system ruby)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
+  #:use-module (gnu packages dbm)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages file)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages ghostscript)
+  #:use-module (gnu packages glib)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages java)
   #:use-module (gnu packages less)
@@ -372,26 +382,123 @@ semiconductors.")
     (license license:gpl3+)
     (home-page "https://www.gnu.org/software/dionysus/")))
 
+(define-public dsfmt
+  (package
+    (name "dsfmt")
+    (version "2.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+         (string-append
+           "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/"
+           "dSFMT-src-" version ".tar.gz"))
+       (sha256
+        (base32
+         "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42"))
+       (modules '((guix build utils)))
+       ;; Don't distribute html documentation with bundled jquery.
+       (snippet
+        '(begin
+           (delete-file-recursively "html") #t))
+       ;; Add patches borrowed from Julia.
+       (patches
+         (list
+           (origin
+             (method url-fetch)
+             (uri (string-append
+                    "https://raw.githubusercontent.com/JuliaLang/julia/"
+                    "v1.3.0/deps/patches/dSFMT.c.patch"))
+             (sha256 (base32
+                      "09mhv11bms8jsmkmdqvlcgljwhzw3b6n9nncpi2b6dla9798hw2y"))
+             (file-name "dSFMT.c.patch"))
+           (origin
+             (method url-fetch)
+             (uri (string-append
+                    "https://raw.githubusercontent.com/JuliaLang/julia/"
+                    "v1.3.0/deps/patches/dSFMT.h.patch"))
+             (sha256 (base32
+                      "1py5rd0yxic335lzka23f6x2dhncrpizpyrk57gi2f28c0p98y5n"))
+             (file-name "dSFMT.h.patch"))))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure script
+         (replace 'build
+           ;; Upstream Makefile does not build a shared library. Borrow from Julia
+           ;; https://github.com/JuliaLang/julia/blob/v1.3.0/deps/dsfmt.mk
+           (lambda _
+             (invoke
+               "gcc" "-DNDEBUG" "-DDSFMT_MEXP=19937"
+               "-fPIC" "-DDSFMT_DO_NOT_USE_OLD_NAMES"
+               "-O3" "-finline-functions" "-fomit-frame-pointer"
+               "-fno-strict-aliasing" "--param" "max-inline-insns-single=1800"
+               "-Wmissing-prototypes" "-Wall" "-std=c99" "-shared" "dSFMT.c"
+               "-o" "libdSFMT.so")))
+         (replace 'install              ; no "install" target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib"))
+                    (inc (string-append out "/include"))
+                    (doc (string-append out "/share/doc/" ,name "-" ,version)))
+               (install-file "libdSFMT.so" lib)
+               (install-file "dSFMT.h" inc)
+               (install-file "LICENSE.txt" doc)
+               #t))))))
+    (synopsis "Double precision SIMD-oriented Fast Mersenne Twister")
+    (description
+     "The dSMFT package speeds up Fast Mersenne Twister generation by avoiding
+the expensive conversion of integer to double (floating point).  dSFMT directly
+generates double precision floating point pseudorandom numbers which have the
+IEEE Standard for Binary Floating-Point Arithmetic (ANSI/IEEE Std 754-1985)
+format.  dSFMT is only available on the CPUs which use IEEE 754 format double
+precision floating point numbers.")
+    (home-page "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/")
+    (license license:bsd-3)))
+
 (define-public gsl
   (package
     (name "gsl")
-    (version "2.5")
+    (version "2.6")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/gsl/gsl-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1395y9hlhqadn5g9j8q22224fds5sd92jxi9czfavjj24myasq04"))
-              (patches (search-patches "gsl-test-i686.patch"))))
+                "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp"))))
     (build-system gnu-build-system)
     (arguments
-     `(;; Currently there are numerous tests that fail on "exotic"
-       ;; architectures such as aarch64 and ppc64le.
-       ,@(if (string-prefix? "aarch64-linux"
-                             (or (%current-target-system) (%current-system)))
-           '(#:tests? #f)
-           '())))
+     (let ((system (%current-system)))
+       (cond
+        ((string-prefix? "aarch64" system)
+         ;; Some sparse matrix tests are failing on AArch64:
+         ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html
+         '(#:phases (modify-phases %standard-phases
+                      (add-before 'check 'disable-failing-tests
+                        (lambda _
+                          (substitute* "spmatrix/test.c"
+                            ((".*test_complex.*") "\n"))
+                          #t)))))
+        ((string-prefix? "i686" system)
+         ;; There are rounding issues with these tests on i686:
+         ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html
+         ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html
+         '(#:phases (modify-phases %standard-phases
+                      (add-before 'check 'disable-failing-tests
+                        (lambda _
+                          (substitute* "linalg/test.c"
+                            ((".*gsl_test\\(test_LU_decomp.*") "\n")
+                            ((".*gsl_test\\(test_LUc_decomp.*") "\n")
+                            ((".*gsl_test\\(test_cholesky_decomp.*") "\n")
+                            ((".*gsl_test\\(test_COD_lssolve2.*") "\n"))
+                          (substitute* "spmatrix/test.c"
+                            ((".*test_all.*") "\n")
+                            ((".*test_float.*") "\n")
+                            ((".*test_complex.*") "\n"))
+                          #t)))))
+        (else '()))))
     (home-page "https://www.gnu.org/software/gsl/")
     (synopsis "Numerical library for C and C++")
     (description
@@ -522,6 +629,51 @@ in memory, so even problems with very large output sizes can sometimes
 be solved.")
     (license license:gpl2+)))
 
+(define-public vinci
+  (package
+    (name "vinci")
+    (version "1.0.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.math.u-bordeaux.fr/~aenge/software/"
+                           "vinci/vinci-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1aq0qc1y27iw9grhgnyji3290wwfznsrk3sg6ynqpxwjdda53h4m"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("lrslib" ,lrslib)))
+    (arguments
+     `(#:tests? #f                      ; no check phase
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           ;; register the lrs location in the config file
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let* ((lrs (assoc-ref inputs "lrslib"))
+                    (lrsexec (string-append lrs "/bin/lrs")))
+               (substitute* "vinci.h"
+                 (("#define LRS_EXEC      \"lrs\"")
+                  (string-append "#define LRS_EXEC \"" lrsexec "\""))))
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (install-file "vinci" bin))
+             #t)))))
+    (home-page
+     "https://www.math.u-bordeaux.fr/~aenge/?category=software&page=vinci")
+    (synopsis "Volume computation for polytopes")
+    (description
+     "Vinci implements a number of volume computation algorithms for convex
+polytopes in arbitrary dimension.  The polytopes can be given by their
+V-representation (as the convex hull of a finite number of vertices), by
+their H-representation (as the bounded intersection of a finite number of
+halfspaces) or by their double description with both representations.")
+    (license license:gpl2+)))
+
 (define-public arpack-ng
   (package
     (name "arpack-ng")
@@ -726,7 +878,7 @@ computations.")
        ("flex" ,flex)))
     (inputs
      `(("zlib" ,zlib)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libtirpc" ,libtirpc)))
     (arguments
      `(#:parallel-tests? #f
@@ -966,7 +1118,7 @@ extremely large and complex data collections.")
      `(("hdf4" ,hdf4)
        ("hdf5" ,hdf5)
        ("zlib" ,zlib)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("slf4j-api" ,java-slf4j-api)))
     (arguments
      `(#:configure-flags
@@ -1083,7 +1235,7 @@ implemented in C.")
      `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API
        ;; XXX: These inputs are really dependencies of hdf4.
        ("zlib" ,zlib)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libtirpc" ,libtirpc)
 
        ("gctp" ,gctp)))
@@ -1091,7 +1243,7 @@ implemented in C.")
      `( #:configure-flags '("--enable-install-include" "--enable-shared"
                             "CC=h4cc -Df2cFortran" "LIBS=-lgctp")
         #:parallel-tests? #f))
-    (home-page "http://hdfeos.org/software/library.php#HDF-EOS2")
+    (home-page "https://hdfeos.org/software/library.php#HDF-EOS2")
     (synopsis "HDF4-based data format for NASA's Earth Observing System")
     (description "HDF-EOS2 is a software library built on HDF4 which supports
 the construction of data structures used in NASA's Earth Observing
@@ -1168,6 +1320,45 @@ Swath).")
                #t))))))
     (synopsis "Management suite for data with parallel IO support")))
 
+(define-public hdf5-blosc
+  (package
+    (name "hdf5-blosc")
+    (version "1.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Blosc/hdf5-blosc.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1nj2bm1v6ymm3fmyvhbn6ih5fgdiapavlfghh1pvbmhw71cysyqs"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "-DBLOSC_INSTALL_DIR="
+                            (assoc-ref %build-inputs "c-blosc"))
+             (string-append "-DPLUGIN_INSTALL_PATH="
+                            (assoc-ref %outputs "out")
+                            "/hdf5/lib/plugin"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'do-not-build-blosc
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("set\\(BLOSC_INSTALL_DIR.*") "")
+               (("ExternalProject_Add\\(project_blosc") "message("))
+             #t)))))
+    (inputs
+     `(("c-blosc" ,c-blosc)
+       ("hdf5" ,hdf5-1.10)))
+    (home-page "https://github.com/Blosc/hdf5-blosc")
+    (synopsis "Filter for HDF5 using the Blosc compressor")
+    (description "This is a filter for HDF5 that uses the Blosc compressor; by
+installing this filter, you can read and write HDF5 files with
+Blosc-compressed datasets.")
+    (license license:expat)))
+
 (define-public h5check
   (package
     (name "h5check")
@@ -1243,7 +1434,7 @@ similar to MATLAB, GNU Octave or SciPy.")
      `(("hdf4" ,hdf4-alt)
        ("hdf5" ,hdf5)
        ("zlib" ,zlib)
-       ("libjpeg" ,libjpeg)))
+       ("libjpeg" ,libjpeg-turbo)))
     (arguments
      `(#:configure-flags '("--enable-doxygen" "--enable-dot" "--enable-hdf4")
 
@@ -1492,7 +1683,7 @@ can solve two kinds of problems:
 (define-public octave-cli
   (package
     (name "octave-cli")
-    (version "5.1.0")
+    (version "5.2.0")
     (source
      (origin
       (method url-fetch)
@@ -1500,11 +1691,12 @@ can solve two kinds of problems:
                           version ".tar.lz"))
       (sha256
        (base32
-        "11wwxpy2q1bhxs2v41bqn05i2sb0905cj1xil6mg8l4k2kka4cq6"))))
+        "1848dq6nxzal8gwjrcp6xhi5gq96w89nss9d9rz75q408gb3mbl6"))))
     (build-system gnu-build-system)
     (inputs
      `(("alsa-lib" ,alsa-lib)
        ("arpack" ,arpack-ng)
+       ("bdb" ,bdb)
        ("curl" ,curl)
        ("fftw" ,fftw)
        ("fftwf" ,fftwf)
@@ -1515,6 +1707,12 @@ can solve two kinds of problems:
        ("glpk" ,glpk)
        ("glu" ,glu)
        ("graphicsmagick" ,graphicsmagick)
+
+       ;; TODO: libjpeg-turbo is indirectly required through libtiff.  In
+       ;; the next rebuild cycle, add an absolute reference for -ljpeg in
+       ;; libtiff.la instead of having to provide it here.
+       ("libjpeg" ,libjpeg-turbo)
+
        ("hdf5" ,hdf5)
        ("lapack" ,lapack)
        ("libsndfile" ,libsndfile)
@@ -1553,7 +1751,12 @@ can solve two kinds of problems:
      `(#:configure-flags
        (list (string-append "--with-shell="
                             (assoc-ref %build-inputs "bash")
-                            "/bin/sh"))
+                            "/bin/sh")
+
+             ;; XXX: Without this flag, linking octave-cli fails with
+             ;; undefined references to 'logf@GLIBCXX_3.4' et.al. due to
+             ;; not pulling in liboctinterp.la for -lstdc++.
+             "--enable-link-all-dependencies")
        #:phases
        (modify-phases %standard-phases
          (add-after 'configure 'configure-makeinfo
@@ -1600,9 +1803,6 @@ script files.")
                   "qscintilla2_qt5"))
                #t))))))))
 
-(define-public qtoctave
-  (deprecated-package "qtoctave" octave))
-
 (define-public opencascade-oce
   (package
     (name "opencascade-oce")
@@ -2574,8 +2774,9 @@ implemented in ANSI C, and MPI for communications.")
                                "scotch-integer-declarations.patch"))))
     (build-system gnu-build-system)
     (inputs
-     `(("zlib" ,zlib)
-       ("flex" ,flex)
+     `(("zlib" ,zlib)))
+    (native-inputs
+     `(("flex" ,flex)
        ("bison" ,bison)))
     (outputs '("out" "metis"))
     (arguments
@@ -2981,7 +3182,7 @@ point numbers.")
 (define-public wxmaxima
   (package
     (name "wxmaxima")
-    (version "20.01.3")
+    (version "20.03.1")
     (source
      (origin
        (method git-fetch)
@@ -2990,10 +3191,13 @@ point numbers.")
              (commit (string-append "Version-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "18fj2m1qwlbavivpixph112wq9hxy3hh7c8q07djc3bhrzf2a7v7"))))
+        (base32 "09ciip0wkahps5jdsqqr72bwjrd15bacw38zp23v3hm71xfk8hky"))))
     (build-system cmake-build-system)
     (native-inputs
-     `(("gettext" ,gettext-minimal)))
+     `(("gettext" ,gettext-minimal)
+       ("xorg-server" ,xorg-server-for-tests)))
+    ;; TODO: Add libomp for multithreading support.
+    ;; As of right now, enabling libomp causes the imageCells.wxm test to fail.
     (inputs
      `(("wxwidgets" ,wxwidgets)
        ("maxima" ,maxima)
@@ -3002,9 +3206,16 @@ point numbers.")
        ("gtk+" ,gtk+)
        ("shared-mime-info" ,shared-mime-info)))
     (arguments
-     `(#:tests? #f ; no check target
+     `(#:test-target "test"
        #:phases
        (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; Tests require a running X server.
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")
+             (setenv "HOME" (getcwd))
+             #t))
          (add-after 'install 'wrap-program
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (wrap-program (string-append (assoc-ref outputs "out")
@@ -3066,7 +3277,7 @@ directly in C++, or quick conversion of research code into production
 environments.  It can be used for machine learning, pattern recognition,
 signal processing, bioinformatics, statistics, econometrics, etc.  The library
 provides efficient classes for vectors, matrices and cubes, as well as 150+
-associated functions (eg. contiguous and non-contiguous submatrix views).")
+associated functions (e.g., contiguous and non-contiguous submatrix views).")
     (license license:asl2.0)))
 
 (define-public muparser
@@ -3104,7 +3315,7 @@ parts of it.")
 (define-public openblas
   (package
     (name "openblas")
-    (version "0.3.7")
+    (version "0.3.9")
     (source
      (origin
        (method url-fetch)
@@ -3113,7 +3324,7 @@ parts of it.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0jbdjsi0qsxahdcm42agnn1y7xpmg0hrhwjsxg0zbhs9wwy3p568"))))
+         "14iz9xnrb9xiwgj84j94mc74gg0zn2vsy9fmsijxxma1n7dck4w3"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -3173,7 +3384,7 @@ parts of it.")
      `(("cunit" ,cunit)
        ("fortran" ,gfortran)
        ("perl" ,perl)))
-    (home-page "http://www.openblas.net/")
+    (home-page "https://www.openblas.net/")
     (synopsis "Optimized BLAS library based on GotoBLAS")
     (description
      "OpenBLAS is a BLAS library forked from the GotoBLAS2-1.13 BSD version.")
@@ -3298,7 +3509,7 @@ access to BLIS implementations via traditional BLAS routine calls.")
        ;; no configure script
        (modify-phases %standard-phases (delete 'configure))
        #:tests? #f)) ;the tests are part of the default target
-    (home-page "http://openlibm.org/")
+    (home-page "https://openlibm.org/")
     (synopsis "Portable C mathematical library (libm)")
     (description
      "OpenLibm is an effort to have a high quality, portable, standalone C
@@ -3357,16 +3568,18 @@ Fresnel integrals, and similar related functions as well.")
 (define-public suitesparse
   (package
     (name "suitesparse")
-    (version "4.5.5")
+    (version "5.7.1")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append
-             "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-"
-             version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/DrTimothyAldenDavis/SuiteSparse.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "1dnr6pmjzc2qmbkmb4shigx1l74ilf6abn7svyd6brxgvph8vadr"))
+         "174p3l78kv9gaa0i5hflyai2ydwnjzh34k9938sl4aa3li0543s8"))
+       (patches (search-patches "suitesparse-mongoose-cmake.patch"))
        (modules '((guix build utils)))
        (snippet
         ;; Remove bundled metis source
@@ -3381,6 +3594,14 @@ Fresnel integrals, and similar related functions as well.")
              "BLAS=-lblas"
              "TBB=-ltbb"
              "MY_METIS_LIB=-lmetis"
+             ;; Flags for cmake (required to build GraphBLAS and Mongoose)
+             (string-append "CMAKE_OPTIONS=-DCMAKE_INSTALL_PREFIX="
+                            (assoc-ref %outputs "out")
+                            " -DCMAKE_VERBOSE_MAKEFILE=ON"
+                            " -DCMAKE_C_FLAGS_RELEASE=\"$(CFLAGS) $(CPPFLAGS)\""
+                            " -DCMAKE_CXX_FLAGS_RELEASE=\"$(CXXFLAGS) $(CPPFLAGS)\""
+                            " -DCMAKE_SKIP_RPATH=TRUE"
+                            " -DCMAKE_BUILD_TYPE=Release")
              (string-append "INSTALL_LIB="
                             (assoc-ref %outputs "out") "/lib")
              (string-append "INSTALL_INCLUDE="
@@ -3393,6 +3614,9 @@ Fresnel integrals, and similar related functions as well.")
      `(("tbb" ,tbb)
        ("lapack" ,lapack)
        ("metis" ,metis)))
+    (native-inputs
+     `(("cmake" ,cmake-minimal)
+       ("m4" ,m4)))
     (home-page "http://faculty.cse.tamu.edu/davis/suitesparse.html")
     (synopsis "Suite of sparse matrix software")
     (description
@@ -3536,16 +3760,43 @@ Failure to do so will result in a library with poor performance.")
 (define-public glm
   (package
     (name "glm")
-    (version "0.9.9.6")
+    (version "0.9.9.8")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/g-truc/glm/releases/download/"
                            version  "/glm-" version ".zip"))
        (sha256
-        (base32 "1l0pi1qi37mk6s0yrkrw07lspv4gcqnr9ryg3521hrl77ff37dwx"))
-       (patches (search-patches "glm-restore-install-target.patch"))))
+        (base32 "0k6yk9v46h690rshdx49x98y5qspkzibld1wb51jwcm35vba7qip"))))
     (build-system cmake-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'install
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; Since version 0.9.9.6, 'make install' is not supported
+                      ;; and we have to do it "manually".  Upstream discussion:
+                      ;; <https://github.com/g-truc/glm/pull/968>.
+                      (let* ((source (string-append "../glm"))
+                             (out (assoc-ref outputs "out"))
+                             (inc (string-append out "/include"))
+                             (lib (string-append out "/lib"))
+                             (pkgconfig (string-append lib "/pkgconfig")))
+                        (with-directory-excursion source
+                          (mkdir-p inc)
+                          (mkdir-p pkgconfig)
+                          (copy-recursively "glm" (string-append inc "/glm"))
+                          (copy-recursively "cmake" (string-append lib "/cmake"))
+                          (call-with-output-file (string-append pkgconfig "/glm.pc")
+                            (lambda (port)
+                              (format port
+                                      "prefix=~a
+includedir=${prefix}/include
+
+Name: GLM
+Description: OpenGL Mathematics
+Version: ~a
+Cflags: -I${includedir}~%" out ,(version-prefix version 3)))))
+                        #t))))))
     (native-inputs
      `(("unzip" ,unzip)))
     (home-page "https://glm.g-truc.net/")
@@ -3702,26 +3953,28 @@ in finite element programs.")
 (define-public flann
   (package
     (name "flann")
-    (version "1.8.4")
+    (version "1.9.1")
+    (home-page "https://github.com/mariusmuja/flann/")
     (source
       (origin
-        (method url-fetch)
-        (uri
-          (string-append
-            "http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-"
-            version "-src.zip"))
+        (method git-fetch)
+        (uri (git-reference (url home-page) (commit version)))
+        (file-name (git-file-name name version))
         (sha256
           (base32
-            "022w8hph7bli5zbpnk3z1qh1c2sl5hm8fw2ccim651ynn0hr7fyz"))
+           "0p56fl2yx1r86ds1mgjq40926jdcgq3hka7p3l1hv2acv9jxp15x"))
         (patches (search-patches "flann-cmake-3.11.patch"))))
     (build-system cmake-build-system)
-    (outputs '("out"
-               "octave"))                  ;46 MiB .mex file that pulls Octave
+    (outputs '("out"))
     (native-inputs
      `(("unzip" ,unzip)))
     (inputs
      `(("hdf5" ,hdf5)
-       ("octave" ,octave-cli)
+       ;; FIXME: 'mkoctfile' fails with a linker error:
+       ;;  ld: cannot find -loctinterp
+       ;;  ld: cannot find -loctave
+       ;; Disable it for now.
+       ;;("octave" ,octave-cli)
        ("python" ,python-2) ; print syntax
        ;; ("python2-numpy" ,python2-numpy) ; only required for the tests
        ("zlib" ,zlib)))
@@ -3734,14 +3987,6 @@ in finite element programs.")
        ;; Save 12 MiB by not installing .a files.  Passing
        ;; '-DBUILD_STATIC_LIBS=OFF' has no effect.
        #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'set-octave-directory
-                    (lambda* (#:key outputs #:allow-other-keys)
-                      ;; Install the .mex file in the "octave" output.
-                      (let ((out (assoc-ref outputs "octave")))
-                        (substitute* "src/matlab/CMakeLists.txt"
-                          (("share/flann/octave")
-                           (string-append out "/share/flann/octave")))
-                        #t)))
                   (add-after 'install 'remove-static-libraries
                     (lambda* (#:key outputs #:allow-other-keys)
                       (let* ((out (assoc-ref outputs "out"))
@@ -3751,7 +3996,6 @@ in finite element programs.")
                         #t))))
 
        #:tests? #f)) ; The test data are downloaded from the Internet.
-    (home-page "http://www.cs.ubc.ca/research/flann/")
     (synopsis "Library for approximate nearest neighbors computation")
     (description "FLANN is a library for performing fast approximate
 nearest neighbor searches in high dimensional spaces.  It implements a
@@ -4134,8 +4378,17 @@ as equations, scalars, vectors, and matrices.")
                 "0hprcdwhhyjigmhhk6514m71bnmvqci9r8gglrqilgx424r6ff7q"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
+     `(#:imported-modules ((guix build python-build-system)
+                           ,@%gnu-build-system-modules)
+       #:modules (((guix build python-build-system) #:select (site-packages))
+                  (guix build gnu-build-system)
+                  (guix build utils))
+       #:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'enable-bytecode-determinism
+           (lambda _
+             (setenv "PYTHONHASHSEED" "0")
+             #t))
          (add-after 'unpack 'fix-compatability
            ;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only.
            (lambda _
@@ -4151,7 +4404,9 @@ as equations, scalars, vectors, and matrices.")
          (replace 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (invoke "./configure"
-                     (string-append "--prefix=" (assoc-ref outputs "out")))))
+                     "--python"
+                     (string-append "--prefix=" (assoc-ref outputs "out"))
+                     (string-append "--pypkgdir=" (site-packages inputs outputs)))))
          (add-after 'configure 'change-directory
            (lambda _
              (chdir "build")
@@ -4498,7 +4753,7 @@ linear algebra primitives specifically targeting graph analytics.")
 (define-public dune-common
   (package
     (name "dune-common")
-    (version "2.6.0")
+    (version "2.7.0")
     (source
      (origin
        (method url-fetch)
@@ -4506,48 +4761,17 @@ linear algebra primitives specifically targeting graph analytics.")
                            version "/dune-common-" version ".tar.gz"))
        (sha256
         (base32
-         "019wcr1qf7jwyxx1y5y290wdlglylskvbb2m01ljkzcza2xnlmhw"))))
+         "140q1zh44cr5yrjwg4b5ga803rkqv55vk30l2cqm29aklj1wb0rw"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'build 'build-tests
            (lambda* (#:key make-flags #:allow-other-keys)
-             (apply invoke "make" "build_tests" make-flags)))
-         ;; These tests fail because they require a fully functional MPI
-         ;; environment.
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (setenv "ARGS"
-                     (string-append "--exclude-regex '("
-                                    (string-join
-                                     (list
-                                      "remoteindicestest"
-                                      "remoteindicestest-mpi-2"
-                                      "syncertest"
-                                      "syncertest-mpi-2"
-                                      "variablesizecommunicatortest"
-                                      "variablesizecommunicatortest-mpi-2"
-                                      "arithmetictestsuitetest"
-                                      "assertandreturntest"
-                                      "assertandreturntest_ndebug"
-                                      "concept"
-                                      "debugaligntest"
-                                      "mpicollectivecommunication"
-                                      "mpicollectivecommunication-mpi-2"
-                                      "mpiguardtest"
-                                      "mpiguardtest-mpi-2"
-                                      "mpihelpertest"
-                                      "mpihelpertest-mpi-2"
-                                      "mpihelpertest2"
-                                      "mpihelpertest2-mpi-2")
-                                     "|")
-                                    ")'"))
-             #t)))))
+             (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("gmp" ,gmp)
        ("metis" ,metis)
-       ("openmpi" ,openmpi)
        ("openblas" ,openblas)
        ("python" ,python)
        ("superlu" ,superlu)))
@@ -4567,7 +4791,7 @@ Differences} (FD).")
 (define-public dune-geometry
   (package
     (name "dune-geometry")
-    (version "2.6.0")
+    (version "2.7.0")
     (source
      (origin
        (method url-fetch)
@@ -4575,7 +4799,7 @@ Differences} (FD).")
                            version "/dune-geometry-" version ".tar.gz"))
        (sha256
         (base32
-         "0hlaaxjyv9j05blasvb67sy02hd0w4g9znf68gdh3l731dd1aqbn"))))
+         "1cicvlwbyyw76npicnblxckyvhbfn3ip8isydiv3hlrlz8zcg5nr"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
@@ -4585,7 +4809,6 @@ Differences} (FD).")
              (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("dune-common" ,dune-common)
-       ("openmpi" ,openmpi)
        ;; Optional
        ("openblas" ,openblas)
        ("gmp" ,gmp)
@@ -4605,10 +4828,47 @@ This package contains the basic DUNE geometry classes.")
     ;; GPL version 2 with "runtime exception"
     (license license:gpl2)))
 
+(define-public dune-uggrid
+  (package
+    (name "dune-uggrid")
+    (version "2.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+         (url "https://gitlab.dune-project.org/staging/dune-uggrid.git")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "192miqgmfj6jwk969gydzpbv9ki7jg5nky3ydnrwa2nq29b5xkh0"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-tests
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke "make" "build_tests" make-flags))))))
+    (inputs
+     `(("dune-common" ,dune-common)))
+    (native-inputs
+     `(("gfortran" ,gfortran)
+       ("pkg-config" ,pkg-config)))
+    (home-page "https://dune-project.org/")
+    (synopsis "Distributed and Unified Numerics Environment")
+    (description "DUNE, the Distributed and Unified Numerics Environment is a
+modular toolbox for solving @dfn{partial differential equations} (PDEs) with
+grid-based methods.  It supports the easy implementation of methods like
+@dfn{Finite Elements} (FE), @dfn{Finite Volumes} (FV), and also @dfn{Finite
+Differences} (FD).
+
+This package contains the DUNE UG grid classes.")
+    (license license:lgpl2.1)))
+
 (define-public dune-grid
   (package
     (name "dune-grid")
-    (version "2.6.0")
+    (version "2.7.0")
     (source
      (origin
        (method url-fetch)
@@ -4616,70 +4876,23 @@ This package contains the basic DUNE geometry classes.")
                            version "/dune-grid-" version ".tar.gz"))
        (sha256
         (base32
-         "1jp4vscm9yb9xg0lh7apzccfkhvgbnk652yahigmh3cvzpl4acd0"))))
+         "17fjz30qazjgl11sryyxnw9klai4yz1ji4bs68013xcxc5hdv27s"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'build 'build-tests
            (lambda* (#:key make-flags #:allow-other-keys)
-             (apply invoke "make" "build_tests" make-flags)))
-         ;; These tests fail because they require a fully functional MPI
-         ;; environment.
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (setenv "ARGS"
-                     (string-append "--exclude-regex '("
-                                    (string-join
-                                     (list
-                                      "scsgmappertest"
-                                      "conformvolumevtktest"
-                                      "gnuplottest"
-                                      "nonconformboundaryvtktest"
-                                      "subsamplingvtktest"
-                                      "vtktest"
-                                      "vtktest-mpi-2"
-                                      "vtksequencetest"
-                                      "gmshtest-onedgrid"
-                                      "test-dgf-yasp"
-                                      "test-dgf-yasp-offset"
-                                      "test-dgf-oned"
-                                      "test-geogrid-yaspgrid"
-                                      "test-gridinfo"
-                                      "test-identitygrid"
-                                      "testiteratorranges"
-                                      "test-hierarchicsearch"
-                                      "test-parallel-ug-mpi-2"
-                                      "test-yaspgrid-backuprestore-equidistant"
-                                      "test-yaspgrid-backuprestore-equidistant-mpi-2"
-                                      "test-yaspgrid-backuprestore-equidistantoffset"
-                                      "test-yaspgrid-backuprestore-equidistantoffset-mpi-2"
-                                      "test-yaspgrid-backuprestore-tensor"
-                                      "test-yaspgrid-backuprestore-tensor-mpi-2"
-                                      "test-yaspgrid-tensorgridfactory"
-                                      "test-yaspgrid-tensorgridfactory-mpi-2"
-                                      "test-yaspgrid-yaspfactory-1d"
-                                      "test-yaspgrid-yaspfactory-1d-mpi-2"
-                                      "test-yaspgrid-yaspfactory-2d"
-                                      "test-yaspgrid-yaspfactory-2d-mpi-2"
-                                      "test-yaspgrid-yaspfactory-3d"
-                                      "test-yaspgrid-yaspfactory-3d-mpi-2"
-                                      "globalindexsettest"
-                                      "persistentcontainertest"
-                                      "structuredgridfactorytest"
-                                      "tensorgridfactorytest"
-                                      "vertexordertest")
-                                     "|")
-                                    ")'"))
-             #t)))))
+             (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("dune-common" ,dune-common)
        ("dune-geometry" ,dune-geometry)
        ("gmp" ,gmp)
        ("metis" ,metis)
        ("openblas" ,openblas)
-       ("openmpi" ,openmpi)
        ("python" ,python)))
+    (propagated-inputs
+     `(("dune-uggrid" ,dune-uggrid)))
     (native-inputs
      `(("gfortran" ,gfortran)
        ("pkg-config" ,pkg-config)))
@@ -4698,7 +4911,7 @@ This package contains the basic DUNE grid classes.")
 (define-public dune-istl
   (package
     (name "dune-istl")
-    (version "2.6.0")
+    (version "2.7.0")
     (source
      (origin
        (method url-fetch)
@@ -4706,37 +4919,32 @@ This package contains the basic DUNE grid classes.")
                            version "/dune-istl-" version ".tar.gz"))
        (sha256
         (base32
-         "0l2gyrvys5w6wsmk0ckbb7295s80b7yk7qrl7x66akv2jv1nzq2w"))))
+         "0gl3wgz5rs6sb4m83440ny45sbx7z7lnbi3gx6r9nm3rvy5j33f9"))
+       (patches (search-patches "dune-istl-2.7-fix-non-mpi-tests.patch"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         ;; XXX: istl/test/matrixtest.cc includes <fenv.h> and fails to find
+         ;; the stdlib types when the gfortran header is used.  Remove gfortran
+         ;; from CPLUS_INCLUDE_PATH as a workaround.
+         (add-after 'set-paths 'hide-gfortran
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gfortran (assoc-ref inputs "gfortran")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (delete (string-append gfortran "/include/c++")
+                                (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
+                        ":"))
+               #t)))
          (add-after 'build 'build-tests
            (lambda* (#:key make-flags #:allow-other-keys)
-             (apply invoke "make" "build_tests" make-flags)))
-         ;; These tests fail because they require a fully functional MPI
-         ;; environment.
-         (add-after 'unpack 'disable-failing-tests
-           (lambda _
-             (setenv "ARGS"
-                     (string-append "--exclude-regex '("
-                                    (string-join
-                                     (list
-                                      "galerkintest"
-                                     "hierarchytest"
-                                     "pamgtest"
-                                     "pamg_comm_repart_test"
-                                     "matrixredisttest"
-                                     "vectorcommtest"
-                                     "matrixmarkettest")
-                                     "|")
-                                    ")'"))
-             #t)))))
+             (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("dune-common" ,dune-common)
-       ("openmpi" ,openmpi)
        ;; Optional
        ("metis" ,metis)
+       ("suitesparse" ,suitesparse)
        ("superlu" ,superlu)
        ("openblas" ,openblas)
        ("gmp" ,gmp)
@@ -4762,7 +4970,7 @@ aggregation-based algebraic multigrid.")
 (define-public dune-localfunctions
   (package
     (name "dune-localfunctions")
-    (version "2.6.0")
+    (version "2.7.0")
     (source
      (origin
        (method url-fetch)
@@ -4770,18 +4978,29 @@ aggregation-based algebraic multigrid.")
                            version "/dune-localfunctions-" version ".tar.gz"))
        (sha256
         (base32
-         "19c6zjinwwpy8jh4v4prhphyd438rapd4x80fj93apmwgw04nrhl"))))
+         "1yih59h6vngii696bx1c2vil02lriij4kz0nc583mjn9kiaqxfqd"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         ;; XXX: localfunctions/test/lagrangeshapefunctiontest.cc includes <fenv.h>
+         ;; and fails to find the stdlib types when the gfortran header is used.
+         ;; Hide gfortran from CPLUS_INCLUDE_PATH to ensure we get the GCC header.
+         (add-after 'set-paths 'hide-gfortran
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gfortran (assoc-ref inputs "gfortran")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (delete (string-append gfortran "/include/c++")
+                                (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
+                        ":"))
+               #t)))
          (add-after 'build 'build-tests
            (lambda* (#:key make-flags #:allow-other-keys)
              (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("dune-common" ,dune-common)
        ("dune-geometry" ,dune-geometry)
-       ("openmpi" ,openmpi)
        ;; Optional
        ("metis" ,metis)
        ("superlu" ,superlu)
@@ -4806,20 +5025,20 @@ assemble global function spaces on finite-element grids.")
 (define-public dune-alugrid
   (package
     (name "dune-alugrid")
-    (version "2.6.0")
+    (version "2.7.0-git-81d35682")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://dune-project.org/download/"
-                           version "/dune-alugrid-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.dune-project.org/extensions/dune-alugrid.git")
+             (commit "81d356827c84454b971937db02c02b90bbcd7fe5")))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "1l9adgyjpra8mvwm445s0lpjshnb63jag85fb2hisbjn6bm320yj"))))
+         "0z54lwfp53prcrs94k8gwh047l9z642jll3l56xlyfr69z0b2zz1"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f ; 7 of 8 tests fail because they need a full MPI
-                   ; environment
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-include
            (lambda _
@@ -4836,7 +5055,6 @@ assemble global function spaces on finite-element grids.")
      `(("dune-common" ,dune-common)
        ("dune-geometry" ,dune-geometry)
        ("dune-grid" ,dune-grid)
-       ("openmpi" ,openmpi)
        ;; Optional
        ("metis" ,metis)
        ("openblas" ,openblas)
@@ -4854,10 +5072,50 @@ implementation of the DUNE grid interface supporting either simplices or
 cubes.")
     (license license:gpl2+)))
 
+(define-public dune-subgrid
+  (package
+    (name "dune-subgrid")
+    (version "2.7.0-git-2103a363")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+         (url "https://git.imp.fu-berlin.de/agnumpde/dune-subgrid")
+         (commit "2103a363f32e8d7b60e66eee7ddecf969f6cf762")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+          "1wsjlypd3835c3arqjkw836cxx5q67zy447wa65q634lf6f6v9ia"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-tests
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke "make" "build_tests" make-flags))))))
+    (inputs
+     `(("dune-common" ,dune-common)
+       ("dune-geometry" ,dune-geometry)
+       ("dune-grid" ,dune-grid)
+       ;; Optional
+       ("metis" ,metis)
+       ("openblas" ,openblas)
+       ("gmp" ,gmp)))
+    (native-inputs
+     `(("gfortran" ,gfortran)
+       ("pkg-config" ,pkg-config)))
+    (home-page "http://numerik.mi.fu-berlin.de/dune-subgrid/index.php")
+    (synopsis "Distributed and Unified Numerics Environment")
+    (description "The dune-subgrid module marks elements of
+another hierarchical dune grid.  The set of marked elements can then be
+accessed as a hierarchical dune grid in its own right.  Dune-Subgrid
+provides the full grid interface including adaptive mesh refinement.")
+    (license license:gpl2+)))
+
 (define-public dune-typetree
   (package
     (name "dune-typetree")
-    (version "2.6.0")
+    (version "2.7.0")
     (source
      (origin
        (method git-fetch)
@@ -4867,7 +5125,7 @@ cubes.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "0mnv6w2f22lz3j4bdpdjq55vjm8xxfx9v4vvhg9bd36xpsbjpjp9"))))
+         "1rhv25yg0q1hw50c8wlfqhgwrjl4mh62zq9v14ilwgzbfgxmpiy7"))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
@@ -4877,7 +5135,6 @@ cubes.")
              (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("dune-common" ,dune-common)
-       ("openmpi" ,openmpi)
        ;; Optional
        ("openblas" ,openblas)
        ("python" ,python)
@@ -4897,7 +5154,7 @@ operating on statically typed trees of objects.")
 (define-public dune-functions
   (package
     (name "dune-functions")
-    (version "2.6.0")
+    (version "2.7.0")
     (source
      (origin
        (method git-fetch)
@@ -4907,9 +5164,20 @@ operating on statically typed trees of objects.")
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1an8gb477n8j0kzpbrv7nr1snh8pxip0gsxq6w63jc83gg3dj200"))))
+         "1na4gcih0kin37ksj2xj07ds04v7zx53pjdhm1hzy55jjfqdjk8h"))))
     (build-system cmake-build-system)
-    (arguments `(#:tests? #f)) ; FIXME: tests require dune-uugrid
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (setenv "ARGS"
+                     ;; unable to load GMSH file in this test
+                     "--exclude-regex gridviewfunctionspacebasistest")
+            #t))
+         (add-after 'build 'build-tests
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("dune-common" ,dune-common)
        ("dune-istl" ,dune-istl)
@@ -4917,7 +5185,6 @@ operating on statically typed trees of objects.")
        ("dune-grid" ,dune-grid)
        ("dune-geometry" ,dune-geometry)
        ("dune-typetree" ,dune-typetree)
-       ("openmpi" ,openmpi)
        ("openblas" ,openblas)
        ("metis" ,metis)
        ("python" ,python)
@@ -4937,17 +5204,17 @@ implemented as callable objects, and bases of finite element spaces.")
 (define-public dune-pdelab
   (package
     (name "dune-pdelab")
-    (version "2.6.0-rc1")
+    (version "2.7.0-git-476fe437")
     (source
      (origin
        (method git-fetch)
        (uri (git-reference
              (url "https://gitlab.dune-project.org/pdelab/dune-pdelab")
-             (commit (string-append "v" version))))
+             (commit "476fe43763fa6f459c5e4658e2a2b4b5582db834")))
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "07g0s9448z65vjrq88g5rv3340iifil85k170n8kbqchsvi4ny5v"))))
+         "0cs36piqzn6rq0j2ih3ab3q3q9yg199wk72k5qi86pkzh7i7fdn1"))))
     (build-system cmake-build-system)
     (arguments '(#:tests? #f)) ; XXX: the tests cannot be compiled
     (inputs
@@ -4958,7 +5225,6 @@ implemented as callable objects, and bases of finite element spaces.")
        ("dune-grid" ,dune-grid)
        ("dune-typetree" ,dune-typetree)
        ("dune-functions" ,dune-functions)
-       ("openmpi" ,openmpi)
        ;; Optional
        ("openblas" ,openblas)
        ("eigen" ,eigen)
@@ -4976,6 +5242,59 @@ built on top of DUNE, the Distributed and Unified Numerics Environment.")
     ;; Either GPL version 2 with "runtime exception" or LGPLv3+.
     (license (list license:lgpl3+ license:gpl2))))
 
+(define add-openmpi-to-dune-package
+  (let ((dune-package?
+          (lambda (p) (string-prefix? "dune-" (package-name p)))))
+    (package-mapping
+      (lambda (p)
+        (if (dune-package? p)
+            (package (inherit p)
+              (name (string-append (package-name p) "-openmpi"))
+              (inputs `(,@(package-inputs p)
+                        ("openmpi" ,openmpi)))
+              (arguments
+               (substitute-keyword-arguments (package-arguments p)
+                 ((#:phases phases '%standard-phases)
+                  `(modify-phases ,phases
+                     (add-before 'check 'mpi-setup
+                       ,%openmpi-setup)))))
+              (synopsis (string-append (package-synopsis p) " (with MPI support)")))
+            p))
+      (negate dune-package?))))
+
+(define-public dune-common-openmpi
+  (add-openmpi-to-dune-package dune-common))
+
+(define-public dune-geometry-openmpi
+  (add-openmpi-to-dune-package dune-geometry))
+
+(define-public dune-istl-openmpi
+  (add-openmpi-to-dune-package dune-istl))
+
+(define-public dune-typetree-openmpi
+  (add-openmpi-to-dune-package dune-typetree))
+
+(define-public dune-uggrid-openmpi
+  (add-openmpi-to-dune-package dune-uggrid))
+
+(define-public dune-grid-openmpi
+  (add-openmpi-to-dune-package dune-grid))
+
+(define-public dune-alugrid-openmpi
+  (add-openmpi-to-dune-package dune-alugrid))
+
+(define-public dune-subgrid-openmpi
+  (add-openmpi-to-dune-package dune-subgrid))
+
+(define-public dune-localfunctions-openmpi
+  (add-openmpi-to-dune-package dune-localfunctions))
+
+(define-public dune-functions-openmpi
+  (add-openmpi-to-dune-package dune-functions))
+
+(define-public dune-pdelab-openmpi
+  (add-openmpi-to-dune-package dune-pdelab))
+
 (define-public mlucas
   (package
     (name "mlucas")
@@ -5163,7 +5482,7 @@ syntax-highlighted scrollable display and is designed to be fully used via
 keyboard.  Some distinctive features are auto-completion of functions and
 variables, a formula book, and quick insertion of constants from various
 fields of knowledge.")
-    (home-page "http://speedcrunch.org/")
+    (home-page "https://speedcrunch.org/")
     (license license:gpl2+)))
 
 (define-public minisat
@@ -5205,3 +5524,114 @@ researchers and developers alike to get started on SAT.")
       (home-page
        "http://minisat.se/MiniSat.html")
       (license license:expat))))
+
+(define-public libqalculate
+  (package
+    (name "libqalculate")
+    (version "3.8.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Qalculate/libqalculate/")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1vbaza9c7159xf2ym90l0xkyj2mp6c3hbghhsqn29yvz08fda9df"))
+       (patches
+        (search-patches "libqalculate-3.8.0-libcurl-ssl-fix.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("gettext" ,gettext-minimal)
+       ("intltool" ,intltool)
+       ("automake" ,automake)
+       ("autoconf" ,autoconf)
+       ("libtool" ,libtool)
+       ("doxygen" ,doxygen)
+       ("file" ,file)))
+    (inputs
+     `(("gmp" ,gmp)
+       ("mpfr" ,mpfr)
+       ("libxml2" ,libxml2)
+       ("curl" ,curl)
+       ("icu4c" ,icu4c)
+       ("gnuplot" ,gnuplot)
+       ("readline" ,readline)
+       ("libiconv" ,libiconv)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'bootstrap 'setenv
+           ;; Prevent the autogen.sh script to carry out the configure
+           ;; script, which has not yet been patched to replace /bin/sh.
+           (lambda _
+             (setenv "NOCONFIGURE" "TRUE")
+             #t)))))
+    (home-page "https://qalculate.github.io/")
+    (synopsis "Multi-purpose cli desktop calculator and library")
+    (description
+     "Libqalculate is a multi-purpose cli desktop calculator and library.
+It provides basic and advanced functionality.  Features include customizable
+functions, unit calculations, and conversions, physical constants, symbolic
+calculations (including integrals and equations), arbitrary precision,
+uncertainty propagation, interval arithmetic, plotting and a user-friendly
+cli.")
+    (license license:gpl2+)))
+
+(define-public qalculate-gtk
+  (package
+    (name "qalculate-gtk")
+    (version "3.8.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Qalculate/qalculate-gtk/")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0nsg6dzg5r7rzqr671nvrf1c50rjwpz7bxv5f20i4s7agizgv840"))))
+    (build-system glib-or-gtk-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("intltool" ,intltool)
+       ("automake" ,automake)
+       ("autoconf" ,autoconf)
+       ("libtool" ,libtool)
+       ("file" ,file)))
+    (inputs
+     `(("gmp" ,gmp)
+       ("mpfr" ,mpfr)
+       ("libqalculate" ,libqalculate)
+       ("libxml2" ,libxml2)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'bootstrap 'setenv
+           ;; Prevent the autogen.sh script to carry out the configure
+           ;; script, which has not yet been patched to replace /bin/sh.
+           (lambda _
+             (setenv "NOCONFIGURE" "TRUE")
+             #t))
+         (add-before 'check 'add-pot-file
+           ;; the file contains translations and are currently not in use
+           ;; left out on purpose so add it to POTFILES.skip
+           (lambda _
+             (with-output-to-file "po/POTFILES.skip"
+               (lambda _
+                 (format #t "data/shortcuts.ui~%")
+                 #t))
+             #t)))))
+    (home-page "https://qalculate.github.io/")
+    (synopsis "Multi-purpose graphical desktop calculator")
+    (description
+     "Qalculate-gtk is the GTK frontend for libqalculate.  It is a
+multi-purpose GUI desktop calculator.  It provides basic and advanced
+functionality.  Features include customizable functions, unit calculations,
+and conversions, physical constants, symbolic calculations (including
+integrals and equations), arbitrary precision, uncertainity propagation,
+interval arithmetic, plotting.")
+    (license license:gpl2+)))