@@ -49,8 +49,10 @@ BOOST_LIBS = "\
"
# optional libraries
-PACKAGECONFIG ??= "locale python"
-PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG ??= "locale python icu"
+BOOST_LOCALE_ICU_DEP = "${@bb.utils.contains('PACKAGECONFIG', 'locale', 'icu', '', d)}"
+PACKAGECONFIG[locale] = ",,"
+PACKAGECONFIG[icu] = ",,${BOOST_LOCALE_ICU_DEP}"
PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
PACKAGECONFIG[mpi] = ",,mpich"
PACKAGECONFIG[python] = ",,python3"
@@ -148,7 +150,7 @@ BOOST_PARALLEL_MAKE = "${@oe.utils.parallel_make_argument(d, '-j%d')}"
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \
${BJAM_TOOLS} \
-sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \
- -sICU_PATH=${STAGING_EXECPREFIXDIR} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'locale icu', '-sICU_PATH=${STAGING_EXECPREFIXDIR}', 'boost.locale.icu=off', d)} \
--build-dir=${B} \
--disable-icu \
${BJAM_EXTRA}'
Boost.Locale currently always depends on ICU when the locale library is enabled. That makes ICU a mandatory dependency for users that need boost-locale but do not need the ICU backend. Add a separate icu PACKAGECONFIG option and keep it enabled by default so existing builds retain the same feature set and runtime linkage. When icu is removed, pass boost.locale.icu=off to Boost.Build so boost-locale can still be built using the non-ICU backends without pulling ICU into the dependency graph. Tie the icu dependency to the locale option so configurations that disable locale do not keep an unused ICU build dependency. This gives distros and SDK builds a smaller dependency closure while preserving the current default behavior. Signed-off-by: Shinu Chandran <shinucha@cisco.com> --- meta/recipes-support/boost/boost.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)