gnu: libtasn1: Remove obsolete patch.
[jackhill/guix/guix.git] / gnu / packages / multiprecision.scm
index 008d8c0..b6d2d7f 100644 (file)
@@ -2,6 +2,8 @@
 ;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30,7 +32,7 @@
 (define-public gmp
   (package
    (name "gmp")
-   (version "6.1.0")
+   (version "6.1.2")
    (source (origin
             (method url-fetch)
             (uri
                             version ".tar.xz"))
             (sha256
              (base32
-              "12b9s4jn48gbar6dbs5qrlmljdmnq43xy3ji9yjzic0mwp6dmnk8"))
-            (patches (map search-patch
-                          '("gmp-faulty-test.patch")))))
+              "04hrwahdxyqdik559604r7wrj9ffklwvipgfxgj4ys4skbl6bdc7"))
+            (patches (search-patches "gmp-faulty-test.patch"))))
    (build-system gnu-build-system)
    (native-inputs `(("m4" ,m4)))
    (outputs '("out" "debug"))
-   (arguments `(#:configure-flags
+   (arguments `(#:parallel-tests? #f ; mpz/reuse fails otherwise
+                #:configure-flags
                 '(;; Build a "fat binary", with routines for several
                   ;; sub-architectures.
                   "--enable-fat"
-                  "--enable-cxx")))
+                  "--enable-cxx"
+                  ,@(cond ((target-mingw?)
+                           ;; Static and shared cannot be built in one go:
+                           ;; they produce different headers.  We need shared.
+                           `("--disable-static"
+                             "--enable-shared"))
+                          (else '())))))
    (synopsis "Multiple-precision arithmetic library")
    (description
     "GMP is a library for arbitrary precision arithmetic, operating on
@@ -59,16 +67,33 @@ cryptography and computational algebra.")
    (license lgpl3+)
    (home-page "http://gmplib.org/")))
 
+(define-public gmp-6.0
+  ;; We keep this one around to bootstrap GCC, to work around a compilation
+  ;; issue on ARM.  See
+  ;; <https://gmplib.org/list-archives/gmp-bugs/2015-December/003848.html>.
+  (package
+    (inherit gmp)
+    (version "6.0.0a")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gmp/gmp-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"))
+              (patches (search-patches "gmp-arm-asm-nothumb.patch"
+                                       "gmp-faulty-test.patch"))))))
+
 (define-public mpfr
   (package
    (name "mpfr")
-   (version "3.1.3")
+   (version "3.1.5")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/mpfr/mpfr-" version
                                 ".tar.xz"))
             (sha256 (base32
-                     "05jaa5z78lvrayld09nyr0v27c1m5dm9l7kr85v2bj4jv65s0db8"))))
+                     "1g32l2fg8f62lcyzzh88y3fsh6rk539qc6ahhdgvx7wpnf1dwpq1"))))
    (build-system gnu-build-system)
    (outputs '("out" "debug"))
    (propagated-inputs `(("gmp" ,gmp)))            ; <mpfr.h> refers to <gmp.h>
@@ -100,3 +125,28 @@ floating-point computations with correct rounding.")
 It supports arbitrarily high precision and it correctly rounds the results.")
    (license lgpl3+)
    (home-page "http://mpc.multiprecision.org/")))
+
+(define-public mpfi
+  (package
+    (name "mpfi")
+    (version "1.5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://gforge.inria.fr/frs/download.php/"
+                                  "file/30130/mpfi-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1g2q6i7dqx40p4gw11da6jgfcbzmm26wxc69fwv8zpcdyg32a9za"))))
+    (build-system gnu-build-system)
+    (propagated-inputs `(("gmp" ,gmp)   ; <mpfi.h> refers to both
+                         ("mpfr" ,mpfr)))
+    (synopsis "C library for arbitrary precision interval arithmetic")
+    (description "MPFI is intended to be a portable library written in C for
+arbitrary precision interval arithmetic with intervals represented using MPFR
+reliable floating-point numbers.  It is based on the GNU MP library and on the
+MPFR library.  The purpose of an arbitrary precision interval arithmetic is on
+the one hand to get guaranteed results, thanks to interval computation, and on
+the other hand to obtain accurate results, thanks to multiple precision
+arithmetic.")
+    (license lgpl2.1+)
+    (home-page "https://perso.ens-lyon.fr/nathalie.revol/software.html")))