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

github.setup        mtoyoda sl 5.02
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            2
categories          games
maintainers         nomaintainer
license             Permissive

description         The infamous sl command
long_description    Corrects you if you type sl instead of ls

platforms           darwin

checksums           rmd160  6df6fbc6fd14cecb2832725553eafab5714e2f15 \
                    sha256  44dcba02a9fb0f0f66c8a35423898b3089e5f004ee71442462adb3d8d1639c70

depends_lib         port:ncurses

use_configure	    no

build {
    system -W ${worksrcpath} \
        "${configure.cc} ${configure.optflags} [get_canonical_archflags] -I${prefix}/include -L${prefix}/lib \
        -Wno-implicit-function-declaration -Wno-implicit-int -Wno-return-type \
        -o sl sl.c -lncurses -ltermcap"
}

destroot {
    xinstall -m 755 ${worksrcpath}/sl ${destroot}${prefix}/bin/sl
    xinstall -d ${destroot}${prefix}/share/man/man1
    xinstall -d ${destroot}${prefix}/share/man/ja/man1
    xinstall -m 644 ${worksrcpath}/sl.1 ${destroot}${prefix}/share/man/man1
    xinstall -m 644 ${worksrcpath}/sl.1.ja ${destroot}${prefix}/share/man/ja/man1/sl.1
}

variant universal {}
