# networkmanager-qt 6.27.0 — KDE Frameworks 6 (ADR 0011). Wrapper Qt de la API D-Bus de NetworkManager
# (KF6NetworkManagerQt). La usa plasma-nm (applet de red de plasma-workspace).
#
# ✅ BLOCKER RESUELTO (2026-07-14): ya existe `networkmanager` (NM 1.52.0, libnm.so.0 + libnm.pc + headers)
# en la cola, habilitado por la variante `glib-shared` (deuda Capa 0 saldada). CMakeLists:15 hace
#     pkg_search_module(NetworkManager REQUIRED IMPORTED_TARGET libnm>=1.4.0)
# y src/CMakeLists:173 linkea PkgConfig::NetworkManager + PkgConfig::Gio ⇒ deps: networkmanager + glib-shared.
name    = "networkmanager-qt"
version = "6.27.0"

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

[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_EXAMPLES=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", "qtdeclarative",
  "networkmanager", "glib-shared", "pcre2-shared", "libffi", "libudev-zero", "libndp", "zlib-shared"]
