# -*- 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 131100 2015-01-06 05:40:02Z ryandesign@macports.org $ PortSystem 1.0 name file version 5.22 categories sysutils license BSD maintainers ryandesign 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. \ For 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 freebsd \ gentoo \ ftp://ftp.fu-berlin.de/unix/tools/${name}/ \ ftp://ftp.astron.com/pub/${name}/ \ ftp://ftp.gw.com/mirrors/pub/unix/${name}/ checksums rmd160 73b5e5c128a6ecb2b870590728cc9013fe0c9dbb \ sha256 c4e3a8e44cb888c5e4b476e738503e37fb9de3b25a38c143e214bfc12109fc0b patchfiles patch-magic-Makefile.am.diff \ patch-getline.diff patchfiles-append patch-src-file.h.diff configure.args --disable-silent-rules \ --enable-fsect-man5 depends_lib port:zlib use_autoreconf yes autoreconf.args -fvi if {${name} eq ${subport}} { revision 0 depends_lib-append port:libmagic destroot { xinstall -W ${worksrcpath}/src/.libs file ${destroot}${prefix}/bin xinstall -m 644 -W ${worksrcpath}/doc file.1 ${destroot}${prefix}/share/man/man1 } livecheck.type regex livecheck.url ftp://ftp.astron.com/pub/${name}/ livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix} } else { livecheck.type none } subport libmagic { revision 0 post-destroot { delete ${destroot}${prefix}/bin/file ${destroot}${prefix}/share/man/man1/file.1 } pre-activate { # file @5.14_0 and earlier installed some files now provided by libmagic if {![catch {set installed [lindex [registry_active file] 0]}]} { set file_version [lindex ${installed} 1] set file_revision [lindex ${installed} 2] if {[vercmp ${file_version} 5.14] < 0 || ([vercmp ${file_version} 5.14] == 0 && ${file_revision} < 1)} { registry_deactivate_composite file "" [list ports_nodepcheck 1] } } } }