guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/04: gnu: Add Eigen.


From: Ludovic Courtès
Subject: 01/04: gnu: Add Eigen.
Date: Fri, 16 Jan 2015 20:12:05 +0000

civodul pushed a commit to branch master
in repository guix.

commit 8f4b1dfb77f01ee97263ea4d0dfd3c715ded527c
Author: Ludovic Courtès <address@hidden>
Date:   Fri Jan 16 13:42:24 2015 +0100

    gnu: Add Eigen.
    
    * gnu/packages/algebra.scm (eigen): New variable.
---
 gnu/packages/algebra.scm |   57 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 56 insertions(+), 1 deletions(-)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 2973c68..9734f23 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Andreas Enge <address@hidden>
-;;; Copyright © 2013 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2015 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2014 Mark H Weaver <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -29,6 +29,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cmake)
   #:use-module (guix utils))
 
 
@@ -345,3 +346,57 @@ cosine/ sine transforms or DCT/DST).")
     (description
      (string-append (package-description fftw)
                     "  With OpenMPI parallelism support."))))
+
+(define-public eigen
+  (package
+    (name "eigen")
+    (version "3.2.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://bitbucket.org/eigen/eigen/get/";
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "14l5hlgxxymwyava5mx97ipyk3ma3alaj586aaz1xh1r700a7sxm"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; There are 3 test failures in the "unsupported" directory,
+               ;; but maintainers say it's a known issue and it's unsupported
+               ;; anyway, so just skip them.
+               '(substitute* "CMakeLists.txt"
+                  (("add_subdirectory\\(unsupported\\)")
+                   "# Do not build the tests for unsupported features.\n")))))
+    (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  (current-processor-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)
+
+                     (zero? (system* "make" "buildtests" dash-j))))
+                 %standard-phases)))
+    (home-page "http://eigen.tuxfamily.org";)
+    (synopsis "C++ template library for linear algebra")
+    (description
+     "Eigen is a C++ template library for linear algebra: matrices, vectors,
+numerical solvers, and related algorithms.  It provides an elegant API based
+on \"expression templates\".  It is versatile: it supports all matrix sizes,
+all standard numeric types, various matrix decompositions and geometry
+features, and more.")
+
+    ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
+    ;; See 'COPYING.README' for details.
+    (license mpl2.0)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]