# -*- 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.14
revision            0
categories          cross
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  d53e36045b36a958a0bc1aaf8a1fa3044eee6a01 \
                    sha256  4b4e7d0257a3bac850c1849216e1f1e47f078fb4e9a718760ca0f0356dbf62a9 \
                    size    253668

configure.args      --enable-target-programming

# configure: error: You need to install libbfd.a from binutils, or configure with --disable-target-programming.
compiler.cxx_standard   2011
# jtag2.h:159:52: error: ISO C++17 does not allow dynamic exception specifications
configure.cxxflags-append \
                    -std=c++11

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