From patchwork Wed Feb 1 01:12:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 46554 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 301DE27BBEB; Wed, 1 Feb 2023 01:13:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 33DCC27BBE9 for ; Wed, 1 Feb 2023 01:13:27 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pN1gU-0005P9-3i; Tue, 31 Jan 2023 20:13:10 -0500 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 1pN1gO-0005O9-9p for guix-patches@gnu.org; Tue, 31 Jan 2023 20:13:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pN1gN-0000sK-I6 for guix-patches@gnu.org; Tue, 31 Jan 2023 20:13:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pN1gN-0005vL-3k for guix-patches@gnu.org; Tue, 31 Jan 2023 20:13:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61204] [PATCH 3/6] gnu: Add suitesparse-3. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Feb 2023 01:13:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61204 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 61204@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 61204-submit@debbugs.gnu.org id=B61204.167521396022702 (code B ref 61204); Wed, 01 Feb 2023 01:13:03 +0000 Received: (at 61204) by debbugs.gnu.org; 1 Feb 2023 01:12:40 +0000 Received: from localhost ([127.0.0.1]:55367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pN1fz-0005u6-UI for submit@debbugs.gnu.org; Tue, 31 Jan 2023 20:12:40 -0500 Received: from 11.mo581.mail-out.ovh.net ([87.98.173.157]:58627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pN1fw-0005tk-Fb for 61204@debbugs.gnu.org; Tue, 31 Jan 2023 20:12:38 -0500 Received: from director1.ghost.mail-out.ovh.net (unknown [10.108.4.183]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id 5482124C3B for <61204@debbugs.gnu.org>; Wed, 1 Feb 2023 01:12:32 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-gzb79 (unknown [10.110.115.101]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 9DE101FD35; Wed, 1 Feb 2023 01:12:31 +0000 (UTC) Received: from ngraves.fr ([37.59.142.98]) by ghost-submission-6684bf9d7b-gzb79 with ESMTPSA id sS0uK3+82WPhGAYAvSikPA (envelope-from ); Wed, 01 Feb 2023 01:12:31 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-98R00227b7c4be-80ff-4818-b92b-709ce481bd82, 33734DDD670EA2F5B45DA9EA9FF6728C9E7B66C2) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.140.142 Date: Wed, 1 Feb 2023 02:12:12 +0100 Message-Id: <20230201011215.13033-3-ngraves@ngraves.fr> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230201011215.13033-1-ngraves@ngraves.fr> References: <20230201011215.13033-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13582856477588775650 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudefhedgfeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdehleeiffehtedvlefhffffjeefgfduhfetkeevheeiteduiedugfekuedtheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddrleeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeeiuddvtdegseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkedupdhmohguvgepshhmthhpohhuth 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: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves 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 * gnu/packages/maths.scm (suitesparse-3): New variable. --- gnu/packages/maths.scm | 95 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index f00f4f58be..cc138de940 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -5116,6 +5116,101 @@ (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" + (string-append + "METIS=" (search-input-file %build-inputs "lib/libmetis.so")) + (string-append + "METIS_PATH=" + (string-drop-right + (search-input-file %build-inputs "lib/libmetis.so") + (string-length "/lib/libmetis.so"))) + + ;; 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 _ + ;; Correct metis path. + (substitute* "CHOLMOD/Lib/Makefile" + (("\\$\\(METIS_PATH\\)\\/Lib") + "$(METIS_PATH)/include")) + ;; 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") + "metisinstall moninstall"))))) + '()) + (delete 'configure)))) ;no configure script + (inputs + (list tbb openblas gmp mpfr metis-4)))) + (define-public atlas (package (name "atlas")