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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/ReorderCluster_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ReorderCluster/ReorderCluster_{{ version }}.tar.gz
  sha256: 38862ba2ef2a88ea70b12d50352a96f3b2ea032861256702387989bdfb20017f

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}    # [win]
    - {{ compiler('m2w64_cxx') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rcpp >=0.11.0
    - r-gplots
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.11.0
    - r-gplots

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

about:
  home: https://CRAN.R-project.org/package=ReorderCluster
  license: GPL (>= 3)
  summary: Tools for performing the leaf reordering for the dendrogram that preserves the hierarchical clustering result and at the same time tries to group instances from the same class together.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - conda-forge/r
