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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/kde1d_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/kde1d/kde1d_{{ version }}.tar.gz
  sha256: 124eb2e427e08fd24ca37e0baa697736601785d6c6fb1c97c2ebcc5146bb4556

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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-bh
    - r-rcpp
    - r-rcppeigen
    - r-randtoolbox
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    #- r-bh
    - r-rcpp
    - r-rcppeigen
    - r-randtoolbox

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

about:
  home: https://github.com/tnagler/kde1d
  license: MIT
  summary: Provides an efficient implementation of univariate local polynomial kernel density
    estimators that can handle bounded and discrete data. See Geenens (2014) <arXiv:1303.4121>,
    Geenens and Wang (2018) <arXiv:1602.04862>, Nagler (2018a) <arXiv:1704.07457>, Nagler
    (2018b) <arXiv:1705.05431>.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# Package: kde1d
# Type: Package
# Title: Univariate Kernel Density Estimation
# Version: 1.0.4
# Authors@R: c( person("Thomas", "Nagler",, "mail@tnagler.com", role = c("aut", "cre")), person("Thibault", "Vatter",, "thibault.vatter@gmail.com", role = c("aut")) )
# Description: Provides an efficient implementation of univariate local polynomial kernel density estimators that can handle bounded and discrete data. See Geenens (2014) <arXiv:1303.4121>, Geenens and Wang (2018) <arXiv:1602.04862>, Nagler (2018a) <arXiv:1704.07457>, Nagler (2018b) <arXiv:1705.05431>.
# License: MIT + file LICENSE
# Encoding: UTF-8
# LinkingTo: BH, Rcpp, RcppEigen
# Imports: graphics, Rcpp, randtoolbox, stats, utils
# RoxygenNote: 7.1.2
# Suggests: testthat
# URL: https://github.com/tnagler/kde1d
# BugReports: https://github.com/tnagler/kde1d/issues
# SystemRequirements: C++11
# NeedsCompilation: yes
# Packaged: 2022-03-17 00:25:12 UTC; n5
# Author: Thomas Nagler [aut, cre], Thibault Vatter [aut]
# Maintainer: Thomas Nagler <mail@tnagler.com>
# Repository: CRAN
# Date/Publication: 2022-03-17 00:50:02 UTC
