{% set version = '2023.08.28' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/prodlim_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/prodlim/prodlim_{{ version }}.tar.gz
  sha256: 8002229f38bbe42e26b88ac542d9c028a9dbe8fd3b80af7552060bec3a555de8

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  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-kernsmooth
    - r-rcpp >=0.11.5
    - r-data.table
    - r-diagram
    - r-lava
    - r-survival

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-kernsmooth
    - r-rcpp >=0.11.5
    - r-data.table
    - r-diagram
    - r-lava
    - r-survival

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('prodlim')"           # [not win]
    - "\"%R%\" -e \"library('prodlim')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://CRAN.R-project.org/package=prodlim
  license: GPL-2
  summary: Fast and user friendly implementation of nonparametric estimators for censored event
    history (survival) analysis. Kaplan-Meier and Aalen-Johansen method.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: prodlim
# Title: Product-Limit Estimation for Censored Event History Analysis
# Version: 2023.08.28
# Author: Thomas A. Gerds
# Description: Fast and user friendly implementation of nonparametric estimators for censored event history (survival) analysis. Kaplan-Meier and Aalen-Johansen method.
# Depends: R (>= 2.9.0)
# Imports: Rcpp (>= 0.11.5), stats, data.table, grDevices, graphics, diagram, survival, KernSmooth, lava
# LinkingTo: Rcpp
# Maintainer: Thomas A. Gerds <tag@biostat.ku.dk>
# License: GPL (>= 2)
# Packaged: 2023-08-28 09:26:22 UTC; tag
# RoxygenNote: 7.2.3
# NeedsCompilation: yes
# Repository: CRAN
# Date/Publication: 2023-08-28 11:00:06 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
