mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-25 22:34:18 +08:00
46 lines
1.1 KiB
TOML
46 lines
1.1 KiB
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+="-I${COOKBOOK_SYSROOT}/include -DHAVE_PTHREAD=1"
|
|
export CPPFLAGS+="-I${COOKBOOK_SYSROOT}/include -DHAVE_PTHREAD=1"
|
|
export LLVM_CONFIG="${TARGET}-llvm-config"
|
|
|
|
if [[ -n "${COOKBOOK_PREFER_STATIC}" ]]; then
|
|
export LDFLAGS+=" --static"
|
|
export DEFAULTLIB="static"
|
|
export LLVMSHARED="disabled"
|
|
else
|
|
export DEFAULTLIB="shared"
|
|
export LLVMSHARED="enabled"
|
|
fi
|
|
|
|
COOKBOOK_MESON_FLAGS=(
|
|
-Ddefault_library="${DEFAULTLIB}"
|
|
-Dglx=disabled
|
|
-Dllvm=enabled
|
|
-Dosmesa=true
|
|
-Dplatforms=
|
|
-Dshader-cache=disabled
|
|
-Dshared-llvm="${LLVMSHARED}"
|
|
-Dshared-glapi=disabled
|
|
)
|
|
|
|
cookbook_meson
|
|
|
|
# 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"
|
|
"""
|