# HG changeset patch # User John Donoghue # Date 1643031050 18000 # Node ID 4d6eba975aa4278d559a31d28e88fa7333e11ff2 # Parent 51ba43646a952f182fd47f1f7b0130a40296e0d8 of_communications: update to v1.2.4 * src/of-communications-1-catop.patch: removed file * src/of-communications-2-error_state.patch: removed file * dist-files.mk: removed ref to removed filed * dist-files.mk: update version, checksum diff -r 51ba43646a95 -r 4d6eba975aa4 dist-files.mk --- a/dist-files.mk Wed Jan 19 12:54:05 2022 -0500 +++ b/dist-files.mk Mon Jan 24 08:30:50 2022 -0500 @@ -470,8 +470,6 @@ ocaml-native.mk \ of-actuarial.mk \ of-audio.mk \ - of-communications-1-catop.patch \ - of-communications-2-error_state.patch \ of-communications.mk \ of-control-1-deprecated-warnings.patch \ of-control.mk \ diff -r 51ba43646a95 -r 4d6eba975aa4 src/of-communications-1-catop.patch --- a/src/of-communications-1-catop.patch Wed Jan 19 12:54:05 2022 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,202 +0,0 @@ -diff -uNr a/src/config.h.in b/src/config.h.in ---- a/src/config.h.in 2020-01-04 12:50:13.541197341 -0500 -+++ b/src/config.h.in 2020-08-25 14:50:29.000000000 -0400 -@@ -26,6 +26,9 @@ - /* Define to 1 if you have the header file. */ - #undef HAVE_OCTAVE_ERRWARN_H - -+/* Define if first catop function argument is const-qualified */ -+#undef HAVE_OCTAVE_FIRST_CATOP_ARG_CONST -+ - /* Define to 1 if you have the header file. */ - #undef HAVE_OCTAVE_GRIPES_H - -diff -uNr a/src/configure b/src/configure ---- a/src/configure 2020-01-04 12:50:13.249198461 -0500 -+++ b/src/configure 2020-08-25 13:48:13.000000000 -0400 -@@ -4083,6 +4083,63 @@ - - fi - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether first catop function argument is const-qualified" >&5 -+$as_echo_n "checking whether first catop function argument is const-qualified... " >&6; } -+if ${comm_cv_octave_first_catop_fcn_arg_const_qualified+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ comm_save_CPPFLAGS=$CPPFLAGS -+ comm_save_CXXFLAGS=$CXXFLAGS -+ CPPFLAGS="$CPPFLAGS $HDF5_CFLAGS" -+ CXXFLAGS="$CXXFLAGS $comm_CXXFLAGS" -+ ac_ext=cpp -+ac_cpp='$CXXCPP $CPPFLAGS' -+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -+ -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+ #include -+ #include -+ -+int -+main () -+{ -+ -+ octave_value foobar_fcn (const octave_base_value&, -+ const octave_base_value&, -+ const Array& ra_idx); -+ octave::type_info::cat_op_fcn fcn = foobar_fcn; -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_cxx_try_compile "$LINENO"; then : -+ comm_cv_octave_first_catop_fcn_arg_const_qualified=yes -+else -+ comm_cv_octave_first_catop_fcn_arg_const_qualified=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ ac_ext=cpp -+ac_cpp='$CXXCPP $CPPFLAGS' -+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -+ -+ CPPFLAGS=$comm_save_CPPFLAGS -+ CXXFLAGS=$comm_save_CXXFLAGS -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $comm_cv_octave_first_catop_fcn_arg_const_qualified" >&5 -+$as_echo "$comm_cv_octave_first_catop_fcn_arg_const_qualified" >&6; } -+if test $comm_cv_octave_first_catop_fcn_arg_const_qualified = yes; then -+ -+$as_echo "#define HAVE_OCTAVE_FIRST_CATOP_ARG_CONST 1" >>confdefs.h -+ -+fi -+ - ac_config_files="$ac_config_files Makefile" - - cat >confcache <<\_ACEOF -diff -uNr a/src/configure.ac b/src/configure.ac ---- a/src/configure.ac 2020-01-04 12:49:06.000000000 -0500 -+++ b/src/configure.ac 2020-08-25 13:47:59.000000000 -0400 -@@ -252,5 +252,30 @@ - AC_DEFINE([HAVE_OCTAVE_BASE_VALUE_PRINT_CONST],[1],[Define if octave_base_value::print is const-qualified]) - fi - -+AC_CACHE_CHECK([whether first catop function argument is const-qualified], -+ [comm_cv_octave_first_catop_fcn_arg_const_qualified], -+ [comm_save_CPPFLAGS=$CPPFLAGS -+ comm_save_CXXFLAGS=$CXXFLAGS -+ CPPFLAGS="$CPPFLAGS $HDF5_CFLAGS" -+ CXXFLAGS="$CXXFLAGS $comm_CXXFLAGS" -+ AC_LANG_PUSH(C++) -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -+ #include -+ #include -+ ]], [[ -+ octave_value foobar_fcn (const octave_base_value&, -+ const octave_base_value&, -+ const Array& ra_idx); -+ octave::type_info::cat_op_fcn fcn = foobar_fcn; -+ ]])], -+ [comm_cv_octave_first_catop_fcn_arg_const_qualified=yes], -+ [comm_cv_octave_first_catop_fcn_arg_const_qualified=no]) -+ AC_LANG_POP(C++) -+ CPPFLAGS=$comm_save_CPPFLAGS -+ CXXFLAGS=$comm_save_CXXFLAGS]) -+if test $comm_cv_octave_first_catop_fcn_arg_const_qualified = yes; then -+ AC_DEFINE([HAVE_OCTAVE_FIRST_CATOP_ARG_CONST],[1],[Define if first catop function argument is const-qualified]) -+fi -+ - AC_CONFIG_FILES([Makefile]) - AC_OUTPUT -diff -uNr a/src/galois-ops.h b/src/galois-ops.h ---- a/src/galois-ops.h 2020-01-04 12:49:06.000000000 -0500 -+++ b/src/galois-ops.h 2020-08-25 14:00:18.000000000 -0400 -@@ -40,11 +40,19 @@ - #endif - - #if ! defined (CATOPDECL) --# define CATOPDECL(name, a1, a2) \ -+# if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST) -+# define CATOPDECL(name, a1, a2) \ -+ static octave_value \ -+ CONCAT2(oct_catop_, name) (const octave_base_value& a1, \ -+ const octave_base_value& a2, \ -+ const Array& ra_idx) -+# else -+# define CATOPDECL(name, a1, a2) \ - static octave_value \ - CONCAT2(oct_catop_, name) (octave_base_value& a1, \ - const octave_base_value& a2, \ - const Array& ra_idx) -+# endif - #endif - - // Override the operator and function definition defines from Octave -@@ -124,7 +132,24 @@ - return new octave_galois (f (v1.t1 ## _value (), v2.matrix_value ())); \ - } - --#define DEFCATOP_G_FN(name, t1, t2, f) \ -+#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST) -+# define DEFCATOP_G_FN(name, t1, t2, f) \ -+ CATOPDECL (name, a1, a2) \ -+ { \ -+ CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \ -+ return new octave_galois (f (v1.t1 ## _value (), v2.t2 ## _value (), \ -+ ra_idx)); \ -+ } -+ -+#define DEFCATOP_G_METHOD(name, t1, t2, f) \ -+ CATOPDECL (name, a1, a2) \ -+ { \ -+ CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \ -+ return new octave_galois (v1.t1 ## _value (). f (v2.t2 ## _value (), \ -+ ra_idx)); \ -+ } -+#else -+# define DEFCATOP_G_FN(name, t1, t2, f) \ - CATOPDECL (name, a1, a2) \ - { \ - CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \ -@@ -139,6 +164,7 @@ - return new octave_galois (v1.t1 ## _value (). f (v2.t2 ## _value (), \ - ra_idx)); \ - } -+#endif - - #define INSTALL_G_CATOP(t1, t2, f) INSTALL_CATOP (t1, t2, f) - -diff -uNr a/src/op-gm-s.cc b/src/op-gm-s.cc ---- a/src/op-gm-s.cc 2020-01-04 12:49:06.000000000 -0500 -+++ b/src/op-gm-s.cc 2020-08-25 13:50:19.000000000 -0400 -@@ -68,7 +68,11 @@ - - DEFCATOP (gm_s, galois, scalar) - { -+#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST) -+ CAST_BINOP_ARGS (const octave_galois&, const octave_scalar&); -+#else - CAST_BINOP_ARGS (octave_galois&, const octave_scalar&); -+#endif - return new octave_galois (v1.galois_value (). concat (v2.matrix_value (), - ra_idx)); - } -diff -uNr a/src/op-s-gm.cc b/src/op-s-gm.cc ---- a/src/op-s-gm.cc 2020-01-04 12:49:06.000000000 -0500 -+++ b/src/op-s-gm.cc 2020-08-25 14:51:01.000000000 -0400 -@@ -81,7 +81,11 @@ - - DEFCATOP (s_gm, scalar, galois) - { -+#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST) -+ CAST_BINOP_ARGS (const octave_scalar&, const octave_galois&); -+#else - CAST_BINOP_ARGS (octave_scalar&, const octave_galois&); -+#endif - return new octave_galois (concat (v1.matrix_value (), v2.galois_value (), - ra_idx)); - } diff -r 51ba43646a95 -r 4d6eba975aa4 src/of-communications-2-error_state.patch --- a/src/of-communications-2-error_state.patch Wed Jan 19 12:54:05 2022 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,321 +0,0 @@ -# HG changeset patch -# User Markus Mützel -# Date 1637943467 -3600 -# Fri Nov 26 17:17:47 2021 +0100 -# Node ID ace112d772c3be2ee53792fa9b687fe22f105fa3 -# Parent a132b9df4944dadf0144c1eb61bffe71a706e166 -Fix compilation with Octave 8 (bug #61566). - -* src/genqamdemod.cc (Fgenqamdemod), src/gf.cc (make_gdiag, DATA_REDUCTION, -Fglu, Fginv), src/ov-galois.cc (octave_galois::subsref, octave_galois::assign, -octave_galois::load_binary): Remove usage of `error_state`. It was -unconditionally set to 0 since about 6 years ago and will finally be removed in -Octave 8. - -diff -r a132b9df4944 -r ace112d772c3 src/genqamdemod.cc ---- a/src/genqamdemod.cc Tue Jul 27 11:56:45 2021 -0400 -+++ b/src/genqamdemod.cc Fri Nov 26 17:17:47 2021 +0100 -@@ -79,28 +79,23 @@ - { // Complex-valued input & constellation - ComplexMatrix x (args(0).complex_matrix_value ()); - ComplexColumnVector constellation (args(1).complex_vector_value ()); -- if (!error_state) -+ for (i = 0;i < nr1;i++) - { -- for (i = 0;i < nr1;i++) -+ for (j = 0;j < nc1;j++) - { -- for (j = 0;j < nc1;j++) -+ tmp1 = abs (x(i,j)-constellation(0)); -+ y(i,j) = 0; -+ for (m = 1;m < M;m++) - { -- tmp1 = abs (x(i,j)-constellation(0)); -- y(i,j) = 0; -- for (m = 1;m < M;m++) -+ tmp2 = abs (x(i,j)-constellation(m)); -+ if (tmp2 < tmp1) - { -- tmp2 = abs (x(i,j)-constellation(m)); -- if (tmp2 < tmp1) -- { -- y(i,j) = m; -- tmp1 = tmp2; -- } -+ y(i,j) = m; -+ tmp1 = tmp2; - } - } - } - } -- else -- print_usage (); - } - else - { -diff -r a132b9df4944 -r ace112d772c3 src/gf.cc ---- a/src/gf.cc Tue Jul 27 11:56:45 2021 -0400 -+++ b/src/gf.cc Fri Nov 26 17:17:47 2021 +0100 -@@ -180,55 +180,50 @@ - galois m = ((const octave_galois&) a.get_rep ()).galois_value (); - int k = b.nint_value (); - -- if (! error_state) -+ int nr = m.rows (); -+ int nc = m.columns (); -+ -+ if (nr == 0 || nc == 0) -+ retval = new octave_galois (m); -+ else if (nr == 1 || nc == 1) - { -- int nr = m.rows (); -- int nc = m.columns (); -- -- if (nr == 0 || nc == 0) -- retval = new octave_galois (m); -- else if (nr == 1 || nc == 1) -+ int roff = 0; -+ int coff = 0; -+ if (k > 0) - { -- int roff = 0; -- int coff = 0; -- if (k > 0) -- { -- roff = 0; -- coff = k; -- } -- else if (k < 0) -- { -- k = -k; -- roff = k; -- coff = 0; -- } -+ roff = 0; -+ coff = k; -+ } -+ else if (k < 0) -+ { -+ k = -k; -+ roff = k; -+ coff = 0; -+ } - -- if (nr == 1) -- { -- int n = nc + k; -- galois r (n, n, 0, m.m (), m.primpoly ()); -- for (int i = 0; i < nc; i++) -- r (i+roff, i+coff) = m (0, i); -- retval = new octave_galois (r); -- } -- else -- { -- int n = nr + k; -- galois r (n, n, 0, m.m (), m.primpoly ()); -- for (int i = 0; i < nr; i++) -- r (i+roff, i+coff) = m (i, 0); -- retval = new octave_galois (r); -- } -+ if (nr == 1) -+ { -+ int n = nc + k; -+ galois r (n, n, 0, m.m (), m.primpoly ()); -+ for (int i = 0; i < nc; i++) -+ r (i+roff, i+coff) = m (0, i); -+ retval = new octave_galois (r); - } - else - { -- galois r = m.diag (k); -- if (r.numel () > 0) -- retval = new octave_galois (r); -+ int n = nr + k; -+ galois r (n, n, 0, m.m (), m.primpoly ()); -+ for (int i = 0; i < nr; i++) -+ r (i+roff, i+coff) = m (i, 0); -+ retval = new octave_galois (r); - } - } - else -- OCTAVE__ERR_WRONG_TYPE_ARG ("gdiag", a); -+ { -+ galois r = m.diag (k); -+ if (r.numel () > 0) -+ retval = new octave_galois (r); -+ } - } - return retval; - } -@@ -390,27 +385,23 @@ - \ - int dim = (nargin == 1 ? -1 : args(1).int_value (true) - 1); \ - \ -- if (! error_state) \ -+ if (dim <= 1 && dim >= -1) \ - { \ -- if (dim <= 1 && dim >= -1) \ -+ if (galois_type_loaded && (arg.type_id () == \ -+ octave_galois::static_type_id ())) \ - { \ -- if (galois_type_loaded && (arg.type_id () == \ -- octave_galois::static_type_id ())) \ -- { \ -- galois tmp = ((const octave_galois&)arg.get_rep ()).galois_value (); \ -+ galois tmp = ((const octave_galois&)arg.get_rep ()).galois_value (); \ - \ -- if (! error_state) \ -- retval(0) = new octave_galois (tmp.FCN (dim)); \ -- } \ -- else \ -- { \ -- OCTAVE__ERR_WRONG_TYPE_ARG (#FCN, arg); \ -- return retval; \ -- } \ -+ retval(0) = new octave_galois (tmp.FCN (dim)); \ - } \ - else \ -- error (#FCN ": invalid dimension argument = %d", dim + 1); \ -+ { \ -+ OCTAVE__ERR_WRONG_TYPE_ARG (#FCN, arg); \ -+ return retval; \ -+ } \ - } \ -+ else \ -+ error (#FCN ": invalid dimension argument = %d", dim + 1); \ - } \ - else \ - print_usage (); \ -@@ -1017,32 +1008,29 @@ - return retval; - } - -- if (! error_state) -- { -- galoisLU fact (m); -+ galoisLU fact (m); - -- switch (nargout) -- { -- case 0: -- case 1: -- case 2: -- { -- // While we don't have sparse galois matrices converting the -- // permutation matrix to a full matrix is the best we can do. -- Matrix P = Matrix (fact.P ()); -- galois L = P.transpose () * fact.L (); -- retval(1) = new octave_galois (fact.U ()); -- retval(0) = new octave_galois (L); -- } -- break; -+ switch (nargout) -+ { -+ case 0: -+ case 1: -+ case 2: -+ { -+ // While we don't have sparse galois matrices converting the -+ // permutation matrix to a full matrix is the best we can do. -+ Matrix P = Matrix (fact.P ()); -+ galois L = P.transpose () * fact.L (); -+ retval(1) = new octave_galois (fact.U ()); -+ retval(0) = new octave_galois (L); -+ } -+ break; - -- case 3: -- default: -- retval(2) = fact.P (); -- retval(1) = new octave_galois (fact.U ()); -- retval(0) = new octave_galois (fact.L ()); -- break; -- } -+ case 3: -+ default: -+ retval(2) = fact.P (); -+ retval(1) = new octave_galois (fact.U ()); -+ retval(0) = new octave_galois (fact.L ()); -+ break; - } - - return retval; -@@ -1104,21 +1092,18 @@ - return retval; - } - -- if (! error_state) -- { -- int info; -- double rcond = 0.0; -+ int info; -+ double rcond = 0.0; - -- galois result = m.inverse (info, 1); -+ galois result = m.inverse (info, 1); - -- if (nargout > 1) -- retval(1) = rcond; -+ if (nargout > 1) -+ retval(1) = rcond; - -- retval(0) = new octave_galois (result); -+ retval(0) = new octave_galois (result); - -- if (nargout < 2 && info == -1) -- warning ("inverse: matrix singular to machine precision, rcond = %g", rcond); -- } -+ if (nargout < 2 && info == -1) -+ warning ("inverse: matrix singular to machine precision, rcond = %g", rcond); - - return retval; - } -diff -r a132b9df4944 -r ace112d772c3 src/ov-galois.cc ---- a/src/ov-galois.cc Tue Jul 27 11:56:45 2021 -0400 -+++ b/src/ov-galois.cc Fri Nov 26 17:17:47 2021 +0100 -@@ -208,8 +208,7 @@ - panic_impossible (); - } - -- if (! error_state) -- retval = retval.next_subsref (type, idx, skip); -+ retval = retval.next_subsref (type, idx, skip); - - return retval; - } -@@ -427,14 +426,9 @@ - case 2: - { - idx_vector i = idx (0).index_vector (); -+ idx_vector j = idx (1).index_vector (); - -- if (! error_state) -- { -- idx_vector j = idx (1).index_vector (); -- -- if (! error_state) -- gval.assign (i, j, rhs); -- } -+ gval.assign (i, j, rhs); - } - break; - -@@ -442,8 +436,7 @@ - { - idx_vector i = idx (0).index_vector (); - -- if (! error_state) -- gval.assign (i, rhs); -+ gval.assign (i, rhs); - } - break; - -@@ -597,7 +590,7 @@ - Matrix m (dv(0), dv(1)); - double *re = m.fortran_vec (); - read_doubles (is, re, X_CAST (save_type, tmp), dv.numel (), swap, fmt); -- if (error_state || ! is) -+ if (! is) - return false; - - gval = galois (m, mord, prim); diff -r 51ba43646a95 -r 4d6eba975aa4 src/of-communications.mk --- a/src/of-communications.mk Wed Jan 19 12:54:05 2022 -0500 +++ b/src/of-communications.mk Mon Jan 24 08:30:50 2022 -0500 @@ -3,8 +3,8 @@ PKG := of-communications $(PKG)_IGNORE := -$(PKG)_VERSION := 1.2.3 -$(PKG)_CHECKSUM := add4e746b34efe7156b10e5be42ab61473a69670 +$(PKG)_VERSION := 1.2.4 +$(PKG)_CHECKSUM := cb96debf0aaf103b8f2bd5fa29ea03d2e53ca2af $(PKG)_REMOTE_SUBDIR := $(PKG)_SUBDIR := communications-$($(PKG)_VERSION) $(PKG)_FILE := communications-$($(PKG)_VERSION).tar.gz