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

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

source:
  fn: readr_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/readr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/readr/readr_{{ version }}.tar.gz
  sha256: 33f94de39bb7f2a342fbb2bd4e5afcfec08798eac39672ee18042ac0b349e4f3

build:
  merge_build_host: True  # [win]
  number: 1000
  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.5
    - r-tibble
    - r-hms >=0.4.1
    - r-r6
    - r-clipr
    - r-crayon
    - r-bh
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp >=0.12.0.5
    - r-tibble
    - r-hms >=0.4.1
    - r-r6
    - r-clipr
    - r-crayon    
    - r-bh

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

about:
  home: http://readr.tidyverse.org, https://github.com/tidyverse/readr
  license: GPL (>= 2)
  summary: The goal of 'readr' is to provide a fast and friendly way to read rectangular data
    (like 'csv', 'tsv', and 'fwf'). It is designed to flexibly parse many types of data
    found in the wild, while still cleanly failing when data unexpectedly changes.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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