summaryrefslogtreecommitdiff
path: root/dev-util/ragel/ragel-7.0.4.ebuild
blob: 79d4602d71744d72de34cf76308dc9f1de290c73 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools

DESCRIPTION="Compiles finite state machines from regular languages into executable code"
HOMEPAGE="https://www.colm.net/open-source/ragel/"
SRC_URI="https://www.colm.net/files/ragel/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc"

# Notes from bug #766090
# dev-libs/libxml2's xmllint ends up being called by asciidoc here
# app-text/dblatex too
# app-text/ghostscript-gpl too
BDEPEND="
	doc? (
		|| ( app-text/asciidoc dev-ruby/asciidoctor )
		app-text/dblatex
		app-text/ghostscript-gpl
		dev-libs/libxml2
		dev-texlive/texlive-latex
		dev-python/pygments
		media-gfx/transfig
	)
"
DEPEND="~dev-util/colm-0.14.7"
RDEPEND="${DEPEND}"

PATCHES=(
	"${FILESDIR}"/${PN}-7.0.4-drop-julia-check.patch
)

src_prepare() {
	default

	# Fix hardcoded search dir
	sed -i -e "s:\$withval/lib:\$withval/$(get_libdir):" configure.ac || die

	# Allow either asciidoctor or asciidoc
	# bug #733426
	sed -i -e 's/(\[ASCIIDOC\], \[asciidoc\], \[asciidoc\]/S([ASCIIDOC], [asciidoc asciidoctor]/' configure.ac || die

	eautoreconf
}

src_configure() {
	econf \
		--with-colm="${EPREFIX}/usr" \
		$(use_enable doc manual)
}

src_install() {
	default

	insinto /usr/share/vim/vimfiles/syntax
	doins ragel.vim

	find "${ED}" -name '*.la' -delete || die
}