{% set version = '0.9-14' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/ipred_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ipred/ipred_{{ version }}.tar.gz
  sha256: 81c83dc847d09c3db52ef15e36cd4dac38c50eead1008ddd458b9e89d7528f35

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: mvtnorm, mlbench, TH.data, randomForest, party
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
    - r-mass
    - r-class
    - r-nnet
    - r-prodlim
    - r-rpart >=3.1_8
    - r-survival

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-mass
    - r-class
    - r-nnet
    - r-prodlim
    - r-rpart >=3.1_8
    - r-survival

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('ipred')"           # [not win]
    - "\"%R%\" -e \"library('ipred')\""  # [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=ipred
  license: GPL-2
  summary: Improved predictive models by indirect classification and bagging for classification,
    regression and survival problems as well as resampling based estimators of prediction
    error.
  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: ipred
# Title: Improved Predictors
# Version: 0.9-14
# Date: 2023-03-09
# Authors@R: c(person("Andrea", "Peters", role = "aut"), person("Torsten", "Hothorn", role = c("aut", "cre"), email = "Torsten.Hothorn@R-project.org"), person("Brian D.", "Ripley", role = "ctb"), person("Terry", "Therneau", role = "ctb"), person("Beth", "Atkinson", role = "ctb"))
# Description: Improved predictive models by indirect classification and bagging for classification, regression and survival problems as well as resampling based estimators of prediction error.
# Depends: R (>= 2.10)
# Imports: rpart (>= 3.1-8), MASS, survival, nnet, class, prodlim
# Suggests: mvtnorm, mlbench, TH.data, randomForest, party
# License: GPL (>= 2)
# NeedsCompilation: yes
# Packaged: 2023-03-09 13:48:29 UTC; hothorn
# Author: Andrea Peters [aut], Torsten Hothorn [aut, cre], Brian D. Ripley [ctb], Terry Therneau [ctb], Beth Atkinson [ctb]
# Maintainer: Torsten Hothorn <Torsten.Hothorn@R-project.org>
# Repository: CRAN
# Date/Publication: 2023-03-09 14:50:02 UTC

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