blob: 00a73fc1ba6398b2af124b8037f530f182556784 (
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
|
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edo vim-plugin
DESCRIPTION="A testing framework for Vim script"
HOMEPAGE="
https://www.vim.org/scripts/script.php?script_id=3012
https://github.com/kana/vim-vspec
"
SRC_URI="https://github.com/kana/vim-${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/vim-${P}"
LICENSE="MIT"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="dev-lang/perl:*"
BDEPEND="test? ( ${RDEPEND} )"
VIM_PLUGIN_HELPFILES="vspec.txt"
# Uncomment on the next release
#DOCS=( {README,TUTORIAL_CI}.md )
src_prepare() {
vim-plugin_src_prepare
# remove failing tests
rm t/{indent,syntax}.vim || die
}
src_test() {
export LC_ALL=C
edo ./bin/prove-vspec
}
src_install() {
# fix paths for the binary to be installed; don't do it in src_prepare
# as it will make the tests fail
sed "s|\$0|${EPREFIX}/usr/share/vim/vimfiles/bin/vspec|g" \
-i bin/vspec || die
vim-plugin_src_install bin
fperms +x /usr/share/vim/vimfiles/bin/{vspec,prove-vspec}
dosym -r {/usr/share/vim/vimfiles,/usr}/bin/vspec
dosym -r {/usr/share/vim/vimfiles,/usr}/bin/prove-vspec
}
|