# -*- 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

PortSystem          1.0

name                avarice
version             2.13
revision            3
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:binutils \
                    port:gettext \
                    port:libusb-compat \
                    port:zlib \
                    port:zstd

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

patchfiles          include-autoconf.h.patch \
                    binutils-2.34.patch \
                    fix-tautological-constant-compare.patch \
                    return-NULL.patch

configure.args      --enable-target-programming

# --enable-shared is broken at binutils and it linked against
# both zlib and zstd, without shared dependency I should enforce such library by hand,
# otherwise it won't be linked and work.
configure.ldflags-append \
                    -lz -lzstd

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