commit:     d0d36d3cbe3944852ad8936cd0de901f8cf9a9d3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 23 23:53:44 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 23 23:54:26 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0d36d3c

sci-libs/scalapack: fix CMake 4 compat

I haven't rushed to take a new snapshot (after 2.2.2) given there's a
mess with its .pc.

Closes: https://bugs.gentoo.org/958032
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../scalapack/files/scalapack-2.2.0-cmake.patch    | 66 ++++++++++++++++++++++
 .../scalapack/scalapack-2.2.0_p20240704.ebuild     |  6 +-
 2 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/sci-libs/scalapack/files/scalapack-2.2.0-cmake.patch 
b/sci-libs/scalapack/files/scalapack-2.2.0-cmake.patch
new file mode 100644
index 000000000000..63168d031fbe
--- /dev/null
+++ b/sci-libs/scalapack/files/scalapack-2.2.0-cmake.patch
@@ -0,0 +1,66 @@
+https://github.com/Reference-ScaLAPACK/scalapack/commit/41ac62c28fab33cd9ccc1b010c9c215b5f05201b
+https://github.com/Reference-ScaLAPACK/scalapack/commit/afbc20a9465b79dea14f65c76090fbaecc9c417b
+
+From 41ac62c28fab33cd9ccc1b010c9c215b5f05201b Mon Sep 17 00:00:00 2001
+From: Cristian Le <[email protected]>
+Date: Mon, 31 Mar 2025 11:03:15 +0200
+Subject: [PATCH] Adjust CI to test for CMake versions
+
+---
+ BLACS/INSTALL/CMakeLists.txt |  2 +-
+ CMakeLists.txt               |  2 +-
+ 3 files changed, 19 insertions(+), 4 deletions(-)
+
+diff --git a/BLACS/INSTALL/CMakeLists.txt b/BLACS/INSTALL/CMakeLists.txt
+index c75773cd..257813e8 100644
+--- a/BLACS/INSTALL/CMakeLists.txt
++++ b/BLACS/INSTALL/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.8)
++cmake_minimum_required(VERSION 2.8...4.0)
+ project(INSTALL C Fortran)
+ 
+ add_executable(xintface Fintface.f Cintface.c)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0d599305..23f8ea70 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.9)
++cmake_minimum_required(VERSION 3.9...4.0)
+ 
+ project(SCALAPACK VERSION 2.2.2 LANGUAGES C Fortran)
+ 
+
+From afbc20a9465b79dea14f65c76090fbaecc9c417b Mon Sep 17 00:00:00 2001
+From: Cristian Le <[email protected]>
+Date: Mon, 31 Mar 2025 18:30:54 +0200
+Subject: [PATCH] Bump minimum CMake to 3.26
+
+Signed-off-by: Cristian Le <[email protected]>
+---
+ BLACS/INSTALL/CMakeLists.txt |  2 +-
+ CMakeLists.txt               |  2 +-
+ 3 files changed, 6 insertions(+), 14 deletions(-)
+
+diff --git a/BLACS/INSTALL/CMakeLists.txt b/BLACS/INSTALL/CMakeLists.txt
+index 257813e8..acbb7430 100644
+--- a/BLACS/INSTALL/CMakeLists.txt
++++ b/BLACS/INSTALL/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 2.8...4.0)
++cmake_minimum_required(VERSION 3.26...4.0)
+ project(INSTALL C Fortran)
+ 
+ add_executable(xintface Fintface.f Cintface.c)
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d59f7936..c80c11ee 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,4 @@
+-cmake_minimum_required(VERSION 3.9...4.0)
++cmake_minimum_required(VERSION 3.26...4.0)
+ 
+ project(SCALAPACK VERSION 2.2.2 LANGUAGES C Fortran)
+ 
+

diff --git a/sci-libs/scalapack/scalapack-2.2.0_p20240704.ebuild 
b/sci-libs/scalapack/scalapack-2.2.0_p20240704.ebuild
index c9f54e5d32df..c965dbf3a46d 100644
--- a/sci-libs/scalapack/scalapack-2.2.0_p20240704.ebuild
+++ b/sci-libs/scalapack/scalapack-2.2.0_p20240704.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -26,7 +26,9 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
-PATCHES=( )
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.2.0-cmake.patch
+)
 
 src_prepare() {
        cmake_src_prepare

Reply via email to