summaryrefslogtreecommitdiff
path: root/dev-util/cflow/cflow-1.8.ebuild
blob: f90c7ee1d9c9967cb0dc15f3e39e538818586026 (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
66
67
68
69
70
71
72
73
74
75
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit elisp-common flag-o-matic

DESCRIPTION="C function call hierarchy analyzer"
HOMEPAGE="https://www.gnu.org/software/cflow/"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="debug emacs nls"

RDEPEND="
	emacs? ( >=app-editors/emacs-23.1:* )
	nls? (
		virtual/libintl
		virtual/libiconv
	)
"
DEPEND="
	nls? (
		virtual/libintl
		virtual/libiconv
	)
"
BDEPEND="
	app-alternatives/lex
	emacs? ( >=app-editors/emacs-23.1:* )
	nls? ( sys-devel/gettext )
"

SITEFILE="50${PN}-gentoo.el"

src_configure() {
	# bug #944004
	append-flags -std=gnu17

	local myeconfargs=(
		$(use_enable nls)
		$(use_enable debug)
		EMACS=no
	)

	econf "${myeconfargs[@]}"
}

src_compile() {
	default

	if use emacs; then
		elisp-compile elisp/cflow-mode.el
	fi
}

src_install() {
	default
	doinfo doc/cflow.info

	if use emacs; then
		elisp-install ${PN} elisp/cflow-mode.{el,elc}
		elisp-site-file-install "${FILESDIR}/${SITEFILE}"
	fi
}

pkg_postinst() {
	use emacs && elisp-site-regen
}

pkg_postrm() {
	use emacs && elisp-site-regen
}