diff --git a/PKGBUILD b/PKGBUILD index fb59980..3324998 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -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 }