git: ee2ef7f8efeb - main - math/maxima: build fix (mandir, makeinfo)

From: Zsolt Udvari <uzsolt_at_FreeBSD.org>
Date: Sun, 01 Sep 2024 20:24:52 UTC
The branch main has been updated by uzsolt:

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

commit ee2ef7f8efeb1570f9ed30812083b8ddad1da622
Author:     Zsolt Udvari <uzsolt@FreeBSD.org>
AuthorDate: 2024-09-01 20:15:05 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2024-09-01 20:24:34 +0000

    math/maxima: build fix (mandir, makeinfo)
    
    Remove create unneeded and unsupported PREFIX/man/man1 directory (causes
    Error: Orphaned: @dir man/man1).
    
    Fix makeinfo version checking error in configure:
    - replace backtick to brackets and dollar sign
    - use gexpr instead of builtin expr (add sysutils/coreutils to
      BULD_DEPENDS and use BINARY_ALIAS)
    The makeinfo_version_string variable is empty because the backslashes
    remain before backticks, do not appear. And the regexp is not compatible
    with shipped expr so shoud use GNU expr.
---
 math/maxima/Makefile                 |  4 +++-
 math/maxima/files/patch-configure.ac | 11 ++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/math/maxima/Makefile b/math/maxima/Makefile
index 7016b22c168d..013d9e65e011 100644
--- a/math/maxima/Makefile
+++ b/math/maxima/Makefile
@@ -17,6 +17,7 @@ LICENSE_FILE_MAXIMAEXTRACLAUSE=	${FILESDIR}/license-extra-clause.txt
 LICENSE_PERMS_MAXIMAEXTRACLAUSE=	dist-mirror dist-sell pkg-mirror \
 					pkg-sell auto-accept
 
+BUILD_DEPENDS=	coreutils>0:sysutils/coreutils
 RUN_DEPENDS=	gnuplot:math/gnuplot \
 		rlwrap:devel/rlwrap
 
@@ -26,6 +27,8 @@ GNU_CONFIGURE=	yes
 
 TEST_TARGET=	check
 
+BINARY_ALIAS=	expr=gexpr
+
 INFO=		imaxima maxima xmaxima abs_integrate drawutils kovacicODE logic \
 		nelder_mead symplectic_ode
 
@@ -134,7 +137,6 @@ post-install-EXAMPLES-on:
 	cd ${WRKSRC}/demo && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} '-name *\.dem'
 
 post-install-MANPAGES-on:
-	${MKDIR} ${STAGEDIR}${PREFIX}/man/man1 && \
 	${INSTALL_MAN} ${WRKSRC}/doc/man/maxima.1.gz ${STAGEDIR}${PREFIX}/share/man/man1/maxima.1.gz
 
 .include <bsd.port.mk>
diff --git a/math/maxima/files/patch-configure.ac b/math/maxima/files/patch-configure.ac
index 74433aa98ca2..4d03280b444b 100644
--- a/math/maxima/files/patch-configure.ac
+++ b/math/maxima/files/patch-configure.ac
@@ -1,4 +1,4 @@
---- configure.ac.orig	2022-04-13 05:02:12 UTC
+--- configure.ac.orig	2024-09-01 19:17:42 UTC
 +++ configure.ac
 @@ -165,21 +165,21 @@ dnl See if git exists.  If it does, update VERSION to 
  
@@ -37,3 +37,12 @@
  
  dnl Parses the version number for the manual
  manual_version=`echo $VERSION | sed 's+branch_++; s+_base++; s+_dirty++; s+_+.+g'`
+@@ -644,7 +644,7 @@ if test x"${enable_build_docs}" = xtrue ; then
+ 	dnl assuming that the end of the version string contains the
+ 	dnl version number consisting of digits separated by a period.
+ 	dnl This allows for version numbers like 6.8.90.
+-	makeinfo_version_string=`expr "\`makeinfo --version | head -1\`" : '.* \([[.0-9]]\+\)'`
++	makeinfo_version_string=`expr "$(makeinfo --version | head -1)" : '.* \([[.0-9]]\+\)'`
+ 	dnl echo Makeinfo version ${makeinfo_version}
+ 
+ 	dnl From makeinfo_version, extract out the major and minor