blob: bc154bbdc5049983b887e8334ec218abd6441875 [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
24do_configure_append_class-target() {
25 sed -E \
26 -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' \
27 -i Makefile Expat/Makefile
28}
29
30do_configure_append() {
31 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
43do_compile_class-native() {
44 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
56RDEPENDS_${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more"
57
58BBCLASSEXTEND="native nativesdk"