2010-09-03 17:25:38 +00:00
|
|
|
python siteconfig_do_siteconfig () {
|
|
|
|
shared_state = sstate_state_fromvars(d)
|
|
|
|
if shared_state['name'] != 'populate-sysroot':
|
|
|
|
return
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
if not os.path.isdir(os.path.join(d.getVar('FILE_DIRNAME', 1), 'site_config')):
|
2010-09-03 17:25:38 +00:00
|
|
|
bb.debug(1, "No site_config directory, skipping do_siteconfig")
|
|
|
|
return
|
|
|
|
bb.build.exec_func('do_siteconfig_gencache', d)
|
|
|
|
sstate_clean(shared_state, d)
|
|
|
|
sstate_install(shared_state, d)
|
|
|
|
}
|
|
|
|
|
2011-01-25 00:34:09 +00:00
|
|
|
EXTRASITECONFIG ?= ""
|
|
|
|
|
2010-09-03 17:25:38 +00:00
|
|
|
siteconfig_do_siteconfig_gencache () {
|
2011-01-18 08:18:42 +00:00
|
|
|
mkdir -p ${WORKDIR}/site_config_${MACHINE}
|
2010-09-02 21:08:59 +00:00
|
|
|
gen-site-config ${FILE_DIRNAME}/site_config \
|
2011-01-18 08:18:42 +00:00
|
|
|
>${WORKDIR}/site_config_${MACHINE}/configure.ac
|
|
|
|
cd ${WORKDIR}/site_config_${MACHINE}
|
2010-09-02 21:08:59 +00:00
|
|
|
autoconf
|
2011-01-25 00:34:09 +00:00
|
|
|
CONFIG_SITE="" ${EXTRASITECONFIG} ./configure ${CONFIGUREOPTS} --cache-file ${PN}_cache
|
2010-09-02 21:08:59 +00:00
|
|
|
sed -n -e "/ac_cv_c_bigendian/p" -e "/ac_cv_sizeof_/p" \
|
|
|
|
-e "/ac_cv_type_/p" -e "/ac_cv_header_/p" -e "/ac_cv_func_/p" \
|
|
|
|
< ${PN}_cache > ${PN}_config
|
2011-01-18 08:17:58 +00:00
|
|
|
mkdir -p ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
|
|
|
|
cp ${PN}_config ${SYSROOT_DESTDIR}${datadir}/${TARGET_SYS}_config_site.d
|
|
|
|
|
2010-09-02 21:08:59 +00:00
|
|
|
}
|
|
|
|
|
2010-09-03 17:25:38 +00:00
|
|
|
do_populate_sysroot[sstate-interceptfuncs] += "do_siteconfig "
|
2010-09-02 21:08:59 +00:00
|
|
|
|
2010-09-03 17:25:38 +00:00
|
|
|
EXPORT_FUNCTIONS do_siteconfig do_siteconfig_gencache
|