diff options
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r-- | gnu/packages/maths.scm | 211 |
1 files changed, 114 insertions, 97 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index d4e3aca21e..90996a1f6d 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> ;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com> ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com> -;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2018, 2020, 2021 Marius Bakke <marius@gnu.org> ;;; Copyright © 2018 Eric Brown <brown@fastmail.com> ;;; Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu> ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org> @@ -141,6 +141,7 @@ #:use-module (gnu packages tbb) #:use-module (gnu packages scheme) #:use-module (gnu packages shells) + #:use-module (gnu packages sphinx) #:use-module (gnu packages tcl) #:use-module (gnu packages texinfo) #:use-module (gnu packages tex) @@ -340,8 +341,8 @@ programming language.") (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin"))) (wrap-program (string-append bin "/units_cur") - `("PYTHONPATH" ":" prefix - ,(search-path-as-string->list (getenv "PYTHONPATH")))) + `("GUIX_PYTHONPATH" ":" prefix + ,(search-path-as-string->list (getenv "GUIX_PYTHONPATH")))) #t)))))) (synopsis "Conversion between thousands of scales") (description @@ -479,46 +480,47 @@ precision floating point numbers.") (define-public gsl (package (name "gsl") - (version "2.6") + (version "2.7") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gsl/gsl-" version ".tar.gz")) (sha256 (base32 - "1a460zj9xmbgvcymkdhqh313c4l29mn9cffbi5vf33x3qygk70mp")))) + "0av04cpblphvvs3kl5rwphniarml503501vrpqw31rd0bmwg7fzg")))) (build-system gnu-build-system) (arguments (let ((system (%current-system))) - (cond - ((or (string-prefix? "aarch64" system) - (string-prefix? "powerpc" system)) - ;; Some sparse matrix tests are failing on AArch64 and PowerPC: - ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html - '(#:phases (modify-phases %standard-phases - (add-before 'check 'disable-failing-tests - (lambda _ - (substitute* "spmatrix/test.c" - ((".*test_complex.*") "\n")) - #t))))) - ((string-prefix? "i686" system) - ;; There are rounding issues with these tests on i686: - ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html - ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html - '(#:phases (modify-phases %standard-phases - (add-before 'check 'disable-failing-tests - (lambda _ - (substitute* "linalg/test.c" - ((".*gsl_test\\(test_LU_decomp.*") "\n") - ((".*gsl_test\\(test_LUc_decomp.*") "\n") - ((".*gsl_test\\(test_cholesky_decomp.*") "\n") - ((".*gsl_test\\(test_COD_lssolve2.*") "\n")) - (substitute* "spmatrix/test.c" - ((".*test_all.*") "\n") - ((".*test_float.*") "\n") - ((".*test_complex.*") "\n")) - #t))))) - (else '())))) + `(#:configure-flags (list "--disable-static") ;halves package size + #:phases + (modify-phases %standard-phases + ,@(cond + ((or (string-prefix? "aarch64" system) + (string-prefix? "powerpc" system)) + ;; Some sparse matrix tests are failing on AArch64 and PowerPC: + ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00001.html + '((add-before 'check 'disable-failing-tests + (lambda _ + (substitute* "spmatrix/test.c" + ((".*test_complex.*") "\n")))))) + + ((string-prefix? "i686" system) + ;; There are rounding issues with these tests on i686: + ;; https://lists.gnu.org/archive/html/bug-gsl/2016-10/msg00000.html + ;; https://lists.gnu.org/archive/html/bug-gsl/2020-04/msg00000.html + '((add-before 'check 'disable-failing-tests + (lambda _ + (substitute* "linalg/test.c" + ((".*gsl_test\\(test_LU_decomp.*") "\n") + ((".*gsl_test\\(test_LUc_decomp.*") "\n") + ((".*gsl_test\\(test_cholesky_decomp.*") "\n") + ((".*gsl_test\\(test_COD_lssolve2.*") "\n")) + (substitute* "spmatrix/test.c" + ((".*test_all.*") "\n") + ((".*test_float.*") "\n") + ((".*test_complex.*") "\n")))))) + + (else '())))))) (home-page "https://www.gnu.org/software/gsl/") (synopsis "Numerical library for C and C++") (description @@ -1346,16 +1348,17 @@ extremely large and complex data collections.") "hdf/hdf5lib/exceptions/Makefile.in" "hdf/hdflib/Makefile.in") (("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar") - (string-append (assoc-ref inputs "slf4j-api") - "/share/java/slf4j-api.jar"))) + (search-input-file inputs "/share/java/slf4j-api.jar"))) ;; Replace outdated config.sub and config.guess: (with-directory-excursion "config" (for-each (lambda (file) (install-file - (string-append (assoc-ref inputs "automake") - "/share/automake-" - ,(version-major+minor (package-version automake)) - "/" file) ".")) + (search-input-file inputs + (string-append + "/share/automake-" + ,(version-major+minor (package-version automake)) + "/" file)) + ".")) '("config.sub" "config.guess"))) ;; Fix embedded version number @@ -1387,11 +1390,9 @@ extremely large and complex data collections.") "test/hdf5lib/junit.sh.in" "examples/runExample.sh.in") (("/usr/bin/test") - (string-append (assoc-ref inputs "coreutils") - "/bin/test")) + (search-input-file inputs "/bin/test")) (("/usr/bin/uname") - (string-append (assoc-ref inputs "coreutils") - "/bin/uname")) + (search-input-file inputs "/bin/uname")) (("CLASSPATH=[^\n]*") (string-append "CLASSPATH=" class-path))) (setenv "CLASSPATH" class-path)) @@ -2240,7 +2241,7 @@ script files.") ,@(package-inputs octave-cli))) (native-inputs `(("qttools" , qttools) ;for lrelease - ("texlive" ,(texlive-union (list texlive-epsf))) ; for texi2dvi + ("texlive" ,(texlive-updmap.cfg (list texlive-epsf))) ; for texi2dvi ,@(package-native-inputs octave-cli))) (arguments (substitute-keyword-arguments (package-arguments octave-cli) @@ -3776,13 +3777,12 @@ to BMP, JPEG or PNG image formats.") (modify-phases %standard-phases (add-after 'unpack 'patch-paths (lambda* (#:key inputs #:allow-other-keys) - (let* ((sed (string-append (assoc-ref inputs "sed") "/bin/sed")) + (let* ((sed (search-input-file inputs "/bin/sed")) (coreutils (assoc-ref inputs "coreutils")) (dirname (string-append coreutils "/bin/dirname")) (head (string-append coreutils "/bin/head")) - (perl (string-append (assoc-ref inputs "perl") "/bin/perl")) - (python (string-append (assoc-ref inputs "python") - "/bin/python3"))) + (perl (search-input-file inputs "/bin/perl")) + (python (search-input-file inputs "/bin/python3"))) (substitute* "src/maxima.in" (("sed ") (string-append sed " ")) (("dirname") dirname) @@ -3816,8 +3816,7 @@ to BMP, JPEG or PNG image formats.") (let* ((gnuplot (assoc-ref inputs "gnuplot")) (out (assoc-ref outputs "out")) (datadir (string-append out "/share/maxima/" ,version)) - (binutils (string-append (assoc-ref inputs "binutils") - "/bin"))) + (binutils (dirname (search-input-file inputs "/bin/as")))) (with-directory-excursion out (mkdir-p "share/emacs") (mkdir-p "share/doc") @@ -3983,16 +3982,17 @@ parts of it.") (define-public openblas (package (name "openblas") - (version "0.3.9") + (version "0.3.13") (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/openblas/v" version "/OpenBLAS%20" - version "%20version.tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/xianyi/OpenBLAS") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "14iz9xnrb9xiwgj84j94mc74gg0zn2vsy9fmsijxxma1n7dck4w3")))) + "14jxh0v3jfbw4mfjx4mcz4dd51lyq7pqvh9k8dg94539ypzjr2lj")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -4027,7 +4027,8 @@ parts of it.") (string-prefix? "i686" system)) '("DYNAMIC_ARCH=1")) ;; On some of these architectures the CPU can't be detected. - ((string-prefix? "powerpc64le" system) + ((or (string-prefix? "powerpc64le" system) + (string-prefix? "aarch64" system)) '("DYNAMIC_ARCH=1" "TARGET=GENERIC")) ;; On MIPS we force the "SICORTEX" TARGET, as for the other @@ -4035,9 +4036,6 @@ parts of it.") ;; for Loongson cores are used. ((string-prefix? "mips" system) '("TARGET=SICORTEX")) - ;; On aarch64 force the generic 'armv8-a' target - ((string-prefix? "aarch64" system) - '("TARGET=ARMV8")) ;; Failed to detect CPU. ((string-prefix? "armhf" system) '("TARGET=ARMV7")) @@ -4342,6 +4340,7 @@ packages.") (method url-fetch) (uri (string-append "mirror://sourceforge/math-atlas/Stable/" version "/atlas" version ".tar.bz2")) + (patches (search-patches "atlas-gfortran-compat.patch")) (sha256 (base32 "1dyjlq3fiparvm8ypwk6rsmjzmnwk81l88gkishphpvc79ryp216")))) @@ -4868,7 +4867,7 @@ set.") (define-public hypre (package (name "hypre") - (version "2.15.1") + (version "2.20.0") (source (origin (method git-fetch) @@ -4877,28 +4876,55 @@ set.") (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)))) + (base32 "14iqjwg5sv1qjn7c2cfv0xxmn9rwamjrhh9hgs8fjbywcbvrkjdi")))) (build-system gnu-build-system) - (outputs '("out" ; 6.1 MiB of headers and libraries - "doc")) ; 4.8 MiB of documentation + (outputs '("out" ;5.3 MiB of headers and libraries + "doc")) ;12 MiB of documentation (native-inputs `(("doc++" ,doc++) - ("netpbm" ,netpbm) - ("perl" ,perl) ; needed to run 'ppmquant' during tests - ("texlive" ,(texlive-union (list texlive-xypic - texlive-cm - texlive-latex-hyperref - texlive-bibtex))) - ("ghostscript" ,ghostscript))) + ("doxygen" ,doxygen) + ("python" ,python) + ("python-breathe" ,python-breathe) + ("python-sphinx" ,python-sphinx) + ("texlive" ,(texlive-updmap.cfg (list texlive-adjustbox + texlive-amsfonts + texlive-bibtex + texlive-caption + texlive-cm + texlive-etoolbox + texlive-jknappen + texlive-sectsty + texlive-tex-gyre + texlive-wasy + texlive-xcolor + texlive-xypic + texlive-generic-listofitems + texlive-generic-ulem + texlive-latex-capt-of + texlive-latex-cmap + texlive-latex-colortbl + texlive-latex-etoc + texlive-latex-fancyhdr + texlive-latex-fancyvrb + texlive-latex-float + texlive-latex-fncychap + texlive-latex-framed + texlive-latex-geometry + texlive-latex-hanging + texlive-latex-hyperref + texlive-latex-multirow + texlive-latex-natbib + texlive-latex-needspace + texlive-latex-newunicodechar + texlive-latex-parskip + texlive-latex-stackengine + texlive-latex-tabulary + texlive-latex-titlesec + texlive-latex-tocloft + texlive-latex-upquote + texlive-latex-varwidth + texlive-latex-wasysym + texlive-latex-wrapfig))))) (inputs `(("blas" ,openblas) ("lapack" ,lapack))) @@ -4914,12 +4940,6 @@ 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 @@ -4934,7 +4954,7 @@ set.") configure-flags))))))) (add-after 'build 'build-docs (lambda _ - (invoke "make" "-Cdocs" "pdf" "html"))) + (invoke "make" "-C" "docs"))) (replace 'check (lambda _ (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/hypre/lib")) @@ -4945,8 +4965,7 @@ set.") (when (positive? size) (error (format #f "~a size ~d; error indication~%" filename size))))) - (find-files "test" ".*\\.err$")) - #t)) + (find-files "test" ".*\\.err$")))) (add-after 'install 'install-docs (lambda* (#:key outputs #:allow-other-keys) ;; Custom install because docs/Makefile doesn't honor ${docdir}. @@ -4955,10 +4974,9 @@ set.") (with-directory-excursion "docs" (for-each (lambda (base) (install-file (string-append base ".pdf") docdir) - (copy-recursively base docdir)) ; html docs - '("HYPRE_usr_manual" - "HYPRE_ref_manual"))) - #t)))))) + (copy-recursively (string-append base "-html") + (string-append docdir "/" base))) + '("usr-manual" "ref-manual"))))))))) (home-page "https://computing.llnl.gov/projects\ /hypre-scalable-linear-solvers-multigrid-methods") (synopsis "Library of solvers and preconditioners for linear equations") @@ -6593,9 +6611,8 @@ of C, Java, or Ada programs.") (modify-phases %standard-phases (add-before 'configure 'export-shell (lambda* (#:key inputs #:allow-other-keys) - (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash") - "/bin/sh")) - #t))))) + (setenv "CONFIG_SHELL" + (search-input-file inputs "/bin/sh"))))))) (inputs `(("gmp" ,gmp))) (propagated-inputs |