Portfile

# $Id: Portfile 22575 2007-03-05 11:28:21Z pipping@macports.org $

PortSystem 1.0
name file
version 4.20
revision 0
categories sysutils
maintainers pipping@macports.org
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.

homepage ftp://ftp.astron.com/pub/file/
platforms darwin
master_sites ftp://ftp.fu-berlin.de/unix/tools/file/ \
ftp://ftp.astron.com/pub/file/ \
ftp://ftp.gw.com/mirrors/pub/unix/file/
patchfiles patch-4.20-REG_STARTEND
checksums ${distfiles} \
md5 402bdb26356791bd5d277099adacc006 \
sha1 af5878e3c61c725a82ff185fcef5b631ad8468ab \
rmd160 ff4f1a677a6377df3d7925ab4e36fec71dd3ebe7 \
${patchfiles} \
md5 119b5fd6c60eede06ef909aa13fd65d2 \
sha1 4470ba5651e7a41ce8b30114a750a4479b6efe66 \
rmd160 30ca934188bafe6fbe3967c1aee980bd7710b0b1

patch_sites ${master_sites}
patch.dir ${worksrcpath}/src

configure.args --mandir=${prefix}/share/man \
--enable-fsect-man5 \
--program-prefix=g
configure.env CPPFLAGS="-I${prefix}/include" \
LDFLAGS="-L${prefix}/lib"
depends_lib port:zlib

variant with_default_names {
post-destroot {
foreach d {bin share/man/man1 share/man/man3 share/man/man5} {
cd ${destroot}${prefix}/$d
foreach a [glob g*] {
regexp g(.+) $a crap b
file link -hard $b g$b
}
}
}
}