{% set version = '0.1.6' %}

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

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

source:
  fn: rlang_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rlang_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rlang/rlang_{{ version }}.tar.gz
  sha256: 772273e4f82ec33ffd28bf87bc44abbde2a6fb4b00e5723068ec5464b556c2f4

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('rlang')"  # [not win]
    - "\"%R%\" -e \"library('rlang')\""  # [win]

about:
  home: http://rlang.tidyverse.org
  dev_url: https://github.com/tidyverse/rlang
  license: GPL-3
  summary: A toolbox for working with base types, core R features like the condition system,
    and core 'Tidyverse' features like tidy evaluation.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
