blob: 6b171ca8df58c8f0f521fa4e4ec4bb03deb11611 [file] [log] [blame]
Brad Bishop15ae2502019-06-18 21:44:24 -04001inherit python3native
2
3DEPENDS += "python3-scons-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004
5EXTRA_OESCONS ?= ""
6
Brad Bishop19323692019-04-05 15:28:33 -04007do_configure() {
Brad Bishop15ae2502019-06-18 21:44:24 -04008 unset _PYTHON_SYSCONFIGDATA_NAME
Brad Bishop19323692019-04-05 15:28:33 -04009 if [ -n "${CONFIGURESTAMPFILE}" ]; then
10 if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
11 ${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
12 fi
13
14 mkdir -p `dirname ${CONFIGURESTAMPFILE}`
15 echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
16 fi
17}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050018
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019scons_do_compile() {
Brad Bishop15ae2502019-06-18 21:44:24 -040020 unset _PYTHON_SYSCONFIGDATA_NAME
Brad Bishop19323692019-04-05 15:28:33 -040021 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
22 die "scons build execution failed."
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023}
24
25scons_do_install() {
Brad Bishop15ae2502019-06-18 21:44:24 -040026 unset _PYTHON_SYSCONFIGDATA_NAME
Brad Bishop19323692019-04-05 15:28:33 -040027 ${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
28 die "scons install execution failed."
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029}
30
31EXPORT_FUNCTIONS do_compile do_install