{% set version = "1.20" %}

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

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

source:
  fn: knitr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/knitr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/knitr/knitr_{{ version }}.tar.gz
  sha256: 7b2409056af001970d1ed502a25fd84536aca4a21039479998507556446d0890
  
build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-digest
    - r-evaluate >=0.10
    - r-highr
    - r-markdown
    - r-stringr >=0.6
    - r-yaml

  run:
    - r-base
    - r-digest
    - r-evaluate >=0.10
    - r-highr
    - r-markdown
    - r-stringr >=0.6
    - r-yaml

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

about:
  home: http://yihui.name/knitr/
  license: GPL
  summary: Provides a general-purpose tool for dynamic report generation in R using Literate
    Programming techniques.
  license_family: GPL

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
