{% set version = '1.0.1' %}

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

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

source:
  fn: manipulate_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/manipulate_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/manipulate/manipulate_{{ version }}.tar.gz
  sha256: 7e7e829252c3b3c1f768bb76a5d952f0e98f95c843b5f58da325deeb1ab693ce

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=manipulate
  license: GPL-2
  summary: Interactive plotting functions for use within RStudio. The manipulate function accepts
    a plotting expression and a set of controls (e.g. slider, picker, checkbox, or button)
    which are used to dynamically change values within the expression. When a value
    is changed using its corresponding control the expression is automatically re-executed
    and the plot is redrawn.
  license_family: GPL2

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
