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

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

source:
  fn: randomForestSRC_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/randomForestSRC_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/randomForestSRC/randomForestSRC_{{ version }}.tar.gz
  sha256: 2bcb2734f7a3f6e372bd234b2db23fc9c896e9663032c5f04babb54a2093988b

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}sed               # [win]
    - {{posix}}grep              # [win]
    - {{posix}}autoconf
    - {{posix}}automake          # [not win]
    - {{posix}}automake-wrapper  # [win]
    - {{posix}}pkg-config
    - {{posix}}make
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: http://web.ccs.miami.edu/~hishwaran http://www.kogalur.com https://github.com/kogalur/randomForestSRC
  license: GPL (>= 3)
  summary: 'Fast OpenMP parallel processing for Breiman''s random forests for survival, competing
    risks, regression and classification based on Ishwaran and Kogalur''s popular random
    survival forests (RSF) package.  Handles missing data and now includes multivariate,
    unsupervised forests and quantile regression.  New fast interface using subsampling. '
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - nick-youngblut
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
