mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
perl: Standardise config.sh location
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
@@ -10,7 +10,7 @@ RDEPENDS += "${@["perl", ""][(bb.data.inherits_class('native', d))]}"
|
||||
# Determine the staged version of perl from the perl configuration file
|
||||
def get_perl_version(d):
|
||||
import re
|
||||
cfg = bb.data.expand('${STAGING_DIR}/${HOST_SYS}/perl/config.sh', d)
|
||||
cfg = bb.data.expand('${STAGING_LIBDIR}/perl/config.sh', d)
|
||||
try:
|
||||
f = open(cfg, 'r')
|
||||
except IOError:
|
||||
|
||||
@@ -10,11 +10,13 @@ export PERLCONFIGTARGET = "${@is_target(d)}"
|
||||
|
||||
# Env var which tells perl where the perl include files are
|
||||
export PERL_INC = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}/CORE"
|
||||
export PERL_LIB = "${STAGING_DATADIR}/perl/${@get_perl_version(d)}"
|
||||
export PERL_ARCHLIB = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}"
|
||||
|
||||
cpan_do_configure () {
|
||||
yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS}
|
||||
if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
|
||||
. ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh
|
||||
. ${STAGING_LIBDIR}/perl/config.sh
|
||||
if [ "${IS_NEW_PERL}" = "yes" ]; then
|
||||
sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \
|
||||
-e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \
|
||||
|
||||
@@ -22,7 +22,7 @@ DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}"
|
||||
cpan_build_do_configure () {
|
||||
if [ ${@is_target(d)} == "yes" ]; then
|
||||
# build for target
|
||||
. ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh
|
||||
. ${STAGING_LIBDIR}/perl/config.sh
|
||||
if [ "${IS_NEW_PERL}" = "yes" ]; then
|
||||
perl Build.PL --installdirs vendor \
|
||||
--destdir ${D} \
|
||||
|
||||
Reference in New Issue
Block a user