{% set version = '1.0.4' %}

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

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

source:
  fn: XNomial_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/XNomial_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/XNomial/XNomial_{{ version }}.tar.gz

  sha256: e6237f79d96f02bb30af1cf055ae9f70541abba34ce045a9d4359b5304189dd7

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
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=XNomial
  license: GPL
  summary: Tests whether a set of counts fit a given expected ratio. For example, a genetic cross
    might be expected to produce four types in the relative frequencies of 9
  license_family: GPL
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
