{%set name = 'pracma' %}
{%set version = '2.0.4' %}

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

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

source:
  fn: {{ name }}_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/{{ name }}_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/{{ name }}/{{ name }}_{{ version }}.tar.gz
  sha256: ccf30cabad9bafcc28ed1c8e5aa358b48b4f46224eb113624b77f33f2b4871fc

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

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

requirements:
  build:
    - r-base
    - r-quadprog

  run:
    - r-base
    - r-quadprog

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

about:
  home: https://CRAN.R-project.org/package=pracma
  license: GPL 3
  summary: ' Provides a large number of functions from numerical analysis and linear algebra,
    numerical optimization, differential equations, time series, plus some well-known
    special mathematical functions. Uses ''MATLAB'' function names where appropriate
    to simplify porting.'
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
