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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/condSURV_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/condSURV/condSURV_{{ version }}.tar.gz
  sha256: c18d49097256c07ea4700e758b567444fd39a95e8279fb9974367f47d8f55776

build:
  merge_build_host: True  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-kernsmooth
    - r-doparallel
    - r-dorng
    - r-foreach
    - r-np
    - r-survival
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-kernsmooth
    - r-doparallel
    - r-dorng
    - r-foreach
    - r-np
    - r-survival

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

about:
  home: https://CRAN.R-project.org/package=condSURV
  license: GPL-2.0-or-later
  summary: Method to implement some newly developed methods for the estimation of the conditional
    survival function.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
