Contents of /branches/magellan-next/extras/antlr2/antlr2-2.7.7-r3.smage2
Parent Directory | Revision Log
Revision 9674 -
(show annotations)
(download)
Wed Jan 4 14:06:16 2012 UTC (12 years, 8 months ago) by niro
File size: 1504 byte(s)
Wed Jan 4 14:06:16 2012 UTC (12 years, 8 months ago) by niro
File size: 1504 byte(s)
auto added: ver bump to 2.7.7-r3
1 | # $Id$ |
2 | |
3 | PNAME="antlr2" |
4 | PVER="2.7.7" |
5 | PBUILD="r3" |
6 | |
7 | SPLIT_PACKAGES="antlr2 antlr2-python" |
8 | |
9 | PCATEGORIE="dev-java" |
10 | HOMEPAGE="http://www.antlr2.org/" |
11 | |
12 | SDEPEND=">= virtual/java-jdk |
13 | >= dev-lang/python-2.7" |
14 | |
15 | SRCFILE="${PNAME/2/}-${PVER}.tar.gz" |
16 | SRCDIR="${BUILDDIR}/${PNAME/2/}-${PVER}" |
17 | |
18 | sminclude mtools python java |
19 | |
20 | SRC_URI=( |
21 | http://www.antlr2.org/download/${SRCFILE} |
22 | mirror://${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${PNAME}-${PVER}-gcc46.patch |
24 | ) |
25 | |
26 | UP2DATE="updatecmd ${HOMEPAGE}/download/ | grep ${PNAME/2/}-2 | grep -v rc | lasttarball gz" |
27 | |
28 | split_info_antlr2() |
29 | { |
30 | DESCRIPTION="A parser generator for C++, C#, Java, and Python." |
31 | DEPEND=">= virtual/java" |
32 | } |
33 | |
34 | split_info_antlr2-python() |
35 | { |
36 | DESCRIPTION="ANTLR v2 python module." |
37 | DEPEND="== dev-java/antlr2-${PVER} |
38 | >= dev-lang/python-2.7" |
39 | PCATEGORIE="dev-python" |
40 | } |
41 | |
42 | src_prepare() |
43 | { |
44 | munpack ${SRCFILE} || die |
45 | cd ${SRCDIR} |
46 | |
47 | # fix build against gcc-4.6 |
48 | mpatch -Np0 ${PNAME}-${PVER}-gcc46.patch || die |
49 | } |
50 | |
51 | src_compile() |
52 | { |
53 | cd ${SRCDIR} |
54 | mconfigure --disable-examples --disable-csharp || die |
55 | mmake || die |
56 | |
57 | # python |
58 | cd ${SRCDIR}/lib/python |
59 | python_docompile || die |
60 | } |
61 | |
62 | src_install_antlr2() |
63 | { |
64 | cd ${SRCDIR} |
65 | mmake prefix=${BINDIR}/usr install || die |
66 | |
67 | # install jar |
68 | minstalljar antlr/antlr.jar || die |
69 | |
70 | # overwrite the runscript |
71 | cat > ${SRCDIR}/runantlr.sh << EOF |
72 | #!/bin/sh |
73 | java antlr.Tool \$* |
74 | EOF |
75 | minstallexec runantlr.sh /usr/bin/antlr || die |
76 | |
77 | minstalldocs *.txt || die |
78 | } |
79 | |
80 | src_install_antlr2-python() |
81 | { |
82 | cd ${SRCDIR}/lib/python |
83 | python_doinstall || die |
84 | } |