{% set version = '1.3-2' %}

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

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

source:
  fn: bdsmatrix_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/bdsmatrix_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/bdsmatrix/bdsmatrix_{{ version }}.tar.gz

  sha256: 9e5bf1f73302883a4495708853c560fcce1fe1f91c8bf160aa56870c2677109b

build:
  skip: true  # [win32]
  number: 0

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]
  run:
    - r-base

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

about:
  home: http://r-forge.r-project.org
  license: LGPL-2
  summary: This is a special case of sparse matrices, used by coxme.

  license_family: LGPL

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
