# HG changeset patch # User Markus Mützel # Date 1668678012 -3600 # Node ID 8ea9085d1f80e6b3c777a6dec650cd7eb329c7b1 # Parent 91d5ee8ae1750e08969cb31d7f3417fb86a25985 of-control: Fix compatibility with Octave 9. * src/of-control-2-octave-9-compat.patch: Add patch that replaces functions and classes that have been deprecated in Octave 7 and removed from Octave 9. * dist-files.mk: Add new file to list. diff -r 91d5ee8ae175 -r 8ea9085d1f80 dist-files.mk --- a/dist-files.mk Thu Nov 17 09:51:29 2022 +0100 +++ b/dist-files.mk Thu Nov 17 10:40:12 2022 +0100 @@ -475,6 +475,7 @@ of-audio.mk \ of-communications.mk \ of-control-1-deprecated-warnings.patch \ + of-control-2-octave-9-compat.patch \ of-control.mk \ of-data-smoothing.mk \ of-database-1-verror.patch \ diff -r 91d5ee8ae175 -r 8ea9085d1f80 src/of-control-2-octave-9-compat.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-control-2-octave-9-compat.patch Thu Nov 17 10:40:12 2022 +0100 @@ -0,0 +1,42 @@ +Replace functions and classes deprecated in Octave 7 and removed from Octave 9. + +--- control-3.4.0/src/sl_ab08nd.cc.orig 2022-01-16 15:17:03.000000000 +0100 ++++ control-3.4.0/src/sl_ab08nd.cc 2022-11-17 10:22:24.964707565 +0100 +@@ -136,10 +136,10 @@ + F77_XFCN (ab08nd, AB08ND, + (equil, + n, m, p, +- a.fortran_vec (), lda, +- b.fortran_vec (), ldb, +- c.fortran_vec (), ldc, +- d.fortran_vec (), ldd, ++ a.data (), lda, ++ b.data (), ldb, ++ c.data (), ldc, ++ d.data (), ldd, + nu, rank, dinfz, + nkror, nkrol, infz, + kronr, kronl, +@@ -198,7 +198,7 @@ + if (m == 1 && p == 1) + { + if (nu < n) +- gain = c * xpow (a, double (n-1-nu)).matrix_value() * b; ++ gain = c * octave::xpow (a, double (n-1-nu)).matrix_value () * b; + else + gain = d; + } + +--- control-3.4.0/src/lti_input_idx.cc.orig 2022-01-16 15:17:03.000000000 +0100 ++++ control-3.4.0/src/lti_input_idx.cc 2022-11-17 10:28:13.630086637 +0100 +@@ -93,8 +93,8 @@ + offset = 1; + } + +- Range mat_idx (1, idx-offset); +- Range opt_idx (idx+1-offset, len); ++ octave::range mat_idx (1, idx-offset); ++ octave::range opt_idx (idx+1-offset, len); + + retval(2) = offset; // abused as logical in the LTI constructors + retval(1) = opt_idx;