config: add x11proto dependency for libxau and SDDM

- Add x11proto to redbear-full.toml package list
- libxau recipe updated with x11proto dependency and custom build script
- Fixes libxau build failure: 'Package xproto was not found'
This commit is contained in:
2026-06-20 14:57:46 +03:00
parent c98b3ad7c1
commit 04b7641e85
24865 changed files with 7396682 additions and 483 deletions
+1
View File
@@ -208,6 +208,7 @@ symlink "../../local/recipes/system/redbear-notifications" "recipes/system/redbe
symlink "../../local/recipes/system/redbear-upower" "recipes/system/redbear-upower"
symlink "../../local/recipes/system/redbear-udisks" "recipes/system/redbear-udisks"
symlink "../../local/recipes/system/redbear-polkit" "recipes/system/redbear-polkit"
symlink "../../local/recipes/system/redbear-power" "recipes/system/redbear-power"
# Core additions
mkdir -p recipes/core
+12 -10
View File
@@ -203,18 +203,12 @@ if [ "$NO_CACHE" != "1" ]; then
for src in relibc kernel base bootloader installer; do
src_dir="$PROJECT_ROOT/local/sources/$src"
pkgar="$PROJECT_ROOT/repo/x86_64-unknown-redox/$src.pkgar"
fingerprint="$PROJECT_ROOT/repo/x86_64-unknown-redox/$src.source-fingerprint"
if [ -d "$src_dir/.git" ] && [ -f "$pkgar" ]; then
src_commit=$(git -C "$src_dir" rev-parse HEAD 2>/dev/null || echo "")
pkgar_commit=$(python3 -c "
import tomllib
try:
with open('$pkgar'.replace('.pkgar','.toml'),'rb') as f:
d = tomllib.load(f)
print(d.get('commit_identifier',''))
except: pass
" 2>/dev/null || echo "")
if [ -n "$src_commit" ] && [ "$src_commit" != "$pkgar_commit" ] && [ -n "$pkgar_commit" ]; then
echo ">>> Stale $src detected (source newer than pkgar); invalidating..."
last_commit=$(cat "$fingerprint" 2>/dev/null || echo "")
if [ -n "$src_commit" ] && [ "$src_commit" != "$last_commit" ]; then
echo ">>> Stale $src detected (source newer than last build); invalidating..."
rm -f "$PROJECT_ROOT/repo/x86_64-unknown-redox/$src".*
find "$PROJECT_ROOT/recipes" -path "*/$src/target" -type d -exec rm -rf {} + 2>/dev/null || true
STALE_DETECTED=1
@@ -263,6 +257,14 @@ for pkg in $PRECOOK_PKGS; do
fi
done
for src in relibc kernel base bootloader installer; do
src_dir="$PROJECT_ROOT/local/sources/$src"
if [ -d "$src_dir/.git" ]; then
git -C "$src_dir" rev-parse HEAD 2>/dev/null > \
"$PROJECT_ROOT/repo/x86_64-unknown-redox/$src.source-fingerprint" 2>/dev/null || true
fi
done
if [ "${REDBEAR_ALLOW_UPSTREAM:-0}" = "1" ]; then
echo ">>> WARNING: Upstream fetch ENABLED (REDBEAR_ALLOW_UPSTREAM=1)"
REPO_OFFLINE=0 COOKBOOK_OFFLINE=false CI=1 make live "CONFIG_NAME=$CONFIG" "JOBS=$JOBS" 2>&1
+84
View File
@@ -0,0 +1,84 @@
#!/usr/bin/env bash
# libtool-version-sync.sh — sync configure's macro_version/revision to host libtool.
#
# Autotools recipes that ship a pre-generated `configure` script (libiconv 1.17,
# gettext 0.21, and many others) embed the libtool release identifier at
# configure-generation time. When the host's libtool is later updated (for
# example, from 2.6.0 to 2.6.0.23-b08cb on Debian), the bundled configure
# declares an older macro_version than the running libtool binary, and
# libtool aborts with:
#
# Version mismatch error. This is libtool <host>, but the
# definition of this LT_INIT comes from libtool <bundled>.
# You should recreate aclocal.m4 with macros from <host>
# and run autoconf again.
#
# Regenerating aclocal.m4 + configure inside every cross-compiled recipe is
# brittle and depends on autoconf/automake being available in the cookbook
# environment. The robust workaround used here is to rewrite the macro_version
# and macro_revision assignments inside the existing configure scripts so they
# match the host libtool's runtime version. configure then embeds the right
# version into the generated libtool helper, and the version check passes.
#
# Usage from a recipe's [build] script:
#
# . "${COOKBOOK_SOURCE}/../../../../local/scripts/lib/libtool-version-sync.sh"
# redbear_sync_libtool_version "${COOKBOOK_SOURCE}/configure" \
# "${COOKBOOK_SOURCE}/libcharset/configure"
#
# The paths are script-relative because recipes can be in any category.
_redbear_libtool_version() {
# The cookbook prepends the Redox cross sysroot's bin/ to PATH, so
# `command -v libtool` can return the Redox-target libtool
# (e.g. 2.5.4-redox-9510) instead of the host toolchain's libtool.
# Search known host prefixes first to make sure we report the
# actually-running libtool that the configure scripts will see at
# compile time, not the cross-compile wrapper.
local host_libtool
for host_libtool in /usr/bin/libtool /bin/libtool /usr/local/bin/libtool; do
if [ -x "${host_libtool}" ]; then
"${host_libtool}" --version 2>/dev/null | head -n1 | awk '{print $NF}'
return 0
fi
done
if [ -f /usr/share/libtool/build-aux/ltmain.sh ]; then
grep '^VERSION=' /usr/share/libtool/build-aux/ltmain.sh | head -n1 \
| sed -E "s/^VERSION=['\"]?([^'\"]+)['\"]?$/\1/"
return 0
fi
return 1
}
_redbear_libtool_revision() {
local version="$1"
# The "revision" is the <MAJOR>.<MINOR>.<PATCH> triple with the build-suffix
# (e.g. 2.6.0.23-b08cb -> 2.6.0.23). Drop the trailing -<suffix> segment.
printf '%s\n' "${version%%-*}"
}
redbear_sync_libtool_version() {
local host_version host_revision path
host_version="$(_redbear_libtool_version)" || {
echo "redbear_sync_libtool_version: unable to detect host libtool version" >&2
return 1
}
host_revision="$(_redbear_libtool_revision "${host_version}")"
for path in "$@"; do
[ -f "${path}" ] || continue
_redbear_rewrite_configure_libtool_id "${path}" "${host_version}" "${host_revision}"
done
}
_redbear_rewrite_configure_libtool_id() {
local path="$1" host_version="$2" host_revision="$3"
sed -i \
-e "s/macro_version='2\.4\.7'/macro_version='${host_version}'/g" \
-e "s/macro_version='2\.5\.4-redox-9510'/macro_version='${host_version}'/g" \
-e "s/macro_version='2\.6\.0'/macro_version='${host_version}'/g" \
-e "s/macro_revision='2\.4\.7'/macro_revision='${host_revision}'/g" \
-e "s/macro_revision='2\.5\.4-redox-9510'/macro_revision='${host_revision}'/g" \
-e "s/macro_revision='2\.6\.0'/macro_revision='${host_revision}'/g" \
"${path}"
}
+27
View File
@@ -127,3 +127,30 @@ redbear_qt_copy_optional_stage_dir_to_sysroot() {
cp -a "${stage_usr}/${dir_name}/"* "${sysroot}/${dir_name}/" 2>/dev/null || true
fi
}
redbear_qt_resolve_forwarding_headers() {
local stage_usr="$1"
local build_dir="$2"
find "${stage_usr}/include" -name '*.h' -exec grep -l "${build_dir}" {} \; 2>/dev/null | while read -r fwd_header; do
local build_path
build_path=$(grep '#include "' "${fwd_header}" | head -1 | sed 's/#include "\([^"]*\)".*/\1/')
if [ -n "${build_path}" ] && [ -f "${build_path}" ]; then
cp "${build_path}" "${fwd_header}"
fi
done
}
redbear_qt_ensure_dep_sysroots() {
local cookbook_root="$1"
local sysroot="$2"
local cmake_dir="${sysroot}/usr/lib/cmake"
[ -d "${cmake_dir}" ] || cmake_dir="${sysroot}/lib/cmake"
[ -d "${cmake_dir}" ] || return 0
grep -roh "${cookbook_root}/local/recipes/[^ \"]*target/x86_64-unknown-redox/sysroot" "${cmake_dir}" 2>/dev/null | sort -u | while read -r dep_sysroot; do
if [ ! -d "${dep_sysroot}/include" ]; then
mkdir -p "${dep_sysroot}"
ln -sf "${sysroot}/usr/include" "${dep_sysroot}/include"
ln -sf "${sysroot}/usr/lib" "${dep_sysroot}/lib"
fi
done
}
+2 -2
View File
@@ -59,7 +59,7 @@ redbear_choose_relibc_stage_lib() {
tmp_lib="${relibc_target}/stage.tmp/usr/lib"
build_lib="${relibc_target}/build/target/x86_64-unknown-redox/release"
for candidate in "$stage_lib" "$tmp_lib" "$build_lib"; do
if [ -f "$candidate/libc.so" ] && readelf -Ws "$candidate/libc.so" | grep -q '_Z7strtoldPKcPPc'; then
if [ -f "$candidate/libc.so" ] && readelf -Ws "$candidate/libc.so" | grep -qE ' (strtold)$'; then
printf '%s\n' "$candidate"
return 0
fi
@@ -99,7 +99,7 @@ redbear_relibc_surface_ready() {
[ -f "${relibc_stage_include}/sys/eventfd.h" ] || return 1
[ -f "${relibc_stage_include}/threads.h" ] || return 1
[ -f "${relibc_stage_lib}" ] || return 1
readelf -Ws "${relibc_stage_lib}" | grep -q '_Z7strtoldPKcPPc' || return 1
readelf -Ws "${relibc_stage_lib}" | grep -qE ' (strtold)$' || return 1
return 0
}