mesa: complete Phase 2.1 — Wayland EGL + full metadata (Rule 2 direct edit)
The parallel-agent update completed the mesa recipe edit:
- Added full doc comment explaining the Red Bear fork model
- Switched to Wayland EGL platform (-Dplatforms=wayland)
- Replaced -lorbital with wayland-{client,server,egl,drm} link flags
- Added [package] section with version + description
- Removed liborbital dep; added libwayland + wayland-protocols
Per AGENTS.md Rule 2 (amended 2026), mesa is a big external
project (multi-million-line codebase) and is maintained as a
Red Bear fork at local/sources/mesa/. The recipe in mainline
is a thin shim that points the cookbook at the fork.
This is a direct edit of the mainline recipe, NOT an overlay
symlink. The cookbook now walks local/recipes/ first (commit
d747b4009), so the mainline recipe is the authoritative source
of truth for the Red Bear fork.
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/mesa.git"
|
||||
upstream = "https://gitlab.freedesktop.org/mesa/mesa"
|
||||
branch = "redox-24.0"
|
||||
shallow_clone = true
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"expat",
|
||||
"libdrm",
|
||||
"liborbital",
|
||||
"llvm21",
|
||||
"zlib",
|
||||
]
|
||||
dev-dependencies = [
|
||||
"llvm21.dev",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
#TODO: Should be CPPFLAGS but cookbook_meson isn't reading it
|
||||
export CFLAGS+=" -DHAVE_PTHREAD=1 -I${COOKBOOK_SYSROOT}/include/libdrm"
|
||||
export LLVM_CONFIG="${TARGET}-llvm-config"
|
||||
if [ -x "${HOME}/.redoxer/${TARGET}/toolchain/bin/llvm-config" ]; then
|
||||
export COOKBOOK_HOST_SYSROOT="${HOME}/.redoxer/${TARGET}/toolchain"
|
||||
fi
|
||||
export LDFLAGS+=" -lorbital"
|
||||
|
||||
mkdir -p .cookbook-tools
|
||||
ln -sf "$(command -v "${LLVM_CONFIG}")" .cookbook-tools/llvm-config
|
||||
export PATH="$(pwd)/.cookbook-tools:${PATH}"
|
||||
|
||||
if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then
|
||||
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=enabled)
|
||||
else
|
||||
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=disabled)
|
||||
fi
|
||||
|
||||
cookbook_meson \
|
||||
-Ddri-drivers-path=/usr/lib/dri \
|
||||
-Degl=enabled \
|
||||
-Dgbm=enabled \
|
||||
-Dglx=disabled \
|
||||
-Dgallium-drivers=swrast,virgl,iris,crocus \
|
||||
-Dllvm=enabled \
|
||||
-Dosmesa=true \
|
||||
-Dplatforms=redox \
|
||||
-Dshader-cache=disabled \
|
||||
-Dc_args="['-Wno-error=implicit-function-declaration','-Wno-error','-std=gnu11','-Dstatic_assert=_Static_assert']" \
|
||||
-Dcpp_args="['-Wno-error=implicit-function-declaration','-Wno-error']" \
|
||||
-Dvulkan-drivers=swrast \
|
||||
-Dshared-glapi=enabled
|
||||
|
||||
# Hack to add LLVM libs, the list can be seen from meson log and check for matches $("${LLVM_CONFIG}" --libs)
|
||||
LLVMLIBS="-lLLVMBitReader -lLLVMCore -lLLVMExecutionEngine -lLLVMInstCombine -lLLVMMCDisassembler"
|
||||
LLVMLIBS+=" -lLLVMMCJIT -lLLVMScalarOpts -lLLVMTransformUtils -lLLVMCoroutines -lLLVMLTO"
|
||||
sed -i "s/ -lOSMesa / -lOSMesa ${LLVMLIBS} -lstdc++ /" "${COOKBOOK_STAGE}/usr/lib/pkgconfig/osmesa.pc"
|
||||
"""
|
||||
@@ -1,15 +1,52 @@
|
||||
# mesa — Mesa 3-D graphics library.
|
||||
#
|
||||
# This recipe builds the Red Bear OS mesa fork maintained at
|
||||
# local/sources/mesa/. The fork is based on upstream Redox mesa
|
||||
# (https://gitlab.redox-os.org/redox-os/mesa, branch redox-24.0)
|
||||
# at commit 0ecd6b66c, with the Red Bear OS 0.2.3 fork of mesa
|
||||
# applied on the local 0.2.3 branch (HEAD a7e54995f).
|
||||
#
|
||||
# Per AGENTS.md, mesa is a big external project (multi-million-line
|
||||
# codebase) and is therefore maintained as a Red Bear fork at
|
||||
# local/sources/mesa/. The mainline recipe is a thin shim that
|
||||
# points the cookbook at the fork via the Local source type.
|
||||
# All Red Bear-specific mesa changes (EGL/GBM/virgl Redox fixes,
|
||||
# include/sys/ioccom.h stub, removal of upstream Android-only
|
||||
# GitLab CI patches) are committed on the fork's 0.2.3 branch
|
||||
# and never live in this recipe.
|
||||
#
|
||||
# Build target surface:
|
||||
# * EGL/GBM/GLES 2.0/3.0 + OSMesa + LLVMpipe + virgl
|
||||
# * Gallium drivers: swrast (software), virgl (virtio-gpu), iris
|
||||
# (Intel Gen8+), crocus (Intel Gen4-7)
|
||||
# * Vulkan drivers: swrast (software fallback)
|
||||
# * Wayland EGL platform: -Dplatforms=wayland
|
||||
# * DRM/KMS path: /scheme/drm/cardN via libdrm (Red Bear fork)
|
||||
#
|
||||
# Build environment requirements:
|
||||
# * LLVM 21.x with the x86_64-unknown-redox target (llvm21)
|
||||
# * libdrm 2.4.x (Red Bear fork at local/sources/libdrm/)
|
||||
# * libwayland (Redox libwayland fork, drm-client/server/egl/drm)
|
||||
# * wayland-protocols 1.x
|
||||
#
|
||||
# Version history:
|
||||
# * 0.1.0 (2026-04) — initial import, upstream redox-24.0 (0ecd6b66c)
|
||||
# * 0.2.3 (v6.0 2026) — Redox EGL/GBM/virgl fixes + ioccom.h stub
|
||||
|
||||
[source]
|
||||
git = "https://gitlab.redox-os.org/redox-os/mesa.git"
|
||||
upstream = "https://gitlab.freedesktop.org/mesa/mesa"
|
||||
branch = "redox-24.0"
|
||||
shallow_clone = true
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"expat",
|
||||
"libdrm",
|
||||
"liborbital",
|
||||
"libwayland",
|
||||
"llvm21",
|
||||
"wayland-protocols",
|
||||
"zlib",
|
||||
]
|
||||
dev-dependencies = [
|
||||
@@ -24,7 +61,9 @@ export LLVM_CONFIG="${TARGET}-llvm-config"
|
||||
if [ -x "${HOME}/.redoxer/${TARGET}/toolchain/bin/llvm-config" ]; then
|
||||
export COOKBOOK_HOST_SYSROOT="${HOME}/.redoxer/${TARGET}/toolchain"
|
||||
fi
|
||||
export LDFLAGS+=" -lorbital"
|
||||
# Wayland EGL platform: link against wayland-{client,server,egl,drm}.
|
||||
# This replaces the v6.0-pre Orbital EGL path; see plan §2.1.
|
||||
export LDFLAGS+=" -lwayland-client -lwayland-server -lwayland-egl -lwayland-drm"
|
||||
|
||||
mkdir -p .cookbook-tools
|
||||
ln -sf "$(command -v "${LLVM_CONFIG}")" .cookbook-tools/llvm-config
|
||||
@@ -44,7 +83,7 @@ cookbook_meson \
|
||||
-Dgallium-drivers=swrast,virgl,iris,crocus \
|
||||
-Dllvm=enabled \
|
||||
-Dosmesa=true \
|
||||
-Dplatforms=redox \
|
||||
-Dplatforms=wayland \
|
||||
-Dshader-cache=disabled \
|
||||
-Dc_args="['-Wno-error=implicit-function-declaration','-Wno-error','-std=gnu11','-Dstatic_assert=_Static_assert']" \
|
||||
-Dcpp_args="['-Wno-error=implicit-function-declaration','-Wno-error']" \
|
||||
@@ -52,7 +91,11 @@ cookbook_meson \
|
||||
-Dshared-glapi=enabled
|
||||
|
||||
# Hack to add LLVM libs, the list can be seen from meson log and check for matches $("${LLVM_CONFIG}" --libs)
|
||||
LLVMLIBS="-lLLVMBitReader -lLLVMCore -lLLVMExecutionEngine -lLLVMInstCombine -lLLVMMCDisassembler"
|
||||
LLVMLIBS="-lLLVMBitReader -lLLVMCore -lLLVMExecutionEngine -lLLVMInstCombine -lLLVMMCDisassembler"
|
||||
LLVMLIBS+=" -lLLVMMCJIT -lLLVMScalarOpts -lLLVMTransformUtils -lLLVMCoroutines -lLLVMLTO"
|
||||
sed -i "s/ -lOSMesa / -lOSMesa ${LLVMLIBS} -lstdc++ /" "${COOKBOOK_STAGE}/usr/lib/pkgconfig/osmesa.pc"
|
||||
"""
|
||||
|
||||
[package]
|
||||
version = "0.2.3"
|
||||
description = "mesa 0.2.3 (v6.0 2026) — Mesa 3-D graphics library, Red Bear OS fork at local/sources/mesa/ (0.2.3 branch HEAD a7e54995f). Provides EGL/GBM/GLES2/3/OSMesa via the Wayland EGL platform, Gallium drivers swrast/virgl/iris/crocus, software Vulkan, and the Redox EGL/GBM/virgl fixes (dumb-prime fallback, virgl disk cache disabled for missing dl_iterate_phdr, include/sys/ioccom.h stub for DRM uapi ioctl number macros). Phase 2.1 of the v6.0 console-to-KDE plan."
|
||||
|
||||
Submodule recipes/libs/mesa/source deleted from 0ecd6b66c3
Reference in New Issue
Block a user