{% set version = "4.1.23" %}
{% set posix = 'm2-' 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: f9b89aed6aa6cea656a2dcb271574e969ce2b1c98beb07bd91e17339f6daabaf

build:
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ compiler('c') }}        # [not win]
    - {{ stdlib("c") }}          # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ stdlib("m2w64_c") }}          # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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.0-or-later
  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
