cd src
# FTBFS on alpine, voidlinux-musl: 'mallopt' was not declared in this scope
# https://github.com/uxlfoundation/oneTBB/issues/1740
sed -i.bak '/REQUIRE.*mallopt/d' test/tbbmalloc/test_malloc_overload.cpp
mkdir build
cd build
# TBB_ENABLE_IPO=OFF is a workaround for https://github.com/passagemath/passagemath/issues/509
# TBB_TEST=OFF is a workaround for https://github.com/uxlfoundation/oneTBB/issues/1740
sdh_cmake -GNinja \
    -DTBB_STRICT=off \
    -DTBB_ENABLE_IPO=OFF \
    -DTBB_TEST=OFF \
    ..
cmake --build .
DESTDIR=$SAGE_DESTDIR cmake --install .
