diff mbox series

[master,v3] boost: make ICU support configurable

Message ID 20260819121058.2019725-1-shinucha@cisco.com
State New
Headers show
Series [master,v3] boost: make ICU support configurable | expand

Commit Message

Shinu Chandran Aug. 19, 2026, 12:10 p.m. UTC
Boost.Locale and Boost.Regex both have optional ICU support, but the recipe depended on icu via PACKAGECONFIG[locale] while still passing --disable-icu to b2. That made the dependency relationship confusing and kept the Boost.Regex ICU toggle separate from the Boost.Locale one.

Add an explicit icu PACKAGECONFIG, enabled by default, and use PACKAGECONFIG_CONFARGS to pass the generated b2 arguments. When icu is removed from PACKAGECONFIG the recipe drops the icu dependency and passes boost.locale.icu=off --disable-icu; when enabled it passes boost.locale.icu=on with ICU_PATH.

This lets distros remove the ICU dependency consistently without disabling the Boost.Locale library itself.

Signed-off-by: Shinu Chandran <shinucha@cisco.com>
---
  Changes in v3:
  - Replace locale-icu with a single icu PACKAGECONFIG covering ICU use in Boost.
  - Drop BOOST_LOCALE_ICU_DEP and use a direct icu dependency.
  - Move Boost.Build enable/disable arguments into PACKAGECONFIG[icu].
  - Pass ${PACKAGECONFIG_CONFARGS} through BJAM_OPTS.
  - Validate both default and PACKAGECONFIG:remove:pn-boost = "icu" builds.

  Changes in v2:
  - Rename the PACKAGECONFIG option from icu to locale-icu.
  - Pass boost.locale.icu=on explicitly when enabled.
  
 meta/recipes-support/boost/boost.inc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index 7a343e54f6..bff5120e18 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -49,8 +49,9 @@  BOOST_LIBS = "\
 	"
 
 # optional libraries
-PACKAGECONFIG ??= "locale python"
-PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG ??= "locale python icu"
+PACKAGECONFIG[locale] = ",,"
+PACKAGECONFIG[icu] = "boost.locale.icu=on -sICU_PATH=${STAGING_EXECPREFIXDIR},boost.locale.icu=off --disable-icu,icu"
 PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
 PACKAGECONFIG[mpi] = ",,mpich"
 PACKAGECONFIG[python] = ",,python3"
@@ -148,9 +149,8 @@  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} \
+		${PACKAGECONFIG_CONFARGS} \
 		--build-dir=${B} \
-		--disable-icu \
 		${BJAM_EXTRA}'
 
 # Native compilation of bzip2 isn't working