{% set version = '5.3' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-mclust
  version: {{ version|replace("-", "_") }}

source:
  fn: mclust_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/mclust_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/mclust/mclust_{{ version }}.tar.gz
  sha256: 2b1b6d8266ae16b0e96f118df81559f208a568744a7c105af9f9abf1eef6ba40

build:
  number: 0
  skip: true  # [win32]
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - libgcc  # [not win]

test:
  commands:
    - $R -e "library('mclust')"  # [not win]
    - "\"%R%\" -e \"library('mclust')\""  # [win]

about:
  home: http://www.stat.washington.edu/mclust/
  license: GPL (>= 2)
  summary: Gaussian finite mixture models fitted via EM algorithm for model-based clustering,
    classification, and density estimation, including Bayesian regularization, dimension
    reduction for visualisation, and resampling-based inference.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
