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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/hypergea_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/hypergea/hypergea_{{ version }}.tar.gz
  sha256: 81a061f9794f8cf2decfca6d992861b56db9d16ab1c764ad9003c939571125cc

build:
  merge_build_host: True  # [win]
  number: 1004
  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
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=hypergea
  license: GPL (>= 2)
  summary: Performs (exact) hypergeometric tests on IxJ and 2x2x2 contingency tables using parallelized
    C code.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - conda-forge/r
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
    - dpryan79
