# plasma-integration 6.7.2 — plugin QPA platform theme: hace que las apps Qt tomen tema/fuentes/iconos/diálogos
# de Plasma (usa breeze + KF6 + Qt6 private). Patrón KF6 (dynamic, wrapper zig). Wayland-puro. Runtime del escritorio.
name    = "plasma-integration"
version = "6.7.2"
license = "LGPL-2.1-or-later OR LGPL-3.0-or-later"
[source]
tarball = "https://download.kde.org/stable/plasma/6.7.2/plasma-integration-6.7.2.tar.xz"
sha256  = "f1ce2c3fb0e07a4e0cd5e3d5566fb67e6063aaf435e8efb3402f7d65e1da95a4"
[build]
compiler = "zig-cc"
target   = "x86_64-linux-musl"
link     = "dynamic"
flags    = []
[build.phases]
configure = '''
rm -rf po
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 \
  -DBUILD_QT5=OFF -DBUILD_QT6=ON
'''
compile = "cmake --build build"
install = "DESTDIR=/out cmake --install build"
[deps]
build = ["cmake", "samurai", "python3", "pkgconf", "qtbase", "qtdeclarative", "qtsvg", "qtwayland",
  "qttools", "extra-cmake-modules", "gettext-tiny", "dbus",
  "frameworkintegration", "breeze", "kirigami",
  "kconfig", "kconfigwidgets", "kcoreaddons", "kguiaddons", "ki18n", "kiconthemes", "kio",
  "kwindowsystem", "kcolorscheme", "kwidgetsaddons", "kcodecs", "kcompletion", "kitemviews",
  "kservice", "kjobwidgets", "kbookmarks", "solid", "sonnet", "attica", "karchive", "kdbusaddons",
  "kcrash", "kdnssd", "kwallet", "kxmlgui", "kparts", "knewstuff", "kpackage", "kdeclarative",
  "knotifications", "kstatusnotifieritem",
  "libgcrypt", "libgpg-error", "openssl", "util-linux", "zlib", "zstd",
  "libX11", "xorgproto", "libXau", "libXdmcp", "libXrender", "libXfixes", "libXcursor", "libxcb", "libxkbcommon", "wayland", "wayland-protocols", "plasma-wayland-protocols",
  "mesa", "libdrm", "fontconfig", "freetype"]
