# The upstream test suite takes 20-40 minutes; run it on demand: # rpmbuild --with tests %bcond tests 0 Summary: Symbolic Computation Program Name: maxima Version: 5.50.0 Release: 1%{?dist} License: GPL-2.0-or-later URL: https://maxima.sourceforge.io Source: https://downloads.sourceforge.net/sourceforge/maxima/maxima-%{version}%{?beta}.tar.gz # Patches # Use GMP arithmetic with sbcl (from Arch/Void) # https://gitlab.archlinux.org/archlinux/packaging/packages/maxima/-/raw/main/maxima-sbcl-gmp.patch Patch1: maxima-sbcl-gmp.patch # Every post-release upstream fix, git diff 5.50.0..b7bf16130 over src, share # and tests. Restricting it to src/limit.lisp leaves 10 test failures; the whole # slice leaves 1, because the limit and sum fixes span several files and their # expected results live in the test files. # https://sourceforge.net/p/maxima/bugs/4994/ Patch2: maxima-5.50.0-upstream-fixes.patch # draw_renderer: vtk runs the generated script with python3, not with the # optional /usr/bin/python symlink Patch3: maxima-vtk-python3.patch # spectral_rep could not build the projectors for a 3x3 or larger matrix with # complex entries, and matrixexp then simplified the answer onto the wrong # branch of a cube root # https://sourceforge.net/p/maxima/bugs/2596/ Patch4: maxima-matrixexp-2596.patch # Build only on arches with sbcl available in Fedora ExclusiveArch: x86_64 aarch64 ppc64le # Maxima version macro used in paths %global maxima_ver %{version}%{?beta} # Fedora has no %%{_texmfdir} macro - texlive-base defines only %%_texmf, # %%_texmf_main, %%_texmf_vendor, %%_texmf_var and %%_texmf_conf. %global texmf %{_datadir}/texmf # Info pages must remain uncompressed (Maxima help needs that) %global __spec_install_post %{nil} # debuginfo.list ends up empty; disable debug_package generation %global debug_package %{nil} # Tooling BuildRequires: make BuildRequires: desktop-file-utils BuildRequires: pkgconfig(bash-completion) BuildRequires: ImageMagick BuildRequires: perl-interpreter BuildRequires: perl(Getopt::Long) BuildRequires: recode BuildRequires: texinfo-tex BuildRequires: tex(latex) BuildRequires: tex(fullpage.sty) BuildRequires: emacs # SBCL toolchain BuildRequires: sbcl BuildRequires: gmp-devel # Xmaxima (Tk) BuildRequires: tk >= 1:9.0 # For tests BuildRequires: gnuplot # Runtime deps Requires: %{name}-runtime-sbcl = %{version}-%{release} Requires: gnuplot Requires: rlwrap Requires: hicolor-icon-theme # Emacs site-start (byte-compiled at build time) Requires: emacs-filesystem Source6: maxima-modes.el # Docs (kept like Fedora does) Source10: https://www.math.u-szeged.hu/~kovzol/SzAAMT-2003/macref.pdf Source11: http://maxima.sourceforge.net/docs/maximabook/maximabook-19-Sept-2004.pdf %description Maxima is a full symbolic computation program. It is full featured doing symbolic manipulation of polynomials, matrices, rational functions, integration, graphing, bigfloats, etc. Maxima is based on the original Macsyma developed at MIT in the 1970's. %package gui Summary: Tcl/Tk GUI interface for %{name} Requires: %{name} = %{version}-%{release} Obsoletes: %{name}-xmaxima < %{version}-%{release} Requires: tk >= 1:9.0 Requires: xdg-utils %description gui Tcl/Tk GUI interface for %{name} (xmaxima). %package src Summary: %{name} lisp source code Requires: %{name} = %{version}-%{release} %description src %{name} lisp source code. %package runtime-sbcl Summary: Maxima compiled with SBCL Provides: %{name}-runtime = %{version}-%{release} Obsoletes: maxima-exec-sbcl < %{version}-%{release} Requires: %{name} = %{version}-%{release} # sb-gmp reaches libgmp.so.10 through load-shared-object, which the automatic # dependency generator cannot see Requires: gmp # when built without --enable-sbcl-exec, require same sbcl; we use exec build, so no pin %description runtime-sbcl Maxima compiled with Steel Bank Common Lisp (SBCL). %prep %autosetup -n %{name}-%{version}%{?beta} -p1 # Extra docs copied like Fedora does install -p -m644 %{SOURCE10} . install -D -p -m644 %{SOURCE11} doc/maximabook/maxima.pdf # Minor fixes in shipped files sed -i -e 's|@ARCH@|%{_target_cpu}|' src/maxima.in sed -i -e 's:/usr/local/info:/usr/share/info:' interfaces/emacs/emaxima/maxima.el sed -i -E 's/(defcustom\s+maxima-info-index-file\s+)(\S+)/\1"maxima.info-16"/' interfaces/emacs/emaxima/maxima.el %build %configure \ --with-default-lisp=sbcl \ --enable-sbcl-exec \ --disable-clisp \ --disable-cmucl \ --disable-gcl \ --disable-ecl \ --enable-lang-es --enable-lang-es-utf8 \ --enable-lang-pt --enable-lang-pt-utf8 \ --enable-lang-pt_BR --enable-lang-pt_BR-utf8 # avoid re-running makeinfo/tex touch doc/info/maxima.info \ share/contrib/maxima-odesolve/kovacicODE.info %make_build %install %make_install bashcompletiondir=%{bash_completions_dir} # app icons mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/{apps,mimetypes} mv $RPM_BUILD_ROOT%{_datadir}/icons/text-x-maxima*.svg \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/mimetypes/ mv $RPM_BUILD_ROOT%{_datadir}/icons/xmaxima.svg \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/scalable/apps/ # icon is nonstandard size (135x135) mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps convert -resize 128x128 $RPM_BUILD_ROOT%{_datadir}/icons/xmaxima.png \ $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/xmaxima.png rm -f $RPM_BUILD_ROOT%{_datadir}/icons/xmaxima.png install -D -m644 -p %{SOURCE6} $RPM_BUILD_ROOT%{_emacs_sitelispdir}/site_start.d/maxima-modes.el for file in $RPM_BUILD_ROOT%{_emacs_sitelispdir}/{,site_start.d/}*.el ; do %{_emacs_bytecompile} ${file} ||: done # emaxima LaTeX style (%%ghost) install -d $RPM_BUILD_ROOT%{texmf}/tex/latex/ ln -sf %{_datadir}/maxima/%{maxima_ver}/emacs \ $RPM_BUILD_ROOT%{texmf}/tex/latex/emaxima ## unwanted/unpackaged files rm -fv $RPM_BUILD_ROOT%{_infodir}/dir # docs rm -rf $RPM_BUILD_ROOT%{_datadir}/maxima/%{maxima_ver}/doc/{contributors,implementation,misc,maximabook,EMaximaIntro.ps} %check desktop-file-validate %{buildroot}%{_datadir}/applications/Xmaxima.desktop # Smoke tests: the image runs, sb-gmp is really wired into it, the limit patch # took effect and sb-gmp's INTEXP has been repaired. Unpatched the answers are # GMP-VERSION=NIL, LIMIT=inf, and bernstein_poly raises a type error. ./maxima-local --very-quiet \ --batch-string=':lisp (format t "GMP-VERSION=~a~%%" sb-gmp:*gmp-version*)' \ > smoke.log 2>&1 ./maxima-local --very-quiet \ --batch-string='print(sconcat("LIMIT=", string(limit(x^2+%%i*x, x, inf))))$' \ >> smoke.log 2>&1 ./maxima-local --very-quiet \ --batch-string='load(bernstein)$ print(sconcat("BERNSTEIN=", \ string(ratsimp(bernstein_poly(1, 2, 1/5 + %%i) - (58/25 + 6*%%i/5)))))$' \ >> smoke.log 2>&1 # and that repairing it did not break the path INTEXP is normally reached by ./maxima-local --very-quiet \ --batch-string='numer: true$ print(sconcat("AIRY=", string(is(abs(airy_ai(1) \ - sqrt(1/3)*bessel_k(1/3, 2/3)/%%pi) < 1e-15))))$' \ >> smoke.log 2>&1 # bug 2596: unpatched this raises "Unable to find the spectral representation" ./maxima-local --very-quiet \ --batch-string='load(linearalgebra)$ m: %%i*matrix([1,2,3],[3,2,0],[1,2,1])$ \ s: ident(3)$ t: ident(3)$ for j:1 thru 60 do (t: (t . m)/j, s: s + t)$ \ print(sconcat("MATRIXEXP=", string(is(lmax(map(abs, flatten(args(float( \ rectform(matrixexp(m) - s)))))) < 1e-12))))$' \ >> smoke.log 2>&1 cat smoke.log grep -q 'GMP-VERSION=[0-9]' smoke.log grep -q 'LIMIT=infinity' smoke.log grep -q 'BERNSTEIN=0' smoke.log grep -q 'AIRY=true' smoke.log grep -q 'MATRIXEXP=true' smoke.log %if %{with tests} # The same command tests/test.sh runs, but keeping the log: test.sh deletes its # own, and automake's serial harness only echoes one when the suite fails. ./maxima-local --no-init --lisp=sbcl \ --batch-string='build_info();run_testsuite(share_tests=true);' 2>&1 \ | tee testsuite.log grep -q 'No unexpected errors' testsuite.log %endif %triggerin -- tetex-latex,texlive-latex if [ -d %{texmf}/tex/latex ]; then rm -rf %{texmf}/tex/latex/emaxima ||: ln -sf %{_datadir}/maxima/%{maxima_ver}/emacs %{texmf}/tex/latex/emaxima ||: %{_bindir}/texhash 2> /dev/null ||: fi %triggerun -- tetex-latex,texlive-latex if [ $2 -eq 0 ]; then rm -f %{texmf}/tex/latex/emaxima ||: fi %files %license COPYING %doc AUTHORS ChangeLog README README-lisps.md %doc doc/implementation/ %doc doc/maximabook/maxima.pdf %{_bindir}/maxima %{_bindir}/rmaxima %dir %{_datadir}/maxima %dir %{_datadir}/maxima/%{maxima_ver} %{_datadir}/maxima/%{maxima_ver}/[a-c,f-r,t-w,y-z,A-Z]* %{_datadir}/maxima/%{maxima_ver}/demo/ %dir %{_datadir}/maxima/%{maxima_ver}/doc/ %dir %{_datadir}/maxima/%{maxima_ver}/doc/html/ %{_datadir}/maxima/%{maxima_ver}/doc/html/figures/ %doc %lang(en) %{_datadir}/maxima/%{maxima_ver}/doc/html/*.h* %doc %lang(en) %{_datadir}/maxima/%{maxima_ver}/doc/html/manual.css %doc %lang(en) %{_datadir}/maxima/%{maxima_ver}/doc/share/ %doc %lang(es) %{_datadir}/maxima/%{maxima_ver}/doc/html/es/ %doc %lang(pt) %{_datadir}/maxima/%{maxima_ver}/doc/html/pt/ %doc %lang(pt_BR) %{_datadir}/maxima/%{maxima_ver}/doc/html/pt_BR/ %{_datadir}/maxima/%{maxima_ver}/share/ %{_datadir}/mime/packages/x-mac.xml %{_datadir}/mime/packages/x-maxima-out.xml %{bash_completions_dir}/*maxima %{_datadir}/icons/hicolor/scalable/mimetypes/* %dir %{_libdir}/maxima/ %dir %{_libdir}/maxima/%{maxima_ver}/ %{_infodir}/imaxima* %{_infodir}/maxima* %{_infodir}/abs_integrate.info* %{_infodir}/drawutils.info* %{_infodir}/guess.info* %{_infodir}/kovacicODE.info* %{_infodir}/logic.info* %{_infodir}/mathml.info* %{_infodir}/nelder_mead.info %{_infodir}/raddenest.info* %{_infodir}/symplectic_ode.info %lang(es) %{_infodir}/es* %lang(pt) %{_infodir}/pt/ %lang(pt_BR) %{_infodir}/pt_BR* %{_mandir}/man1/maxima.* %{_mandir}/*/man1/maxima.* %ghost %{texmf}/tex/latex/emaxima %{_emacs_sitelispdir}/* %exclude %{_emacs_sitelispdir}/site_start.d/ %{_emacs_sitelispdir}/site_start.d/*.el* %files src %{_datadir}/maxima/%{maxima_ver}/src/ %files gui %{_bindir}/xmaxima %{_datadir}/maxima/%{maxima_ver}/xmaxima/ %{_datadir}/applications/Xmaxima.desktop %{_metainfodir}/net.sourceforge.maxima.xmaxima.appdata.xml %{_datadir}/icons/hicolor/*/apps/* %{_infodir}/xmaxima* %files runtime-sbcl %{_libdir}/maxima/%{maxima_ver}/binary-sbcl %changelog * Mon Aug 31 2026 Ilia Gradina - 5.50.0-1 - Update to 5.50.0 - Add maxima-5.50.0-upstream-fixes.patch, every post-release upstream commit over src, share and tests, for bug #4994 and the #5171 family; Arch's fix-limit-regression.patch is a hand-rolled subset of the same work. Measured with --with tests on fedora-44-x86_64: stock 5.50.0 leaves 1 failure in 20,589 tests, a src/limit.lisp-only backport leaves 10 because the expected results live in the test files, and the full slice is back to 1 in 20,936 tests while consing 2.8%% less. That last one is rtest_bernstein 11, dealt with by the sb-gmp patch below - maxima-sbcl-gmp.patch: repair SB-KERNEL::INTEXP after installing the GMP functions. SB-GMP::GMP-INTEXP sends any base that is not an integer, a ratio or 0/+-1 to MPZ-POW, so with sb-gmp loaded (expt #c(1/5 1) 1) is a type error and bernstein_poly(k, n, 1/5 + %%i) fails; that was the last remaining test failure, rtest_bernstein 11, and it fails the same way on 5.49.0 - Drop matrixexp.patch: measured to change no matrixexp result on 5.49 or 5.50, including the bug #2596 case it was believed to fix - Add maxima-matrixexp-2596.patch, which does fix it. spectral_rep builds each projector as a residue at one eigenvalue, so it divides the characteristic polynomial by (z - zi) with zi already a cubic irrationality; that division is not exact and check_spectral_rep rejects the result. Build the projector once at a generic root instead, in Q(...)[lam]/(p(lam)) through tellrat. Separately, under the default domain: real the simplifier moves a cube root of an imaginary number onto another branch, so matrixexp's closing fullratsimp returned a matrix that was not exp(mat) - off by 2.7 against a 60-term series rather than 3e-15. Submitted upstream - Drop both xmaxima seds: "package require Tk 8.6-" already accepts Tk 9, and the sdfplot one only stored a literal "[file tildeexpand ...]" string, because getOptions passes defaults through [list] - Drop unused BuildRequires python3, python3-devel and vtk: the build never runs python, share/draw/vtk.lisp only generates it at run time - Add maxima-vtk-python3.patch: draw_renderer vtk/vtk6 invoked a bare "python", which Fedora only provides through the optional python-unversioned-command package - Drop touch debugfiles.list and _build_id_links, dead with debug_package nil - Use %%{_datadir}/texmf: Fedora has no %%{_texmfdir} macro, so the emaxima symlink was installed under a literal, unpackageable path - Drop %%{_libexecdir}/maxima, plotting/mgnuplot is gone in 5.50.0 - maxima-runtime-sbcl: require gmp, sb-gmp dlopens libgmp.so.10 - Make the test suite opt-in and add smoke tests for both patches * Wed Jan 28 2026 Ilia Gradina - 5.49.0-1 - Update to 5.49.0 * Tue Oct 28 2025 Ilia Gradina - 5.48.1-2 - rebuild with new sbcl 2.5.10 * Mon Oct 20 2025 Ilia Gradina - 5.48.1-1 - Update to 5.48.1 with sbcl 2.5.9 - Fedora 42/43+: SBCL-only build, Tcl/Tk9 support, matrixexp + GMP patches, cleanup * Sat May 17 2025 Ilia Gradina - 5.47.0-13 - Rebuild with new sbcl version 2.5.4 * Fri Apr 11 2025 Ilia Gradina - 5.47.0-12 - Rebuild with new sbcl version 2.5.3 * Sun Oct 27 2024 Ilia Gradina - 5.47.0-11 - Rebuild with new sbcl version 2.4.9 * Wed Jul 17 2024 Ilia Gradina - 5.47.0-10 - Rebuild with new sbcl version 2.4.6 * Thu Jun 6 2024 Ilia Gradina - 5.47.0-9 - Rebuild with new sbcl version 2.4.5 * Mon May 6 2024 Ilia Gradina - 5.47.0-8 - Rebuild for new sbcl version 2.4.4 * Tue Apr 23 2024 Ilia Gradina - 5.47.0-7 - Rebuild for new sbcl version 2.4.3 * Sat Mar 9 2024 Ilia Gradina - 5.47.0-6 - Rebuild for new sbcl version 2.4.2 - build only for sbcl * Wed Jan 31 2024 Ilia Gradina - 5.47.0-5 - Rebuild for new sbcl version 2.4.1 * Fri Dec 29 2023 Ilia Gradina - 5.47.0-4 - Rebuild for new sbcl version 2.4.0 * Thu Nov 30 2023 Ilia Gradina - 5.47.0-3 - Rebuild for new sbcl version 2.3.11 * Sun Nov 12 2023 Ilia Graidna - 5.47.0-2 - Rebuilt for new sbcl version 2.3.10 * Sun Oct 15 2023 Ilia Gradina - 5.47.0-1 - Update to 5.47.0 - added patches Patch54 and Patch55 * Fri Sep 22 2023 Jerry James - 5.45.1-6 - Rebuild for ecl 23.9.9 - Update deprecated %%patchN usage - Avoid obsolescence warnings from egrep