git: dc3fbc6a0213 - main - devel/avrdude: Add patch for AVR Dragon JTAG fix that didn't make it into 7.0

From: Craig Leres <leres_at_FreeBSD.org>
Date: Sat, 26 Nov 2022 21:13:51 UTC
The branch main has been updated by leres:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dc3fbc6a0213e8f02348d29695254253440ce254

commit dc3fbc6a0213e8f02348d29695254253440ce254
Author:     Craig Leres <leres@FreeBSD.org>
AuthorDate: 2022-11-26 21:13:27 +0000
Commit:     Craig Leres <leres@FreeBSD.org>
CommitDate: 2022-11-26 21:13:27 +0000

    devel/avrdude: Add patch for AVR Dragon JTAG fix that didn't make it into 7.0
    
    At some point after 5.11 avrdude started leaving the target stopped
    upon completion of a JTAG transaction. I filed a github issue about
    this issue:
    
        https://github.com/avrdudes/avrdude/issues/366
    
    This is super annoying because, for example, the target does not
    boot after JTAG programming. Others were seeing this and shortly
    after 7.0 was released, MCUdude created a PR which has since been
    merged:
    
        https://github.com/avrdudes/avrdude/pull/979
    
    Apply this patch.
    
    PR:             266186
    Approved by:    joerg (maintainer timeout, 12 weeks)
---
 devel/avrdude/Makefile                   |  2 +-
 devel/avrdude/files/patch-src_jtagmkII.c | 13 +++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/devel/avrdude/Makefile b/devel/avrdude/Makefile
index b06bd80984f6..7e6ea7d47325 100644
--- a/devel/avrdude/Makefile
+++ b/devel/avrdude/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	avrdude
 PORTVERSION=	7.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel
 
 MAINTAINER=	joerg@FreeBSD.org
diff --git a/devel/avrdude/files/patch-src_jtagmkII.c b/devel/avrdude/files/patch-src_jtagmkII.c
new file mode 100644
index 000000000000..17ca7c9a968e
--- /dev/null
+++ b/devel/avrdude/files/patch-src_jtagmkII.c
@@ -0,0 +1,13 @@
+--- src/jtagmkII.c.orig	2022-05-07 20:39:47 UTC
++++ src/jtagmkII.c
+@@ -1840,8 +1840,8 @@ void jtagmkII_close(PROGRAMMER * pgm)
+ 
+   avrdude_message(MSG_NOTICE2, "%s: jtagmkII_close()\n", progname);
+ 
+-  if (pgm->flag & PGM_FL_IS_PDI) {
+-    /* When in PDI mode, restart target. */
++  if (pgm->flag & (PGM_FL_IS_PDI|PGM_FL_IS_JTAG)) {
++    /* When in PDI or JTAG mode, restart target. */
+     buf[0] = CMND_GO;
+     avrdude_message(MSG_NOTICE2, "%s: jtagmkII_close(): Sending GO command: ",
+ 	      progname);