# -*- 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
PortGroup           cmake 1.1
PortGroup           github 1.0
PortGroup           legacysupport 1.1

# clock_gettime
legacysupport.newest_darwin_requires_legacy 15

github.setup        leo-arch clifm 1.21 v
categories          sysutils
license             GPL-2+
maintainers         {l2dy @l2dy} openmaintainer
description         Command Line Interface File Manager
long_description    shell-like, command line terminal file manager

github.tarball_from releases

checksums           rmd160  024629548782afcfd200b4bd8055d8d500da355a \
                    sha256  cb219ca6ce1b4a31ec98701a43da51142c8bc7f15a22cb81dda93f881e6f6877 \
                    size    1573170

depends_lib-append  port:desktop-file-utils \
                    port:gettext-runtime \
                    port:libmagic \
                    port:readline

depends_build-append \
                    path:bin/pkg-config:pkgconfig

# https://github.com/leo-arch/clifm/issues/298
if {${os.platform} eq "darwin" && ${os.major} < 14} {
    configure.cflags-append \
                    -DCLIFM_LEGACY -std=c99
}

post-activate {
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
}
