;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
+;;; 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 © 2014 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
(define-module (gnu packages algebra)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages doxygen)
+ #: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 perl)
#:use-module (gnu packages readline)
#:use-module (gnu packages flex)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages tcsh)
+ #:use-module (gnu packages texlive)
+ #:use-module (gnu packages xiph)
+ #:use-module (gnu packages xorg)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
(define-public cm
(package
(name "cm")
- (version "0.2.1")
+ (version "0.3")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.gz"))
(sha256
(base32
- "1r5dx5qy0ka2sq26n9jll9iy4sjqg0jp5r3jnbjhpgxvmj8jbhq8"))))
+ "1nf5kr0nqmhbzrsrinky18z0ighjpsmb5cr8zyg8jf04bfbyrfmc"))))
(build-system gnu-build-system)
(propagated-inputs
`(("mpfrcx" ,mpfrcx)
multiplication via floating point approximations. It consists of libraries
that can be called from within a C program and of executable command
line applications.")
- (license license:gpl2+)
+ (license license:gpl3+)
(home-page "http://cm.multiprecision.org/")))
(define-public fplll
(define-public pari-gp
(package
(name "pari-gp")
- (version "2.7.4")
+ (version "2.7.5")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.gz"))
(sha256
(base32
- "0k1qqagfl6zn7gvwmsqffj6g9yrzqvszwh2mblhmxpjlw1pigfh8"))))
+ "0c8l83a0gjq73r9hndsrzkypwxvnnm4pxkkzbg6jm95m80nzwh11"))))
(build-system gnu-build-system)
+ (native-inputs `(("texlive" ,texlive-minimal)))
(inputs `(("gmp" ,gmp)
+ ("libx11" ,libx11)
("perl" ,perl)
("readline" ,readline)))
(arguments
- '(#:make-flags '("gp")
- ;; FIXME: building the documentation requires tex; once this is
- ;; available, replace "gp" by "all"
+ '(#:make-flags '("all")
#:test-target "dobench"
- #:phases
- (alist-replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (zero?
- (system* "./Configure" (string-append "--prefix=" out)))))
- %standard-phases)))
+ #:phases (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (zero?
+ (system* "./Configure"
+ (string-append "--prefix=" out)))))))))
(synopsis "PARI/GP, a computer algebra system for number theory")
(description
"PARI/GP is a widely used computer algebra system designed for fast
(define-public gp2c
(package
(name "gp2c")
- (version "0.0.9pl3")
+ (version "0.0.9pl5")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.gz"))
(sha256
(base32
- "0wbghihwlcx3w4j1la3bjf5gcrkk6lp9syw6iimqndq1f73ijlq3"))))
+ "1q003mkagc5ib6lqb2xfay7j4ffkwv7xlnznp6wdrq2sbqq4vyak"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl)))
(inputs `(("pari-gp" ,pari-gp)))
(license license:gpl2)
(home-page "http://pari.math.u-bordeaux.fr/")))
+(define-public giac-xcas
+ (package
+ (name "giac-xcas")
+ (version "1.2.2-37")
+ (source (origin
+ (method url-fetch)
+ ;; "~parisse/giac" is not used because the maintainer regularly
+ ;; overwrites the release tarball there, introducing a checksum
+ ;; mismatch every time. See
+ ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
+ (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
+ "~parisse/debian/dists/stable/main/"
+ "source/giac_" version ".tar.gz"))
+ (sha256
+ (base32
+ "0cagh9nnaz7ks299b2bs3lrdclv4xbyis24zc8vf3i25p470bxsf"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-bin-cp
+ (lambda _
+ ;; Some Makefiles contain hard-coded "/bin/cp".
+ (substitute* (find-files "doc" "^Makefile")
+ (("/bin/cp") (which "cp")))
+ #t))
+ (add-after 'unpack 'disable-broken-test
+ (lambda _
+ ;; Disable failing test. Actually, the results are correct but
+ ;; a sorting discrepancy prevents the test from being validated.
+ (substitute* "check/Makefile.in"
+ (("chk_fhan16") ""))
+ #t)))))
+ (inputs
+ `(("fltk" ,fltk)
+ ("gmp" ,gmp)
+ ("gsl" ,gsl)
+ ("lapack" ,lapack)
+ ("libao" ,ao)
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libx11" ,libx11)
+ ("libxft" ,libxft)
+ ("libxt" ,libxt)
+ ("mesa" ,mesa)
+ ("mpfi" ,mpfi)
+ ("mpfr" ,mpfr)
+ ("ntl" ,ntl)
+ ("perl" ,perl)
+ ("pari-gp" ,pari-gp)
+ ("tcsh" ,tcsh)
+ ("texlive" ,texlive-minimal)))
+ (native-inputs `(("readline" ,readline)))
+ (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
+ (synopsis "Computer algebra system")
+ (description
+ "Giac/Xcas is a computer algebra system. It has a compatibility mode for
+maple, mupad and the TI89. It is available as a standalone program (graphic
+or text interfaces) or as a C++ library.")
+ (license license:gpl3+)))
+
(define-public flint
(package
(name "flint")
- (version "2.4.5")
+ (version "2.5.2")
(source (origin
(method url-fetch)
(uri (string-append
"http://flintlib.org/flint-"
version ".tar.gz"))
(sha256 (base32
- "1qq11sxliy499a9g656dgk47ffb951q4gl6ddjbq838gy16kb2g4"))))
+ "11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb"))
+ (patches (search-patches "flint-ldconfig.patch"))))
(build-system gnu-build-system)
(propagated-inputs
`(("gmp" ,gmp)
("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
(arguments
- `(#:phases
+ `(#:parallel-tests? #f ; seems to be necessary on arm
+ #:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(gmp (assoc-ref inputs "gmp"))
(mpfr (assoc-ref inputs "mpfr")))
- ;; Drop test failing with gmp-6 due to changed invertibility
- ;; of 0 in Z/1 Z, which according to the flint authors has no
- ;; impact on flint.
- ;; FIXME: Drop with later version.
- (delete-file "fmpz/test/t-invmod.c")
;; do not pass "--enable-fast-install", which makes the
;; homebrew configure process fail
(zero? (system*
(define-public arb
(package
(name "arb")
- (version "2.7.0")
+ (version "2.8.1")
(source (origin
(method url-fetch)
(uri (string-append
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "1rwkffs57v8mry63rq8l2dyw69zfs9rg5fpbfllqp3nkjnkp1fly"))))
+ "04hhcpshfkcq9fr4hixbhpps50yf9drk62xgkvlcaj5kb4nyrx7l"))
+ (patches (search-patches "arb-ldconfig.patch"))))
(build-system gnu-build-system)
(propagated-inputs
`(("flint" ,flint))) ; flint.h is included by arf.h
(license license:gpl2+)
(home-page "http://fredrikj.net/arb/")))
+(define-public ntl
+ (package
+ (name "ntl")
+ (version "9.7.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://shoup.net/ntl/ntl-"
+ version ".tar.gz"))
+ (sha256 (base32
+ "115frp5flyvw9wghz4zph1b3llmr5nbxk1skgsggckr81fh3gmxq"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("libtool" ,libtool)
+ ("perl" ,perl))) ; for configuration
+ ;; FIXME: Add optional input gf2x once available; then also add
+ ;; configure flag "NTL_GF2X_LIB=on".
+ (inputs
+ `(("gmp" ,gmp)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (chdir "src")
+ (system* "./configure"
+ (string-append "PREFIX=" (assoc-ref outputs "out"))
+ ;; Do not build especially for the build machine.
+ "NATIVE=off"
+ ;; Also do not tune to the build machine.
+ "WIZARD=off"
+ "SHARED=on")
+ #t)))))
+ (synopsis "C++ library for number theory")
+ (description
+ "NTL is a C++ library providing data structures and algorithms
+for manipulating signed, arbitrary length integers, and for vectors,
+matrices, and polynomials over the integers and over finite fields.")
+ (license license:gpl2+)
+ (home-page "http://shoup.net/ntl/")))
+
+(define-public singular
+ (package
+ (name "singular")
+ (version "4.0.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.mathematik.uni-kl.de/ftp/pub/"
+ "Math/Singular/SOURCES/"
+ (string-join (string-split version #\.) "-")
+ "/singular-" version ".tar.gz"))
+ (sha256 (base32
+ "0viidy2fz62rln9p0s9qfs7fnm55c6fw1agydd1py26gxylp1ksc"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("doxygen" ,doxygen)
+ ("graphviz" ,graphviz)
+ ("perl" ,perl)))
+ (inputs
+ `(("cddlib" ,cddlib)
+ ("gmp" ,gmp)
+ ("flint" ,flint)
+ ("mpfr" ,mpfr)
+ ("ntl" ,ntl)
+ ("python" ,python-2)
+ ("readline" ,readline)))
+ (arguments
+ `(#:configure-flags
+ (list (string-append "--with-ntl="
+ (assoc-ref %build-inputs "ntl")))))
+ (synopsis "Computer algebra system for polynomial computations")
+ (description
+ "Singular is a computer algebra system for polynomial computations,
+with special emphasis on commutative and non-commutative algebra, algebraic
+geometry and singularity theory.")
+ ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
+ ;; libraries with which it links are licensed under lgpl3+, so the
+ ;; combined work becomes gpl3. See COPYING in the source code.
+ (license license:gpl3)
+ (home-page "http://www.singular.uni-kl.de/index.php")))
+
+(define-public gmp-ecm
+ (package
+ (name "gmp-ecm")
+ (version "7.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://gforge.inria.fr/frs/download.php/"
+ "file/35642/ecm-"
+ version ".tar.gz"))
+ (sha256 (base32
+ "00jzzwqp49m01vwsr9z1w7bvm8lb69l3f62x7qr8sfz0xiczxnpm"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("gmp" ,gmp)))
+ (arguments
+ `(#:configure-flags '("--enable-shared"
+ ;; Disable specific assembly routines, which depend
+ ;; on the subarchitecture of the build machine,
+ ;; and use gmp instead.
+ "--disable-asm-redc")))
+ (synopsis "Integer factorization library using the elliptic curve method")
+ (description
+ "GMP-ECM factors integers using the elliptic curve method (ECM) as well
+as the P-1 and P+1 algorithms. It provides a library and a stand-alone
+binary.")
+ ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
+ ;; so the combined work is under gpl3+.
+ (license license:gpl3+)
+ (home-page "http://ecm.gforge.inria.fr/")))
+
(define-public bc
(package
(name "bc")
(define-public eigen
(package
(name "eigen")
- (version "3.2.5")
+ (version "3.2.7")
(source (origin
(method url-fetch)
(uri (string-append "https://bitbucket.org/eigen/eigen/get/"
version ".tar.bz2"))
(sha256
(base32
- "1yf27mfq1x38wlsghkvpjgs8xd5rvbbikf1wyj2l3qw8h6w6qvjz"))
+ "0gigbjjdlw2q0gvcnyiwc6in314a647rkidk6977bwiwn88im3p5"))
+ (file-name (string-append name "-" version ".tar.bz2"))
(modules '((guix build utils)))
(snippet
;; There are 3 test failures in the "unsupported" directory,
;; anyway, so just skip them.
'(substitute* "CMakeLists.txt"
(("add_subdirectory\\(unsupported\\)")
- "# Do not build the tests for unsupported features.\n")))))
+ "# Do not build the tests for unsupported features.\n")
+ ;; Work around
+ ;; <http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1114>.
+ (("\"include/eigen3\"")
+ "\"${CMAKE_INSTALL_PREFIX}/include/eigen3\"")))))
(build-system cmake-build-system)
(arguments
'(;; Turn off debugging symbols to save space.
#:build-type "Release"
- ;; Use 'make check', as per
- ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
- #:test-target "check"
-
- #:phases (alist-cons-before
- 'check 'build-tests
- (lambda _
- ;; First build the tests, in parallel.
- ;; See <http://eigen.tuxfamily.org/index.php?title=Tests>.
- (let* ((cores (parallel-job-count))
- (dash-j (format #f "-j~a" cores)))
- ;; These variables are supposed to be honored.
- (setenv "EIGEN_MAKE_ARGS" dash-j)
- (setenv "EIGEN_CTEST_ARGS" dash-j)
+ #:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (let* ((cores (parallel-job-count))
+ (dash-j (format #f "-j~a" cores)))
+ ;; First build the tests, in parallel. See
+ ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
+ (and (zero? (system* "make" "buildtests" dash-j))
- (zero? (system* "make" "buildtests" dash-j))))
- %standard-phases)))
+ ;; Then run 'CTest' with -V so we get more
+ ;; details upon failure.
+ (zero? (system* "ctest" "-V" dash-j)))))))))
(home-page "http://eigen.tuxfamily.org")
(synopsis "C++ template library for linear algebra")
(description