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

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

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

source:
  fn: coin_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/coin_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/coin/coin_{{ version }}.tar.gz
  sha256: 8b88ecc25903c83539dfc73cdc31a160e2aa4a7bea1773b22c79133d2f006035

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

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

requirements:
  build:
    - r-base
    - r-modeltools >=0.2_9
    - r-multcomp
    - r-mvtnorm >=1.0_5
    - r-survival
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-modeltools >=0.2_9
    - r-multcomp
    - r-mvtnorm >=1.0_5
    - r-survival
    - libgcc  # [not win]

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

about:
  home: http://coin.r-forge.r-project.org
  license: GPL-2
  summary: Conditional inference procedures for the general independence problem including two-sample,
    K-sample (non-parametric ANOVA), correlation, censored, ordered and multivariate
    problems.
  license_family: GPL2

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
