From fd1517e2b51a170f2427122c6b95396db251d827 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 10 Aug 2022 14:35:29 +0100 Subject: classes: Update classes to match new bitbake class scope functionality Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie --- meta/classes-recipe/scons.bbclass | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 meta/classes-recipe/scons.bbclass (limited to 'meta/classes-recipe/scons.bbclass') diff --git a/meta/classes-recipe/scons.bbclass b/meta/classes-recipe/scons.bbclass new file mode 100644 index 0000000000..5f0d4a910b --- /dev/null +++ b/meta/classes-recipe/scons.bbclass @@ -0,0 +1,34 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + +inherit python3native + +DEPENDS += "python3-scons-native" + +EXTRA_OESCONS ?= "" + +do_configure() { + if [ -n "${CONFIGURESTAMPFILE}" -a "${S}" = "${B}" ]; then + if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then + ${STAGING_BINDIR_NATIVE}/scons --directory=${S} --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} + fi + + mkdir -p `dirname ${CONFIGURESTAMPFILE}` + echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} + fi +} + +scons_do_compile() { + ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \ + die "scons build execution failed." +} + +scons_do_install() { + ${STAGING_BINDIR_NATIVE}/scons --directory=${S} install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \ + die "scons install execution failed." +} + +EXPORT_FUNCTIONS do_compile do_install -- cgit v1.2.3-54-g00ecf