{% set version = '0.6.1' %}

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

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

source:
  fn: pander_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/pander_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/pander/pander_{{ version }}.tar.gz
  sha256: f79e4c1f807d9c6b257c79c61978939b938c0fdd55875524274f3a1d43b3b3ab

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-rcpp
    - r-digest
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]
  run:
    - r-base
    - r-rcpp
    - r-digest
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=pander
  license: AGPL-3
  summary: "Contains some functions catching all messages, 'stdout' and other useful information
    while evaluating R code and other helpers to return user specified text elements (like: header,
    paragraph, table, image, lists etc.) in 'pandoc' markdown or several type of R objects similarly
    automatically transformed to markdown format. Also capable of exporting/converting (the resulting)
    complex 'pandoc' documents to e.g. HTML, 'PDF', 'docx' or 'odt'.  This latter reporting feature is
    supported in brew syntax or with a custom reference class with a smarty caching 'backend'."
  license_family: AGPL

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