{% set version = '1.5-6' %}

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

source:
  fn: magic_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/magic_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/magic/magic_{{ version }}.tar.gz
  sha256: 1b6c3f5bef0ddc28c4b68894051df5d9c0d4985d9e6ad81892369d0f7fe0298d

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

requirements:
  build:
    - r-base
    - r-abind
  run:
    - r-base
    - r-abind

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

about:
  home: https://CRAN.R-project.org/package=magic
  license: GPL-2
  summary: a collection of efficient, vectorized algorithms for the creation and investigation
    of magic squares and hypercubes, including a variety of functions for the manipulation
    and analysis of arbitrarily dimensioned arrays.  The package includes methods for
    creating normal magic squares of any order greater than 2.  The ultimate intention
    is for the package to be a computerized embodiment all magic square knowledge, including
    direct numerical verification of properties of magic squares (such as recent results
    on the determinant of odd-ordered semimagic squares).  Some antimagic functionality
    is included.  The package also serves as a rebuttal to the often-heard comment "I
    thought R was just for statistics".

extra:
  recipe-maintainers:
    - ocefpaf
