diff --git a/recipes/wip/libs/other/libicu/recipe.toml b/recipes/wip/libs/other/libicu/recipe.toml index 98cc9072e..324ecdb86 100644 --- a/recipes/wip/libs/other/libicu/recipe.toml +++ b/recipes/wip/libs/other/libicu/recipe.toml @@ -1,5 +1,48 @@ -#TODO missing script for building [source] -tar = "https://github.com/unicode-org/icu/releases/download/release-74-1/icu4c-74_1-src.tgz" +tar = "https://github.com/unicode-org/icu/releases/download/release-77-1/icu4c-77_1-src.tgz" +blake3 = "8f51c4e4c6577b61d02921e800ddb0a2d4778addf7717eef4c5bb0e8a5582c3a" +patches = ["redox.patch"] + [build] template = "custom" +script = """ +COOKBOOK_CONFIGURE="${COOKBOOK_SOURCE}/source/configure" +mkdir -p host +pushd host +#TODO: easier way to build for host? +HOST_ENV=( + env + --unset=AR + --unset=AS + --unset=CC + --unset=CFLAGS + --unset=CPPFLAGS + --unset=CXX + --unset=GNU_TARGET + --unset=LD + --unset=LDFLAGS + --unset=NM + --unset=OBJCOPY + --unset=OBJDUMP + --unset=PKG_CONFIG + --unset=PKG_CONFIG_ALLOW_CROSS + --unset=PKG_CONFIG_FOR_BUILD + --unset=PKG_CONFIG_LIBDIR + --unset=PKG_CONFIG_PATH + --unset=PKG_CONFIG_SYSROOT_DIR + --unset=PREFIX_RUSTFLAGS + --unset=RANLIB + --unset=READELF + --unset=STRIP + --unset=TARGET +) +"${HOST_ENV[@]}" printenv | sort +"${HOST_ENV[@]}" "${COOKBOOK_CONFIGURE}" +"${HOST_ENV[@]}" "${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" +popd +COOKBOOK_CONFIGURE_FLAGS+=( + --with-cross-build="${COOKBOOK_BUILD}/host" + icu_cv_host_frag=mh-linux +) +cookbook_configure +""" diff --git a/recipes/wip/libs/other/libicu/redox.patch b/recipes/wip/libs/other/libicu/redox.patch new file mode 100644 index 000000000..659b2df1b --- /dev/null +++ b/recipes/wip/libs/other/libicu/redox.patch @@ -0,0 +1,12 @@ +diff -ruwN icu/source/common/unicode/ptypes.h source/source/common/unicode/ptypes.h +--- icu/source/common/unicode/ptypes.h 2025-03-13 12:31:23.000000000 -0600 ++++ source/source/common/unicode/ptypes.h 2025-04-11 13:46:44.105116183 -0600 +@@ -56,7 +56,7 @@ + // implementations (looking at you, Apple, spring 2024) actually do this, so + // ICU4C must detect and deal with that. + #if !defined(__cplusplus) && !defined(U_IN_DOXYGEN) +-# if U_HAVE_CHAR16_T ++# if U_HAVE_CHAR16_T && !defined(__redox__) + # include + # else + typedef uint16_t char16_t;