summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm99
1 files changed, 65 insertions, 34 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f88cede68a..448d9e373b 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -53,7 +54,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
- #:use-module (guix build utils)
+ #:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system ocaml)
@@ -63,6 +64,7 @@
#:use-module (gnu packages algebra)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
@@ -1413,9 +1415,9 @@ can solve two kinds of problems:
;; For a fully featured Octave, users are strongly recommended also to install
;; the following packages: less, ghostscript, gnuplot.
-(define-public octave
+(define-public octave-cli
(package
- (name "octave")
+ (name "octave-cli")
(version "4.4.1")
(source
(origin
@@ -1497,21 +1499,21 @@ Work may be performed both at the interactive command-line as well as via
script files.")
(license license:gpl3+)))
-(define-public qtoctave
- (package (inherit octave)
- (name "qtoctave")
+(define-public octave
+ (package (inherit octave-cli)
+ (name "octave")
(source (origin
- (inherit (package-source octave))))
+ (inherit (package-source octave-cli))))
(inputs
`(("qscintilla" ,qscintilla)
("qt" ,qtbase)
- ,@(package-inputs octave)))
+ ,@(package-inputs octave-cli)))
(native-inputs
`(("qttools" , qttools) ;for lrelease
("texlive" ,texlive) ;for texi2dvi
- ,@(package-native-inputs octave)))
+ ,@(package-native-inputs octave-cli)))
(arguments
- (substitute-keyword-arguments (package-arguments octave)
+ (substitute-keyword-arguments (package-arguments octave-cli)
((#:phases phases)
`(modify-phases ,phases
(add-before 'configure 'patch-qscintilla-library-name
@@ -1525,6 +1527,9 @@ script files.")
"qscintilla2_qt5"))
#t))))))))
+(define-public qtoctave
+ (deprecated-package "qtoctave" octave))
+
(define-public opencascade-oce
(package
(name "opencascade-oce")
@@ -1772,7 +1777,7 @@ scientific applications modeled by partial differential equations.")
("mumps" ,mumps-openmpi)
("openmpi" ,openmpi)
("scalapack" ,scalapack)
- ("scotch" ,pt-scotch)
+ ("scotch" ,pt-scotch32)
,@(package-inputs petsc)))
(arguments
(substitute-keyword-arguments (package-arguments petsc)
@@ -3580,7 +3585,7 @@ in finite element programs.")
`(("unzip" ,unzip)))
(inputs
`(("hdf5" ,hdf5)
- ("octave" ,octave)
+ ("octave" ,octave-cli)
("python" ,python-2) ; print syntax
;; ("python2-numpy" ,python2-numpy) ; only required for the tests
("zlib" ,zlib)))
@@ -3704,7 +3709,13 @@ set.")
`(("doc++" ,doc++)
("netpbm" ,netpbm)
("perl" ,perl) ;needed to run 'ppmquant' during tests
- ("texlive" ,texlive) ;full package required for fonts
+ ("texlive" ,(texlive-union (list texlive-generic-xypic
+ texlive-fonts-xypic
+ texlive-latex-hyperref
+ texlive-latex-oberdiek
+ texlive-generic-ifxetex
+ texlive-latex-url
+ texlive-bibtex)))
("ghostscript" ,ghostscript)))
(inputs
`(("blas" ,openblas)
@@ -3721,6 +3732,12 @@ set.")
"--with-blas")
#:phases
(modify-phases %standard-phases
+ (add-before 'build 'set-HOME
+ (lambda _
+ ;; FIXME: texlive-union does not find the built
+ ;; metafonts, so it tries to generate them in HOME.
+ (setenv "HOME" "/tmp")
+ #t))
(add-before 'configure 'chdir-src
(lambda _ (chdir "src")))
(replace 'configure
@@ -3735,7 +3752,7 @@ set.")
configure-flags)))))))
(add-after 'build 'build-docs
(lambda _
- (zero? (system* "make" "-Cdocs" "pdf" "html"))))
+ (invoke "make" "-Cdocs" "pdf" "html")))
(replace 'check
(lambda _
(setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib"))
@@ -3950,29 +3967,41 @@ as equations, scalars, vectors, and matrices.")
(define-public z3
(package
(name "z3")
- (version "4.8.1")
+ (version "4.8.3")
(home-page "https://github.com/Z3Prover/z3")
(source (origin
(method git-fetch)
(uri (git-reference (url home-page)
(commit (string-append "z3-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1vr57bwx40sd5riijyrhy70i2wnv9xrdihf6y5zdz56yq88rl48f"))))
- (build-system cmake-build-system)
+ "0p5gdmhd32x6zwmx7j5cgwh4jyfxa9yapym95nlmyfaqzak92qar"))))
+ (build-system gnu-build-system)
(arguments
- `(#:configure-flags
- (list "-DBUILD_PYTHON_BINDINGS=true"
- "-DINSTALL_PYTHON_BINDINGS=true"
- (string-append "-DCMAKE_INSTALL_PYTHON_PKG_DIR="
- %output
- "/lib/python2.7/site-packages"))
- #:phases
+ `(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fix-compatability
+ ;; Versions after 4.8.3 have immintrin.h IFDEFed for Windows only.
+ (lambda _
+ (substitute* "src/util/mpz.cpp"
+ (("#include <immintrin.h>") ""))
+ #t))
(add-before 'configure 'bootstrap
(lambda _
(zero?
- (system* "python" "contrib/cmake/bootstrap.py" "create"))))
+ (system* "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)
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (invoke "./configure"
+ (string-append "--prefix=" (assoc-ref outputs "out")))))
+ (add-after 'configure 'change-directory
+ (lambda _
+ (chdir "build")
+ #t))
(add-before 'check 'make-test-z3
(lambda _
;; Build the test suite executable.
@@ -3983,7 +4012,8 @@ as equations, scalars, vectors, and matrices.")
;; Run all the tests that don't require arguments.
(zero? (system* "./test-z3" "/a")))))))
(native-inputs
- `(("python" ,python-2)))
+ `(("which" ,which)
+ ("python" ,python-wrapper)))
(synopsis "Theorem prover")
(description "Z3 is a theorem prover and @dfn{satisfiability modulo
theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.")
@@ -4052,13 +4082,14 @@ exclusion algorithms are typical examples of such systems.")
(name "elemental")
(version "0.87.7")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/elemental/Elemental/"
- "archive/v" version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/elemental/Elemental.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1nfp82w22pi8x8fg9sc37z8kf84dqi1dhxp8bbk7571y4aygvv3v"))))
+ "1687xpjjzig27y2pnqv7hv09smpijyfdpz7qjgmcxf4shfajlfkc"))))
(build-system cmake-build-system)
(home-page "http://libelemental.org")
(native-inputs
@@ -4082,8 +4113,8 @@ exclusion algorithms are typical examples of such systems.")
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DGFORTRAN_LIB=gfortran")
#:phases (modify-phases %standard-phases
- (add-before 'check 'mpi-setup
- ,%openmpi-setup)
+ (add-before 'check 'mpi-setup
+ ,%openmpi-setup)
(add-before 'check 'setup-tests
(lambda _
;; Parallelism is done at the MPI layer.
@@ -4094,7 +4125,7 @@ exclusion algorithms are typical examples of such systems.")
;; Tests are installed, with no easy configuration
;; switch to prevent this, so delete them.
(delete-file-recursively
- (string-append (assoc-ref outputs "out") "/bin"))
+ (string-append (assoc-ref outputs "out") "/bin"))
#t)))))
(synopsis "Dense and sparse-direct linear algebra and optimization")
(description "Elemental is a modern C++ library for distributed-memory