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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/interp_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/interp/interp_{{ version }}.tar.gz
  sha256: 661f927115fea3a5d4e67d5fff469ca9c0bf45ce718edf4a25423dbaf7f9be84

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
    - r-rcpp >=0.12.9
    - r-rcppeigen
    - r-deldir
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.12.9
    - r-rcppeigen
    - r-deldir

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

about:
  home: https://CRAN.R-project.org/package=interp
  license: GPL-2.0-or-later
  summary: Bivariate data interpolation on regular and irregular grids, either linear or using
    splines are the main part of this package.  It is intended to provide FOSS replacement
    functions for the ACM licensed akima::interp and tripack::tri.mesh functions. Currently
    the piecewise linear interpolation part of akima::interp (and also akima::interpp)
    is implemented in interp::interp, this corresponds to the call akima::interp(...,
    linear=TRUE) which is the default setting and covers most of akima::interp use cases
    in depending packages.  A re-implementation of Akimas spline interpolation (akima::interp(...,
    linear=FALSE)) is currently under development and will complete this package in
    a later version. Estimators for partial derivatives are already available, these
    are a prerequisite for the spline interpolation.  The basic part is currently a
    GPLed triangulation algorithm (sweep hull algorithm by David Sinclair) providing
    the starting point for the piecewise linear interpolator. As side effect this algorithm
    is also used to provide replacements for the basic functions of the tripack package
    which also suffer from the ACM restrictions.  All functions are designed to be backward
    compatible with their akima / tripack counterparts.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: interp
# Type: Package
# Title: Interpolation Methods
# Version: 1.0-33
# Date: 2020-01-07
# Authors@R: c(person("Albrecht", "Gebhardt", role = c("aut", "cre", "cph"), email = "albrecht.gebhardt@aau.at", comment = "..."), person("Roger", "Bivand", role = c("aut"), email = "Roger.Bivand@nhh.no"), person("David", "Sinclair", role = c("aut","cph"), email = "david@s-hull.org"))
# Maintainer: Albrecht Gebhardt <albrecht.gebhardt@aau.at>
# Description: Bivariate data interpolation on regular and irregular grids, either linear or using splines are the main part of this package.  It is intended to provide FOSS replacement functions for the ACM licensed akima::interp and tripack::tri.mesh functions. Currently the piecewise linear interpolation part of akima::interp (and also akima::interpp) is implemented in interp::interp, this corresponds to the call akima::interp(..., linear=TRUE) which is the default setting and covers most of akima::interp use cases in depending packages.  A re-implementation of Akimas spline interpolation (akima::interp(..., linear=FALSE)) is currently under development and will complete this package in a later version. Estimators for partial derivatives are already available, these are a prerequisite for the spline interpolation.  The basic part is currently a GPLed triangulation algorithm (sweep hull algorithm by David Sinclair) providing the starting point for the piecewise linear interpolator. As side effect this algorithm is also used to provide replacements for the basic functions of the tripack package which also suffer from the ACM restrictions.  All functions are designed to be backward compatible with their akima / tripack counterparts.
# License: GPL (>= 2)
# Imports: Rcpp (>= 0.12.9), deldir
# Suggests: sp, Deriv
# LinkingTo: Rcpp, RcppEigen
# NeedsCompilation: yes
# Packaged: 2020-01-07 21:35:45 UTC; agebhard
# Author: Albrecht Gebhardt [aut, cre, cph] (...), Roger Bivand [aut], David Sinclair [aut, cph]
# Repository: CRAN
# Date/Publication: 2020-01-08 23:01:13 UTC
