libdrm: migrate to Red Bear fork; apply redox patches in-tree
Migrate the libdrm recipe from the tar+patches shape (redox.patch + four P1-P4 patches from local/patches/libdrm/) to a Local source pointing at the new Red Bear fork at local/sources/libdrm/. The fork is based on upstream libdrm 2.4.125 (https://gitlab.freedesktop.org/mesa/libdrm) and already has the full redox.patch series applied in-tree. The P1-P4 patch files referenced from the previous recipe (P1-drm-ioctl-bridge, P2-drm-get-pci-info, P3-drm-get-version-driver-name, P4-drmGetDeviceFromDevId-redox) were already merged into redox.patch and no longer existed in local/patches/. Consolidating everything into a single in-tree fork is the durable form per the FULL FORK PRINCIPLE. The fork's redox divergence covers: - include/drm/drm.h: include <sys/ioctl.h> on __redox__ instead of <sys/ioccom.h> - xf86drm.h: Redox-aware ioctl type definitions - xf86drm.c: major()/minor()/makedev() macros from musl for __redox__, open_memstream fallback path (returns NULL with diagnostic on __redox__), redox_drm_write_all helper, and the drmOpen / drmGetDeviceFromDevId / etc. rewrites that dispatch through scheme: paths on Redox - xf86drmMode.c: Redox shim for drmModeGetResources / drmModeGetConnector / etc. and the mode probing path - xf86drm_redox.h: new header providing the Redox-side helper API (open scheme:, drm fd adaptation, dev_t packing) used by xf86drm.c Recipe changes: - source: tar + patches list -> Local { path = '../../../../local/sources/libdrm' } (the recipe lives under both recipes/wip/x11/libdrm and recipes/libs/libdrm symlinks into local/recipes/libs/libdrm; the four-.. path resolves correctly from both locations to local/sources/libdrm). - version: bumped to 0.2.3 (Red Bear fork tracking upstream 2.4.125). - description: marked v6.0 2026 Red Bear fork. - removed: redox.patch and source/ / source.tar / target/ artifacts under the recipe directory; they are no longer referenced and the fork is the single source of truth. Verified: ./target/release/repo cook libdrm (with REDBEAR_ALLOW_PROTECTED_FETCH=1) builds successfully and publishes libdrm 0.2.3 to repo/x86_64-unknown-redox/ with the fork's commit identifier pinned.
This commit is contained in:
@@ -1,7 +1,31 @@
|
||||
# libdrm — DRM/KMS user-space library for Red Bear OS.
|
||||
#
|
||||
# This recipe builds the Red Bear libdrm fork maintained at
|
||||
# local/sources/libdrm/. The fork is based on upstream libdrm 2.4.125
|
||||
# (https://gitlab.freedesktop.org/mesa/libdrm) with the redox.patch
|
||||
# series applied in-tree. The fork adds the Redox-side ioctl/ioctl-com
|
||||
# and scheme: dispatch path needed by redox-drm and Mesa radeonsi/iris.
|
||||
#
|
||||
# On Redox, libdrm talks to:
|
||||
# * redox-drm (local/recipes/gpu/redox-drm)
|
||||
# * scheme: memory, scheme:irq, scheme:pci
|
||||
# * relibc (for the open_memstream fallback and major/minor shims)
|
||||
#
|
||||
# The previous P1-P4 patch series referenced by the recipe
|
||||
# (P1-drm-ioctl-bridge, P2-drm-get-pci-info, P3-drm-get-version-driver-name,
|
||||
# P4-drmGetDeviceFromDevId-redox) is now folded into the single
|
||||
# redox.patch that ships inside the source fork. No external patch
|
||||
# files are needed; the build is fully offline and reproducible from
|
||||
# the fork's git HEAD.
|
||||
#
|
||||
# Build target: amdgpu=enabled. intel/nouveau/radeon/vmwgfx are
|
||||
# disabled by default because the Redox GPU driver surface is
|
||||
# brought up through redox-drm and we only need the AMD backend for
|
||||
# the redbear-full target's radeonsi Mesa path. Tests are disabled
|
||||
# because the cross-compiled test binaries cannot run in the
|
||||
# cookbook build environment.
|
||||
[source]
|
||||
tar = "https://gitlab.freedesktop.org/mesa/libdrm/-/archive/libdrm-2.4.125/libdrm-libdrm-2.4.125.tar.gz"
|
||||
blake3 = "33e6448252639f4ff8a8cd30129b335c5d85356c1c93f8d77a79221003b14f66"
|
||||
patches = ["redox.patch", "../../../local/patches/libdrm/P1-drm-ioctl-bridge.patch", "../../../local/patches/libdrm/P2-drm-get-pci-info.patch", "../../../local/patches/libdrm/P3-drm-get-version-driver-name.patch", "../../../local/patches/libdrm/P4-drmGetDeviceFromDevId-redox.patch"]
|
||||
path = "../../../../local/sources/libdrm"
|
||||
|
||||
[build]
|
||||
template = "meson"
|
||||
@@ -14,3 +38,7 @@ mesonflags = [
|
||||
"-Dtests=false",
|
||||
"-Dc_args=-Wno-unused-function",
|
||||
]
|
||||
|
||||
[package]
|
||||
version = "0.2.3"
|
||||
description = "libdrm 0.2.3 (v6.0 2026) — DRM/KMS user-space library, Red Bear fork. Provides libdrm.so.2, the amdgpu helpers, the xf86drm device-open helpers, the mode-setting API, and the open_memstream/major/minor portability shims required to build Mesa radeonsi and the redox-drm scheme against the Redox target. Forked from upstream libdrm 2.4.125 (gitlab.freedesktop.org/mesa/libdrm); the redox.patch series is applied in-tree at local/sources/libdrm/."
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user