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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/BayesFactor_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/BayesFactor/BayesFactor_{{ version }}.tar.gz
  sha256: 6fe8d19113084b1bb278daa824603db5b93ee02d55a24214a82f081dcf1e08fc

build:
  merge_build_host: True  # [win]
  number: 1002
  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 >=1.1_1
    - r-matrixmodels
    - r-rcpp >=0.11.2
    - r-rcppeigen >=0.3.2.2.0
    - r-coda
    - r-gtools
    - r-hypergeo
    - r-mvtnorm
    - r-pbapply
    - r-stringr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix >=1.1_1
    - r-matrixmodels
    - r-rcpp >=0.11.2
    - r-rcppeigen >=0.3.2.2.0
    - r-coda
    - r-gtools
    - r-hypergeo
    - r-mvtnorm
    - r-pbapply
    - r-stringr

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

about:
  home: https://richarddmorey.github.io/BayesFactor/
  license: GPL-2.0-only
  summary: A suite of functions for computing various Bayes factors for simple designs, including
    contingency tables, one- and two-sample designs, one-way designs, general ANOVA
    designs, and linear regression.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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