blob: 310d5bbc5684528091de6326c84faeb3987e0466 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "XML C Parser Library and Toolkit"
2DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
3HOMEPAGE = "http://www.xmlsoft.org/"
4BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
5SECTION = "libs"
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
8 file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
9 file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
10 file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
11
12DEPENDS =+ "zlib"
13
14SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
15 file://libxml-64bit.patch \
16 file://ansidecl.patch \
17 file://runtest.patch \
18 file://run-ptest \
19 file://libxml2-CVE-2014-0191-fix.patch \
20 file://python-sitepackages-dir.patch \
21 file://libxml-m4-use-pkgconfig.patch \
22 file://configure.ac-fix-cross-compiling-warning.patch \
23 file://0001-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050024 file://CVE-2015-7941-1-Stop-parsing-on-entities-boundaries-errors.patch \
25 file://CVE-2015-7941-2-Cleanup-conditional-section-error-handling.patch \
26 file://CVE-2015-8317-Fail-parsing-early-on-if-encoding-conversion-failed.patch \
27 file://CVE-2015-7942-Another-variation-of-overflow-in-Conditional-section.patch \
28 file://CVE-2015-7942-2-Fix-an-error-in-previous-Conditional-section-patch.patch \
29 file://0001-CVE-2015-8035-Fix-XZ-compression-support-loop.patch \
30 file://CVE-2015-7498-Avoid-processing-entities-after-encoding-conversion-.patch \
31 file://0001-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch \
32 file://CVE-2015-7499-1-Add-xmlHaltParser-to-stop-the-parser.patch \
33 file://CVE-2015-7499-2-Detect-incoherency-on-GROW.patch \
34 file://0001-Fix-a-bug-on-name-parsing-at-the-end-of-current-inpu.patch \
35 file://0001-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch \
36 file://0001-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch \
37 file://0001-CVE-2015-5312-Another-entity-expansion-issue.patch \
38 file://CVE-2015-8241.patch \
39 file://CVE-2015-8710.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040 "
41
42BINCONFIG = "${bindir}/xml2-config"
43
44inherit autotools pkgconfig binconfig-disabled pythonnative ptest
45
46RDEPENDS_${PN}-ptest += "python-core"
47
48RDEPENDS_${PN}-python += "python-core"
49
50RDEPENDS_${PN}-ptest_append_libc-glibc += "glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
51
52# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
53do_configure_prepend () {
54 sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.ac
55}
56
57export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
58
59PACKAGECONFIG ??= "python"
60
61PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python"
62# WARNING: zlib is require for RPM use
63EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
64EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
65EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
66EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
67
68# required for pythong binding
69export HOST_SYS
70export BUILD_SYS
71export STAGING_LIBDIR
72export STAGING_INCDIR
73
74export LDFLAGS += "-ldl"
75
76python populate_packages_prepend () {
77 # autonamer would call this libxml2-2, but we don't want that
78 if d.getVar('DEBIAN_NAMES', True):
79 d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
80}
81
82PACKAGES += "${PN}-utils ${PN}-python"
83
84FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
85FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
86FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
87FILES_${PN}-utils += "${bindir}/*"
88FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
89
90do_install_ptest () {
91 cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
92}
93
94BBCLASSEXTEND = "native nativesdk"