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

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

source:
  fn: treemapify_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/treemapify_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/treemapify/treemapify_{{ version }}.tar.gz
  sha256: b8e5697e3d06ab94e6c06f1bbf0dc804302f8d134e30cf7f18f52e1745cd1869

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-ggfittext >=0.5.0
    - r-ggplot2 >=2.2.1
  run:
    - r-base
    - r-ggfittext >=0.5.0
    - r-ggplot2 >=2.2.1

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

about:
  home: https://github.com/wilkox/treemapify
  license: GPL (>= 3)
  summary: Provides 'ggplot2' geoms for drawing 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
