{% set version = '0.3-2' %}

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

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

source:
  fn: RcppNumerical_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/RcppNumerical_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RcppNumerical/RcppNumerical_{{ version }}.tar.gz
  sha256: 3f7ffd7144ffbdddf6e93b0e1c8f508ca56a187467fed1bf9850b5b834df1048

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

# Suggests: knitr, rmarkdown, prettydoc, mvtnorm, RcppEigen
requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-rcpp
    - r-rcppeigen
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp
    - r-rcppeigen

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

about:
  home: https://github.com/yixuan/RcppNumerical
  license: GPL (>= 2)
  summary: A collection of open source libraries for numerical computing (numerical integration,
    optimization, etc.) and their integration with 'Rcpp'.
  license_family: GPL3
  license_file: inst/COPYRIGHTS

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