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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/flexsurv_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/flexsurv/flexsurv_{{ version }}.tar.gz
  sha256: 97eed8cc2d58ab759ac244b5b60e7f178b36251cd2896067b0daee366d92914f

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-matrix
    - r-rcpp >=0.11.5
    - r-assertthat
    - r-desolve
    - r-dplyr
    - r-generics
    - r-magrittr
    - r-mstate >=0.2.10
    - r-muhaz
    - r-mvtnorm
    - r-numderiv
    - r-purrr
    - r-quadprog
    - r-rlang
    - r-rstpm2
    - r-survival
    - r-tibble
    - r-tidyr
    - r-tidyselect
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-rcpp >=0.11.5
    - r-assertthat
    - r-desolve
    - r-dplyr
    - r-generics
    - r-magrittr
    - r-mstate >=0.2.10
    - r-muhaz
    - r-mvtnorm
    - r-numderiv
    - r-purrr
    - r-quadprog
    - r-rlang
    - r-rstpm2
    - r-survival
    - r-tibble
    - r-tidyr
    - r-tidyselect

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

about:
  home: https://github.com/chjackson/flexsurv-dev
  license: GPL-2.0-or-later
  summary: Flexible parametric models for time-to-event data, including the Royston-Parmar spline model, generalized gamma and generalized F distributions.  Any user-defined parametric distribution can be fitted, given at least an R function defining the probability density or hazard. There are also tools for fitting and
    predicting from fully parametric multi-state models.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: flexsurv
# Type: Package
# Title: Flexible Parametric Survival and Multi-State Models
# Version: 1.1.1
# Date: 2019-03-18
# Authors@R: c(person("Christopher", "Jackson", email="chris.jackson@mrc-bsu.cam.ac.uk", role=c("aut", "cre")), person("Paul", "Metcalfe", role=c("ctb")), person("Jordan", "Amdahl", role=c("ctb")) )
# Description: Flexible parametric models for time-to-event data, including the Royston-Parmar spline model, generalized gamma and generalized F distributions.  Any user-defined parametric distribution can be fitted, given at least an R function defining the probability density or hazard. There are also tools for fitting and predicting from fully parametric multi-state models.
# License: GPL (>= 2)
# Depends: survival, R (>= 2.15.0)
# Imports: mstate (>= 0.2.10), muhaz, mvtnorm, deSolve, quadprog, Rcpp (>= 0.11.5), tidyr, tibble
# Encoding: UTF-8
# Suggests: eha,numDeriv,testthat,msm,knitr,TH.data,colorspace
# URL: https://github.com/chjackson/flexsurv-dev
# BugReports: https://github.com/chjackson/flexsurv-dev/issues
# VignetteBuilder: knitr
# LazyData: yes
# LinkingTo: Rcpp
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2019-03-18 13:56:16 UTC; chris
# Author: Christopher Jackson [aut, cre], Paul Metcalfe [ctb], Jordan Amdahl [ctb]
# Maintainer: Christopher Jackson <chris.jackson@mrc-bsu.cam.ac.uk>
# Repository: CRAN
# Date/Publication: 2019-03-18 18:10:03 UTC
