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

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

source:
  fn: treemap_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/treemap_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/treemap/treemap_{{ version }}.tar.gz
  sha256: 206d32ec0c741a6727e70082e0fef9e5b9e94967178e25d02e65f9ccdb7c6d95

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-rcolorbrewer
    - r-colorspace
    - r-data.table >=1.8.8
    - r-ggplot2
    - r-gridbase
    - r-igraph
    - r-shiny >=0.12.0
  run:
    - r-base
    - r-rcolorbrewer
    - r-colorspace
    - r-data.table >=1.8.8
    - r-ggplot2
    - r-gridbase
    - r-igraph
    - r-shiny >=0.12.0

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

about:
  home: https://CRAN.R-project.org/package=treemap
  license: GPL-3
  summary: A treemap is a space-filling visualization of hierarchical structures. This package
    offers great flexibility to draw treemaps.
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
