x11: promote the xcb/X11 client stack out of wip and wire it into redbear-full

Reverses this session's approach. Gating X11 out kept producing failures in a
new syntactic shape each build -- API calls, else-chains, standalone statements,
inert #ifdef guards, bare X11/xcb includes, namespace definitions -- six shapes,
each needing its own rule in gate-kx11extras.py. Providing the real headers and
libraries removes the cause rather than adding a seventh rule.

The stack was already ported and building; it was just parked in recipes/wip.
Verified before promoting: xcb-proto, libxcb, libx11, x11proto and xtrans cook
(cached from earlier builds), libxrender and libxft built successfully, and the
key headers are staged -- xcb/xcb.h, X11/Xlib.h, X11/Xft/Xft.h -- with 25 libs
and 33 headers from libxcb alone. Real upstream releases pinned by blake3
(libxcb 1.17.0, libX11 1.8.12), not stubs.

Promoted: x11proto-kb, xtrans, xcb-proto, libxcb, libx11, libxdmcp, libxext,
libxfixes, libxi, libxrender, libxft, libice, libsm (recipes/x11/) and
libpthread-stubs (recipes/libs/). x11proto was already in the config.

xcb is needed on Wayland too -- Qt's xcb platform plugin, libxkbcommon-x11 and
KDE's XWayland integration all reference it -- so this is not X11-only value.
These remain CLIENT libraries: isPlatformX11() stays false at runtime and the
X11 paths do not execute unless Xwayland is up. The port buys compilation
compatibility, not X11 functionality.
This commit is contained in:
2026-08-04 21:50:13 +03:00
parent d8d2ed837c
commit 218a1f86b0
24 changed files with 28 additions and 331 deletions
+24
View File
@@ -269,6 +269,30 @@ wireplumber = {}
# driver, so it is silent until a /scheme/audio driver exists — see
# local/recipes/libs/libcanberra/recipe.toml.
libcanberra = {}
# X11/xcb client stack. Promoted out of recipes/wip/x11 -- real upstream
# releases (libxcb 1.17.0, libX11 1.8.12) pinned by blake3, already building
# for Redox.
#
# Red Bear is Wayland-only, so these CLIENT libraries have no X server to talk
# to: isPlatformX11() stays false at runtime and the X11 code paths do not
# execute unless Xwayland is brought up. They are here so upstream KDE/Qt code
# COMPILES as written instead of needing a gate per X11 syntactic shape -- six
# distinct shapes had accumulated before this.
x11proto-kb = {}
xtrans = {}
xcb-proto = {}
libpthread-stubs = {}
libxdmcp = {}
libxcb = {}
libx11 = {}
libxext = {}
libxfixes = {}
libxi = {}
libxrender = {}
libxft = {}
libice = {}
libsm = {}
libvorbis = {}
libogg = {}
+1
View File
@@ -0,0 +1 @@
../../../../local/recipes/libs/libcanberra
@@ -1,19 +0,0 @@
[package]
name = "libcanberra"
version = "0.30"
#TODO no audio backend supported
[source]
tar = "http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz"
blake3 = "ea02f4b5a00bfffce1d29ce73e1cf5351027208cbeb58bf9954e84ad120e6daa"
script = """
autotools_recursive_regenerate
"""
[build]
dependencies = [
"gtk3",
"libtool",
"libvorbis",
]
template = "configure"
+1
View File
@@ -0,0 +1 @@
../../../local/recipes/qt/qt5compat
-142
View File
@@ -1,142 +0,0 @@
[package]
name = "qt5compat"
version = "6.11"
#TODO: Qt6 Qt5Compat — cross-compiled for Redox. The core5 compatibility library is expected to build now; QtQuick-backed imports remain optional until the wider QML runtime stack is validated.
# Provides: libQt6Core5Compat (and QML imports only when QtQuick is already present in the sysroot).
[source]
tar = "https://download.qt.io/official_releases/qt/6.11/6.11.0/submodules/qt5compat-everywhere-src-6.11.0.tar.xz"
blake3 = "be3bae15db525e9e68296f7a6260e433ef831d8a43ad24ab20e23743b2f677a7"
[build]
template = "custom"
dependencies = [
"qtbase",
"libiconv",
]
script = """
DYNAMIC_INIT
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
python - <<'PY'
import os
from pathlib import Path
path = Path(os.environ["COOKBOOK_SOURCE"]) / "cmake/FindWrapIconv.cmake"
text = path.read_text()
text = text.replace('set(CMAKE_REQUIRE_LIBRARIES "iconv")', 'set(CMAKE_REQUIRE_LIBRARIES "iconv;libiconv")')
text = text.replace('target_link_libraries(WrapIconv::WrapIconv INTERFACE iconv)', 'target_link_libraries(WrapIconv::WrapIconv INTERFACE iconv libiconv)')
text = text.replace('set(WrapIconv_FOUND 1)', 'if(HAVE_ICONV OR HAVE_ICONV_WITH_LIB)\\n set(WrapIconv_FOUND ON)\\nelse()\\n set(WrapIconv_FOUND OFF)\\nendif()')
path.write_text(text)
PY
# Sysroot path fix: the cookbook only symlinks sysroot/{bin,include,lib,share} -> usr/
# but Qt6 cmake targets reference ${_IMPORT_PREFIX}/{plugins,mkspecs,metatypes,modules}.
for qtdir in plugins mkspecs metatypes modules; do
if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ ! -e "${COOKBOOK_SYSROOT}/${qtdir}" ]; then
ln -s "usr/${qtdir}" "${COOKBOOK_SYSROOT}/${qtdir}"
fi
done
rm -f CMakeCache.txt
rm -rf CMakeFiles
cmake "${COOKBOOK_SOURCE}" \
-G Ninja \
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
-DQT_HOST_PATH="${HOST_BUILD}" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
-DQT_BUILD_EXAMPLES=OFF \
-DQT_BUILD_TESTS=OFF \
-DQT_GENERATE_SBOM=OFF \
-Wno-dev
cmake --build . -j"${COOKBOOK_MAKE_JOBS}"
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
mkdir -p "${COOKBOOK_STAGE}/usr/lib"
for lib in lib/libQt6*.so*; do
[ -f "${lib}" ] && cp -an "${lib}" "${COOKBOOK_STAGE}/usr/lib/"
done
for lib in lib/libQt6*.a; do
[ -f "${lib}" ] && cp -an "${lib}" "${COOKBOOK_STAGE}/usr/lib/"
done
if [ -d "lib/cmake" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/lib/cmake"
cp -a lib/cmake/Qt6* "${COOKBOOK_STAGE}/usr/lib/cmake/" 2>/dev/null || true
fi
if [ -d "lib/pkgconfig" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/lib/pkgconfig"
cp -a lib/pkgconfig/*.pc "${COOKBOOK_STAGE}/usr/lib/pkgconfig/" 2>/dev/null || true
fi
if [ -d "include" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/include"
cp -a include/* "${COOKBOOK_STAGE}/usr/include/" 2>/dev/null || true
fi
if [ -d "plugins" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/plugins"
cp -a plugins/* "${COOKBOOK_STAGE}/usr/plugins/" 2>/dev/null || true
fi
if [ -d "qml" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/qml"
cp -a qml/* "${COOKBOOK_STAGE}/usr/qml/" 2>/dev/null || true
fi
for lib in "${COOKBOOK_STAGE}/usr/lib/libQt6"*.so.*; do
[ -f "${lib}" ] || continue
patchelf --remove-rpath "${lib}" 2>/dev/null || true
done
if [ -d "${COOKBOOK_STAGE}/usr/plugins" ]; then
find "${COOKBOOK_STAGE}/usr/plugins" -name '*.so' -exec patchelf --remove-rpath {} + 2>/dev/null || true
fi
BUILD_DIR="${COOKBOOK_BUILD}"
if [ -d "${COOKBOOK_STAGE}/usr/lib/cmake" ]; then
find "${COOKBOOK_STAGE}/usr/lib/cmake" -name '*.cmake' -exec sed -i \
"s|${BUILD_DIR}|/usr|g" {} + 2>/dev/null || true
fi
SYSROOT="${COOKBOOK_SYSROOT}"
if [ -d "${COOKBOOK_STAGE}/usr/lib/cmake" ]; then
find "${COOKBOOK_STAGE}/usr/lib/cmake" -name '*.cmake' -exec sed -i \
"s|/usr/include|${SYSROOT}/include|g" {} + 2>/dev/null || true
python3 - <<'PY' "${COOKBOOK_STAGE}/usr/lib/cmake" "${SYSROOT}"
from pathlib import Path
import sys
cmake_dir = Path(sys.argv[1])
sysroot = sys.argv[2]
for path in cmake_dir.rglob('*.cmake'):
text = path.read_text()
text = text.replace('${_IMPORT_PREFIX}/lib/', '${PACKAGE_PREFIX_DIR}/lib/')
text = text.replace(f'{sysroot}/lib/', '${PACKAGE_PREFIX_DIR}/lib/')
text = text.replace(f'{sysroot}/include', '${PACKAGE_PREFIX_DIR}/include')
text = text.replace('"/usr/lib/libQt6', '"${PACKAGE_PREFIX_DIR}/lib/libQt6')
text = text.replace('"/usr/include', '"${PACKAGE_PREFIX_DIR}/include')
path.write_text(text)
PY
fi
if [ -d "${COOKBOOK_STAGE}/usr/include" ]; then
mkdir -p "${SYSROOT}/include"
cp -a "${COOKBOOK_STAGE}/usr/include/"* "${SYSROOT}/include/" 2>/dev/null || true
fi
if [ -d "${COOKBOOK_STAGE}/usr/lib/cmake" ]; then
mkdir -p "${SYSROOT}/lib/cmake"
cp -a "${COOKBOOK_STAGE}/usr/lib/cmake/Qt6"* "${SYSROOT}/lib/cmake/" 2>/dev/null || true
fi
mkdir -p "${SYSROOT}/lib"
cp -a "${COOKBOOK_STAGE}/usr/lib/libQt6"* "${SYSROOT}/lib/" 2>/dev/null || true
if [ -d "${COOKBOOK_STAGE}/usr/plugins" ]; then
mkdir -p "${SYSROOT}/plugins"
cp -a "${COOKBOOK_STAGE}/usr/plugins/"* "${SYSROOT}/plugins/" 2>/dev/null || true
fi
if [ -d "${COOKBOOK_STAGE}/usr/qml" ]; then
mkdir -p "${SYSROOT}/qml"
cp -a "${COOKBOOK_STAGE}/usr/qml/"* "${SYSROOT}/qml/" 2>/dev/null || true
fi
"""
+1
View File
@@ -0,0 +1 @@
../../../local/recipes/qt/qttools
-170
View File
@@ -1,170 +0,0 @@
[package]
name = "qttools"
version = "6.11"
#TODO: Qt6 tools — cross-compiled against the current Redox Qt 6.11 stack.
# The qtbase-backed slice is intended to build for Wave 1; Assistant/Designer/QDoc remain
# constrained by broader Qt dependency/runtime gaps and still need real runtime validation.
[source]
tar = "https://download.qt.io/official_releases/qt/6.11/6.11.0/submodules/qttools-everywhere-src-6.11.0.tar.xz"
[build]
template = "custom"
dependencies = [
"qtbase",
]
script = """
DYNAMIC_INIT
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
TOOLS_HOST="${COOKBOOK_ROOT}/build/qt-tools-host"
mkdir -p "${HOST_BUILD}/include/QtDBus/6.11.0/QtDBus"
python - <<'PY'
import os
from pathlib import Path
path = Path(os.environ["COOKBOOK_SOURCE"]) / "src/CMakeLists.txt"
text = path.read_text()
replacements = {
'if(QT_FEATURE_designer)\\n add_subdirectory(designer)\\nendif()': 'if(QT_FEATURE_designer)\\n # add_subdirectory(designer) # disabled for Redox Wave 1\\nendif()',
'if(QT_FEATURE_assistant)\\n add_subdirectory(assistant)\\nendif()': 'if(QT_FEATURE_assistant)\\n # add_subdirectory(assistant) # disabled for Redox Wave 1\\nendif()',
'if(QT_FEATURE_qtattributionsscanner)\\n add_subdirectory(qtattributionsscanner)\\nendif()': 'if(QT_FEATURE_qtattributionsscanner)\\n # add_subdirectory(qtattributionsscanner) # disabled for Redox Wave 1\\nendif()',
'add_subdirectory(qdoc)': '# add_subdirectory(qdoc) # disabled for Redox Wave 1',
}
for old, new in replacements.items():
text = text.replace(old, new)
path.write_text(text)
PY
if [ ! -d "${HOST_BUILD}/lib/cmake/Qt6LinguistTools" ]; then
rm -rf "${TOOLS_HOST}"
mkdir -p "${TOOLS_HOST}"
env \
-u CPPFLAGS \
-u LDFLAGS \
-u PKG_CONFIG_ALLOW_CROSS \
-u PKG_CONFIG_PATH \
-u PKG_CONFIG_LIBDIR \
-u PKG_CONFIG_SYSROOT_DIR \
-u CFLAGS_x86_64_unknown_redox \
-u CXXFLAGS_x86_64_unknown_redox \
-u LDFLAGS_x86_64_unknown_redox \
cmake -S "${COOKBOOK_SOURCE}" -B "${TOOLS_HOST}" \
-DCMAKE_C_COMPILER=/usr/bin/cc \
-DCMAKE_CXX_COMPILER=/usr/bin/c++ \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${HOST_BUILD}" \
-DCMAKE_PREFIX_PATH="${HOST_BUILD}" \
-DQT_BUILD_EXAMPLES=OFF \
-DQT_BUILD_TESTS=OFF \
-DQT_GENERATE_SBOM=OFF \
-DQT_INSTALL_XDG_DESKTOP_ENTRIES=OFF \
-DQT_FEATURE_qdoc=OFF \
-Wno-dev
cmake --build "${TOOLS_HOST}" --target lrelease lupdate lconvert -j"${COOKBOOK_MAKE_JOBS}"
mkdir -p "${HOST_BUILD}/bin"
cp -a "${TOOLS_HOST}/bin/lrelease" "${HOST_BUILD}/bin/"
cp -a "${TOOLS_HOST}/bin/lupdate" "${HOST_BUILD}/bin/"
cp -a "${TOOLS_HOST}/bin/lconvert" "${HOST_BUILD}/bin/"
mkdir -p "${HOST_BUILD}/lib/cmake"
cp -a "${TOOLS_HOST}/lib/cmake/Qt6LinguistTools" "${HOST_BUILD}/lib/cmake/"
fi
# Sysroot path fix: the cookbook only symlinks sysroot/{bin,include,lib,share} → usr/
# but Qt6 cmake targets reference ${_IMPORT_PREFIX}/{plugins,mkspecs,metatypes,modules}
# which resolve to sysroot/{plugins,mkspecs,metatypes,modules}.
for qtdir in plugins mkspecs metatypes modules; do
if [ -d "${COOKBOOK_SYSROOT}/usr/${qtdir}" ] && [ ! -e "${COOKBOOK_SYSROOT}/${qtdir}" ]; then
ln -s "usr/${qtdir}" "${COOKBOOK_SYSROOT}/${qtdir}"
fi
done
rm -f CMakeCache.txt
rm -rf CMakeFiles
cmake "${COOKBOOK_SOURCE}" \
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
-DQT_HOST_PATH="${HOST_BUILD}" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
-DQT_BUILD_EXAMPLES=OFF \
-DQT_BUILD_TESTS=OFF \
-DQT_GENERATE_SBOM=OFF \
-DQT_INSTALL_XDG_DESKTOP_ENTRIES=OFF \
-DQT_FEATURE_qdoc=OFF \
-Wno-dev
cmake --build . -j"${COOKBOOK_MAKE_JOBS}"
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
mkdir -p "${COOKBOOK_STAGE}/usr/lib"
for lib in lib/libQt6*.so*; do
[ -f "${lib}" ] && cp -an "${lib}" "${COOKBOOK_STAGE}/usr/lib/"
done
for lib in lib/libQt6*.a; do
[ -f "${lib}" ] && cp -an "${lib}" "${COOKBOOK_STAGE}/usr/lib/"
done
if [ -d "bin" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/bin"
cp -a bin/* "${COOKBOOK_STAGE}/usr/bin/" 2>/dev/null || true
fi
if [ -d "libexec" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/libexec"
cp -a libexec/* "${COOKBOOK_STAGE}/usr/libexec/" 2>/dev/null || true
fi
if [ -d "lib/cmake" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/lib/cmake"
cp -a lib/cmake/Qt6* "${COOKBOOK_STAGE}/usr/lib/cmake/" 2>/dev/null || true
fi
if [ -d "lib/pkgconfig" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/lib/pkgconfig"
cp -a lib/pkgconfig/*.pc "${COOKBOOK_STAGE}/usr/lib/pkgconfig/" 2>/dev/null || true
fi
if [ -d "include" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/include"
cp -a include/* "${COOKBOOK_STAGE}/usr/include/" 2>/dev/null || true
fi
if [ -d "plugins" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/plugins"
cp -a plugins/* "${COOKBOOK_STAGE}/usr/plugins/" 2>/dev/null || true
fi
if [ -d "${COOKBOOK_STAGE}/usr/plugins" ]; then
mkdir -p "${COOKBOOK_STAGE}/plugins"
cp -a "${COOKBOOK_STAGE}/usr/plugins/"* "${COOKBOOK_STAGE}/plugins/" 2>/dev/null || true
fi
if [ -d "share" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/share"
cp -a share/* "${COOKBOOK_STAGE}/usr/share/" 2>/dev/null || true
fi
if [ -d "translations" ]; then
mkdir -p "${COOKBOOK_STAGE}/usr/translations"
cp -a translations/* "${COOKBOOK_STAGE}/usr/translations/" 2>/dev/null || true
fi
for lib in "${COOKBOOK_STAGE}/usr/lib/libQt6"*.so.*; do
[ -f "${lib}" ] || continue
patchelf --remove-rpath "${lib}" 2>/dev/null || true
done
find "${COOKBOOK_STAGE}/usr/plugins" -name '*.so' -exec patchelf --remove-rpath {} + 2>/dev/null || true
find "${COOKBOOK_STAGE}/usr/bin" -type f -exec patchelf --remove-rpath {} + 2>/dev/null || true
find "${COOKBOOK_STAGE}/usr/libexec" -type f -exec patchelf --remove-rpath {} + 2>/dev/null || true
BUILD_DIR="${COOKBOOK_BUILD}"
find "${COOKBOOK_STAGE}/usr/lib/cmake" -name '*.cmake' -exec sed -i \
"s|${BUILD_DIR}|/usr|g" {} + 2>/dev/null || true
SYSROOT="${COOKBOOK_SYSROOT}"
find "${COOKBOOK_STAGE}/usr/lib/cmake" -name '*.cmake' -exec sed -i \
"s|/usr/include|${SYSROOT}/include|g" {} + 2>/dev/null || true
mkdir -p "${SYSROOT}/include"
cp -a "${COOKBOOK_STAGE}/usr/include/"* "${SYSROOT}/include/" 2>/dev/null || true
mkdir -p "${SYSROOT}/lib/cmake"
cp -a "${COOKBOOK_STAGE}/usr/lib/cmake/Qt6"* "${SYSROOT}/lib/cmake/" 2>/dev/null || true
mkdir -p "${SYSROOT}/lib"
cp -a "${COOKBOOK_STAGE}/usr/lib/libQt6"* "${SYSROOT}/lib/" 2>/dev/null || true
"""
+1
View File
@@ -0,0 +1 @@
../../../local/recipes/wayland/xwayland