diff mbox series

[scarthgap] boost: make ICU support configurable

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

Commit Message

Shinu Chandran Aug. 25, 2026, 4:59 a.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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 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 77105aa1fa..9701c87740 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -45,8 +45,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"
@@ -152,9 +153,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