--- avarice-2.10.orig/configure +++ avarice-2.10/configure @@ -4834,6 +4834,78 @@ fi +## New bfd requires libz + +{ echo "$as_me:$LINENO: checking for deflate in -lz" >&5 +echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6; } +if test "${ac_cv_lib_z_deflate+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char deflate (); +int +main () +{ +return deflate (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_z_deflate=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_z_deflate=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 +echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6; } +if test $ac_cv_lib_z_deflate = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + LIBS="-lz $LIBS" + +fi + if test "x$ac_found_bfd" = "xno"; then { { $as_echo "$as_me:$LINENO: error: You need to install libbfd.a from binutils." >&5 --- avarice-2.10.orig/configure.ac +++ avarice-2.10/configure.ac @@ -66,6 +66,8 @@ AC_CHECK_LIB([iberty], [xmalloc]) AC_CHECK_LIB([bfd], [bfd_init], , [ac_found_bfd=no]) AC_CHECK_LIB([usb], [usb_get_string_simple]) +## New bfd requires libz +AC_CHECK_LIB([z], [deflate]) if test "x$ac_found_bfd" = "xno"; then AC_MSG_ERROR([You need to install libbfd.a from binutils.]) --- avarice-2.10.orig/src/jtag2usb.cc +++ avarice-2.10/src/jtag2usb.cc @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -71,6 +72,7 @@ struct usb_device *dev; usb_dev_handle *udev; char *serno, *cp2; + char *s; u_int16_t pid; size_t x; @@ -95,7 +97,9 @@ * right-to-left, so only the least significant nibbles need to be * specified. */ - if ((serno = strchr(jtagDeviceName, ':')) != NULL) + s = strdup(jtagDeviceName); + assert(s != NULL); + if ((serno = strchr(s, ':')) != NULL) { /* first, drop all colons there if any */ cp2 = ++serno; @@ -109,6 +113,7 @@ unixCheck(strlen(serno) <= 12, "invalid serial number \"%s\"", serno); } + free(s); usb_init(); --- avarice-2.10.orig/src/Makefile.in +++ avarice-2.10/src/Makefile.in @@ -101,7 +101,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ +LIBS = -lusb /usr/lib/libbfd.a -lz -liberty -ldl LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ --- avarice-2.10.orig/debian/install +++ avarice-2.10/debian/install @@ -0,0 +1 @@ +src/avarice usr/bin --- avarice-2.10.orig/debian/copyright +++ avarice-2.10/debian/copyright @@ -0,0 +1,26 @@ +Upstream Author: Joerg Wunsch +URL: http://sourceforge.net/projects/avarice + +Copyright: + +Copyright 2008 Joerg Wunsch +Copyright 2004 James Harris +Copyright 2004 Intel Corporation +Copyright 2001 Scott Finneran + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common-licenses/GPL. --- avarice-2.10.orig/debian/control +++ avarice-2.10/debian/control @@ -0,0 +1,18 @@ +Source: avarice +Section: electronics +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Shaun Jackman +Build-Depends: binutils-dev, libusb-dev, zlib1g-dev, debhelper (>> 7) +Build-Conflicts: binutils-multiarch +Standards-Version: 3.8.3 + +Package: avarice +Section: electronics +Architecture: any +Depends: ${shlibs:Depends} +Recommends: gdb-avr +Breaks: udev (<< 136-1) +Description: use GDB with Atmel's JTAG ICE for the AVR + AVaRICE translates between GDB's remote debug protocol and the AVR + JTAG ICE protocol. --- avarice-2.10.orig/debian/avarice.udev +++ avarice-2.10/debian/avarice.udev @@ -0,0 +1,9 @@ +SUBSYSTEM!="usb_device", ACTION!="add", GOTO="avarice_end" + +# Atmel Corp. JTAG ICE mkII +SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2103", MODE="660", GROUP="dialout" + +# Atmel Corp. AVR Dragon +SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2107", MODE="660", GROUP="dialout" + +LABEL="avarice_end" --- avarice-2.10.orig/debian/compat +++ avarice-2.10/debian/compat @@ -0,0 +1 @@ +7 --- avarice-2.10.orig/debian/changelog +++ avarice-2.10/debian/changelog @@ -0,0 +1,154 @@ +avarice (2.10-3ubuntu1) lucid; urgency=low + + * Merge from debian testing (LP: #518113). Remaining changes: + - debian/avarice.rules: Rename to debian/avarice.udev + - debian/rules: Use dh_installudev to install udev rules + - debian/install: Drop previous install rule + - debian/links: Drop previous symlink + - debian/preinst: Remove previous symlink and rules if unmodified, otherwise + rename rules to new name + - debian/control: Breaks on udev to get correct version + + -- Scott Howard Sat, 06 Feb 2010 12:35:01 -0500 + +avarice (2.10-3) unstable; urgency=medium + + * Patch usb_dev_handle to fix a FTBFS. Closes: #565280. + Thanks to Nobuhiro Iwamatsu. + + -- Shaun Jackman Sun, 24 Jan 2010 11:21:12 -0800 + +avarice (2.10-2) unstable; urgency=medium + + * libbfd requires libz and libdl. Closes: #552977. + + -- Shaun Jackman Wed, 13 Jan 2010 23:05:38 -0800 + +avarice (2.10-1) unstable; urgency=low + + * New upstream release. + * Update the Debian policy to version 3.8.3. + * Bump debhelper to version 7. + * Use dh_prep rather than dh_clean -k. + * Acknowledge NMU. Closes: #521901. + + -- Shaun Jackman Sun, 16 Aug 2009 11:17:09 -0700 + +avarice (2.9-1.1ubuntu2) karmic; urgency=low + + * Added debian/patches/01_gcc4.4_fix.diff to fix FTBFS (LP: #432538) + + -- Nicolas Van Wambeke Fri, 18 Sep 2009 16:03:07 +0200 + +avarice (2.9-1.1ubuntu1) karmic; urgency=low + + * Merge from debian unstable (LP: #372793), remaining changes: + - debian/avarice.rules: Rename to debian/avarice.udev + - debian/rules: Use dh_installudev to install udev rules + - debian/install: Drop previous install rule + - debian/links: Drop previous symlink + - debian/preinst: Remove previous symlink and rules if unmodified, otherwise + rename rules to new name + - debian/control: Bump build-depend on debhelper to install udev rules into + /lib/udev/rules.d, add Breaks on udev to get correct version + - Newer bfd uses libz, so we need to link against that as well as bfd is linked + statically. The static linking is done by simply changing src/Makefile.in + + -- Andres Rodriguez Thu, 07 May 2009 12:43:51 -0500 + +avarice (2.9-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTBFS because of missing zlib import. Add zlib1g-dev as a + Build-Depency. (Closes: #521901) + * Added a Build-Conflicts on binutils-multiarch as that diverts + the static archive of libbfd away. + + -- Philipp Kern Wed, 06 May 2009 23:57:50 +0200 + +avarice (2.9-1) unstable; urgency=low + + * New upstream release. + + -- Shaun Jackman Mon, 30 Mar 2009 19:09:40 -0700 + +avarice (2.8-1ubuntu2) jaunty; urgency=low + + * debian/avarice.rules: Rename to debian/avarice.udev + * debian/rules: Use dh_installudev to install udev rules + * debian/install: Drop previous install rule + * debian/links: And previous symlink + * debian/preinst: Remove previous symlink and rules if unmodified, otherwise + rename rules to new name + * debian/control: Bump build-depend on debhelper to install udev rules into + /lib/udev/rules.d, add Breaks on udev to get correct version + + -- Scott James Remnant Tue, 13 Jan 2009 01:37:49 +0000 + +avarice (2.8-1ubuntu1) jaunty; urgency=low + + * Newer bfd uses libz, so we need to link against that as well as bfd is + linked statically. + - Beware, the static linking is done by simply changing src/Makefile.in, + so running automake will undo this change. + + -- James Westby Mon, 24 Nov 2008 03:02:09 +0000 + +avarice (2.8-1) unstable; urgency=low + + * New upstream release. + * Update the Debian policy to version 3.8.0.1. + + -- Shaun Jackman Fri, 21 Nov 2008 22:00:12 -0800 + +avarice (2.7-2) unstable; urgency=low + + * Add the AVR Dragon to the udev rules. Closes: #461986. + * Update the Debian policy to version 3.7.3. + + -- Shaun Jackman Mon, 21 Jan 2008 12:42:25 -0800 + +avarice (2.7-1) unstable; urgency=low + + * New upstream release. + * Fix lintian warning: debian-rules-ignores-make-clean-error. + + -- Shaun Jackman Sat, 17 Nov 2007 21:34:22 -0700 + +avarice (2.6-2) unstable; urgency=low + + * Upload to unstable. + + -- Shaun Jackman Thu, 5 Jul 2007 10:25:08 -0600 + +avarice (2.6-1) experimental; urgency=low + + * New upstream release. + + -- Shaun Jackman Fri, 23 Feb 2007 09:57:06 -0700 + +avarice (2.5-1) unstable; urgency=low + + * New upstream release. + * Update the Debian policy to version 3.7.2.2. + + -- Shaun Jackman Thu, 30 Nov 2006 09:42:26 -0700 + +avarice (2.4-3) unstable; urgency=medium + + * Link statically against libbfd. Closes: #381505. + + -- Shaun Jackman Tue, 8 Aug 2006 14:11:45 -0600 + +avarice (2.4-2) unstable; urgency=medium + + * Add binutils-dev to Build-Depends. Closes: #381136. + + -- Shaun Jackman Wed, 2 Aug 2006 17:35:41 -0600 + +avarice (2.4-1) unstable; urgency=low + + * Initial release. Closes: #380695. + + -- Shaun Jackman Tue, 1 Aug 2006 09:33:10 -0600 + --- avarice-2.10.orig/debian/preinst +++ avarice-2.10/debian/preinst @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +if [ "$1" = install ] || [ "$1" = upgrade ]; then + if [ -L "/etc/udev/rules.d/z60_avarice.rules" ]; then + rm -f /etc/udev/rules.d/z60_avarice.rules + fi + + if [ -e "/etc/udev/avarice.rules" ]; then + if [ "`md5sum \"/etc/udev/avarice.rules\" | sed -e \"s/ .*//\"`" = \ + "`dpkg-query -W -f='${Conffiles}' avarice | sed -n -e \"\\\\' /etc/udev/avarice.rules's/.* //p\"`" ] + then + rm -f "/etc/udev/avarice.rules" + else + mv "/etc/udev/avarice.rules" "/etc/udev/rules.d/40-avarice.rules" + fi + fi +fi + +#DEBHELPER# --- avarice-2.10.orig/debian/watch +++ avarice-2.10/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://sf.net/avarice/avarice-(.+)\.tar\.bz2 debian uupdate --- avarice-2.10.orig/debian/manpages +++ avarice-2.10/debian/manpages @@ -0,0 +1 @@ +doc/avarice.1 --- avarice-2.10.orig/debian/docs +++ avarice-2.10/debian/docs @@ -0,0 +1 @@ +doc/*.txt --- avarice-2.10.orig/debian/rules +++ avarice-2.10/debian/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f + +build: build-stamp +build-stamp: + ./configure + $(MAKE) avarice_LDADD=-lz + touch $@ + +clean: + rm -f build-stamp + dh_clean + [ ! -f Makefile ] || $(MAKE) distclean + +binary-indep: + +binary-arch binary: + dh_prep + dh_install -a + dh_installchangelogs -a ChangeLog + dh_installdocs -a + dh_installman -a + dh_installudev -a + dh_link -a + dh_compress -a + dh_fixperms -a + dh_strip -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +.PHONY: build clean binary-indep binary-arch binary --- avarice-2.10.orig/doc/avarice.1 +++ avarice-2.10/doc/avarice.1 @@ -23,7 +23,6 @@ .. .TH avarice 1 "September 29, 2008" -.LO 1 .SH NAME avarice \- Provides an interface from avr-gdb to Atmel's JTAGICE box. .SH SYNOPSIS