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

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

source:
  fn: geigen_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/geigen_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/geigen/geigen_{{ version }}.tar.gz
  sha256: c7ffb869afb8b439a8288addccaa645289b00b12a355f351572b5fc913278f2e

build:
  merge_build_host: True  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix                # [win]
    - {{ compiler('fortran') }}        # [unix]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=geigen
  license: GPL (>= 2)
  summary: Functions to compute generalized eigenvalues and eigenvectors, the generalized Schur
    decomposition and the generalized Singular Value Decomposition of a matrix pair,
    using Lapack routines.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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