# -*- 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            remake
set makeversion 4.2.1
set dbgversion  1.5
version         ${makeversion}-dbg-${dbgversion}
revision        0
checksums       sha1    de4d452628e3d2573c463f97423694d494048b82 \
                rmd160  d4613bd6677a67d38b46cbdd6524541d20b92e6a \
                sha256  7556aeb2eaa0441f8b28f84d732251a3cc5e044691baf940238c039048d3d988 \
                size    1586037

categories      devel
platforms       darwin
license         GPL-3+
maintainers     {raimue @raimue} \
                openmaintainer
description     Debugger for GNU Makefiles

long_description \
    remake is a patched and modernized version of GNU make utility that adds \
    improved error reporting, the ability to trace execution in a \
    comprehensible way, and a debugger.
homepage        http://bashdb.sourceforge.net/remake/

set branch      [join [lrange [split ${makeversion} .] 0 1] .]
master_sites    sourceforge:project/bashdb/remake/${branch}%2Bdbg-${dbgversion}

distname        ${name}-${makeversion}+dbg-${dbgversion}
use_bzip2       yes

depends_lib     port:gettext \
                port:libiconv \
                port:readline

configure.args  --without-guile

post-destroot {
    # Avoid conflict with gmake port
    delete ${destroot}${prefix}/include/gnumake.h
    delete {*}[glob ${destroot}${prefix}/share/info/make.info*]
}

livecheck.type      regex
livecheck.url       http://sourceforge.net/projects/bashdb/files/remake/
livecheck.version   [strsed ${version} {s/-/+/}]
livecheck.regex     (\\d+(?:\\.\\d+)+\\+dbg-\\d+(?:\\.\\d+)+)
