{% set r_name = "abind" %}
{% set package = "r-" + r_name %}
{% set version = "1.4-5" %}


package:
  name: {{ package|lower }}
  version: {{ version.replace("-", "_") }}

source:
  fn: {{ r_name }}_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/{{ r_name }}_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/{{ r_name }}/{{ r_name }}_{{ version }}.tar.gz
  sha256: 3a3ace5afbcb86e56889efcebf3bf5c3bb042a282ba7cc4412d450bb246a3f2c

build:
  number: 0
  skip: True  # [win32]
  script: R CMD INSTALL --build .
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - posix  # [win64]
    - m2w64-toolchain  # [win64]
    - gcc  # [not win]
  run:
    - r-base

test:
  commands:
    - R -e "library('{{ r_name }}')"  # [not win]
    - R -e \"library('{{ r_name }}')\"  # [win]

about:
  home: https://cran.r-project.org/package=abind
  license: LGPL (>=2)
  summary: "Combine multidimensional arrays into a single array. This is a generalization of 'cbind' and 'rbind'. Works with vectors, matrices, and higher-dimensional arrays. Also provides functions 'adrop', 'asub', and 'afill' for manipulating, extracting and replacing data in arrays."

extra:
  recipe-maintainers:
    - qwhelan
