# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 117880 2014-03-16 02:29:12Z larryv@macports.org $

PortSystem          1.0

name                avarice
version             2.13
revision            1
categories          cross
platforms           darwin
license             GPL-2
maintainers         nomaintainer

description         AVR JTAG-ICE control software
long_description    AVaRICE is a program which interfaces the GNU Debugger \
                    GDB with the AVR JTAG ICE available from Atmel.
homepage            http://avarice.sourceforge.net/

depends_lib         port:avr-binutils \
                    port:gettext \
                    port:libusb-compat \
                    port:zlib \

master_sites        sourceforge:project/avarice/avarice/avarice-${version}
use_bzip2           yes
checksums           rmd160  dbba18767365c5f8ef302380842f3a6a2fb06a7a \
                    sha256  a14738fe78e1a0a9321abcca7e685a00ce3ced207622ccbcd881ac32030c104a

configure.ldflags-append    -L${prefix}/avr/host/lib

# PACKAGE/PACKAGE_VERSION are required to work around an
# #ifdef check added in recent versions of binutils. This broke
# a lot of software, assumes a very specific use of autotools, and
# is entirely gratitous, but the binutils guys aren't backing down.
#
# See also: http://sourceware.org/bugzilla/show_bug.cgi?id=14072
# and: http://sourceware.org/bugzilla/show_bug.cgi?id=14243
configure.cppflags-append   -DPACKAGE=${name} \
                            -DPACKAGE_VERSION=${version} \
                            -I${prefix}/avr/host/include

configure.args      --enable-target-programming

livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
