UPDATE: devel/dfu-programmer 0.6.2 to 0.7.2

2018-03-04 Thread Kaashif Hymabaccus
This is an update for dfu-programmer, program for uploading programs
to Atmel microcontrollers.

There is a small patch because the author forgot to include stdlib.h
in atmel.c. Also their website changed to a GitHub page, but their
release tarballs are still kept on SourceForge, which is a bit weird,
there aren't any actual release tarballs on GitHub (just autogenerated
ones).

I have tested it with an Atmel AT90USB162 and it works fine with the
launch, read, erase, flash, get commands. I don't have any hardware
which supports the other commands, I'd appreciate if someone could
test those if they have a board they can program through DFU.

diff --git Makefile Makefile
index 699f98ebe20..9683ffcae30 100644
--- Makefile
+++ Makefile
@@ -1,20 +1,21 @@
 # $OpenBSD: Makefile,v 1.4 2014/01/09 12:06:18 stsp Exp $
 
 COMMENT =  Device Firmware Update-based programmer for Atmel chips
-V =0.6.2
-DISTNAME = dfu-programmer-${V}
+DISTNAME = dfu-programmer-0.7.2
 CATEGORIES =   devel
-HOMEPAGE = http://dfu-programmer.sourceforge.net/
+HOMEPAGE = http://dfu-programmer.github.io/
 
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB =  c pthread usb-1.0
-LIB_DEPENDS =  devel/libusb1
+WANTLIB =  c usb-1.0
+
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=dfu-programmer/}
-CONFIGURE_STYLE =  autoconf
-AUTOCONF_VERSION = 2.68
-CONFIGURE_ENV =CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+
+LIB_DEPENDS =  devel/libusb1
+
+CONFIGURE_STYLE =  gnu
+CONFIGURE_ENV+=CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${CFLAGS} -L${LOCALBASE}/lib"
 
diff --git distinfo distinfo
index e0400b79212..db8d0b973a0 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (dfu-programmer-0.6.2.tar.gz) = 
ASCWakJN2YEkliBVdQ6Qy9bHtrD79bGHv0Ndqgokr2U=
-SIZE (dfu-programmer-0.6.2.tar.gz) = 134941
+SHA256 (dfu-programmer-0.7.2.tar.gz) = 
HbTTaxrtqyrcl26PqlSV3zz4LcS/iDYz3GunH3xK+ZU=
+SIZE (dfu-programmer-0.7.2.tar.gz) = 146613
diff --git patches/patch-configure_ac patches/patch-configure_ac
deleted file mode 100644
index 163e7d8cab2..000
--- patches/patch-configure_ac
+++ /dev/null
@@ -1,14 +0,0 @@
-$OpenBSD: patch-configure_ac,v 1.1 2014/01/09 12:06:18 stsp Exp $
 configure.ac.orig  Tue Jan  7 13:28:50 2014
-+++ configure.ac   Tue Jan  7 13:29:52 2014
-@@ -28,8 +28,8 @@ if test "$disable_libusb_1_0" = "no"; then
-   ifdef([PKG_CHECK_MODULES],
- [PKG_CHECK_MODULES(LIBUSB_1_0, [ libusb-1.0 >= 1.0.0 ], 
have_libusb_1_0=yes, have_libusb_1_0=no)],
- [have_libusb_1_0=yes
--  LIBUSB_1_0_CFLAGS=-I/usr/include/libusb-1.0
--  LIBUSB_1_0_LIBS=-lusb-1.0])
-+  LIBUSB_1_0_CFLAGS="`pkg-config --cflags libusb-1.0`"
-+  LIBUSB_1_0_LIBS="`pkg-config --libs libusb-1.0`"])
-   if test "$have_libusb_1_0" = "yes"; then
- AS_ECHO("using libusb_1.0");
- CFLAGS="$CFLAGS $LIBUSB_1_0_CFLAGS"



Re: UPDATE: devel/dfu-programmer 0.6.2 to 0.7.2

2018-03-05 Thread Stuart Henderson
On 2018/03/04 22:54, Kaashif Hymabaccus wrote:
> There is a small patch because the author forgot to include stdlib.h
> in atmel.c.

This patch is missing from your diff.



Re: UPDATE: devel/dfu-programmer 0.6.2 to 0.7.2

2018-03-05 Thread Kaashif Hymabaccus
On Mon, Mar 05, 2018 at 08:58:06AM +, Stuart Henderson wrote:
> On 2018/03/04 22:54, Kaashif Hymabaccus wrote:
> > There is a small patch because the author forgot to include stdlib.h
> > in atmel.c.
> 
> This patch is missing from your diff.

Thanks, here is the full diff:

diff --git Makefile Makefile
index 699f98ebe20..9683ffcae30 100644
--- Makefile
+++ Makefile
@@ -1,20 +1,21 @@
 # $OpenBSD: Makefile,v 1.4 2014/01/09 12:06:18 stsp Exp $
 
 COMMENT =  Device Firmware Update-based programmer for Atmel chips
-V =0.6.2
-DISTNAME = dfu-programmer-${V}
+DISTNAME = dfu-programmer-0.7.2
 CATEGORIES =   devel
-HOMEPAGE = http://dfu-programmer.sourceforge.net/
+HOMEPAGE = http://dfu-programmer.github.io/
 
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB =  c pthread usb-1.0
-LIB_DEPENDS =  devel/libusb1
+WANTLIB =  c usb-1.0
+
 MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=dfu-programmer/}
-CONFIGURE_STYLE =  autoconf
-AUTOCONF_VERSION = 2.68
-CONFIGURE_ENV =CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+
+LIB_DEPENDS =  devel/libusb1
+
+CONFIGURE_STYLE =  gnu
+CONFIGURE_ENV+=CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${CFLAGS} -L${LOCALBASE}/lib"
 
diff --git distinfo distinfo
index e0400b79212..db8d0b973a0 100644
--- distinfo
+++ distinfo
@@ -1,2 +1,2 @@
-SHA256 (dfu-programmer-0.6.2.tar.gz) = 
ASCWakJN2YEkliBVdQ6Qy9bHtrD79bGHv0Ndqgokr2U=
-SIZE (dfu-programmer-0.6.2.tar.gz) = 134941
+SHA256 (dfu-programmer-0.7.2.tar.gz) = 
HbTTaxrtqyrcl26PqlSV3zz4LcS/iDYz3GunH3xK+ZU=
+SIZE (dfu-programmer-0.7.2.tar.gz) = 146613
diff --git patches/patch-configure_ac patches/patch-configure_ac
deleted file mode 100644
index 163e7d8cab2..000
--- patches/patch-configure_ac
+++ /dev/null
@@ -1,14 +0,0 @@
-$OpenBSD: patch-configure_ac,v 1.1 2014/01/09 12:06:18 stsp Exp $
 configure.ac.orig  Tue Jan  7 13:28:50 2014
-+++ configure.ac   Tue Jan  7 13:29:52 2014
-@@ -28,8 +28,8 @@ if test "$disable_libusb_1_0" = "no"; then
-   ifdef([PKG_CHECK_MODULES],
- [PKG_CHECK_MODULES(LIBUSB_1_0, [ libusb-1.0 >= 1.0.0 ], 
have_libusb_1_0=yes, have_libusb_1_0=no)],
- [have_libusb_1_0=yes
--  LIBUSB_1_0_CFLAGS=-I/usr/include/libusb-1.0
--  LIBUSB_1_0_LIBS=-lusb-1.0])
-+  LIBUSB_1_0_CFLAGS="`pkg-config --cflags libusb-1.0`"
-+  LIBUSB_1_0_LIBS="`pkg-config --libs libusb-1.0`"])
-   if test "$have_libusb_1_0" = "yes"; then
- AS_ECHO("using libusb_1.0");
- CFLAGS="$CFLAGS $LIBUSB_1_0_CFLAGS"
diff --git patches/patch-src_atmel_c patches/patch-src_atmel_c
new file mode 100644
index 000..8a07966ebe9
--- /dev/null
+++ patches/patch-src_atmel_c
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: src/atmel.c
+--- src/atmel.c.orig
 src/atmel.c
+@@ -21,6 +21,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include 
+ #include 
+ #include