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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/survival_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/survival/survival_{{ version }}.tar.gz
  sha256: 5356cd73da7ecfda4042e8a8ae00d3531b106f7b39ca31a1843eadf288418a46

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]
  host:
    - r-base
    - r-matrix
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix

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

about:
  home: https://github.com/therneau/survival
  license: LGPL-2.0-or-later
  summary: Contains the core survival analysis routines, including definition of Surv objects,  Kaplan-Meier and Aalen-Johansen (multi-state) curves, Cox models, and parametric accelerated failure time models.
  license_family: LGPL
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/LGPL-2

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

# Title: Survival Analysis
# Maintainer: Terry M Therneau <therneau.terry@mayo.edu>
# Priority: recommended
# Package: survival
# Version: 2.44-1.1
# Date: 2019-03-27
# Depends: R (>= 2.13.0)
# Imports: graphics, Matrix, methods, splines, stats, utils
# LazyData: Yes
# LazyLoad: Yes
# ByteCompile: Yes
# Authors@R: c(person(c("Terry", "M"), "Therneau", email="therneau.terry@mayo.edu", role=c("aut", "cre")), person("Thomas", "Lumley", role=c("ctb", "trl"), comment="original S->R port and R maintainer until 2009"))
# Description: Contains the core survival analysis routines, including definition of Surv objects,  Kaplan-Meier and Aalen-Johansen (multi-state) curves, Cox models, and parametric accelerated failure time models.
# License: LGPL (>= 2)
# URL: https://github.com/therneau/survival
# NeedsCompilation: yes
# Packaged: 2019-04-01 08:25:51 UTC; ripley
# Author: Terry M Therneau [aut, cre], Thomas Lumley [ctb, trl] (original S->R port and R maintainer until 2009)
# Repository: CRAN
# Date/Publication: 2019-04-01 08:42:36 UTC
