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

# openat, unlinkat, renameat, fdopendir, dprintf
legacysupport.newest_darwin_requires_legacy 13

name                nq
categories          sysutils
maintainers         {landonf @landonf} openmaintainer
license             public-domain
description         Unix command line queue utility
long_description    nq allows creating very lightweight job queue \
                    systems which require no setup, maintenance, supervision, \
                    or any long-running processes.

github.setup        leahneukirchen nq 1.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

checksums           rmd160  435ac43cf70a3ed3e435004ac79e796ba882aa65 \
                    sha256  10b24d4d871fef9c871f1dd46d0fe77d28b1260ee1c285c9e30349f99d4f1e8f \
                    size    12388

if {${os.platform} eq "darwin" && ${os.major} < 16} {
    patchfiles          patch-fq-note-funlock.diff
}

use_configure       no

build.args          CC=${configure.cc} CFLAGS="${configure.cflags} ${configure.cc_archflags}"
build.env           "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
destroot.args       PREFIX="${prefix}"

notes "
    Starting with version 1.0 these binaries have been renamed:

    fq -> nqtail
    
    tq -> nqterm
"
