blob: ae1708c435ca0af244c2470d2ebe0a7b390a4ef6 (
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
60
61
62
63
64
65
66
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="4"
inherit eutils flag-o-matic multilib-minimal
DESCRIPTION="The Fast Lexical Analyzer"
HOMEPAGE="http://flex.sourceforge.net/"
SRC_URI="mirror://sourceforge/flex/${P}.tar.xz"
LICENSE="FLEX"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="nls static test"
# We want bison explicitly and not yacc in general #381273
RDEPEND="sys-devel/m4"
DEPEND="${RDEPEND}
app-arch/xz-utils
nls? ( sys-devel/gettext )
test? ( sys-devel/bison )"
src_configure() {
use static && append-ldflags -static
multilib-minimal_src_configure
}
multilib_src_configure() {
# Do not install shared libs #503522
ECONF_SOURCE=${S} \
econf \
--disable-shared \
$(use_enable nls) \
--docdir='$(datarootdir)/doc/'${PF}
}
multilib_src_compile() {
if multilib_is_native_abi; then
default
else
emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)'
fi
}
multilib_src_test() {
multilib_is_native_abi && emake check
}
multilib_src_install() {
if multilib_is_native_abi; then
default
else
emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
fi
}
multilib_src_install_all() {
einstalldocs
dodoc ONEWS
prune_libtool_files --all
rm "${ED}"/usr/share/doc/${PF}/{COPYING,flex.pdf} || die
dosym flex /usr/bin/lex
}
|