From ecbe8ca508828eb6bd1205b3b9d5bef43c130948 Mon Sep 17 00:00:00 2001 From: krant Date: Thu, 22 Feb 2024 09:36:14 +0200 Subject: [PATCH] avrdude: update to 7.3 - Use local tarball - Use CMake - Depend from libusb-1.0 instead of libusb-compat - Remove obsolete patches Signed-off-by: krant --- utils/avrdude/Makefile | 31 ++++------ .../patches/010-configure-fixups.patch | 18 ------ .../patches/020-no-cpp-timestamps.patch | 21 ------- utils/avrdude/patches/100-musl-compat.patch | 60 ------------------- utils/avrdude/patches/110-ud-to-u.patch | 38 ------------ 5 files changed, 12 insertions(+), 156 deletions(-) delete mode 100644 utils/avrdude/patches/010-configure-fixups.patch delete mode 100644 utils/avrdude/patches/020-no-cpp-timestamps.patch delete mode 100644 utils/avrdude/patches/100-musl-compat.patch delete mode 100644 utils/avrdude/patches/110-ud-to-u.patch diff --git a/utils/avrdude/Makefile b/utils/avrdude/Makefile index 04f9b155d9..77d7ded110 100644 --- a/utils/avrdude/Makefile +++ b/utils/avrdude/Makefile @@ -8,43 +8,36 @@ include $(TOPDIR)/rules.mk PKG_NAME:=avrdude -PKG_VERSION:=6.3 -PKG_RELEASE:=3 +PKG_VERSION:=7.3 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME) -PKG_HASH:=0f9f731b6394ca7795b88359689a7fa1fba818c6e1d962513eb28da670e0a196 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/avrdudes/avrdude +PKG_SOURCE_VERSION:=v$(PKG_VERSION) +PKG_MIRROR_HASH:=6799ef4d73870a0d130a28047917f051d8edd2aeb11a7825f1c19e416e38f6b6 PKG_MAINTAINER:=Ted Hess PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING -PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 - include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/nls.mk +include $(INCLUDE_DIR)/cmake.mk define Package/avrdude SECTION:=utils CATEGORY:=Utilities SUBMENU:=Microcontroller programming TITLE:=AVR Downloader/UploaDEr - URL:=https://www.nongnu.org/avrdude/ - DEPENDS:=+libncurses +libreadline +libusb-compat +libftdi1 +libelf + URL:=https://github.com/avrdudes/avrdude + DEPENDS:=+libncurses +libreadline +libusb-1.0 +libftdi1 +libelf endef define Package/avrdude/description AVRDUDE is a full featured program for programming Atmel's AVR CPU's. endef -CONFIGURE_ARGS+= \ - --disable-doc \ - --disable-parport \ - --enable-linuxgpio \ - -TARGET_CFLAGS+= \ - -D_GNU_SOURCE \ +CMAKE_OPTIONS += \ + -DHAVE_LINUXGPIO=ON define Package/avrdude/conffiles /etc/avrdude.conf @@ -52,7 +45,7 @@ endef define Package/avrdude/install $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/avrdude.conf $(1)/etc/ + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/etc/avrdude.conf $(1)/etc/ $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/avrdude $(1)/usr/bin/ endef diff --git a/utils/avrdude/patches/010-configure-fixups.patch b/utils/avrdude/patches/010-configure-fixups.patch deleted file mode 100644 index 11ddad7eb4..0000000000 --- a/utils/avrdude/patches/010-configure-fixups.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -38,6 +38,7 @@ LT_INIT() - - # Checks for programs. - AC_PROG_CC -+AC_PROG_CPP - AC_PROG_INSTALL - AC_PROG_SED - AC_PROG_YACC -@@ -182,6 +183,7 @@ fi - AC_SUBST(LIBPTHREAD, $LIBPTHREAD) - # Checks for header files. - AC_CHECK_HEADERS([limits.h stdlib.h string.h]) -+AC_CHECK_HEADERS([inttypes.h stdint.h]) - AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h]) - AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#include - #include ]) diff --git a/utils/avrdude/patches/020-no-cpp-timestamps.patch b/utils/avrdude/patches/020-no-cpp-timestamps.patch deleted file mode 100644 index dab8a43710..0000000000 --- a/utils/avrdude/patches/020-no-cpp-timestamps.patch +++ /dev/null @@ -1,21 +0,0 @@ -Description: no CPP macro timestamps - Reporducible builds project support, see: - http://wiki.debian.org/ReproducibleBuilds/TimestampsFromCPPMacros -Author: Milan Kupcevic ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/main.c -+++ b/main.c -@@ -679,10 +679,10 @@ int main(int argc, char * argv []) - * Print out an identifying string so folks can tell what version - * they are running - */ -- avrdude_message(MSG_NOTICE, "\n%s: Version %s, compiled on %s at %s\n" -+ avrdude_message(MSG_NOTICE, "\n%s: Version %s\n" - "%sCopyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/\n" - "%sCopyright (c) 2007-2014 Joerg Wunsch\n\n", -- progname, version, __DATE__, __TIME__, progbuf, progbuf); -+ progname, version, progbuf, progbuf); - avrdude_message(MSG_NOTICE, "%sSystem wide configuration file is \"%s\"\n", - progbuf, sys_config); - diff --git a/utils/avrdude/patches/100-musl-compat.patch b/utils/avrdude/patches/100-musl-compat.patch deleted file mode 100644 index cef5fe42ef..0000000000 --- a/utils/avrdude/patches/100-musl-compat.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- a/dfu.h -+++ b/dfu.h -@@ -25,6 +25,7 @@ - - #ifdef HAVE_LIBUSB - #if defined(HAVE_USB_H) -+# include - # include - #elif defined(HAVE_LUSB0_USB_H) - # include ---- a/pickit2.c -+++ b/pickit2.c -@@ -50,6 +50,7 @@ - #include - #include - #include -+#include - - #include "avrdude.h" - #include "libavrdude.h" ---- a/ser_avrdoper.c -+++ b/ser_avrdoper.c -@@ -248,6 +248,7 @@ static int usbGetReport(union filedescri - /* ------------------------------------------------------------------------ */ - - #if defined(HAVE_USB_H) -+# include - # include - #elif defined(HAVE_LUSB0_USB_H) - # include ---- a/usbtiny.c -+++ b/usbtiny.c -@@ -40,6 +40,7 @@ - - #if defined(HAVE_LIBUSB) // we use LIBUSB to talk to the board - #if defined(HAVE_USB_H) -+# include - # include - #elif defined(HAVE_LUSB0_USB_H) - # include ---- a/usbasp.c -+++ b/usbasp.c -@@ -54,6 +54,7 @@ - # endif - #else - # if defined(HAVE_USB_H) -+# include - # include - # elif defined(HAVE_LUSB0_USB_H) - # include ---- a/usb_libusb.c -+++ b/usb_libusb.c -@@ -36,6 +36,7 @@ - #include - - #if defined(HAVE_USB_H) -+# include - # include - #elif defined(HAVE_LUSB0_USB_H) - # include diff --git a/utils/avrdude/patches/110-ud-to-u.patch b/utils/avrdude/patches/110-ud-to-u.patch deleted file mode 100644 index 470f4da679..0000000000 --- a/utils/avrdude/patches/110-ud-to-u.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/linuxgpio.c -+++ b/linuxgpio.c -@@ -66,7 +66,7 @@ static int linuxgpio_export(unsigned int - return fd; - } - -- len = snprintf(buf, sizeof(buf), "%ud", gpio); -+ len = snprintf(buf, sizeof(buf), "%u", gpio); - r = write(fd, buf, len); - close(fd); - -@@ -84,7 +84,7 @@ static int linuxgpio_unexport(unsigned i - return fd; - } - -- len = snprintf(buf, sizeof(buf), "%ud", gpio); -+ len = snprintf(buf, sizeof(buf), "%u", gpio); - r = write(fd, buf, len); - close(fd); - -@@ -95,7 +95,7 @@ static int linuxgpio_openfd(unsigned int - { - char filepath[60]; - -- snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%ud/value", gpio); -+ snprintf(filepath, sizeof(filepath), "/sys/class/gpio/gpio%u/value", gpio); - return (open(filepath, O_RDWR)); - } - -@@ -104,7 +104,7 @@ static int linuxgpio_dir(unsigned int gp - int fd, r; - char buf[60]; - -- snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%ud/direction", gpio); -+ snprintf(buf, sizeof(buf), "/sys/class/gpio/gpio%u/direction", gpio); - - fd = open(buf, O_WRONLY); - if (fd < 0) {