{% set version = '1.4.3' %}

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

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

source:
  fn: CompQuadForm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/CompQuadForm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/CompQuadForm/CompQuadForm_{{ version }}.tar.gz
  sha256: 042fc56c800dd8f5f47a017e2efa832caf74f0602824abf7099898d9708660c4

build:
  merge_build_host: True  # [win]
  number: 1003
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=CompQuadForm
  license: GPL (>= 2)
  summary: Computes the distribution function of quadratic forms in normal variables using Imhof's
    method, Davies's algorithm, Farebrother's algorithm or Liu et al.'s algorithm.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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