{% set version = '0.6' %}

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

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

source:
  fn: highr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/highr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/highr/highr_{{ version }}.tar.gz
  sha256: 43e152b2dea596df6e14c44398c74fcd438ece15eaae5bdb84aef8d61b213b59

build:
  number: 0
  skip: true  # [win32]

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/yihui/highr
  license: GPL
  summary: |
    Provides syntax highlighting for R source code. Currently it supports LaTeX and HTML
    output. Source code of other languages is supported via Andre Simon's highlight
    package (http://www.andre-simon.de).
  license_family: GPL

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
