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

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

source:
  fn: colorspace_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/colorspace_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/colorspace/colorspace_{{ version }}.tar.gz
  sha256: dd9fd2342b650456901d014e7ff6d2e201f8bec0b555be63b1a878d2e1513e34

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://hclwizard.org/
  license: BSD_3_clause
  summary: Carries out mapping between assorted color spaces including RGB, HSV, HLS, CIEXYZ,
    CIELUV, HCL (polar CIELUV), CIELAB and polar CIELAB. Qualitative, sequential, and
    diverging color palettes based on HCL colors are provided along with an interactive
    palette picker (with either a Tcl/Tk or a shiny GUI).
  license_family: BSD

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