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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rpart_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rpart/rpart_{{ version }}.tar.gz
  sha256: 2b8ebe0e9e11592debff893f93f5a44a6765abd0bd956b0eb1f70e9394cfae5c

build:
  merge_build_host: True  # [win]
  number: 2
  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
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://github.com/bethatkinson/rpart, https://cran.r-project.org/package=rpart
  license: GPL-2 | GPL-3
  summary: Recursive partitioning for classification,  regression and survival trees.  An implementation
    of most of the  functionality of the 1984 book by Breiman, Friedman, Olshen and
    Stone.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: rpart
# Priority: recommended
# Version: 4.1-15
# Date: 2019-04-10
# Authors@R: c(person("Terry", "Therneau", role = "aut", email = "therneau@mayo.edu"), person("Beth", "Atkinson", role = c("aut", "cre"), email = "atkinson@mayo.edu"), person("Brian", "Ripley", role = "trl", email = "ripley@stats.ox.ac.uk", comment = "producer of the initial R port, maintainer 1999-2017"))
# Description: Recursive partitioning for classification,  regression and survival trees.  An implementation of most of the  functionality of the 1984 book by Breiman, Friedman, Olshen and Stone.
# Title: Recursive Partitioning and Regression Trees
# Depends: R (>= 2.15.0), graphics, stats, grDevices
# Suggests: survival
# License: GPL-2 | GPL-3
# LazyData: yes
# ByteCompile: yes
# NeedsCompilation: yes
# Author: Terry Therneau [aut], Beth Atkinson [aut, cre], Brian Ripley [trl] (producer of the initial R port, maintainer 1999-2017)
# Maintainer: Beth Atkinson <atkinson@mayo.edu>
# Repository: CRAN
# URL: https://github.com/bethatkinson/rpart, https://cran.r-project.org/package=rpart
# BugReports: https://github.com/bethatkinson/rpart/issues
# Packaged: 2019-04-11 15:59:38 UTC; atkinson
# Date/Publication: 2019-04-12 14:32:39 UTC
