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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RSpectra_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RSpectra/RSpectra_{{ version }}.tar.gz
  sha256: cba5d3403d6a7d0e27abf6279fbfea6e0d0fe36b28c688bbadb8eafb3841329a

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-matrix                   # [build_platform != target_platform]
    - r-rcppeigen                # [build_platform != target_platform]
    - r-rcpp                     # [build_platform != target_platform]
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - libblas
    - liblapack
    - r-base
    - r-matrix >=1.1_0
    - r-rcpp >=0.11.5
    - r-rcppeigen >=0.3.3.3.0
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix >=1.1_0
    - r-rcpp >=0.11.5
    - r-rcppeigen >=0.3.3.3.0

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

about:
  home: https://github.com/yixuan/RSpectra
  license: MPL (>= 2)
  summary: R interface to the 'Spectra' library <https://spectralib.org/> for large-scale eigenvalue and SVD problems. It is typically used to compute a few eigenvalues/vectors of an n by n matrix, e.g., the k largest eigenvalues, which is usually more efficient than eigen() if k << n. This package provides the 'eigs()'
    function that does the similar job as in 'Matlab', 'Octave', 'Python SciPy' and 'Julia'. It also provides the 'svds()' function to calculate the largest k singular values and corresponding singular vectors of a real matrix. The matrix to be computed on can be dense, sparse, or in the form of an operator defined by the
    user.
  license_family: OTHER

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

# Package: RSpectra
# Type: Package
# Title: Solvers for Large-Scale Eigenvalue and SVD Problems
# Version: 0.15-0
# Date: 2019-06-10
# Authors@R: c( person("Yixuan", "Qiu", , "yixuan.qiu@cos.name", c("aut", "cre")), person("Jiali", "Mei", , "vermouthmjl@gmail.com", "aut", comment = "Function interface of matrix operation"), person("Gael", "Guennebaud", , "gael.guennebaud@inria.fr", "ctb", comment = "Eigenvalue solvers from the 'Eigen' library"), person("Jitse", "Niesen", , "jitse@maths.leeds.ac.uk", "ctb", comment = "Eigenvalue solvers from the 'Eigen' library") )
# Description: R interface to the 'Spectra' library <https://spectralib.org/> for large-scale eigenvalue and SVD problems. It is typically used to compute a few eigenvalues/vectors of an n by n matrix, e.g., the k largest eigenvalues, which is usually more efficient than eigen() if k << n. This package provides the 'eigs()' function that does the similar job as in 'Matlab', 'Octave', 'Python SciPy' and 'Julia'. It also provides the 'svds()' function to calculate the largest k singular values and corresponding singular vectors of a real matrix. The matrix to be computed on can be dense, sparse, or in the form of an operator defined by the user.
# License: MPL (>= 2)
# URL: https://github.com/yixuan/RSpectra
# BugReports: https://github.com/yixuan/RSpectra/issues
# Depends: R (>= 3.0.2)
# Imports: Matrix (>= 1.1-0), Rcpp (>= 0.11.5)
# Suggests: knitr, rmarkdown, prettydoc
# LinkingTo: Rcpp, RcppEigen (>= 0.3.3.3.0)
# VignetteBuilder: knitr, rmarkdown
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-06-10 19:19:24 UTC; qyx
# Author: Yixuan Qiu [aut, cre], Jiali Mei [aut] (Function interface of matrix operation), Gael Guennebaud [ctb] (Eigenvalue solvers from the 'Eigen' library), Jitse Niesen [ctb] (Eigenvalue solvers from the 'Eigen' library)
# Maintainer: Yixuan Qiu <yixuan.qiu@cos.name>
# Repository: CRAN
# Date/Publication: 2019-06-11 04:30:26 UTC
