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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/nabor_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/nabor/nabor_{{ version }}.tar.gz
  sha256: 47938dcc987279281c13abfd667660bf1b3b76af116136a27eb066ee1a4b43da

build:
  merge_build_host: True  # [win]
  number: 0
  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
    - r-bh >=1.54.0_4
    - r-rcpp >=0.11.2
    - r-rcppeigen >=0.3.2.2.0
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.11.2
    - r-rcppeigen >=0.3.2.2.0

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

about:
  home: https://github.com/jefferis/nabor https://github.com/ethz-asl/libnabo
  license: BSD-3-Clause
  summary: An R wrapper for 'libnabo', an exact or approximate k nearest neighbour library which
    is optimised for low dimensional spaces (e.g. 3D). 'libnabo' has speed and space
    advantages over the 'ANN' library wrapped by package 'RANN'. 'nabor' includes a
    knn function that is designed as a drop-in replacement for 'RANN' function nn2.
    In addition, objects which include the k-d tree search structure can be returned
    to speed up repeated queries of the same set of target points.
  license_family: BSD
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/BSD_3_clause'
    - LICENSE

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

# Package: nabor
# Type: Package
# Title: Wraps 'libnabo', a Fast K Nearest Neighbour Library for Low Dimensions
# Version: 0.5.0
# Author: Stephane Mangenat (for 'libnabo'), Gregory Jefferis
# Maintainer: Gregory Jefferis <jefferis@gmail.com>
# Description: An R wrapper for 'libnabo', an exact or approximate k nearest neighbour library which is optimised for low dimensional spaces (e.g. 3D). 'libnabo' has speed and space advantages over the 'ANN' library wrapped by package 'RANN'. 'nabor' includes a knn function that is designed as a drop-in replacement for 'RANN' function nn2. In addition, objects which include the k-d tree search structure can be returned to speed up repeated queries of the same set of target points.
# License: BSD_3_clause + file LICENSE
# Copyright: libnabo is copyright 2010--2011, Stephane Magnenat, ASL, ETHZ, Switzerland <stephane at magnenat dot net>
# URL: https://github.com/jefferis/nabor https://github.com/ethz-asl/libnabo
# BugReports: https://github.com/jefferis/nabor/issues
# Depends: R (>= 3.0.2)
# Imports: Rcpp (>= 0.11.2), methods
# LinkingTo: Rcpp, RcppEigen (>= 0.3.2.2.0), BH (>= 1.54.0-4)
# Suggests: testthat, RANN
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2018-07-11 15:23:05 UTC; jefferis
# Repository: CRAN
# Date/Publication: 2018-07-11 16:00:02 UTC
