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

PortSystem          1.0

name                multitail
version             6.5.0
revision            0
categories          sysutils
license             GPL-2
maintainers         nomaintainer
platforms           darwin

description         Tail multiple files in one terminal at once
long_description    MultiTail lets you view one or multiple files like the \
    original tail program. The difference is that it creates multiple \
    windows on your console (with ncurses). Merging of 2 or even more \
    logfiles is possible. It can also use colors while displaying the \
    logfiles (through regular expressions), for faster recognition of what \
    is important and what not. It can also filter lines (again with \
    regular expressions). It has interactive menus for editing given \
    regular expressions and deleting and adding windows. One can also have \
    windows with the output of shell scripts and other software. When \
    viewing the output of external software, MultiTail can mimic the \
    functionality of tools like 'watch' and such.

homepage            https://web.archive.org/web/20200929062205/https://www.vanheusden.com/multitail/
master_sites        ${homepage}
extract.suffix      .tgz

checksums           rmd160  7a6261e47bfe1563c237541e1b8968785d46de38 \
                    sha256  b29d5e77dfc663c7500f78da67de5d82d35d9417a4741a89a18ce9ee7bdba9ed \
                    size    157578

depends_build       port:pkgconfig

depends_lib         port:ncurses

post-patch {
    reinplace "s|\$(DESTDIR)/usr|\$(DESTDIR)${prefix}|g" \
        ${worksrcpath}/makefile.macosx
    reinplace "s|\$(DESTDIR)/etc|\$(DESTDIR)${prefix}/etc|g" \
        ${worksrcpath}/makefile.macosx
    reinplace "s|local/local|local|g" \
        ${worksrcpath}/makefile.macosx
}

use_configure       no

variant universal {}

build.args          -f makefile.macosx \
                    CC="${configure.cc} [get_canonical_archflags cc]"

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

livecheck.type      none
