diff options
Diffstat (limited to 'classes/staging.bbclass')
-rw-r--r-- | classes/staging.bbclass | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/classes/staging.bbclass b/classes/staging.bbclass index 32038a5076..e80644961c 100644 --- a/classes/staging.bbclass +++ b/classes/staging.bbclass @@ -1,9 +1,9 @@ -python populate_staging_prehook () { - return +python populate_sysroot_prehook () { + return } -python populate_staging_posthook () { - return +python populate_sysroot_posthook () { + return } packagedstaging_fastpath () { @@ -38,6 +38,7 @@ sysroot_stage_dir() { fi } +SYSROOTEXTRALIBDIRSED ?= "" sysroot_stage_libdir() { src="$1" dest="$2" @@ -52,6 +53,7 @@ sysroot_stage_libdir() { sed -e 's/^installed=yes$/installed=no/' \ -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \ -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \ + ${SYSROOTEXTRALIBDIRSED} \ -i $src/$i done sysroot_stage_dir $src $dest @@ -68,6 +70,7 @@ sysroot_stage_dirs() { sysroot_stage_dir $from${base_bindir} $to${STAGING_DIR_HOST}${base_bindir} sysroot_stage_dir $from${base_sbindir} $to${STAGING_DIR_HOST}${base_sbindir} sysroot_stage_dir $from${libexecdir} $to${STAGING_DIR_HOST}${libexecdir} + sysroot_stage_dir $from${sysconfdir} $to${STAGING_DIR_HOST}${sysconfdir} if [ "${prefix}/lib" != "${libdir}" ]; then # python puts its files in here, make sure they are staged as well autotools_stage_dir $from/${prefix}/lib $to${STAGING_DIR_HOST}${prefix}/lib @@ -94,6 +97,8 @@ def is_legacy_staging(d): legacy = True if stagefunc is None: legacy = False + elif stagefunc.strip() == "use_do_install_for_stage": + legacy = False elif stagefunc.strip() == "autotools_stage_all": legacy = False elif stagefunc.strip() == "do_stage_native" and bb.data.getVar('AUTOTOOLS_NATIVE_STAGE_INSTALL', d, 1) == "1": @@ -106,21 +111,22 @@ def is_legacy_staging(d): legacy = True return legacy -do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \ +do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \ ${STAGING_DIR_TARGET}/${includedir} \ ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \ ${STAGING_INCDIR_NATIVE} \ ${STAGING_DATADIR} \ ${S} ${B}" -# Could be compile but populate_staging and do_install shouldn't run at the same time -addtask populate_staging after do_install before do_build +# Could be compile but populate_sysroot and do_install shouldn't run at the same time +addtask populate_sysroot after do_install SYSROOT_PREPROCESS_FUNCS ?= "" SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/" SYSROOT_LOCK = "${STAGING_DIR}/staging.lock" -python do_populate_staging () { + +python do_populate_sysroot () { # # if do_stage exists, we're legacy. In that case run the do_stage, # modify the SYSROOT_DESTDIR variable and then run the staging preprocess @@ -147,11 +153,11 @@ python do_populate_staging () { if bb.data.getVarFlags('do_stage', d) is None: bb.fatal("This recipe (%s) has a do_stage_prepend or do_stage_append and do_stage now doesn't exist. Please rename this to do_stage()" % bb.data.getVar("FILE", d, True)) lock = bb.utils.lockfile(lockfile) - bb.build.exec_func('populate_staging_prehook', d) + bb.build.exec_func('populate_sysroot_prehook', d) bb.build.exec_func('do_stage', d) for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split(): bb.build.exec_func(f, d) - bb.build.exec_func('populate_staging_posthook', d) + bb.build.exec_func('populate_sysroot_posthook', d) bb.utils.unlockfile(lock) else: dest = bb.data.getVar('D', d, True) |