{% set version = '1.3-1' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  fn: tclust_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/tclust_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/tclust/tclust_{{ version }}.tar.gz
  sha256: fe4479a73b947d8f6c1cc63587283a8b6223d430d39eee4e5833a06d3d1726d2

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

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

  run:
    - r-base
    - r-cluster
    - r-mclust
    - r-mvtnorm
    - r-sn
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=tclust
  license: GPL-3
  summary: Provides functions for robust trimmed clustering. The methods are described in Garcia-Escudero
    (2008) <doi:10.1214/07-AOS515>, Fritz et al. (2012) <doi:10.18637/jss.v047.i12>
    and others.
  license_family: GPL

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