Ticket #39910: Portfile.3

File Portfile.3, 2.8 KB (added by cooljeanius (Eric Gallager), 10 years ago)

Portfile for bison3

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 108674 2013-07-30 09:13:33Z ciserlohn@macports.org $
3
4PortSystem          1.0
5
6name                bison3
7set myname          bison
8version             3.0
9revision            3
10categories          devel lang
11maintainers         mww openmaintainer
12license             GPL-3+
13platforms           darwin
14installs_libs       no
15description         general-purpose parser generator
16long_description \
17    Bison is a general-purpose parser generator that converts a grammar \
18    description for an LALR context-free grammar into a C program to    \
19    parse that grammar. Once you are proficient with Bison, you can use \
20    it to develop a wide range of language parsers, from those used in  \
21    simple desk calculators to complex programming languages. This      \
22    version breaks backwards compatibility with bison2.
23
24homepage            http://www.gnu.org/software/${name}/
25master_sites        gnu:${myname}
26distname            ${myname}-${version}
27checksums           rmd160  6b68dfec7e83ab481f3e9d315f779f462dfc3823 \
28                    sha256  e9ac5585002b71208aee8a20bbe1ced96c48766e6c4247bc7ef8f3141f7624c8
29
30use_xz              yes
31
32depends_build-append \
33                    port:m4 \
34                    bin:perl:perl5 \
35                    bin:flex:flex
36
37depends_lib-append  port:gettext \
38                    port:libiconv
39
40depends_run-append  port:m4
41
42configure.args      --infodir=${prefix}/share/info \
43                    --mandir=${prefix}/share/man \
44                    --program-suffix=3 \
45                    --datadir=${prefix}/share/${name} \
46                    --libdir=${prefix}/lib/${name} \
47                    --with-libiconv-prefix=${prefix} \
48                    --with-libintl-prefix=${prefix} \
49                    --disable-yacc \
50                    --without-dmalloc \
51                    --disable-nls
52
53configure.env-append \
54                    M4=${prefix}/bin/gm4
55
56test.run            yes
57test.target         check
58
59post-destroot {
60    set docdir ${prefix}/share/doc/${name}
61    xinstall -d ${destroot}${docdir}
62    xinstall -m 0444 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS \
63        THANKS TODO ${destroot}${docdir}
64    # yacc manpage gets installed even with '--disable-yacc'
65    if {![variant_isset yacc]} {
66        delete ${destroot}${prefix}/share/man/man1/yacc3.1
67    }
68    delete ${destroot}${prefix}/share/info
69}
70
71variant yacc description "Enable yacc compatibility" {
72    configure.args-replace  --disable-yacc --enable-yacc
73    # ${prefix}/lib/${name}/liby.a exists when enabling yacc, so overwrite
74    # value set above
75    installs_libs           yes
76}
77
78livecheck.type      none
79livecheck.url       http://ftp.gnu.org/gnu/bison/?C=M&O=D
80livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)
81