unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: David Elsing <david.elsing@posteo.net>
To: 66129@debbugs.gnu.org
Cc: David Elsing <david.elsing@posteo.net>
Subject: [bug#66129] [PATCH v2 02/20] gnu: Add suitesparse-config.
Date: Thu, 21 Sep 2023 13:27:37 +0000	[thread overview]
Message-ID: <f6c7f42cbbafb5cc254ff39f915d9b6bd382adb3.1695302719.git.david.elsing@posteo.net> (raw)
In-Reply-To: <2e6dce4c1faecf1e5516f477a1b372da205573ba.1695302719.git.david.elsing@posteo.net>

The suitesparse-src variable contains the entire SuiteSparse source, from
which the source for the subpackages is extracted with the
suitesparse-package-src function using 'computed-origin-method'.

* gnu/packages/maths.scm (suitesparse-version, suitesparse-src,
suitesparse-config): New variable.
---
 gnu/packages/maths.scm | 88 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a77928f9b6..23c27c1746 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4888,6 +4888,94 @@ (define-public openspecfun
     ;; public domain software.
     (license (list license:expat license:public-domain))))
 
+;; Source for the modular SuiteSparse packages. When updating, also update the
+;; (different) versions of the subpackages.
+(define suitesparse-version "7.2.0")
+(define suitesparse-src
+  (origin
+    (method git-fetch)
+    (uri (git-reference
+          (url "https://github.com/DrTimothyAldenDavis/SuiteSparse")
+          (commit (string-append "v" suitesparse-version))))
+    (file-name (git-file-name "suitesparse" suitesparse-version))
+    (sha256
+     (base32
+      "1draljn8i46862drc6008cnb2zjpklf74j8c34jirjazzpf53kaa"))
+    (modules '((guix build utils)))
+    (snippet
+     #~(begin
+         ;; Delete autogenerated and bundled files
+         (for-each delete-file (find-files "." "\\.pdf$"))
+         ;; ssget
+         (delete-file-recursively "ssget")
+         ;; SuiteSparse_config
+         (delete-file "SuiteSparse_config/SuiteSparse_config.h")
+         ;; CHOLMOD
+         (delete-file-recursively "CHOLMOD/SuiteSparse_metis")
+         ; GraphBLAS
+         (delete-file "GraphBLAS/README.md")
+         (delete-file "GraphBLAS/Config/GB_config.h")
+         (delete-file "GraphBLAS/Config/GB_prejit.c")
+         (delete-file-recursively "GraphBLAS/cpu_features")
+         (delete-file "GraphBLAS/CUDA/GB_cuda_common_jitFactory.hpp")
+         (delete-file "GraphBLAS/JITpackage/GB_JITpackage.c")
+         (delete-file-recursively "GraphBLAS/lz4/lz4.c")
+         (delete-file-recursively "GraphBLAS/lz4/lz4.h")
+         (delete-file-recursively "GraphBLAS/lz4/lz4hc.c")
+         (delete-file-recursively "GraphBLAS/lz4/lz4hc.h")
+         (delete-file "GraphBLAS/GraphBLAS/Config/GB_config.h")
+         (delete-file "GraphBLAS/Tcov/PreJIT/GB_prejit.c")
+         (delete-file-recursively "GraphBLAS/Source/FactoryKernels")
+         (delete-file "GraphBLAS/Source/GB_AxB__include1.h")
+         (delete-file "GraphBLAS/xxHash/xxhash.h")
+         (delete-file-recursively "GraphBLAS/zstd/zstd_subset")
+         ;; KLU
+         (delete-file "KLU/Include/klu.h")
+         (delete-file "KLU/Doc/klu_version.tex")
+         ;; LDL
+         (delete-file "LDL/Include/ldl.h")
+         (delete-file "LDL/Doc/ldl_version.tex")
+         ;; RBio
+         (delete-file "RBio/Include/RBio.h")
+         ;; SPEX
+         (delete-file "SPEX/Include/SPEX.h")
+         (delete-file "SPEX/Doc/SPEX_version.tex")
+         ;; SPQR
+         (delete-file "SPQR/Include/SuiteSparseQR_definitions.h")
+         (delete-file "SPQR/Doc/spqr_version.tex")
+         ;; UMFPACK
+         (delete-file "UMFPACK/Include/umfpack.h")
+         (delete-file "UMFPACK/Doc/umfpack_version.tex")))))
+
+(define (suitesparse-package-src name path)
+  (origin
+    (method (@@ (guix packages) computed-origin-method))
+    (file-name
+     (string-append name "-" suitesparse-version))
+    (sha256 #f)
+    (uri
+     (delay
+       (with-imported-modules '((guix build utils))
+         #~(begin
+             (use-modules (guix build utils))
+             (copy-recursively
+              (string-append #$suitesparse-src "/" #$path) #$output)))))))
+
+(define-public suitesparse-config
+  (package
+    (name "suitesparse-config")
+    (version suitesparse-version)
+    (source (suitesparse-package-src name "SuiteSparse_config"))
+    (build-system cmake-build-system)
+    (arguments (list #:tests? #f))
+    (inputs (list openblas))
+    (native-inputs (list pkg-config))
+    (home-page "https://people.engr.tamu.edu/davis/suitesparse.html")
+    (synopsis "Configuration for all SuiteSparse packages")
+    (description "SuiteSparse is a suite of sparse matrix algorithms.  This
+package contains a library with common configuration options.")
+    (license license:bsd-3)))
+
 (define-public suitesparse
   (package
     (name "suitesparse")
-- 
2.41.0





  reply	other threads:[~2023-09-21 13:29 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 22:05 [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 01/20] gnu: suitesparse: Tweak description David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 02/20] gnu: Add suitesparse-config David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 03/20] gnu: Add suitesparse-amd David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 04/20] gnu: Add suitesparse-btf David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 05/20] gnu: Add suitesparse-camd David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 06/20] gnu: Add suitesparse-colamd David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 07/20] gnu: Add suitesparse-ccolamd David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 08/20] gnu: Add gklib David Elsing
2023-09-20 22:07 ` [bug#66129] [PATCH 09/20] gnu: Add metis-5.2 David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 10/20] gnu: Add gklib-suitesparse David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 11/20] gnu: Add metis-suitesparse David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 12/20] gnu: Add suitesparse-cholmod David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 13/20] gnu: Add suitesparse-cxsparse David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 14/20] gnu: Add suitesparse-klu David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 15/20] gnu: Add suitesparse-ldl David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 16/20] gnu: Add suitesparse-rbio David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 17/20] gnu: Add suitesparse-mongoose David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 18/20] gnu: Add suitesparse-spex David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 19/20] gnu: Add suitesparse-spqr David Elsing
2023-09-20 22:08 ` [bug#66129] [PATCH 20/20] gnu: Add suitesparse-umfpack David Elsing
2023-09-21 13:27 ` [bug#66129] [PATCH v2 01/20] gnu: suitesparse: Tweak description David Elsing
2023-09-21 13:27   ` David Elsing [this message]
2023-09-21 13:27   ` [bug#66129] [PATCH v2 03/20] gnu: Add suitesparse-amd David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 04/20] gnu: Add suitesparse-btf David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 05/20] gnu: Add suitesparse-camd David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 06/20] gnu: Add suitesparse-colamd David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 07/20] gnu: Add suitesparse-ccolamd David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 08/20] gnu: Add gklib David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 09/20] gnu: Add metis-5.2 David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 10/20] gnu: Add gklib-suitesparse David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 11/20] gnu: Add metis-suitesparse David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 12/20] gnu: Add suitesparse-cholmod David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 13/20] gnu: Add suitesparse-cxsparse David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 14/20] gnu: Add suitesparse-klu David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 15/20] gnu: Add suitesparse-ldl David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 16/20] gnu: Add suitesparse-rbio David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 17/20] gnu: Add suitesparse-mongoose David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 18/20] gnu: Add suitesparse-spex David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 19/20] gnu: Add suitesparse-spqr David Elsing
2023-09-21 13:27   ` [bug#66129] [PATCH v2 20/20] gnu: Add suitesparse-umfpack David Elsing
2023-10-05 13:20 ` [bug#66129] [PATCH 00/20] Split SuiteSparse into subpackages Ludovic Courtès
2023-10-05 14:09   ` Ludovic Courtès
2023-10-05 21:33     ` David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 01/20] gnu: suitesparse: Tweak description David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 02/20] gnu: Add suitesparse-config David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 03/20] gnu: Add suitesparse-amd David Elsing
2023-10-19  6:58         ` Ludovic Courtès
2023-10-19 22:29           ` David Elsing
2023-10-19 22:31             ` [bug#66129] [PATCH] gnu: Propagate suitesparse-* inputs referenced in header files David Elsing
2023-10-20  8:39               ` Ludovic Courtès
2023-10-05 21:34       ` [bug#66129] [PATCH v3 04/20] gnu: Add suitesparse-btf David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 05/20] gnu: Add suitesparse-camd David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 06/20] gnu: Add suitesparse-colamd David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 07/20] gnu: Add suitesparse-ccolamd David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 08/20] gnu: Add gklib David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 09/20] gnu: Add metis-5.2 David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 10/20] gnu: Add gklib-suitesparse David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 11/20] gnu: Add metis-suitesparse David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 12/20] gnu: Add suitesparse-cholmod David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 13/20] gnu: Add suitesparse-cxsparse David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 14/20] gnu: Add suitesparse-klu David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 15/20] gnu: Add suitesparse-ldl David Elsing
2023-10-05 21:34       ` [bug#66129] [PATCH v3 16/20] gnu: Add suitesparse-rbio David Elsing
2023-10-05 21:35       ` [bug#66129] [PATCH v3 17/20] gnu: Add suitesparse-mongoose David Elsing
2023-10-05 21:35       ` [bug#66129] [PATCH v3 18/20] gnu: Add suitesparse-spex David Elsing
2023-10-05 21:35       ` [bug#66129] [PATCH v3 19/20] gnu: Add suitesparse-spqr David Elsing
2023-10-05 21:35       ` [bug#66129] [PATCH v3 20/20] gnu: Add suitesparse-umfpack David Elsing
2023-10-06 10:31       ` bug#66129: [PATCH 00/20] Split SuiteSparse into subpackages 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=f6c7f42cbbafb5cc254ff39f915d9b6bd382adb3.1695302719.git.david.elsing@posteo.net \
    --to=david.elsing@posteo.net \
    --cc=66129@debbugs.gnu.org \
    /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).