summaryrefslogtreecommitdiff
blob: 125286a698b086af87c20f283543b64918480bc7 (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit meson

DESCRIPTION="Linux port of OpenBSD's ksh"
HOMEPAGE="https://github.com/dimkr/loksh/"

if [[ "${PV}" == *9999* ]] ; then
	inherit git-r3

	EGIT_REPO_URI="https://github.com/dimkr/${PN}.git"
else
	SRC_URI="https://github.com/dimkr/${PN}/releases/download/${PV}/${P}.tar.xz"

	KEYWORDS="amd64 arm arm64 ~ppc64 ~riscv ~x86"
fi

LICENSE="public-domain"
SLOT="0"

DEPEND="
	sys-libs/ncurses
"
RDEPEND="
	${DEPEND}
	!app-shells/ksh
"

src_prepare() {
	default

	sed -i "/install_dir/s@loksh@${PF}@" ./meson.build || die
}

src_configure() {
	# we want it as /bin/ksh
	meson_src_configure --bindir=../bin
}