fix: resolve qtdeclarative sysroot propagation failures
Three build failures (qt6-sensors, sddm, kwin) all trace to qtdeclarative's sysroot/ directory being missing after staging. CMake config files reference absolute paths into that sysroot. 1. qt-sysroot.sh: add mkdir -p before ln -sf in redbear_qt_ensure_dep_sysroots() so the parent directory is created when the dependency sysroot was cleaned up. 2. sddm wayland-patch.sh: fix sed pattern to include LinguistTools token that exists in the actual upstream CMakeLists.txt line. Without it the sed silently fails to match, leaving LinguistTools/Test/QuickTest as REQUIRED components. 3. qt6-sensors recipe.toml: source qt-sysroot.sh and call redbear_qt_ensure_dep_sysroots() before cmake configure. Previously the recipe only symlinked plugins/mkspecs/metatypes/ modules but never fixed up dependency sysroot paths, causing Qt6::Qml INTERFACE_INCLUDE_DIRECTORIES to reference a non-existent include path.
This commit is contained in:
@@ -39,7 +39,7 @@ if [ -f "$SRC/cmake/FindXKB.cmake" ]; then
|
||||
fi
|
||||
|
||||
if [ -f "$SRC/CMakeLists.txt" ]; then
|
||||
sed -i 's/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Qml Quick Test QuickTest)/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Network Qml Quick)/' "$SRC/CMakeLists.txt"
|
||||
sed -i 's/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Qml Quick LinguistTools Test QuickTest)/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Network Qml Quick)/' "$SRC/CMakeLists.txt"
|
||||
sed -i '/find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG REQUIRED Core DBus Gui Network Qml Quick)/a find_package(Qt\${QT_MAJOR_VERSION} 5.15.0 CONFIG OPTIONAL_COMPONENTS LinguistTools Test QuickTest)' "$SRC/CMakeLists.txt"
|
||||
fi
|
||||
|
||||
|
||||
@@ -15,11 +15,9 @@ DYNAMIC_INIT
|
||||
|
||||
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
|
||||
|
||||
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
|
||||
source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh"
|
||||
redbear_qt_prepare_common_sysroot "${COOKBOOK_SYSROOT}"
|
||||
redbear_qt_ensure_dep_sysroots "${COOKBOOK_ROOT}" "${COOKBOOK_SYSROOT}"
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
rm -rf CMakeFiles
|
||||
|
||||
@@ -155,6 +155,7 @@ 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"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user