name: wxmaxima
version: 26.05.0-0
summary: A nightly build of wxMaxima, a gui for Maxima, a full-featured CAS.
description: wxMaxima is a quite full-featured graphical user interface for Maxima.
confinement: strict
grade: stable
base: core24
license: GPL-2.0+
architectures:
   - build-on: arm64
   - build-on: armhf
   - build-on: amd64
   - build-on: ppc64el
   - build-on: s390x

apps:
  wxmaxima:
    extensions: [gnome]
    command: usr/bin/wxmaxima
    desktop: usr/share/applications/io.github.wxmaxima_developers.wxMaxima.desktop
    plugs: [network, network-bind, home, removable-media, optical-drive, process-control, cups-control, upower-observe]
      # gtk-3-themes:
      #   interface: content
      #   target: $SNAP/data-dir/themes
      #   default-provider: gtk-common-themes
      # icon-themes:
      #   interface: content
      #   target: $SNAP/data-dir/icons
      #   default-provider: gtk-common-themes

parts:
  wxmaxima:
    plugin: cmake
    cmake-parameters:
      - -DCMAKE_INSTALL_PREFIX=/usr
    source: https://github.com/wxMaxima-developers/wxmaxima.git
    build-packages:
     - libwxbase3.0-dev
     - libwxgtk3.0-gtk3-dev
     - libwxgtk-webview3.0-gtk3-dev
     - gettext
    stage-snaps:
     - maxima
    stage-packages:
     - libwxbase3.0-0v5
     - libglu1-mesa
     - freeglut3
     - wx-common
     - libwxgtk-webview3.0-gtk3-0v5
     - gettext
     - libwxbase3.0-dev
     - libwxgtk3.0-gtk3-dev
     - libwxgtk-webview3.0-gtk3-dev
     - locales-all
    stage:
     - -usr/share/texmf/ls-R
 
