{% set version = '0.9.5' %}

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

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

source:
  fn: grr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/grr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/grr/grr_{{ version }}.tar.gz
  sha256: 292606de2983ac5840c90d3e0977441b482c9e73c1674b662f8b4fb8f3632b2b

build:
  number: 0
  skip: true  # [win32]

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

  run:
    - r-base
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=grr
  license: GPL-3
  summary: Alternative implementations of some base R functions, including sort, order, and match.  Functions
    are simplified but can be faster or have other advantages.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - roryk
