blob: 9736ba05dfd79bca3f71926d5827b0502513974b (
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
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
NEED_EMACS=24.5
inherit elisp
DESCRIPTION="Generic completion mechanism for Emacs"
HOMEPAGE="https://github.com/abo-abo/swiper/"
SRC_URI="https://github.com/abo-abo/swiper/archive/${PV}.tar.gz
-> swiper-${PV}.tar.gz"
S="${WORKDIR}"/swiper-${PV}
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
BDEPEND="sys-apps/texinfo"
DOCS=( CONTRIBUTING.org README.md doc/{ivy-help.org,Changelog.org,ivy.org} )
ELISP_REMOVE=".dir-locals.el"
SITEFILE="50${PN}-gentoo.el"
# Some tests are broken (but fixed on master as of 2022--04-10),
# tests depending on Avy and Wgrep we force to skip.
PATCHES=( "${FILESDIR}"/${P}-ivy-test.el-skip.patch )
# Main Ivy sources. Swiper, Counsel and Ivy extensions have their own packages.
IVY_SOURCES=( colir.el ivy{,-overlay,-faces}.el )
src_prepare() {
elisp_src_prepare
# Wipe "elpa.el" to prevent initialization of the "package" library.
[[ ! -f elpa.el ]] && die "no \"elpa.el\" found"
echo "" > elpa.el || die "failed to wipe \"elpa.el\""
}
src_compile() {
elisp-compile ${IVY_SOURCES[@]}
emake -C doc ivy.info
}
src_test() {
emake emacs="${EMACS} ${EMACSFLAGS} ${BYTECOMPFLAGS}" test
}
src_install() {
elisp-install ${PN} ${IVY_SOURCES[@]} *.elc
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
doinfo doc/ivy.info
einstalldocs
}
|