From d060cff10133af13d70cc97688efc8db830afb4d Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Mon, 30 Dec 2024 02:37:32 -0500 Subject: [PATCH] Update Boost recipe Boost depends on some missing `wchar.h` functions which are wrapped and exposed by C++. Some of the libraries seem to either depend on `openat` or depend on external libraries that depend on `openat`. The main purpose of this patch is to update the recipe to an almost working state until those issues are resolved. --- recipes/wip/libs/other/boost/recipe.toml | 37 ++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/recipes/wip/libs/other/boost/recipe.toml b/recipes/wip/libs/other/boost/recipe.toml index 405fd6db..8664e721 100644 --- a/recipes/wip/libs/other/boost/recipe.toml +++ b/recipes/wip/libs/other/boost/recipe.toml @@ -1,5 +1,38 @@ -#TODO missing script for building, see https://github.com/boostorg/wiki/wiki/Getting-Started%3A-Overview#installing-boost +# TODO: +# * Some libraries require openat or have deps that require openat +# * wchar.h needs some work before Boost is usable + [source] -tar = "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.bz2" +tar = "https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz" +blake3 = "9c6eb6bb7866aeb595e14279fcc5a5c7f2279dd41e946e14e2c3d5c1fb8358d3" + [build] template = "custom" +dependencies = [ + # "libicu", + # "liblzma", + # "bzip2", + # "zlib", + # "zstd", +] +script = """ +export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include" +export CPPFLAGS="${CPPFLAGS} ${CFLAGS}" +export LDFLAGS="-L${COOKBOOK_SYSROOT}/lib --static" + +BOOST_ROOT="${COOKBOOK_STAGE}/usr" +mkdir -p "${BOOST_ROOT}" + +pushd "${COOKBOOK_SOURCE}" + +# Help the bootstrap tool detect our cross compilers +# See: https://www.boost.org/build/doc/html/bbv2/overview/configuration.html +# I'm not entirely sure which directory to place it in, so I put the conf in both +echo "using gcc : : ${TARGET}-gcc ;" >| user-config.jam +cp -v user-config.jam tools/build/src/ + +./bootstrap.sh --prefix="${BOOST_ROOT}" --with-toolset=gcc +./b2 -d2 install + +popd +"""