475e26a5cb2597fb044b5be2d1a6a017a87b7afe
[gentoo.git] / dev-util / ragel / ragel-6.7-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=4
5
6 inherit eutils autotools
7
8 DESCRIPTION="Compiles finite state machines from regular languages into executable code"
9 HOMEPAGE="http://www.complang.org/ragel/"
10 SRC_URI="http://www.complang.org/ragel/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 IUSE="vim-syntax"
16
17 DEPEND=""
18 RDEPEND=""
19
20 # We need to get the txl language in Portage to have the tests :(
21 RESTRICT=test
22
23 DOCS=( ChangeLog CREDITS README TODO )
24
25 src_prepare() {
26         epatch "${FILESDIR}"/${P}+gcc-4.7.patch
27         epatch "${FILESDIR}"/${P}-cross-compile.patch #473970
28         sed -i -e '/CXXFLAGS/d' configure.in || die
29
30         eautoreconf
31 }
32
33 src_configure() {
34         econf --docdir="${EPREFIX}"/usr/share/doc/${PF}
35 }
36
37 src_test() {
38         cd "${S}"/test
39         ./runtests.in || die
40 }
41
42 src_install() {
43         default
44
45         if use vim-syntax; then
46                 insinto /usr/share/vim/vimfiles/syntax
47                 doins ragel.vim
48         fi
49 }