PortSystem      1.0

name            FDclone
version         3.01a
revision        1
categories      sysutils shells
maintainers     nomaintainer
description     File & Directory Maintenance Tool
long_description \
                ${description}
platforms       darwin
license         Restrictive/Distributable
homepage        http://hp.vector.co.jp/authors/VA012337/soft/fd/index.html
master_sites    http://hp.vector.co.jp/authors/VA012337/soft/fd/ \
                ftp://ftp.unixusers.net/src/fdclone/
distname        FD-${version}
patchfiles      patch-Makefile.in.diff \
                patch-archive.c.diff \
                patch-fd.h.diff \
                patch-machine.h.diff
checksums       rmd160 42dbd009100ababcada9be5c5e5a034d93d688e7

depends_lib     port:ncurses

use_configure   no

#configure.cppflags-append   -I${prefix}/include/ncurses
#configure.ldflags-append    -lncurses

variant universal {}

use_parallel_build  yes
build.args      CC="${configure.cc}" CONFDIR=${prefix}/etc PREFIX=${prefix} CFLAGS="${configure.cflags} [get_canonical_archflags cc]" CPPFLAGS="${configure.cppflags}" LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"

destroot.args   BUILD=${destroot} PREFIX=${prefix}
post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    foreach f {FAQ* HISTORY* Install* LICENSES* README* TECHKNOW* ToAdmin* *.cat} {
        xinstall -m 644 {*}[glob ${worksrcpath}/${f}] ${destroot}${prefix}/share/doc/${name}
    }
    xinstall -m 644 ${worksrcpath}/_fdrc ${destroot}${prefix}/etc/fd2rc.dist
}

variant engmes description {Print messages in English} {
    patchfiles-append   patch-custom.c.diff
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex FD-(\[0-9.a-z\]+)\\.tar
