# kactivitymanagerd 6.7.2 — daemon D-Bus de actividades KDE. plasmashell ABORTA la carga del shell si no
# corre ("The activity manager daemon (kactivitymanagerd) is not running"). Patrón KF6 (dynamic, wrapper
# zig, ECM). Usa Qt6Sql (DB de actividades sqlite) + PlasmaActivities + KIO.
name    = "kactivitymanagerd"
version = "6.7.2"

[source]
tarball = "https://download.kde.org/stable/plasma/6.7.2/kactivitymanagerd-6.7.2.tar.xz"
sha256  = "98d99436f07ee4fae8873d187ce4a9f41ca9fdc7d9adcc9423ec158996b42c73"

[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
'''
compile = "cmake --build build"
install = "DESTDIR=/out cmake --install build"

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