summaryrefslogtreecommitdiff
path: root/app-editors/kakoune/kakoune-9999.ebuild
blob: e17b691fcb6ead0a43916beec930636f8fee9d72 (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
# Copyright 2020-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit toolchain-funcs

DESCRIPTION="Modal editor inspired by vim"
HOMEPAGE="https://kakoune.org/ https://github.com/mawww/kakoune"

if [[ ${PV} == *9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/mawww/kakoune.git"
else
	SRC_URI="https://github.com/mawww/kakoune/releases/download/v${PV}/${P}.tar.bz2"
	KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
fi

LICENSE="Unlicense"
SLOT="0"

BDEPEND="virtual/pkgconfig"

src_prepare() {
	sed -i '/CXXFLAGS-debug-no = -O3 -g3/d' Makefile || die
	sed -i '/CXX = c++/d' Makefile || die
	default
}

src_configure() {
	tc-export CXX
}

src_compile() {
	emake all
}

src_test() {
	emake test
}

src_install() {
	emake PREFIX="${D}"/usr docdir="${ED}/usr/share/doc/${PF}" install

	rm "${ED}/usr/share/man/man1/kak.1.gz" || die
	doman doc/kak.1
}