Contents of /smage/branches/alx07x-stable/core/flex/flex-2.5.39-r2.smage2
Parent Directory | Revision Log
Revision 7879 -
(show annotations)
(download)
Wed Nov 18 10:23:49 2015 UTC (8 years, 10 months ago) by niro
File size: 1120 byte(s)
Wed Nov 18 10:23:49 2015 UTC (8 years, 10 months ago) by niro
File size: 1120 byte(s)
-release alx07x-stable
1 | # $Id$ |
2 | |
3 | PNAME="flex" |
4 | PVER="2.5.39" |
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 | >= 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 | mmake 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 | } |