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

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

source:
  fn: R6_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/R6_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/R6/R6_{{ version }}.tar.gz
  sha256: 087756f471884c3b3ead80215a7cc5636a78b8a956e91675acfe2896426eae8f

build:
  merge_build_host: True  # [win]
  number: 1
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://github.com/wch/R6/
  license: MIT
  summary: The R6 package allows the creation of classes with reference semantics, similar to
    R's built-in reference classes. Compared to reference classes, R6 classes are simpler
    and lighter-weight, and they are not built on S4 classes so they do not require
    the methods package. These classes allow public and private members, and they support
    inheritance, even when the classes are defined in different packages.
  license_family: MIT

extra:
  recipe-maintainers:
    - ocefpaf
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
