summaryrefslogtreecommitdiff
path: root/app-misc/ledit/ledit-2.05.ebuild
blob: cbf9fd4efa8deef8c74a93a5c2f4982ec2980e9d (plain) (blame)
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 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

DESCRIPTION="A line editor to be used with interactive commands"
HOMEPAGE="http://pauillac.inria.fr/~ddr/ledit/"
LEDIT_P="${P//\./-}"
SRC_URI="https://github.com/chetmurthy/ledit/archive/${LEDIT_P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE="+ocamlopt"

RESTRICT="installsources !ocamlopt? ( strip )"

DEPEND=">=dev-lang/ocaml-3.09:=[ocamlopt?]
	dev-ml/camlp5:="
RDEPEND="${DEPEND}"

# For explanation please follow the link below.
# https://github.com/gentoo/gentoo/pull/14865#issuecomment-605697524
QA_FLAGS_IGNORED="/usr/bin/ledit"

src_unpack() {
	unpack ${LEDIT_P}.tar.gz
	# this is not a typo! they named the root folder in the archive ledit-ledit-2-05...
	mv "${WORKDIR}/ledit-${LEDIT_P}" ${WORKDIR}/${P}
}

src_compile() {
	emake -j1 all
	if use ocamlopt; then
		emake -j1 ledit.opt
	fi
}

src_install() {
	if use ocamlopt; then
		newbin ledit.opt ledit
	else
		newbin ledit.out ledit
	fi
	doman ledit.1
	dodoc CHANGES README
}