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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/mstate_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/mstate/mstate_{{ version }}.tar.gz
  sha256: d1e04ce0fc274cd3c3ec3373b1a5523e6331706ef9d4a0a3b3cb2278ddb92386

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-rcolorbrewer
    - r-data.table
    - r-lattice
    - r-magrittr
    - r-rlang
    - r-survival >=3.1
    - r-viridis
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcolorbrewer
    - r-data.table
    - r-lattice
    - r-magrittr
    - r-rlang
    - r-survival >=3.1
    - r-viridis

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

about:
  home: https://www.lumc.nl/org/bds/research/medische-statistiek/survival-analysis/
  license: GPL-2.0-or-later
  summary: Contains functions for data preparation, descriptives, hazard estimation and prediction with Aalen-Johansen or simulation in competing risks and multi-state models, see Putter, Fiocco, Geskus (2007) <doi:10.1002/sim.2712>.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: mstate
# Version: 0.2.12
# Date: 2019-12-10
# Title: Data Preparation, Estimation and Prediction in Multi-State Models
# Author: Hein Putter, Liesbeth de Wreede, Marta Fiocco, with contributions by Ronald Geskus
# Maintainer: Hein Putter <H.Putter@lumc.nl>
# Depends: survival (>= 3.1)
# Imports: RColorBrewer
# Suggests: cmprsk
# Description: Contains functions for data preparation, descriptives, hazard estimation and prediction with Aalen-Johansen or simulation in competing risks and multi-state models, see Putter, Fiocco, Geskus (2007) <doi:10.1002/sim.2712>.
# License: GPL (>= 2)
# URL: https://www.lumc.nl/org/bds/research/medische-statistiek/survival-analysis/
# NeedsCompilation: yes
# Repository: CRAN
# Packaged: 2019-12-11 12:02:31 UTC; hputter
# Date/Publication: 2019-12-11 12:30:03 UTC
