1*4882a593SmuzhiyunSUMMARY = "XML::Parser - A perl module for parsing XML documents" 2*4882a593SmuzhiyunHOMEPAGE = "https://libexpat.github.io/" 3*4882a593SmuzhiyunSECTION = "libs" 4*4882a593SmuzhiyunLICENSE = "Artistic-1.0 | GPL-1.0-or-later" 5*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://Parser.pm;beginline=1;endline=7;md5=d12cc778c80fc4c518f0e5dee29fd5fb" 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunDEPENDS += "expat" 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunSRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz \ 10*4882a593Smuzhiyun file://ptest-perl/run-ptest \ 11*4882a593Smuzhiyun file://0001-CheckLib.pm-do-not-attempt-to-run-a-cross-executable.patch \ 12*4882a593Smuzhiyun " 13*4882a593SmuzhiyunSRC_URI[md5sum] = "80bb18a8e6240fcf7ec2f7b57601c170" 14*4882a593SmuzhiyunSRC_URI[sha256sum] = "d331332491c51cccfb4cb94ffc44f9cd73378e618498d4a37df9e043661c515d" 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunS = "${WORKDIR}/XML-Parser-${PV}" 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunEXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR} CC='${CC}' LD='${CCLD}' FULL_AR='${AR}'" 19*4882a593Smuzhiyun 20*4882a593Smuzhiyuninherit cpan ptest-perl 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun# fix up sub MakeMaker project as arguments don't get propagated though 23*4882a593Smuzhiyun# see https://rt.cpan.org/Public/Bug/Display.html?id=28632 24*4882a593Smuzhiyundo_configure:append:class-target() { 25*4882a593Smuzhiyun sed -E \ 26*4882a593Smuzhiyun -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' \ 27*4882a593Smuzhiyun -i Makefile Expat/Makefile 28*4882a593Smuzhiyun} 29*4882a593Smuzhiyun 30*4882a593Smuzhiyundo_configure:append() { 31*4882a593Smuzhiyun sed -e 's:--sysroot=.*\(\s\|$\):--sysroot=${STAGING_DIR_TARGET} :g' \ 32*4882a593Smuzhiyun -i Makefile Expat/Makefile 33*4882a593Smuzhiyun sed 's:^FULL_AR = .*:FULL_AR = ${AR}:g' -i Expat/Makefile 34*4882a593Smuzhiyun # make sure these two do not build in parallel 35*4882a593Smuzhiyun sed 's!^$(INST_DYNAMIC):!$(INST_DYNAMIC): $(BOOTSTRAP)!' -i Expat/Makefile 36*4882a593Smuzhiyun} 37*4882a593Smuzhiyun 38*4882a593Smuzhiyundo_compile() { 39*4882a593Smuzhiyun export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 'libc-*.so')" 40*4882a593Smuzhiyun cpan_do_compile 41*4882a593Smuzhiyun} 42*4882a593Smuzhiyun 43*4882a593Smuzhiyundo_compile:class-native() { 44*4882a593Smuzhiyun cpan_do_compile 45*4882a593Smuzhiyun} 46*4882a593Smuzhiyun 47*4882a593Smuzhiyundo_install_ptest() { 48*4882a593Smuzhiyun sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlstats 49*4882a593Smuzhiyun sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlfilter 50*4882a593Smuzhiyun sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/xmlcomments 51*4882a593Smuzhiyun sed -i -e "s:/usr/local/bin/perl:/usr/bin/perl:g" ${B}/samples/canonical 52*4882a593Smuzhiyun cp -r ${B}/samples ${D}${PTEST_PATH} 53*4882a593Smuzhiyun chown -R root:root ${D}${PTEST_PATH}/samples 54*4882a593Smuzhiyun} 55*4882a593Smuzhiyun 56*4882a593SmuzhiyunRDEPENDS:${PN} += "perl-module-carp perl-module-file-spec" 57*4882a593SmuzhiyunRDEPENDS:${PN}-ptest += "perl-module-filehandle perl-module-if perl-module-test perl-module-test-more" 58*4882a593Smuzhiyun 59*4882a593SmuzhiyunBBCLASSEXTEND="native nativesdk" 60