Ticket #39910: Portfile.2

File Portfile.2, 3.1 KB (added by cooljeanius (Eric Gallager), 10 years ago)

Portfile for bison2

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                bison2
7set myname          bison
8version             2.7.1
9revision            1
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.
22
23homepage            http://www.gnu.org/software/${myname}/
24master_sites        gnu:${myname}
25distname            ${myname}-${version}
26checksums           rmd160  933257e61c1098160d4fd71063f340b2ee304671 \
27                    sha256  b409adcbf245baadb68d2f66accf6fdca5e282cafec1b865f4b5e963ba8ea7fb
28use_xz              yes
29
30depends_build-append \
31                    port:m4 \
32                    bin:perl:perl5 \
33                    bin:flex:flex
34
35depends_lib-append  port:gettext \
36                    port:libiconv
37
38depends_run-append  port:m4
39
40configure.args-append \
41                    --infodir=${prefix}/share/info \
42                    --mandir=${prefix}/share/man \
43                    --program-suffix=2 \
44                    --datadir=${prefix}/share/${name} \
45                    --libdir=${prefix}/lib/${name} \
46                    --with-libiconv-prefix=${prefix} \
47                    --with-libintl-prefix=${prefix} \
48                    --disable-yacc \
49                    --without-dmalloc \
50                    --disable-nls
51
52configure.env-append \
53                    M4=${prefix}/bin/gm4
54
55test.run            yes
56test.target         check
57
58post-destroot {
59    set docdir ${prefix}/share/doc/${name}
60    xinstall -d ${destroot}${docdir}/examples/calc++
61    xinstall -m 0444 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS \
62        THANKS TODO ${destroot}${docdir}
63    xinstall -m 444 -W ${worksrcpath}/examples/calc++  \
64        calc++-driver.cc calc++-driver.hh calc++-parser.cc \
65        calc++-parser.hh calc++-parser.stamp calc++-parser.yy \
66        calc++-scanner.cc calc++-scanner.ll calc++.cc location.hh \
67        position.hh stack.hh test \
68        ${destroot}${docdir}/examples/calc++
69    # yacc manpage gets installed even with '--disable-yacc'
70    if {![variant_isset yacc]} {
71        delete ${destroot}${prefix}/share/man/man1/yacc2.1
72    }
73    delete ${destroot}${prefix}/share/info
74}
75
76variant yacc description "Enable yacc compatibility" {
77    configure.args-replace  --disable-yacc --enable-yacc
78    # ${prefix}/lib/${name}/liby.a exists when enabling yacc, so overwrite
79    # value set above
80    installs_libs           yes
81}
82
83# Set livecheck type to "none" so that it does not pick up bison3
84livecheck.type      none
85livecheck.url       http://ftp.gnu.org/gnu/bison/?C=M&O=D
86livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)
87