{% set version = '7.3-22' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/class_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/class/class_{{ version }}.tar.gz
  sha256: b6994164e93843fcc7e08dfdc8c8b4af6a5a10ef7153d2e72a6855342508d15c

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/

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

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-mass

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('class')"           # [not win]
    - "\"%R%\" -e \"library('class')\""  # [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: http://www.stats.ox.ac.uk/pub/MASS4/
  license: GPL-2 | GPL-3
  summary: Various functions for classification, including k-nearest neighbour, Learning Vector
    Quantization and Self-Organizing Maps.
  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: class
# Priority: recommended
# Version: 7.3-22
# Date: 2023-05-02
# Depends: R (>= 3.0.0), stats, utils
# Imports: MASS
# Authors@R: c(person("Brian", "Ripley", role = c("aut", "cre", "cph"), email = "ripley@stats.ox.ac.uk"), person("William", "Venables", role = "cph"))
# Description: Various functions for classification, including k-nearest neighbour, Learning Vector Quantization and Self-Organizing Maps.
# Title: Functions for Classification
# ByteCompile: yes
# License: GPL-2 | GPL-3
# URL: http://www.stats.ox.ac.uk/pub/MASS4/
# NeedsCompilation: yes
# Packaged: 2023-05-02 16:15:43 UTC; ripley
# Author: Brian Ripley [aut, cre, cph], William Venables [cph]
# Maintainer: Brian Ripley <ripley@stats.ox.ac.uk>
# Repository: CRAN
# Date/Publication: 2023-05-03 11:01:28 UTC

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