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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/sparseinv_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sparseinv/sparseinv_{{ version }}.tar.gz
  sha256: 4aba659a3d50d5c40585211d607e24b9b9f304f5dbd393d879659d9a7afc361a

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-matrix
    - r-rcpp
    - r-spam
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix
    - r-rcpp
    - r-spam

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

about:
  home: https://CRAN.R-project.org/package=sparseinv
  license: GPL-2.0-or-later
  summary: Creates a wrapper for the 'SuiteSparse' routines  that execute the Takahashi equations. These equations compute the elements of the inverse of a sparse matrix at locations where the its Cholesky factor is structurally non-zero. The resulting matrix is known as a  sparse inverse subset. Some helper functions are
    also implemented.  Support for spam matrices is currently limited and will be implemented  in the future. See Rue and Martino (2007) <doi:10.1016/j.jspi.2006.07.016>  and Zammit-Mangion and Rougier (2018) <doi:10.1016/j.csda.2018.02.001> for the  application of these equations to statistics.
  license_family: GPL
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: sparseinv
# Type: Package
# Title: Computation of the Sparse Inverse Subset
# Version: 0.1.3
# Date: 2018-08-23
# Authors@R: c( person("Andrew", "Zammit-Mangion", , "andrewzm@gmail.com", c("aut", "cre")), person("Timothy", "Davis", , "davis@tamu.edu", role = "ctb"), person("Patrick","Amestoy", ,"Patrick.Amestoy@enseeiht.fr", role = "ctb"), person("Iain","Duff", ,"iain.duff@stfc.ac.uk", role = "ctb"), person("John K.","Reid", ,"John.Reid@stfc.ac.uk", role = "ctb"))
# Maintainer: Andrew Zammit-Mangion <andrewzm@gmail.com>
# Suggests: covr, testthat
# Imports: Matrix, methods, Rcpp, spam
# Description: Creates a wrapper for the 'SuiteSparse' routines  that execute the Takahashi equations. These equations compute the elements of the inverse of a sparse matrix at locations where the its Cholesky factor is structurally non-zero. The resulting matrix is known as a  sparse inverse subset. Some helper functions are also implemented.  Support for spam matrices is currently limited and will be implemented  in the future. See Rue and Martino (2007) <doi:10.1016/j.jspi.2006.07.016>  and Zammit-Mangion and Rougier (2018) <doi:10.1016/j.csda.2018.02.001> for the  application of these equations to statistics.
# Depends: R (>= 3.1)
# License: GPL (>= 2.1)
# NeedsCompilation: yes
# LazyData: true
# RoxygenNote: 6.0.1
# LinkingTo: Rcpp
# Packaged: 2018-08-23 02:17:27 UTC; andrew
# Author: Andrew Zammit-Mangion [aut, cre], Timothy Davis [ctb], Patrick Amestoy [ctb], Iain Duff [ctb], John K. Reid [ctb]
# Repository: CRAN
# Date/Publication: 2018-08-23 04:50:03 UTC
