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

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

source:
  fn: threejs_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/threejs_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/threejs/threejs_{{ version }}.tar.gz
  sha256: 71750b741672a435ecf749b69c72f0681aa8bb795e317f4e3056d5e33f6d79e8

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-base64enc
    - r-crosstalk
    - r-htmlwidgets >=0.3.2
    - r-igraph >=1.0.0
  run:
    - r-base
    - r-base64enc
    - r-crosstalk
    - r-htmlwidgets >=0.3.2
    - r-igraph >=1.0.0

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

about:
  home: https://bwlewis.github.io/rthreejs
  license: MIT
  summary: Create interactive 3D scatter plots, network plots, and globes using the 'three.js'
    visualization library (<https://threejs.org>).
  license_family: MIT

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