{% set version = '0.9.7' %}

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

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

source:
  fn: qlcMatrix_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/qlcMatrix_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/qlcMatrix/qlcMatrix_{{ version }}.tar.gz
  sha256: 1ef5e0350cfbdb07fca761fc7251584d39d3da2958ea813498b467e4f7661347

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-matrix >=1.1_0
    - r-docopt
    - r-slam >=0.1_32
    - r-sparsesvd
  run:
    - r-base
    - r-matrix >=1.1_0
    - r-docopt
    - r-slam >=0.1_32
    - r-sparsesvd

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

about:
  home: https://CRAN.R-project.org/package=qlcMatrix
  license: GPL-3
  summary: Extension of the functionality of the Matrix package for using sparse matrices. Some
    of the functions are very general, while other are highly specific for special data
    format as used for quantitative language comparison (QLC).
  license_family: GPL3

extra:
  recipe-maintainers:
    - dpryan79
    - johanneskoester
    - bgruening
