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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/MCMCglmm_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/MCMCglmm/MCMCglmm_{{ version }}.tar.gz
  sha256: a9156e1e0d0f912f2f239476dc8765dc61c480f903381be7ec5db05bd6d3f0b3

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-matrix
    - r-ape
    - r-coda
    - r-corpcor
    - r-cubature
    - r-tensora
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-ape
    - r-coda
    - r-corpcor
    - r-cubature
    - r-tensora

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

about:
  home: https://CRAN.R-project.org/package=MCMCglmm
  license: GPL-2.0-or-later
  summary: 'MCMC Generalised Linear Mixed Models. '
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - nick-youngblut
    - conda-forge/r

# Package: MCMCglmm
# Version: 2.29
# Date: 2019-04-16
# Title: MCMC Generalised Linear Mixed Models
# Depends: Matrix, coda, ape
# Imports: corpcor, tensorA, cubature, methods
# Suggests: rgl, combinat, mvtnorm, orthopolynom
# Author: Jarrod Hadfield
# Maintainer: Jarrod Hadfield <j.hadfield@ed.ac.uk>
# Description: MCMC Generalised Linear Mixed Models.
# License: GPL (>= 2)
# SystemRequirements: C++11
# NeedsCompilation: yes
# Packaged: 2019-04-17 15:03:49 UTC; jhadfiel
# Repository: CRAN
# Date/Publication: 2019-04-24 10:50:07 UTC
