gnu: Use 'modify-phases' syntax.
[jackhill/guix/guix.git] / gnu / packages / algebra.scm
index 32f2359..08940e4 100644 (file)
@@ -1,9 +1,12 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2013, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages documentation)
+  #:use-module (gnu packages ed)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages image)
-  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
+  #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages perl)
-  #:use-module (gnu packages readline)
-  #:use-module (gnu packages flex)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages readline)
   #:use-module (gnu packages shells)
   #:use-module (gnu packages tex)
+  #:use-module (gnu packages texinfo)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xorg)
-  #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix packages)
-  #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system cmake)
+  #:use-module (guix download)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
   #:use-module (guix utils))
 
 
@@ -128,7 +133,7 @@ solve the shortest vector problem.")
 (define-public pari-gp
   (package
    (name "pari-gp")
-   (version "2.7.6")
+   (version "2.9.3")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -136,9 +141,9 @@ solve the shortest vector problem.")
                   version ".tar.gz"))
             (sha256
               (base32
-                "04dqi697czd8mmw8aiwzrkgbvkjassqagg6lfy3lkf1k5qi9g9rr"))))
+                "0qqal1lpggd6dvs19svnz0dil86xk0xkcj5s3b7104ibkmvjfsp7"))))
    (build-system gnu-build-system)
-   (native-inputs `(("texlive" ,texlive-minimal)))
+   (native-inputs `(("texlive" ,texlive-tiny)))
    (inputs `(("gmp" ,gmp)
              ("libx11" ,libx11)
              ("perl" ,perl)
@@ -168,7 +173,7 @@ PARI is also available as a C library to allow for faster computations.")
 (define-public gp2c
   (package
    (name "gp2c")
-   (version "0.0.9pl5")
+   (version "0.0.10")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -176,7 +181,7 @@ PARI is also available as a C library to allow for faster computations.")
                   version ".tar.gz"))
             (sha256
               (base32
-                "1q003mkagc5ib6lqb2xfay7j4ffkwv7xlnznp6wdrq2sbqq4vyak"))))
+                "1xhpz5p81iw261ay1kip283ggr0ir8ydz8qx3v24z8jfms1r3y70"))))
    (build-system gnu-build-system)
    (native-inputs `(("perl" ,perl)))
    (inputs `(("pari-gp" ,pari-gp)))
@@ -202,7 +207,7 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
 (define-public giac-xcas
   (package
     (name "giac-xcas")
-    (version "1.2.2-81")
+    (version "1.2.3-57")
     (source (origin
               (method url-fetch)
               ;; "~parisse/giac" is not used because the maintainer regularly
@@ -214,7 +219,7 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
                                   "source/giac_" version ".tar.gz"))
               (sha256
                (base32
-                "0jwlx8b97zkly9gcbdfbj4mzyn21dbg1kgpw7j7vqs380jryzgfs"))))
+                "0a7c1r2rgsin671qy98yvwgkg6a81d0pp0p4p7sydhrfi1k9xpr1"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -251,7 +256,7 @@ GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
        ("perl" ,perl)
        ("pari-gp" ,pari-gp)
        ("tcsh" ,tcsh)
-       ("texlive" ,texlive-minimal)))
+       ("texlive" ,texlive-tiny)))
     (native-inputs `(("readline" ,readline)))
     (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
     (synopsis "Computer algebra system")
@@ -311,7 +316,7 @@ fast arithmetic.")
 (define-public arb
   (package
    (name "arb")
-   (version "2.8.1")
+   (version "2.10.0")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -320,8 +325,7 @@ fast arithmetic.")
             (file-name (string-append name "-" version ".tar.gz"))
             (sha256
               (base32
-                "04hhcpshfkcq9fr4hixbhpps50yf9drk62xgkvlcaj5kb4nyrx7l"))
-            (patches (search-patches "arb-ldconfig.patch"))))
+                "0jwcv9ssvi8axb1y7m2h4ykgyl015cl6g28gfl92l4dgnag585ak"))))
    (build-system gnu-build-system)
    (propagated-inputs
     `(("flint" ,flint))) ; flint.h is included by arf.h
@@ -330,22 +334,21 @@ fast arithmetic.")
       ("mpfr" ,mpfr)))
    (arguments
     `(#:phases
-        (alist-replace
-         'configure
-         (lambda* (#:key inputs outputs #:allow-other-keys)
-           (let ((out (assoc-ref outputs "out"))
-                 (flint (assoc-ref inputs "flint"))
-                 (gmp (assoc-ref inputs "gmp"))
-                 (mpfr (assoc-ref inputs "mpfr")))
-             ;; do not pass "--enable-fast-install", which makes the
-             ;; homebrew configure process fail
-             (zero? (system*
-                     "./configure"
-                     (string-append "--prefix=" out)
-                     (string-append "--with-flint=" flint)
-                     (string-append "--with-gmp=" gmp)
-                     (string-append "--with-mpfr=" mpfr)))))
-         %standard-phases)))
+      (modify-phases %standard-phases
+        (replace 'configure
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out"))
+                  (flint (assoc-ref inputs "flint"))
+                  (gmp (assoc-ref inputs "gmp"))
+                  (mpfr (assoc-ref inputs "mpfr")))
+              ;; do not pass "--enable-fast-install", which makes the
+              ;; homebrew configure process fail
+              (zero? (system*
+                      "./configure"
+                      (string-append "--prefix=" out)
+                      (string-append "--with-flint=" flint)
+                      (string-append "--with-gmp=" gmp)
+                      (string-append "--with-mpfr=" mpfr)))))))))
    (synopsis "Arbitrary precision floating-point ball arithmetic")
    (description
     "Arb is a C library for arbitrary-precision floating-point ball
@@ -468,35 +471,22 @@ binary.")
 (define-public bc
   (package
     (name "bc")
-    (version "1.06")
+    (version "1.07.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
              (sha256
               (base32
-               "0cqf5jkwx6awgd2xc2a0mkpxilzcfmhncdcfg7c9439wgkqxkxjf"))))
+               "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))))
     (build-system gnu-build-system)
-    (inputs `(("readline" ,readline)))
-    (native-inputs `(("flex" ,flex)))
+    (native-inputs
+     `(("ed" ,ed)
+       ("flex" ,flex)
+       ("texinfo" ,texinfo)))
     (arguments
-     '(#:phases
-       (alist-replace 'configure
-                      (lambda* (#:key outputs #:allow-other-keys)
-                        ;; This old `configure' script doesn't support
-                        ;; variables passed as arguments.
-                        (let ((out (assoc-ref outputs "out")))
-                          (setenv "CONFIG_SHELL" (which "bash"))
-                          (zero?
-                           (system*
-                            "./configure"
-                            (string-append "--prefix=" out)
-                            ;; By default, man and info pages are put in
-                            ;; PREFIX/{man,info}, but we want them in
-                            ;; PREFIX/share/{man,info}.
-                            (string-append "--mandir=" out "/share/man")
-                            (string-append "--infodir=" out "/share/info")))))
-                      %standard-phases)))
-    (home-page "http://www.gnu.org/software/bc/")
+     '(#:configure-flags
+       (list "--with-readline")))
+    (home-page "https://www.gnu.org/software/bc/")
     (synopsis "Arbitrary precision numeric processing language")
     (description
      "bc is an arbitrary precision numeric processing language.  It includes
@@ -544,7 +534,8 @@ a C program.")
                "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:configure-flags '("--enable-shared" "--enable-openmp")
+     '(#:configure-flags
+       '("--enable-shared" "--enable-openmp" "--enable-threads")
        #:phases (alist-cons-before
                  'build 'no-native
                  (lambda _