{% set version = '1.9.0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/commonmark_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/commonmark/commonmark_{{ version }}.tar.gz
  sha256: 6dd01a5a26c8d436486abf69c2f6ad0f8dd1c811f575c31983aeb4dbd376548f

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: curl, testthat, xml2
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:
    # You can put additional test commands to be run here.
    - $R -e "library('commonmark')"           # [not win]
    - "\"%R%\" -e \"library('commonmark')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://docs.ropensci.org/commonmark/ https://r-lib.r-universe.dev/commonmark https://github.github.com/gfm/
    (spec)
  license: BSD_2_clause
  summary: The CommonMark specification defines a rationalized version of markdown syntax. This
    package uses the 'cmark' reference implementation for converting markdown text into
    various formats including html, latex and groff man. In addition it exposes the
    markdown parse tree in xml format. Also includes opt-in support for GFM extensions
    including tables, autolinks, and strikethrough text.
  license_family: BSD
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/BSD_2_clause'
    - LICENSE

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: commonmark
# Type: Package
# Title: High Performance CommonMark and Github Markdown Rendering in R
# Version: 1.9.0
# Authors@R: c( person("Jeroen", "Ooms", ,"jeroen@berkeley.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-4035-0289")), person("John MacFarlane", role = "cph", comment = "Author of cmark"))
# URL: https://docs.ropensci.org/commonmark/ https://r-lib.r-universe.dev/commonmark https://github.github.com/gfm/ (spec)
# BugReports: https://github.com/r-lib/commonmark/issues
# Description: The CommonMark specification defines a rationalized version of markdown syntax. This package uses the 'cmark' reference implementation for converting markdown text into various formats including html, latex and groff man. In addition it exposes the markdown parse tree in xml format. Also includes opt-in support for GFM extensions including tables, autolinks, and strikethrough text.
# License: BSD_2_clause + file LICENSE
# Suggests: curl, testthat, xml2
# RoxygenNote: 7.2.3
# Language: en-US
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2023-03-17 18:02:44 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), John MacFarlane [cph] (Author of cmark)
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2023-03-17 18:40:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
