{% set version = '2.1.1' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/farver_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/farver/farver_{{ version }}.tar.gz
  sha256: 0dcfda6ca743f465372790bcff1bcbc6a7145fdac1c682b021f654e8c6c996ce

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: covr, testthat (>= 3.0.0)
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [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:
    # You can put additional test commands to be run here.
    - $R -e "library('farver')"           # [not win]
    - "\"%R%\" -e \"library('farver')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://farver.data-imaginist.com, https://github.com/thomasp85/farver
  license: MIT
  summary: The encoding of colour can be handled in many different ways, using different colour
    spaces. As different colour spaces have different uses, efficient conversion between
    these representations are important. The 'farver' package provides a set of functions
    that gives access to very fast colour space conversion and comparisons implemented
    in C++, and offers speed improvements over the 'convertColor' function in the 'grDevices'
    package.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - katietz

# The original CRAN metadata for this package was:

# Type: Package
# Package: farver
# Title: High Performance Colour Space Manipulation
# Version: 2.1.1
# Authors@R: c( person("Thomas Lin", "Pedersen", , "thomasp85@gmail.com", role = c("cre", "aut"), comment = c(ORCID = "0000-0002-5147-4711")), person("Berendea", "Nicolae", role = "aut", comment = "Author of the ColorSpace C++ library"), person("Romain", "Francois", , "romain@purrple.cat", role = "aut", comment = c(ORCID = "0000-0002-2444-4226")) )
# Maintainer: Thomas Lin Pedersen <thomasp85@gmail.com>
# Description: The encoding of colour can be handled in many different ways, using different colour spaces. As different colour spaces have different uses, efficient conversion between these representations are important. The 'farver' package provides a set of functions that gives access to very fast colour space conversion and comparisons implemented in C++, and offers speed improvements over the 'convertColor' function in the 'grDevices' package.
# License: MIT + file LICENSE
# URL: https://farver.data-imaginist.com, https://github.com/thomasp85/farver
# BugReports: https://github.com/thomasp85/farver/issues
# Suggests: covr, testthat (>= 3.0.0)
# Encoding: UTF-8
# RoxygenNote: 7.2.0
# SystemRequirements: C++11
# Config/testthat/edition: 3
# NeedsCompilation: yes
# Packaged: 2022-07-06 12:54:24 UTC; thomas
# Author: Thomas Lin Pedersen [cre, aut] (<https://orcid.org/0000-0002-5147-4711>), Berendea Nicolae [aut] (Author of the ColorSpace C++ library), Romain Francois [aut] (<https://orcid.org/0000-0002-2444-4226>)
# Repository: CRAN
# Date/Publication: 2022-07-06 13:50:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
