You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
4.2 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013 Ludovic Courtès <>
;;; Copyright © 2014 Mark H Weaver <>
;;; Copyright © 2015 Andreas Enge <>
;;; This file is part of GNU Guix.
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages multiprecision)
#:use-module (guix licenses)
#:use-module (gnu packages)
#:use-module (gnu packages m4)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix utils)
#:use-module (guix build-system gnu))
(define-public gmp
(name "gmp")
(version "6.0.0a")
(source (origin
(method url-fetch)
(string-append "mirror://gnu/gmp/gmp-"
version ".tar.xz"))
(patches (list (search-patch "gmp-arm-asm-nothumb.patch")))))
(build-system gnu-build-system)
(native-inputs `(("m4" ,m4)))
(outputs '("out" "debug"))
(arguments `(#:configure-flags
'(;; Build a "fat binary", with routines for several
;; sub-architectures.
;; FIXME: gmp-6.0.0a's config.guess fails on
;; multi-core armhf systems.
,@(if (%current-target-system)
(let ((triplet
(nix-system->gnu-triplet (%current-system))))
(list (string-append "--build=" triplet)))))))
(synopsis "Multiple-precision arithmetic library")
"GMP is a library for arbitrary precision arithmetic, operating on
signed integers, rational numbers and floating point numbers. The precision
is only limited by the available memory. The library is highly optimized,
with a design focus on execution speed. It is aimed at use in, for example,
cryptography and computational algebra.")
(license lgpl3+)
(home-page "")))
(define-public mpfr
(name "mpfr")
(version "3.1.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/mpfr/mpfr-" version
(sha256 (base32
(build-system gnu-build-system)
(outputs '("out" "debug"))
(propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h>
(synopsis "C library for arbitrary precision floating-point arithmetic")
"GNU MPFR is a C library for performing multiple-precision,
floating-point computations with correct rounding.")
(license lgpl3+)
(home-page "")))
(define-public mpc
(name "mpc")
(version "1.0.3")
(source (origin
(method url-fetch)
(uri (string-append
"mirror://gnu/mpc/mpc-" version ".tar.gz"))
(build-system gnu-build-system)
(outputs '("out" "debug"))
(propagated-inputs `(("gmp" ,gmp) ; <mpc.h> refers to both
("mpfr" ,mpfr)))
(synopsis "C library for arbitrary precision complex arithmetic")
"GNU MPC is a C library for performing arithmetic on complex numbers.
It supports arbitrarily high precision and it correctly rounds the results.")
(license lgpl3+)
(home-page "")))