dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / app-editors / vis / vis-9999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit git-r3
6
7 DESCRIPTION="modern, legacy free, simple yet efficient vim-like editor"
8 HOMEPAGE="https://github.com/martanne/vis"
9 EGIT_REPO_URI="https://github.com/martanne/vis.git"
10 LICENSE="ISC"
11 SLOT="0"
12 KEYWORDS=""
13 IUSE="+ncurses selinux test tre"
14 RESTRICT="!test? ( test )"
15
16 #Note: vis is reported to also work with NetBSD curses
17 #TODO: >=dev-lang/lua-5.2 (needed for syntax highlighting and settings)
18 DEPEND="dev-libs/libtermkey
19         ncurses? ( sys-libs/ncurses:0= )
20         tre? ( dev-libs/tre:= )"
21 RDEPEND="${DEPEND}
22         app-eselect/eselect-vi"
23
24 src_prepare() {
25         if use test && ! type -P vim &>/dev/null; then
26                 sed -i 's/.*vim.*//' "${S}/test/Makefile" || die
27         fi
28
29         sed -i 's|STRIP?=.*|STRIP=true|' Makefile || die
30         sed -i 's|${DOCPREFIX}/vis|${DOCPREFIX}|' Makefile || die
31         sed -i 's|DOCUMENTATION = LICENSE|DOCUMENTATION =|' Makefile || die
32
33         default
34 }
35
36 src_configure() {
37         ./configure \
38                 --prefix="${EPREFIX}"/usr \
39                 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
40                 $(use_enable ncurses curses) \
41                 $(use_enable selinux) \
42                 $(use_enable tre) || die
43 }
44
45 update_symlinks() {
46         einfo "Calling eselect vi update --if-unset"
47         eselect vi update --if-unset
48 }
49
50 pkg_postrm() {
51         update_symlinks
52 }
53
54 pkg_postinst() {
55         update_symlinks
56 }