{% set version = '0.5.0' %}

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

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

source:
  fn: scales_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/scales_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/scales/scales_{{ version }}.tar.gz
  sha256: dbfcc0817c4ab8b8777ec7d68ebfe220177c193cfb5bd0e8ba5d365dbfe3e97d

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

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

requirements:
  build:
    - r-base
    - r-rcolorbrewer
    - r-dichromat
    - r-munsell >=0.2
    - r-plyr
    - r-labeling
    - r-rcpp
    - r-r6
    - r-viridislite
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-rcolorbrewer
    - r-dichromat
    - r-munsell >=0.2
    - r-plyr
    - r-labeling
    - r-rcpp
    - r-r6
    - r-viridislite
    - libgcc               # [not win]

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

about:
  home: https://github.com/hadley/scales
  license: MIT
  summary: Graphical scales map data to aesthetics, and provide methods for automatically determining
    breaks and labels for axes and legends.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
