{% set version = "1.2.0" %}

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

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

source:
  fn: glue_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/glue_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/glue/glue_{{ version }}.tar.gz
  sha256: 19275b34ee6a1bcad05360b7eb996cebaa1402f189a5dfb084e695d423f2296e

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

about:
  home: https://github.com/tidyverse/glue
  license: MIT
  summary: An implementation of interpreted string literals, inspired by Python's Literal String
    Interpolation <https://www.python.org/dev/peps/pep-0498/> and Docstrings <https://www.python.org/dev/peps/pep-0257/>
    and Julia's Triple-Quoted String Literals <https://docs.julialang.org/en/stable/manual/strings/#triple-quoted-string-literals>.
  license_family: MIT

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