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

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

source:
  fn: markdown_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/markdown_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/markdown/markdown_{{ version }}.tar.gz
  sha256: 538fd912b2220f2df344c6cca58304ce11e0960de7bd7bd573b3385105d48fed

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-mime >=0.3
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-mime >=0.3
    - xorg-libxrender 0.9.10

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

about:
  home: https://github.com/rstudio/markdown
  license: GPL-2
  summary: Provides R bindings to the 'Sundown' 'Markdown' rendering library (https://github.com/vmg/sundown).
    'Markdown' is a plain-text formatting syntax that can be converted to 'XHTML' or
    other formats. See http://en.wikipedia.org/wiki/Markdown for more information about
    'Markdown'.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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