glibc: Separate locale files to their own sstate task
Putting the locale and script files into the sysroot for use by their specific recipes used to be a simple way to share the files. With RSS, we don't want to copy these into many different recipes so put these files in their own sstate task. (From OE-Core rev: c283f2532851e2a65e08fe7b3fd71c5d9abb70f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
9f12295626
commit
992d17c8e8
|
@ -15,7 +15,7 @@ deltask do_patch
|
||||||
do_configure[noexec] = "1"
|
do_configure[noexec] = "1"
|
||||||
do_compile[noexec] = "1"
|
do_compile[noexec] = "1"
|
||||||
|
|
||||||
do_install[depends] += "virtual/${MLPREFIX}libc:do_populate_sysroot"
|
do_install[depends] += "virtual/${MLPREFIX}libc:do_stash_locale"
|
||||||
|
|
||||||
COMPATIBLE_HOST_libc-musl_class-target = "null"
|
COMPATIBLE_HOST_libc-musl_class-target = "null"
|
||||||
COMPATIBLE_HOST_libc-uclibc_class-target = "null"
|
COMPATIBLE_HOST_libc-uclibc_class-target = "null"
|
||||||
|
|
|
@ -43,7 +43,7 @@ do_install () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_locale() {
|
do_stash_locale() {
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,9 +51,4 @@ do_siteconfig () {
|
||||||
:
|
:
|
||||||
}
|
}
|
||||||
|
|
||||||
# We don't install any scripts so there is nothing to evacuate
|
|
||||||
do_evacuate_scripts () {
|
|
||||||
:
|
|
||||||
}
|
|
||||||
|
|
||||||
inherit nopackages
|
inherit nopackages
|
||||||
|
|
|
@ -66,7 +66,7 @@ DESCRIPTION_localedef = "glibc: compile locale definition files"
|
||||||
FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
|
FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
|
||||||
FILES_localedef = "${bindir}/localedef"
|
FILES_localedef = "${bindir}/localedef"
|
||||||
|
|
||||||
LOCALETREESRC = "${STAGING_INCDIR}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}"
|
LOCALETREESRC = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
|
mkdir -p ${D}${bindir} ${D}${datadir} ${D}${libdir}
|
||||||
|
|
|
@ -5,7 +5,7 @@ DESCRIPTION = "mtrace utility provided by glibc"
|
||||||
RDEPENDS_${PN} = "perl"
|
RDEPENDS_${PN} = "perl"
|
||||||
RPROVIDES_${PN} = "libc-mtrace"
|
RPROVIDES_${PN} = "libc-mtrace"
|
||||||
|
|
||||||
SRC = "${STAGING_INCDIR}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
|
SRC = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale/scripts"
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d -m 0755 ${D}${bindir}
|
install -d -m 0755 ${D}${bindir}
|
||||||
|
|
|
@ -145,8 +145,11 @@ do_install_append_aarch64 () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install_locale () {
|
LOCALESTASH = "${WORKDIR}/stashed-locale"
|
||||||
dest=${D}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
|
bashscripts = "mtrace sotruss xtrace"
|
||||||
|
|
||||||
|
do_stash_locale () {
|
||||||
|
dest=${LOCALESTASH}
|
||||||
install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
|
install -d ${dest}${base_libdir} ${dest}${bindir} ${dest}${libdir} ${dest}${datadir}
|
||||||
if [ "${base_libdir}" != "${libdir}" ]; then
|
if [ "${base_libdir}" != "${libdir}" ]; then
|
||||||
cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
|
cp -fpPR ${D}${base_libdir}/* ${dest}${base_libdir}
|
||||||
|
@ -166,14 +169,8 @@ do_install_locale () {
|
||||||
cp -fpPR ${D}${datadir}/* ${dest}${datadir}
|
cp -fpPR ${D}${datadir}/* ${dest}${datadir}
|
||||||
rm -rf ${D}${datadir}/locale/
|
rm -rf ${D}${datadir}/locale/
|
||||||
cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
|
cp -fpPR ${WORKDIR}/SUPPORTED ${dest}
|
||||||
}
|
|
||||||
|
|
||||||
addtask do_install_locale after do_install before do_populate_sysroot do_package
|
target=${dest}/scripts
|
||||||
|
|
||||||
bashscripts = "mtrace sotruss xtrace"
|
|
||||||
|
|
||||||
do_evacuate_scripts () {
|
|
||||||
target=${D}${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
|
|
||||||
mkdir -p $target
|
mkdir -p $target
|
||||||
for i in ${bashscripts}; do
|
for i in ${bashscripts}; do
|
||||||
if [ -f ${D}${bindir}/$i ]; then
|
if [ -f ${D}${bindir}/$i ]; then
|
||||||
|
@ -182,13 +179,22 @@ do_evacuate_scripts () {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
addtask evacuate_scripts after do_install before do_populate_sysroot do_package
|
addtask do_stash_locale after do_install before do_populate_sysroot do_package
|
||||||
|
do_stash_locale[dirs] = "${B}"
|
||||||
|
do_stash_locale[cleandirs] = "${LOCALESTASH}"
|
||||||
|
SSTATETASKS += "do_stash_locale"
|
||||||
|
do_stash_locale[sstate-inputdirs] = "${LOCALESTASH}"
|
||||||
|
do_stash_locale[sstate-outputdirs] = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale"
|
||||||
|
do_stash_locale[sstate-fixmedir] = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale"
|
||||||
|
|
||||||
|
python do_stash_locale_setscene () {
|
||||||
|
sstate_setscene(d)
|
||||||
|
}
|
||||||
|
addtask do_stash_locale_setscene
|
||||||
|
|
||||||
PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess"
|
PACKAGE_PREPROCESS_FUNCS += "glibc_package_preprocess"
|
||||||
|
|
||||||
glibc_package_preprocess () {
|
glibc_package_preprocess () {
|
||||||
rm -rf ${PKGD}/${includedir}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}
|
|
||||||
rm -rf ${PKGD}/${includedir}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}
|
|
||||||
for i in ${bashscripts}; do
|
for i in ${bashscripts}; do
|
||||||
rm -f ${PKGD}${bindir}/$i
|
rm -f ${PKGD}${bindir}/$i
|
||||||
done
|
done
|
||||||
|
|
|
@ -4,7 +4,7 @@ SUMMARY = "utility scripts provided by glibc"
|
||||||
DESCRIPTION = "utility scripts provided by glibc"
|
DESCRIPTION = "utility scripts provided by glibc"
|
||||||
RDEPENDS_${PN} = "bash glibc-mtrace"
|
RDEPENDS_${PN} = "bash glibc-mtrace"
|
||||||
|
|
||||||
SRC = "${STAGING_INCDIR}/glibc-scripts-internal-${MULTIMACH_TARGET_SYS}"
|
SRC = "${STAGING_DIR}-components/${PACKAGE_ARCH}/glibc-stash-locale/scripts"
|
||||||
|
|
||||||
bashscripts = "sotruss xtrace"
|
bashscripts = "sotruss xtrace"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue