# -*- 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 78726 2011-05-19 16:38:06Z rmstonecipher@macports.org $

PortSystem 1.0

name                file
version             5.07
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     b8d1f9a8a644067bd0a703cebf3f4858 \
                    sha1    056caa20857ecda26cae259b43f2a1eeb65ada6c \
                    rmd160  6d45c8550b8457a437f5acd5a39e6de86bfe1541

patchfiles          patch-magic-Magdir-msdos.diff \
                    patch-src-readcdf.c.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}"
