blob: 3b9206e9841524188f25b7d60cba22bee658fabd [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "XML::Parser - A perl module for parsing XML documents"
2HOMEPAGE = "https://libexpat.github.io/"
3SECTION = "libs"
4LICENSE = "Artistic-1.0 | GPL-1.0+"
5LIC_FILES_CHKSUM = "file://Parser.pm;beginline=1;endline=7;md5=d12cc778c80fc4c518f0e5dee29fd5fb"
6
7DEPENDS += "expat"
8
9SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz \
10 file://ptest-perl/run-ptest \
11 file://0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch \
12 "
13SRC_URI[md5sum] = "80bb18a8e6240fcf7ec2f7b57601c170"
14SRC_URI[sha256sum] = "d331332491c51cccfb4cb94ffc44f9cd73378e618498d4a37df9e043661c515d"
15
16S = "${WORKDIR}/XML-Parser-${PV}"
17
18EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'"
19
20inherit cpan ptest-perl
21
22# fix up sub MakeMaker project as arguments don't get propagated though
23# see https://rt.cpan.org/Public/Bug/Display.html?id=28632
Patrick Williams213cb262021-08-07 19:21:33 -050024do_configure:append:class-target() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050025 sed -E \
26 -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' \
27 -i Makefile Expat/Makefile
28}
29
Patrick Williams213cb262021-08-07 19:21:33 -050030do_configure:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050031 sed -e 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' \
32 -i Makefile Expat/Makefile
33 sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile
34 # make sure these two do not build in parallel
35 sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i Expat/Makefile
36}
37
38do_compile() {
39 export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')"
40 cpan_do_compile
41}
42
Patrick Williams213cb262021-08-07 19:21:33 -050043do_compile:class-native() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050044 cpan_do_compile
45}
46
47do_install_ptest() {
48 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats
49 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter
50 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments
51 sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical
52 cp -r ${B}/samples ${D}${PTEST_PATH}
53 chown -R root:root ${D}${PTEST_PATH}/samples
54}
55
Patrick Williams213cb262021-08-07 19:21:33 -050056RDEPENDS:${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more"
Andrew Geissler82c905d2020-04-13 13:39:40 -050057
58BBCLASSEXTEND="native nativesdk"