Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "XML::Parser - A perl module for parsing XML documents" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | HOMEPAGE = "https://libexpat.github.io/" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3 | SECTION = "libs" |
| 4 | LICENSE = "Artistic-1.0 | GPL-1.0+" |
| 5 | LIC_FILES_CHKSUM = "file://README;beginline=2;endline=6;md5=c8767d7516229f07b26e42d1cf8b51f1" |
| 6 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 7 | DEPENDS += "expat" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | |
| 9 | SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz" |
| 10 | SRC_URI[md5sum] = "af4813fe3952362451201ced6fbce379" |
| 11 | SRC_URI[sha256sum] = "1ae9d07ee9c35326b3d9aad56eae71a6730a73a116b9fe9e8a4758b7cc033216" |
| 12 | |
| 13 | S = "${WORKDIR}/XML-Parser-${PV}" |
| 14 | |
| 15 | EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'" |
| 16 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | inherit cpan ptest-perl |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
| 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | do_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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | do_configure_append() { |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 28 | sed -e 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' \ |
| 29 | -i Makefile Expat/Makefile |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | # make sure these two do not build in parallel |
| 32 | sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i Expat/Makefile |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | do_compile() { |
| 36 | export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" |
| 37 | cpan_do_compile |
| 38 | } |
| 39 | |
| 40 | do_compile_class-native() { |
| 41 | cpan_do_compile |
| 42 | } |
| 43 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 44 | do_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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 53 | BBCLASSEXTEND="native nativesdk" |