|
| 1 | +diff --git a/src/sage/config.py.in b/src/sage/config.py.in |
| 2 | +index de5ad8b2169..f75e951f3b8 100644 |
| 3 | +--- a/src/sage/config.py.in |
| 4 | ++++ b/src/sage/config.py.in |
| 5 | +@@ -21,7 +21,7 @@ MAXIMA = "@SAGE_MAXIMA@".replace("${prefix}", SAGE_LOCAL) |
| 6 | + # Set this to the empty string if your ECL can load maxima without |
| 7 | + # further prodding. |
| 8 | + MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace("${prefix}", SAGE_LOCAL) |
| 9 | +-MAXIMA_SHARE = "@SAGE_MAXIMA_SHARE@".replace("${prefix}", SAGE_LOCAL) |
| 10 | ++MAXIMA_PREFIX = "@SAGE_MAXIMA_PREFIX@".replace("${prefix}", SAGE_LOCAL) |
| 11 | + |
| 12 | + # Delete this line if your ECL can load Kenzo without further prodding. |
| 13 | + KENZO_FAS = "@SAGE_KENZO_FAS@".replace("${prefix}", SAGE_LOCAL) |
| 14 | +diff --git a/src/sage/env.py b/src/sage/env.py |
| 15 | +index c7c46bf4ec3..71e87c3f0f6 100644 |
| 16 | +--- a/src/sage/env.py |
| 17 | ++++ b/src/sage/env.py |
| 18 | +@@ -204,7 +204,7 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st |
| 19 | + PPLPY_DOCS = var("PPLPY_DOCS", join(SAGE_SHARE, "doc", "pplpy")) |
| 20 | + MAXIMA = var("MAXIMA", "maxima") |
| 21 | + MAXIMA_FAS = var("MAXIMA_FAS") |
| 22 | +-MAXIMA_SHARE = var("MAXIMA_SHARE") |
| 23 | ++MAXIMA_PREFIX = var("MAXIMA_PREFIX") |
| 24 | + KENZO_FAS = var("KENZO_FAS") |
| 25 | + SAGE_NAUTY_BINS_PREFIX = var("SAGE_NAUTY_BINS_PREFIX", "") |
| 26 | + SAGE_ECMBIN = var("SAGE_ECMBIN", "ecm") |
| 27 | +diff --git a/src/sage/interfaces/maxima.py b/src/sage/interfaces/maxima.py |
| 28 | +index 154a2cc34e0..9df024abf39 100644 |
| 29 | +--- a/src/sage/interfaces/maxima.py |
| 30 | ++++ b/src/sage/interfaces/maxima.py |
| 31 | +@@ -515,7 +515,7 @@ |
| 32 | + |
| 33 | + import pexpect |
| 34 | + |
| 35 | +-from sage.env import MAXIMA |
| 36 | ++from sage.env import MAXIMA, MAXIMA_PREFIX |
| 37 | + from sage.interfaces.expect import Expect, ExpectElement, gc_disabled |
| 38 | + from sage.interfaces.maxima_abstract import ( |
| 39 | + MaximaAbstract, |
| 40 | +@@ -587,11 +587,16 @@ def __init__(self, script_subdirectory=None, logfile=None, server=None, |
| 41 | + # See trac # 6818. |
| 42 | + init_code.append('nolabels : true') |
| 43 | + |
| 44 | ++ env = {} |
| 45 | ++ if MAXIMA_PREFIX: |
| 46 | ++ env['MAXIMA_PREFIX'] = MAXIMA_PREFIX |
| 47 | ++ |
| 48 | + MaximaAbstract.__init__(self, "maxima") |
| 49 | + Expect.__init__(self, |
| 50 | + name='maxima', |
| 51 | + prompt=r'\(\%i[0-9]+\) ', |
| 52 | + command='{0} -p {1}'.format(MAXIMA, shlex.quote(STARTUP)), |
| 53 | ++ env=env, |
| 54 | + script_subdirectory=script_subdirectory, |
| 55 | + restart_on_ctrlc=False, |
| 56 | + verbose_start=False, |
| 57 | +diff --git a/src/sage/interfaces/maxima_lib.py b/src/sage/interfaces/maxima_lib.py |
| 58 | +index 637ef29a6f2..3d27bd834b5 100644 |
| 59 | +--- a/src/sage/interfaces/maxima_lib.py |
| 60 | ++++ b/src/sage/interfaces/maxima_lib.py |
| 61 | +@@ -112,11 +112,12 @@ |
| 62 | + # |
| 63 | + # https://www.gnu.org/licenses/ |
| 64 | + # **************************************************************************** |
| 65 | ++import os |
| 66 | + |
| 67 | + import sage.rings.real_double |
| 68 | + import sage.symbolic.expression |
| 69 | + import sage.symbolic.integration.integral |
| 70 | +-from sage.env import MAXIMA_FAS, MAXIMA_SHARE |
| 71 | ++from sage.env import MAXIMA_FAS, MAXIMA_PREFIX |
| 72 | + from sage.interfaces.maxima_abstract import ( |
| 73 | + MaximaAbstract, |
| 74 | + MaximaAbstractElement, |
| 75 | +@@ -141,6 +142,9 @@ |
| 76 | + ecl_eval("(in-package :maxima)") |
| 77 | + ecl_eval("(set-locale-subdir)") |
| 78 | + |
| 79 | ++if MAXIMA_PREFIX: |
| 80 | ++ os.environ["MAXIMA_PREFIX"] = MAXIMA_PREFIX |
| 81 | ++ |
| 82 | + # This workaround has to happen before any call to (set-pathnames). |
| 83 | + # To be safe please do not call anything other than |
| 84 | + # (set-locale-subdir) before this block. |
| 85 | +@@ -207,10 +211,10 @@ |
| 86 | + |
| 87 | + # Add search paths |
| 88 | + # Keep these in sync with the default Maxima search paths defined in subprojects/maxima-<version>/src/share-subdirs_autogenerated.lisp |
| 89 | +-if MAXIMA_SHARE: |
| 90 | ++if MAXIMA_PREFIX: |
| 91 | + import_packages = "{affine,algebra,algebra/charsets,algebra/solver,amatrix,bernstein,calculus,cobyla,cobyla/ex,cobyla/lisp,colnew,colnew/ex1,colnew/ex2,colnew/ex3,colnew/ex4,colnew/lisp,combinatorics,contrib,contrib/Eulix,contrib/Grobner,contrib/Zeilberger,contrib/alt-display,contrib/altsimp,contrib/binsplit,contrib/bitwise,contrib/boolsimp,contrib/coma,contrib/diffequations,contrib/diffequations/tests,contrib/elliptic_curves,contrib/elliptic_curves/figures,contrib/format,contrib/fresnel,contrib/gentran,contrib/gentran/man,contrib/gentran/test,contrib/gf,contrib/integration,contrib/levin,contrib/lurkmathml,contrib/maxima-odesolve,contrib/maximaMathML,contrib/mcclim,contrib/noninteractive,contrib/odes,contrib/operatingsystem,contrib/prim,contrib/rand,contrib/rkf45,contrib/sarag,contrib/smath,contrib/state,contrib/symplectic_ode,contrib/trigtools,contrib/unicodedata,contrib/unit,contrib/vector3d,descriptive,diff_form,diff_form/tests,diffequations,distrib,draw,dynamics,ezunits,fftpack5,fftpack5/lisp,finance,fourier_elim,fractals,graphs,hompack,hompack/lisp,hypergeometric,integequations,integer_sequence,integration,lapack,lapack/blas,lapack/lapack,lbfgs,linearalgebra,logic,lsquares,macro,matrix,minpack,minpack/lisp,misc,mnewton,multiadditive,nelder_mead,numeric,numericalio,odepack,odepack/src,orthopoly,pdiff,physics,pslq,pytranslate,quantum,simplex,simplex/Tests,simplification,solve_rat_ineq,solve_rec,sound,stats,stringproc,sym,tensor,tensor/tracefree-code,test_batch_encodings,to_poly_solve,translators,translators/m2mj,trigonometry,utils,vector,z_transform}" |
| 92 | +- ecl_eval(f'#$file_search_maxima: append(file_search_maxima, ["{MAXIMA_SHARE}/###.{{mac,mc,wxm}}", "{MAXIMA_SHARE}/{import_packages}/###.{{mac,mc,wxm}}"])$') |
| 93 | +- ecl_eval(f'#$file_search_lisp: append(file_search_lisp, ["{MAXIMA_SHARE}/###.{{fas,lisp,lsp}}", "{MAXIMA_SHARE}/{import_packages}/###.{{fas,lisp,lsp}}"])$') |
| 94 | ++ ecl_eval(f'#$file_search_maxima: append(file_search_maxima, ["{MAXIMA_PREFIX}/###.{{mac,mc,wxm}}", "{MAXIMA_PREFIX}/{import_packages}/###.{{mac,mc,wxm}}"])$') |
| 95 | ++ ecl_eval(f'#$file_search_lisp: append(file_search_lisp, ["{MAXIMA_PREFIX}/###.{{fas,lisp,lsp}}", "{MAXIMA_PREFIX}/../src/###.{{fas,lisp,lsp}}", "{MAXIMA_PREFIX}/{import_packages}/###.{{fas,lisp,lsp}}"])$') |
| 96 | + |
| 97 | + # Default options set in Maxima |
| 98 | + # display2d -- no ascii art output |
| 99 | +diff --git a/subprojects/packagefiles/maxima/build/doc/info/meson.build b/subprojects/packagefiles/maxima/build/doc/info/meson.build |
| 100 | +new file mode 100644 |
| 101 | +index 00000000000..e8c69f73526 |
| 102 | +diff --git a/subprojects/packagefiles/maxima/build/doc/meson.build b/subprojects/packagefiles/maxima/build/doc/meson.build |
| 103 | +new file mode 100644 |
| 104 | +index 00000000000..eba36e4bdc3 |
| 105 | +diff --git a/subprojects/packagefiles/maxima/build/meson.build b/subprojects/packagefiles/maxima/build/meson.build |
| 106 | +new file mode 100644 |
| 107 | +index 00000000000..4112780103d |
| 108 | +diff --git a/subprojects/packagefiles/maxima/infodir.patch b/subprojects/packagefiles/maxima/infodir.patch |
| 109 | +new file mode 100644 |
| 110 | +index 00000000000..a4c037bb848 |
| 111 | +diff --git a/subprojects/packagefiles/maxima/maxima_prefix_bin.patch b/subprojects/packagefiles/maxima/maxima_prefix_bin.patch |
| 112 | +new file mode 100644 |
| 113 | +index 00000000000..0fced388ea9 |
0 commit comments