{% set version = '1.07' %}

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

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

source:
  fn: BiasedUrn_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/BiasedUrn_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/BiasedUrn/BiasedUrn_{{ version }}.tar.gz
  sha256: 2377c2e59d68e758a566452d7e07e88663ae61a182b9ee455d8b4269dda3228e

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('BiasedUrn')"  # [not win]
    - "\"%R%\" -e \"library('BiasedUrn')\""  # [win]

about:
  home: http://www.agner.org/random/ http://www.r-project.org
  license: GPL-3
  summary: Statistical models of biased sampling in the form of  univariate and multivariate
    noncentral hypergeometric distributions,  including Wallenius' noncentral hypergeometric
    distribution and Fisher's noncentral hypergeometric distribution  (also called extended
    hypergeometric distribution).   See vignette("UrnTheory") for explanation of these
    distributions.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
