plasma-desktop: split the cmake-include sed into two commands
The single sed with an embedded \n had to survive TOML unescaping, then the shell, then sed's insert parsing -- and it did not. The generated file began with 'nclude(CheckIncludeFiles)', losing the leading 'i', so configure failed with ConfigureChecks.cmake:2 (nclude): Unknown CMake command My earlier dry-run passed because I ran the sed by hand in the shell rather than the form the recipe actually produces after parsing. Verified this time by extracting the commands from the PARSED TOML and running those: the file now starts with include(CheckFunctionExists) / include(CheckIncludeFiles).
This commit is contained in:
@@ -96,9 +96,14 @@ done
|
||||
# does not happen here. Adding the includes is what upstream should have done --
|
||||
# CMake documents both as requiring an explicit include().
|
||||
# Idempotent: guarded on the text not already being present.
|
||||
# Two separate sed calls rather than one with an embedded \n: that form has to
|
||||
# survive TOML unescaping, then the shell, then sed's own insert parsing, and it
|
||||
# did not -- the emitted file began with "nclude(CheckIncludeFiles)", losing the
|
||||
# leading 'i', and configure died with
|
||||
# ConfigureChecks.cmake:2 (nclude): Unknown CMake command
|
||||
if ! grep -q '^include(CheckFunctionExists)' "${COOKBOOK_SOURCE}/ConfigureChecks.cmake"; then
|
||||
sed -i '1i include(CheckFunctionExists)\ninclude(CheckIncludeFiles)' \
|
||||
"${COOKBOOK_SOURCE}/ConfigureChecks.cmake"
|
||||
sed -i '1i include(CheckIncludeFiles)' "${COOKBOOK_SOURCE}/ConfigureChecks.cmake"
|
||||
sed -i '1i include(CheckFunctionExists)' "${COOKBOOK_SOURCE}/ConfigureChecks.cmake"
|
||||
fi
|
||||
|
||||
# ConfigureChecks.cmake:7 double-prefixes the XKB path when cross-compiling.
|
||||
|
||||
Reference in New Issue
Block a user