{% set version = '2.15.0-1' %}

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

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

source:
  fn: StanHeaders_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/StanHeaders_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/StanHeaders/StanHeaders_{{ version }}.tar.gz
  sha256: eea2412909bba4bdf80fe7d2c62e9d248a20c3fc644fb0a09b892954dd386f48

build:
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/
  skip: True  # [win32]

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base

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



about:
  home: http://mc-stan.org/
  license: BSD_3_clause
  summary: The C++ header files of the Stan project are provided by this package, but it contains
    no R code, vignettes, or function documentation. There is a shared object containing
    part of the 'CVODES' library, but it is not accessible from R. 'StanHeaders' is
    only useful for developers who want to utilize the 'LinkingTo' directive of their
    package's DESCRIPTION file to build on the Stan library without incurring unnecessary
    dependencies. The Stan project develops a probabilistic programming language that
    implements full or approximate Bayesian statistical inference via Markov Chain Monte
    Carlo or 'variational' methods and implements (optionally penalized) maximum likelihood
    estimation via optimization. The Stan library includes an advanced automatic differentiation
    scheme, 'templated' statistical and linear algebra functions that can handle the
    automatically 'differentiable' scalar types (and doubles, 'ints', etc.), and a parser
    for the Stan language. The 'rstan' package provides user-facing R functions to parse,
    compile, test, estimate, and analyze Stan models.
  license_family: BSD
  license_file: LICENSE

extra:
  recipe-maintainers:
    - croth1
    - bgruening
    - johanneskoester
