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 += "${@["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_DIR}/${HOST_SYS}/perl/config.sh', d)
20 r = re.compile("version='(\d\.\d\.\d)'")
27 # Only 5.8.7 and 5.8.4 existed at the time we moved to the new layout
29 ver = get_perl_version(d)
30 if ver == "5.8.4" or ver == "5.8.7":
34 # Determine where the library directories are
35 def perl_get_libdirs(d):
37 libdir = bb.data.getVar('libdir', d, 1)
38 if is_new_perl(d) == "yes":
39 libdirs = libdir + '/perl5'
41 libdirs = libdir + '/*/*/perl5'
46 if not bb.data.inherits_class('native', d):
50 IS_NEW_PERL = "${@is_new_perl(d)}"
51 PERLLIBDIRS = "${@perl_get_libdirs(d)}"
53 FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \
54 ${PERLLIBDIRS}/auto/*/*/.debug \
55 ${PERLLIBDIRS}/auto/*/*/*/.debug"