{% set version = '0.9-5' %}

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

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

source:
  fn: mcmc_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/mcmc_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/mcmc/mcmc_{{ version }}.tar.gz
  sha256: c676ae0006a52fb527e9dbd3af0684943c3af157d34aaf5b89705d042f5479c4

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

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

  run:
    - r-base
    - {{native}}gcc-libs   # [win]
    - libgcc               # [not win]

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

about:
  home: http://www.stat.umn.edu/geyer/mcmc/, https://github.com/cjgeyer/mcmc
  license: MIT
  summary: Simulates continuous distributions of random vectors using Markov chain Monte Carlo
    (MCMC).  Users specify the distribution by an R function that evaluates the log
    unnormalized density.  Algorithms are random walk Metropolis algorithm (function
    metrop), simulated tempering (function temper), and morphometric random walk Metropolis
    (Johnson and Geyer, 2012, <https://doi.org/10.1214/12-AOS1048>, function morph.metrop),
    which achieves geometric ergodicity by change of variable.
  license_family: MIT

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