kde/Plasma: libkscreen wrapper preserva args con espacios (fix moc_predefs -I con espacio en libdpms)
This commit is contained in:
@@ -19,16 +19,20 @@ flags = []
|
||||
[build.phases]
|
||||
configure = '''
|
||||
rm -rf po
|
||||
# Wrapper que PRESERVA args con espacios: el moc_predefs de libkscreen (target libdpms) genera un
|
||||
# `-I"/src/src/libdpms /src/build/src/libdpms"` (dos dirs, espacio en un solo -I); el wrapper clásico
|
||||
# (`a="$a $x"; exec ... $a` sin comillas) lo splitea → "unrecognized file extension". Acá reconstruimos
|
||||
# los args en los positional params ("$@") filtrando -Wl,--fatal-warnings, y pasamos "$@" con comillas.
|
||||
ZW="$PWD/.zwrap"; mkdir -p "$ZW"
|
||||
cat > "$ZW/cc" <<'W'
|
||||
#!/bin/sh
|
||||
a=""; for x in "$@"; do [ "$x" = "-Wl,--fatal-warnings" ] && continue; a="$a $x"; done
|
||||
exec /opt/zig/zig cc -mcpu=baseline $a
|
||||
f=1; for x in "$@"; do [ "$x" = "-Wl,--fatal-warnings" ] && continue; if [ "$f" = 1 ]; then set -- "$x"; f=0; else set -- "$@" "$x"; fi; done; [ "$f" = 1 ] && set --
|
||||
exec /opt/zig/zig cc -mcpu=baseline "$@"
|
||||
W
|
||||
cat > "$ZW/cxx" <<'W'
|
||||
#!/bin/sh
|
||||
a=""; for x in "$@"; do [ "$x" = "-Wl,--fatal-warnings" ] && continue; a="$a $x"; done
|
||||
exec /opt/zig/zig c++ -mcpu=baseline $a
|
||||
f=1; for x in "$@"; do [ "$x" = "-Wl,--fatal-warnings" ] && continue; if [ "$f" = 1 ]; then set -- "$x"; f=0; else set -- "$@" "$x"; fi; done; [ "$f" = 1 ] && set --
|
||||
exec /opt/zig/zig c++ -mcpu=baseline "$@"
|
||||
W
|
||||
chmod +x "$ZW/cc" "$ZW/cxx"
|
||||
cmake -B build -G Ninja -Wno-dev \
|
||||
|
||||
Reference in New Issue
Block a user