From: Shinu Chandran <shinucha@cisco.com>
To: openembedded-core@lists.openembedded.org
Cc: xe-linux-external@cisco.com, Shinu Chandran <shinucha@cisco.com>
Subject: [OE-core][PATCH v2] boost: make Boost.Locale ICU backend optional
Date: Tue, 28 Jul 2026 23:12:32 -0700 [thread overview]
Message-ID: <20260729061232.3547458-1-shinucha@cisco.com> (raw)
In-Reply-To: <20260728051641.1997335-1-shinucha@cisco.com>
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 locale-icu PACKAGECONFIG option and keep it enabled by
default so existing builds retain the same feature set and runtime
linkage. When locale-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.
Pass boost.locale.icu=on explicitly when the option is enabled instead
of relying on Boost's default probing behavior. Keep the existing
--disable-icu argument, which controls Boost.Regex ICU support, separate
from the Boost.Locale backend selection.
Tie the ICU dependency to the locale and locale-icu options so
configurations that disable either locale or the ICU backend 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>
---
Changes in v2:
- Rename the PACKAGECONFIG option from icu to locale-icu to clarify that
it controls the Boost.Locale ICU backend only.
- Pass boost.locale.icu=on explicitly when the backend is enabled.
- Keep --disable-icu unchanged because it controls Boost.Regex ICU support.
meta/recipes-support/boost/boost.inc | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 7a343e54f6..7033da181b 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -49,8 +49,10 @@ BOOST_LIBS = "\
"
# optional libraries
-PACKAGECONFIG ??= "locale python"
-PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG ??= "locale python locale-icu"
+BOOST_LOCALE_ICU_DEP = "${@bb.utils.contains('PACKAGECONFIG', 'locale', 'icu', '', d)}"
+PACKAGECONFIG[locale] = ",,"
+PACKAGECONFIG[locale-icu] = ",,${BOOST_LOCALE_ICU_DEP}"
PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
PACKAGECONFIG[mpi] = ",,mpich"
PACKAGECONFIG[python] = ",,python3"
@@ -145,10 +147,13 @@ BJAM_TOOLS = "--ignore-site-config \
# use PARALLEL_MAKE to speed up the build
BOOST_PARALLEL_MAKE = "${@oe.utils.parallel_make_argument(d, '-j%d')}"
+# --disable-icu below controls Boost.Regex ICU support. Boost.Locale ICU is
+# handled independently with boost.locale.icu.
+BOOST_LOCALE_ICU_OPTS = "${@bb.utils.contains('PACKAGECONFIG', 'locale locale-icu', 'boost.locale.icu=on -sICU_PATH=${STAGING_EXECPREFIXDIR}', 'boost.locale.icu=off', d)}"
BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \
${BJAM_TOOLS} \
-sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \
- -sICU_PATH=${STAGING_EXECPREFIXDIR} \
+ ${BOOST_LOCALE_ICU_OPTS} \
--build-dir=${B} \
--disable-icu \
${BJAM_EXTRA}'
--
2.35.6
next prev parent reply other threads:[~2026-07-29 6:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 5:16 [OE-core] [master] [PATCH] boost: make Boost.Locale ICU backend optional Shinu Chandran
2026-07-28 10:21 ` Alexander Kanavin
2026-07-29 6:12 ` Shinu Chandran [this message]
2026-08-04 10:44 ` [OE-core][PATCH v2] " Ross Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260729061232.3547458-1-shinucha@cisco.com \
--to=shinucha@cisco.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=xe-linux-external@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox