You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.0 KiB
79 lines
2.0 KiB
8 years ago
|
# Copyright 1999-2016 Gentoo Foundation
|
||
11 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
9 years ago
|
# $Id$
|
||
11 years ago
|
|
||
8 years ago
|
EAPI="5"
|
||
11 years ago
|
|
||
9 years ago
|
inherit eutils flag-o-matic multilib-minimal
|
||
11 years ago
|
|
||
|
DESCRIPTION="The Fast Lexical Analyzer"
|
||
8 years ago
|
HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex"
|
||
|
SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz"
|
||
11 years ago
|
|
||
|
LICENSE="FLEX"
|
||
|
SLOT="0"
|
||
11 years ago
|
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"
|
||
11 years ago
|
IUSE="nls static test"
|
||
|
|
||
|
# We want bison explicitly and not yacc in general #381273
|
||
|
RDEPEND="sys-devel/m4"
|
||
|
DEPEND="${RDEPEND}
|
||
11 years ago
|
app-arch/xz-utils
|
||
11 years ago
|
nls? ( sys-devel/gettext )
|
||
|
test? ( sys-devel/bison )"
|
||
|
|
||
9 years ago
|
src_prepare() {
|
||
9 years ago
|
# Disable running in the tests/ subdir as it has a bunch of built sources
|
||
|
# that cannot be made conditional (automake limitation). #568842
|
||
|
if ! use test ; then
|
||
|
sed -i \
|
||
|
-e '/^SUBDIRS =/,/^$/{/tests/d}' \
|
||
|
Makefile.in || die
|
||
|
fi
|
||
9 years ago
|
}
|
||
|
|
||
11 years ago
|
src_configure() {
|
||
|
use static && append-ldflags -static
|
||
9 years ago
|
|
||
|
multilib-minimal_src_configure
|
||
|
}
|
||
|
|
||
|
multilib_src_configure() {
|
||
11 years ago
|
# Do not install shared libs #503522
|
||
9 years ago
|
ECONF_SOURCE=${S} \
|
||
11 years ago
|
econf \
|
||
11 years ago
|
--disable-shared \
|
||
11 years ago
|
$(use_enable nls) \
|
||
11 years ago
|
--docdir='$(datarootdir)/doc/'${PF}
|
||
11 years ago
|
}
|
||
|
|
||
9 years ago
|
multilib_src_compile() {
|
||
|
if multilib_is_native_abi; then
|
||
|
default
|
||
|
else
|
||
|
cd src || die
|
||
|
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
|
||
|
cd src || die
|
||
|
emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
multilib_src_install_all() {
|
||
|
einstalldocs
|
||
11 years ago
|
dodoc ONEWS
|
||
9 years ago
|
prune_libtool_files --all
|
||
8 years ago
|
rm "${ED}"/usr/share/doc/${PF}/COPYING || die
|
||
11 years ago
|
dosym flex /usr/bin/lex
|
||
|
}
|