{% set version = '0.1-20' %}

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

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

source:
  fn: ggdendro_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ggdendro_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ggdendro/ggdendro_{{ version }}.tar.gz
  sha256: 125cae904fa5d426cccaf32ebe9c6297e9ef0c6fd3f19f61513834d03a0cf8ff

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

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

requirements:
  build:
    - r-base
    - r-mass
    - r-ggplot2 >=0.9.2

  run:
    - r-base
    - r-mass
    - r-ggplot2 >=0.9.2

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

about:
  home: https://github.com/andrie/ggdendro
  license: GPL-2 | GPL-3
  summary: This is a set of tools for dendrograms and tree plots using 'ggplot2'.  The 'ggplot2'
    philosophy is to clearly separate data from the presentation. Unfortunately the
    plot method for dendrograms plots directly to a plot device without exposing the
    data. The 'ggdendro' package resolves this by making available functions that extract
    the dendrogram plot data. The package provides implementations for tree, rpart,
    as well as diana and agnes cluster diagrams.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
