Index: head/math/maxima/Makefile =================================================================== --- head/math/maxima/Makefile (revision 541226) +++ head/math/maxima/Makefile (revision 541227) @@ -1,143 +1,136 @@ # Created by: Scott Flatman # $FreeBSD$ PORTNAME= maxima -PORTVERSION= 5.43.2 -PORTREVISION= 6 +PORTVERSION= 5.44.0 CATEGORIES= math lisp tk MASTER_SITES= SF/maxima/Maxima-source/${PORTVERSION}-source MAINTAINER= ports@FreeBSD.org COMMENT= Symbolic mathematics program LICENSE= GPLv2 MAXIMAEXTRACLAUSE LICENSE_COMB= multi LICENSE_NAME_MAXIMAEXTRACLAUSE= Maxima extra clause LICENSE_FILE_MAXIMAEXTRACLAUSE= ${FILESDIR}/license-extra-clause.txt LICENSE_PERMS_MAXIMAEXTRACLAUSE= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept BROKEN_FreeBSD_13_powerpc64= fails to build: unhandled lisp initialization error RUN_DEPENDS= gnuplot:math/gnuplot \ rlwrap:devel/rlwrap USES= autoreconf gmake makeinfo shared-mime-info GNU_CONFIGURE= yes CONFIGURE_ARGS= PYTHON=dummy INFO= imaxima maxima xmaxima abs_integrate drawutils kovacicODE logic PLIST_SUB+= PORTVERSION=${PORTVERSION} PORTDOCS= * PORTDATA= * PORTEXAMPLES= * OPTIONS_DEFINE= EXAMPLES DOCS NOUSERINIT MANPAGES SAGE TEST XMAXIMA OPTIONS_SINGLE= LISP OPTIONS_SINGLE_LISP= CCL CMUCL ECL SBCL OPTIONS_DEFAULT= ECL NOUSERINIT MANPAGES SAGE TEST XMAXIMA OPTIONS_SUB= yes CCL_DESC= Build with Clozure Common Lisp CCL_BUILD_DEPENDS= ccl:lang/ccl CCL_RUN_DEPENDS= ccl:lang/ccl CCL_CONFIGURE_ON= --with-ccl=ccl CCL_PLIST_SUB= BINDIR=binary-openmcl BINNAME=maxima.image CMUCL_DESC= Build with CMU Common Lisp CMUCL_BUILD_DEPENDS= lisp:lang/cmucl CMUCL_RUN_DEPENDS= lisp:lang/cmucl CMUCL_CONFIGURE_ON= --enable-cmucl CMUCL_PLIST_SUB= BINDIR=binary-cmucl BINNAME=maxima_core ECL_DESC= Build with Embedabble Common Lisp ECL_BUILD_DEPENDS= ecl:lang/ecl ECL_RUN_DEPENDS= ecl:lang/ecl ECL_LIB_DEPENDS= libgmp.so:math/gmp \ libffi.so:devel/libffi \ libgc.so:devel/boehm-gc \ libgc-threaded.so:devel/boehm-gc-threaded # libgc-threaded.so is really only used when ecl is built with THREADS on, # which is the default. See https://reviews.freebsd.org/D24959 for more # details. ECL_CONFIGURE_ON= --with-ecl=ecl ECL_PLIST_SUB= BINDIR=binary-ecl BINNAME=maxima -GET_ECLLIB= ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)" -NOUSERINIT_DESC= Do not load user init file for lisp (only for sbcl) +NOUSERINIT_DESC= Do not load user init file for lisp (only for sbcl) +NOUSERINIT_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src_maxima.in +NOUSERINIT_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-OFF-src_maxima.in SAGE_DESC= Build with patches from Sage (implies ECL) SAGE_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-share_linearalgebra_matrixexp.lisp \ ${PATCHDIR}/extra-patch-src_grind.lisp \ ${PATCHDIR}/extra-patch-src_hayat.lisp \ ${PATCHDIR}/extra-patch-src_init-cl.lisp \ ${PATCHDIR}/extra-patch-src_maxima.system SAGE_IMPLIES= ECL SBCL_DESC= Build with Steel Bank Common Lisp SBCL_BUILD_DEPENDS= sbcl:lang/sbcl SBCL_RUN_DEPENDS= sbcl:lang/sbcl SBCL_CONFIGURE_ON= --enable-sbcl SBCL_PLIST_SUB= BINDIR=binary-sbcl BINNAME=maxima_core TEST_TARGET= check TEST_BUILD_DEPENDS= gnuplot:math/gnuplot \ rlwrap:devel/rlwrap +TEST_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-Makefile.am +TEST_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-OFF-Makefile.am XMAXIMA_DESC= Install xmaxima (implies DOCS and TEST) XMAXIMA_IMPLIES= DOCS TEST XMAXIMA_USES= tk XMAXIMA_CONFIGURE_WITH= wish=${WISH} +XMAXIMA_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-interfaces_Makefile.am post-patch: ${GREP} -Fe '.core' -l -r ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} 's;\.core;_core;g' ${FIND} -X ${WRKSRC}/interfaces/xmaxima -name 'Makefile.in' | ${XARGS} ${REINPLACE_CMD} "s;tclsh;${TCLSH};g" ${REINPLACE_CMD} "s;/usr;${LOCALBASE};g" ${WRKSRC}/src/intl.lisp - ${REINPLACE_CMD} 's;demo;;' ${WRKSRC}/Makefile.am -post-patch-TEST-off: - ${REINPLACE_CMD} 's;tests;;' ${WRKSRC}/Makefile.am - -post-patch-XMAXIMA-off: - ${REINPLACE_CMD} 's; xmaxima;;' ${WRKSRC}/interfaces/Makefile.am - post-patch-XMAXIMA-on: ${REINPLACE_CMD} "s;%%DOCSDIR%%;/${DOCSDIR:S,/, ,g};" \ ${WRKSRC}/interfaces/xmaxima/Tkmaxima/Paths.tcl post-configure: ${REINPLACE_CMD} '/ld-flags/s|" |"|' ${WRKSRC}/src/autoconf-variables.lisp ${REINPLACE_CMD} '/ld-flags/s| ")|")|' ${WRKSRC}/src/autoconf-variables.lisp pre-build-CCL-on: cd ${WRKSRC}/src/ && ${MKDIR} binary-ccl && ${LN} -s binary-ccl binary-openmcl post-build-MANPAGES-on: ${GZIP_CMD} ${WRKSRC}/doc/man/maxima.1 post-install: for x in "" "-1" "-2" "-3"; do ${INSTALL_MAN} ${WRKSRC}/doc/info/maxima.info$$x ${STAGEDIR}${PREFIX}/${INFO_PATH}; done ${INSTALL_MAN} ${WRKSRC}/doc/info/maxima-index.lisp ${STAGEDIR}${PREFIX}/${INFO_PATH} post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC}/doc/info && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} '-name maxima*\.html' post-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/demo && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} '-name *\.dem' post-install-MANPAGES-on: ${INSTALL_MAN} ${WRKSRC}/doc/man/maxima.1.gz ${STAGEDIR}${PREFIX}/man/man1 -post-install-NOUSERINIT-on: - ${REINPLACE_CMD} 's;--end-runtime-options;--end-runtime-options --no-userinit;' ${STAGEDIR}${PREFIX}/bin/maxima - post-install-SAGE-on: - ${MKDIR} ${STAGEDIR}$$(${GET_ECLLIB}) + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/ecl ${INSTALL_DATA} ${WRKSRC}/src/binary-ecl/maxima.fas \ - ${STAGEDIR}$$(${GET_ECLLIB}) + ${STAGEDIR}${PREFIX}/lib/ecl .include Index: head/math/maxima/distinfo =================================================================== --- head/math/maxima/distinfo (revision 541226) +++ head/math/maxima/distinfo (revision 541227) @@ -1,3 +1,3 @@ -TIMESTAMP = 1580671243 -SHA256 (maxima-5.43.2.tar.gz) = ea78ec8c674c9293621ab8af6e44fbc3d869d63ae594c105abdffedef2fb77bb -SIZE (maxima-5.43.2.tar.gz) = 40871773 +TIMESTAMP = 1592256101 +SHA256 (maxima-5.44.0.tar.gz) = d93f5e48c4daf8f085d609cb3c7b0bdf342c667fd04cf750c846426874c9d2ec +SIZE (maxima-5.44.0.tar.gz) = 34976354 Index: head/math/maxima/files/patch-interfaces-emacs-imaxima-imaxima.texi =================================================================== --- head/math/maxima/files/patch-interfaces-emacs-imaxima-imaxima.texi (revision 541226) +++ head/math/maxima/files/patch-interfaces-emacs-imaxima-imaxima.texi (nonexistent) @@ -1,9 +0,0 @@ ---- interfaces/emacs/imaxima/imaxima.texi.orig 2019-02-21 02:30:14 UTC -+++ interfaces/emacs/imaxima/imaxima.texi -@@ -1,5 +1,6 @@ - \input texinfo @c -*-texinfo-*- - @c %**start of header -+@documentencoding ISO-8859-1 - @setfilename imaxima.info - @settitle Imaxima Manual - @paragraphindent 0 Property changes on: head/math/maxima/files/patch-interfaces-emacs-imaxima-imaxima.texi ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/math/maxima/files/patch-Makefile.am =================================================================== --- head/math/maxima/files/patch-Makefile.am (revision 541226) +++ head/math/maxima/files/patch-Makefile.am (nonexistent) @@ -1,11 +0,0 @@ ---- Makefile.am.orig 2018-09-28 06:01:29 UTC -+++ Makefile.am -@@ -6,7 +6,7 @@ if ENABLE_GETTEXT - LOCALE_DIR = locale - endif - --SUBDIRS = admin crosscompile-windows src lisp-utils tests doc interfaces share demo plotting desktopintegration $(LOCALE_DIR) -+SUBDIRS = admin crosscompile-windows src lisp-utils tests interfaces share plotting desktopintegration $(LOCALE_DIR) - - EXTRA_DIST = \ - common.mk maxima.iss.in \ Property changes on: head/math/maxima/files/patch-Makefile.am ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/math/maxima/files/patch-src_maxima.in =================================================================== --- head/math/maxima/files/patch-src_maxima.in (revision 541226) +++ head/math/maxima/files/patch-src_maxima.in (nonexistent) @@ -1,10 +0,0 @@ ---- src/maxima.in.orig 2018-10-23 17:59:28 UTC -+++ src/maxima.in -@@ -165,6 +165,7 @@ if [ -d "$MAXIMA_INITIAL_FOLDER" ]; then - fi - - maxima_image_base="$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" -+maxima_image_base_core="$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima_core" - - if [ "$verbose" = "true" ]; then - set -x Property changes on: head/math/maxima/files/patch-src_maxima.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/math/maxima/files/extra-patch-OFF-Makefile.am =================================================================== --- head/math/maxima/files/extra-patch-OFF-Makefile.am (nonexistent) +++ head/math/maxima/files/extra-patch-OFF-Makefile.am (revision 541227) @@ -0,0 +1,11 @@ +--- Makefile.am.orig 2020-06-15 21:43:09 UTC ++++ Makefile.am +@@ -6,7 +6,7 @@ if ENABLE_GETTEXT + LOCALE_DIR = locale + endif + +-SUBDIRS = admin crosscompile-windows src lisp-utils tests doc interfaces share demo plotting desktopintegration $(LOCALE_DIR) ++SUBDIRS = admin crosscompile-windows src lisp-utils interfaces share plotting desktopintegration $(LOCALE_DIR) + + EXTRA_DIST = \ + common.mk maxima.iss.in \ Property changes on: head/math/maxima/files/extra-patch-OFF-Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/math/maxima/files/extra-patch-interfaces_Makefile.am =================================================================== --- head/math/maxima/files/extra-patch-interfaces_Makefile.am (nonexistent) +++ head/math/maxima/files/extra-patch-interfaces_Makefile.am (revision 541227) @@ -0,0 +1,6 @@ +--- interfaces/Makefile.am.orig 2020-06-15 21:52:01 UTC ++++ interfaces/Makefile.am +@@ -1,2 +1,2 @@ +-SUBDIRS = emacs xmaxima ++SUBDIRS = emacs + EXTRA_DIST = bin/xmaxima.iss Readme.txt Property changes on: head/math/maxima/files/extra-patch-interfaces_Makefile.am ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/math/maxima/files/extra-patch-src_hayat.lisp =================================================================== --- head/math/maxima/files/extra-patch-src_hayat.lisp (revision 541226) +++ head/math/maxima/files/extra-patch-src_hayat.lisp (revision 541227) @@ -1,86 +1,51 @@ ---- src/hayat.lisp.orig 2019-10-21 03:38:59 UTC +--- src/hayat.lisp.orig 2020-05-21 06:20:25 UTC +++ src/hayat.lisp @@ -2205,6 +2205,25 @@ (or (alike1 (exp-pt (get-datum (datum-var (car l)))) (exp-pt (car l))) (return () )))) +;; Patch borrowed from SageMath: 0001-taylor2-Avoid-blowing-the-stack-when-diff-expand-isn +;; +;; SUBTREE-SEARCH +;; +;; Search for subtrees, ST, of TREE that contain an element equal to BRANCH +;; under TEST as an immediate child and return them as a list. +;; +;; Examples: +;; (SUBTREE-SEARCH 2 '(1 2 3)) => '((1 2 3)) +;; (SUBTREE-SEARCH 2 '(1 2 2 3)) => '((1 2 2 3)) +;; (SUBTREE-SEARCH 2 '(1 (2) 3)) => '((2)) +;; (SUBTREE-SEARCH 4 '(1 (2) 3)) => NIL +;; (SUBTREE-SEARCH 2 '(1 (2) 3 (2))) => '((2) (2)) + +(defun subtree-search (branch tree &optional (test 'equalp)) + (unless (atom tree) + (if (find branch tree :test test) (list tree) + (mapcan (lambda (child) (subtree-search branch child test)) tree)))) + (defun taylor2 (e) (let ((last-exp e)) ;; lexp-non0 should be bound here when needed (cond ((assolike e tlist) (var-expand e 1 () )) -@@ -2248,9 +2267,32 @@ - ((null l) t) - (or (free e (car l)) (return ())))) - (newsym e)) -- (t (let ((exact-poly () )) ; Taylor series aren't exact -- (taylor2 (diff-expand e tlist))))))) -+ (t -+ ;; When all else fails, call diff-expand to try to expand e around the -+ ;; point as a Taylor series by taking repeated derivatives. This might -+ ;; fail, unfortunately: If a required derivative doesn't exist, then -+ ;; DIFF-EXPAND will return a form of the form "f'(x)" with the -+ ;; variable, rather than the expansion point in it. -+ ;; -+ ;; Sometimes this works - in particular, if there is a genuine pole at -+ ;; the point, we end up passing a sum of terms like x^(-k) to a -+ ;; recursive invocation and all is good. Unfortunately, it can also -+ ;; fail. For example, if e is abs(sin(x)) and we try to expand to first -+ ;; order, the expression "1/1*(cos(x)*sin(x)/abs(sin(x)))*x^1+0" is -+ ;; returned. If we call taylor2 on that, we will end up recursing and -+ ;; blowing the stack. To avoid doing so, error out if EXPANSION -+ ;; contains E as a subtree. However, don't error if it occurs as an -+ ;; argument to %DERIVATIVE (in which case, we might well be fine). This -+ ;; happens from things like taylor(log(f(x)), x, x0, 1). - -+ (let* ((exact-poly nil) ; (Taylor series aren't exact) -+ (expansion (diff-expand e tlist))) -+ (when (find-if (lambda (subtree) -+ (not (eq ($op subtree) '%derivative))) -+ (subtree-search e expansion)) -+ (exp-pt-err)) -+ (taylor2 expansion)))))) -+ - (defun compatvarlist (a b c d) - (cond ((null a) t) - ((or (null b) (null c) (null d)) () ) -@@ -3024,7 +3066,21 @@ +@@ -3032,7 +3051,21 @@ (and (or (member '$inf pt-list :test #'eq) (member '$minf pt-list :test #'eq)) (unfam-sing-err))) -(defun diff-expand (exp l) ;l is tlist +;; DIFF-EXPAND +;; +;; Expand EXP in the variables as specified in L, which is a list of tlists. If +;; L is a singleton, this just works by the classic Taylor expansion: +;; +;; f(x) = f(c) + f'(c) + f''(c)/2 + ... + f^(k)(c)/k! +;; +;; If L specifies multiple expansions, DIFF-EXPAND works recursively by +;; expanding one variable at a time. The derivatives are computed using SDIFF. +;; +;; In some cases, f'(c) or some higher derivative might be an expression of the +;; form 1/0. Instead of returning an error, DIFF-EXPAND uses f'(x) +;; instead. (Note: This seems bogus to me (RJS), but I'm just describing how +;; EVAL-DERIV works) +(defun diff-expand (exp l) (check-inf-sing (mapcar (function caddr) l)) (cond ((not l) exp) (t Index: head/math/maxima/files/extra-patch-src_maxima.in =================================================================== --- head/math/maxima/files/extra-patch-src_maxima.in (nonexistent) +++ head/math/maxima/files/extra-patch-src_maxima.in (revision 541227) @@ -0,0 +1,22 @@ +--- src/maxima.in.orig 2020-05-02 19:21:19 UTC ++++ src/maxima.in +@@ -165,6 +165,7 @@ if [ -d "$MAXIMA_INITIAL_FOLDER" ]; then + fi + + maxima_image_base="$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ++maxima_image_base_core="$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima_core" + + if [ "$verbose" = "true" ]; then + set -x +@@ -243,9 +243,9 @@ elif [ "$MAXIMA_LISP" = "sbcl" ]; then + # one has to extend the amount of memory sbcl will be able to claim by using the + # switch --dynamic-space-size in order to do so. + if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then +- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$@" ++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$@" + else +- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$@" ++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$@" + fi + + else Property changes on: head/math/maxima/files/extra-patch-src_maxima.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/math/maxima/files/license-extra-clause.txt =================================================================== --- head/math/maxima/files/license-extra-clause.txt (revision 541226) +++ head/math/maxima/files/license-extra-clause.txt (revision 541227) Property changes on: head/math/maxima/files/license-extra-clause.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/math/maxima/pkg-plist =================================================================== --- head/math/maxima/pkg-plist (revision 541226) +++ head/math/maxima/pkg-plist (revision 541227) @@ -1,34 +1,34 @@ bin/maxima bin/rmaxima %%XMAXIMA%%bin/xmaxima -%%SAGE%%lib/ecl-16.1.3/maxima.fas +%%SAGE%%lib/ecl/maxima.fas lib/maxima/%%PORTVERSION%%/%%BINDIR%%/%%BINNAME%% %%CMUCL%%lib/maxima/%%PORTVERSION%%/%%BINDIR%%/lisp libexec/maxima/%%PORTVERSION%%/mgnuplot %%MANPAGES%%man/man1/maxima.1.gz share/applications/net.sourceforge.maxima.xmaxima.desktop share/bash-completion/completions/maxima share/bash-completion/completions/rmaxima share/bash-completion/completions/xmaxima share/emacs/site-lisp/bookmode.el share/emacs/site-lisp/dbl.el share/emacs/site-lisp/emaxima.el share/emacs/site-lisp/emaxima.lisp share/emacs/site-lisp/emaxima.sty share/emacs/site-lisp/imath.el share/emacs/site-lisp/imaxima-autoconf-variables.el share/emacs/site-lisp/imaxima.el share/emacs/site-lisp/imaxima.lisp share/emacs/site-lisp/maxima-font-lock.el share/emacs/site-lisp/maxima.el share/emacs/site-lisp/setup-imaxima-imath.el share/emacs/site-lisp/smart-complete.el share/emacs/site-lisp/sshell.el share/info/maxima-index.lisp share/metainfo/net.sourceforge.maxima.xmaxima.appdata.xml share/mime/packages/x-mac.xml share/mime/packages/x-maxima-out.xml %%XMAXIMA%%share/pixmaps/net.sourceforge.maxima.png %%XMAXIMA%%share/pixmaps/net.sourceforge.maxima.svg share/pixmaps/text-x-maxima-out.svg share/pixmaps/text-x-maximasession.svg