{% set version = '0.1.5' %}

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

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

source:
  fn: tweenr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/tweenr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/tweenr/tweenr_{{ version }}.tar.gz
  sha256: d8b6f85459796319b8bf0cb71478a17b5d3a0ace580ba3c8ebbb4a4a3bdc001a

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-rcpp
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-rcpp
    - libgcc  # [not win]

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

about:
  home: https://github.com/thomasp85/tweenr
  license: GPL (>= 2)
  summary: In order to create smooth animation between states of data, tweening is necessary.
    This package provides a range of functions for creating tweened data that plugs
    right into functions such as gg_animate() from the 'gganimate' package. Furthermore
    it adds a number of vectorized interpolaters for common R data types such as numeric,
    date and colour.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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