From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MJgJAdksH2Ui4QAAauVa8A:P1 (envelope-from ) for ; Thu, 05 Oct 2023 23:38:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MJgJAdksH2Ui4QAAauVa8A (envelope-from ) for ; Thu, 05 Oct 2023 23:38:33 +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 E00BE40867 for ; Thu, 5 Oct 2023 23:38:32 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=CBkk9mVV; 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=1696541912; 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=DWzgnVnIlvuJpgauxaUxxIXf6PYhNSpFv6fjStSMA6Q=; b=gGIf83sL6R72Q8KeWNueZ9nJfuOaEm8OTuwD6u6T37knao72+ulcYcbOY3g1zhZXKl7dBi 0iRNbU8jFqyLytBChpDs/gFVJWTw05iTA52RAz6PRHe4ZaCc1dVz7+b5nK3d6u2zqMea6P 10eKlXwfPOJYv5Bv9O8sYQeN5ze7SZAv0EN1trQTRtBrzhtZQNUg2wKvaPZjexS0v0Z7ms 4pTdxPJcjWaZ8wPDKdyZ1ydw10YLcSNYLEcQwnKGAiznNQ6AFu5lpMCOkdrDrz6rtP0AcS nqvDhPCRhcyjHTVmOA+DNxvkmB3IwAmY8oTpdqSuPyF1iOySQkbnngr8k5T55g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=CBkk9mVV; 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=1696541912; a=rsa-sha256; cv=none; b=IZ4xj+a1O2fFC3sXQ/7Zyw3mfb7ksWoBImQ5Wj/MhLwcNdtQDJttEKPjicOm08isnw4AWF zSFw29SUsx24ejTLpWVP3Azhu8jgAa00z8yJQI8mDtZZNiegFBLW2t47ZGlm0/nZDFbwjS pWxk0AvYFxPfdpqXQnj7D1e2czd4iLZeiY+01phr2rCBU3E2tFWd8nJhhJM96RJQxBazCs cG6wPWLsyAtO7u4KwPIVi3XejwrCfzEtDDeVF5p3CuIBYyegIIXzJfgxRE5OUBcjvIdsO/ th51KwcWSEZjjENd8IpJJWwrVcIO/07MMbMevvrFLDNKG1CGwTNMtUV7nRBwVw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoW2b-0003H6-Hi; Thu, 05 Oct 2023 17:37:53 -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 1qoW2W-0003DR-AG for guix-patches@gnu.org; Thu, 05 Oct 2023 17:37:48 -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 1qoW2W-000444-1f for guix-patches@gnu.org; Thu, 05 Oct 2023 17:37:48 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoW2o-0002dK-EI for guix-patches@gnu.org; Thu, 05 Oct 2023 17:38:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66129] [PATCH v3 10/20] gnu: Add gklib-suitesparse. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Oct 2023 21:38:06 +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.16965418349914 (code B ref 66129); Thu, 05 Oct 2023 21:38:06 +0000 Received: (at 66129) by debbugs.gnu.org; 5 Oct 2023 21:37:14 +0000 Received: from localhost ([127.0.0.1]:48740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoW1x-0002Zj-So for submit@debbugs.gnu.org; Thu, 05 Oct 2023 17:37:14 -0400 Received: from mout02.posteo.de ([185.67.36.66]:54141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoW1n-0002W5-GN for 66129@debbugs.gnu.org; Thu, 05 Oct 2023 17:37:04 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E2B9B240101 for <66129@debbugs.gnu.org>; Thu, 5 Oct 2023 23:36:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1696541798; bh=chkAOVDLOZZpdCNoxYMsAqPweQ4MNK3Y1HKjzXOV5+U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=CBkk9mVVVXMx/j0TdzfAXS1vBJun9p8vV0EFoFPoZH8HmMA+fYAfVOqTiFcTrifTn MT7LQxLS420RCM/hvs+g8ZiR0pTVK+lceJApZR2a4nfpwZxwvbqrgA6FXTwwLW8L5q qlOlGjBLkDe1RX9rk2X8527aik2oS7YVr5zp4LUbCMLWAgm8nk4ZvSyyLwqCS4wFHg gjH0ZlxCphwz/JMks4r0QR6s35wzYsI/cj2T08fy+fZFiBA2KweWkFmPtD/c9LU5cg aEKUsRhGZzf57Lar4Ew086fW3p7lU280RxgaxKeilFbRepvHz2t7ua5gHW24rAlYcx G4x4nZWH7iVPA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S1lHp3dc2z9rxL; Thu, 5 Oct 2023 23:36:38 +0200 (CEST) From: David Elsing Date: Thu, 5 Oct 2023 21:34:53 +0000 Message-ID: <62cc2ef0bb3d731697494694dabb74fe946d2fc0.1696541452.git.david.elsing@posteo.net> In-Reply-To: <7ylecgah6b.fsf@posteo.net> References: <7ylecgah6b.fsf@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-Spam-Score: -3.79 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: E00BE40867 X-Spam-Score: -3.79 X-TUID: NftWhVuUaEz/ * 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 76d770466f..a096b24cfe 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -5397,6 +5397,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