{% set version = '1.1-21' %}

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

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

source:
  fn: MCPAN_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/MCPAN_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/MCPAN/MCPAN_{{ version }}.tar.gz
  sha256: a1a8e04ce53447d82e5e3889b90a0e22fb06ac80e2b3cee54fb808845e073560

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

requirements:
  build:
    - r-base
    - r-mcmcpack
    - r-magic
    - r-multcomp
    - r-mvtnorm
    - r-plyr

  run:
    - r-base
    - r-mcmcpack
    - r-magic
    - r-multcomp
    - r-mvtnorm
    - r-plyr

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

about:
  home: https://CRAN.R-project.org/package=MCPAN
  license: GPL-2
  summary: Multiple contrast tests and simultaneous confidence intervals based on normal approximation.
    With implementations for binomial proportions in a 2xk setting (risk difference
    and odds ratio), poly-3-adjusted tumour rates, biodiversity indices (multinomial
    data)  and expected values under lognormal assumption. Approximative power  calculation
    for multiple contrast tests of binomial and Gaussian data.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

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