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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/hdrcde_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/hdrcde/hdrcde_{{ version }}.tar.gz
  sha256: 4b9d3f845e1e652f47413d33be35fa2b2edab3385a4e64c06201d7c1085f5830

build:
  merge_build_host: True  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('fortran') }}  # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed  # [win]
    - {{posix}}coreutils  # [win]
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-kernsmooth
    - r-rcolorbrewer
    - r-ash
    - r-ggplot2
    - r-ks
    - r-locfit
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-kernsmooth
    - r-rcolorbrewer
    - r-ash
    - r-ggplot2
    - r-ks
    - r-locfit

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

about:
  home: https://github.com/robjhyndman/hdrcde
  license: GPL-3
  summary: Computation of highest density regions in one and two dimensions, kernel estimation
    of univariate density functions conditional on one covariate, and multimodal regression.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
