forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
antlr-c-3.5.ebuild
66 lines (51 loc) · 1.3 KB
/
antlr-c-3.5.ebuild
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
66
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
AUTOTOOLS_AUTORECONF=1
AUTOTOOLS_IN_SOURCE_BUILD=1
inherit autotools-utils eutils
MY_P="antlr-${PV}"
DESCRIPTION="The ANTLR3 C Runtime"
HOMEPAGE="https://github.com/antlr/antlr3/tree/master/runtime/C"
SRC_URI="https://github.com/antlr/antlr3/archive/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="debug debugger doc static-libs"
DEPEND="doc? ( app-doc/doxygen )"
RDEPEND=""
S="${WORKDIR}/antlr3-${MY_P}/runtime/C"
DOCS=( AUTHORS ChangeLog NEWS README )
PATCHES=( "${FILESDIR}/${PN}-3.3-cflags.patch" )
src_prepare() {
sed -i -e '/^QUIET/s/NO/YES/' doxyfile || die 'sed on doxyfile failed'
autotools-utils_src_prepare
}
src_configure() {
local myeconfargs=(
$(use_enable static-libs static)
$(use_enable debug debuginfo)
$(use_enable debugger antlrdebug)
)
if use amd64 || use ia64; then
myeconfargs+=( --enable-64bit )
else
myeconfargs+=( --disable-64bit )
fi
autotools-utils_src_configure
}
src_compile() {
autotools-utils_src_compile
if use doc; then
einfo "Generating documentation API ..."
doxygen -u doxyfile
doxygen doxyfile || die "doxygen failed"
fi
}
src_install() {
autotools-utils_src_install
if use doc; then
dohtml api/*
fi
}