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

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

source:
  fn: future_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/future_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/future/future_{{ version }}.tar.gz
  sha256: d807c19d85dc47a28dd391eab3d67b8d1b91070ffb26a8b2b987c6c447d0cd14

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-digest
    - r-globals >=0.12.0
    - r-listenv >=0.7.0
  run:
    - r-base
    - r-digest
    - r-globals >=0.12.0
    - r-listenv >=0.7.0

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

about:
  home: https://github.com/HenrikBengtsson/future
  license: LGPL (>= 2.1)
  summary: The purpose of this package is to provide a lightweight and unified Future API for
    sequential and parallel processing of R expression via futures.  The simplest way
    to evaluate an expression in parallel is to use `x %<-% { expression }` with `plan(multiprocess)`.
    This package implements sequential, multicore, multisession, and cluster futures.  With
    these, R expressions can be evaluated on the local machine, in parallel a set of
    local machines, or distributed on a mix of local and remote machines. Extensions
    to this package implement additional backends for processing futures via compute
    cluster schedulers etc. Because of its unified API, there is no need to modify any
    code in order switch from sequential on the local machine to, say, distributed processing
    on a remote compute cluster. Another strength of this package is that global variables
    and functions are automatically identified and exported as needed, making it straightforward
    to tweak existing code to make use of futures.
  license_family: LGPL

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