{% set version = "0.999-9" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/expm_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/expm/expm_{{ version }}.tar.gz
  sha256: 83a1234aca8d3c4f7c6a1101a8ce8b56aaca924e7283880fa2667b38948ffed4

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-matrix                   # [build_platform != target_platform]
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - libblas
    - liblapack
    - r-base
    - r-matrix
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix

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.0-or-later
  summary: Computation of the matrix exponential, logarithm, sqrt, and related quantities.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: expm
# Type: Package
# Title: Matrix Exponential, Log, 'etc'
# Version: 0.999-4
# Date: 2019-03-20
# Author: Vincent Goulet, Christophe Dutang, Martin Maechler, David Firth, Marina Shapira, Michael Stadelmann
# Contact: expm-developers@lists.R-forge.R-project.org
# Maintainer: Martin Maechler <maechler@stat.math.ethz.ch>
# Description: Computation of the matrix exponential, logarithm, sqrt, and related quantities.
# Depends: Matrix
# Imports: methods
# Suggests: RColorBrewer, sfsmisc, Rmpfr
# BuildResaveData: no
# License: GPL (>= 2)
# URL: http://R-Forge.R-project.org/projects/expm/
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2019-03-21 07:54:23 UTC; maechler
# Repository: CRAN
# Date/Publication: 2019-03-21 10:10:02 UTC
