{% set version = '2.0-0' %}

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

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

source:
  fn: dichromat_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/dichromat_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/dichromat/dichromat_{{ version }}.tar.gz
  sha256: 31151eaf36f70bdc1172da5ff5088ee51cc0a3db4ead59c7c38c25316d580dd1

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=dichromat
  license: GPL-2
  summary: Collapse red-green or green-blue distinctions to simulate the effects of different
    types of color-blindness.
  license_family: GPL2

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
