Skip to contentSkip to conversation

boost: make ICU support configurable

PATCH In review Shinu Chandran 2 participants 2 messages Aug 25 – Oct 19

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 boost: make ICU support configurable

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.

---
 meta/recipes-support/boost/boost.inc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/recipes-support/boost/boost.inc +4 -4
index 77105aa1fa..9701c87740 100644
@@ -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
Signature · 1 line
2.35.6
#1 lore raw
Quoted 9 lines · Shinu Chandran

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.

Quoted 6 lines

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

Hi,

Please review the policy for changes to the stable branches [1]. This patch doesn't seem suitable for scarthgap.

[1]: https://docs.yoctoproject.org/contributor-guide/submit-changes.html#submitting-changes-to-stable-release-branches

Best regards,

Signature · 1 line
Paul Barker