libs: replace libxcvt-stub with real libxcvt

The libxcvt-stub exposed a struct libxcvt_mode plus a stub function
that always returned NULL, blocking KWin and any Mesa backend from
computing CVT (Coordinated Video Timings) display modes for mode
setting. This meant no dynamically-resolved display timing could be
generated for non-preferred modes on the redbear-full build.

Replace it with the real libxcvt (freedesktop.org/xorg/lib/libxcvt
fork) — the full upstream C source, built via Meson, that provides
libxcvt_generate_mode() with full CVT Reduced / standard timing
calculation, libxcvt_mode_list_free(), and exports libxcvt.pc plus
the proper include path. Recipe bumped to 0.2.3 with v6.0 2026
description.
This commit is contained in:
2026-06-09 10:31:08 +03:00
parent 8c35e8b4b1
commit a6ad6b0a89
4 changed files with 4 additions and 57 deletions
@@ -1,56 +0,0 @@
#TODO: libxcvt stub — provides libxcvt pkgconfig for KWin linking
[source]
path = "source"
[build]
template = "custom"
script = """
DYNAMIC_INIT
mkdir -p "${COOKBOOK_STAGE}/usr/include"
mkdir -p "${COOKBOOK_STAGE}/usr/lib/pkgconfig"
cat > "${COOKBOOK_STAGE}/usr/include/libxcvt.h" << 'EOF'
#pragma once
#include <stdint.h>
#include <stddef.h>
struct libxcvt_mode {
uint32_t hdisplay;
uint32_t vdisplay;
uint32_t dotclock;
uint32_t hsync_start;
uint32_t hsync_end;
uint32_t htotal;
uint32_t vsync_start;
uint32_t vsync_end;
uint32_t vtotal;
uint32_t hskew;
uint32_t vscan;
uint32_t vrefresh;
uint32_t flags;
uint32_t type;
};
struct libxcvt_mode *libxcvt_generate_mode(int hdisplay, int vdisplay, float vrefresh, bool reduced, bool interlaced) __attribute__((weak));
void libxcvt_mode_list_free(struct libxcvt_mode **modes) __attribute__((weak));
EOF
cat > stub_xcvt.c << 'CEOF'
struct libxcvt_mode *libxcvt_generate_mode(int h, int v, float r, _Bool red, _Bool inter) { (void)h; (void)v; (void)r; (void)red; (void)inter; return 0; }
void libxcvt_mode_list_free(struct libxcvt_mode **m) { (void)m; }
CEOF
x86_64-unknown-redox-gcc -shared -fPIC -o "${COOKBOOK_STAGE}/usr/lib/libxcvt.so" stub_xcvt.c
cat > "${COOKBOOK_STAGE}/usr/lib/pkgconfig/libxcvt.pc" << 'EOF'
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libxcvt
Description: libxcvt stub for Redox
Version: 0.1.3
Libs: -L${libdir} -lxcvt
Cflags: -I${includedir}
EOF
"""
+4
View File
@@ -8,3 +8,7 @@ DYNAMIC_INIT
cookbook_meson
"""
[package]
version = "0.2.3"
description = "libxcvt — VESA CVT (Coordinated Video Timings) standard mode calculation library. Real upstream source (v6.0 2026 fork of freedesktop.org/xorg/lib/libxcvt) compiled via Meson. Replaces the prior libxcvt-stub that returned NULL for every mode."
-1
View File
@@ -1 +0,0 @@
../../local/recipes/libs/libxcvt-stub