blob: 07989d89b4aae59f366dfb679819d20f68dbfb97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/flex/flex-2.5.4a-r5.ebuild,v 1.24 2004/09/06 20:42:44 alexander Exp $
inherit eutils
DESCRIPTION="GNU lexical analyser generator"
HOMEPAGE="http://lex.sourceforge.net/"
SRC_URI="mirror://gentoo/${P}.tar.gz"
LICENSE="FLEX"
SLOT="0"
KEYWORDS="x86 ppc sparc mips alpha arm hppa amd64 ia64 ppc64 s390 macos"
IUSE="build static"
DEPEND="virtual/libc"
S="${WORKDIR}/${P/a/}"
src_unpack() {
unpack ${A}
cd ${S}
# Some Redhat patches to fix various problems
epatch ${FILESDIR}/flex-2.5.4-glibc22.patch
epatch ${FILESDIR}/flex-2.5.4a-gcc3.patch
epatch ${FILESDIR}/flex-2.5.4a-gcc31.patch
epatch ${FILESDIR}/flex-2.5.4a-skel.patch
}
src_compile() {
./configure \
--prefix=/usr \
--host=${CHOST} \
|| die
if use static
then
emake -j1 LDFLAGS=-static || die "emake failed"
else
emake -j1 || die "emake failed"
fi
}
src_install() {
make -j1 prefix=${D}/usr \
mandir=${D}/usr/share/man/man1 \
install || die "make install failed"
if use build
then
rm -rf ${D}/usr/share ${D}/usr/include ${D}/usr/lib
else
dodoc NEWS README
fi
dosym flex /usr/bin/lex
}
|