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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rstan_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rstan/rstan_{{ version }}.tar.gz
  sha256: 86e4fe562d8ddcd0b02336f35a420fa8786dd21de7ca2bebb4ed6e9c252bb9ea

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-bh >=1.72.0_2
    - r-rcpp >=0.12.0
    - r-rcppeigen >=0.3.3.3.0
    - r-rcppparallel >=5.0.1
    - r-stanheaders >=2.21.0
    - r-v8
    - r-ggplot2 >=3.0.0
    - r-gridextra >=2.0.0
    - r-inline
    - r-loo >=2.3.0
    - r-pkgbuild
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.12.0
    - r-rcppeigen >=0.3.3.3.0
    - r-rcppparallel >=5.0.1
    - r-stanheaders >=2.21.0
    - r-v8
    - r-ggplot2 >=3.0.0
    - r-gridextra >=2.0.0
    - r-inline
    - r-loo >=2.3.0
    - r-pkgbuild
    - r-withr

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

about:
  home: http://discourse.mc-stan.org, http://mc-stan.org
  license: GPL-3.0-or-later
  summary: User-facing R functions are provided to parse, compile, test, estimate, and analyze Stan models by accessing the header-only Stan library provided by the 'StanHeaders' package. The Stan project develops a probabilistic programming language that implements full Bayesian statistical inference via Markov Chain Monte
    Carlo, rough Bayesian inference via 'variational' approximation, and (optionally penalized) maximum likelihood estimation via optimization. In all three cases, automatic differentiation is used to quickly and accurately evaluate gradients without burdening the user with the need to derive the partial derivatives.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - conda-forge/r
    - rluria14
    - oblute
    - ndmaxar

# Package: rstan
# Encoding: UTF-8
# Type: Package
# Title: R Interface to Stan
# Version: 2.19.2
# Date: 2019-07-08
# Authors@R: c(person("Jiqiang", "Guo", email = "guojq28@gmail.com", role = "aut"), person("Jonah", "Gabry", email = "jsg2201@columbia.edu", role = "aut"), person("Ben", "Goodrich", email = "benjamin.goodrich@columbia.edu", role = c("cre", "aut")), person("Daniel", "Lee", role = "ctb"), person("Krzysztof", "Sakrejda", role = "ctb"), person("Modrak", "Martin", role = "ctb"), person("Trustees of", "Columbia University", role = "cph"), person("Oleg", "Sklyar", role = "cph", comment = "R/cxxfunplus.R"), person("The R", "Core Team", role = "cph", comment = "R/pairs.R, R/dynGet.R"), person("Jens", "Oehlschlaegel-Akiyoshi", role = "cph", comment = "R/pairs.R"))
# Description: User-facing R functions are provided to parse, compile, test, estimate, and analyze Stan models by accessing the header-only Stan library provided by the 'StanHeaders' package. The Stan project develops a probabilistic programming language that implements full Bayesian statistical inference via Markov Chain Monte Carlo, rough Bayesian inference via 'variational' approximation, and (optionally penalized) maximum likelihood estimation via optimization. In all three cases, automatic differentiation is used to quickly and accurately evaluate gradients without burdening the user with the need to derive the partial derivatives.
# License: GPL (>= 3)
# NeedsCompilation: yes
# Imports: methods, stats4, inline, gridExtra (>= 2.0.0), Rcpp (>= 0.12.0), loo (>= 2.0.0), pkgbuild
# Depends: R (>= 3.4.0), StanHeaders (> 2.18.1), ggplot2 (>= 2.0.0)
# LinkingTo: Rcpp (>= 0.12.0), RcppEigen (>= 0.3.3.3.0), BH (>= 1.69.0), StanHeaders (> 2.18.1)
# Suggests: RUnit, RcppEigen (>= 0.3.3.3.0), BH (>= 1.66), parallel, KernSmooth, shinystan (>= 2.3.0), bayesplot (>= 1.5.0), rmarkdown, rstantools, rstudioapi, Matrix, knitr (>= 1.15.1)
# URL: http://discourse.mc-stan.org, http://mc-stan.org
# BugReports: https://github.com/stan-dev/rstan/issues/
# VignetteBuilder: knitr
# SystemRequirements: GNU make, pandoc
# RoxygenNote: 5.0.1
# Packaged: 2019-07-09 07:03:28 UTC; ben
# Author: Jiqiang Guo [aut], Jonah Gabry [aut], Ben Goodrich [cre, aut], Daniel Lee [ctb], Krzysztof Sakrejda [ctb], Modrak Martin [ctb], Trustees of Columbia University [cph], Oleg Sklyar [cph] (R/cxxfunplus.R), The R Core Team [cph] (R/pairs.R, R/dynGet.R), Jens Oehlschlaegel-Akiyoshi [cph] (R/pairs.R)
# Maintainer: Ben Goodrich <benjamin.goodrich@columbia.edu>
# Repository: CRAN
# Date/Publication: 2019-07-09 12:40:03 UTC
