From f0c1d963686f0155f8242915ee939c8a66fb2fd9 Mon Sep 17 00:00:00 2001 From: Alfredo Tupone Date: Tue, 9 Jun 2026 21:58:43 +0200 Subject: [PATCH] sci-libs/superlu_mt: fix examples Closes: https://bugs.gentoo.org/975982 Signed-off-by: Alfredo Tupone --- .../files/superlu_mt-4.0.2-examples.patch | 69 +++++++++++++++++++ sci-libs/superlu_mt/superlu_mt-4.0.2.ebuild | 1 + 2 files changed, 70 insertions(+) create mode 100644 sci-libs/superlu_mt/files/superlu_mt-4.0.2-examples.patch diff --git a/sci-libs/superlu_mt/files/superlu_mt-4.0.2-examples.patch b/sci-libs/superlu_mt/files/superlu_mt-4.0.2-examples.patch new file mode 100644 index 0000000000000..c2d5950eb6fa9 --- /dev/null +++ b/sci-libs/superlu_mt/files/superlu_mt-4.0.2-examples.patch @@ -0,0 +1,69 @@ +--- a/EXAMPLE/pclinsol.c 2026-06-09 21:45:19.791434053 +0200 ++++ b/EXAMPLE/pclinsol.c 2026-06-09 21:50:22.730307528 +0200 +@@ -35,7 +35,8 @@ + SuperMatrix U; /* factor U */ + NCPformat *Ustore; + SuperMatrix B; +- int_t nrhs, ldx, info, m, n, nnz, b; ++ int m, nn; ++ int_t nrhs, ldx, info, n, nnz, b; + int_t nprocs; /* maximum number of processors to use. */ + int_t panel_size, relax, maxsup; + int_t permc_spec; +@@ -79,7 +80,9 @@ + #elif defined( HB ) + creadhb(&m, &n, &nnz, &a, &asub, &xa); + #else +- creadMM(&m, &n, &nnz, &a, &asub, &xa); ++ nn = n; ++ creadMM(&m, &nn, &nnz, &a, &asub, &xa); ++ n = nn; + #endif + + cCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_C, SLU_GE); +--- a/EXAMPLE/pdlinsol.c 2026-06-09 21:50:42.510103477 +0200 ++++ b/EXAMPLE/pdlinsol.c 2026-06-09 21:52:01.207291624 +0200 +@@ -35,7 +35,8 @@ + SuperMatrix U; /* factor U */ + NCPformat *Ustore; + SuperMatrix B; +- int_t nrhs, ldx, info, m, n, nnz, b; ++ int m, nn; ++ int_t nrhs, ldx, info, n, nnz, b; + int_t nprocs; /* maximum number of processors to use. */ + int_t panel_size, relax, maxsup; + int_t permc_spec; +@@ -79,7 +80,9 @@ + #elif defined( HB ) + dreadhb(&m, &n, &nnz, &a, &asub, &xa); + #else +- dreadMM(&m, &n, &nnz, &a, &asub, &xa); ++ nn = n; ++ dreadMM(&m, &nn, &nnz, &a, &asub, &xa); ++ n = nn; + #endif + + dCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_D, SLU_GE); +--- a/EXAMPLE/pslinsol.c 2026-06-09 21:52:30.182992696 +0200 ++++ b/EXAMPLE/pslinsol.c 2026-06-09 21:54:36.248692207 +0200 +@@ -35,7 +35,8 @@ + SuperMatrix U; /* factor U */ + NCPformat *Ustore; + SuperMatrix B; +- int_t nrhs, ldx, info, m, n, nnz, b; ++ int m, nn; ++ int_t nrhs, ldx, info, n, nnz, b; + int_t nprocs; /* maximum number of processors to use. */ + int_t panel_size, relax, maxsup; + int_t permc_spec; +@@ -79,7 +80,9 @@ + #elif defined( HB ) + sreadhb(&m, &n, &nnz, &a, &asub, &xa); + #else +- sreadMM(&m, &n, &nnz, &a, &asub, &xa); ++ nn = n; ++ sreadMM(&m, &nn, &nnz, &a, &asub, &xa); ++ n = nn; + #endif + + sCreate_CompCol_Matrix(&A, m, n, nnz, a, asub, xa, SLU_NC, SLU_S, SLU_GE); diff --git a/sci-libs/superlu_mt/superlu_mt-4.0.2.ebuild b/sci-libs/superlu_mt/superlu_mt-4.0.2.ebuild index 430538a19fc7c..f6ea3bd5b7c8d 100644 --- a/sci-libs/superlu_mt/superlu_mt-4.0.2.ebuild +++ b/sci-libs/superlu_mt/superlu_mt-4.0.2.ebuild @@ -28,6 +28,7 @@ BDEPEND="virtual/pkgconfig PATCHES=( "${FILESDIR}"/${P}-gentoo.patch "${FILESDIR}"/${P}-proto.patch + "${FILESDIR}"/${P}-examples.patch ) pkg_pretend() {