{% set version = "2.9.12" %}

package:
  name: libxml2
  version: {{ version }}

source:
  url: http://xmlsoft.org/sources/libxml2-{{ version }}.tar.gz
  sha256: c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92
  patches:
    - 0002-Make-and-install-a-pkg-config-file-on-Windows.patch
    - 0004-CVE-2017-8872.patch

build:
  number: 0
  run_exports:
    # remove symbols at minor versions.
    #    https://abi-laboratory.pro/tracker/timeline/libxml2/
    - {{ pin_subpackage('libxml2', max_pin='x.x') }}

requirements:
  build:
    - libtool  # [unix]
    - {{ compiler('c') }}
    - autoconf  # [not win]
    - automake  # [not win]
    - libtool  # [not win]
    - pkg-config  # [not win]
    - make  # [not win]
    - m2-patch  # [win]
  host:
    - icu  # [not win]
    - libiconv
    - xz  # [not win]
    - zlib
  run:
    - icu  # [not win]
    - libiconv
    - xz  # [not win]
    - zlib

test:
  files:
    - test.xml
  commands:
    - xmllint test.xml

about:
  home: http://xmlsoft.org/
  license: MIT
  license_family: MIT
  license_file: Copyright
  summary: The XML C parser and toolkit of Gnome
  description: |
    Though libxml2 is written in C a variety of language
    bindings make it available in other environments.
  doc_url: http://xmlsoft.org/html/index.html
  doc_source_url: https://github.com/GNOME/libxml2/blob/master/doc/index.html
  dev_url: https://git.gnome.org/browse/libxml2/

extra:
  recipe-maintainers:
    - ocefpaf
    - jakirkham
    - gillins
    - jschueller
    - msarahan
    - scopatz
