fix: qt-sysroot dep symlinks point to dependency's own stage, not caller's sysroot

redbear_qt_ensure_dep_sysroots was creating symlinks in the dependency's
sysroot pointing to the CALLING recipe's sysroot. This caused CMake
'hidden library' warnings and corrupts the dependency's build when it
gets rebuilt later.

Fix: derive the dependency's stage path from its sysroot path
(dirname(sysroot)/stage/usr) and link to that instead. This way
qtdeclarative's sysroot include/lib point to qtdeclarative's OWN
stage, not to qt6-sensors' sysroot.

Also fix wayland-patch.sh: replace ${LIBXCB_LIBRARIES} with empty
string instead of a comment. The comment was eating the closing )
on the same line, causing 'Function missing ending paren' CMake
parse error in src/daemon/CMakeLists.txt:63.
This commit is contained in:
2026-07-01 00:20:18 +03:00
parent d7ada2ed32
commit 0ce9eb4736
2 changed files with 10 additions and 5 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ sed -i 's/find_package(XCB)/# Wayland-only: XCB not needed/' "$CMAKE"
for cmakelists in "$SRC/src/daemon/CMakeLists.txt" "$SRC/src/helper/CMakeLists.txt" "$SRC/src/greeter/CMakeLists.txt"; do
if [ -f "$cmakelists" ]; then
sed -i 's/"\${LIBXCB_INCLUDE_DIR}"/# Wayland-only: XCB not needed/' "$cmakelists"
sed -i 's/\${LIBXCB_LIBRARIES}/# Wayland-only: XCB not needed/' "$cmakelists"
sed -i 's/"\${LIBXCB_INCLUDE_DIR}"//' "$cmakelists"
sed -i 's/\${LIBXCB_LIBRARIES}//' "$cmakelists"
fi
done
+8 -3
View File
@@ -155,9 +155,14 @@ redbear_qt_ensure_dep_sysroots() {
if [ -L "${dep_sysroot}/lib" ] || [ -e "${dep_sysroot}/lib" ]; then
rm -rf "${dep_sysroot}/lib"
fi
mkdir -p "${dep_sysroot}"
ln -sf "${sysroot}/usr/include" "${dep_sysroot}/include"
ln -sf "${sysroot}/usr/lib" "${dep_sysroot}/lib"
local dep_target_dir dep_stage_usr
dep_target_dir=$(dirname "${dep_sysroot}")
dep_stage_usr="${dep_target_dir}/stage/usr"
if [ -d "${dep_stage_usr}/include" ]; then
mkdir -p "${dep_sysroot}"
ln -sf "${dep_stage_usr}/include" "${dep_sysroot}/include"
ln -sf "${dep_stage_usr}/lib" "${dep_sysroot}/lib"
fi
fi
done
}