# -*- 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            ddd
version         3.4.1
revision        1
checksums       rmd160  765dcff564f5c2f014441c3d074e8ff5a905917a \
                sha256  b87517a6c3f9611566347e283a2cf931fa369919b553536a2235e63402f4ee89 \
                size    5843945

categories      devel
license         GPL-3+
maintainers     nomaintainer
description     Data Display Debugger
long_description \
    DDD is a graphical front-end for GDB and other command-line debuggers.
homepage        https://www.gnu.org/software/ddd/
master_sites    gnu

depends_lib \
    port:fontconfig \
    port:ncurses \
    port:motif \
    port:Xft2 \
    port:xorg-libice \
    port:xorg-libsm \
    port:xorg-libX11 \
    port:xorg-libXaw \
    port:xorg-libXext \
    port:xorg-libXmu \
    port:xorg-libXt \
    port:xpm

depends_run     port:liberation-fonts

patchfiles      patch-configure.diff

configure.args  --with-freetype-includes=-I${prefix}/include/freetype2

# make will build the executable "ddd" and the X resource file "Ddd" in the same directory,
# as HFS+ is case-insensitive by default, this will loosely FAIL.
build.args      EXEEXT=.exe

# Use unversioned root directory.
build.args-append \
                dddrootdir=${prefix}/share/${name}

destroot.args   {*}${build.args}

post-destroot {
    move ${destroot}${prefix}/bin/ddd.exe ${destroot}${prefix}/bin/ddd
}

livecheck.type  regex
livecheck.url   https://ftp.gnu.org/gnu/${name}/?C=M&O=D
livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)
