2011-04-05 11:23:16 +02:00
|
|
|
# Copyright 1999-2010 Gentoo Foundation
|
2010-06-28 09:46:54 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: 2009/10/07 florent.teichteil@gmail.com Exp $
|
|
|
|
|
|
|
|
EAPI="2"
|
2011-04-05 11:23:16 +02:00
|
|
|
MY_P="libantlr3c-${PV}"
|
2010-06-28 09:46:54 +02:00
|
|
|
inherit eutils
|
|
|
|
|
|
|
|
DESCRIPTION="The ANTLR3 C Runtime"
|
|
|
|
HOMEPAGE="http://fisheye2.atlassian.com/browse/antlr/runtime/C/dist/"
|
2011-04-05 11:23:16 +02:00
|
|
|
SRC_URI="http://www.antlr.org/download/C/${MY_P}.tar.gz"
|
2010-06-28 09:46:54 +02:00
|
|
|
|
|
|
|
LICENSE="BSD"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~x86 ~amd64"
|
|
|
|
IUSE="debug debugger doc static-libs"
|
|
|
|
|
|
|
|
DEPEND="doc? ( app-doc/doxygen )"
|
|
|
|
RDEPEND=""
|
|
|
|
|
|
|
|
S="${WORKDIR}/${MY_P}"
|
|
|
|
|
|
|
|
src_prepare() {
|
2011-04-05 11:23:16 +02:00
|
|
|
epatch "${FILESDIR}/${PN}-3.1.4-doxygen.patch"
|
2010-06-28 09:46:54 +02:00
|
|
|
}
|
|
|
|
src_configure() {
|
|
|
|
local myconf
|
|
|
|
|
|
|
|
if ((use amd64) || (use ia64)); then
|
|
|
|
myconf="${myconf} --enable-64bit"
|
|
|
|
else
|
|
|
|
myconf="${myconf} --disable-64bit"
|
|
|
|
fi
|
|
|
|
|
|
|
|
econf \
|
|
|
|
$(use_enable static-libs static) \
|
|
|
|
$(use_enable debug debuginfo ) \
|
|
|
|
$(use_enable debugger antlrdebug ) \
|
2011-04-05 11:23:16 +02:00
|
|
|
${myconf}
|
2010-06-28 09:46:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
emake || die "make failed"
|
|
|
|
|
|
|
|
if use doc; then
|
|
|
|
einfo "Generating documentation API ..."
|
|
|
|
doxygen -u doxyfile
|
|
|
|
doxygen doxyfile || die "doxygen failed"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
emake DESTDIR="${D}" install || die "einstall failed."
|
|
|
|
|
|
|
|
# remove useless .la files
|
|
|
|
find "${D}" -name '*.la' -delete
|
|
|
|
|
|
|
|
dodoc AUTHORS ChangeLog NEWS README
|
|
|
|
if use doc; then
|
|
|
|
dohtml api/* || die "installing doxygen documentation"
|
|
|
|
fi
|
|
|
|
}
|