{% set version = '0.1-24' %}

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

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

source:
  fn: classInt_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/classInt_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/classInt/classInt_{{ version }}.tar.gz
  sha256: f3dc9084450ea3da07e1ea5eeb097fd2fedc7e29e5d7794b418bcb438c4fcfa2

build:
  number: 0
  script: R CMD INSTALL --build .
  skip: True  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-class
    - r-e1071
    - posix  # [win]
    - {{native}}toolchain  # [win]
    - gcc  # [not win]
  run:
    - r-base
    - r-class
    - r-e1071
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=classInt
  license: GPL (>= 2)
  summary: Selected commonly used methods for choosing univariate class intervals for mapping
    or other graphics purposes.

extra:
  recipe-maintainers:
    - ocefpaf
