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

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

source:
  fn: yaml_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/yaml_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/yaml/yaml_{{ version }}.tar.gz
  sha256: 1115b7bc2a397fa724956eec916df5160c600c99a3be186d21558dd38d782783

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://github.com/viking/r-yaml/
  license: BSD_3_clause
  license_file: 
    - LICENSE 
    - COPYING 

  summary: Implements the 'libyaml' 'YAML' 1.1 parser and emitter (<http://pyyaml.org/wiki/LibYAML>)
    for R.
  license_family: BSD

extra:
  recipe-maintainers:
    - conda-forge/r
    - croth1
    - bsennblad
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
