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

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

source:
  fn: cmprsk_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/cmprsk_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/cmprsk/cmprsk_{{ version }}.tar.gz
  sha256: 952da4a0fd55a039f64f619c2c7cc29ba2490985ca67d2853de511692f1fb9c6

build:
  merge_build_host: True  # [win]
  number: 1004
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('fortran') }}  # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_fortran') }}        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-survival
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-survival

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

about:
  home: http://www.r-project.org
  license: GPL (>= 2)
  summary: Estimation, testing and regression modeling of subdistribution functions in competing
    risks, as described in Gray (1988), A class of K-sample tests for comparing the
    cumulative incidence of a competing risk, Ann. Stat. 16:1141-1154, and Fine JP and
    Gray RJ (1999), A proportional hazards model for the subdistribution of a competing
    risk, JASA, 94:496-509.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
