blob: c5e0ae6769735bebac81b52cb67ea0605aa288f7 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "XML::Parser - A perl module for parsing XML documents"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "https://libexpat.github.io/"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003SECTION = "libs"
4LICENSE = "Artistic-1.0 | GPL-1.0+"
5LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1"
6
Patrick Williamsc0f7c042017-02-23 20:41:17 -06007DEPENDS += "expat"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008
9SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
10SRC_URI[md5sum] = "af4813fe3952362451201ced6fbce379"
11SRC_URI[sha256sum] = "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216"
12
13S = "${WORKDIR}/XML-Parser-${PV}"
14
15EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
16
Brad Bishop316dfdd2018-06-25 12:45:53 -040017inherit cpan ptest-perl
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
19# fix up sub MakeMaker project as arguments don't get propagated though
20# see https://rt.cpan.org/Public/Bug/Display.html?id=28632
21do_configure_append() {
22 sed 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' -i Makefile Expat/Makefile
23 sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile
Brad Bishop6e60e8b2018-02-01 10:27:11 -050024 # make sure these two do not build in parallel
25 sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i Expat/Makefile
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026}
27
28do_compile() {
29 export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
30 cpan_do_compile
31}
32
33do_compile_class-native() {
34 cpan_do_compile
35}
36
Brad Bishop316dfdd2018-06-25 12:45:53 -040037do_install_ptest() {
38 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
39 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
40 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
41 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
42 cp -r ${B}/samples ${D}${PTEST_PATH}
43 chown -R root:root ${D}${PTEST_PATH}/samples
44}
45
Brad Bishop6e60e8b2018-02-01 10:27:11 -050046BBCLASSEXTEND="native nativesdk"