2 # cpan-base providers various perl related information needed for building
5 FILES_${PN} += "${libdir}/perl5 ${datadir}/perl5"
7 DEPENDS += "${@["perl", "perl-native"][(bb.data.inherits_class('native', d))]}"
8 RDEPENDS_${PN} += "${@["perl", ""][(bb.data.inherits_class('native', d))]}"
10 # Determine the staged version of perl from the perl configuration file
11 def get_perl_version(d):
13 cfg = bb.data.expand('${STAGING_LIBDIR}/perl/config.sh', d)
20 r = re.compile("version='(\d+\.\d+\.\d+)'")
27 # Determine where the library directories are
28 def perl_get_libdirs(d):
29 libdir = bb.data.getVar('libdir', d, 1)
30 libdirs = libdir + '/perl5'
34 if not bb.data.inherits_class('native', d):
35 return bb.data.expand('${TARGET_SYS}', d)
38 PERLLIBDIRS = "${@perl_get_libdirs(d)}"
40 FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \
41 ${PERLLIBDIRS}/auto/*/*/.debug \
42 ${PERLLIBDIRS}/auto/*/*/*/.debug"
44 # Env var which tells perl if it should use host ('') or target ('$TARGET_SYS') settings
45 export PERLCONFIGTARGET = "${@is_target(d)}"
49 # Env var which tells perl where the perl include files are
50 export PERL_INC = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}/CORE"
51 export PERL_LIB = "${STAGING_DATADIR}/perl/${@get_perl_version(d)}"
52 export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}"