{% set name = "ovito" %}
{% set version = "3.6.0" %}
{% set sha256 = "ad4f53a5e285ed0516a5d0f0974394b88d0ca39e5f5edb7f86761d9339521acd" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://gitlab.com/stuko/{{ name }}/-/archive/v{{ version }}/{{ name }}-v{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 0

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - {{ cdt('libselinux') }}  # [linux]
    - {{ cdt('libxcb') }}  # [linux]
    - {{ cdt('libxdamage') }}  # [linux]
    - {{ cdt('libxfixes') }}  # [linux]
    - {{ cdt('libxext-devel') }}  # [linux]
    - {{ cdt('libxxf86vm') }}  # [linux]
    - {{ cdt('libXau') }}  # [linux]
    - {{ cdt('mesa-libgl-devel') }}  # [linux]
    - {{ cdt('mesa-dri-drivers') }}  # [linux]
    - cmake
    - make  # [unix]
  host:
    - boost-cpp
    - ffmpeg
    - libnetcdf
    - qt
    - sphinx
    - sphinx_rtd_theme
    - zlib
  run:
    # nettle from defaults is not compatible
    - {{ pin_compatible('nettle', exact=True) }}  # [unix]
    - boost-cpp
  run_constrained:
    - menuinst >=1.4.17

test:
  commands:
    - command -v ovito  # [unix]
    - where ovito  # [win]
    - if not exist %PREFIX%\\Menu\\ovito.json exit 1  # [win]
    - if not exist %PREFIX%\\Menu\\ovito.ico exit 1  # [win]

about:
  home: https://www.ovito.org
  license: GPL-3.0-or-later
  license_file: {{ environ["RECIPE_DIR"] }}/LICENSE.txt
  summary: Scientific visualization and analysis software for atomistic simulation data
  description: |
    OVITO is a scientific visualization and analysis software for
    atomistic and particle simulation data. It helps scientists gain
    better insights into materials phenomena and physical processes.
    Since version 3.0, this package provide OVITO BASIC without the python modules.
    For all features, use the licensed OVITO PRO version.
    OVITO is being developed by Alexander Stukowski at Darmstadt
    University of Technology, Germany.
  doc_url: http://www.ovito.org/
  dev_url: https://gitlab.com/stuko/ovito

extra:
  recipe-maintainers:
    - jan-janssen
    - ericpre
    - stukowski
