{% set version = '0.1-18' %}

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

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

source:
  fn: mc2d_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/mc2d_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/mc2d/mc2d_{{ version }}.tar.gz
  sha256: e30d8e826ce3ea0e7b2612fbfea98982019b5ccc7bcbeb166e7a056374455cd2

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

requirements:
  build:
    - r-base
    - r-mvtnorm

  run:
    - r-base
    - r-mvtnorm

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

about:
  home: https://CRAN.R-project.org/package=mc2d
  license: GPL (>= 2)
  summary: A complete framework to build and study Two-Dimensional Monte-Carlo simulations, aka
    Second-Order Monte-Carlo simulations. Also includes various distributions (pert,
    triangular, Bernoulli, empirical discrete and continuous).
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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