{% set version = '0.4.0' %}

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

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

source:
  fn: viridis_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/viridis_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/viridis/viridis_{{ version }}.tar.gz
  sha256: 93d2ded68ed7cec5633c260dbc47051416147aae074f29ebe135cc329250b00e

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-ggplot2 >=1.0.1
    - r-gridextra
    - r-viridislite >=0.2.0
  run:
    - r-base
    - r-ggplot2 >=1.0.1
    - r-gridextra
    - r-viridislite >=0.2.0

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

about:
  home: https://github.com/sjmgarnier/viridis
  license: MIT
  summary: |
    Port of the new matplotlib color maps ('viridis' - the default -, 'magma', 'plasma'
    and 'inferno') to R. matplotlib is a popular plotting
    library for python. These color maps are designed in such a way that they will
    analytically be perfectly perceptually-uniform, both in regular form and also when
    converted to black-and-white. They are also designed to be perceived by readers
    with the most common form of color blindness.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
