Ticket #41600: Portfile

File Portfile, 3.2 KB (added by larryv (Lawrence Velázquez), 9 years ago)

portfile for 3.0.4

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$
3
4PortSystem          1.0
5
6name                bison
7epoch               1
8version             3.0.4
9categories          devel
10platforms           darwin
11subport bison-runtime {
12    supported_archs noarch
13}
14license             GPL-3+
15maintainers         mww
16
17if {${subport} eq "bison-runtime"} {
18    description         Localization support for Bison-generated parsers
19    long_description    The Bison parser generator provides \
20                        translations for its parser diagnostics. \
21                        Programs that contain Bison-generated parsers \
22                        can use these translations to generate \
23                        localized error messages.
24    installs_libs       no
25} else {
26    description         The Yacc-compatible Parser Generator
27    long_description    Bison is a general-purpose parser generator \
28                        that converts an annotated context-free \
29                        grammar into a deterministic LR or generalized \
30                        LR (GLR) parser employing LALR(1) parser \
31                        tables. As an experimental feature, Bison can \
32                        also generate IELR(1) or canonical LR(1) \
33                        parser tables. Once you are proficient with \
34                        Bison, you can use it to develop a wide range \
35                        of language parsers, from those used in simple \
36                        desk calculators to complex programming \
37                        languages.
38
39    depends_build       bin:perl:perl5
40    depends_lib         port:gettext \
41                        port:m4
42    depends_run         port:bison-runtime
43}
44homepage            http://www.gnu.org/software/bison
45
46master_sites        gnu
47use_xz              yes
48checksums           rmd160  414959f3d619d8e4875e241ee02852b2ff13c2cb \
49                    sha256  a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1
50
51configure.args      --disable-dependency-tracking \
52                    --disable-silent-rules
53
54if {${subport} eq "bison-runtime"} {
55
56    build.dir       ${worksrcpath}/runtime-po
57
58    # Use the deactivate hack because `bison` used to install these files.
59    pre-activate {
60        if {![catch {lindex [registry_active bison] 0} installedBison]} {
61            set installedBisonEpoch [lindex $installedBison 5]
62            set installedBisonVersion [lindex $installedBison 1]
63            if {$installedBisonEpoch < 1
64                    || ($installedBisonEpoch == 1
65                            && [vercmp $installedBisonVersion 3.0.4] < 0)} {
66                registry_deactivate_composite bison {} {ports_nodepcheck true}
67            }
68        }
69    }
70
71    livecheck.type  none
72
73} else {
74
75    patchfiles      skip-runtime-po.patch
76
77    test.run        yes
78    test.target     check
79
80    post-destroot {
81        xinstall -d ${destroot}${prefix}/share/examples
82        move ${destroot}${prefix}/share/doc/${subport}/examples \
83                ${destroot}${prefix}/share/examples/${subport}
84    }
85
86    livecheck.type  regex
87    livecheck.url   http://ftp.gnu.org/gnu/bison/
88    livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)
89}