# kcmutils 6.27.0 — KDE Frameworks 6 (tier-4, ADR 0011). Módulos de configuración (KCM), base de
# System Settings de Plasma. CMakeLists: Qt6 Core+Widgets+Qml+Quick+QuickWidgets (+DBus opcional).
#   Qml/Quick/QuickWidgets → qtdeclarative. KF6 (REQUIRED): KIO, ItemViews, ConfigWidgets, CoreAddons,
#   GuiAddons, I18n, XmlGui, WidgetsAddons. NOTA: en 6.27 NO depende de kpackage ni kdeclarative
#   (verificado en todo el árbol). Sin option(WITH_X11). KIO arrastra el CIERRE tier-1..3 entero.
name    = "kcmutils"
version = "6.27.0"

[source]
tarball = "https://download.kde.org/stable/frameworks/6.27/kcmutils-6.27.0.tar.xz"
sha256  = "beb0a50a22230fdd94164a5d6e53ea7f4cbc97b86cbab3ff2a592ea8663efa41"

[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "dynamic"
flags    = []

[build.phases]
configure = '''
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
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
W
chmod +x "$ZW/cc" "$ZW/cxx"
cmake -B build -G Ninja -Wno-dev \
  -DCMAKE_C_COMPILER="$ZW/cc" -DCMAKE_CXX_COMPILER="$ZW/cxx" -DCMAKE_ASM_COMPILER="$ZW/cc" \
  -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/usr \
  -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF \
  -DBUILD_TESTING=OFF -DBUILD_PYTHON_BINDINGS=OFF
'''
compile = "cmake --build build"
install = "DESTDIR=/out cmake --install build"

[deps]
build = ["cmake", "samurai", "python3", "pkgconf", "qtbase", "dbus", "extra-cmake-modules", "qttools", "mesa", "libdrm", "libxkbcommon", "wayland", "gettext-tiny", "qtdeclarative", "qtsvg", "kio", "kbookmarks", "kcompletion", "kconfigwidgets", "kservice", "solid", "kwallet", "kjobwidgets", "kdbusaddons", "kcrash", "kguiaddons", "kiconthemes", "kitemviews", "kwindowsystem", "karchive", "kcodecs", "kcolorscheme", "ki18n", "kconfig", "kcoreaddons", "kwidgetsaddons", "sonnet", "ktextwidgets", "kglobalaccel", "kxmlgui", "libgcrypt", "libgpg-error", "util-linux", "openssl", "kirigami", "libX11", "xorgproto", "libXau", "libXdmcp", "libXext", "libXrender", "libXfixes", "libXi", "libxcb"]
