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

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

source:
  fn: matrixStats_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/matrixStats_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/matrixStats/matrixStats_{{ version }}.tar.gz
  sha256: 8f0db4e181300a208b9aedbebfdf522a2626e6675d2662656efb8ba71b05a06f

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

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

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

about:
  home: https://github.com/HenrikBengtsson/matrixStats
  license: Artistic-2.0
  summary: High-performing functions operating on rows and columns of matrices, e.g. col / rowMedians(),
    col / rowRanks(), and col / rowSds().  Functions optimized per data type and for
    subsetted calculations such that both memory usage and processing time is minimized.  There
    are also optimized vector-based methods, e.g. binMeans(), madDiff() and weightedMedian().
  license_family: OTHER

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
