gnu: r-quadprog: Move to (gnu packages cran).
[jackhill/guix/guix.git] / gnu / packages / maths.scm
index a0a077c..cf78d0b 100644 (file)
@@ -1,5 +1,5 @@
 ;;; 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 © 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 © 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>
@@ -31,6 +31,8 @@
 ;;; 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>
+;;; Copyright © 2019 Robert Smith <robertsmith@posteo.net>
 ;;;
 ;;; 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 onc-rpc)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages perl)
@@ -246,7 +249,7 @@ triangulations.")
 (define-public python-cvxopt
   (package
     (name "python-cvxopt")
-    (version "1.2.1")
+    (version "1.2.3")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -255,7 +258,7 @@ triangulations.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "05mnjil9palaa48xafdfh4f5pr4z7aqjr995rwl08qfyxs8y0crf"))))
+                "1kiy2m62xgs2d5id6dnnwy4vap85cd70p7pgkb9nh23qf9xnak7b"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -290,13 +293,13 @@ programming language.")
 (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
-                     "0y26kj349i048y4z3xrk90bvciw2j6ds3rka7r7yn3183hirr5b4"))))
+                     "0mk562g7dnidjgfgvkxxpvlba66fh1ykmfd9ylzvcln1vxmi6qj2"))))
    (build-system gnu-build-system)
    (inputs
     `(("readline" ,readline)
@@ -325,7 +328,7 @@ enough to be used effectively as a scientific calculator.")
 (define-public double-conversion
   (package
     (name "double-conversion")
-    (version "3.1.4")
+    (version "3.1.5")
     (home-page "https://github.com/google/double-conversion")
     (source (origin
               (method git-fetch)
@@ -334,7 +337,7 @@ enough to be used effectively as a scientific calculator.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "13xwcqk2c0q8c1siw566clxcpvp0xrxvb72mra42wa3nvq9wlsv6"))))
+                "0csy4pjw1p8rp6g5qxi2h0ychhhp1fldv7gb761627fs2mclw9gv"))))
     (build-system cmake-build-system)
     (arguments
      '(#:test-target "test"
@@ -613,14 +616,14 @@ singular value problems.")
 (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
-        (base32 "1vllgap08nhvdmc03idmkdnk9cfl2bp81hps50q1pqrr640qzp9m"))))
+        (base32 "1vglp4la40f5dpj0zdj63zprrkyjgzy068p35bz5dqxjyczm1zlp"))))
     (build-system gnu-build-system)
     (inputs `(("readline" ,readline)
               ("cairo" ,cairo)
@@ -674,17 +677,18 @@ computations.")
 (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
-        (base32 "1wz0586zh91pqb95wvr0pbh71a8rz358fdj6n2ksp85x2cis9lsm"))
+        (base32 "0n29klrrbwan9307np0d9hr128dlpc4nnlf57a140080ll3jmp8l"))
        (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)
@@ -692,10 +696,14 @@ computations.")
        ("flex" ,flex)))
     (inputs
      `(("zlib" ,zlib)
-       ("libjpeg" ,libjpeg)))
+       ("libjpeg" ,libjpeg)
+       ("libtirpc" ,libtirpc)))
     (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.
@@ -1044,8 +1052,11 @@ implemented in C.")
      `(("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)
+       ("libtirpc" ,libtirpc)
+
        ("gctp" ,gctp)))
     (arguments
      `( #:configure-flags '("--enable-install-include" "--enable-shared"
@@ -1463,30 +1474,30 @@ can solve two kinds of problems:
         "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)
-       ("arpack" ,arpack-ng)
-       ("pcre" ,pcre)
        ("fltk" ,fltk)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
-       ("hdf5" ,hdf5)
-       ("libxft" ,libxft)
-       ("mesa" ,mesa)
+       ("gl2ps" ,gl2ps)
+       ("glpk" ,glpk)
        ("glu" ,glu)
-       ("zlib" ,zlib)
-       ("curl" ,curl)
-       ("texinfo" ,texinfo)
        ("graphicsmagick" ,graphicsmagick)
-       ("suitesparse" ,suitesparse)
+       ("hdf5" ,hdf5)
+       ("lapack" ,lapack)
        ("libsndfile" ,libsndfile)
+       ("libxft" ,libxft)
+       ("mesa" ,mesa)
+       ("pcre" ,pcre)
        ("portaudio" ,portaudio)
-       ("alsa-lib" ,alsa-lib)))
+       ("qhull" ,qhull)
+       ("readline" ,readline)
+       ("suitesparse" ,suitesparse)
+       ("texinfo" ,texinfo)
+       ("zlib" ,zlib)))
     (native-inputs
      `(("lzip" ,lzip)
        ("gfortran" ,gfortran)
@@ -1543,7 +1554,7 @@ script files.")
        ,@(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)
@@ -1618,17 +1629,114 @@ Open CASCADE library.")
                    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
-      (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
-       (base32 "1slf0bfkwrcgn6296wb4qhbk4ahz6i4wfb10hnim08x05vrylag8"))
+       (base32 "08rq4jajwmlpivnm9yifz2jhaivnz065lnk0h2zv773nwl9wf162"))
       (modules '((guix build utils)))
       (snippet
        ;; Remove non-free METIS code
@@ -1654,7 +1762,7 @@ Open CASCADE library.")
      `(#: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
@@ -1668,18 +1776,20 @@ ASCII text files using Gmsh's own scripting language.")
 (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")
-                    (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)
-    (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
@@ -2062,7 +2172,7 @@ bindings to almost all functions of SLEPc.")
 (define-public mumps
   (package
     (name "mumps")
-    (version "5.1.2")
+    (version "5.2.1")
     (source
      (origin
        (method url-fetch)
@@ -2070,8 +2180,11 @@ bindings to almost all functions of SLEPc.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "1s9asin08zqzmh08257sdghhivvy9vjif7c53fhaxaax2kd5qd7b"))
-       (patches (search-patches "mumps-build-parallelism.patch"))))
+         "0jklh54x4y3ik1zkw6db7766kakjm5910diyaghfxxf8vwsgr26r"))
+       (patches (search-patches "mumps-build-parallelism.patch"
+                                "mumps-shared-libseq.patch"
+                                "mumps-shared-mumps.patch"
+                                "mumps-shared-pord.patch"))))
     (build-system gnu-build-system)
     (inputs
      `(("fortran" ,gfortran)
@@ -2101,15 +2214,17 @@ CC           = gcc
 FC           = gfortran
 FL           = gfortran
 INCSEQ       = -I$(topdir)/libseq
-LIBSEQ       = -L$(topdir)/libseq -lmpiseq
+LIBSEQ       = $(topdir)/libseq/libmpiseq.a
 LIBSEQNEEDED = libseqneeded~;
 CC           = mpicc
 FC           = mpifort
 FL           = mpifort~]
 AR           = ar vr # rules require trailing space, ugh...
 RANLIB       = ranlib
-LIBBLAS      = -L~a -lopenblas~@[
-SCALAP       = -L~a -lscalapack~]
+BLASDIR      = ~a
+LIBBLAS      = -Wl,-rpath=$(BLASDIR) -Wl,-rpath='$$ORIGIN' -L$(BLASDIR) -lopenblas~@[
+SCALAPDIR    = ~a
+SCALAP       = -Wl,-rpath=$(SCALAPDIR) -Wl,-rpath='$$ORIGIN' -L$(SCALAPDIR) -lscalapack~]
 LIBOTHERS    = -pthread
 CDEFS        = -DAdd_
 PIC          = -fPIC
@@ -2120,18 +2235,18 @@ INCS         = $(INCSEQ)
 LIBS         = $(SCALAP) $(LIBSEQ)
 LPORDDIR     = $(topdir)/PORD/lib
 IPORD        = -I$(topdir)/PORD/include
-LPORD        = -L$(LPORDDIR) -lpord
+LPORD        = $(LPORDDIR)/libpord.a
 ORDERINGSF   = -Dpord~@[
 METISDIR     = ~a
 IMETIS       = -I$(METISDIR)/include
-LMETIS       = -L$(METISDIR)/lib -lmetis
+LMETIS       = -Wl,-rpath $(METISDIR)/lib -L$(METISDIR)/lib -lmetis
 ORDERINGSF  += -Dmetis~]~@[~:{
 SCOTCHDIR    = ~a
 ISCOTCH      = -I$(SCOTCHDIR)/include
-LSCOTCH      = -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
+LSCOTCH      = -Wl,-rpath $(SCOTCHDIR)/lib -L$(SCOTCHDIR)/lib ~a-lesmumps -lscotch -lscotcherr
 ORDERINGSF  += ~a~}~]
 ORDERINGSC   = $(ORDERINGSF)
-LORDERINGS   = $(LPORD) $(LMETIS) $(LSCOTCH)
+LORDERINGS   = $(LPORD) $(LMETIS) $(LSCOTCH) $(LIBSEQ)
 IORDERINGSF  = $(ISCOTCH)
 IORDERINGSC  = $(IPORD) $(IMETIS) $(ISCOTCH)"
                         (assoc-ref inputs "mpi")
@@ -2185,6 +2300,8 @@ IORDERINGSC  = $(IPORD) $(IMETIS) $(ISCOTCH)"
                (copy-recursively "include" (string-append out "/include"))
                (when (file-exists? "libseq/libmpiseq.a")
                  (install-file "libseq/libmpiseq.a" libdir))
+               (when (file-exists? "libseq/libmpiseq.so")
+                 (install-file "libseq/libmpiseq.so" libdir))
                #t))))))
     (home-page "http://mumps.enseeiht.fr")
     (synopsis "Multifrontal sparse direct solver")
@@ -2225,27 +2342,6 @@ sparse system of linear equations A x = b using Gaussian elimination.")
     (inputs
      (alist-delete "pt-scotch" (package-inputs mumps-openmpi)))))
 
-(define-public r-quadprog
-  (package
-    (name "r-quadprog")
-    (version "1.5-7")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (cran-uri "quadprog" version))
-       (sha256
-        (base32
-         "0vg7i9p241bwvfdspjbydjrsvgipl6nsb8bjigp0hbbgvxbixx0s"))))
-    (build-system r-build-system)
-    (native-inputs
-     `(("gfortran" ,gfortran)))
-    (home-page "https://cran.r-project.org/web/packages/quadprog")
-    (synopsis "Functions to solve quadratic programming problems")
-    (description
-     "This package contains routines and documentation for solving quadratic
-programming problems.")
-    (license license:gpl3+)))
-
 (define-public r-pracma
   (package
     (name "r-pracma")
@@ -2875,7 +2971,7 @@ point numbers.")
 (define-public wxmaxima
   (package
     (name "wxmaxima")
-    (version "19.05.7")
+    (version "19.11.1")
     (source
      (origin
        (method git-fetch)
@@ -2884,8 +2980,7 @@ point numbers.")
              (commit (string-append "Version-" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32
-         "0zaz71fh156b9inrxf86scnix247al5pl9v18cxhjxcm0lanqxdp"))))
+        (base32 "16xizaddb27432n1083y89ir5zdqvllsgbwrzzk4jc2rw1ldxfsv"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("gettext" ,gettext-minimal)))
@@ -2998,8 +3093,12 @@ parts of it.")
 
 (define-public openblas
   (package
+    ;; TODO: Incorporate 'openblas/fixed-num-threads' changes on the next
+    ;; rebuild cycle.
+    (replacement openblas/fixed-num-threads)
+
     (name "openblas")
-    (version "0.3.5")
+    (version "0.3.6")
     (source
      (origin
        (method url-fetch)
@@ -3008,7 +3107,7 @@ parts of it.")
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "062kg4ny1ywz7k5grpb4pbf0hba0w6manbajwkmv4f477a31sxpl"))))
+         "1r2g9zzwq5dm8vjd19pxwggfvfzy56cvkmpmp5d014qr3svgmsap"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -3068,7 +3167,7 @@ parts of it.")
     (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
@@ -3079,6 +3178,24 @@ parts of it.")
     (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.)
@@ -3369,13 +3486,15 @@ packages.")
              ;; 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")
-                "sh"))))
+                "sh"))
+             #t))
          ;; ATLAS configure program does not accepts the default flags
          ;; passed by the 'gnu-build-system'.
          (replace 'configure
@@ -3422,15 +3541,15 @@ Failure to do so will result in a library with poor performance.")
 (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
-        (base32
-         "1vmg7hb4xvsa77zpbwiw6lqc7pyaj56dihx6xriny5b9rrh4iqsg"))))
+        (base32 "1l0pi1qi37mk6s0yrkrw07lspv4gcqnr9ryg3521hrl77ff37dwx"))
+       (patches (search-patches "glm-restore-install-target.patch"))))
     (build-system cmake-build-system)
     (native-inputs
      `(("unzip" ,unzip)))
@@ -3515,7 +3634,7 @@ revised simplex and the branch-and-bound methods.")
 (define-public dealii
   (package
     (name "dealii")
-    (version "9.0.1")
+    (version "9.1.1")
     (source
      (origin
        (method url-fetch)
@@ -3523,8 +3642,7 @@ revised simplex and the branch-and-bound methods.")
                            "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
@@ -3733,8 +3851,8 @@ set.")
      `(("doc++" ,doc++)
        ("netpbm" ,netpbm)
        ("perl" ,perl)                   ; needed to run 'ppmquant' during tests
-       ("texlive" ,(texlive-union (list texlive-generic-xypic
-                                        texlive-fonts-xypic
+       ("texlive" ,(texlive-union (list texlive-xypic
+                                        texlive-cm
                                         texlive-latex-hyperref
                                         texlive-bibtex)))
        ("ghostscript" ,ghostscript)))
@@ -3854,14 +3972,14 @@ supports compressed MAT files, as well as newer (version 7.3) MAT files.")
 (define-public vc
   (package
     (name "vc")
-    (version "1.3.3")
+    (version "1.4.1")
     (source
       (origin (method url-fetch)
               (uri (string-append "https://github.com/VcDevel/Vc/releases/"
                                   "download/" version "/Vc-" version ".tar.gz"))
               (sha256
                (base32
-                "1zmlpn32jzb38smp3j834llmbix3whsrbw0h397qxysbw792kih8"))))
+                "17qili8bf8r78cng65yf4qmgna8kiqjqbgcqbric6v9j6nkhkrk8"))))
     (build-system cmake-build-system)
     (arguments
      '(#:configure-flags
@@ -3869,7 +3987,30 @@ supports compressed MAT files, as well as newer (version 7.3) MAT files.")
          ;; By default, Vc will optimize for the CPU of the build machine.
          ;; Setting this to "none" makes it create portable binaries.  See
          ;; "cmake/OptimizeForArchitecture.cmake".
-         "-DTARGET_ARCHITECTURE=none")))
+         "-DTARGET_ARCHITECTURE=none")
+       #:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'copy-testdata
+                    (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                      (let ((testdata (assoc-ref (or native-inputs inputs)
+                                                 "testdata")))
+                        (copy-recursively testdata "tests/testdata")
+                        #t))))))
+    (native-inputs
+     `(("virtest" ,virtest)
+
+       ;; This is a submodule in the git project, but not part of the
+       ;; released sources.  See the git branch for the commit to take.
+       ("testdata" ,(let ((commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3"))
+                      (origin
+                        (method git-fetch)
+                        (uri (git-reference
+                              (url "https://github.com/VcDevel/vc-testdata")
+                              (commit "9ada1f34d6a41f1b5553d6223f277eae72c039d3")))
+                        (file-name (git-file-name "vc-testdata"
+                                                  (string-take commit 7)))
+                        (sha256
+                         (base32
+                          "1hkhqib03qlcq412ym2dciynfxcdr2ygqhnplz4l1vissr1wnqn2")))))))
     (synopsis "SIMD vector classes for C++")
     (description "Vc provides portable, zero-overhead C++ types for explicitly
 data-parallel programming.  It is a library designed to ease explicit
@@ -3986,7 +4127,7 @@ as equations, scalars, vectors, and matrices.")
 (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)
@@ -3995,7 +4136,7 @@ as equations, scalars, vectors, and matrices.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "014igqm5vwswz0yhz0cdxsj3a6dh7i79hvhgc3jmmmz3z0xm1gyn"))))
+                "1sywcqj5y8yp28m4cdvzsgw74kd6zr1s3y1x17ky8pr9prvpvl6x"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -4186,17 +4327,15 @@ reduction.")
 (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-"
-                                  version
-                                  ".tar.gz"))
+              (uri (string-append
+                    "https://www.mcrl2.org/download/release/mcrl2-"
+                    version ".tar.gz"))
               (sha256
                (base32
-                "1ziww2fchsklm25hl9p2mngssxfh9w07nc114cncqaxfibqp2p8f"))))
-    (native-inputs
-     `(("subversion" ,subversion)))
+                "1i4xgl2d5fgiz1mwi50cyfkrrcpm8nxfayfjgmhq7chs58wlhfsz"))))
     (inputs
      `(("boost" ,boost)
        ("glu" ,glu)
@@ -4214,6 +4353,15 @@ analysed.")
     (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")
@@ -4239,14 +4387,13 @@ are noisy or are discontinuous at the solution.")
 (define-public r-desolve
   (package
     (name "r-desolve")
-    (version "1.21")
+    (version "1.25")
     (source
       (origin
         (method url-fetch)
         (uri (cran-uri "deSolve" version))
         (sha256
-         (base32
-          "0qqc4mknw1jblzcmph1dg3k1p6w42yal0k1xjh8pqk7yb3a75hs5"))))
+         (base32 "0735y3p5glhqx69rzrc8qgmvs7p7w0p98qxmvylb6bgqp6kp0cbp"))))
     (properties `((upstream-name . "deSolve")))
     (build-system r-build-system)
     (native-inputs
@@ -4738,8 +4885,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"
-                     (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)
@@ -5003,3 +5149,114 @@ 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+)))
+
+(define-public minisat
+  ;; This is the last commit which is available upstream, no
+  ;; release happened since 2010.
+  (let ((commit "37dc6c67e2af26379d88ce349eb9c4c6160e8543")
+        (revision "1"))
+    (package
+      (name "minisat")
+      (version (string-append "2.2.0-" revision "." (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/niklasso/minisat.git")
+               (commit commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256
+          (base32
+           "091hf3qkm197s5r7xcr3m07xsdwyz2rqk1hc9kj0hn13imz09irq"))
+         (patches
+          (search-patches "minisat-friend-declaration.patch"
+                          "minisat-install.patch"))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:make-flags (list (string-append "prefix=" %output))
+         #:tests? #f ;no check target
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure))))
+      (inputs
+       `(("zlib:static" ,zlib "static")
+         ("zlib" ,zlib)))
+      (synopsis
+       "Small, yet efficient, SAT solver")
+      (description
+       "MiniSat is a minimalistic, open-source SAT solver, developed to help
+researchers and developers alike to get started on SAT.")
+      (home-page
+       "http://minisat.se/MiniSat.html")
+      (license license:expat))))