# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                avr-gdb
version             8.0
categories          cross
license             GPL-3+
maintainers         nomaintainer
description         GDB for the AVR processors
long_description    avr-gdb is a version of the GNU Debugger that \
                    through the avarice program can be used to debug \
                    code for the AVR processors.
homepage            https://www.gnu.org/software/gdb/gdb.html
platforms           darwin
master_sites        gnu:gdb
distname            gdb-${version}
use_xz              yes

checksums           rmd160  2d218e845614b7a0fb0777273309e8ad1b7bbcba \
                    sha256  f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee

depends_run         bin:avarice:avarice

# without --disable-nls the build process breaks
configure.args      --mandir=${prefix}/share/man \
                    --infodir=${prefix}/share/info \
                    --disable-werror \
                    --target=avr

post-destroot {
    file delete "${destroot}${prefix}/share/info/bfd.info"

    # Conflcts with autoconf and other gdb ports
    file delete -force "${destroot}${prefix}/share/info"
    file delete -force "${destroot}${prefix}/include/gdb"
    file delete -force "${destroot}${prefix}/share"
}