{% set version = '1.3.5' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/xml2_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/xml2/xml2_{{ version }}.tar.gz
  sha256: 3d6a10a7ab76e0cc024b73d3fb8af65a662efe0e707681d9ffc2b3ff1f09e282

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: covr, curl, httr, knitr, magrittr, mockery, rmarkdown, testthat (>= 2.1.0)
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - libxml2

  run:
    - r-base
    - libxml2
    - {{native}}gcc-libs         # [win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('xml2')"           # [not win]
    - "\"%R%\" -e \"library('xml2')\""  # [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://xml2.r-lib.org/, https://github.com/r-lib/xml2
  license: MIT
  summary: Work with XML files using a simple, consistent interface. Built on top of the 'libxml2'
    C library.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# The original CRAN metadata for this package was:

# Package: xml2
# Title: Parse XML
# Version: 1.3.5
# Authors@R: c( person("Hadley", "Wickham", , "hadley@rstudio.com", role = c("aut", "cre")), person("Jim", "Hester", role = "aut"), person("Jeroen", "Ooms", role = "aut"), person("RStudio", role = c("cph", "fnd")), person("R Foundation", role = "ctb", comment = "Copy of R-project homepage cached as example") )
# Description: Work with XML files using a simple, consistent interface. Built on top of the 'libxml2' C library.
# License: MIT + file LICENSE
# URL: https://xml2.r-lib.org/, https://github.com/r-lib/xml2
# BugReports: https://github.com/r-lib/xml2/issues
# Depends: R (>= 3.1.0)
# Imports: methods
# Suggests: covr, curl, httr, knitr, magrittr, mockery, rmarkdown, testthat (>= 2.1.0)
# VignetteBuilder: knitr
# Config/Needs/website: tidyverse/tidytemplate
# Encoding: UTF-8
# RoxygenNote: 7.2.3
# SystemRequirements: libxml2: libxml2-dev (deb), libxml2-devel (rpm)
# Collate: 'S4.R' 'as_list.R' 'xml_parse.R' 'as_xml_document.R' 'classes.R' 'init.R' 'paths.R' 'utils.R' 'xml_attr.R' 'xml_children.R' 'xml_find.R' 'xml_modify.R' 'xml_name.R' 'xml_namespaces.R' 'xml_path.R' 'xml_schema.R' 'xml_serialize.R' 'xml_structure.R' 'xml_text.R' 'xml_type.R' 'xml_url.R' 'xml_write.R' 'zzz.R'
# NeedsCompilation: yes
# Packaged: 2023-06-29 13:52:10 UTC; hadleywickham
# Author: Hadley Wickham [aut, cre], Jim Hester [aut], Jeroen Ooms [aut], RStudio [cph, fnd], R Foundation [ctb] (Copy of R-project homepage cached as example)
# Maintainer: Hadley Wickham <hadley@rstudio.com>
# Repository: CRAN
# Date/Publication: 2023-07-06 08:00:02 UTC

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