Contents of /branches/R11-stable/core/flex/flex-2.5.37-r2.smage2
Parent Directory | Revision Log
Revision 14739 -
(show annotations)
(download)
Wed Jan 2 09:20:32 2013 UTC (11 years, 8 months ago) by niro
File size: 1140 byte(s)
Wed Jan 2 09:20:32 2013 UTC (11 years, 8 months ago) by niro
File size: 1140 byte(s)
-release branches/R11-stable
1 | # $Id$ |
2 | |
3 | PNAME="flex" |
4 | PVER="2.5.37" |
5 | PBUILD="r2" |
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 | SDEPEND=">= sys-dev/bison-2.6" |
14 | |
15 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
16 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
17 | |
18 | sminclude gnuconfig mtools multilib |
19 | msetfeature "!check" |
20 | |
21 | SRC_URI=( |
22 | sourceforge://${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${SRCFILE} |
24 | ) |
25 | |
26 | UP2DATE="updatecmd ${HOMEPAGE} | grep version | sed 's/.* version \(.*\) i.*/\1/;q'" |
27 | |
28 | src_prepare() |
29 | { |
30 | munpack ${SRCFILE} || die |
31 | |
32 | # add updated config.{sub,guess} for xxx-pc-linux-uclibc target |
33 | all-abis gnuconfig-update '${SRCDIR}-${abi}' || die |
34 | |
35 | # do not regenerate the man page |
36 | all-abis touch '${SRCDIR}-${abi}'/doc/flex.1 || die |
37 | } |
38 | |
39 | src_compile() |
40 | { |
41 | mconfigure || die |
42 | |
43 | # flex doesn't compiles sometimes with > -j1 |
44 | mmake -j1 || die |
45 | } |
46 | |
47 | src_install() |
48 | { |
49 | # needed directory |
50 | minstalldir /usr/share/man/man1 || die |
51 | |
52 | minstall_destdir || die |
53 | |
54 | all-abis mlink libfl.a /usr/'$(mlibdir)'/libl.a || die |
55 | |
56 | cat > ${BINDIR}/usr/bin/lex << "EOF" |
57 | #!/bin/sh |
58 | exec /usr/bin/flex -l "$@" |
59 | EOF |
60 | |
61 | mchmod 755 /usr/bin/lex || die |
62 | } |