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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RANN_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RANN/RANN_{{ version }}.tar.gz
  sha256: b299c3dfb7be17aa41e66eff5674fddd2992fb6dd3b10bc59ffbf0c401697182

build:
  merge_build_host: True  # [win]
  number: 1
  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]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://github.com/jefferis/RANN
  license: GPL (>= 3)
  summary: Finds the k nearest neighbours for every point in a given dataset in O(N log N) time
    using Arya and Mount's ANN library (v1.1.3). There is support for approximate as
    well as exact searches, fixed radius searches and 'bd' as well as 'kd' trees. The
    distance is computed using the L2 (Euclidean) metric. Please see package 'RANN.L1'
    for the same functionality using the L1 (Manhattan, taxicab) metric.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: RANN
# Title: Fast Nearest Neighbour Search (Wraps ANN Library) Using L2 Metric
# Author: Sunil Arya and David Mount (for ANN), Samuel E. Kemp, Gregory Jefferis
# Maintainer: Gregory Jefferis <jefferis@gmail.com>
# Copyright: ANN library is copyright University of Maryland and Sunil Arya and David Mount. See file COPYRIGHT for details.
# Description: Finds the k nearest neighbours for every point in a given dataset in O(N log N) time using Arya and Mount's ANN library (v1.1.3). There is support for approximate as well as exact searches, fixed radius searches and 'bd' as well as 'kd' trees. The distance is computed using the L2 (Euclidean) metric. Please see package 'RANN.L1' for the same functionality using the L1 (Manhattan, taxicab) metric.
# URL: https://github.com/jefferis/RANN
# BugReports: https://github.com/jefferis/RANN/issues
# Encoding: UTF-8
# License: GPL (>= 3)
# Suggests: testthat
# Version: 2.6.1
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-01-08 19:24:15 UTC; jefferis
# Repository: CRAN
# Date/Publication: 2019-01-08 20:00:04 UTC
