Work around AVRISP mkII sync timeout/retry on NetBSD. I'm guessing this is really a oddity of NetBSD's USB stack, but this seems to work too. Also, hello nb2 and set LICENSE. (This commit bumps most of the patch files only because of pkgdiff timestamp formatting differences. Sigh.)diff -r1.27 -r1.28 pkgsrc/cross/avrdude/Makefile
(jakllsch)
@@ -1,23 +1,24 @@ | @@ -1,23 +1,24 @@ | |||
1 | # $NetBSD: Makefile,v 1.27 2010/01/20 03:31:58 jakllsch Exp $ | 1 | # $NetBSD: Makefile,v 1.28 2010/01/26 02:01:47 jakllsch Exp $ | |
2 | 2 | |||
3 | DISTNAME= avrdude-5.8 | 3 | DISTNAME= avrdude-5.8 | |
4 | PKGREVISION= 1 | 4 | PKGREVISION= 2 | |
5 | CATEGORIES= cross | 5 | CATEGORIES= cross | |
6 | MASTER_SITES= http://download.savannah.gnu.org/releases/avrdude/ | 6 | MASTER_SITES= http://download.savannah.gnu.org/releases/avrdude/ | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= http://www.bsdhome.com/avrdude/ | 9 | HOMEPAGE= http://www.bsdhome.com/avrdude/ | |
10 | COMMENT= Downloader/uploader for Atmel AVR 8-bit RISC microcontrollers | 10 | COMMENT= Downloader/uploader for Atmel AVR 8-bit RISC microcontrollers | |
11 | LICENSE= gnu-gpl-v2 | |||
11 | 12 | |||
12 | BUILD_DEPENDS+= dvipsk-[0-9]*:../../print/dvipsk | 13 | BUILD_DEPENDS+= dvipsk-[0-9]*:../../print/dvipsk | |
13 | 14 | |||
14 | PKG_DESTDIR_SUPPORT= user-destdir | 15 | PKG_DESTDIR_SUPPORT= user-destdir | |
15 | MAKE_JOBS_SAFE= no | 16 | MAKE_JOBS_SAFE= no | |
16 | 17 | |||
17 | USE_GNU_READLINE= yes | 18 | USE_GNU_READLINE= yes | |
18 | TEX_DEPMETHOD= build | 19 | TEX_DEPMETHOD= build | |
19 | TEX_ACCEPTED= teTeX3 | 20 | TEX_ACCEPTED= teTeX3 | |
20 | 21 | |||
21 | .include "../../mk/bsd.prefs.mk" | 22 | .include "../../mk/bsd.prefs.mk" | |
22 | 23 | |||
23 | GNU_CONFIGURE= yes | 24 | GNU_CONFIGURE= yes |
@@ -1,11 +1,12 @@ | @@ -1,11 +1,12 @@ | |||
1 | $NetBSD: distinfo,v 1.6 2009/08/27 15:34:48 hasso Exp $ | 1 | $NetBSD: distinfo,v 1.7 2010/01/26 02:01:47 jakllsch Exp $ | |
2 | 2 | |||
3 | SHA1 (avrdude-5.8.tar.gz) = 77198df91a7176bbdab19ef4a4caf0bdc5862c94 | 3 | SHA1 (avrdude-5.8.tar.gz) = 77198df91a7176bbdab19ef4a4caf0bdc5862c94 | |
4 | RMD160 (avrdude-5.8.tar.gz) = c8eb0675f84477d6b58f0e8dc0438e16ac0714db | 4 | RMD160 (avrdude-5.8.tar.gz) = c8eb0675f84477d6b58f0e8dc0438e16ac0714db | |
5 | Size (avrdude-5.8.tar.gz) = 488771 bytes | 5 | Size (avrdude-5.8.tar.gz) = 488771 bytes | |
6 | SHA1 (patch-aa) = 737aa805981a611a735ae15988260f7b1c3fc5bf | 6 | SHA1 (patch-aa) = b7923399ec747cefca29e7fabf0997a9b1075d9e | |
7 | SHA1 (patch-ab) = b6163aa766de472e423910af25333a26d262a82c | 7 | SHA1 (patch-ab) = d49e5988a83385471f863dd0ccb50db96f1c1783 | |
8 | SHA1 (patch-ac) = a949a288b261791beed2f422a1a7c606d3ad8c2c | 8 | SHA1 (patch-ac) = f5281a525f0e61517c507db91f9abe71d2f02ae4 | |
9 | SHA1 (patch-ad) = 03201bc7caced3f28edbbe3040cb2bac01c41dc0 | 9 | SHA1 (patch-ad) = a91b4576d49953148054a7a1522690d1e4a2d9da | |
10 | SHA1 (patch-ae) = 42f4a9cb106a49d341954f6802a15153986b00dd | 10 | SHA1 (patch-ae) = 9ff949785562d7d96bc80ea3d9cf55fd4bfd7be6 | |
11 | SHA1 (patch-af) = ad73e9975f708fc81e4ad8e08379ecc78afc6053 | 11 | SHA1 (patch-af) = 4c652ede19d0dbd3bfb9654cc9dba3728c97def8 | |
12 | SHA1 (patch-ag) = 4b7640d91dd7784ed14c48e40bc4f07f79ad443c |
@@ -1,23 +1,23 @@ | @@ -1,23 +1,23 @@ | |||
1 | $NetBSD: patch-aa,v 1.4 2009/08/27 15:34:48 hasso Exp $ | 1 | $NetBSD: patch-aa,v 1.5 2010/01/26 02:01:47 jakllsch Exp $ | |
2 | 2 | |||
3 | - Fix the SUBDIRS stuff so it actually works right with multiple automake | 3 | - Fix the SUBDIRS stuff so it actually works right with multiple automake | |
4 | versions. | 4 | versions. | |
5 | 5 | |||
6 | - Use supported automake methods to install the example config file to | 6 | - Use supported automake methods to install the example config file to | |
7 | egconfdir instead of hacking the configure script and Makefile.in directly. | 7 | egconfdir instead of hacking the configure script and Makefile.in directly. | |
8 | 8 | |||
9 | 9 | |||
10 | --- Makefile.am.orig 2009-03-06 21:09:11 +0100 | 10 | --- Makefile.am.orig 2009-03-06 20:09:11.000000000 +0000 | |
11 | +++ Makefile.am | 11 | +++ Makefile.am | |
12 | @@ -151,7 +151,8 @@ avrdude_SOURCES = \ | 12 | @@ -151,7 +151,8 @@ avrdude_SOURCES = \ | |
13 | 13 | |||
14 | man_MANS = avrdude.1 | 14 | man_MANS = avrdude.1 | |
15 | 15 | |||
16 | -sysconf_DATA = avrdude.conf | 16 | -sysconf_DATA = avrdude.conf | |
17 | +egconfdir= ${datadir}/examples/avrdude | 17 | +egconfdir= ${datadir}/examples/avrdude | |
18 | +egconf_DATA = avrdude.conf | 18 | +egconf_DATA = avrdude.conf | |
19 | 19 | |||
20 | install-exec-local: backup-avrdude-conf | 20 | install-exec-local: backup-avrdude-conf | |
21 | 21 | |||
22 | @@ -160,8 +161,6 @@ distclean-local: | 22 | @@ -160,8 +161,6 @@ distclean-local: | |
23 | 23 |
@@ -1,15 +1,15 @@ | @@ -1,15 +1,15 @@ | |||
1 | $NetBSD: patch-ac,v 1.4 2009/08/27 15:34:48 hasso Exp $ | 1 | $NetBSD: patch-ac,v 1.5 2010/01/26 02:01:47 jakllsch Exp $ | |
2 | 2 | |||
3 | the builtin [ on at least solaris doesn't understand -e | 3 | the builtin [ on at least solaris doesn't understand -e | |
4 | 4 | |||
5 | --- doc/Makefile.am.orig 2009-03-06 21:09:08 +0100 | 5 | --- doc/Makefile.am.orig 2009-03-06 20:09:08.000000000 +0000 | |
6 | +++ doc/Makefile.am | 6 | +++ doc/Makefile.am | |
7 | @@ -33,7 +33,7 @@ html: avrdude-html/avrdude.html | 7 | @@ -33,7 +33,7 @@ html: avrdude-html/avrdude.html | |
8 | 8 | |||
9 | avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) | 9 | avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) | |
10 | texi2html -split_node $(srcdir)/$(info_TEXINFOS) | 10 | texi2html -split_node $(srcdir)/$(info_TEXINFOS) | |
11 | - if [ -e ./avrdude.html -o -e ./avrdude_1.html ]; then \ | 11 | - if [ -e ./avrdude.html -o -e ./avrdude_1.html ]; then \ | |
12 | + if [ -f ./avrdude.html -o -f ./avrdude_1.html ]; then \ | 12 | + if [ -f ./avrdude.html -o -f ./avrdude_1.html ]; then \ | |
13 | mkdir -p avrdude-html ; \ | 13 | mkdir -p avrdude-html ; \ | |
14 | mv -f *.html avrdude-html ; \ | 14 | mv -f *.html avrdude-html ; \ | |
15 | else \ | 15 | else \ |
@@ -1,15 +1,15 @@ | @@ -1,15 +1,15 @@ | |||
1 | $NetBSD: patch-ad,v 1.4 2009/08/27 15:34:48 hasso Exp $ | 1 | $NetBSD: patch-ad,v 1.5 2010/01/26 02:01:47 jakllsch Exp $ | |
2 | 2 | |||
3 | regen | 3 | regen | |
4 | 4 | |||
5 | --- doc/Makefile.in.orig 2009-07-11 00:52:12 +0200 | 5 | --- doc/Makefile.in.orig 2009-07-10 22:52:12.000000000 +0000 | |
6 | +++ doc/Makefile.in | 6 | +++ doc/Makefile.in | |
7 | @@ -617,7 +617,7 @@ html: avrdude-html/avrdude.html | 7 | @@ -617,7 +617,7 @@ html: avrdude-html/avrdude.html | |
8 | 8 | |||
9 | avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) | 9 | avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) | |
10 | texi2html -split_node $(srcdir)/$(info_TEXINFOS) | 10 | texi2html -split_node $(srcdir)/$(info_TEXINFOS) | |
11 | - if [ -e ./avrdude.html -o -e ./avrdude_1.html ]; then \ | 11 | - if [ -e ./avrdude.html -o -e ./avrdude_1.html ]; then \ | |
12 | + if [ -f ./avrdude.html -o -f ./avrdude_1.html ]; then \ | 12 | + if [ -f ./avrdude.html -o -f ./avrdude_1.html ]; then \ | |
13 | mkdir -p avrdude-html ; \ | 13 | mkdir -p avrdude-html ; \ | |
14 | mv -f *.html avrdude-html ; \ | 14 | mv -f *.html avrdude-html ; \ | |
15 | else \ | 15 | else \ |
@@ -1,24 +1,24 @@ | @@ -1,24 +1,24 @@ | |||
1 | $NetBSD: patch-ae,v 1.4 2009/08/27 15:34:48 hasso Exp $ | 1 | $NetBSD: patch-ae,v 1.5 2010/01/26 02:01:47 jakllsch Exp $ | |
2 | 2 | |||
3 | - add missing AM_PROG_CC_C_O that automake wants for the yacc | 3 | - add missing AM_PROG_CC_C_O that automake wants for the yacc | |
4 | sources. | 4 | sources. | |
5 | 5 | |||
6 | - allow a different default serial/parallel port to be specified | 6 | - allow a different default serial/parallel port to be specified | |
7 | which is useful for pkgsrc (since we have defaults for various | 7 | which is useful for pkgsrc (since we have defaults for various | |
8 | platforms available and they're not the same for different | 8 | platforms available and they're not the same for different | |
9 | MACHINE_ARCH's in NetBSD). | 9 | MACHINE_ARCH's in NetBSD). | |
10 | 10 | |||
11 | --- configure.ac.orig 2009-07-11 00:52:03 +0200 | 11 | --- configure.ac.orig 2009-07-10 22:52:03.000000000 +0000 | |
12 | +++ configure.ac | 12 | +++ configure.ac | |
13 | @@ -74,6 +74,7 @@ AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#incl | 13 | @@ -74,6 +74,7 @@ AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#incl | |
14 | 14 | |||
15 | # Checks for typedefs, structures, and compiler characteristics. | 15 | # Checks for typedefs, structures, and compiler characteristics. | |
16 | AC_C_CONST | 16 | AC_C_CONST | |
17 | +AM_PROG_CC_C_O | 17 | +AM_PROG_CC_C_O | |
18 | AC_HEADER_TIME | 18 | AC_HEADER_TIME | |
19 | 19 | |||
20 | # Checks for library functions. | 20 | # Checks for library functions. | |
21 | @@ -187,34 +188,44 @@ AC_SUBST(DIST_SUBDIRS_AC, $DIST_SUBDIRS_ | 21 | @@ -187,34 +188,44 @@ AC_SUBST(DIST_SUBDIRS_AC, $DIST_SUBDIRS_ | |
22 | 22 | |||
23 | # Find the parallel serial device files based on target system | 23 | # Find the parallel serial device files based on target system | |
24 | # If a system doesn't have a PC style parallel, mark it as unknown. | 24 | # If a system doesn't have a PC style parallel, mark it as unknown. |
@@ -1,16 +1,16 @@ | @@ -1,16 +1,16 @@ | |||
1 | $NetBSD: patch-ab,v 1.3 2009/08/27 15:34:48 hasso Exp $ | 1 | $NetBSD: patch-ab,v 1.4 2010/01/26 02:01:47 jakllsch Exp $ | |
2 | 2 | |||
3 | --- freebsd_ppi.h.orig 2009-03-06 21:09:11 +0100 | 3 | --- freebsd_ppi.h.orig 2009-03-06 20:09:11.000000000 +0000 | |
4 | +++ freebsd_ppi.h | 4 | +++ freebsd_ppi.h | |
5 | @@ -22,7 +22,11 @@ | 5 | @@ -22,7 +22,11 @@ | |
6 | #ifndef freebsd_ppi_h | 6 | #ifndef freebsd_ppi_h | |
7 | #define freebsd_ppi_h | 7 | #define freebsd_ppi_h | |
8 | 8 | |||
9 | +#ifdef __FreeBSD__ | 9 | +#ifdef __FreeBSD__ | |
10 | #include <dev/ppbus/ppi.h> | 10 | #include <dev/ppbus/ppi.h> | |
11 | +#else | 11 | +#else | |
12 | +#include <dev/misc/ppi/ppi.h> | 12 | +#include <dev/misc/ppi/ppi.h> | |
13 | +#endif | 13 | +#endif | |
14 | 14 | |||
15 | #define ppi_claim(fd) {} | 15 | #define ppi_claim(fd) {} | |
16 | 16 |
@@ -1,13 +1,13 @@ | @@ -1,13 +1,13 @@ | |||
1 | $NetBSD: patch-af,v 1.3 2009/08/27 15:34:48 hasso Exp $ | 1 | $NetBSD: patch-af,v 1.4 2010/01/26 02:01:47 jakllsch Exp $ | |
2 | 2 | |||
3 | --- ppi.c.orig 2009-03-06 21:09:11 +0100 | 3 | --- ppi.c.orig 2009-03-06 20:09:11.000000000 +0000 | |
4 | +++ ppi.c | 4 | +++ ppi.c | |
5 | @@ -33,7 +33,7 @@ | 5 | @@ -33,7 +33,7 @@ | |
6 | #include <unistd.h> | 6 | #include <unistd.h> | |
7 | #include <errno.h> | 7 | #include <errno.h> | |
8 | 8 | |||
9 | -#if defined(__FreeBSD__) | 9 | -#if defined(__FreeBSD__) | |
10 | +#if defined(__FreeBSD__) || defined(__DragonFly__) | 10 | +#if defined(__FreeBSD__) || defined(__DragonFly__) | |
11 | # include "freebsd_ppi.h" | 11 | # include "freebsd_ppi.h" | |
12 | #elif defined(__linux__) | 12 | #elif defined(__linux__) | |
13 | # include "linux_ppdev.h" | 13 | # include "linux_ppdev.h" |
$NetBSD: patch-ag,v 1.3 2010/01/26 02:01:47 jakllsch Exp $
Work around AVRISP mkII sync stalls on NetBSD.
--- stk500v2.c.orig 2009-07-10 22:39:37.000000000 +0000
+++ stk500v2.c
@@ -635,6 +635,8 @@ retry:
// send the sync command and see if we can get there
buf[0] = CMD_SIGN_ON;
stk500v2_send(pgm, buf, 1);
+ stk500v2_drain(pgm, 0);
+ stk500v2_send(pgm, buf, 1);
// try to get the response back and see where we got
status = stk500v2_recv(pgm, resp, sizeof(resp));