plasma-desktop: accept a sysroot-prefixed XKBDIR when cross-compiling
ConfigureChecks.cmake:7 does
pkg_get_variable(XKBDIR xkeyboard-config xkb_base)
if (NOT EXISTS "${CMAKE_SYSROOT}/${XKBDIR}")
assuming pkg-config returns an unprefixed path. This build sets
PKG_CONFIG_SYSROOT_DIR, so pkg-config already applies the sysroot and XKBDIR
comes back absolute. Prefixing again produced
.../sysroot//mnt/data/.../sysroot/usr/share/X11/xkb
and configure aborted although the directory is present (verified: the xkb
directory IS in plasma-desktop's sysroot, and xkeyboard-config.pc correctly
records xkb_base=/usr/share/X11/xkb).
Accepts either form instead of un-prefixing XKBDIR: which one pkg-config
returns depends on PKG_CONFIG_SYSROOT_DIR, so testing both is correct in both
configurations and keeps the check meaningful rather than disabling it.
This commit is contained in:
@@ -88,6 +88,23 @@ done
|
|||||||
# Shared with plasma-workspace: the script brace-matches each block and keeps a
|
# Shared with plasma-workspace: the script brace-matches each block and keeps a
|
||||||
# trailing `else` outside the guard, since wrapping a whole if/else-if chain
|
# trailing `else` outside the guard, since wrapping a whole if/else-if chain
|
||||||
# yields invalid C++. Idempotent.
|
# yields invalid C++. Idempotent.
|
||||||
|
# ConfigureChecks.cmake:7 double-prefixes the XKB path when cross-compiling.
|
||||||
|
# It does
|
||||||
|
# pkg_get_variable(XKBDIR xkeyboard-config xkb_base)
|
||||||
|
# if (NOT EXISTS "${CMAKE_SYSROOT}/${XKBDIR}")
|
||||||
|
# assuming pkg-config returns an unprefixed path. Our build sets
|
||||||
|
# PKG_CONFIG_SYSROOT_DIR, so pkg-config ALREADY applies the sysroot and XKBDIR
|
||||||
|
# comes back absolute; prefixing again yields
|
||||||
|
# .../sysroot//mnt/data/.../sysroot/usr/share/X11/xkb
|
||||||
|
# and configure aborts even though the directory is present.
|
||||||
|
#
|
||||||
|
# Accept either form rather than un-prefixing XKBDIR: which one pkg-config
|
||||||
|
# returns depends on PKG_CONFIG_SYSROOT_DIR, so testing both is correct in both
|
||||||
|
# configurations and keeps the check meaningful instead of disabling it.
|
||||||
|
# Idempotent: after rewriting, the original condition no longer matches.
|
||||||
|
sed -i 's|if (NOT EXISTS "${CMAKE_SYSROOT}/${XKBDIR}")|if (NOT EXISTS "${CMAKE_SYSROOT}/${XKBDIR}" AND NOT EXISTS "${XKBDIR}")|' \
|
||||||
|
"${COOKBOOK_SOURCE}/ConfigureChecks.cmake"
|
||||||
|
|
||||||
python3 "${COOKBOOK_ROOT}/local/scripts/gate-kx11extras.py" "${COOKBOOK_SOURCE}"
|
python3 "${COOKBOOK_ROOT}/local/scripts/gate-kx11extras.py" "${COOKBOOK_SOURCE}"
|
||||||
|
|
||||||
# BUILD_KCM_TABLET=OFF -- THIS REMOVES THE DRAWING-TABLET SETTINGS MODULE.
|
# BUILD_KCM_TABLET=OFF -- THIS REMOVES THE DRAWING-TABLET SETTINGS MODULE.
|
||||||
|
|||||||
Reference in New Issue
Block a user