Files
distro/recipes/mesa.py
T
2026-06-02 21:38:47 +02:00

57 lines
1.9 KiB
Python

version = "25.3.0"
revision = 1
description = "Mesa 3D graphics library (OpenGL/EGL/GLES, gallium drivers)"
license = "MIT"
url = "https://www.mesa3d.org/"
source = tarball(
url=f"https://archive.mesa3d.org/mesa-{version}.tar.xz",
sha256="0fd54fea7dbbddb154df05ac752b18621f26d97e27863db3be951417c6abe8ae",
)
host_deps = ["binutils", "gcc", "pkgconf"]
deps = [
profile["libc"],
"libstdc++", # C++ components need the libstdc++ headers/runtime
"libdrm",
"expat",
"llvm",
"zlib",
"zstd",
"wayland",
"wayland-protocols",
"libglvnd",
"hwdata",
"eudev", # libudev: DRM device enumeration
"libdisplay-info", # EDID/DisplayID parsing for the KMS backend
"elfutils", # libelf: required by the radeonsi gallium driver
]
_mesa_args = [
"-Dplatforms=wayland",
"-Dglx=disabled",
"-Degl=enabled",
"-Dgbm=enabled",
"-Dgles1=enabled",
"-Dgles2=enabled",
"-Dglvnd=enabled",
"-Dshared-glapi=enabled",
"-Dllvm=enabled",
"-Dshared-llvm=enabled",
"-Dexpat=enabled",
"-Dzstd=enabled",
"-Dvideo-codecs=all_free",
"-Db_ndebug=true",
"-Dbuild-tests=false",
# Broad HW + software gallium set (Weston's GL renderer uses these).
# NOTE: 'iris' (modern Intel) is omitted because it requires libclc
# (a clang-based OpenCL-bitcode build); 'crocus' covers older Intel.
# Add iris back once a libclc recipe exists.
"-Dgallium-drivers=radeonsi,r600,crocus,nouveau,virgl,svga,zink,llvmpipe,softpipe",
# Vulkan deferred: needs a vulkan-headers + SPIRV-Headers/Tools sub-stack
# and is not required for Weston's GL renderer. Add radv/anv/lavapipe later.
"-Dvulkan-drivers=",
]
# LLVM is found via the cross llvm-config emulator wired into the meson cross
# file (src/lib/meson.py), which reports sysroot paths — no target-binary exec.
configure, build, install = meson(configure_args=_mesa_args)