summaryrefslogtreecommitdiff
path: root/dev-ml/lwt/lwt-5.9.2.ebuild
blob: f748feb12701b823559e6a1a7f546c73a8011e85 (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
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit dune

DESCRIPTION="Cooperative light-weight thread library for OCaml"
HOMEPAGE="http://ocsigen.org/lwt"
SRC_URI="https://github.com/ocsigen/lwt/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="LGPL-2.1-with-linking-exception"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
IUSE="+ocamlopt test"
RESTRICT="!test? ( test )"

DEPEND="
	dev-libs/libev
	dev-ml/luv:=[ocamlopt?]
	dev-ml/mmap:=[ocamlopt?]
	dev-ml/ocplib-endian:=[ocamlopt?]
	dev-ml/ppx_let:=[ocamlopt?]
	>=dev-ml/ppxlib-0.36:=[ocamlopt?]
	dev-ml/react:=
	dev-ml/result:=[ocamlopt?]
"
RDEPEND="${DEPEND}"
BDEPEND="
	dev-ml/cppo
	>=dev-ml/dune-3.15
	dev-ml/findlib
	test? ( dev-ml/ppx_here )
"

# "domainslib" is unpackaged.
OCAML_SUBPACKAGES=(
	lwt
	lwt_ppx
	lwt_react
	lwt_retry
)

src_compile() {
	dune-compile ${OCAML_SUBPACKAGES[@]}
}

src_test() {
	dune-test ${OCAML_SUBPACKAGES[@]}
}

src_install() {
	dune-install ${OCAML_SUBPACKAGES[@]}

	einstalldocs
}