git: a82c4b24af9c - main - math/octave-forge-optim: Fix install error.

From: Stephen Montgomery-Smith <stephen_at_FreeBSD.org>
Date: Sat, 09 Apr 2022 03:46:34 UTC
The branch main has been updated by stephen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a82c4b24af9c3e54f0e21ace202b88746986f828

commit a82c4b24af9c3e54f0e21ace202b88746986f828
Author:     Stephen Montgomery-Smith <stephen@FreeBSD.org>
AuthorDate: 2022-04-09 03:46:05 +0000
Commit:     Stephen Montgomery-Smith <stephen@FreeBSD.org>
CommitDate: 2022-04-09 03:46:05 +0000

    math/octave-forge-optim: Fix install error.
---
 math/octave-forge-optim/Makefile             |  5 ++++-
 math/octave-forge-optim/files/patch-lsqlin.m | 11 +++++++++++
 math/octave-forge-optim/files/patch-vfzero.m | 11 +++++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/math/octave-forge-optim/Makefile b/math/octave-forge-optim/Makefile
index 7d94d4ce2a32..4a269411d58c 100644
--- a/math/octave-forge-optim/Makefile
+++ b/math/octave-forge-optim/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	octave-forge-optim
 PORTVERSION=	1.6.1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	math
 
 MAINTAINER=	stephen@FreeBSD.org
@@ -26,6 +26,9 @@ GNU_CONFIGURE=	yes
 
 .include "${.CURDIR}/../../Mk/bsd.octave.mk"
 
+USES+=		shebangfix
+SHEBANG_FILES=	*.pl
+
 post-build:
 	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
 	cd ${WRKDIR} && ${TAR} cfz ${DISTNAME}.tar.gz ${OCTSRC}
diff --git a/math/octave-forge-optim/files/patch-lsqlin.m b/math/octave-forge-optim/files/patch-lsqlin.m
new file mode 100644
index 000000000000..55e191b75906
--- /dev/null
+++ b/math/octave-forge-optim/files/patch-lsqlin.m
@@ -0,0 +1,11 @@
+--- ../inst/lsqlin.m.orig	2022-04-08 22:29:29.290901000 -0500
++++ ../inst/lsqlin.m	2022-04-08 22:29:41.495111000 -0500
+@@ -115,7 +115,7 @@
+ 
+   if (n_out > 2)
+     ## We don't need to know if original n_out was 3 or 2.
+-    n_out --;
++    n_out--;
+   endif
+ 
+   quadprog_out = cell (1, max (n_out, 1));
diff --git a/math/octave-forge-optim/files/patch-vfzero.m b/math/octave-forge-optim/files/patch-vfzero.m
new file mode 100644
index 000000000000..c08712576fc1
--- /dev/null
+++ b/math/octave-forge-optim/files/patch-vfzero.m
@@ -0,0 +1,11 @@
+--- ../inst/vfzero.m.orig	2022-04-08 22:30:39.255870000 -0500
++++ ../inst/vfzero.m	2022-04-08 22:30:55.406374000 -0500
+@@ -282,7 +282,7 @@
+ 				# fun() might expect full-length
+ 				# argument
+       fval(idx, 1) = fc(idx, 1) = fun (c)(:)(idx, 1);
+-      niter ++; nfev ++;
++      niter++; nfev++;
+     endif
+ 
+     ## Modification 2: skip inverse cubic interpolation if