{% set version = '0.10.2' %}

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

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

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

  sha256: 6c4222bc7e9cefbdabdc2e4336d851f3939b22d01b26c77ab49e8bb77e3dfd55

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://cran.r-project.org/web/packages/ArgumentCheck/index.html
  license: GPL-3
  summary: The typical process of checking arguments in functions is iterative.  In this process,
    an error may be returned and the user may fix it only to receive another error on
    a different argument.  'ArgumentCheck' facilitates a more helpful way to perform
    argument checks allowing the programmer to run all of the checks and then return
    all of the errors and warnings in a single message.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}\/lib\/R\/share\/licenses\/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
