Contents of /branches/R11-unstable/core/flex/flex-2.6.4-r1.smage2
Parent Directory | Revision Log
Revision 32257 -
(show annotations)
(download)
Mon Apr 29 12:01:38 2019 UTC (5 years, 5 months ago) by niro
File size: 1225 byte(s)
Mon Apr 29 12:01:38 2019 UTC (5 years, 5 months ago) by niro
File size: 1225 byte(s)
-release branches/R11-unstable
1 | # $Id$ |
2 | |
3 | PNAME="flex" |
4 | PVER="2.6.4" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="sys-dev" |
8 | |
9 | DESCRIPTION="GNU fast lexical analyser generator." |
10 | HOMEPAGE="https://github.com/westes/flex/releases" |
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.gz" |
18 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
19 | |
20 | # one check fails: cxx_restarts |
21 | msetfeature "!check" |
22 | |
23 | sminclude mtools multilib |
24 | |
25 | SRC_URI=( |
26 | https://github.com/westes/${PNAME}/releases/download/v${PVER}/${SRCFILE} |
27 | mirror://${PNAME}/${SRCFILE} |
28 | ) |
29 | |
30 | UP2DATE="updatecmd -nolist https://github.com/westes/flex/releases | highesttarball gz" |
31 | |
32 | src_prepare() |
33 | { |
34 | munpack ${SRCFILE} || die |
35 | |
36 | # remove tests which are incompatible with the latest bison |
37 | all-abis sed -i -e '/test-bison-yylloc/d' -e '/test-bison-yylval/d' tests/Makefile.in || die |
38 | |
39 | # do not regenerate the man page |
40 | all-abis touch '${SRCDIR}-${abi}'/doc/flex.1 || die |
41 | } |
42 | |
43 | src_compile() |
44 | { |
45 | mconfigure || die |
46 | |
47 | # flex doesn't compiles sometimes with > -j1 |
48 | mmake -j1 || die |
49 | } |
50 | |
51 | src_install() |
52 | { |
53 | mmake DESTDIR=${BINDIR} install || die |
54 | |
55 | all-abis mlink libfl.a /usr/'$(mlibdir)'/libl.a || die |
56 | |
57 | cat > ${BINDIR}/usr/bin/lex << "EOF" |
58 | #!/bin/sh |
59 | exec /usr/bin/flex -l "$@" |
60 | EOF |
61 | |
62 | mchmod 755 /usr/bin/lex || die |
63 | } |