From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WLF/OkxFDGUDAQAA9RJhRA:P1 (envelope-from ) for ; Thu, 21 Sep 2023 15:29:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WLF/OkxFDGUDAQAA9RJhRA (envelope-from ) for ; Thu, 21 Sep 2023 15:29:49 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B05894A576 for ; Thu, 21 Sep 2023 15:29:48 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=k6ERDOJZ; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695302988; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WukehhDv8LM1/LtFRidKnfYRSNoz8Eg311Nq0GT6GKc=; b=O8vNWWZnHrKLeop98St04nwuuMkURUE4ZpaUVHMzhTuKGFCyT8E6blOinpSCY5WwX2Z6Y5 9WBM1m88FWc/eqFpkNCY9UWLiYYm86gyuO/VSBTs9jXhbxicXrkmoTKP7+d25Tlv60hDUG bIrXpzMoRMTO0RRkNw1qi45iBFRGMX0DJrPCO9HIHJx1HH8G1C9ZiNLrEWbIpCA3AVxcoj TcF0mXM4A/dL1ShVZzCHxZfuOfiPs9U5dIT/XQz0E26qzx4Ji8OHS1iRVPfbCWFF84LMFw czQ4L92zuqInhBEZxi5Avnn7JKIhfN0c/YtztJ4BJBJmTKQSnNtnHIyWSS3ZLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=k6ERDOJZ; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695302988; a=rsa-sha256; cv=none; b=NE0/Duv0DOR+jpwgzy/XG7mmRy2aaUBSCRZ2HiSeSCc0Cgbn5ZEK6TE3M+MzxbWUfIvtqy bVNOXIVBmVdwQBN84sH7LvZsY21D7ERlVY3HQaYEtR/jsjqo3tHaKF0ZNP4kSV1G1B4rn4 NxktcrU6+PrRMImrtMy7k2sPX2+AYUrndGkw7xtdKFfhiAgyyXjDXjcJjR5oj1uI02V2WC PO1ELC0cZACbzBbdT6tFRplckfuP2UEiWGY9p099PbVToKSIA8f5VUZvA5eChC5VjI4yrJ OsEmTue5f/p2wtuUWeq5B90E1JR+UQ2rTUmI+Y97hnMsx0KTE2iYChLyjiyR8A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjJjr-0004Hn-E2; Thu, 21 Sep 2023 09:29:03 -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 1qjJjn-0004EW-9E for guix-patches@gnu.org; Thu, 21 Sep 2023 09:28:59 -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 1qjJjm-0006dA-0f for guix-patches@gnu.org; Thu, 21 Sep 2023 09:28:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjJjv-0004uo-TO for guix-patches@gnu.org; Thu, 21 Sep 2023 09:29:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66129] [PATCH v2 10/20] gnu: Add gklib-suitesparse. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Sep 2023 13:29:07 +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.169530292618796 (code B ref 66129); Thu, 21 Sep 2023 13:29:07 +0000 Received: (at 66129) by debbugs.gnu.org; 21 Sep 2023 13:28:46 +0000 Received: from localhost ([127.0.0.1]:33067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjJjZ-0004t1-GQ for submit@debbugs.gnu.org; Thu, 21 Sep 2023 09:28:46 -0400 Received: from mout01.posteo.de ([185.67.36.65]:39089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjJjQ-0004q8-Ji for 66129@debbugs.gnu.org; Thu, 21 Sep 2023 09:28:37 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 41657240029 for <66129@debbugs.gnu.org>; Thu, 21 Sep 2023 15:28:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1695302900; bh=rGTNwfFNqNbZcIvOB5d4tZnpyexa/UpIGwYwiQt1nMs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=k6ERDOJZzdN8CdOc8LQjvm1FL7ZMoMMxmD+Ef6AilXsiMRjLJd+gRs5Tsk8hpHISW Rz6brmJM8xjaIfypcnzDeFF+SZN45pIz+15lyTV1lK2SKcftrtcNFOLOXC3YeJXqLs GA4m9YFpnhppHaup1f/q4Y2lkFqLjOyC5pfSBhh/iS019EXTQsanqzzUDJDonOeNkl 7sMbOcs1sc7cV2lMcus78Yu7sTplaC7ttiyO7vs9koQSw0a/I2XKxYdeJnr6gHSN6l UrRkX47pC3qRVVwQ2QoTPK6cKTTD4aLhVLf3MyTJBHYaWYdzNVwaIpEu1DQN+uv5lO YZWYgKviheoEw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rrx6q6MWWz9s0l; Thu, 21 Sep 2023 15:28:19 +0200 (CEST) From: David Elsing Date: Thu, 21 Sep 2023 13:27:45 +0000 Message-ID: <6bcdd5782ba9e7bd231aa7419d9aec9816fbb919.1695302719.git.david.elsing@posteo.net> In-Reply-To: <2e6dce4c1faecf1e5516f477a1b372da205573ba.1695302719.git.david.elsing@posteo.net> References: <2e6dce4c1faecf1e5516f477a1b372da205573ba.1695302719.git.david.elsing@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -3.88 X-Spam-Score: -3.88 X-Migadu-Queue-Id: B05894A576 X-TUID: XKVyaTxWPTj0 * gnu/packages/maths.scm (gklib-suitesparse): New variable. --- gnu/packages/maths.scm | 25 ++++++++ gnu/packages/patches/gklib-suitesparse.patch | 65 ++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 gnu/packages/patches/gklib-suitesparse.patch diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 2a9040ad39..3a86e90cb5 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -5238,6 +5238,31 @@ (define-public suitesparse-ccolamd COLAMD which has the the option to apply constraints to the ordering.") (license license:bsd-3))) +(define-public gklib-suitesparse + (package/inherit gklib + (name "gklib-suitesparse") + (source (origin + (inherit (package-source gklib)) + (patches (cons + (search-patch + "gklib-suitesparse.patch") + (origin-patches (package-source gklib)))))) + (arguments + (substitute-keyword-arguments (package-arguments gklib) + ((#:phases phases #~%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'patch-cmake + (lambda _ + (substitute* "CMakeLists.txt" + (("add_library\\(GKlib.*" all) + (string-append + all + "target_link_libraries(GKlib PUBLIC" + " ${SUITESPARSE_CONFIG_LIBRARIES} m)\n"))))))))) + (inputs + (modify-inputs (package-inputs gklib) + (prepend suitesparse-config))))) + (define-public suitesparse (package (name "suitesparse") diff --git a/gnu/packages/patches/gklib-suitesparse.patch b/gnu/packages/patches/gklib-suitesparse.patch new file mode 100644 index 0000000000..8b6c708b6a --- /dev/null +++ b/gnu/packages/patches/gklib-suitesparse.patch @@ -0,0 +1,65 @@ +This patch contains the relevant changes to GKlib made in SuiteSparse +(CHOLMOD) for the version 7.2.0 +(https://github.com/DrTimothyAldenDavis/SuiteSparse/commit/8a7641cdb4809533c681417e94f98058c07c5da2). +The disabling of signal handling when MATLAB_MEX_FILE is defined is omitted. + +diff -ur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,8 @@ + + option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF) + ++find_package ( SuiteSparse_config 7.1.0 REQUIRED ) ++ + get_filename_component(abs "." ABSOLUTE) + set(GKLIB_PATH ${abs}) + unset(abs) +diff -ur a/GKlib.h b/GKlib.h +--- a/GKlib.h ++++ b/GKlib.h +@@ -59,6 +59,24 @@ + #include + #endif + ++/* -------------------------------------------------------------------------- */ ++/* Added for incorporation into SuiteSparse. ++ Tim Davis, Oct 31, 2022, Texas A&M University. */ ++#include "SuiteSparse_config.h" ++#define malloc SuiteSparse_config_malloc ++#define calloc SuiteSparse_config_calloc ++#define realloc SuiteSparse_config_realloc ++#define free(p) \ ++{ \ ++ if ((p) != NULL) \ ++ { \ ++ SuiteSparse_config_free (p) ; \ ++ (p) = NULL ; \ ++ } \ ++} ++ ++/* -------------------------------------------------------------------------- */ ++ + + + +diff -ur a/memory.c b/memory.c +--- a/memory.c ++++ b/memory.c +@@ -108,6 +108,8 @@ + /*************************************************************************/ + int gk_malloc_init() + { ++ gkmcore = NULL; ++#if 0 + if (gkmcore == NULL) + gkmcore = gk_gkmcoreCreate(); + +@@ -115,6 +117,7 @@ + return 0; + + gk_gkmcorePush(gkmcore); ++#endif + + return 1; + } -- 2.41.0