Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jul 2023 17:59:22 GMT
From:      Stephen Montgomery-Smith <stephen@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 624b3209c0ae - main - math/octave: Fix build.
Message-ID:  <202307011759.361HxMM3021049@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by stephen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=624b3209c0ae5fa34830ed0a94999197a66e2009

commit 624b3209c0ae5fa34830ed0a94999197a66e2009
Author:     Stephen Montgomery-Smith <stephen@FreeBSD.org>
AuthorDate: 2023-07-01 17:54:52 +0000
Commit:     Stephen Montgomery-Smith <stephen@FreeBSD.org>
CommitDate: 2023-07-01 17:59:12 +0000

    math/octave: Fix build.
    
    Necessitated by recent update of suitesparse.
---
 .../files/patch-liboctave_numeric_sparse-qr.cc     | 92 ++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/math/octave/files/patch-liboctave_numeric_sparse-qr.cc b/math/octave/files/patch-liboctave_numeric_sparse-qr.cc
new file mode 100644
index 000000000000..0ea48c7d50eb
--- /dev/null
+++ b/math/octave/files/patch-liboctave_numeric_sparse-qr.cc
@@ -0,0 +1,92 @@
+--- liboctave/numeric/sparse-qr.cc.orig	2023-04-13 16:43:35 UTC
++++ liboctave/numeric/sparse-qr.cc
+@@ -1786,7 +1786,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::Q (bool
+       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;
+ 
+       OCTAVE_LOCAL_BUFFER (Complex, buf, S->m2);
+ 
+@@ -1813,7 +1813,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::Q (bool
+           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;
+         }
+     }
+ 
+@@ -2073,7 +2073,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::tall_so
+         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;
+ 
+       CXSPARSE_ZNAME (_ipvec) (S->pinv,
+                                reinterpret_cast<cs_complex_t *>(Xx),
+@@ -2143,7 +2143,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::wide_so
+         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;
+ 
+       CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast<cs_complex_t *> (Xx),
+                               buf, nr);
+@@ -2206,7 +2206,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::tall_so
+         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;
+ 
+       CXSPARSE_ZNAME (_ipvec) (S->pinv,
+                                reinterpret_cast<cs_complex_t *> (Xx),
+@@ -2304,7 +2304,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::wide_so
+         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;
+ 
+       CXSPARSE_ZNAME (_pvec) (S->q,
+                               reinterpret_cast<cs_complex_t *> (Xx),
+@@ -2392,7 +2392,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::tall_so
+       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;
+ 
+       CXSPARSE_ZNAME (_ipvec) (S->pinv, bvec + bidx, buf, nr);
+ 
+@@ -2460,7 +2460,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::wide_so
+       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;
+ 
+       CXSPARSE_ZNAME (_pvec) (S->q, bvec + bidx, buf, nr);
+       CXSPARSE_ZNAME (_utsolve) (N->U, buf);
+@@ -2522,7 +2522,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::tall_so
+         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;
+ 
+       CXSPARSE_ZNAME (_ipvec) (S->pinv,
+                                reinterpret_cast<cs_complex_t *> (Xx),
+@@ -2620,7 +2620,7 @@ sparse_qr<SparseComplexMatrix>::sparse_qr_rep::wide_so
+         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;
+ 
+       CXSPARSE_ZNAME (_pvec) (S->q, reinterpret_cast<cs_complex_t *>(Xx),
+                               buf, nr);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307011759.361HxMM3021049>