From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 61204@debbugs.gnu.org
Cc: ludo@gnu.org, ngraves@ngraves.fr
Subject: [bug#61204] [PATCH v2 2/3] gnu: Add suitesparse-3.
Date: Sat, 25 Mar 2023 15:15:21 +0100 [thread overview]
Message-ID: <20230325141522.28889-2-ngraves@ngraves.fr> (raw)
In-Reply-To: <20230325141522.28889-1-ngraves@ngraves.fr>
* gnu/packages/maths.scm (suitesparse-3): New variable.
---
gnu/packages/maths.scm | 89 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5d8e2f0159..be20e5b581 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -5202,6 +5202,95 @@ (define-public suitesparse
;; 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")
--
2.39.2
next prev parent reply other threads:[~2023-03-25 14:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 1:07 [bug#61204] Scilab scientific software Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 1/6] gnu: matio: Add header file Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 2/6] gnu: Add metis-4 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 3/6] gnu: Add suitesparse-3 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 5/6] gnu: scilab: Update to 5.5.1 Nicolas Graves via Guix-patches via
2023-02-01 1:12 ` [bug#61204] [PATCH 6/6] gnu: scilab: Update to 5.5.2 Nicolas Graves via Guix-patches via
2023-02-10 23:08 ` [bug#61204] Scilab scientific software Ludovic Courtès
2023-02-11 10:11 ` Nicolas Graves via Guix-patches via
2023-02-11 10:09 ` [bug#61204] [PATCH] gnu: Add scilab Nicolas Graves via Guix-patches via
2023-02-15 15:57 ` [bug#61204] Scilab scientific software Simon Tournier
2023-03-16 11:26 ` Ludovic Courtès
2023-03-25 14:17 ` Nicolas Graves via Guix-patches via
2023-04-03 15:43 ` Simon Tournier
2023-03-25 14:15 ` [bug#61204] [PATCH v2 1/3] gnu: matio: Add header file Nicolas Graves via Guix-patches via
2023-03-25 14:15 ` Nicolas Graves via Guix-patches via [this message]
2023-03-25 14:15 ` [bug#61204] [PATCH v2 3/3] gnu: Add scilab Nicolas Graves via Guix-patches via
2023-03-30 20:43 ` bug#61204: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230325141522.28889-2-ngraves@ngraves.fr \
--to=guix-patches@gnu.org \
--cc=61204@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=ngraves@ngraves.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).