From patchwork Wed Sep 20 22:07:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 54084 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 67CC527BBE9; Wed, 20 Sep 2023 23:09:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DF6A727BBE2 for ; Wed, 20 Sep 2023 23:09:27 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qj5NP-00073S-Hl; Wed, 20 Sep 2023 18:08:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qj5NO-000734-OZ for guix-patches@gnu.org; Wed, 20 Sep 2023 18:08:54 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qj5NO-00059o-H3 for guix-patches@gnu.org; Wed, 20 Sep 2023 18:08:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qj5NY-0005Si-1V for guix-patches@gnu.org; Wed, 20 Sep 2023 18:09:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66129] [PATCH 02/20] gnu: Add suitesparse-config. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 20 Sep 2023 22:09:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66129 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66129@debbugs.gnu.org Cc: David Elsing Received: via spool by 66129-submit@debbugs.gnu.org id=B66129.169524773420849 (code B ref 66129); Wed, 20 Sep 2023 22:09:03 +0000 Received: (at 66129) by debbugs.gnu.org; 20 Sep 2023 22:08:54 +0000 Received: from localhost ([127.0.0.1]:60486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qj5NN-0005Q7-Dl for submit@debbugs.gnu.org; Wed, 20 Sep 2023 18:08:54 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qj5NK-0005PG-G4 for 66129@debbugs.gnu.org; Wed, 20 Sep 2023 18:08:52 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 39A7B240101 for <66129@debbugs.gnu.org>; Thu, 21 Sep 2023 00:08:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1695247715; bh=8T8P7H9xqc+PCIBmM2rxSuyDyJzf5o8C1M6wbKchOco=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=TIw3lIe22sb0gxzCLjDx/CYO42c5eRZZ1z3kWNIt18sALqJ45n6ALqszGgf4BxvEP 5PYncaTz+rr5vRgiGx1udtajWBde+IEHEieUdMW43HittE09v6VMHrMtvkUU3MFBvS Js//14IVhNcuHdyJLPbTOeMoWQoG9sDtzeUQJK5M/zW9v2maZ5iZ/DjsLUlDgSzDgr pRO2CErWK/Hn9icj7gPmc05S/09munY1TJzTuWeNzw732IqmQcCQkhLWzL0HJYQuLP vCxGdmje4RYXkIc/f6GzgKdTdPFTRuuEUjP7ZtZpD8VTf053sG16eUhL4yJmbat1UZ RvzNFLiJUSluA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RrXjZ5ht5z9rxF; Thu, 21 Sep 2023 00:08:34 +0200 (CEST) From: David Elsing Date: Wed, 20 Sep 2023 22:07:52 +0000 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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")