[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/08: gnu: Add suitesparse-3.
From: |
guix-commits |
Subject: |
02/08: gnu: Add suitesparse-3. |
Date: |
Thu, 30 Mar 2023 17:19:35 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 13b2d110eec89f856964dce0a66783fbd824c4a4
Author: Nicolas Graves <ngraves@ngraves.fr>
AuthorDate: Sat Mar 25 15:15:21 2023 +0100
gnu: Add suitesparse-3.
* gnu/packages/maths.scm (suitesparse-3): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/maths.scm | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index bb88873a0d..22464ea3d1 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5202,6 +5202,95 @@ packages.")
;; GPUQREngine, RBio, SuiteSparse_GPURuntime, SuiteSparseQR, UMFPACK
(license (list license:gpl2+ license:lgpl2.1+))))
+
+;; This outdated version is used to build the scilab package.
+(define-public suitesparse-3
+ (package
+ (inherit suitesparse)
+ (name "suitesparse")
+ (version "3.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/DrTimothyAldenDavis/SuiteSparse")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0wxk755nzps0c9la24zqknqkzjp6rcj5q9jhd973mff1pqja3clz"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;no "check" target
+ #:make-flags
+ ,#~(list
+ (string-append "CC=gcc")
+ "AR=gcc -shared -o"
+ "RANLIB=touch"
+ "CFLAGS=-O3 -fPIC -I../Include"
+ "TBB=-ltbb"
+
+ ;; Disable metis@4 (nonfree) support.
+ "CHOLMOD_CONFIG=-DNPARTITION"
+ "METIS="
+ "METIS_PATH="
+
+ ;; The default is to link against netlib lapack. Use OpenBLAS
+ ;; instead.
+ "BLAS=-lopenblas" "LAPACK=-lopenblas"
+
+ (string-append "INSTALL_LIB="
+ (assoc-ref %outputs "out") "/lib")
+ (string-append "INSTALL_INCLUDE="
+ (assoc-ref %outputs "out") "/include")
+ "library")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'correct-build-configuration
+ (lambda _
+ ;; Invert build order: CHOLMOD before KLU.
+ (substitute* "Makefile"
+ (("\t\\( cd CHOLMOD ; \\$\\(MAKE\\) \\)\n$")
+ "")
+ (("\\( cd KLU ; \\$\\(MAKE\\) \\)")
+ (string-append "( cd CHOLMOD ; $(MAKE) )\n\t"
+ "( cd KLU ; $(MAKE) )")))
+ ;; Build shared libraries.
+ (substitute* (find-files "." "akefile$")
+ (("lib([a-z]+)\\.a" all libname)
+ (string-append "lib" libname ".so")))
+ ;; Delete broken KLU Demo step.
+ (substitute* "KLU/Makefile"
+ (("\\( cd Demo ; \\$\\(MAKE\\) \\)")
+ ""))))
+ (replace 'install
+ (lambda _
+ ;; Install libraries.
+ (for-each
+ (lambda (x)
+ (install-file
+ x
+ (string-append (assoc-ref %outputs "out") "/lib")))
+ (find-files "." "\\.so$"))
+ ;; Install header files.
+ (for-each
+ (lambda (x)
+ (install-file
+ x
+ (string-append (assoc-ref %outputs "out") "/include")))
+ (find-files "." "\\.h$"))))
+ ,@(if (target-riscv64?)
+ ;; GraphBLAS FTBFS on riscv64-linux
+ `((add-after 'unpack 'skip-graphblas
+ (lambda _
+ (substitute* "Makefile"
+ ((".*cd GraphBLAS.*") "")
+ (("metisinstall gbinstall moninstall")
+ "moninstall")))))
+ '())
+ (delete 'configure)))) ;no configure script
+ (inputs
+ (list tbb openblas gmp mpfr))))
+
(define-public atlas
(package
(name "atlas")
- branch master updated (42b938ae8c -> e7558d1647), guix-commits, 2023/03/30
- 02/08: gnu: Add suitesparse-3.,
guix-commits <=
- 01/08: gnu: matio: Add header file., guix-commits, 2023/03/30
- 03/08: gnu: Add scilab., guix-commits, 2023/03/30
- 04/08: system: Remove obsolete GUIX_LOCPATH workaround., guix-commits, 2023/03/30
- 05/08: services: base: Deprecate 'pam-limits-service' procedure., guix-commits, 2023/03/30
- 06/08: services: pam-limits-service-type: Deprecate file-like object support in favour for lists as service value., guix-commits, 2023/03/30
- 08/08: gnu: Add zsh-completions, guix-commits, 2023/03/30
- 07/08: gnu: Add zsh-history-substring-search, guix-commits, 2023/03/30