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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name bison2 |
---|
7 | set myname bison |
---|
8 | version 2.7.1 |
---|
9 | revision 1 |
---|
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. |
---|
22 | |
---|
23 | homepage http://www.gnu.org/software/${myname}/ |
---|
24 | master_sites gnu:${myname} |
---|
25 | distname ${myname}-${version} |
---|
26 | checksums rmd160 933257e61c1098160d4fd71063f340b2ee304671 \ |
---|
27 | sha256 b409adcbf245baadb68d2f66accf6fdca5e282cafec1b865f4b5e963ba8ea7fb |
---|
28 | use_xz yes |
---|
29 | |
---|
30 | depends_build-append \ |
---|
31 | port:m4 \ |
---|
32 | bin:perl:perl5 \ |
---|
33 | bin:flex:flex |
---|
34 | |
---|
35 | depends_lib-append port:gettext \ |
---|
36 | port:libiconv |
---|
37 | |
---|
38 | depends_run-append port:m4 |
---|
39 | |
---|
40 | configure.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 | |
---|
52 | configure.env-append \ |
---|
53 | M4=${prefix}/bin/gm4 |
---|
54 | |
---|
55 | test.run yes |
---|
56 | test.target check |
---|
57 | |
---|
58 | post-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 | |
---|
76 | variant 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 |
---|
84 | livecheck.type none |
---|
85 | livecheck.url http://ftp.gnu.org/gnu/bison/?C=M&O=D |
---|
86 | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*) |
---|
87 | |
---|