Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / algebra.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017 Nicolas Goaziou <mail@nicolasgoaziou.fr>
5 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
8 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages algebra)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages documentation)
30 #:use-module (gnu packages ed)
31 #:use-module (gnu packages flex)
32 #:use-module (gnu packages fltk)
33 #:use-module (gnu packages gl)
34 #:use-module (gnu packages graphviz)
35 #:use-module (gnu packages image)
36 #:use-module (gnu packages maths)
37 #:use-module (gnu packages mpi)
38 #:use-module (gnu packages multiprecision)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages python)
41 #:use-module (gnu packages readline)
42 #:use-module (gnu packages shells)
43 #:use-module (gnu packages tex)
44 #:use-module (gnu packages texinfo)
45 #:use-module (gnu packages xiph)
46 #:use-module (gnu packages xorg)
47 #:use-module (guix build-system gnu)
48 #:use-module (guix build-system cmake)
49 #:use-module (guix download)
50 #:use-module ((guix licenses) #:prefix license:)
51 #:use-module (guix packages)
52 #:use-module (guix utils))
53
54
55 (define-public mpfrcx
56 (package
57 (name "mpfrcx")
58 (version "0.4.2")
59 (source (origin
60 (method url-fetch)
61 (uri (string-append
62 "http://www.multiprecision.org/mpfrcx/download/mpfrcx-"
63 version ".tar.gz"))
64 (sha256
65 (base32
66 "0grw66b255r574lvll1bqccm5myj2m8ajzsjaygcyq9zjnnbnhhy"))))
67 (build-system gnu-build-system)
68 (propagated-inputs
69 `(("gmp" ,gmp)
70 ("mpfr" ,mpfr)
71 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
72 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
73 (description
74 "Mpfrcx is a library for the arithmetic of univariate polynomials over
75 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
76 on the rounding. For the time being, only the few functions needed to
77 implement the floating point approach to complex multiplication are
78 implemented. On the other hand, these comprise asymptotically fast
79 multiplication routines such as Toom–Cook and the FFT.")
80 (license license:lgpl2.1+)
81 (home-page "http://mpfrcx.multiprecision.org/")))
82
83 (define-public cm
84 (package
85 (name "cm")
86 (version "0.3")
87 (source (origin
88 (method url-fetch)
89 (uri (string-append
90 "http://www.multiprecision.org/cm/download/cm-"
91 version ".tar.gz"))
92 (sha256
93 (base32
94 "1nf5kr0nqmhbzrsrinky18z0ighjpsmb5cr8zyg8jf04bfbyrfmc"))))
95 (build-system gnu-build-system)
96 (propagated-inputs
97 `(("mpfrcx" ,mpfrcx)
98 ("zlib" ,zlib))) ; Header files included from cm_common.h.
99 (inputs
100 `(("pari-gp" ,pari-gp)))
101 (synopsis "CM constructions for elliptic curves")
102 (description
103 "The CM software implements the construction of ring class fields of
104 imaginary quadratic number fields and of elliptic curves with complex
105 multiplication via floating point approximations. It consists of libraries
106 that can be called from within a C program and of executable command
107 line applications.")
108 (license license:gpl3+)
109 (home-page "http://cm.multiprecision.org/")))
110
111 (define-public fplll
112 (package
113 (name "fplll")
114 (version "4.0.4")
115 (source (origin
116 (method url-fetch)
117 (uri (string-append
118 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
119 version ".tar.gz"))
120 (sha256 (base32
121 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))
122 (build-system gnu-build-system)
123 (inputs `(("gmp" ,gmp)
124 ("mpfr" ,mpfr)))
125 (synopsis "Library for LLL-reduction of euclidean lattices")
126 (description
127 "fplll LLL-reduces euclidean lattices. Since version 3, it can also
128 solve the shortest vector problem.")
129 (license license:lgpl2.1+)
130 (home-page "http://perso.ens-lyon.fr/damien.stehle/fplll/")))
131
132 (define-public pari-gp
133 (package
134 (name "pari-gp")
135 (version "2.9.2")
136 (source (origin
137 (method url-fetch)
138 (uri (string-append
139 "http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
140 version ".tar.gz"))
141 (sha256
142 (base32
143 "0zi08qz9nk17wwdna4xb2vp3i3mh5sgv1y8wqbf0j2sfryxlr8ls"))))
144 (build-system gnu-build-system)
145 (native-inputs `(("texlive" ,texlive-minimal)))
146 (inputs `(("gmp" ,gmp)
147 ("libx11" ,libx11)
148 ("perl" ,perl)
149 ("readline" ,readline)))
150 (arguments
151 '(#:make-flags '("all")
152 #:test-target "dobench"
153 #:phases (modify-phases %standard-phases
154 (replace 'configure
155 (lambda* (#:key outputs #:allow-other-keys)
156 (let ((out (assoc-ref outputs "out")))
157 (zero?
158 (system* "./Configure"
159 (string-append "--prefix=" out)))))))))
160 (synopsis "PARI/GP, a computer algebra system for number theory")
161 (description
162 "PARI/GP is a widely used computer algebra system designed for fast
163 computations in number theory (factorisations, algebraic number theory,
164 elliptic curves...), but it also contains a large number of other useful
165 functions to compute with mathematical entities such as matrices,
166 polynomials, power series, algebraic numbers, etc., and a lot of
167 transcendental functions.
168 PARI is also available as a C library to allow for faster computations.")
169 (license license:gpl2+)
170 (home-page "http://pari.math.u-bordeaux.fr/")))
171
172 (define-public gp2c
173 (package
174 (name "gp2c")
175 (version "0.0.10")
176 (source (origin
177 (method url-fetch)
178 (uri (string-append
179 "http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
180 version ".tar.gz"))
181 (sha256
182 (base32
183 "1xhpz5p81iw261ay1kip283ggr0ir8ydz8qx3v24z8jfms1r3y70"))))
184 (build-system gnu-build-system)
185 (native-inputs `(("perl" ,perl)))
186 (inputs `(("pari-gp" ,pari-gp)))
187 (arguments
188 '(#:configure-flags
189 (list (string-append "--with-paricfg="
190 (assoc-ref %build-inputs "pari-gp")
191 "/lib/pari/pari.cfg"))))
192 (synopsis "PARI/GP, a computer algebra system for number theory")
193 (description
194 "PARI/GP is a widely used computer algebra system designed for fast
195 computations in number theory (factorisations, algebraic number theory,
196 elliptic curves...), but it also contains a large number of other useful
197 functions to compute with mathematical entities such as matrices,
198 polynomials, power series, algebraic numbers, etc., and a lot of
199 transcendental functions.
200 PARI is also available as a C library to allow for faster computations.
201
202 GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
203 (license license:gpl2)
204 (home-page "http://pari.math.u-bordeaux.fr/")))
205
206 (define-public giac-xcas
207 (package
208 (name "giac-xcas")
209 (version "1.2.3-37")
210 (source (origin
211 (method url-fetch)
212 ;; "~parisse/giac" is not used because the maintainer regularly
213 ;; overwrites the release tarball there, introducing a checksum
214 ;; mismatch every time. See
215 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
216 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
217 "~parisse/debian/dists/stable/main/"
218 "source/giac_" version ".tar.gz"))
219 (sha256
220 (base32
221 "180146rm8fxlbd6x25x81yscf6q8qjpzr35k203r25c2xkcb7h2x"))))
222 (build-system gnu-build-system)
223 (arguments
224 `(#:phases
225 (modify-phases %standard-phases
226 (add-after 'unpack 'patch-bin-cp
227 (lambda _
228 ;; Some Makefiles contain hard-coded "/bin/cp".
229 (substitute* (find-files "doc" "^Makefile")
230 (("/bin/cp") (which "cp")))
231 #t))
232 (add-after 'unpack 'disable-broken-test
233 (lambda _
234 ;; Disable failing test. Actually, the results are correct but
235 ;; a sorting discrepancy prevents the test from being validated.
236 (substitute* "check/Makefile.in"
237 (("chk_fhan16") ""))
238 #t)))))
239 (inputs
240 `(("fltk" ,fltk)
241 ("gmp" ,gmp)
242 ("gsl" ,gsl)
243 ("lapack" ,lapack)
244 ("libao" ,ao)
245 ("libjpeg" ,libjpeg)
246 ("libpng" ,libpng)
247 ("libx11" ,libx11)
248 ("libxinerama" ,libxinerama)
249 ("libxft" ,libxft)
250 ("libxt" ,libxt)
251 ("mesa" ,mesa)
252 ("mpfi" ,mpfi)
253 ("mpfr" ,mpfr)
254 ("ntl" ,ntl)
255 ("perl" ,perl)
256 ("pari-gp" ,pari-gp)
257 ("tcsh" ,tcsh)
258 ("texlive" ,texlive-minimal)))
259 (native-inputs `(("readline" ,readline)))
260 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
261 (synopsis "Computer algebra system")
262 (description
263 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
264 maple, mupad and the TI89. It is available as a standalone program (graphic
265 or text interfaces) or as a C++ library.")
266 (license license:gpl3+)))
267
268 (define-public flint
269 (package
270 (name "flint")
271 (version "2.5.2")
272 (source (origin
273 (method url-fetch)
274 (uri (string-append
275 "http://flintlib.org/flint-"
276 version ".tar.gz"))
277 (sha256 (base32
278 "11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb"))
279 (patches (search-patches "flint-ldconfig.patch"))))
280 (build-system gnu-build-system)
281 (propagated-inputs
282 `(("gmp" ,gmp)
283 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
284 (arguments
285 `(#:parallel-tests? #f ; seems to be necessary on arm
286 #:phases
287 (modify-phases %standard-phases
288 (replace 'configure
289 (lambda* (#:key inputs outputs #:allow-other-keys)
290 (let ((out (assoc-ref outputs "out"))
291 (gmp (assoc-ref inputs "gmp"))
292 (mpfr (assoc-ref inputs "mpfr")))
293 ;; do not pass "--enable-fast-install", which makes the
294 ;; homebrew configure process fail
295 (zero? (system*
296 "./configure"
297 (string-append "--prefix=" out)
298 (string-append "--with-gmp=" gmp)
299 (string-append "--with-mpfr=" mpfr)))))))))
300 (synopsis "Fast library for number theory")
301 (description
302 "FLINT is a C library for number theory. It supports arithmetic
303 with numbers, polynomials, power series and matrices over many base
304 rings, including multiprecision integers and rationals, integers
305 modulo n, p-adic numbers, finite fields (prime and non-prime order)
306 and real and complex numbers (via the Arb extension library).
307
308 Operations that can be performed include conversions, arithmetic,
309 GCDs, factoring, solving linear systems, and evaluating special
310 functions. In addition, FLINT provides various low-level routines for
311 fast arithmetic.")
312 (license license:gpl2+)
313 (home-page "http://flintlib.org/")))
314
315 (define-public arb
316 (package
317 (name "arb")
318 (version "2.10.0")
319 (source (origin
320 (method url-fetch)
321 (uri (string-append
322 "https://github.com/fredrik-johansson/arb/archive/"
323 version ".tar.gz"))
324 (file-name (string-append name "-" version ".tar.gz"))
325 (sha256
326 (base32
327 "0jwcv9ssvi8axb1y7m2h4ykgyl015cl6g28gfl92l4dgnag585ak"))))
328 (build-system gnu-build-system)
329 (propagated-inputs
330 `(("flint" ,flint))) ; flint.h is included by arf.h
331 (inputs
332 `(("gmp" ,gmp)
333 ("mpfr" ,mpfr)))
334 (arguments
335 `(#:phases
336 (alist-replace
337 'configure
338 (lambda* (#:key inputs outputs #:allow-other-keys)
339 (let ((out (assoc-ref outputs "out"))
340 (flint (assoc-ref inputs "flint"))
341 (gmp (assoc-ref inputs "gmp"))
342 (mpfr (assoc-ref inputs "mpfr")))
343 ;; do not pass "--enable-fast-install", which makes the
344 ;; homebrew configure process fail
345 (zero? (system*
346 "./configure"
347 (string-append "--prefix=" out)
348 (string-append "--with-flint=" flint)
349 (string-append "--with-gmp=" gmp)
350 (string-append "--with-mpfr=" mpfr)))))
351 %standard-phases)))
352 (synopsis "Arbitrary precision floating-point ball arithmetic")
353 (description
354 "Arb is a C library for arbitrary-precision floating-point ball
355 arithmetic. It supports efficient high-precision computation with
356 polynomials, power series, matrices and special functions over the
357 real and complex numbers, with automatic, rigorous error control.")
358 (license license:gpl2+)
359 (home-page "http://fredrikj.net/arb/")))
360
361 (define-public ntl
362 (package
363 (name "ntl")
364 (version "9.7.0")
365 (source (origin
366 (method url-fetch)
367 (uri (string-append "http://shoup.net/ntl/ntl-"
368 version ".tar.gz"))
369 (sha256 (base32
370 "115frp5flyvw9wghz4zph1b3llmr5nbxk1skgsggckr81fh3gmxq"))))
371 (build-system gnu-build-system)
372 (native-inputs
373 `(("libtool" ,libtool)
374 ("perl" ,perl))) ; for configuration
375 ;; FIXME: Add optional input gf2x once available; then also add
376 ;; configure flag "NTL_GF2X_LIB=on".
377 (inputs
378 `(("gmp" ,gmp)))
379 (arguments
380 `(#:phases
381 (modify-phases %standard-phases
382 (replace 'configure
383 (lambda* (#:key outputs #:allow-other-keys)
384 (chdir "src")
385 (system* "./configure"
386 (string-append "PREFIX=" (assoc-ref outputs "out"))
387 ;; Do not build especially for the build machine.
388 "NATIVE=off"
389 ;; Also do not tune to the build machine.
390 "WIZARD=off"
391 "SHARED=on")
392 #t)))))
393 (synopsis "C++ library for number theory")
394 (description
395 "NTL is a C++ library providing data structures and algorithms
396 for manipulating signed, arbitrary length integers, and for vectors,
397 matrices, and polynomials over the integers and over finite fields.")
398 (license license:gpl2+)
399 (home-page "http://shoup.net/ntl/")))
400
401 (define-public singular
402 (package
403 (name "singular")
404 (version "4.0.3")
405 (source (origin
406 (method url-fetch)
407 (uri (string-append "http://www.mathematik.uni-kl.de/ftp/pub/"
408 "Math/Singular/SOURCES/"
409 (string-join (string-split version #\.) "-")
410 "/singular-" version ".tar.gz"))
411 (sha256 (base32
412 "0viidy2fz62rln9p0s9qfs7fnm55c6fw1agydd1py26gxylp1ksc"))))
413 (build-system gnu-build-system)
414 (native-inputs
415 `(("doxygen" ,doxygen)
416 ("graphviz" ,graphviz)
417 ("perl" ,perl)))
418 (inputs
419 `(("cddlib" ,cddlib)
420 ("gmp" ,gmp)
421 ("flint" ,flint)
422 ("mpfr" ,mpfr)
423 ("ntl" ,ntl)
424 ("python" ,python-2)
425 ("readline" ,readline)))
426 (arguments
427 `(#:configure-flags
428 (list (string-append "--with-ntl="
429 (assoc-ref %build-inputs "ntl")))))
430 (synopsis "Computer algebra system for polynomial computations")
431 (description
432 "Singular is a computer algebra system for polynomial computations,
433 with special emphasis on commutative and non-commutative algebra, algebraic
434 geometry and singularity theory.")
435 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
436 ;; libraries with which it links are licensed under lgpl3+, so the
437 ;; combined work becomes gpl3. See COPYING in the source code.
438 (license license:gpl3)
439 (home-page "http://www.singular.uni-kl.de/index.php")))
440
441 (define-public gmp-ecm
442 (package
443 (name "gmp-ecm")
444 (version "7.0")
445 (source (origin
446 (method url-fetch)
447 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
448 "file/35642/ecm-"
449 version ".tar.gz"))
450 (sha256 (base32
451 "00jzzwqp49m01vwsr9z1w7bvm8lb69l3f62x7qr8sfz0xiczxnpm"))))
452 (build-system gnu-build-system)
453 (inputs
454 `(("gmp" ,gmp)))
455 (arguments
456 `(#:configure-flags '("--enable-shared"
457 ;; Disable specific assembly routines, which depend
458 ;; on the subarchitecture of the build machine,
459 ;; and use gmp instead.
460 "--disable-asm-redc")))
461 (synopsis "Integer factorization library using the elliptic curve method")
462 (description
463 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
464 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
465 binary.")
466 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
467 ;; so the combined work is under gpl3+.
468 (license license:gpl3+)
469 (home-page "http://ecm.gforge.inria.fr/")))
470
471 (define-public bc
472 (package
473 (name "bc")
474 (version "1.07.1")
475 (source (origin
476 (method url-fetch)
477 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
478 (sha256
479 (base32
480 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))))
481 (build-system gnu-build-system)
482 (inputs `(("readline" ,readline)))
483 (native-inputs
484 `(("ed" ,ed)
485 ("flex" ,flex)
486 ("texinfo" ,texinfo)))
487 (arguments
488 '(#:configure-flags
489 (list "--with-readline")))
490 (home-page "https://www.gnu.org/software/bc/")
491 (synopsis "Arbitrary precision numeric processing language")
492 (description
493 "bc is an arbitrary precision numeric processing language. It includes
494 an interactive environment for evaluating mathematical statements. Its
495 syntax is similar to that of C, so basic usage is familiar. It also includes
496 \"dc\", a reverse-polish calculator.")
497 (license license:gpl2+)))
498
499 ;; The original kiss-fft does not have a complete build system and does not
500 ;; build any shared libraries. This is a fork used by Extempore.
501 (define-public kiss-fft-for-extempore
502 (package
503 (name "kiss-fft-for-extempore")
504 (version "1.3.0")
505 (source (origin
506 (method url-fetch)
507 (uri (string-append "https://github.com/extemporelang/kiss_fft/archive/"
508 version ".tar.gz"))
509 (file-name (string-append name "-" version ".tar.gz"))
510 (sha256
511 (base32
512 "0hkp9l6l4c92fb1l2sh6a6zv1hynpvb2s4d03vd8vxyvybc0l4pv"))))
513 (build-system cmake-build-system)
514 (arguments `(#:tests? #f)) ; no tests included
515 ;; Extempore refuses to build on architectures other than x86_64
516 (supported-systems '("x86_64-linux"))
517 (home-page "https://github.com/extemporelang/kiss_fft")
518 (synopsis "Mixed-radix Fast Fourier Transform")
519 (description
520 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
521 that can use fixed or floating data types and can easily be incorporated into
522 a C program.")
523 (license license:bsd-3)))
524
525 (define-public fftw
526 (package
527 (name "fftw")
528 (version "3.3.5")
529 (source (origin
530 (method url-fetch)
531 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
532 version".tar.gz"))
533 (sha256
534 (base32
535 "1kwbx92ps0r7s2mqy7lxbxanslxdzj7dp7r7gmdkzv1j8yqf3kwf"))))
536 (build-system gnu-build-system)
537 (arguments
538 '(#:configure-flags
539 '("--enable-shared" "--enable-openmp" "--enable-threads")
540 #:phases (alist-cons-before
541 'build 'no-native
542 (lambda _
543 ;; By default '-mtune=native' is used. However, that may
544 ;; cause the use of ISA extensions (SSE2, etc.) that are
545 ;; not necessarily available on the user's machine when
546 ;; that package is built on a different machine.
547 (substitute* (find-files "." "Makefile$")
548 (("-mtune=native") "")))
549 %standard-phases)))
550 (native-inputs `(("perl" ,perl)))
551 (home-page "http://fftw.org")
552 (synopsis "Computing the discrete Fourier transform")
553 (description
554 "FFTW is a C subroutine library for computing the discrete Fourier
555 transform (DFT) in one or more dimensions, of arbitrary input size, and of
556 both real and complex data (as well as of even/odd data---i.e. the discrete
557 cosine/ sine transforms or DCT/DST).")
558 (license license:gpl2+)))
559
560 (define-public fftwf
561 (package (inherit fftw)
562 (name "fftwf")
563 (arguments
564 (substitute-keyword-arguments (package-arguments fftw)
565 ((#:configure-flags cf)
566 `(cons "--enable-float" ,cf))))
567 (description
568 (string-append (package-description fftw)
569 " Single-precision version."))))
570
571 (define-public fftw-openmpi
572 (package (inherit fftw)
573 (name "fftw-openmpi")
574 (inputs
575 `(("openmpi" ,openmpi)
576 ,@(package-inputs fftw)))
577 (arguments
578 (substitute-keyword-arguments (package-arguments fftw)
579 ((#:configure-flags cf)
580 `(cons "--enable-mpi" ,cf))))
581 (description
582 (string-append (package-description fftw)
583 " With OpenMPI parallelism support."))))
584
585 (define-public eigen
586 (package
587 (name "eigen")
588 (version "3.2.9")
589 (source (origin
590 (method url-fetch)
591 (uri (string-append "https://bitbucket.org/eigen/eigen/get/"
592 version ".tar.bz2"))
593 (sha256
594 (base32
595 "1zs5b210mq7nyanky07li6456rrd0xv2nxf6sl2lhkzdq5p067jd"))
596 (file-name (string-append name "-" version ".tar.bz2"))
597 (modules '((guix build utils)))
598 (snippet
599 ;; There are 3 test failures in the "unsupported" directory,
600 ;; but maintainers say it's a known issue and it's unsupported
601 ;; anyway, so just skip them.
602 '(substitute* "CMakeLists.txt"
603 (("add_subdirectory\\(unsupported\\)")
604 "# Do not build the tests for unsupported features.\n")
605 ;; Work around
606 ;; <http://eigen.tuxfamily.org/bz/show_bug.cgi?id=1114>.
607 (("\"include/eigen3\"")
608 "\"${CMAKE_INSTALL_PREFIX}/include/eigen3\"")))))
609 (build-system cmake-build-system)
610 (arguments
611 '(;; Turn off debugging symbols to save space.
612 #:build-type "Release"
613
614 #:phases (modify-phases %standard-phases
615 (replace 'check
616 (lambda _
617 (let* ((cores (parallel-job-count))
618 (dash-j (format #f "-j~a" cores)))
619 ;; First build the tests, in parallel. See
620 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
621 (and (zero? (system* "make" "buildtests" dash-j))
622
623 ;; Then run 'CTest' with -V so we get more
624 ;; details upon failure.
625 (zero? (system* "ctest" "-V" dash-j)))))))))
626 (home-page "http://eigen.tuxfamily.org")
627 (synopsis "C++ template library for linear algebra")
628 (description
629 "Eigen is a C++ template library for linear algebra: matrices, vectors,
630 numerical solvers, and related algorithms. It provides an elegant API based
631 on \"expression templates\". It is versatile: it supports all matrix sizes,
632 all standard numeric types, various matrix decompositions and geometry
633 features, and more.")
634
635 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
636 ;; See 'COPYING.README' for details.
637 (license license:mpl2.0)))