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