PKGBUILD: fix detect patched nim-dbus (grep for unique patch content)

This commit is contained in:
Niko Marmeladkov 2026-05-30 11:09:21 +03:00
parent f914ec795b
commit d250f8b6ab
Signed by untrusted user who does not match committer: Niko
GPG key ID: E3B955F9442D44E3

View file

@ -26,9 +26,12 @@ patch_dbus() {
echo "ERROR: nim-dbus not found in $NIMBLE_DIR/pkgs2/"
exit 1
fi
if ! grep -q 'of dtBool' "$dbus_dir/dbus/private/value.nim"; then
patch -d "$dbus_dir" -p1 < "$srcdir/$_repodir/nim-dbus-dtbool.patch"
echo "Patched nim-dbus: added dtBool to getPrimitive"
if grep -q 'addr val.uint32Value' "$dbus_dir/dbus/private/value.nim" 2>/dev/null; then
echo "nim-dbus already patched"
else
patch -d "$dbus_dir" -p1 < "$srcdir/$_repodir/nim-dbus-dtbool.patch" && \
echo "Patched nim-dbus: added dtBool to getPrimitive" || \
echo "ERROR: failed to patch nim-dbus"
fi
}