view src/of-optim-1-nargin.patch @ 6497:c5a38140ad2a

curl: update to v7.86.0 * src/curl.mk: update version, checksum * src/curl-1-fixes.patch: new file * dist-files.mk: add ref to new file
author John Donoghue <john.donoghue@ieee.org>
date Mon, 31 Oct 2022 14:18:41 -0400
parents 8df7db467c66
children
line wrap: on
line source

# HG changeset patch
# User Olaf Till <i7tiol@t-online.de>
# 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