Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
704197f4 | 2 | ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> |
24aaf2f2 | 3 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
c44899a2 | 4 | ;;; |
233e7676 | 5 | ;;; This file is part of GNU Guix. |
c44899a2 | 6 | ;;; |
233e7676 | 7 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
c44899a2 LC |
8 | ;;; under the terms of the GNU General Public License as published by |
9 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
10 | ;;; your option) any later version. | |
11 | ;;; | |
233e7676 | 12 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
c44899a2 LC |
13 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | ;;; GNU General Public License for more details. | |
16 | ;;; | |
17 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 18 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
c44899a2 | 19 | |
1ffa7090 | 20 | (define-module (gnu packages multiprecision) |
4a44e743 | 21 | #:use-module (guix licenses) |
59a43334 | 22 | #:use-module (gnu packages) |
1ffa7090 | 23 | #:use-module (gnu packages m4) |
c44899a2 | 24 | #:use-module (guix packages) |
87f5d366 | 25 | #:use-module (guix download) |
24aaf2f2 | 26 | #:use-module (guix utils) |
c44899a2 LC |
27 | #:use-module (guix build-system gnu)) |
28 | ||
29 | (define-public gmp | |
30 | (package | |
31 | (name "gmp") | |
722111ab | 32 | (version "6.0.0a") |
c44899a2 | 33 | (source (origin |
87f5d366 | 34 | (method url-fetch) |
704197f4 | 35 | (uri |
93a6f552 AE |
36 | (string-append "mirror://gnu/gmp/gmp-" |
37 | version ".tar.xz")) | |
c44899a2 LC |
38 | (sha256 |
39 | (base32 | |
24aaf2f2 MW |
40 | "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli")) |
41 | (patches (list (search-patch "gmp-arm-asm-nothumb.patch"))))) | |
c44899a2 LC |
42 | (build-system gnu-build-system) |
43 | (native-inputs `(("m4" ,m4))) | |
9bf62d9b | 44 | (outputs '("out" "debug")) |
c44899a2 LC |
45 | (arguments `(#:configure-flags |
46 | '(;; Build a "fat binary", with routines for several | |
47 | ;; sub-architectures. | |
48 | "--enable-fat" | |
24aaf2f2 MW |
49 | "--enable-cxx" |
50 | ||
51 | ;; FIXME: gmp-6.0.0a's config.guess fails on | |
52 | ;; multi-core armhf systems. | |
53 | ,@(if (%current-target-system) | |
54 | '() | |
55 | (let ((triplet | |
56 | (nix-system->gnu-triplet (%current-system)))) | |
57 | (list (string-append "--build=" triplet))))))) | |
f50d2669 | 58 | (synopsis "Multiple-precision arithmetic library") |
c44899a2 | 59 | (description |
a22dc0c4 LC |
60 | "GMP is a library for arbitrary precision arithmetic, operating on |
61 | signed integers, rational numbers and floating point numbers. The precision | |
62 | is only limited by the available memory. The library is highly optimized, | |
63 | with a design focus on execution speed. It is aimed at use in, for example, | |
64 | cryptography and computational algebra.") | |
4a44e743 | 65 | (license lgpl3+) |
c44899a2 LC |
66 | (home-page "http://gmplib.org/"))) |
67 | ||
68 | (define-public mpfr | |
69 | (package | |
70 | (name "mpfr") | |
14a3a673 | 71 | (version "3.1.2") |
c44899a2 | 72 | (source (origin |
87f5d366 | 73 | (method url-fetch) |
0db342a5 | 74 | (uri (string-append "mirror://gnu/mpfr/mpfr-" version |
c44899a2 LC |
75 | ".tar.xz")) |
76 | (sha256 (base32 | |
14a3a673 | 77 | "0fs501qi8l523gs3cpy4jjcnvwxggyfbklcys80wq236xx3hz79r")))) |
c44899a2 | 78 | (build-system gnu-build-system) |
9bf62d9b | 79 | (outputs '("out" "debug")) |
a6ef51e3 | 80 | (propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h> |
f50d2669 | 81 | (synopsis "C library for arbitrary precision floating-point arithmetic") |
c44899a2 | 82 | (description |
79c311b8 LC |
83 | "GNU MPFR is a C library for performing multiple-precision, |
84 | floating-point computations with correct rounding.") | |
4a44e743 | 85 | (license lgpl3+) |
c44899a2 LC |
86 | (home-page "http://www.mpfr.org/"))) |
87 | ||
88 | (define-public mpc | |
89 | (package | |
90 | (name "mpc") | |
fcaa7523 | 91 | (version "1.0.2") |
c44899a2 | 92 | (source (origin |
87f5d366 | 93 | (method url-fetch) |
c44899a2 | 94 | (uri (string-append |
8e1cd713 | 95 | "mirror://gnu/mpc/mpc-" version ".tar.gz")) |
c44899a2 | 96 | (sha256 (base32 |
fcaa7523 | 97 | "1264h3ivldw5idph63x35dqqdzqqbxrm5vlir0xyx727i96zaqdm")))) |
c44899a2 | 98 | (build-system gnu-build-system) |
9bf62d9b | 99 | (outputs '("out" "debug")) |
a6ef51e3 LC |
100 | (propagated-inputs `(("gmp" ,gmp) ; <mpc.h> refers to both |
101 | ("mpfr" ,mpfr))) | |
f50d2669 | 102 | (synopsis "C library for arbitrary precision complex arithmetic") |
c44899a2 | 103 | (description |
a22dc0c4 LC |
104 | "GNU MPC is a C library for performing arithmetic on complex numbers. |
105 | It supports arbitrarily high precision and it correctly rounds the results.") | |
4a44e743 | 106 | (license lgpl3+) |
c44899a2 | 107 | (home-page "http://mpc.multiprecision.org/"))) |