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

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

source:
  fn: hypergeo_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/hypergeo_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/hypergeo/hypergeo_{{ version }}.tar.gz
  sha256: 6d5b78353aad1d13091ccbeb340867dad7b9eb00d0e2185286dc7e13848f4d8e

build:
  merge_build_host: True  # [win]
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-contfrac >=1.1_9
    - r-desolve
    - r-elliptic >=1.3_5
  run:
    - r-base
    - r-contfrac >=1.1_9
    - r-desolve
    - r-elliptic >=1.3_5

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

about:
  home: https://CRAN.R-project.org/package=hypergeo
  license: GPL-2
  summary: The Gaussian hypergeometric function for complex numbers.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
