{% set version = '1.0-6' %}

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

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

source:
  fn: mvtnorm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/mvtnorm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/mvtnorm/mvtnorm_{{ version }}.tar.gz
  sha256: 4a015b57b645b520151b213eb04b7331598c06442a3f652c7dc149425bd2e444

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

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

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

  run:
    - r-base

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

about:
  home: http://mvtnorm.R-forge.R-project.org
  license: GPL-2
  summary: Computes multivariate normal and t probabilities, quantiles, random deviates and densities.
  license_family: GPL2

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
