{% set version = "7.3-22" %}
{% set posix = 'm2-' 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:
  number: 2
  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
    - r-mass
  run:
    - r-base
    - r-mass

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

about:
  home: http://www.stats.ox.ac.uk/pub/MASS4/
  license: GPL-2.0-or-later
  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-3

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

# Package: class
# Priority: recommended
# Version: 7.3-15
# Date: 2019-01-01
# 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: 2019-01-01 08:04:06 UTC; ripley
# Author: Brian Ripley [aut, cre, cph], William Venables [cph]
# Maintainer: Brian Ripley <ripley@stats.ox.ac.uk>
# Repository: CRAN
# Date/Publication: 2019-01-01 09:57:46 UTC
