# HG changeset patch # User Markus Mützel # Date 1650650407 -7200 # Node ID 8df7db467c6699cdec2a14d985ceb572f1cc68f7 # Parent d02b5d26ac28e068b90a5e8fef7bf5f251b572af of-optim: Cherry-pick upstream patch for Octave 7 (bug #61801). * src/of-optim-1-nargin.patch: Add new patch from upstream. * dist-files.mk: Add file to list. diff -r d02b5d26ac28 -r 8df7db467c66 dist-files.mk --- a/dist-files.mk Fri Apr 22 19:19:31 2022 +0200 +++ b/dist-files.mk Fri Apr 22 20:00:07 2022 +0200 @@ -525,6 +525,7 @@ of-odepkg-2-fixes.patch \ of-odepkg-3-deprecated.patch \ of-odepkg.mk \ + of-optim-1-nargin.patch \ of-optim.mk \ of-optiminterp.mk \ of-quaternion-1-cross-fixes.patch \ diff -r d02b5d26ac28 -r 8df7db467c66 src/of-optim-1-nargin.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/of-optim-1-nargin.patch Fri Apr 22 20:00:07 2022 +0200 @@ -0,0 +1,38 @@ +# HG changeset patch +# User Olaf Till +# Date 1650012368 -7200 +# Fri Apr 15 10:46:08 2022 +0200 +# Node ID 197b5a882a41bc9945b6df95f0ef1fb2c7bfc82f +# Parent 83eefe952baafe45135fac7f6ea23debde2f7267 +avoid 'too many arguments' in fmincon with user-supplied gradient + +* inst/fmincon.m: Define anonymous function f.dftp with (unused) +'varargin'. + +diff -r 83eefe952baa -r 197b5a882a41 inst/fmincon.m +--- a/inst/fmincon.m Sun Apr 10 16:31:04 2022 +0200 ++++ b/inst/fmincon.m Fri Apr 15 10:46:08 2022 +0200 +@@ -217,7 +217,7 @@ + o.df_equc_idx = false; + + if (strcmp (o.GradObj, "on")) +- f.dfdp = @ (p) out_2_wrapper (f.objf, p); ++ f.dfdp = @ (p, varargin) out_2_wrapper (f.objf, p); + dfdp_specified = true; + else + f.dfdp = @ __dfdp__; + +Cross-building the docs doesn't work with the generic build rules in MXE Octave. +De-activate building them (and use the existing docs from the tarball). +diff -urN optim-1.6.2/src/Makefile.in.orig optim-1.6.2/src/Makefile.in +--- optim-1.6.2/src/Makefile.in.orig 2022-04-10 16:31:04.000000000 +0200 ++++ optim-1.6.2/src/Makefile.in 2022-04-22 19:48:02.532175109 +0200 +@@ -61,7 +61,7 @@ + + .INTERMEDIATE: MFDOCSTRINGS $(DSFILES) + +-all: doc $(OCTFILES) ++all: $(OCTFILES) + + prebuild: doc html +