Files
RedBear-OS/local/recipes/wayland/libwayland/recipe.toml
T
vasilito 90a264f1b1 libwayland: disable wayland-scanner (host build fix); libdrm: remove orphaned fork cache (v6.0 2026)
Two related cleanups for the libdrm Rule 2 migration (commit 5f5eec1c4):

  * libwayland: add -Dscanner=false to cookbook_meson, with a 20-line
    comment explaining the rationale. Without this flag, libwayland's
    meson.build builds a `wayland-scanner` executable for the *target*
    (Redox). The resulting binary has /lib/ld64.so.1 as its ELF
    interpreter (Redox's loader) and is useless on the build host. The
    pkgconfig that libwayland installs (wayland-scanner.pc) then points
    `wayland_scanner` to this Redox binary, and downstream consumers
    (mesa, wayland-protocols) pick it up via
    dependency('wayland-scanner'). When the cookbook's redoxer sandbox
    tries to exec it on the host, the host kernel can't find
    /lib/ld64.so.1 and the build fails with 'required file not found'.

    Disabling the scanner means libwayland doesn't install
    wayland-scanner to the sysroot. Downstream consumers then fall
    through to the host's /usr/bin/wayland-scanner (a proper
    x86_64-linux-gnu binary that works on the build host). This
    matches what wayland-protocols already does in its own meson.build
    (see its redox.patch in the recipe).

  * libdrm: remove 4 orphaned source-cache files that were left over
    from the libdrm Local source fork at local/sources/libdrm/ (deleted
    in commit 5f5eec1c4). The 4 files were the in-tree Red Bear edits
    that are now external patches in local/patches/libdrm/:

      - source/virtgpu_drm.h       DELETED (was in 01-drm-ioctl-bridge.patch)
      - source/xf86drm.c           MODIFIED (most edits moved to patch)
      - source/xf86drmMode.c       MODIFIED (most edits moved to patch)
      - source/xf86drm_redox.h     DELETED (was in 01-drm-ioctl-bridge.patch)

    The local/recipes/libs/libdrm/source/ cache is now empty (only
    upstream files) and is regenerated by 'repo cook' from the upstream
    git URL specified in the recipe. These 4 files are no longer
    touched by the build system.

Fixes the build correctness issue where downstream mesa/wayland-protocols
builds would fail with 'required file not found: /lib/ld64.so.1' due to
wayland-scanner being built for the wrong target. The fix mirrors what
upstream Redox's wayland-protocols recipe does in its own meson.build.
2026-06-10 01:45:14 +03:00

43 lines
1.6 KiB
TOML

#TODO: Requires Redox compatibility patching for missing Linux header paths and
# some POSIX/Linux-only flags during cross-builds.
# redox.patch restores the Redox compatibility stubs plus Meson scanner detection.
[source]
tar = "https://gitlab.freedesktop.org/wayland/wayland/-/releases/1.24.0/downloads/wayland-1.24.0.tar.xz"
patches = ["redox.patch"]
[build]
template = "custom"
dependencies = [
"relibc",
"libffi",
"expat",
"libxml2",
]
script = """
DYNAMIC_INIT
# IMPORTANT: `-Dscanner=false` is required for the Redox build.
#
# libwayland's default `-Dscanner=true` builds a `wayland-scanner`
# executable for the *target* (Redox). The resulting binary has
# /lib/ld64.so.1 as its ELF interpreter (Redox's loader) and is
# useless on the build host. The pkgconfig that libwayland
# installs (wayland-scanner.pc) then points `wayland_scanner` to
# this Redox binary, and downstream consumers (mesa,
# wayland-protocols) pick it up via `dependency('wayland-scanner')`.
# When the cookbook's redoxer sandbox tries to exec it on the host,
# the host kernel can't find /lib/ld64.so.1 and the build fails
# with "required file not found".
#
# Disabling the scanner here means libwayland doesn't install
# wayland-scanner to the sysroot. Downstream consumers then fall
# through to the host's /usr/bin/wayland-scanner (which is a
# proper x86_64-linux-gnu binary that works on the build host).
# This matches what wayland-protocols already does in its own
# meson.build (see its redox.patch in the recipe).
cookbook_meson -Ddocumentation=false -Dtests=false -Ddtd_validation=false -Dscanner=false -Dc_args=-Wno-error
"""
[package]
dependencies = ["libffi"]