blob: 5439a2c47f2554caa7cb262b327cb5f84f52e755 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit dune elisp-common
DESCRIPTION="Universal toplevel for OCaml"
HOMEPAGE="https://github.com/ocaml-community/utop"
SRC_URI="https://github.com/ocaml-community/utop/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
IUSE="emacs +ocamlopt test"
ELISP_DEPEND="
emacs? (
>=app-editors/emacs-24:*
>=app-emacs/tuareg-mode-2.2.0
)
"
DEPEND="
>=dev-lang/ocaml-4.11
dev-ml/lambda-term:=[ocamlopt?]
dev-ml/logs:=[ocamlopt?]
dev-ml/lwt:=[ocamlopt?]
dev-ml/react:=
dev-ml/xdg:=[ocamlopt?]
dev-ml/zed:=[ocamlopt?]
"
RDEPEND="
${DEPEND}
${ELISP_DEPEND}
"
BDEPEND="
dev-ml/cppo
dev-ml/findlib
${ELISP_DEPEND}
test? ( dev-ml/alcotest )
"
RESTRICT="!test? ( test )"
SITEFILE="50${PN}-gentoo.el"
src_compile() {
dune_src_compile
use emacs &&
BYTECOMPFLAGS="-L src/top" elisp-compile src/top/*.el
}
src_install() {
dune_src_install
if use emacs ; then
elisp-install ${PN} src/top/*.el{,c}
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
}
pkg_postinst() {
use emacs && elisp-site-regen
}
pkg_postrm() {
use emacs && elisp-site-regen
}
|