blob: 95af4d1de65fa682d34460a0a8d5688ea2a5e01d [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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080021do_configure_append_class-target() {
22 sed -E \
23 -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' \
24 -i Makefile Expat/Makefile
25}
26
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027do_configure_append() {
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028 sed -e 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' \
29 -i Makefile Expat/Makefile
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030 sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031 # make sure these two do not build in parallel
32 sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i Expat/Makefile
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033}
34
35do_compile() {
36 export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
37 cpan_do_compile
38}
39
40do_compile_class-native() {
41 cpan_do_compile
42}
43
Brad Bishop316dfdd2018-06-25 12:45:53 -040044do_install_ptest() {
45 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
46 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
47 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
48 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
49 cp -r ${B}/samples ${D}${PTEST_PATH}
50 chown -R root:root ${D}${PTEST_PATH}/samples
51}
52
Brad Bishop6e60e8b2018-02-01 10:27:11 -050053BBCLASSEXTEND="native nativesdk"