source: trunk/dports/sysutils/file/Portfile

Last change on this file was 154329, checked in by ryandesign@…, 9 months ago

file: Update to 5.29

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 KB
Line 
1# -*- 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
2# $Id: Portfile 154329 2016-10-27 23:50:34Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name                file
7version             5.29
8categories          sysutils
9license             BSD
10maintainers         ryandesign openmaintainer
11description         File - determine file type
12long_description \
13    File tests each argument in an attempt to classify it. There are three  \
14    sets of tests, performed in this order: filesystem tests, magic number  \
15    tests, and language tests. The first test that succeeds causes the file \
16    type to be printed. \
17    For information on Mach-O binaries, it is suggested that one uses the command \
18    `otool -fv`.
19
20
21homepage            http://www.darwinsys.com/file/
22platforms           darwin
23master_sites        freebsd \
24                    gentoo \
25                    ftp://ftp.fu-berlin.de/unix/tools/${name}/ \
26                    ftp://ftp.astron.com/pub/${name}/ \
27                    ftp://ftp.gw.com/mirrors/pub/unix/${name}/
28
29checksums           rmd160  19a5f2d37b6bbf41b88d1fb6c535dc6a5416981a \
30                    sha256  ea661277cd39bf8f063d3a83ee875432cc3680494169f952787e002bdd3884c0
31
32patchfiles          patch-magic-Makefile.am.diff \
33                    patch-getline.diff
34patchfiles-append   patch-src-file.h.diff
35
36configure.args      --disable-silent-rules \
37                    --enable-fsect-man5
38
39depends_lib         port:zlib
40
41use_autoreconf      yes
42autoreconf.args     -fvi
43
44if {${name} eq ${subport}} {
45    revision            0
46
47    depends_lib-append port:libmagic
48   
49    destroot {
50        xinstall -W ${worksrcpath}/src/.libs file ${destroot}${prefix}/bin
51        xinstall -m 644 -W ${worksrcpath}/doc file.1 ${destroot}${prefix}/share/man/man1
52    }
53   
54    livecheck.type      regex
55    livecheck.url       ftp://ftp.astron.com/pub/${name}/
56    livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}
57} else {
58    livecheck.type      none
59}
60
61subport libmagic {
62    revision            0
63
64    post-destroot {
65        delete ${destroot}${prefix}/bin/file ${destroot}${prefix}/share/man/man1/file.1
66    }
67   
68    pre-activate {
69        # file @5.14_0 and earlier installed some files now provided by libmagic
70        if {![catch {set installed [lindex [registry_active file] 0]}]} {
71            set file_version [lindex ${installed} 1]
72            set file_revision [lindex ${installed} 2]
73            if {[vercmp ${file_version} 5.14] < 0 || ([vercmp ${file_version} 5.14] == 0 && ${file_revision} < 1)} {
74                registry_deactivate_composite file "" [list ports_nodepcheck 1]
75            }
76        }
77    }
78}
Note: See TracBrowser for help on using the repository browser.