# HG changeset patch # User John W. Eaton # Date 1559207660 14400 # Node ID 6fa56c3893ced7120ee6d7ce202a18c1a5abb1e5 # Parent 0f111c0ba0b2115338d5f0e609bfc8fd072ef26a# Parent 9ac443dd92ad7621e215d3ba45e4b351d98eeaca merge away extra head diff -r 9ac443dd92ad -r 6fa56c3893ce dist-files.mk --- a/dist-files.mk Fri May 17 10:09:55 2019 -0400 +++ b/dist-files.mk Thu May 30 05:14:20 2019 -0400 @@ -474,6 +474,7 @@ of-fl-core.mk \ of-fuzzy-logic-toolkit.mk \ of-ga.mk \ + of-general-1-dev-fixes.patch \ of-general.mk \ of-generate_html.mk \ of-geometry-1-fixes.patch \ diff -r 9ac443dd92ad -r 6fa56c3893ce src/of-general-1-dev-fixes.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-general-1-dev-fixes.patch Thu May 30 05:14:20 2019 -0400 @@ -0,0 +1,317 @@ +diff -uNr general-2.1.0-a/Makefile general-2.1.0-b/Makefile +--- general-2.1.0-a/Makefile 2018-05-13 17:01:51.400133935 -0400 ++++ general-2.1.0-b/Makefile 2019-05-14 14:14:28.000000000 -0400 +@@ -212,10 +212,8 @@ + + ## Test package. + octave_test_commands = \ +-' pkgs = pkg("list","general"); cd (pkgs{1}.dir); dirs = { "." }; \ +- dirs(cellfun (@ (x) ! isdir (x), dirs)) = []; \ +- if (isempty (dirs)) error ("no \"inst\" or \"src\" directory"); exit (1); \ +- else __run_test_suite__ (dirs, {}); endif ' ++' pkgs = pkg("list","general"); dirs = { pkgs{1}.dir }; \ ++ __run_test_suite__ (dirs, {}); ' + ## the following works, too, but provides no overall summary output as + ## __run_test_suite__ does: + ## +diff -uNr general-2.1.0-a/NEWS general-2.1.0-b/NEWS +--- general-2.1.0-a/NEWS 2018-05-13 17:01:51.400133935 -0400 ++++ general-2.1.0-b/NEWS 2019-05-14 14:14:28.000000000 -0400 +@@ -1,3 +1,9 @@ ++Summary of important user-visible changes for general 2.1.0+: ++------------------------------------------------------------------- ++ ++ ** updated configure script to detect function names for various ++ octave versions. ++ + Summary of important user-visible changes for general 2.1.0: + ------------------------------------------------------------------- + +diff -uNr general-2.1.0-a/octave-general.metainfo.xml general-2.1.0-b/octave-general.metainfo.xml +--- general-2.1.0-a/octave-general.metainfo.xml 1969-12-31 19:00:00.000000000 -0500 ++++ general-2.1.0-b/octave-general.metainfo.xml 2019-05-14 14:14:28.000000000 -0400 +@@ -0,0 +1,23 @@ ++ ++ ++ octave-general ++ www.octave.org-octave.desktop ++ General ++ General tools for GNU Octave ++ ++

Provides functions for dictionaries, field packing, ++ SHA1 hashing and more. ++

++
++ ++ dictionary ++ field packing ++ sha1 ++ planar resampling ++ ++ http://octave.sourceforge.net/general ++ https://savannah.gnu.org/projects/octave ++ GPL-3.0+ ++ maintainers@octave.org ++ FSFAP ++
+diff -uNr general-2.1.0-a/src/aclocal.m4 general-2.1.0-b/src/aclocal.m4 +--- general-2.1.0-a/src/aclocal.m4 2018-05-13 17:01:51.756132186 -0400 ++++ general-2.1.0-b/src/aclocal.m4 2019-05-28 12:31:17.292636009 -0400 +@@ -1,6 +1,6 @@ +-# generated automatically by aclocal 1.15 -*- Autoconf -*- ++# generated automatically by aclocal 1.16.1 -*- Autoconf -*- + +-# Copyright (C) 1996-2014 Free Software Foundation, Inc. ++# Copyright (C) 1996-2018 Free Software Foundation, Inc. + + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, +diff -uNr general-2.1.0-a/src/config.h.in general-2.1.0-b/src/config.h.in +--- general-2.1.0-a/src/config.h.in 2018-05-13 17:01:52.076130613 -0400 ++++ general-2.1.0-b/src/config.h.in 2019-05-28 12:31:18.363534450 -0400 +@@ -8,6 +8,15 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_OCTAVE_INTERPRETER_H + ++/* Have interpreter::assign */ ++#undef OCTAVE_HAVE_INTERPRETER_ASSIGN ++ ++/* Have interpreter::varval */ ++#undef OCTAVE_HAVE_INTERPRETER_VARVAL ++ ++/* macro for alternative Octave symbols */ ++#undef OCTAVE__VALID_IDENTIFIER ++ + /* macro for alternative Octave symbols */ + #undef OV_ISMAP + +diff -uNr general-2.1.0-a/src/configure general-2.1.0-b/src/configure +--- general-2.1.0-a/src/configure 2018-05-13 17:01:51.920131379 -0400 ++++ general-2.1.0-b/src/configure 2019-05-28 12:31:17.876659277 -0400 +@@ -2909,6 +2909,40 @@ + echo '/* generated by configure */' > oct-alt-includes.h + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking valid_identifier or octave::valid_identifier" >&5 ++$as_echo_n "checking valid_identifier or octave::valid_identifier... " >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ ++ ++int ++main () ++{ ++octave::valid_identifier (""); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ ++$as_echo "#define OCTAVE__VALID_IDENTIFIER octave::valid_identifier" >>confdefs.h ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: octave::valid_identifier" >&5 ++$as_echo "octave::valid_identifier" >&6; } ++ echo ' ++' >> oct-alt-includes.h ++else ++ ++$as_echo "#define OCTAVE__VALID_IDENTIFIER valid_identifier" >>confdefs.h ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: valid_identifier" >&5 ++$as_echo " valid_identifier" >&6; } ++ echo '' >> oct-alt-includes.h ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking is_map or isstruct" >&5 + $as_echo_n "checking is_map or isstruct... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -2967,6 +3001,43 @@ + done + + ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++octave::interpreter *interp; interp->varval ("varname"); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ ++$as_echo "#define OCTAVE_HAVE_INTERPRETER_VARVAL 1" >>confdefs.h ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++octave::interpreter *interp; interp->assign ("varname", octave_value ()); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_cxx_try_compile "$LINENO"; then : ++ ++$as_echo "#define OCTAVE_HAVE_INTERPRETER_ASSIGN 1" >>confdefs.h ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++ + LIBS=$TLIBS + LDFLAGS=$TLDFLAGS + CXXFLAGS=$TCXXFLAGS +diff -uNr general-2.1.0-a/src/configure.ac general-2.1.0-b/src/configure.ac +--- general-2.1.0-a/src/configure.ac 2018-05-13 17:01:51.408133896 -0400 ++++ general-2.1.0-b/src/configure.ac 2019-05-14 14:14:28.000000000 -0400 +@@ -82,6 +82,15 @@ + OF_OCTAVE_LIST_ALT_SYMS([ + + [dnl ++ [valid_identifier], ++ [octave::valid_identifier], ++ [[octave::valid_identifier ("");]], ++ [OCTAVE__VALID_IDENTIFIER], ++ [], ++ [] ++], ++ ++[dnl + [is_map], + [isstruct], + [[octave_value ().isstruct ();]], +@@ -99,6 +108,19 @@ + [#include ] + ) + ++AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM([[#include ]], ++ [[octave::interpreter *interp; interp->varval ("varname");]])], ++ [AC_DEFINE([OCTAVE_HAVE_INTERPRETER_VARVAL], [1], [Have interpreter::varval])], ++ []) ++ ++AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM([[#include ]], ++ [[octave::interpreter *interp; interp->assign ("varname", octave_value ());]])], ++ [AC_DEFINE([OCTAVE_HAVE_INTERPRETER_ASSIGN], [1], [Have interpreter::assign])], ++ []) ++ ++ + LIBS=$TLIBS + LDFLAGS=$TLDFLAGS + CXXFLAGS=$TCXXFLAGS +diff -uNr general-2.1.0-a/src/packfields.cc general-2.1.0-b/src/packfields.cc +--- general-2.1.0-a/src/packfields.cc 2018-05-13 17:01:51.408133896 -0400 ++++ general-2.1.0-b/src/packfields.cc 2019-05-14 14:14:28.000000000 -0400 +@@ -58,9 +58,11 @@ + if (nargin > 0) + { + #ifdef DEFMETHOD_DLD ++#ifndef OCTAVE_HAVE_INTERPRETER_VARVAL + octave::symbol_table::scope curr_scope + = interp.require_current_scope ("packfields"); + #endif ++#endif + + std::string struct_name = args (0).string_value (); + string_vector fld_names(nargin-1); +@@ -84,7 +86,11 @@ + fld_names(i) = fld_name; + + #ifdef DEFMETHOD_DLD ++#ifdef OCTAVE_HAVE_INTERPRETER_VARVAL ++ octave_value fld_val = interp.varval (fld_name); ++#else + octave_value fld_val = curr_scope.varval (fld_name); ++#endif + #else + octave_value fld_val = symbol_table::varval (fld_name); + #endif +@@ -100,7 +106,11 @@ + if (! error_state) + { + #ifdef DEFMETHOD_DLD ++#ifdef OCTAVE_HAVE_INTERPRETER_VARVAL ++ octave_value struct_val = interp.varval (struct_name); ++#else + octave_value struct_val = curr_scope.varval (struct_name); ++#endif + #else + octave_value struct_val = symbol_table::varval (struct_name); + #endif +@@ -116,7 +126,11 @@ + struct_val = map; + + #ifdef DEFMETHOD_DLD ++#ifdef OCTAVE_HAVE_INTERPRETER_ASSIGN ++ interp.assign (struct_name, struct_val); ++#else + curr_scope.assign (struct_name, struct_val); ++#endif + #else + symbol_table::assign (struct_name, struct_val); + #endif +diff -uNr general-2.1.0-a/src/unpackfields.cc general-2.1.0-b/src/unpackfields.cc +--- general-2.1.0-a/src/unpackfields.cc 2018-05-13 17:01:51.408133896 -0400 ++++ general-2.1.0-b/src/unpackfields.cc 2019-05-14 14:14:28.000000000 -0400 +@@ -64,9 +64,11 @@ + if (nargin > 0) + { + #ifdef DEFMETHOD_DLD ++#ifndef OCTAVE_HAVE_INTERPRETER_VARVAL + octave::symbol_table::scope curr_scope + = interp.require_current_scope ("unpackfields"); + #endif ++#endif + + std::string struct_name = args (0).string_value (); + string_vector fld_names(nargin-1); +@@ -94,7 +96,11 @@ + { + // Force the symbol to be inserted in caller's scope. + #ifdef DEFMETHOD_DLD +- octave_value struct_val = curr_scope.varval (struct_name); ++#ifdef OCTAVE_HAVE_INTERPRETER_VARVAL ++ octave_value struct_val = interp.varval (struct_name); ++#else ++ octave_value struct_val = curr_scope.varval (struct_name); ++#endif + #else + octave_value struct_val = symbol_table::varval (struct_name); + #endif +@@ -111,7 +117,11 @@ + octave_scalar_map::const_iterator iter = map.seek (fld_names(i)); + if (iter != map.end ()) + #ifdef DEFMETHOD_DLD ++#ifdef OCTAVE_HAVE_INTERPRETER_ASSIGN ++ interp.assign (fld_names(i), map.contents (iter)); ++#else + curr_scope.assign (fld_names(i), map.contents (iter)); ++#endif + #else + symbol_table::assign (fld_names(i), map.contents (iter)); + #endif +@@ -140,7 +150,11 @@ + + if (val.is_defined ()) + #ifdef DEFMETHOD_DLD ++#ifdef OCTAVE_HAVE_INTERPRETER_ASSIGN ++ interp.assign (fld_names(i), val); ++#else + curr_scope.assign (fld_names(i), val); ++#endif + #else + symbol_table::assign (fld_names(i), val); + #endif