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

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

source:
  fn: R.cache_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/R.cache_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/R.cache/R.cache_{{ version }}.tar.gz
  sha256: d3d4a99a676734ea53e96747d87857fa69615e59858804e92f8ad9ddcf62c5c1

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-r.methodss3 >=1.7.1
    - r-r.oo >=1.21.0
    - r-r.utils >=2.6.0
    - r-digest >=0.6.13
  run:
    - r-base
    - r-r.methodss3 >=1.7.1
    - r-r.oo >=1.21.0
    - r-r.utils >=2.6.0
    - r-digest >=0.6.13

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

about:
  home: https://github.com/HenrikBengtsson/R.cache
  license: LGPL (>= 2.1)
  summary: Memoization can be used to speed up repetitive and computational expensive function
    calls.  The first time a function that implements memoization is called the results
    are stored in a cache memory.  The next time the function is called with the same
    set of parameters, the results are momentarily retrieved from the cache avoiding
    repeating the calculations.  With this package, any R object can be cached in a
    key-value storage where the key can be an arbitrary set of R objects.  The cache
    memory is persistent (on the file system).
  license_family: LGPL

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