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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/cachem_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/cachem/cachem_{{ version }}.tar.gz
  sha256: b012aa78227c0f5a86491fb82de1e67d321166cecb1734b05b33cd7c069a2fac

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

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

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

about:
  home: https://cachem.r-lib.org/, https://github.com/r-lib/cachem
  license: MIT
  summary: Key-value stores with automatic pruning. Caches can limit either their total size or the age of the oldest object (or both), automatically pruning objects to maintain the constraints.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: cachem
# Version: 1.0.1
# Title: Cache R Objects with Automatic Pruning
# Description: Key-value stores with automatic pruning. Caches can limit either their total size or the age of the oldest object (or both), automatically pruning objects to maintain the constraints.
# Authors@R: c( person("Winston", "Chang", , "winston@rstudio.com", c("aut", "cre")), person(family = "RStudio", role = c("cph", "fnd")))
# License: MIT + file LICENSE
# Encoding: UTF-8
# LazyData: true
# ByteCompile: true
# URL: https://cachem.r-lib.org/, https://github.com/r-lib/cachem
# Imports: rlang, fastmap
# Suggests: testthat
# RoxygenNote: 7.1.1
# NeedsCompilation: yes
# Packaged: 2021-01-19 15:09:27 UTC; winston
# Author: Winston Chang [aut, cre], RStudio [cph, fnd]
# Maintainer: Winston Chang <winston@rstudio.com>
# Repository: CRAN
# Date/Publication: 2021-01-21 17:20:17 UTC
