From 7703be8c59340495bde174e138933a55ecb8f766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 1 Jul 2023 18:06:23 -0300 Subject: [PATCH 1/2] SuiteSparse: update to 7.1.0. --- srcpkgs/SuiteSparse/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/SuiteSparse/template b/srcpkgs/SuiteSparse/template index 6cc6b0a232d5..3490f6f3fa7f 100644 --- a/srcpkgs/SuiteSparse/template +++ b/srcpkgs/SuiteSparse/template @@ -1,6 +1,6 @@ # Template file for 'SuiteSparse' pkgname=SuiteSparse -version=7.0.1 +version=7.1.0 revision=1 hostmakedepends="cmake gcc-fortran" makedepends="libgomp-devel mpfr-devel @@ -11,7 +11,7 @@ license="custom:multiple" homepage="https://people.engr.tamu.edu/davis/suitesparse.html" changelog="https://raw.githubusercontent.com/DrTimothyAldenDavis/SuiteSparse/master/ChangeLog" distfiles="https://github.com/DrTimothyAldenDavis/SuiteSparse/archive/refs/tags/v${version}.tar.gz" -checksum=dc2f8d5c2657c120b30cce942f634ec08fc3a4b0b10e19d3eef7790b2bec8d1e +checksum=4cd3d161f9aa4f98ec5fa725ee5dc27bca960a3714a707a7d12b3d0abb504679 build_options="openblas" From 59335507f9f3eb80f3ba1f0b78d094797b44b60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 2 Jul 2023 18:00:08 -0300 Subject: [PATCH 2/2] octave: fix build with SuiteSparse-7.1.0 --- .../octave/patches/fix-suitesparse-7.1.patch | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 srcpkgs/octave/patches/fix-suitesparse-7.1.patch diff --git a/srcpkgs/octave/patches/fix-suitesparse-7.1.patch b/srcpkgs/octave/patches/fix-suitesparse-7.1.patch new file mode 100644 index 000000000000..a9235cb386fb --- /dev/null +++ b/srcpkgs/octave/patches/fix-suitesparse-7.1.patch @@ -0,0 +1,166 @@ +--- a/liboctave/numeric/sparse-qr.cc 2023-04-13 13:43:35.000000000 -0300 ++++ b/liboctave/numeric/sparse-qr.cc 2023-07-02 17:56:48.485762203 -0300 +@@ -804,17 +804,17 @@ + Matrix ret (nrows, nc); + cholmod_dense *q; + +- // I is nrows x nrows identity matrix +- cholmod_dense *I ++ // Id is nrows x nrows identity matrix ++ cholmod_dense *Id + = cholmod_l_allocate_dense (nrows, nrows, nrows, CHOLMOD_REAL, &m_cc); + + for (octave_idx_type i = 0; i < nrows * nrows; i++) +- (reinterpret_cast (I->x))[i] = 0.0; ++ (reinterpret_cast (Id->x))[i] = 0.0; + + for (octave_idx_type i = 0; i < nrows; i++) +- (reinterpret_cast (I->x))[i * nrows + i] = 1.0; ++ (reinterpret_cast (Id->x))[i * nrows + i] = 1.0; + +- q = SuiteSparseQR_qmult (SPQR_QX, m_H, m_Htau, m_HPinv, I, &m_cc); ++ q = SuiteSparseQR_qmult (SPQR_QX, m_H, m_Htau, m_HPinv, Id, &m_cc); + spqr_error_handler (&m_cc); + + double *q_x = reinterpret_cast (q->x); +@@ -824,7 +824,7 @@ + ret_vec[j * nrows + i] = q_x[j * nrows + i]; + + cholmod_l_free_dense (&q, &m_cc); +- cholmod_l_free_dense (&I, &m_cc); ++ cholmod_l_free_dense (&Id, &m_cc); + + return ret; + +@@ -1738,18 +1738,18 @@ + ComplexMatrix ret (nrows, nc); + cholmod_dense *q; + +- // I is nrows x nrows identity matrix +- cholmod_dense *I ++ // Id is nrows x nrows identity matrix ++ cholmod_dense *Id + = reinterpret_cast + (cholmod_l_allocate_dense (nrows, nrows, nrows, CHOLMOD_COMPLEX, &m_cc)); + + for (octave_idx_type i = 0; i < nrows * nrows; i++) +- (reinterpret_cast (I->x))[i] = 0.0; ++ (reinterpret_cast (Id->x))[i] = 0.0; + + for (octave_idx_type i = 0; i < nrows; i++) +- (reinterpret_cast (I->x))[i * nrows + i] = 1.0; ++ (reinterpret_cast (Id->x))[i * nrows + i] = 1.0; + +- q = SuiteSparseQR_qmult (SPQR_QX, m_H, m_Htau, m_HPinv, I, ++ q = SuiteSparseQR_qmult (SPQR_QX, m_H, m_Htau, m_HPinv, Id, + &m_cc); + spqr_error_handler (&m_cc); + +@@ -1761,7 +1761,7 @@ + ret_vec[j * nrows + i] = q_x[j * nrows + i]; + + cholmod_l_free_dense (&q, &m_cc); +- cholmod_l_free_dense (&I, &m_cc); ++ cholmod_l_free_dense (&Id, &m_cc); + + return ret; + +@@ -1786,7 +1786,7 @@ + OCTAVE_LOCAL_BUFFER (cs_complex_t, bvec, nr); + + for (octave_idx_type i = 0; i < nr; i++) +- bvec[i] = cs_complex_t (0.0, 0.0); ++ bvec[i] = (cs_complex_t) 0.0; + + OCTAVE_LOCAL_BUFFER (Complex, buf, S->m2); + +@@ -1794,7 +1794,7 @@ + { + octave_quit (); + +- bvec[j] = cs_complex_t (1.0, 0.0); ++ bvec[j] = (cs_complex_t) 1.0; + + volatile octave_idx_type nm = (nr < nc ? nr : nc); + +@@ -1813,7 +1813,7 @@ + for (octave_idx_type i = 0; i < nr; i++) + vec[i+idx] = buf[i]; + +- bvec[j] = cs_complex_t (0.0, 0.0); ++ bvec[j] = (cs_complex_t) 0.0; + } + } + +@@ -2073,7 +2073,7 @@ + Xx[j] = b.xelem (j, i); + + for (octave_idx_type j = nr; j < S->m2; j++) +- buf[j] = cs_complex_t (0.0, 0.0); ++ buf[j] = (cs_complex_t) 0.0; + + CXSPARSE_ZNAME (_ipvec) (S->pinv, + reinterpret_cast(Xx), +@@ -2143,7 +2143,7 @@ + Xx[j] = b.xelem (j, i); + + for (octave_idx_type j = nr; j < nbuf; j++) +- buf[j] = cs_complex_t (0.0, 0.0); ++ buf[j] = (cs_complex_t) 0.0; + + CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast (Xx), + buf, nr); +@@ -2206,7 +2206,7 @@ + Xx[j] = b.xelem (j, i); + + for (octave_idx_type j = nr; j < S->m2; j++) +- buf[j] = cs_complex_t (0.0, 0.0); ++ buf[j] = (cs_complex_t) 0.0; + + CXSPARSE_ZNAME (_ipvec) (S->pinv, + reinterpret_cast (Xx), +@@ -2304,7 +2304,7 @@ + Xx[j] = b.xelem (j, i); + + for (octave_idx_type j = nr; j < nbuf; j++) +- buf[j] = cs_complex_t (0.0, 0.0); ++ buf[j] = (cs_complex_t) 0.0; + + CXSPARSE_ZNAME (_pvec) (S->q, + reinterpret_cast (Xx), +@@ -2392,7 +2392,7 @@ + octave_quit (); + + for (octave_idx_type j = nr; j < S->m2; j++) +- buf[j] = cs_complex_t (0.0, 0.0); ++ buf[j] = (cs_complex_t) 0.0; + + CXSPARSE_ZNAME (_ipvec) (S->pinv, bvec + bidx, buf, nr); + +@@ -2460,7 +2460,7 @@ + octave_quit (); + + for (octave_idx_type j = nr; j < nbuf; j++) +- buf[j] = cs_complex_t (0.0, 0.0); ++ buf[j] = (cs_complex_t) 0.0; + + CXSPARSE_ZNAME (_pvec) (S->q, bvec + bidx, buf, nr); + CXSPARSE_ZNAME (_utsolve) (N->U, buf); +@@ -2522,7 +2522,7 @@ + Xx[j] = b.xelem (j, i); + + for (octave_idx_type j = nr; j < S->m2; j++) +- buf[j] = cs_complex_t (0.0, 0.0); ++ buf[j] = (cs_complex_t) 0.0; + + CXSPARSE_ZNAME (_ipvec) (S->pinv, + reinterpret_cast (Xx), +@@ -2620,7 +2620,7 @@ + Xx[j] = b.xelem (j, i); + + for (octave_idx_type j = nr; j < nbuf; j++) +- buf[j] = cs_complex_t (0.0, 0.0); ++ buf[j] = (cs_complex_t) 0.0; + + CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast(Xx), + buf, nr);