From d250f8b6abb24bd0d4ecf53986a0de8edde174a8 Mon Sep 17 00:00:00 2001 From: Niko Marmeladkov Date: Sat, 30 May 2026 11:09:21 +0300 Subject: [PATCH] PKGBUILD: fix detect patched nim-dbus (grep for unique patch content) --- PKGBUILD | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 }