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

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

source:
  fn: tidyselect_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/tidyselect_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/tidyselect/tidyselect_{{ version }}.tar.gz
  sha256: 5cb30e56ad5c1ac59786969edc8d542a7a1735a129a474f585a141aefe6a2295

build:
  merge_build_host: True  # [win]
  number: 2
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-rcpp >=0.12.0
    - r-glue
    - r-purrr
    - r-rlang >=0.2.0
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp >=0.12.0
    - r-glue
    - r-purrr
    - r-rlang >=0.2.0

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

about:
  home: https://CRAN.R-project.org/package=tidyselect
  license: GPL-3
  summary: A backend for the selecting functions of the 'tidyverse'. It makes it easy to implement
    select-like functions in your own packages in a way that is consistent with other
    'tidyverse' interfaces for selection.
  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
    - cbrueffer
    - dbast
