summaryrefslogtreecommitdiff
path: root/app-emacs/ivy/ivy-0.15.0.ebuild
blob: fd167e4578321f623193bf9d8c7bed018a981345 (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-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit elisp

DESCRIPTION="Generic completion mechanism for Emacs"
HOMEPAGE="https://github.com/abo-abo/swiper/"

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

	EGIT_REPO_URI="https://github.com/abo-abo/swiper"
else
	SRC_URI="https://github.com/abo-abo/swiper/archive/${PV}.tar.gz
		-> swiper-${PV}.gh.tar.gz"
	S="${WORKDIR}/swiper-${PV}"

	KEYWORDS="~amd64 ~x86"
fi

LICENSE="GPL-3+"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"

BDEPEND="
	sys-apps/texinfo
	test? (
		app-emacs/avy
		app-emacs/hydra
	)
"

PATCHES=( "${FILESDIR}/ivy-0.15.0-ivy-test.patch"  )

DOCS=( CONTRIBUTING.org README.md doc/{Changelog,ivy-help,ivy}.org )
SITEFILE="50${PN}-gentoo.el"

# Main Ivy sources. Swiper, Counsel and Ivy extensions have their own packages.
EL_SOURCES=( colir.el ivy{,-overlay,-faces}.el )

elisp-enable-tests ert .

src_prepare() {
	elisp_src_prepare

	# Wipe "elpa.el" to prevent initialization of the "package" library.
	echo "" > elpa.el || die "failed to wipe \"elpa.el\""
}

src_compile() {
	elisp-compile "${EL_SOURCES[@]}"

	emake -C doc ivy.info
}

src_install() {
	elisp-install "${PN}" "${EL_SOURCES[@]}" ./*.elc
	elisp-site-file-install "${FILESDIR}/${SITEFILE}"

	doinfo ./doc/ivy.info
	einstalldocs
}