{% set version = "1.3.0" %}
{% 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: d12aaf5bb25da4d7407840c6b8a580cc113e30ba187d87387587f14ece481b8d

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

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
    - r-rcpp
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp

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

about:
  home: https://xml2.r-lib.org/, https://github.com/r-lib/xml2
  license: GPL (>= 2)
  summary: Work with XML files using a simple, consistent interface. Built on top of the 'libxml2' C library.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: xml2
# Title: Parse XML
# Version: 1.2.2
# Authors@R:  c(person(given = "Hadley", family = "Wickham", role = "aut", email = "hadley@rstudio.com"), person(given = "Jim", family = "Hester", role = c("aut", "cre"), email = "jim.hester@rstudio.com"), person(given = "Jeroen", family = "Ooms", role = "aut"), person(given = "RStudio", role = "cph"), person(given = "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: GPL (>= 2)
# 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: Rcpp, methods
# Suggests: covr, curl, httr, knitr, magrittr, mockery, rmarkdown, testthat (>= 2.1.0)
# LinkingTo: Rcpp (>= 0.12.12)
# VignetteBuilder: knitr
# Encoding: UTF-8
# RoxygenNote: 6.1.1
# SystemRequirements: libxml2: libxml2-dev (deb), libxml2-devel (rpm)
# Collate: 'RcppExports.R' '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: 2019-08-06 20:54:39 UTC; jhester
# Author: Hadley Wickham [aut], Jim Hester [aut, cre], Jeroen Ooms [aut], RStudio [cph], R Foundation [ctb] (Copy of R-project homepage cached as example)
# Maintainer: Jim Hester <jim.hester@rstudio.com>
# Repository: CRAN
# Date/Publication: 2019-08-09 12:10:03 UTC
