From patchwork Thu Apr 24 14:36:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 41981 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 EEB7D27BC4B; Thu, 24 Apr 2025 15:38:40 +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=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 53A2227BC49 for ; Thu, 24 Apr 2025 15:38:39 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7xiM-0001nI-EK; Thu, 24 Apr 2025 10:38:10 -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 1u7xiK-0001m1-3J for guix-patches@gnu.org; Thu, 24 Apr 2025 10:38:08 -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 1u7xiJ-0003nx-Py for guix-patches@gnu.org; Thu, 24 Apr 2025 10:38:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=kNwHryhMlSwIA7FMGoi3+HJ9kFnu/HZgR3/xE0Xev1g=; b=kecmuzCYdsrRCgqOrZgUfl354bbdpV+YILhCF4qfBaxdTFNJ2FMMRFr6aBURwTKEy5cdsOle0xI6w8n4CPt/oWJ42f8jR54BP7OsIfNDCJu0kWOyQKGVyVWtgPsFgImbOtuqmx6SYtiQ+NFFN28UYa27u8//y5nx2twIut9IrEL8Ng+QHWteT1um05prgBTcu8wNFUtBpHO+4izctBe8lFYgy3ZErC3YHq6t/5QkxultFP5IpL4LXeRGdcTTFF5UeXAYMgU7++ZNEnOeLQNjFxKUm4gjNI9yNbv2IXMsRfLBu4Az6yubS5Tzkq43b4YVImf7Ryoz7lKNdRj/+y1UxQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u7xiG-0002R1-C2; Thu, 24 Apr 2025 10:38:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77991] [PATCH v2 2/4] gnu: scotch: Remove CMake machinery for the Metis compatibility layer. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: andreas@enge.fr, bavier@posteo.net, sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 24 Apr 2025 14:38:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77991 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77991@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Andreas Enge , Eric Bavier , Sharlatan Hellseher X-Debbugs-Original-Xcc: Andreas Enge , Eric Bavier , Sharlatan Hellseher Received: via spool by 77991-submit@debbugs.gnu.org id=B77991.17455054609258 (code B ref 77991); Thu, 24 Apr 2025 14:38:04 +0000 Received: (at 77991) by debbugs.gnu.org; 24 Apr 2025 14:37:40 +0000 Received: from localhost ([127.0.0.1]:39922 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u7xhr-0002PD-Dg for submit@debbugs.gnu.org; Thu, 24 Apr 2025 10:37:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39764) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u7xhl-0002Nv-0m for 77991@debbugs.gnu.org; Thu, 24 Apr 2025 10:37:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7xhf-0003ld-Ew; Thu, 24 Apr 2025 10:37:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=kNwHryhMlSwIA7FMGoi3+HJ9kFnu/HZgR3/xE0Xev1g=; b=JK5rUZfBP3DRlaf8QE5Y MpBRQElnufARSHQSQHUdoXCRMKWgjqpU1R3fLlyc8QFiQErZ4oLXWQapvAQcFhs83aWop/qEebXPb sINDjsvY84TLkIyQmZY+c1qvr8ZOQon+5wLbqcFym4X2K1++Plb6UaL9xnxN+77p+1HVE9tULIEEx yslvW2NhxBInAYWUDxf2bKdghDyTaaniFbg/KpqjgYf0/wBFe3Mrmt7M745E0OZsT5EsSXQdFt+Y2 YGCkFQZB0+TO0ClKMfBnukO/XjHJovnRTuOz06WUKg3MpWWFcfv9mLxWMruShKk4hhV2X9UGZ/vKe pDync2gNofxpuQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 24 Apr 2025 16:36:55 +0200 Message-ID: <316ce8695c3b7b06fee2e483218b434ad8511b50.1745505295.git.ludo@gnu.org> X-Mailer: git-send-email 2.49.0 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 From: Ludovic Courtès This fixes a bug whereby ‘SCOTCHConfig.cmake’ would fail to find ‘scotchmetisTargets.cmake’ because it expects it to be in the same directory as itself, ${CMAKE_CURRENT_LIST_DIR}. * gnu/packages/patches/scotch-cmake-remove-metis.patch: New file. * gnu/packages/maths.scm (scotch)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Change-Id: If8d8f890852c35cede6e81c33d18b9101988a635 --- gnu/local.mk | 1 + gnu/packages/maths.scm | 3 +++ .../patches/scotch-cmake-remove-metis.patch | 24 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 gnu/packages/patches/scotch-cmake-remove-metis.patch diff --git a/gnu/local.mk b/gnu/local.mk index 4aa84f8ef9..a250b3f748 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2249,6 +2249,7 @@ dist_patch_DATA = \ %D%/packages/patches/scilab-better-compiler-detection.patch \ %D%/packages/patches/scilab-tbx_build_help.patch \ %D%/packages/patches/scons-test-environment.patch \ + %D%/packages/patches/scotch-cmake-remove-metis.patch \ %D%/packages/patches/screen-hurd-path-max.patch \ %D%/packages/patches/scsh-nonstring-search-path.patch \ %D%/packages/patches/seed-webkit.patch \ diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 7327aeaf40..33eb4cda7b 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -5200,6 +5200,7 @@ (define-public scotch (file-name (git-file-name name version)) (sha256 (base32 "0rbc51albpd2923dkirpkj8rfkic6rsvwqqnv1mmsk391zhk3amr")) + (patches (search-patches "scotch-cmake-remove-metis.patch")) (modules '((guix build utils))) (snippet #~(substitute* "src/libscotchmetis/library_parmetis.h" @@ -5220,6 +5221,8 @@ (define-public scotch (modify-phases %standard-phases (add-after 'install 'install-metis (lambda* (#:key outputs #:allow-other-keys) + ;; Move the METIS compatibility library to a separate output to + ;; avoid a name clash on . (let* ((out (assoc-ref outputs "out")) (metis (assoc-ref outputs "metis")) (prefix (string-length out))) diff --git a/gnu/packages/patches/scotch-cmake-remove-metis.patch b/gnu/packages/patches/scotch-cmake-remove-metis.patch new file mode 100644 index 0000000000..91bb36f86e --- /dev/null +++ b/gnu/packages/patches/scotch-cmake-remove-metis.patch @@ -0,0 +1,24 @@ +Remove the CMake machinery for the Metis/Parmetis compatibility layer: +it has zero users and complicates things due to the separate "metis" +output. + +Notably, the assumption in 'SCOTCHConfig.cmake' is that *metisTargets.cmake +are in the same directory, which is not the case here. Furthermore, +'*metisTargets-relwithdebuginfo.cmake' assumes 'libscotchmetis*.so*' is +available under '_IMPORT_PREFIX', which is only the case when +'libscotchmetis*.so' is installed in the same directory as 'libscotch.so'. + +diff --git a/cmake/SCOTCHConfig.cmake.in b/cmake/SCOTCHConfig.cmake.in +index ec52ac5..4ce5c30 100644 +--- a/cmake/SCOTCHConfig.cmake.in ++++ b/cmake/SCOTCHConfig.cmake.in +@@ -77,9 +77,3 @@ if(@BUILD_LIBESMUMPS@) + include("${CMAKE_CURRENT_LIST_DIR}/ptesmumpsTargets.cmake") + endif() + endif() +-if(@BUILD_LIBSCOTCHMETIS@) +- include("${CMAKE_CURRENT_LIST_DIR}/scotchmetisTargets.cmake") +- if(@BUILD_PTSCOTCH@) +- include("${CMAKE_CURRENT_LIST_DIR}/ptscotchparmetisTargets.cmake") +- endif() +-endif()