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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name bison3 |
---|
7 | set myname bison |
---|
8 | version 3.0 |
---|
9 | revision 3 |
---|
10 | categories devel lang |
---|
11 | maintainers mww openmaintainer |
---|
12 | license GPL-3+ |
---|
13 | platforms darwin |
---|
14 | installs_libs no |
---|
15 | description general-purpose parser generator |
---|
16 | long_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 | |
---|
24 | homepage http://www.gnu.org/software/${name}/ |
---|
25 | master_sites gnu:${myname} |
---|
26 | distname ${myname}-${version} |
---|
27 | checksums rmd160 6b68dfec7e83ab481f3e9d315f779f462dfc3823 \ |
---|
28 | sha256 e9ac5585002b71208aee8a20bbe1ced96c48766e6c4247bc7ef8f3141f7624c8 |
---|
29 | |
---|
30 | use_xz yes |
---|
31 | |
---|
32 | depends_build-append \ |
---|
33 | port:m4 \ |
---|
34 | bin:perl:perl5 \ |
---|
35 | bin:flex:flex |
---|
36 | |
---|
37 | depends_lib-append port:gettext \ |
---|
38 | port:libiconv |
---|
39 | |
---|
40 | depends_run-append port:m4 |
---|
41 | |
---|
42 | configure.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 | |
---|
53 | configure.env-append \ |
---|
54 | M4=${prefix}/bin/gm4 |
---|
55 | |
---|
56 | test.run yes |
---|
57 | test.target check |
---|
58 | |
---|
59 | post-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 | |
---|
71 | variant 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 | |
---|
78 | livecheck.type none |
---|
79 | livecheck.url http://ftp.gnu.org/gnu/bison/?C=M&O=D |
---|
80 | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*) |
---|
81 | |
---|