redox/recipes/libs/mesa/recipe.toml

38 lines
877 B
TOML

[source]
git = "https://gitlab.redox-os.org/redox-os/mesa.git"
upstream = "https://gitlab.freedesktop.org/mesa/mesa"
branch = "redox-24.0"
[build]
template = "custom"
dependencies = [
"expat",
"llvm18",
"zlib",
]
script = """
DYNAMIC_INIT
export CFLAGS+=" -DHAVE_PTHREAD=1"
export CPPFLAGS+=" -DHAVE_PTHREAD=1"
export LLVM_CONFIG="${TARGET}-llvm-config"
if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=enabled)
else
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=disabled)
fi
cookbook_meson \
-Dglx=disabled \
-Dllvm=enabled \
-Dosmesa=true \
-Dplatforms= \
-Dshader-cache=disabled \
-Dshared-glapi=disabled
# Hack to add LLVM libs
#TODO: only add necessary LLVM libs, not all of them
sed -i "s/ -lOSMesa / -lOSMesa $("${LLVM_CONFIG}" --libs) -lstdc++ /" "${COOKBOOK_STAGE}/usr/lib/pkgconfig/osmesa.pc"
"""