pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

avrdude: Update to 7.0



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Mon May 30 13:42:27 2022 +0200
Changeset:	e99f180e82299f8d3fe1d53e100ef0656942acf1

Added Files:
	avrdude/DESCR
	avrdude/Makefile
	avrdude/PLIST
	avrdude/distinfo
	avrdude/patches/patch-Makefile.am
	avrdude/patches/patch-configure.ac
	avrdude/patches/patch-doc_Makefile.am
	avrdude/patches/patch-doc_Makefile.in
	avrdude/patches/patch-freebsd__ppi.h
	avrdude/patches/patch-ppi.c
	avrdude/patches/patch-usb__libusb.c

Log Message:
avrdude: Update to 7.0

Changes in version 7.0:

  * Major changes compared to the previous version:

    - Completely revamped Windows support, including MSVC
    - Started to add CMake (by now, parallel with autoconf/automake)
    - New-architecture devices (AVR8X mega and tiny) can access all
      fuses, and memory display shows meaningful alias names
    - The "safemode" feature has been removed. The major class of
      programmers it has been designed for (lowlevel bitbang
      programmers on parallel or serial ports) virtually doesn't exist
      anymore, and the fuse combination that was covered by it do not
      match the fuses of modern AVR devices anyway.
    - avrdude.conf is now being looked up in the location of the
      executable file first, before considering the configured default
      location; this eases a "portable use" where the entire suite is
      not installed into its configured default location. (Basically
      only relevant for unixoid systems; on Windows, this search order
      has been used for many years already.)

  * New devices supported:

    - ATtiny828, ATtiny87, ATtiny167, ATtiny48, ATtiny102, ATtiny104
    - LGT8F88P, LGT8F168P, LGT8F328P (fixed names of these parts)
    - ATmeg164A, ATmega169A, ATmega169P, ATmega169PA, ATmega329A,
      ATmega329PA, ATmega3290, ATmega3290A, ATmega3290PA, ATmega649A,
      ATmega649P, ATmega6490A, ATmega6490P, ATmega165, ATmega165A,
      ATmega165P, ATmega165PA, ATmega325A, ATmega325P, ATmega325PA,
      ATmega645A, ATmega645P, ATmega3250A, ATmega3250P, ATmega3250PA,
      ATmega6450A, ATmega6450P
    - ATmega48A/48PA/88A/88PA/168A/168PA, ATmega164A/644A/644PA,
      ATmega16A/32A/64A/128A, ATtiny13A, ATtiny24A/44A/84A,
      ATtiny261A/461A/861A, ATtiny828R, ATtiny2313A, ATtiny1634R
    - ATtiny3224, ATtiny3226 and ATtiny3227
    - AVR16DD14/20/28/32, AVR32DD14/20/28/32 and AVR64DD14/20/28/32
    - AVR8EA28/32, AVR16EA28/32/48, AVR32EA28/32/48 and AVR64EA28/32/64
    - ATmega16U4

  * New programmers supported:

    - SerialUPDI (UPDI devices connected to serial port with few
      passive parts)
    - PicKit4 / SNAP (now also in ISP and PDI mode)
    - Teensy bootloader (PR #802)
    - Micronucleus bootloader (PR #786)
    - ft232h (generic variant, PR #842)
    - Kristech KT-LINK FT2232H interface with IO switching and voltage
      buffers (PR #930)

  * Issues fixed:

    - Curiosity Nano and terminal mode #790 (only the actual bugs
      reported)
    - CMake doesn't correctly handle conditionals in avrdude.conf.in
      #776
    - CMake doesn't detect FreeBSD's libusb-1.0 (compatibility) #775
    - CMake doesn't correctly handle conditionals in avrdude.conf.in
      #776
    - CMake: Recognize more than just bison #785
    - [bug #26007] ATTiny167 not supported #150
    - [bug #47375] ATtiny102/104 descriptions missing in configuration
      file #409
    - No error message when connecting to a not-connected AVRISP mkII
      programmer #813
    - [bug #53180] missing programmer or bad -P option argument
      doesn't result in error message #471
    - ATmega328P reported as lgt8fx328p #812
    - [bug #48004] Dead link for linuxgpio in avrdude description #419
    - Segmentation fault when writing ATtiny104 fuse #823
    - USBasp returns ERANGE for unknown error #848
    - Compiler warnings #856
    - Can't get serialupdi to work #874
    - Rework HID support for Windows #881
    - List of signing keys? #884
    - Pickit4 UPDI is writing at offset 0x4000 into flash instead of 0x0000. #892
    - SerialUPDI programmer can't write to usersig/userrow in terminal mode #889
    - Signature read command for ATmega165* was wrong (no-id)
    - Cannot use non-standard baud rates for uploading on MacOS #771
    - Wrong values in avrdude.conf #897
    - AVR-Eclipse plugin broken by missing -u commandline option #890
    - Timeout passed to hid_read_timeout() is too short for instances
      where the EDBG AVRISP 'Enter Programming Mode' command fails #900
    - Terminal write mode doesn't support string input (yet) #913
    - Terminal mode: memory fill with strings may cause Avrdude to crash. #922
    - Some parts have wrong or missing ISP commands #915
    - Incorrect -b conversion for linuxspi programmer #927
    - ATtiny43U calibration memory size #921

  * Pull requests:

    - GitHub Migration #765
    - Update toplevel files. #767
    - GitHub Migration part 2 #768
    - Remove 'windows' folder with giveio.sys driver #769
    - SerialUPDI implementation - release candidate 1 #772
    - Fix typos #777
    - Fix memory leaks #779
    - As promised, documentation for SerialUPDI programmer #782
    - Improve CMake project #783
    - Fix avr_read() for page reads #784
    - Serialupdi manpage #787
    - Add PicKit4 and SNAP programmers #791
    - Use yacc/byacc as an alternative to bison, closes #785 #793
    - Derive program version string from last commit #794
    - Find 'avrdude.conf' based on absolute path to executable #780
    - buspirate: fix -Wtautological-constant-out-of-range-compare #796
    - avrftdi: don't use the deprecated ftdi_usb_purge_buffers routine #792
    - Ignore ctags index file #804
    - term: fix memleakOnRealloc #806
    - Add missing ATtiny targets to avrdude.conf #803
    - Add support for Teensy bootloader #802
    - Conffile clean up #801
    - Fix typos all over the code #807
    - Add MSVC builds and better WinUSB/FTDI support #798
    - buspirate: fix invalidScanfArgType_int warning #808
    - Ignore ac_cfg.h.in~ #810
    - Notify open failure #814
    - Print expected part #817
    - pindefs: conform to the function declaration #818
    - Add support for Micronucleus bootloader #786
    - Remove ac_cfg.h from libavrdude.h #820
    - CMake: enable dynamic-link library for libavrdude #826
    - Fix for TPI fuse write (issue #823) #828
    - Add missing ATmega__5 and ATmega__9 targets to avrdude.conf #809
    - Add missing ATmega and ATtiny targets #832
    - Added missing RTS/DTR management feature to serialupdi
      programmer #811
    - Add missing tinyAVR-2, AVR DD and AVR EA targets #836
    - Add a new programmer ft232h #842
    - Reduce verbosity when setting fuses and uploading programs #845
    - jtagmkii: Reduce the number of sync attempts to 10 + print
      number of attempts #844
    - CMake: add initial support for installing lib and include files #829
    - Add SPI support to USBtiny #816
    - Add more memory sections to read from #815
    - Add a build script for Unix-like systems #849
    - Fix receive buffer implementation in ftdi_syncbb programmer #843
    - CMake: split configuration in two files #852
    - Set number of connection retry attempts for Arduino/STK500
      programmer #854
    - Fix libusb-1.0 error strings #850
    - Assign proper type to msg[] in errstr() #857
    - Fix Arduino retry attempts #855
    - CMake: use CMAKE_CURRENT_BINARY_DIR to locate avrdude.conf #858
    - Remove the "safemode" feature. #859
    - Add support for reading from more memory sections #863
    - Alias keyword #868
    - Add fuse name aliases to avrdude.conf + tweak update.c #869
    - Print JTAG3 clocks after configuration + string formatting #853
    - Tweak programmer info formatting strings #872
    - Remove libhid support in ser_avrdoper.c in favor of libhidapi #882
    - Reduce jtag3 output verbosity #877
    - Fix Curiosity Nano target voltage #878
    - Smallest possible fix for PL2303HX #885
    - Add missing USBtiny derived programmers #873
    - Cleanup of POSIX serial init code #886
    - Avrdude terminal write improvements #880
    - Add userrow and usersig aliases #888
    - For UPDI devices do not add offset when accessing flash. #895
    - Support both userrow and usersig names #893
    - Fix ugly terminal write bug #896
    - Improve terminal read functionality #894
    - Macos nonstandard baudrates #898
    - Fix errors in Avrdude.conf #899
    - Minor terminal write improvements #902
    - Term docs #903
    - Add progressbar for read and write command #912
    - Add MacOS serial/parallel port note #908
    - Add ATmega16U4 to avrdude.conf #910
    - Mask out unused ATmega32U4 efuse bits #909
    - Increased timeout passed to hid_read_timeout() #901
    - Add terminal write string functionality #914
    - Update documentation link to new URL #929
    - Fix terminal write buffer overflow issue #924
    - Fix linuxspi baud to clock period calculation #931
    - Added KT-LINK FT2232H interface with IO switching and voltage buffers. #930

  * Internals:

    - Development moved to Github
    - Addition of "alias" keyword to avrdude.conf.in syntax; used
      for fuse name aliases right now

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e99f180e82299f8d3fe1d53e100ef0656942acf1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 avrdude/DESCR                         |  5 +++
 avrdude/Makefile                      | 62 +++++++++++++++++++++++++++
 avrdude/PLIST                         | 52 +++++++++++++++++++++++
 avrdude/distinfo                      | 12 ++++++
 avrdude/patches/patch-Makefile.am     | 31 ++++++++++++++
 avrdude/patches/patch-configure.ac    | 79 +++++++++++++++++++++++++++++++++++
 avrdude/patches/patch-doc_Makefile.am | 15 +++++++
 avrdude/patches/patch-doc_Makefile.in | 15 +++++++
 avrdude/patches/patch-freebsd__ppi.h  | 18 ++++++++
 avrdude/patches/patch-ppi.c           | 15 +++++++
 avrdude/patches/patch-usb__libusb.c   | 24 +++++++++++
 11 files changed, 328 insertions(+)

diffs:
diff --git a/avrdude/DESCR b/avrdude/DESCR
new file mode 100644
index 0000000000..8783c05624
--- /dev/null
+++ b/avrdude/DESCR
@@ -0,0 +1,5 @@
+AVRDUDE - AVR Downloader/UploaDEr - is a program for updating the
+flash, eeprom, and fuse bit memories of Atmel AVR microcontrollers.
+Avrdude supports a wide variety of chip programmers (including the
+widely used STK500) that attach to the serial port, and, if supported
+by the underlying OS, to the parallel port.
diff --git a/avrdude/Makefile b/avrdude/Makefile
new file mode 100644
index 0000000000..dac32ee937
--- /dev/null
+++ b/avrdude/Makefile
@@ -0,0 +1,62 @@
+# $NetBSD$
+
+DISTNAME=		avrdude-7.0
+CATEGORIES=		cross
+MASTER_SITES=		http://download.savannah.gnu.org/releases/avrdude/
+
+MAINTAINER=		pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=		https://www.nongnu.org/avrdude/
+COMMENT=		Downloader/uploader for Atmel AVR 8-bit RISC microcontrollers
+LICENSE=		gnu-gpl-v2
+
+.include "../../mk/bsd.prefs.mk"
+
+GNU_CONFIGURE=		yes
+USE_TOOLS+=		autoconf automake autoreconf lex yacc
+USE_TOOLS+=		gmake
+USE_LIBTOOL=		yes
+INFO_FILES=		yes
+EGDIR=			${PREFIX}/share/examples/avrdude
+CONF_FILES_PERMS=	${EGDIR}/avrdude.conf ${PKG_SYSCONFDIR}/avrdude.conf \
+			${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 644
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.avrdude
+PKG_SUPPORTED_OPTIONS=		doc
+PKG_SUGGESTED_OPTIONS=		doc
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=		doc
+.if !empty(PKG_OPTIONS:Mdoc)
+PLIST.doc=		yes
+TEXINFO_REQD=		4.9
+USE_TOOLS+=		texi2html makeinfo
+BUILD_DEPENDS+=		dvipsk-[0-9]*:../../print/dvipsk
+BUILD_DEPENDS+=		tex-latex-fonts-[0-9]*:../../fonts/tex-latex-fonts
+BUILD_DEPENDS+=		tex-pdftex-[0-9]*:../../print/tex-pdftex
+# DragonFly has stripped makeinfo in the base - without texi2dvi.
+.  if ${OPSYS} == "DragonFly"
+BUILD_DEPENDS+=		gtexinfo-[0-9]*:../../devel/gtexinfo
+.  endif
+CONFIGURE_ARGS+=	--enable-doc
+.else
+CONFIGURE_ARGS+=	--disable-doc
+.endif
+
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ENV+=		DEFAULT_SER_PORT=${DEFAULT_SERIAL_DEVICE}
+PLIST_SUBST+=		DISTNAME=${DISTNAME}
+
+# The autotools used by this pkg are older than what's in pkgsrc
+# currently.  This makes the diffs huge.
+pre-configure:
+	cd ${WRKSRC} && autoreconf -vif
+
+
+.include "../../comms/libhidapi/buildlink3.mk"
+.include "../../devel/libftdi1/buildlink3.mk"
+.include "../../devel/libusb1/buildlink3.mk"
+# elf_getshdrstrndx
+.include "../../devel/libelf/buildlink3.mk"
+.include "../../devel/readline/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/avrdude/PLIST b/avrdude/PLIST
new file mode 100644
index 0000000000..765ede7870
--- /dev/null
+++ b/avrdude/PLIST
@@ -0,0 +1,52 @@
+@comment $NetBSD$
+bin/avrdude
+include/libavrdude.h
+${PLIST.doc}info/avrdude.info
+lib/libavrdude.la
+man/man1/avrdude.1
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_1.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_10.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_11.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_12.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_13.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_14.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_15.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_16.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_17.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_18.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_19.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_2.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_20.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_21.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_22.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_23.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_24.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_25.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_26.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_27.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_28.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_29.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_30.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_31.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_32.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_33.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_34.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_35.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_36.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_37.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_38.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_39.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_40.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_3.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_4.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_5.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_6.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_7.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_8.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_9.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_abt.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude-html/avrdude_toc.html
+${PLIST.doc}share/doc/${DISTNAME}/avrdude.pdf
+${PLIST.doc}share/doc/${DISTNAME}/avrdude.ps
+share/examples/avrdude/avrdude.conf
diff --git a/avrdude/distinfo b/avrdude/distinfo
new file mode 100644
index 0000000000..fcf52cd1af
--- /dev/null
+++ b/avrdude/distinfo
@@ -0,0 +1,12 @@
+$NetBSD$
+
+BLAKE2s (avrdude-7.0.tar.gz) = 9a7192749b61aaf0f296343799fab53307dd774bdbd07af55dc894d7974fe278
+SHA512 (avrdude-7.0.tar.gz) = 891c435d8f6d4529762d647c468c52b4c04c3a663b703af0ddd2c284aecfce92ce99502aed77f409f1afb4ab7d4e05d85f26d03de3624c7c14fcbc852d988d53
+Size (avrdude-7.0.tar.gz) = 943631 bytes
+SHA1 (patch-Makefile.am) = 67ce722ca28e8a2e23637880f010b3e6c0ddbe7c
+SHA1 (patch-configure.ac) = 48db97466c3a565f95ff6619cae4090b743d09b6
+SHA1 (patch-doc_Makefile.am) = f8c752921ded3de3c842a33f0dc88f3e3a3dd357
+SHA1 (patch-doc_Makefile.in) = 64442bcd59e053ee2b6bbe6c150848d54c540fef
+SHA1 (patch-freebsd__ppi.h) = 1dfcc1e510a4984f875753f183508bdcbd61c32d
+SHA1 (patch-ppi.c) = 524ed843a29e94fce67ce73f5615d64d2444bf66
+SHA1 (patch-usb__libusb.c) = 6e6c912f10e91c5d8c9f7264ee5db5161c963288
diff --git a/avrdude/patches/patch-Makefile.am b/avrdude/patches/patch-Makefile.am
new file mode 100644
index 0000000000..ec403d3911
--- /dev/null
+++ b/avrdude/patches/patch-Makefile.am
@@ -0,0 +1,31 @@
+$NetBSD$
+
+- Use supported automake methods to install the example config file to
+  egconfdir instead of hacking the configure script and Makefile.in directly.
+
+--- Makefile.am.orig	2022-05-07 20:29:58.000000000 +0000
++++ Makefile.am
+@@ -203,7 +203,8 @@ avrdude_SOURCES = \
+ 
+ man_MANS = avrdude.1
+ 
+-sysconf_DATA = avrdude.conf
++egconfdir=	${datadir}/examples/avrdude
++egconf_DATA = avrdude.conf
+ 
+ install-exec-local: backup-avrdude-conf
+ 
+@@ -212,10 +213,8 @@ distclean-local:
+ 
+ # This will get run before the config file is installed.
+ backup-avrdude-conf:
+-	@echo "Backing up avrdude.conf in ${DESTDIR}${sysconfdir}"
+-	@if test -e ${DESTDIR}${sysconfdir}/avrdude.conf; then \
+-		cp -pR ${DESTDIR}${sysconfdir}/avrdude.conf \
+-			${DESTDIR}${sysconfdir}/avrdude.conf.bak; \
+-	fi
++	@echo "No back up of avrdude.conf in ${DESTDIR}${sysconfdir} is required"
++	@echo "because we simply install an example into ${DESTDIR}${egconfdir}"
++	@echo "and leave it to the user to install/update the actual working copy"
+ 
+ ACLOCAL_AMFLAGS = -I m4
diff --git a/avrdude/patches/patch-configure.ac b/avrdude/patches/patch-configure.ac
new file mode 100644
index 0000000000..ee0df5251b
--- /dev/null
+++ b/avrdude/patches/patch-configure.ac
@@ -0,0 +1,79 @@
+$NetBSD$
+
+- ERROR: [check-portability.awk] => Found test ... == ...:
+
+- allow a different default serial/parallel port to be specified
+  which is useful for pkgsrc (since we have defaults for various
+  platforms available and they're not the same for different
+  MACHINE_ARCH's in NetBSD).
+
+--- configure.ac.orig	2022-05-07 20:39:37.000000000 +0000
++++ configure.ac
+@@ -51,7 +51,7 @@ AC_PROG_AR
+ AH_TEMPLATE([HAVE_YYLEX_DESTROY],
+             [Define if lex/flex has yylex_destroy])
+ # flex should have this
+-if test "x$LEX" == xflex; then
++if test "x$LEX" = xflex; then
+    AC_MSG_CHECKING([whether yylex_destroy is generated by flex])
+    flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
+    case $flex_version in
+@@ -359,32 +359,44 @@ AC_SUBST(DIST_SUBDIRS_AC, $DIST_SUBDIRS_
+ # If a system doesn't have a PC style parallel, mark it as unknown.
+ case $target in
+ 	i[[3456]]86-*-linux*|x86_64-*-linux*)
+-		DEFAULT_PAR_PORT="/dev/parport0"
+-		DEFAULT_SER_PORT="/dev/ttyS0"
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"/dev/parport0"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"/dev/ttyS0"}
+ 		;;
+ 	*-*-linux*)
+-		DEFAULT_PAR_PORT="unknown"
+-		DEFAULT_SER_PORT="/dev/ttyS0"
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"unknown"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"/dev/ttyS0"}
+ 		;;
+ 	i[[3456]]86-*-*freebsd*|amd64-*-*freebsd*)
+-		DEFAULT_PAR_PORT="/dev/ppi0"
+-		DEFAULT_SER_PORT="/dev/cuad0"
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"/dev/ppi0"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"/dev/cuad0"}
+ 		;;
+ 	*-*-*freebsd*)
+-		DEFAULT_PAR_PORT="unknown"
+-		DEFAULT_SER_PORT="/dev/cuad0"
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"unknown"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"/dev/cuad0"}
++		;;
++	*-*-dragonfly*)
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"/dev/ppi0"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"/dev/cuad0"}
++		;;
++	*-*-netbsd*)
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"unknown"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"/dev/tty00"}
+ 		;;
+ 	*-*-solaris*)
+-		DEFAULT_PAR_PORT="/dev/printers/0"
+-		DEFAULT_SER_PORT="/dev/term/a"
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"/dev/printers/0"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"/dev/term/a"}
++		;;
++	*-*-msdos* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"lpt1"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"com1"}
++		;;
++	*)
++		DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT:-"unknown"}
++		DEFAULT_SER_PORT=${DEFAULT_SER_PORT:-"unknown"}
+ 		;;
+ 	*-*-msdos* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+-		DEFAULT_PAR_PORT="lpt1"
+-		DEFAULT_SER_PORT="com1"
+ 		;;
+ 	*)
+-		DEFAULT_PAR_PORT="unknown"
+-		DEFAULT_SER_PORT="unknown"
+ 		;;
+ esac
+ 
diff --git a/avrdude/patches/patch-doc_Makefile.am b/avrdude/patches/patch-doc_Makefile.am
new file mode 100644
index 0000000000..21af97a8c2
--- /dev/null
+++ b/avrdude/patches/patch-doc_Makefile.am
@@ -0,0 +1,15 @@
+$NetBSD$
+
+the builtin [ on at least solaris doesn't understand -e
+
+--- doc/Makefile.am.orig	2022-05-07 20:29:58.000000000 +0000
++++ doc/Makefile.am
+@@ -41,7 +41,7 @@ html: avrdude-html/avrdude.html
+ 
+ avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) $(GENERATED_TEXINFOS)
+ 	texi2html --split=node --css-include=$(srcdir)/avrdude.css $(srcdir)/$(info_TEXINFOS)
+-	if [ -e ./avrdude.html -o -e ./avrdude_1.html ]; then \
++	if [ -f ./avrdude.html -o -f ./avrdude_1.html ]; then \
+ 	 mkdir -p avrdude-html ; \
+ 	 mv -f *.html avrdude-html ; \
+ 	else \
diff --git a/avrdude/patches/patch-doc_Makefile.in b/avrdude/patches/patch-doc_Makefile.in
new file mode 100644
index 0000000000..df7a1a6d13
--- /dev/null
+++ b/avrdude/patches/patch-doc_Makefile.in
@@ -0,0 +1,15 @@
+$NetBSD$
+
+regen
+
+--- doc/Makefile.in.orig	2022-05-07 20:40:53.000000000 +0000
++++ doc/Makefile.in
+@@ -836,7 +836,7 @@ html: avrdude-html/avrdude.html
+ 
+ avrdude-html/avrdude.html: $(srcdir)/$(info_TEXINFOS) $(GENERATED_TEXINFOS)
+ 	texi2html --split=node --css-include=$(srcdir)/avrdude.css $(srcdir)/$(info_TEXINFOS)
+-	if [ -e ./avrdude.html -o -e ./avrdude_1.html ]; then \
++	if [ -f ./avrdude.html -o -f ./avrdude_1.html ]; then \
+ 	 mkdir -p avrdude-html ; \
+ 	 mv -f *.html avrdude-html ; \
+ 	else \
diff --git a/avrdude/patches/patch-freebsd__ppi.h b/avrdude/patches/patch-freebsd__ppi.h
new file mode 100644
index 0000000000..e7277f1727
--- /dev/null
+++ b/avrdude/patches/patch-freebsd__ppi.h
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Apparently FreeBSD adaptation, not recently confirmed (mef).
+
+--- freebsd_ppi.h.orig	2022-05-07 20:29:58.000000000 +0000
++++ freebsd_ppi.h
+@@ -21,7 +21,11 @@
+ #ifndef freebsd_ppi_h
+ #define freebsd_ppi_h
+ 
++#ifdef __FreeBSD__
+ #include <dev/ppbus/ppi.h>
++#else
++#include <dev/misc/ppi/ppi.h>
++#endif
+ 
+ #define ppi_claim(fd) {}
+ 
diff --git a/avrdude/patches/patch-ppi.c b/avrdude/patches/patch-ppi.c
new file mode 100644
index 0000000000..2ed376314c
--- /dev/null
+++ b/avrdude/patches/patch-ppi.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add DragonFly.
+
+--- ppi.c.orig	2022-05-07 20:29:58.000000000 +0000
++++ ppi.c
+@@ -32,7 +32,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+ 
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ # include "freebsd_ppi.h"
+ #elif defined(__linux__)
+ # include "linux_ppdev.h"
diff --git a/avrdude/patches/patch-usb__libusb.c b/avrdude/patches/patch-usb__libusb.c
new file mode 100644
index 0000000000..33570589f4
--- /dev/null
+++ b/avrdude/patches/patch-usb__libusb.c
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Work around AVRISP mkII initial sync stalls on NetBSD.
+
+--- usb_libusb.c.orig	2022-05-07 20:29:58.000000000 +0000
++++ usb_libusb.c
+@@ -313,6 +313,17 @@ static void usbdev_close(union filedescr
+   if (udev == NULL)
+     return;
+ 
++#if defined(__NetBSD__)
++#define USB_FEAT_ENDPOINT_HALT 0
++  /*
++   * Clear Feature Endpoint Halt to reset device's data toggle to DATA0.
++   * This way, when we reopen expecting DATA0, things don't time out.
++   */
++  usb_control_msg(udev, USB_TYPE_STANDARD | USB_RECIP_ENDPOINT,
++		  USB_REQ_CLEAR_FEATURE, USB_FEAT_ENDPOINT_HALT,
++		  fd->usb.rep & 0xf, NULL, 0, 100);
++#endif
++
+   (void)usb_release_interface(udev, usb_interface);
+ 
+ #if defined(__linux__)


Home | Main Index | Thread Index | Old Index