{% set version = '0.1-3-2' %}

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

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

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

  sha256: f7024e73274e1e76a870ce5e26bd58f76e8f6df0aa9775c631b861d83f4f53d7

build:
  number: 0

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

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

  run:
    - r-base >=3.4.1
    - libgcc  # [not win]

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

about:
  home: https://github.com/gitlongor/uniqueAtomMat
  license: GPL (>= 2)
  summary: 'An alternative implementation of base::duplicated.matrix(), base:anyDuplicated.matrix()
    and base::unique.matrix() for matrices of atomic mode, avoiding the time consuming
    collapse of the matrix into a character vector. An extra grpDuplicated() function
    is added, which groups duplicated elements together. '

  license_family: GPL3
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
