2012-05-23 09:51:47 +04:00
|
|
|
# Copyright 1999-2012 Gentoo Foundation
|
2011-11-09 11:33:19 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2012-05-23 09:51:47 +04:00
|
|
|
EAPI=4
|
2011-11-09 11:33:19 +04:00
|
|
|
|
|
|
|
inherit eutils
|
|
|
|
|
|
|
|
DESCRIPTION="A backtracking LR parser by the author of Ragel"
|
|
|
|
HOMEPAGE="http://www.complang.org/kelbt/"
|
|
|
|
SRC_URI="http://www.complang.org/kelbt/${P}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86-fbsd"
|
|
|
|
IUSE="vim-syntax"
|
|
|
|
|
|
|
|
RDEPEND=""
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
find "${S}" -iname "Makefile*" -exec sed -i \
|
|
|
|
-e '/\$(CXX)/s:CFLAGS:CXXFLAGS:' \
|
|
|
|
{} \;
|
2012-06-25 00:39:55 +04:00
|
|
|
|
|
|
|
epatch "${FILESDIR}"/ragel-6.7+gcc-4.7.patch
|
2011-11-09 11:33:19 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2012-06-25 00:39:55 +04:00
|
|
|
emake CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
|
2011-11-09 11:33:19 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_test() {
|
|
|
|
cd "${S}"/test
|
|
|
|
./runtests || die "tests failed"
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2012-06-25 00:39:55 +04:00
|
|
|
dobin kelbt/kelbt
|
|
|
|
dodoc TODO CREDITS ChangeLog
|
2011-11-09 11:33:19 +04:00
|
|
|
|
|
|
|
if use vim-syntax; then
|
|
|
|
insinto /usr/share/vim/vimfiles/syntax
|
2012-06-25 00:39:55 +04:00
|
|
|
doins ${PN}.vim
|
2011-11-09 11:33:19 +04:00
|
|
|
fi
|
|
|
|
}
|