Annotation of /branches/R11-unstable/core/flex/flex-2.5.39-r1.smage2
Parent Directory | Revision Log
Revision 22622 -
(hide annotations)
(download)
Mon Oct 27 10:08:35 2014 UTC (9 years, 11 months ago) by niro
Original Path: trunk/core/flex/flex-2.5.39-r1.smage2
File size: 1119 byte(s)
Mon Oct 27 10:08:35 2014 UTC (9 years, 11 months ago) by niro
Original Path: trunk/core/flex/flex-2.5.39-r1.smage2
File size: 1119 byte(s)
auto added: ver bump to 2.5.39-r1
1 | niro | 22622 | # $Id$ |
2 | |||
3 | PNAME="flex" | ||
4 | PVER="2.5.39" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCAT="sys-dev" | ||
8 | |||
9 | DESCRIPTION="GNU fast lexical analyser generator." | ||
10 | HOMEPAGE="http://flex.sourceforge.net/" | ||
11 | |||
12 | DEPEND=">= virtual/glibc | ||
13 | >= sys-dev/m4-1.4" | ||
14 | |||
15 | SDEPEND=">= sys-dev/bison-2.6" | ||
16 | |||
17 | SRCFILE="${PNAME}-${PVER}.tar.bz2" | ||
18 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
19 | |||
20 | sminclude mtools multilib | ||
21 | |||
22 | SRC_URI=( | ||
23 | sourceforge://${PNAME}/${SRCFILE} | ||
24 | mirror://${PNAME}/${SRCFILE} | ||
25 | ) | ||
26 | |||
27 | UP2DATE="updatecmd ${HOMEPAGE} | grep version | sed 's/.* version \(.*\) i.*/\1/;q'" | ||
28 | |||
29 | src_prepare() | ||
30 | { | ||
31 | munpack ${SRCFILE} || die | ||
32 | |||
33 | # remove tests which are incompatible with the latest bison | ||
34 | all-abis sed -i -e '/test-bison-yylloc/d' -e '/test-bison-yylval/d' tests/Makefile.in || die | ||
35 | |||
36 | # do not regenerate the man page | ||
37 | all-abis touch '${SRCDIR}-${abi}'/doc/flex.1 || die | ||
38 | } | ||
39 | |||
40 | src_compile() | ||
41 | { | ||
42 | mconfigure || die | ||
43 | |||
44 | # flex doesn't compiles sometimes with > -j1 | ||
45 | mmake -j1 || die | ||
46 | } | ||
47 | |||
48 | src_install() | ||
49 | { | ||
50 | make DESTDIR=${BINDIR} install || die | ||
51 | |||
52 | all-abis mlink libfl.a /usr/'$(mlibdir)'/libl.a || die | ||
53 | |||
54 | cat > ${BINDIR}/usr/bin/lex << "EOF" | ||
55 | #!/bin/sh | ||
56 | exec /usr/bin/flex -l "$@" | ||
57 | EOF | ||
58 | |||
59 | mchmod 755 /usr/bin/lex || die | ||
60 | } |