name: maxima
version: 5.46.0-3
summary: A full-fledged computer algebra system
description: |
  A full featured computer algebra system,
  doing symbolic manipulation of polynomials, matrices, rational
  functions, integration, Todd-coxeter, graphing, bigfloats.  It has a
  symbolic debugger source level debugger for maxima code.  Maxima is
  based on the original Macsyma developed at MIT in the 1970's.
  It comes with extensive self tests.

  What a snappy app cannot provide is allowing an external web browser
  to open the offline manual it comes bundled with.
grade: stable
base: core22
license: GPL-2.0+
confinement: strict

apps:
  maxima:
    command: usr/bin/maxima
    plugs:
     - network
     - network-bind
     - home
     - removable-media
     - optical-drive

  rmaxima:
    command: usr/bin/rmaxima
    plugs:
     - network
     - network-bind
     - home
     - removable-media
     - optical-drive

  xmaxima:
    command: usr/bin/xmaxima
    plugs:
     - network
     - home
     - removable-media
     - optical-drive
     - desktop
     - desktop-legacy
     - wayland
     - x11
    desktop: usr/share/applications/net.sourceforge.maxima.xmaxima.desktop

parts:
  maxima:
    plugin: autotools
    source: .
    autotools-configure-parameters:
       - --prefix=/usr
       - --enable-clisp
       - --enable-sbcl
    build-packages:
     - to arm64,amd64,armhf:
       - clisp
       - texinfo
       - libreadline-dev
       - locales
       - automake
       - autoconf
       - gawk
       - texlive-latex-recommended
       - tex-common
       - python3
       - sbcl
     - else:
       - clisp
       - texinfo
       - libreadline-dev
       - locales
       - automake
       - autoconf
       - gawk
       - texlive-latex-recommended
       - tex-common
       - python3
       - sbcl
    stage-packages:
     - to arm64,amd64,armhf:
       - clisp
       - gnuplot
       - sbcl
     - else:
       - clisp
       - gnuplot
    stage:
     - -usr/share/texmf/ls-R
