{% set version = "3.7-0" %}
{% set posix = 'm2-' 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: cd96b08ec928b0028f69c942cc788e190b4543c8518d71deb6d8a712de44feef

build:
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-matrix                   # [build_platform != target_platform]
    - {{ compiler('c') }}        # [not win]
    - {{ stdlib("c") }}          # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ stdlib("c") }}                # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-matrix
  run:
    - r-base
    - 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
