# -*- 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
# $Id: Portfile 65382 2010-03-25 22:13:44Z ryandesign@macports.org $

PortSystem 1.0

name                file
version             5.04
categories          sysutils
maintainers         jay.fm:jay-macports \
                    openmaintainer
description         File - determine file type
long_description \
    File tests each argument in an attempt to classify it. There are three  \
    sets of tests, performed in this order: filesystem tests, magic number  \
    tests, and language tests. The first test that succeeds causes the file \
    type to be printed. \
    Information on Mach-O binaries, it is suggested that one uses the command \
    `otool -fv`. \


homepage            http://www.darwinsys.com/file/
platforms           darwin
master_sites        ftp://ftp.fu-berlin.de/unix/tools/${name}/ \
                    ftp://ftp.astron.com/pub/${name}/ \
                    ftp://ftp.gw.com/mirrors/pub/unix/${name}/
checksums           md5     accade81ff1cc774904b47c72c8aeea0 \
                    sha1    56ddf7135471aa656334ed8fefe1112bcccc2cc3 \
                    rmd160  2ee0dc535a4fb6f06950f81882772cc34f981984

patchfiles          patch-magic-Magdir-msdos.diff

configure.args      --mandir=${prefix}/share/man \
                    --enable-fsect-man5
depends_lib         port:zlib

variant with_text_magic_file description (also install the plain-text magic file} {
    patchfiles-append patch-magic-Makefile.in.diff
}

livecheck.type      regex
livecheck.url       ftp://ftp.astron.com/pub/${name}/
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
