{% set version = '0.999-2' %}

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

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

source:
  fn: expm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/expm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/expm/expm_{{ version }}.tar.gz
  sha256: 38f1e5bfa90f794486789695d0d9e49158c7eb9445dc171dd83dec3d8fa130d6

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

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

requirements:
  build:
    - r-base
    - r-matrix
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-matrix
    - libgcc  # [not win]

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

about:
  home: http://R-Forge.R-project.org/projects/expm/
  license: GPL (>= 2)
  summary: Computation of the matrix exponential, logarithm, sqrt, and related quantities.
  license_family: GPL3

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