From patchwork Thu Sep 21 13:27:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 54118 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 529CF27BBEA; Thu, 21 Sep 2023 14:29:18 +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=ham 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 EC42427BBE2 for ; Thu, 21 Sep 2023 14:29:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjJji-0004AB-EQ; Thu, 21 Sep 2023 09:28:54 -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 1qjJjh-00049f-Co for guix-patches@gnu.org; Thu, 21 Sep 2023 09:28:53 -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 1qjJjh-0006aH-52 for guix-patches@gnu.org; Thu, 21 Sep 2023 09:28:53 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjJjq-0004th-Ux for guix-patches@gnu.org; Thu, 21 Sep 2023 09:29:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66129] [PATCH v2 02/20] gnu: Add suitesparse-config. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Sep 2023 13:29:02 +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.169530291918692 (code B ref 66129); Thu, 21 Sep 2023 13:29:02 +0000 Received: (at 66129) by debbugs.gnu.org; 21 Sep 2023 13:28:39 +0000 Received: from localhost ([127.0.0.1]:33041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjJjR-0004r7-Rm for submit@debbugs.gnu.org; Thu, 21 Sep 2023 09:28:39 -0400 Received: from mout01.posteo.de ([185.67.36.65]:44761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjJjJ-0004pb-Pc for 66129@debbugs.gnu.org; Thu, 21 Sep 2023 09:28:31 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E043D240029 for <66129@debbugs.gnu.org>; Thu, 21 Sep 2023 15:28:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1695302893; bh=8T8P7H9xqc+PCIBmM2rxSuyDyJzf5o8C1M6wbKchOco=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=M6Jk9KKqxzD+W5E0pu3YimAbgjJbEq3BhyJSlocPAJ+WbsKTlxCvfO7gADcTzgaNa 6xdKpD50QvFrG6O9wSwV3NCbXy1J1zoAX69Z6lPmsknp7rwdHV1UXvOVnUG19DnCGM hijYmVSxOyc1rscMSFEpy+LrdAqdpYgDQhqo/ATDntHyBq+tunf1boaNtONk3e/DeH hrljnIc9Wx1KgagEevJX+rclSjua2UwvftFAIyy5ZG8gDOiTL4Zsxq2PTHTjqlBuDm nKxwz9TH28iGbgtyt/4sqM7wPrCodgsnqOcPpJwauGg3JI48Nob7zyZ4XnBlG4t10k 2Ddz+PA2rd0rA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rrx6j2bvDz9s0Q; Thu, 21 Sep 2023 15:28:13 +0200 (CEST) From: David Elsing Date: Thu, 21 Sep 2023 13:27:37 +0000 Message-ID: In-Reply-To: <2e6dce4c1faecf1e5516f477a1b372da205573ba.1695302719.git.david.elsing@posteo.net> References: <2e6dce4c1faecf1e5516f477a1b372da205573ba.1695302719.git.david.elsing@posteo.net> 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")