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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/MESS_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/MESS/MESS_{{ version }}.tar.gz
  sha256: b57dff943a130830a24d87fe2e8f8b766cf18398c9c09e0a020d5dd183f9d72d

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-mass
    - r-matrix
    - r-rcpp
    - r-rcpparmadillo
    - r-geem
    - r-geepack
    - r-ggformula
    - r-ggplot2
    - r-glmnet
    - r-kinship2
    - r-mvtnorm
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-mass
    - r-matrix
    - r-rcpp
    - r-rcpparmadillo
    - r-geem
    - r-geepack
    - r-ggformula
    - r-ggplot2
    - r-glmnet
    - r-kinship2
    - r-mvtnorm

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

about:
  home: https://github.com/ekstroem/MESS
  license: GPL-2.0-only
  summary: A mixed collection of useful and semi-useful diverse statistical functions, some of which may even be referenced in The R Primer book.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
    - npavlovikj
