Merge branch 'core-updates'
[jackhill/guix/guix.git] / gnu / packages / maths.scm
index ccb7a56..fe9d59b 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2014, 2015, 2016, 2019 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 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
 ;;; Copyright © 2014, 2016, 2017 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Eric Bavier <bavier@member.fsf.org>
@@ -7,7 +7,7 @@
 ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2014 Mathieu Lirzin <mathieu.lirzin@openmailbox.org>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
-;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
+;;; 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 © 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, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2017, 2018 Paul Garlick <pgarlick@tourbillion-technology.com>
+;;; Copyright © 2017, 2018, 2019 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2017 ng0 <ng0@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 © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Dave Love <me@fx@gnu.org>
 ;;; Copyright © 2017 ng0 <ng0@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 © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Dave Love <me@fx@gnu.org>
-;;; Copyright © 2018 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018, 2019 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
 ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com>
 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
 ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com>
 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
@@ -30,6 +30,8 @@
 ;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
 ;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
+;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages netpbm)
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages netpbm)
+  #:use-module (gnu packages onc-rpc)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages perl)
@@ -245,7 +248,7 @@ triangulations.")
 (define-public python-cvxopt
   (package
     (name "python-cvxopt")
 (define-public python-cvxopt
   (package
     (name "python-cvxopt")
-    (version "1.2.1")
+    (version "1.2.3")
     (source (origin
               (method git-fetch)
               (uri (git-reference
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -254,7 +257,7 @@ triangulations.")
               (file-name (git-file-name name version))
               (sha256
                (base32
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "05mnjil9palaa48xafdfh4f5pr4z7aqjr995rwl08qfyxs8y0crf"))))
+                "1kiy2m62xgs2d5id6dnnwy4vap85cd70p7pgkb9nh23qf9xnak7b"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -289,13 +292,13 @@ programming language.")
 (define-public units
   (package
    (name "units")
 (define-public units
   (package
    (name "units")
-   (version "2.18")
+   (version "2.19")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/units/units-" version
                                 ".tar.gz"))
             (sha256 (base32
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/units/units-" version
                                 ".tar.gz"))
             (sha256 (base32
-                     "0y26kj349i048y4z3xrk90bvciw2j6ds3rka7r7yn3183hirr5b4"))))
+                     "0mk562g7dnidjgfgvkxxpvlba66fh1ykmfd9ylzvcln1vxmi6qj2"))))
    (build-system gnu-build-system)
    (inputs
     `(("readline" ,readline)
    (build-system gnu-build-system)
    (inputs
     `(("readline" ,readline)
@@ -324,15 +327,16 @@ enough to be used effectively as a scientific calculator.")
 (define-public double-conversion
   (package
     (name "double-conversion")
 (define-public double-conversion
   (package
     (name "double-conversion")
-    (version "3.1.0")
+    (version "3.1.5")
     (home-page "https://github.com/google/double-conversion")
     (source (origin
               (method git-fetch)
     (home-page "https://github.com/google/double-conversion")
     (source (origin
               (method git-fetch)
-              (uri (git-reference (url home-page) (commit version)))
+              (uri (git-reference (url home-page)
+                                  (commit (string-append "v" version))))
               (file-name (git-file-name name version))
               (sha256
                (base32
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "123rb2p4snqagrybw66vnapchqdwn2rfpr1wcq0ya9gwbyl7xccx"))))
+                "0csy4pjw1p8rp6g5qxi2h0ychhhp1fldv7gb761627fs2mclw9gv"))))
     (build-system cmake-build-system)
     (arguments
      '(#:test-target "test"
     (build-system cmake-build-system)
     (arguments
      '(#:test-target "test"
@@ -611,14 +615,14 @@ singular value problems.")
 (define-public gnuplot
   (package
     (name "gnuplot")
 (define-public gnuplot
   (package
     (name "gnuplot")
-    (version "5.2.6")
+    (version "5.2.7")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
                                   version "/gnuplot-"
                                   version ".tar.gz"))
        (sha256
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
                                   version "/gnuplot-"
                                   version ".tar.gz"))
        (sha256
-        (base32 "1vllgap08nhvdmc03idmkdnk9cfl2bp81hps50q1pqrr640qzp9m"))))
+        (base32 "1vglp4la40f5dpj0zdj63zprrkyjgzy068p35bz5dqxjyczm1zlp"))))
     (build-system gnu-build-system)
     (inputs `(("readline" ,readline)
               ("cairo" ,cairo)
     (build-system gnu-build-system)
     (inputs `(("readline" ,readline)
               ("cairo" ,cairo)
@@ -672,17 +676,18 @@ computations.")
 (define-public hdf4
   (package
     (name "hdf4")
 (define-public hdf4
   (package
     (name "hdf4")
-    (version "4.2.13")
+    (version "4.2.14")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF"
                            version "/src/hdf-" version ".tar.bz2"))
        (sha256
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://support.hdfgroup.org/ftp/HDF/releases/HDF"
                            version "/src/hdf-" version ".tar.bz2"))
        (sha256
-        (base32 "1wz0586zh91pqb95wvr0pbh71a8rz358fdj6n2ksp85x2cis9lsm"))
+        (base32 "0n29klrrbwan9307np0d9hr128dlpc4nnlf57a140080ll3jmp8l"))
        (patches (search-patches "hdf4-architectures.patch"
                                 "hdf4-reproducibility.patch"
        (patches (search-patches "hdf4-architectures.patch"
                                 "hdf4-reproducibility.patch"
-                                "hdf4-shared-fortran.patch"))))
+                                "hdf4-shared-fortran.patch"
+                                "hdf4-tirpc.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("gfortran" ,gfortran)
     (build-system gnu-build-system)
     (native-inputs
      `(("gfortran" ,gfortran)
@@ -690,10 +695,14 @@ computations.")
        ("flex" ,flex)))
     (inputs
      `(("zlib" ,zlib)
        ("flex" ,flex)))
     (inputs
      `(("zlib" ,zlib)
-       ("libjpeg" ,libjpeg)))
+       ("libjpeg" ,libjpeg)
+       ("libtirpc" ,libtirpc)))
     (arguments
      `(#:parallel-tests? #f
     (arguments
      `(#:parallel-tests? #f
-       #:configure-flags '("--enable-shared")
+       #:configure-flags (list "--enable-shared"
+                               (string-append "CPPFLAGS=-I"
+                                              (assoc-ref %build-inputs "libtirpc")
+                                              "/include/tirpc"))
        #:phases
        (modify-phases %standard-phases
          ;; This is inspired by two of Debian's patches.
        #:phases
        (modify-phases %standard-phases
          ;; This is inspired by two of Debian's patches.
@@ -773,14 +782,25 @@ incompatible with HDF5.")
     (inputs
      `(("zlib" ,zlib)))
     (native-inputs
     (inputs
      `(("zlib" ,zlib)))
     (native-inputs
-     `(("gfortran" ,gfortran)))
+     `(("gfortran" ,gfortran)
+       ("perl" ,perl)))                 ;part of the test machinery needs Perl
     (outputs '("out"       ; core library
                "fortran")) ; fortran interface
     (arguments
      `(;; Some of the users, notably Flann, need the C++ interface.
        #:configure-flags '("--enable-cxx"
                            "--enable-fortran"
     (outputs '("out"       ; core library
                "fortran")) ; fortran interface
     (arguments
      `(;; Some of the users, notably Flann, need the C++ interface.
        #:configure-flags '("--enable-cxx"
                            "--enable-fortran"
-                           "--enable-fortran2003")
+                           "--enable-fortran2003"
+
+                           ;; Build a thread-safe library.  Unfortunately,
+                           ;; 'configure' invites you to either turn off C++,
+                           ;; Fortran, and the high-level interface (HL), or
+                           ;; to pass '--enable-unsupported'.  Debian
+                           ;; packagers chose to pass '--enable-unsupported'
+                           ;; and we follow their lead here.
+                           "--enable-threadsafe"
+                           "--with-pthread"
+                           "--enable-unsupported")
        ;; Use -fPIC to allow the R bindings to link with the static libraries
        #:make-flags (list "CFLAGS=-fPIC"
                           "CXXFLAGS=-fPIC")
        ;; Use -fPIC to allow the R bindings to link with the static libraries
        #:make-flags (list "CFLAGS=-fPIC"
                           "CXXFLAGS=-fPIC")
@@ -1031,8 +1051,11 @@ implemented in C.")
      `(("gfortran" ,gfortran)))
     (inputs
      `(("hdf4" ,hdf4-alt) ; assume most HDF-EOS2 users won't use the HDF4 netCDF API
      `(("gfortran" ,gfortran)))
     (inputs
      `(("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)
        ("zlib" ,zlib)
        ("libjpeg" ,libjpeg)
+       ("libtirpc" ,libtirpc)
+
        ("gctp" ,gctp)))
     (arguments
      `( #:configure-flags '("--enable-install-include" "--enable-shared"
        ("gctp" ,gctp)))
     (arguments
      `( #:configure-flags '("--enable-install-include" "--enable-shared"
@@ -1092,7 +1115,9 @@ Swath).")
     (arguments
      (substitute-keyword-arguments (package-arguments hdf5)
        ((#:configure-flags flags)
     (arguments
      (substitute-keyword-arguments (package-arguments hdf5)
        ((#:configure-flags flags)
-        ``("--enable-parallel" ,@(delete "--enable-cxx" ,flags)))
+        ``("--enable-parallel"
+           ,@(delete "--enable-cxx"
+                     (delete "--enable-threadsafe" ,flags))))
        ((#:phases phases)
         `(modify-phases ,phases
            (add-after 'build 'mpi-setup
        ((#:phases phases)
         `(modify-phases ,phases
            (add-after 'build 'mpi-setup
@@ -1101,7 +1126,7 @@ Swath).")
              (lambda _
                ;; OpenMPI's mpirun will exit with non-zero status if it
                ;; detects an "abnormal termination", i.e. any process not
              (lambda _
                ;; OpenMPI's mpirun will exit with non-zero status if it
                ;; detects an "abnormal termination", i.e. any process not
-               ;; calling MPI_Finalize().  Since the test is explicitely
+               ;; calling MPI_Finalize().  Since the test is explicitly
                ;; avoiding MPI_Finalize so as not to have at_exit and thus
                ;; H5C_flush_cache from being called, mpirun will always
                ;; complain, so turn this test off.
                ;; avoiding MPI_Finalize so as not to have at_exit and thus
                ;; H5C_flush_cache from being called, mpirun will always
                ;; complain, so turn this test off.
@@ -1448,30 +1473,30 @@ can solve two kinds of problems:
         "11wwxpy2q1bhxs2v41bqn05i2sb0905cj1xil6mg8l4k2kka4cq6"))))
     (build-system gnu-build-system)
     (inputs
         "11wwxpy2q1bhxs2v41bqn05i2sb0905cj1xil6mg8l4k2kka4cq6"))))
     (build-system gnu-build-system)
     (inputs
-     `(("lapack" ,lapack)
-       ("qhull" ,qhull)
-       ("readline" ,readline)
-       ("gl2ps" ,gl2ps)
-       ("glpk" ,glpk)
+     `(("alsa-lib" ,alsa-lib)
+       ("arpack" ,arpack-ng)
+       ("curl" ,curl)
        ("fftw" ,fftw)
        ("fftwf" ,fftwf)
        ("fftw" ,fftw)
        ("fftwf" ,fftwf)
-       ("arpack" ,arpack-ng)
-       ("pcre" ,pcre)
        ("fltk" ,fltk)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
        ("fltk" ,fltk)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
-       ("hdf5" ,hdf5)
-       ("libxft" ,libxft)
-       ("mesa" ,mesa)
+       ("gl2ps" ,gl2ps)
+       ("glpk" ,glpk)
        ("glu" ,glu)
        ("glu" ,glu)
-       ("zlib" ,zlib)
-       ("curl" ,curl)
-       ("texinfo" ,texinfo)
        ("graphicsmagick" ,graphicsmagick)
        ("graphicsmagick" ,graphicsmagick)
-       ("suitesparse" ,suitesparse)
+       ("hdf5" ,hdf5)
+       ("lapack" ,lapack)
        ("libsndfile" ,libsndfile)
        ("libsndfile" ,libsndfile)
+       ("libxft" ,libxft)
+       ("mesa" ,mesa)
+       ("pcre" ,pcre)
        ("portaudio" ,portaudio)
        ("portaudio" ,portaudio)
-       ("alsa-lib" ,alsa-lib)))
+       ("qhull" ,qhull)
+       ("readline" ,readline)
+       ("suitesparse" ,suitesparse)
+       ("texinfo" ,texinfo)
+       ("zlib" ,zlib)))
     (native-inputs
      `(("lzip" ,lzip)
        ("gfortran" ,gfortran)
     (native-inputs
      `(("lzip" ,lzip)
        ("gfortran" ,gfortran)
@@ -1528,7 +1553,7 @@ script files.")
        ,@(package-inputs octave-cli)))
     (native-inputs
      `(("qttools" , qttools) ;for lrelease
        ,@(package-inputs octave-cli)))
     (native-inputs
      `(("qttools" , qttools) ;for lrelease
-       ("texlive" ,texlive) ;for texi2dvi
+       ("texlive" ,(texlive-union (list texlive-epsf))) ; for texi2dvi
        ,@(package-native-inputs octave-cli)))
     (arguments
      (substitute-keyword-arguments (package-arguments octave-cli)
        ,@(package-native-inputs octave-cli)))
     (arguments
      (substitute-keyword-arguments (package-arguments octave-cli)
@@ -1603,17 +1628,114 @@ Open CASCADE library.")
                    license:expat; file src/OpenGl/OpenGl_glext.h
                    license:bsd-3)))); test framework gtest
 
                    license:expat; file src/OpenGl/OpenGl_glext.h
                    license:bsd-3)))); test framework gtest
 
+(define-public opencascade-occt
+  (package
+    (name "opencascade-occt")
+    (version "7.3.0p3")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://git.dev.opencascade.org/repos/occt.git")
+              (commit
+               (string-append "V"
+                              (string-map (lambda (x) (if (eq? x #\.) #\_ x))
+                                          version)))))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0bdywwxb6mk0ykbiajlvsb37295akqjp0a60y672qjfa67k0ljv4"))
+        (modules '((guix build utils)))
+        (snippet
+         '(begin
+            ;; Remove files specific to non-free operating systems.
+            (delete-file-recursively "samples/ios")
+            (delete-file-recursively "samples/mfc")
+            (delete-file-recursively "samples/qt/FuncDemo")
+            (delete-file "genconf.bat")
+            (delete-file "gendoc.bat")
+            (delete-file "genproj.bat")
+            (delete-file "upgrade.bat")
+            ;; Remove references to deleted files.
+            (substitute* "dox/FILES_HTML.txt"
+              ((".*standard.*") "" )
+              ((".*UIKitSample.*") ""))
+            #t))))
+    (build-system cmake-build-system)
+    (arguments
+     '(;; There is no test target for make.  OCCT provides an
+       ;; 'Automated Testing System', which may be accessed after
+       ;; installation via the draw.sh script.  draw.sh is located in
+       ;; the bin directory. For details see:
+       ;; https://www.opencascade.com/doc/occt-7.3.0/overview/html/\
+       ;; occt_dev_guides__tests.html
+       #:tests? #f
+       ;; Configure without freeimage: attempting to link against the
+       ;; freeimage version 3.17 library leads to 'undefined
+       ;; reference' errors.
+       #:configure-flags
+        (list "-DUSE_FREEIMAGE:BOOL=OFF"
+              "-DUSE_TBB:BOOL=ON"
+              "-DUSE_VTK:BOOL=OFF"
+              "-DBUILD_DOC_Overview:BOOL=OFF"
+              "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
+              "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
+              "-UCMAKE_INSTALL_LIBDIR")))
+    (inputs
+     `(("doxygen" ,doxygen)
+       ;("freeimage" ,freeimage)
+       ("freetype" ,freetype)
+       ("glu" ,glu)
+       ("libxext" ,libxext)
+       ("libxi" ,libxi)
+       ("libxmu" ,libxmu)
+       ("mesa" ,mesa)
+       ("tbb" ,tbb)
+       ("tcl" ,tcl)
+       ("tk" ,tk)))
+    ;; TODO: build Overview documentation and add 'doc' output.
+    (home-page "https://www.opencascade.com")
+    (synopsis "Libraries for 3D modeling and numerical simulation")
+    (description
+     "Open CASCADE is a set of libraries for the development of applications
+dealing with 3D CAD data or requiring industrial 3D capabilities.  It includes
+C++ class libraries providing services for 3D surface and solid modeling, CAD
+data exchange, and visualization.  It is used for development of specialized
+software dealing with 3D models in design (CAD), manufacturing (CAM),
+numerical simulation (CAE), measurement equipment (CMM), and quality
+control (CAQ) domains.
+
+This is the certified version of the Open Cascade Technology (OCCT) library.")
+    (license (list ;; OCCT library:
+                   license:lgpl2.1; with an exception for the use of header
+                                  ; files, see OCCT_LGPL_EXCEPTION.txt.
+                   ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and
+                   ;; src/OpenGl/OpenGl_HaltonSampler.hxx:
+                   license:expat
+                   ;; Files src/ExprIntrp/ExprIntrp.tab.* and
+                   ;; src/StepFile/step.tab.*:
+                   license:gpl3+  ; with Bison 2.2 exception.
+                   ;; File src/NCollection/NCollection_UtfIterator.lxx:
+                   (license:non-copyleft
+                    "https://www.unicode.org/license.html")
+                   ;; File src/NCollection/NCollection_StdAllocator.hxx:
+                   license:public-domain))))
+
 (define-public gmsh
   (package
     (name "gmsh")
     (version "2.16.0")
     (source
      (origin
 (define-public gmsh
   (package
     (name "gmsh")
     (version "2.16.0")
     (source
      (origin
-      (method url-fetch)
-      (uri (string-append "http://gmsh.info/src/gmsh-"
-                          version "-source.tgz"))
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://gitlab.onelab.info/gmsh/gmsh.git")
+            (commit
+             (string-append "gmsh_"
+                            (string-map (lambda (x) (if (eq? x #\.) #\_ x))
+                                        version)))))
+      (file-name (git-file-name name version))
       (sha256
       (sha256
-       (base32 "1slf0bfkwrcgn6296wb4qhbk4ahz6i4wfb10hnim08x05vrylag8"))
+       (base32 "08rq4jajwmlpivnm9yifz2jhaivnz065lnk0h2zv773nwl9wf162"))
       (modules '((guix build utils)))
       (snippet
        ;; Remove non-free METIS code
       (modules '((guix build utils)))
       (snippet
        ;; Remove non-free METIS code
@@ -1639,7 +1761,7 @@ Open CASCADE library.")
      `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF"
                            "-DENABLE_BUILD_SHARED:BOOL=ON"
                            "-DENABLE_BUILD_DYNAMIC:BOOL=ON")))
      `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF"
                            "-DENABLE_BUILD_SHARED:BOOL=ON"
                            "-DENABLE_BUILD_DYNAMIC:BOOL=ON")))
-    (home-page "http://www.geuz.org/gmsh/")
+    (home-page "http://gmsh.info/")
     (synopsis "3D finite element grid generator")
     (description "Gmsh is a 3D finite element grid generator with a built-in
 CAD engine and post-processor.  Its design goal is to provide a fast, light
     (synopsis "3D finite element grid generator")
     (description "Gmsh is a 3D finite element grid generator with a built-in
 CAD engine and post-processor.  Its design goal is to provide a fast, light
@@ -1653,18 +1775,20 @@ ASCII text files using Gmsh's own scripting language.")
 (define-public maxflow
   (package
     (name "maxflow")
 (define-public maxflow
   (package
     (name "maxflow")
-    (version "3.04")
+    ;; Versioning is ambiguous: the git tag matching this commit is ‘3.0.5’,
+    ;; which matches CMakeLists.txt, but README.md and CHANGES say ‘3.04’.
+    (version "3.0.5")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url "https://github.com/gerddie/maxflow.git")
     (source (origin
               (method git-fetch)
               (uri (git-reference
                     (url "https://github.com/gerddie/maxflow.git")
-                    (commit "42401fa54823d16b9da47716f04e5d9ef1605875")))
-              (file-name (string-append name "-" version "-checkout"))
+                    (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
                 "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb"))))
     (build-system cmake-build-system)
               (sha256
                (base32
                 "0rll38whw55h0vcjrrwdnh9ascvxby0ph7n1l0d12z17cg215kkb"))))
     (build-system cmake-build-system)
-    (home-page "http://pub.ist.ac.at/~vnk/software.html")
+    (home-page "https://pub.ist.ac.at/~vnk/software.html")
     (synopsis "Library implementing Maxflow algorithm")
     (description "An implementation of the maxflow algorithm described in
 @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for
     (synopsis "Library implementing Maxflow algorithm")
     (description "An implementation of the maxflow algorithm described in
 @cite{An Experimental Comparison of Min-Cut/Max-Flow Algorithms for
@@ -1677,7 +1801,7 @@ September 2004}")
 (define-public petsc
   (package
     (name "petsc")
 (define-public petsc
   (package
     (name "petsc")
-    (version "3.10.4")
+    (version "3.11.2")
     (source
      (origin
       (method url-fetch)
     (source
      (origin
       (method url-fetch)
@@ -1685,7 +1809,7 @@ September 2004}")
       (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
                           "petsc-lite-" version ".tar.gz"))
       (sha256
       (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
                           "petsc-lite-" version ".tar.gz"))
       (sha256
-       (base32 "0fk16944zh3473ra198kdkxdn08rq7b6ap838hxy1mh1i0hb488r"))))
+       (base32 "1645nwwcp9bcnfnxikk480mhbbacdvhsay2c401818hk97dqj5nx"))))
     (outputs '("out"                    ; libraries and headers
                "examples"))             ; ~30MiB of examples
     (build-system gnu-build-system)
     (outputs '("out"                    ; libraries and headers
                "examples"))             ; ~30MiB of examples
     (build-system gnu-build-system)
@@ -1830,7 +1954,11 @@ scientific applications modeled by partial differential equations.")
         ``("--with-mpiexec=mpirun"
            ,(string-append "--with-mpi-dir="
                            (assoc-ref %build-inputs "openmpi"))
         ``("--with-mpiexec=mpirun"
            ,(string-append "--with-mpi-dir="
                            (assoc-ref %build-inputs "openmpi"))
-           ,@(delete "--with-mpi=0" ,cf)))))
+           ,@(delete "--with-mpi=0" ,cf)))
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-before 'configure 'mpi-setup
+             ,%openmpi-setup)))))
     (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
 
 (define-public python-petsc4py
     (synopsis "Library to solve PDEs (with complex scalars and MPI support)")))
 
 (define-public python-petsc4py
@@ -1895,7 +2023,7 @@ savings are consistently > 5x.")
 (define-public slepc
   (package
     (name "slepc")
 (define-public slepc
   (package
     (name "slepc")
-    (version "3.10.1")
+    (version "3.11.1")
     (source
      (origin
        (method url-fetch)
     (source
      (origin
        (method url-fetch)
@@ -1903,10 +2031,11 @@ savings are consistently > 5x.")
                            version ".tar.gz"))
        (sha256
         (base32
                            version ".tar.gz"))
        (sha256
         (base32
-         "188j1a133q91h8pivpnzwcf78kz8dvz2nzf6ndnjygdbqb48fizn"))))
+         "1yq84q9wannc8xwapxpay4ypdd675picwi395hhsdvng9q6hf5j8"))))
     (build-system gnu-build-system)
     (native-inputs
     (build-system gnu-build-system)
     (native-inputs
-     `(("python" ,python-2)))
+     `(("python" ,python-2)
+       ("petsc:examples" ,petsc "examples"))) ;for gmakegen.py script
     (inputs
      `(("arpack" ,arpack-ng)
        ("gfortran" ,gfortran)))
     (inputs
      `(("arpack" ,arpack-ng)
        ("gfortran" ,gfortran)))
@@ -1918,7 +2047,10 @@ savings are consistently > 5x.")
        `(,(string-append "--with-arpack-dir="
                          (assoc-ref %build-inputs "arpack") "/lib"))
        #:make-flags                     ;honor (parallel-job-count)
        `(,(string-append "--with-arpack-dir="
                          (assoc-ref %build-inputs "arpack") "/lib"))
        #:make-flags                     ;honor (parallel-job-count)
-       `(,(format #f "MAKE_NP=~a" (parallel-job-count)))
+       `(,(format #f "MAKE_NP=~a" (parallel-job-count))
+         ,(string-append "PETSCCONFIGDIR="
+                         (assoc-ref %build-inputs "petsc:examples")
+                         "/share/petsc/examples/config"))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
@@ -2167,7 +2299,7 @@ IORDERINGSC  = $(IPORD) $(IMETIS) $(ISCOTCH)"
     (synopsis "Multifrontal sparse direct solver")
     (description
      "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a
     (synopsis "Multifrontal sparse direct solver")
     (description
      "MUMPS (MUltifrontal Massively Parallel sparse direct Solver) solves a
-sparse system of linear equations A x = b using Guassian elimination.")
+sparse system of linear equations A x = b using Gaussian elimination.")
     (license license:cecill-c)))
 
 (define-public mumps-metis
     (license license:cecill-c)))
 
 (define-public mumps-metis
@@ -2205,14 +2337,14 @@ sparse system of linear equations A x = b using Guassian elimination.")
 (define-public r-quadprog
   (package
     (name "r-quadprog")
 (define-public r-quadprog
   (package
     (name "r-quadprog")
-    (version "1.5-5")
+    (version "1.5-7")
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "quadprog" version))
        (sha256
         (base32
     (source
      (origin
        (method url-fetch)
        (uri (cran-uri "quadprog" version))
        (sha256
         (base32
-         "0jg3r6abmhp8r9vkbhpx9ldjfw6vyl1m4c5vwlyjhk1mi03656fr"))))
+         "0vg7i9p241bwvfdspjbydjrsvgipl6nsb8bjigp0hbbgvxbixx0s"))))
     (build-system r-build-system)
     (native-inputs
      `(("gfortran" ,gfortran)))
     (build-system r-build-system)
     (native-inputs
      `(("gfortran" ,gfortran)))
@@ -2737,7 +2869,7 @@ to BMP, JPEG or PNG image formats.")
 (define-public maxima
   (package
     (name "maxima")
 (define-public maxima
   (package
     (name "maxima")
-    (version "5.42.2")
+    (version "5.43.0")
     (source
      (origin
        (method url-fetch)
     (source
      (origin
        (method url-fetch)
@@ -2745,7 +2877,7 @@ to BMP, JPEG or PNG image formats.")
                            version "-source/" name "-" version ".tar.gz"))
        (sha256
         (base32
                            version "-source/" name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0kdncy6137sg3rradirxzj10mkcvafxd892zlclwhr9sa7b12zhn"))
+         "0xyahp4c6509haxh4n1swiqm3421gplkdisa0zypclh3252sbzfw"))
        (patches (search-patches "maxima-defsystem-mkdir.patch"))))
     (build-system gnu-build-system)
     (inputs
        (patches (search-patches "maxima-defsystem-mkdir.patch"))))
     (build-system gnu-build-system)
     (inputs
@@ -2779,11 +2911,18 @@ to BMP, JPEG or PNG image formats.")
              (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
                     (coreutils (assoc-ref inputs "coreutils"))
                     (dirname (string-append coreutils "/bin/dirname"))
              (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed"))
                     (coreutils (assoc-ref inputs "coreutils"))
                     (dirname (string-append coreutils "/bin/dirname"))
-                    (head (string-append coreutils "/bin/head")))
+                    (head (string-append coreutils "/bin/head"))
+                    (perl (string-append (assoc-ref inputs "perl") "/bin/perl"))
+                    (python (string-append (assoc-ref inputs "python")
+                                           "/bin/python3")))
                (substitute* "src/maxima.in"
                  (("sed ") (string-append sed " "))
                  (("dirname") dirname)
                  (("head") head))
                (substitute* "src/maxima.in"
                  (("sed ") (string-append sed " "))
                  (("dirname") dirname)
                  (("head") head))
+               (substitute* "doc/info/Makefile.in"
+                 (("/usr/bin/env perl") perl))
+               (substitute* "doc/info/build_html.sh.in"
+                 (("python") python))
                #t)))
          (add-before 'check 'pre-check
            (lambda _
                #t)))
          (add-before 'check 'pre-check
            (lambda _
@@ -2795,12 +2934,12 @@ to BMP, JPEG or PNG image formats.")
              ;; of Debian's Maxima package.
              ;; If Maxima can successfully run this, the binary to be installed
              ;; should be fine.
              ;; of Debian's Maxima package.
              ;; If Maxima can successfully run this, the binary to be installed
              ;; should be fine.
-             (zero?
-              (system
-               (string-append "./maxima-local "
-                              "--lisp=gcl "
-                              "--batch-string=\"run_testsuite();\" "
-                              "| grep -q \"No unexpected errors found\"")))))
+             (invoke "sh" "-c"
+                     (string-append
+                      "./maxima-local "
+                      "--lisp=gcl "
+                      "--batch-string=\"run_testsuite();\" "
+                      "| grep -q \"No unexpected errors found\""))))
          ;; Make sure the doc and emacs files are found in the
          ;; standard location.  Also configure maxima to find gnuplot
          ;; without having it on the PATH.
          ;; Make sure the doc and emacs files are found in the
          ;; standard location.  Also configure maxima to find gnuplot
          ;; without having it on the PATH.
@@ -2814,9 +2953,6 @@ to BMP, JPEG or PNG image formats.")
                (with-directory-excursion out
                  (mkdir-p "share/emacs")
                  (mkdir-p "share/doc")
                (with-directory-excursion out
                  (mkdir-p "share/emacs")
                  (mkdir-p "share/doc")
-                 (symlink
-                  (string-append datadir "/emacs/")
-                  (string-append out "/share/emacs/site-lisp"))
                  (symlink
                   (string-append datadir "/doc/")
                   (string-append out "/share/doc/maxima"))
                  (symlink
                   (string-append datadir "/doc/")
                   (string-append out "/share/doc/maxima"))
@@ -2848,7 +2984,7 @@ point numbers.")
 (define-public wxmaxima
   (package
     (name "wxmaxima")
 (define-public wxmaxima
   (package
     (name "wxmaxima")
-    (version "19.03.1")
+    (version "19.09.0")
     (source
      (origin
        (method git-fetch)
     (source
      (origin
        (method git-fetch)
@@ -2857,8 +2993,7 @@ point numbers.")
              (commit (string-append "Version-" version))))
        (file-name (git-file-name name version))
        (sha256
              (commit (string-append "Version-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32
-         "1qkf4jg86xnn3wk3782ffmfz12axb92dkjagcz3ffzw2wi1rclml"))))
+        (base32 "195j6j8z0jd6xg3a63ywbrbsc6dany795m3fb95nbx1vq0bqqvvn"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("gettext" ,gettext-minimal)))
     (build-system cmake-build-system)
     (native-inputs
      `(("gettext" ,gettext-minimal)))
@@ -2950,13 +3085,13 @@ associated functions (eg. contiguous and non-contiguous submatrix views).")
       (version (string-append upstream-version "-" revision))
       (source
        (origin
       (version (string-append upstream-version "-" revision))
       (source
        (origin
-         (method url-fetch)
-         (uri (string-append "https://github.com/beltoforion/muparser/archive/v"
-                             upstream-version ".tar.gz"))
-         (file-name (string-append name "-" version ".tar.gz"))
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/beltoforion/muparser.git")
+               (commit (string-append "v" upstream-version))))
+         (file-name (git-file-name name version))
          (sha256
          (sha256
-          (base32
-           "0277qsi5l23jsck1vhn383bmvc2n9l4a1dl5r9bf7hvjv9ayyrh6"))))
+          (base32 "0f0g4995xngf1pp3zr4p6ai2f8v6f8bxwa0k8ayjjiv1l8h44m24"))))
       (build-system gnu-build-system)
       (arguments
        `(#:configure-flags '("--enable-samples=no")
       (build-system gnu-build-system)
       (arguments
        `(#:configure-flags '("--enable-samples=no")
@@ -2971,8 +3106,12 @@ parts of it.")
 
 (define-public openblas
   (package
 
 (define-public openblas
   (package
+    ;; TODO: Incorporate 'openblas/fixed-num-threads' changes on the next
+    ;; rebuild cycle.
+    (replacement openblas/fixed-num-threads)
+
     (name "openblas")
     (name "openblas")
-    (version "0.3.4")
+    (version "0.3.6")
     (source
      (origin
        (method url-fetch)
     (source
      (origin
        (method url-fetch)
@@ -2981,7 +3120,7 @@ parts of it.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "1s56lgilyyw86dzmj3jkci9zsg24n60wq4d0zri1hrxlxb6ihimj"))))
+         "1r2g9zzwq5dm8vjd19pxwggfvfzy56cvkmpmp5d014qr3svgmsap"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -2997,6 +3136,7 @@ parts of it.")
        #:make-flags
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
              "SHELL=bash"
        #:make-flags
        (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
              "SHELL=bash"
+             "MAKE_NB_JOBS=0"           ;use jobserver for submakes
              ;; Build the library for all supported CPUs.  This allows
              ;; switching CPU targets at runtime with the environment variable
              ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
              ;; Build the library for all supported CPUs.  This allows
              ;; switching CPU targets at runtime with the environment variable
              ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
@@ -3040,7 +3180,7 @@ parts of it.")
     (license license:bsd-3)))
 
 (define-public openblas-ilp64
     (license license:bsd-3)))
 
 (define-public openblas-ilp64
-  (package (inherit openblas)
+  (package/inherit openblas
     (name "openblas-ilp64")
     (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux"))
     (arguments
     (name "openblas-ilp64")
     (supported-systems '("x86_64-linux" "aarch64-linux" "mips64el-linux"))
     (arguments
@@ -3051,6 +3191,24 @@ parts of it.")
     (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
     (license license:bsd-3)))
 
     (synopsis "Optimized BLAS library based on GotoBLAS (ILP64 version)")
     (license license:bsd-3)))
 
+(define openblas/fixed-num-threads
+  ;; TODO: Move that to 'openblas' proper on the next rebuild cycle.
+  (package
+    (inherit openblas)
+    (version (match (string-split (package-version openblas) #\.)
+               ((numbers ... (= string-length len))
+                (string-join (append numbers
+                                     (list (make-string len #\a)))
+                             "."))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments openblas)
+       ((#:make-flags flags ''())
+        ;; This is the maximum number of threads OpenBLAS will ever use (that
+        ;; is, if $OPENBLAS_NUM_THREADS is greater than that, then NUM_THREADS
+        ;; is used.)  If we don't set it, the makefile sets it to the number
+        ;; of cores of the build machine, which is obviously wrong.
+        `(cons "NUM_THREADS=128" ,flags))))))
+
 (define* (make-blis implementation #:optional substitutable?)
   "Return a BLIS package with the given IMPLEMENTATION (see config/ in the
 source tree for a list of implementations.)
 (define* (make-blis implementation #:optional substitutable?)
   "Return a BLIS package with the given IMPLEMENTATION (see config/ in the
 source tree for a list of implementations.)
@@ -3085,13 +3243,13 @@ underway to allow BLIS to select the right optimized kernels at run time:
                     (lambda* (#:key outputs #:allow-other-keys)
                       ;; This is a home-made 'configure' script.
                       (let ((out (assoc-ref outputs "out")))
                     (lambda* (#:key outputs #:allow-other-keys)
                       ;; This is a home-made 'configure' script.
                       (let ((out (assoc-ref outputs "out")))
-                        (zero? (system* "./configure" "-p" out
-                                        "-d" "opt"
-                                        "--disable-static"
-                                        "--enable-shared"
-                                        "--enable-threading=openmp"
+                        (invoke "./configure" "-p" out
+                                "-d" "opt"
+                                "--disable-static"
+                                "--enable-shared"
+                                "--enable-threading=openmp"
 
 
-                                        ,implementation)))))
+                                ,implementation))))
                   (add-before 'check 'show-test-output
                     (lambda _
                       ;; By default "make check" is silent.  Make it verbose.
                   (add-before 'check 'show-test-output
                     (lambda _
                       ;; By default "make check" is silent.  Make it verbose.
@@ -3182,13 +3340,13 @@ environments.")
     (version "0.5.3")
     (source
      (origin
     (version "0.5.3")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append "https://github.com/JuliaLang/openspecfun/archive/v"
-                           version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/JuliaLang/openspecfun.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
        (sha256
-        (base32
-         "1rs1bv8jq751fv9vq79890wqf9xlbjc7lvz3ighzyfczbyjcf18m"))))
+        (base32 "0pfw6l3ch7isz403llx7inxlvavqh01jh1hb9dpidi86sjjx9kfh"))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f                      ; no "check" target
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f                      ; no "check" target
@@ -3298,7 +3456,6 @@ packages.")
        #:substitutable? #f
 
        #:modules ((srfi srfi-26)
        #:substitutable? #f
 
        #:modules ((srfi srfi-26)
-                  (srfi srfi-1)
                   (guix build gnu-build-system)
                   (guix build utils))
        #:configure-flags
                   (guix build gnu-build-system)
                   (guix build utils))
        #:configure-flags
@@ -3331,24 +3488,26 @@ packages.")
              (let ((doc (string-append (assoc-ref outputs "doc")
                                        "/share/doc/atlas")))
                (mkdir-p doc)
              (let ((doc (string-append (assoc-ref outputs "doc")
                                        "/share/doc/atlas")))
                (mkdir-p doc)
-               (fold (lambda (file previous)
-                       (and previous (zero? (system* "cp" file doc))))
-                     #t (find-files "../ATLAS/doc" ".*")))))
+               (for-each (cut install-file <> doc)
+                         (find-files "../ATLAS/doc" ".*"))
+               #t)))
          (add-after 'check 'check-pt
          (add-after 'check 'check-pt
-           (lambda _ (zero? (system* "make" "ptcheck"))))
+           (lambda _ (invoke "make" "ptcheck")))
          ;; Fix files required to run configure.
          (add-before 'configure 'fix-/bin/sh
            (lambda _
              ;; Use `sh', not `/bin/sh'.
              (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c")
                (("/bin/sh")
          ;; Fix files required to run configure.
          (add-before 'configure 'fix-/bin/sh
            (lambda _
              ;; Use `sh', not `/bin/sh'.
              (substitute* (find-files "." "Makefile|configure|SpewMakeInc\\.c")
                (("/bin/sh")
-                "sh"))))
+                "sh"))
+             #t))
          ;; Fix /bin/sh in generated make files.
          (add-after 'configure 'fix-/bin/sh-in-generated-files
            (lambda _
              (substitute* (find-files "." "^[Mm]ake\\.inc.*")
                (("/bin/sh")
          ;; Fix /bin/sh in generated make files.
          (add-after 'configure 'fix-/bin/sh-in-generated-files
            (lambda _
              (substitute* (find-files "." "^[Mm]ake\\.inc.*")
                (("/bin/sh")
-                "sh"))))
+                "sh"))
+             #t))
          ;; ATLAS configure program does not accepts the default flags
          ;; passed by the 'gnu-build-system'.
          (replace 'configure
          ;; ATLAS configure program does not accepts the default flags
          ;; passed by the 'gnu-build-system'.
          (replace 'configure
@@ -3370,9 +3529,9 @@ packages.")
                (chdir "../build")
                (format #t "build directory: ~s~%" (getcwd))
                (format #t "configure flags: ~s~%" flags)
                (chdir "../build")
                (format #t "build directory: ~s~%" (getcwd))
                (format #t "configure flags: ~s~%" flags)
-               (zero? (apply system* bash
-                             (string-append srcdir "/configure")
-                             flags))))))))
+               (apply invoke bash
+                      (string-append srcdir "/configure")
+                      flags)))))))
     (synopsis "Automatically Tuned Linear Algebra Software")
     (description
      "ATLAS is an automatically tuned linear algebra software library
     (synopsis "Automatically Tuned Linear Algebra Software")
     (description
      "ATLAS is an automatically tuned linear algebra software library
@@ -3395,15 +3554,15 @@ Failure to do so will result in a library with poor performance.")
 (define-public glm
   (package
     (name "glm")
 (define-public glm
   (package
     (name "glm")
-    (version "0.9.9.5")
+    (version "0.9.9.6")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/g-truc/glm/releases/download/"
                            version  "/glm-" version ".zip"))
        (sha256
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://github.com/g-truc/glm/releases/download/"
                            version  "/glm-" version ".zip"))
        (sha256
-        (base32
-         "1vmg7hb4xvsa77zpbwiw6lqc7pyaj56dihx6xriny5b9rrh4iqsg"))))
+        (base32 "1l0pi1qi37mk6s0yrkrw07lspv4gcqnr9ryg3521hrl77ff37dwx"))
+       (patches (search-patches "glm-restore-install-target.patch"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("unzip" ,unzip)))
     (build-system cmake-build-system)
     (native-inputs
      `(("unzip" ,unzip)))
@@ -3488,7 +3647,7 @@ revised simplex and the branch-and-bound methods.")
 (define-public dealii
   (package
     (name "dealii")
 (define-public dealii
   (package
     (name "dealii")
-    (version "9.0.1")
+    (version "9.1.1")
     (source
      (origin
        (method url-fetch)
     (source
      (origin
        (method url-fetch)
@@ -3496,8 +3655,7 @@ revised simplex and the branch-and-bound methods.")
                            "download/v" version "/dealii-" version ".tar.gz"))
        (sha256
         (base32
                            "download/v" version "/dealii-" version ".tar.gz"))
        (sha256
         (base32
-         "0r7f8rhl3xr94imd372plizdcbqk0a70w73lwc3vw912dxk0sbyz"))
-       (patches (search-patches "dealii-mpi-deprecations.patch"))
+         "0xhjv0gzswpjbc43xbrpwfc5848g508l01855nszx3g5gwzlhnzw"))
        (modules '((guix build utils)))
        (snippet
         ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
        (modules '((guix build utils)))
        (snippet
         ;; Remove bundled sources: UMFPACK, TBB, muParser, and boost
@@ -3538,6 +3696,7 @@ in finite element programs.")
     (inputs
      `(("mpi" ,openmpi)
        ;;Supported only with MPI:
     (inputs
      `(("mpi" ,openmpi)
        ;;Supported only with MPI:
+       ("hdf5" ,hdf5-parallel-openmpi)  ;TODO: have petsc-openmpi propagate?
        ("p4est" ,p4est-openmpi)
        ("petsc" ,petsc-openmpi)
        ("slepc" ,slepc-openmpi)
        ("p4est" ,p4est-openmpi)
        ("petsc" ,petsc-openmpi)
        ("slepc" ,slepc-openmpi)
@@ -3679,33 +3838,34 @@ set.")
 (define-public hypre
   (package
     (name "hypre")
 (define-public hypre
   (package
     (name "hypre")
-    (version "2.14.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/LLNL/hypre/archive/"
-                                  "v" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
-              (sha256
-               (base32
-                "0v515i73bvaz378h5465b1dy9v2gf924zy2q94cpq4qqarawvkqh"))
-              (modules '((guix build utils)))
-              (snippet
-               '(begin
-                  ;; Remove use of __DATE__ and __TIME__ for reproducibility;
-                  ;; substitute the tarball creation time.
-                  (substitute* "src/utilities/HYPRE_utilities.h"
-                    (("Date Compiled: .*$")
-                     "Date Compiled: Apr 11 2018 16:24:59 +0000\"\n"))
-                  #t))))
+    (version "2.15.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/LLNL/hypre.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1lvh4ybqkriyqfg2zmic6mrg1981qv1i9vry1fdgsabn81hb71g4"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Remove use of __DATE__ and __TIME__ for reproducibility;
+           ;; substitute the release date.
+           (substitute* "src/utilities/HYPRE_utilities.h"
+             (("Date Compiled: .*$")
+              "Date Compiled: Oct 19 2018 15:23:00 +0000\"\n"))
+           #t))))
     (build-system gnu-build-system)
     (build-system gnu-build-system)
-    (outputs '("out"                    ;6.1 MiB of headers and libraries
-               "doc"))                  ;4.8 MiB of documentation
+    (outputs '("out"                    ; 6.1 MiB of headers and libraries
+               "doc"))                  ; 4.8 MiB of documentation
     (native-inputs
      `(("doc++" ,doc++)
        ("netpbm" ,netpbm)
     (native-inputs
      `(("doc++" ,doc++)
        ("netpbm" ,netpbm)
-       ("perl" ,perl)                   ;needed to run 'ppmquant' during tests
-       ("texlive" ,(texlive-union (list texlive-generic-xypic
-                                        texlive-fonts-xypic
+       ("perl" ,perl)                   ; needed to run 'ppmquant' during tests
+       ("texlive" ,(texlive-union (list texlive-xypic
+                                        texlive-cm
                                         texlive-latex-hyperref
                                         texlive-bibtex)))
        ("ghostscript" ,ghostscript)))
                                         texlive-latex-hyperref
                                         texlive-bibtex)))
        ("ghostscript" ,ghostscript)))
@@ -3749,16 +3909,14 @@ set.")
            (lambda _
              (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
              (setenv "PATH" (string-append "." ":" (getenv "PATH")))
            (lambda _
              (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
              (setenv "PATH" (string-append "." ":" (getenv "PATH")))
-             (and (system* "make" "check" "CHECKRUN=")
-                  (fold (lambda (filename result)
-                          (and result
-                               (let ((size (stat:size (stat filename))))
-                                 (when (not (zero? size))
-                                   (format #t "~a size ~d; error indication~%"
-                                           filename size))
-                                 (zero? size))))
-                        #t
-                        (find-files "test" ".*\\.err$")))))
+             (invoke "make" "check" "CHECKRUN=")
+             (for-each (lambda (filename)
+                         (let ((size (stat:size (stat filename))))
+                           (when (positive? size)
+                             (error (format #f "~a size ~d; error indication~%"
+                                            filename size)))))
+                       (find-files "test" ".*\\.err$"))
+             #t))
          (add-after 'install 'install-docs
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Custom install because docs/Makefile doesn't honor ${docdir}.
          (add-after 'install 'install-docs
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Custom install because docs/Makefile doesn't honor ${docdir}.
@@ -3767,7 +3925,7 @@ set.")
                (with-directory-excursion "docs"
                  (for-each (lambda (base)
                              (install-file (string-append base ".pdf") docdir)
                (with-directory-excursion "docs"
                  (for-each (lambda (base)
                              (install-file (string-append base ".pdf") docdir)
-                             (copy-recursively base docdir)) ;html docs
+                             (copy-recursively base docdir)) ; html docs
                            '("HYPRE_usr_manual"
                              "HYPRE_ref_manual")))
                #t))))))
                            '("HYPRE_usr_manual"
                              "HYPRE_ref_manual")))
                #t))))))
@@ -3942,10 +4100,10 @@ Longest Commons Subsequence of a set of strings.")
                                 (assoc-ref outputs "out"))
                         (chmod wrapper #o555))))
          (replace 'configure
                                 (assoc-ref outputs "out"))
                         (chmod wrapper #o555))))
          (replace 'configure
-                  (lambda* (#:key inputs outputs #:allow-other-keys)
-                    (zero? (system* "./configure"
-                                    (string-append "--prefix="
-                                                   (assoc-ref outputs "out")))))))))
+           (lambda* (#:key outputs #:allow-other-keys)
+             (invoke "./configure"
+                     (string-append "--prefix="
+                                    (assoc-ref outputs "out"))))))))
     (inputs `(("scm" ,scm)))
     (native-inputs `(("unzip" ,unzip)
                      ("texinfo" ,texinfo)))
     (inputs `(("scm" ,scm)))
     (native-inputs `(("unzip" ,unzip)
                      ("texinfo" ,texinfo)))
@@ -3959,7 +4117,7 @@ as equations, scalars, vectors, and matrices.")
 (define-public z3
   (package
     (name "z3")
 (define-public z3
   (package
     (name "z3")
-    (version "4.8.4")
+    (version "4.8.6")
     (home-page "https://github.com/Z3Prover/z3")
     (source (origin
               (method git-fetch)
     (home-page "https://github.com/Z3Prover/z3")
     (source (origin
               (method git-fetch)
@@ -3968,7 +4126,7 @@ as equations, scalars, vectors, and matrices.")
               (file-name (git-file-name name version))
               (sha256
                (base32
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "014igqm5vwswz0yhz0cdxsj3a6dh7i79hvhgc3jmmmz3z0xm1gyn"))))
+                "1sywcqj5y8yp28m4cdvzsgw74kd6zr1s3y1x17ky8pr9prvpvl6x"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -3981,8 +4139,7 @@ as equations, scalars, vectors, and matrices.")
              #t))
          (add-before 'configure 'bootstrap
            (lambda _
              #t))
          (add-before 'configure 'bootstrap
            (lambda _
-             (zero?
-              (system* "python" "scripts/mk_make.py"))))
+             (invoke "python" "scripts/mk_make.py")))
          ;; work around gnu-build-system's setting --enable-fast-install
          ;; (z3's `configure' is a wrapper around the above python file,
          ;; which fails when passed --enable-fast-install)
          ;; work around gnu-build-system's setting --enable-fast-install
          ;; (z3's `configure' is a wrapper around the above python file,
          ;; which fails when passed --enable-fast-install)
@@ -3997,12 +4154,12 @@ as equations, scalars, vectors, and matrices.")
          (add-before 'check 'make-test-z3
            (lambda _
              ;; Build the test suite executable.
          (add-before 'check 'make-test-z3
            (lambda _
              ;; Build the test suite executable.
-             (zero? (system* "make" "test-z3" "-j"
-                             (number->string (parallel-job-count))))))
+             (invoke "make" "test-z3" "-j"
+                     (number->string (parallel-job-count)))))
          (replace 'check
            (lambda _
              ;; Run all the tests that don't require arguments.
          (replace 'check
            (lambda _
              ;; Run all the tests that don't require arguments.
-             (zero? (system* "./test-z3" "/a")))))))
+             (invoke "./test-z3" "/a"))))))
     (native-inputs
      `(("which" ,which)
        ("python" ,python-wrapper)))
     (native-inputs
      `(("which" ,which)
        ("python" ,python-wrapper)))
@@ -4160,7 +4317,7 @@ reduction.")
 (define-public mcrl2
   (package
     (name "mcrl2")
 (define-public mcrl2
   (package
     (name "mcrl2")
-    (version "201707.1.15162")
+    (version "201908.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://www.mcrl2.org/download/devel/mcrl2-"
     (source (origin
               (method url-fetch)
               (uri (string-append "http://www.mcrl2.org/download/devel/mcrl2-"
@@ -4168,9 +4325,7 @@ reduction.")
                                   ".tar.gz"))
               (sha256
                (base32
                                   ".tar.gz"))
               (sha256
                (base32
-                "1ziww2fchsklm25hl9p2mngssxfh9w07nc114cncqaxfibqp2p8f"))))
-    (native-inputs
-     `(("subversion" ,subversion)))
+                "1i4xgl2d5fgiz1mwi50cyfkrrcpm8nxfayfjgmhq7chs58wlhfsz"))))
     (inputs
      `(("boost" ,boost)
        ("glu" ,glu)
     (inputs
      `(("boost" ,boost)
        ("glu" ,glu)
@@ -4188,6 +4343,15 @@ analysed.")
     (home-page "https://mcrl2.org")
     (license license:boost1.0)))
 
     (home-page "https://mcrl2.org")
     (license license:boost1.0)))
 
+(define-public mcrl2-minimal
+  (package
+    (inherit mcrl2)
+    (name "mcrl2-minimal")
+    (inputs
+     `(("boost" ,boost)))
+    (arguments
+     '(#:configure-flags '("-DMCRL2_ENABLE_GUI_TOOLS=OFF")))))
+
 (define-public r-subplex
   (package
     (name "r-subplex")
 (define-public r-subplex
   (package
     (name "r-subplex")
@@ -4213,14 +4377,14 @@ are noisy or are discontinuous at the solution.")
 (define-public r-desolve
   (package
     (name "r-desolve")
 (define-public r-desolve
   (package
     (name "r-desolve")
-    (version "1.21")
+    (version "1.24")
     (source
       (origin
         (method url-fetch)
         (uri (cran-uri "deSolve" version))
         (sha256
          (base32
     (source
       (origin
         (method url-fetch)
         (uri (cran-uri "deSolve" version))
         (sha256
          (base32
-          "0qqc4mknw1jblzcmph1dg3k1p6w42yal0k1xjh8pqk7yb3a75hs5"))))
+          "0hkvspq0fp8j64l9zayab2l2nazazhwfgfym0jllh0xv5a12r99s"))))
     (properties `((upstream-name . "deSolve")))
     (build-system r-build-system)
     (native-inputs
     (properties `((upstream-name . "deSolve")))
     (build-system r-build-system)
     (native-inputs
@@ -4712,8 +4876,7 @@ assemble global function spaces on finite-element grids.")
          (add-after 'build 'build-tests
            (lambda* (#:key inputs make-flags #:allow-other-keys)
              (setenv "CPLUS_INCLUDE_PATH"
          (add-after 'build 'build-tests
            (lambda* (#:key inputs make-flags #:allow-other-keys)
              (setenv "CPLUS_INCLUDE_PATH"
-                     (string-append (assoc-ref inputs "dune-grid") "/share:"
-                                    (getenv "CPLUS_INCLUDE_PATH")))
+                     (string-append (assoc-ref inputs "dune-grid") "/share"))
              (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("dune-common" ,dune-common)
              (apply invoke "make" "build_tests" make-flags))))))
     (inputs
      `(("dune-common" ,dune-common)
@@ -4869,13 +5032,12 @@ built on top of DUNE, the Distributed and Unified Numerics Environment.")
        (uri (string-append
              "https://mersenneforum.org/mayer/src/C/mlucas_v" version ".txz"))
        (sha256
        (uri (string-append
              "https://mersenneforum.org/mayer/src/C/mlucas_v" version ".txz"))
        (sha256
-        (base32
-         "1ax12qj9lyvnx4vs3gx7l8r3wx5gjbsdswp5f00ik9z0wz7xf297"))))
+        (base32 "0h4xj6pyyac79ka5ibqjilfa3s9j3yxnzgpwc57b54kfh2bj3447"))))
     (build-system gnu-build-system)
     (inputs
      `(("python2" ,python-2)))
     (arguments
     (build-system gnu-build-system)
     (inputs
      `(("python2" ,python-2)))
     (arguments
-     `(#:tests? #f ; no tests
+     `(#:tests? #f                      ; no tests
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
@@ -4909,3 +5071,144 @@ coordinated fashion, as part of the Great Internet Mersenne Prime
 Search (GIMPS).  Mlucas also includes a simple Python script for assignment
 management via the GIMPS project's Primenet server.")
     (license license:gpl2+)))
 Search (GIMPS).  Mlucas also includes a simple Python script for assignment
 management via the GIMPS project's Primenet server.")
     (license license:gpl2+)))
+
+(define-public nauty
+  (package
+    (name "nauty")
+    (version "2.6r11")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://pallini.di.uniroma1.it/"
+                    "nauty" (string-join (string-split version #\.) "")
+                    ".tar.gz"))
+              (sha256
+               (base32
+                "05z6mk7c31j70md83396cdjmvzzip1hqb88pfszzc6k4gy8h3m2y"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "lib"))
+    (arguments
+     `(#:test-target "checks"
+       #:phases
+       (modify-phases %standard-phases
+         ;; Default make target does not build all available
+         ;; executables.  Create them now.
+         (add-after 'build 'build-extra-programs
+           (lambda _
+             (for-each (lambda (target) (invoke "make" target))
+                       '("blisstog" "bliss2dre" "checks6" "sumlines"))
+             #t))
+         ;; Upstream does not provide any install target.
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib-output (assoc-ref outputs "lib"))
+                    (bin (string-append out "/bin"))
+                    (doc (string-append out "/share/doc/nauty/"))
+                    (include (string-append lib-output "/include/nauty"))
+                    (lib (string-append lib-output "/lib/nauty")))
+               (for-each (lambda (f) (install-file f bin))
+                         '("dreadnaut" "NRswitchg" "addedgeg" "amtog" "biplabg"
+                           "blisstog" "bliss2dre" "catg" "checks6" "complg"
+                           "converseg" "copyg" "countg" "cubhamg" "deledgeg"
+                           "delptg" "directg" "dretodot" "dretog" "genbg"
+                           "genbgL" "geng" "genquarticg" "genrang" "genspecialg"
+                           "gentourng" "gentreeg" "hamheuristic" "labelg"
+                           "linegraphg" "listg" "multig" "newedgeg" "pickg"
+                           "planarg" "ranlabg" "shortg" "showg" "subdivideg"
+                           "sumlines" "twohamg" "vcolg" "watercluster2"))
+               (for-each (lambda (f) (install-file f include))
+                         (find-files "." "\\.h$"))
+               (for-each (lambda (f) (install-file f lib))
+                         (find-files "." "\\.a$"))
+               (for-each (lambda (f) (install-file f doc))
+                         (append '("formats.txt" "README" "schreier.txt")
+                                 (find-files "." "\\.pdf$")))))))))
+    (inputs
+     `(("gmp" ,gmp)))                   ;for sumlines
+    (home-page "https://pallini.di.uniroma1.it/")
+    (synopsis "Library for graph automorphisms")
+    (description "@code{nauty} (No AUTomorphisms, Yes?) is a set of
+procedures for computing automorphism groups of graphs and digraphs.
+
+@code{nauty} computes graph information in the form of a set of
+generators, the size of the group, and the orbits of the group; it can
+also produce a canonical label.  The @code{nauty} suite is written in
+C and comes with a command-line interface, a collection of
+command-line tools, and an Application Programming Interface (API).
+
+This package provides the static libraries required to run programs
+compiled against the nauty library.")
+    (license license:asl2.0)))
+
+(define-public ppl
+  (package
+    (name "ppl")
+    (version "1.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.bugseng.com/products/ppl/download/"
+                           "ftp/releases/" version
+                           "/ppl-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1j5aji1g2vmdvc0gqz45n2ll2l2f6czca04wiyfl5g3sm3a6vhvb"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("m4", m4)))
+    (inputs
+     `(("glpk" ,glpk)
+       ("gmp", gmp)))
+    (home-page "https://www.bugseng.com/parma-polyhedra-library")
+    (synopsis
+     "Parma Polyhedra Library for computations with polyhedra")
+    (description
+     "The Parma Polyhedra Library (PPL) provides numerical abstractions
+especially targeted at applications in the field of analysis and
+verification of complex systems.  These abstractions include convex
+polyhedra, defined as the intersection of a finite number of (open or
+closed) halfspaces, each described by a linear inequality (strict or
+non-strict) with rational coefficients; some special classes of polyhedra
+shapes that offer interesting complexity/precision tradeoffs; and grids
+which represent regularly spaced points that satisfy a set of linear
+congruence relations.  The library also supports finite powersets and
+products of (any kind of) polyhedra and grids, a mixed integer linear
+programming problem solver using an exact-arithmetic version of the simplex
+algorithm, a parametric integer programming solver, and primitives for
+termination analysis via the automatic synthesis of linear ranking
+functions.")
+    (license license:gpl3+)))
+
+(define-public speedcrunch
+  (package
+    (name "speedcrunch")
+    (version "0.12.0")
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+        (url "https://bitbucket.org/heldercorreia/speedcrunch.git")
+        (commit (string-append "release-" version))))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32
+        "0vh7cd1915bjqzkdp3sk25ngy8cq624mkh8c53c5bnzk357kb0fk"))))
+    (build-system cmake-build-system)
+    (inputs `(("qtbase" ,qtbase)))
+    (native-inputs `(("qttools" ,qttools)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir-to-src
+           (lambda _ (chdir "src") #t)))))
+    (synopsis "High-precision scientific calculator")
+    (description
+     "SpeedCrunch is a high-precision scientific calculator.  It features a
+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/")
+    (license license:gpl2+)))
+