# -*- 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.27.1 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  8347228f75ba8479c90dafd33a560b4b68e97be3 \
                    sha256  a35cd1ccbb83f1261c3c5b14b5b4733cf0555be68579b3cb19fa8b36076a5339 \
                    size    1635798

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"
}
