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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/KernelKnn_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/KernelKnn/KernelKnn_{{ version }}.tar.gz
  sha256: 172c99d71bfd07db018053051952a22cbaa806592df7284e9f00ae82c52213f1

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]
    - llvm-openmp                # [osx]
  host:
    - r-base
    - r-rcpp >=0.12.5
    - r-rcpparmadillo
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp >=0.12.5
    - r-rcpparmadillo
    - llvm-openmp                # [osx]

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

about:
  home: https://github.com/mlampros/KernelKnn
  license: MIT
  license_file: LICENSE
  summary: Extends the simple k-nearest neighbors algorithm by incorporating numerous kernel
    functions and a variety of distance metrics. The package takes advantage of 'RcppArmadillo'
    to speed up the calculation of distances between observations.
  license_family: MIT

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

# Package: KernelKnn
# Type: Package
# Title: Kernel k Nearest Neighbors
# Version: 1.0.9
# Date: 2019-04-14
# Author: Lampros Mouselimis <mouselimislampros@gmail.com>
# Maintainer: Lampros Mouselimis <mouselimislampros@gmail.com>
# BugReports: https://github.com/mlampros/KernelKnn/issues
# URL: https://github.com/mlampros/KernelKnn
# Description: Extends the simple k-nearest neighbors algorithm by incorporating numerous kernel functions and a variety of distance metrics. The package takes advantage of 'RcppArmadillo' to speed up the calculation of distances between observations.
# License: MIT + file LICENSE
# LazyData: TRUE
# Depends: R(>= 2.10.0)
# Imports: Rcpp (>= 0.12.5)
# LinkingTo: Rcpp, RcppArmadillo
# Suggests: testthat, covr, knitr, rmarkdown
# VignetteBuilder: knitr
# RoxygenNote: 6.1.0
# NeedsCompilation: yes
# Packaged: 2019-04-14 06:13:13 UTC; lampros
# Repository: CRAN
# Date/Publication: 2019-04-14 06:42:37 UTC
