summaryrefslogtreecommitdiff
blob: 37ee72fe161f27272a87f22a36c5ab92b9ff94c8 (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit elisp

DESCRIPTION="Emulate A Terminal, in a region, in a buffer and in Eshell"
HOMEPAGE="https://codeberg.org/akib/emacs-eat/"

if [[ "${PV}" == *9999* ]] ; then
	inherit git-r3

	EGIT_REPO_URI="https://codeberg.org/akib/${PN}.git"
else
	SRC_URI="https://codeberg.org/akib/${PN}/archive/v${PV}.tar.gz
		-> ${P}.tar.gz"
	S="${WORKDIR}/${PN}"

	KEYWORDS="~amd64 ~x86"
fi

LICENSE="GPL-3+"
SLOT="0"

DOCS=( ChangeLog NEWS README.org )
SITEFILE="50${PN}-gentoo.el"

RDEPEND="
	>=app-emacs/compat-29.1.4.2
"
BDEPEND="
	${RDEPEND}
	sys-apps/texinfo
"

elisp-enable-tests ert . -l eat-tests.el

src_compile() {
	rm -r terminfo || die
	emake EMACS="${EMACS}" EMACSFLAGS="${EMACSFLAGS}" -j1

	elisp-compile term/eat.el
	elisp-make-autoload-file
}

src_install() {
	rm eat-tests.el || die
	elisp_src_install

	insinto "${SITELISP}/${PN}"
	doins -r term

	insinto "${SITEETC}/${PN}"
	doins -r integration
	doins -r terminfo

	insinto /usr/share
	doins -r terminfo

	doinfo eat.info
}