{% set version = '0.1-40' %}

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

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

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


  sha256: afaca1d4712aa977028215d968c71c20c7de5663b2ce51cc217091af91c625b6

build:
  number: 0

  rpaths:
    - lib/R/lib/
    - lib/
  skip: True  # [win32]


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

  run:
    - r-base

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



about:
  home: https://CRAN.R-project.org/package=slam
  license: GPL-2
  summary: Data structures and algorithms for sparse arrays and matrices, based on index arrays
    and simple triplet representations, respectively.
  license_family: GPL2



extra:
  recipe-maintainers:
    - croth1
