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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/densityClust_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/densityClust/densityClust_{{ version }}.tar.gz
  sha256: 23749ba57d1d7886e0fe9ba535d7f30dd2cbb7ebf451afcec8f54be5d4063eff
  patches:
    - patch  # [not win]

build:
  merge_build_host: True  # [win]
  number: 1006
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - {{ posix }}patch
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-fnn
    - r-rcolorbrewer
    - r-rcpp
    - r-rtsne
    - r-ggplot2
    - r-ggrepel
    - r-gridextra
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-fnn
    - r-rcolorbrewer
    - r-rcpp
    - r-rtsne
    - r-ggplot2
    - r-ggrepel
    - r-gridextra

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

about:
  home: https://CRAN.R-project.org/package=densityClust
  license: GPL-2.0-or-later
  summary: An improved implementation (based on k-nearest neighbors) of the density peak clustering
    algorithm, originally described by Alex Rodriguez and Alessandro Laio (Science,
    2014 vol. 344). It can handle large datasets (> 100, 000 samples) very efficiently.
    It was initially implemented by Thomas Lin Pedersen, with inputs from Sean Hughes
    and later improved by Xiaojie Qiu to handle large datasets with kNNs.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: densityClust
# Type: Package
# Title: Clustering by Fast Search and Find of Density Peaks
# Version: 0.3
# Date: 2017-10-24
# Authors@R: c( person("Thomas Lin", "Pedersen", email = "thomasp85@gmail.com", role = c("aut", "cre")), person("Sean", "Hughes", email = "", role = c("aut")), person("Xiaojie", "Qiu", email = "xqiu@uw.edu", role = c("aut")))
# Maintainer: Thomas Lin Pedersen <thomasp85@gmail.com>
# Description: An improved implementation (based on k-nearest neighbors) of the density peak clustering algorithm, originally described by Alex Rodriguez and Alessandro Laio (Science, 2014 vol. 344). It can handle large datasets (> 100, 000 samples) very efficiently. It was initially implemented by Thomas Lin Pedersen, with inputs from Sean Hughes and later improved by Xiaojie Qiu to handle large datasets with kNNs.
# License: GPL (>= 2)
# Suggests: testthat
# LinkingTo: Rcpp
# Imports: Rcpp, FNN, Rtsne, ggplot2, ggrepel, grDevices, gridExtra, RColorBrewer
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2017-10-24 11:49:46 UTC; w22066
# Author: Thomas Lin Pedersen [aut, cre], Sean Hughes [aut], Xiaojie Qiu [aut]
# Repository: CRAN
# Date/Publication: 2017-10-24 12:52:51 UTC
