{% set version = '4.1.21' %}

{% 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: e77c1c675b211705be18181913a97b67379ccae699c1406acf7814ad8a45622b

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/

# Suggests: survival
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:
    # You can put additional test commands to be run here.
    - $R -e "library('rpart')"           # [not win]
    - "\"%R%\" -e \"library('rpart')\""  # [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://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-2'
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: rpart
# Priority: recommended
# Version: 4.1.21
# Date: 2023-10-09
# 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: 2023-10-09 21:16:22 UTC; atkinson
# Date/Publication: 2023-10-09 22:40:02 UTC

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