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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/KernSmooth_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/KernSmooth/KernSmooth_{{ version }}.tar.gz
  sha256: 2b3d73fe15db46dbc2f6e3b043baadb7633c46bfa4a66d9eea5aed633058e685

build:
  merge_build_host: true  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - libblas
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=KernSmooth
  license: Unlimited
  summary: 'Functions for kernel smoothing (and density estimation) corresponding to the book: Wand, M.P. and Jones, M.C. (1995) "Kernel Smoothing".'
  license_family: MIT
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT

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

# Package: KernSmooth
# Priority: recommended
# Version: 2.23-16
# Date: 2019-10-15
# Title: Functions for Kernel Smoothing Supporting Wand & Jones (1995)
# Authors@R: c(person("Matt", "Wand", role = "aut", email = "Matt.Wand@uts.edu.au"), person("Cleve", "Moler", role = "ctb", comment = "LINPACK routines in src"), person("Brian", "Ripley", role = c("trl", "cre", "ctb"), email = "ripley@stats.ox.ac.uk", comment = "R port and updates"))
# Depends: R (>= 2.5.0), stats
# Suggests: MASS
# Description: Functions for kernel smoothing (and density estimation) corresponding to the book: Wand, M.P. and Jones, M.C. (1995) "Kernel Smoothing".
# License: Unlimited
# ByteCompile: yes
# NeedsCompilation: yes
# Packaged: 2019-10-15 12:12:47 UTC; ripley
# Author: Matt Wand [aut], Cleve Moler [ctb] (LINPACK routines in src), Brian Ripley [trl, cre, ctb] (R port and updates)
# Maintainer: Brian Ripley <ripley@stats.ox.ac.uk>
# Repository: CRAN
# Date/Publication: 2019-10-15 12:16:11 UTC
