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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RcppNumerical_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RcppNumerical/RcppNumerical_{{ version }}.tar.gz
  sha256: 33e659b65b1ec05034d4f3c3fa204df396e476e49dcd3e43b650c66a287622a9

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]
  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:
    - conda-forge/r

# Package: RcppNumerical
# Type: Package
# Title: 'Rcpp' Integration for Numerical Computing Libraries
# Version: 0.3-3
# Date: 2019-06-10
# Authors@R: c( person("Yixuan", "Qiu", , "yixuan.qiu@cos.name", c("aut", "cre")), person("Sreekumar", "Balan", role = "aut", comment = "Numerical integration library"), person("Matt", "Beall", role = "aut", comment = "Numerical integration library"), person("Mark", "Sauder", role = "aut", comment = "Numerical integration library"), person("Naoaki", "Okazaki", role = "aut", comment = "The libLBFGS library"), person("Thomas", "Hahn", role = "aut", comment = "The Cuba library") )
# Maintainer: Yixuan Qiu <yixuan.qiu@cos.name>
# Description: A collection of open source libraries for numerical computing (numerical integration, optimization, etc.) and their integration with 'Rcpp'.
# License: GPL (>= 2)
# Copyright: See file COPYRIGHTS
# URL: https://github.com/yixuan/RcppNumerical
# BugReports: https://github.com/yixuan/RcppNumerical/issues
# LazyData: TRUE
# Imports: Rcpp
# LinkingTo: Rcpp, RcppEigen
# Suggests: knitr, rmarkdown, prettydoc, mvtnorm, RcppEigen
# VignetteBuilder: knitr, rmarkdown
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-06-11 01:40:53 UTC; qyx
# Author: Yixuan Qiu [aut, cre], Sreekumar Balan [aut] (Numerical integration library), Matt Beall [aut] (Numerical integration library), Mark Sauder [aut] (Numerical integration library), Naoaki Okazaki [aut] (The libLBFGS library), Thomas Hahn [aut] (The Cuba library)
# Repository: CRAN
# Date/Publication: 2019-06-11 04:30:17 UTC
