blob: 3c72529bc782fa777a2fb7c88bde04a149bac9c7 (
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
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit dune multiprocessing
MY_PN="ocaml-${PN}"
DESCRIPTION="Pure OCaml implementation of the vchan shared-memory communication protocol"
HOMEPAGE="
https://github.com/mirage/ocaml-vchan
https://opam.ocaml.org/packages/vchan/
"
SRC_URI="https://github.com/mirage/${MY_PN}/releases/download/v${PV}/${P}.tbz"
LICENSE="ISC"
SLOT="0/${PV}"
KEYWORDS="~amd64"
IUSE="ocamlopt test unix xen"
RDEPEND="
dev-ml/lwt:=
dev-ml/ppx_sexp_conv:=
dev-ml/io-page:=
dev-ml/mirage-flow:=
dev-ml/xenstore:=
dev-ml/xenstore-clients:=
dev-ml/sexplib:=
dev-ml/cstruct:=[ppx]
unix? (
dev-ml/xen-evtchn:=[unix]
dev-ml/xen-gnt:=[unix]
dev-ml/fmt:=
)
xen? ( dev-ml/mirage-xen:= )
"
DEPEND="
${RDEPEND}
test? (
dev-ml/cmdliner
dev-ml/ounit2
)
"
RESTRICT="!test? ( test )"
REQUIRED_USE="test? ( unix xen )"
PATCHES="${FILESDIR}/${P}-ounit2.patch"
src_compile() {
local pkgs="vchan"
for u in xen unix ; do
if use ${u} ; then
pkgs="${pkgs},vchan-${u}"
fi
done
dune build -p "${pkgs}" -j $(makeopts_jobs) || die
}
src_install() {
dune_src_install vchan
use unix && dune_src_install vchan-unix
use xen && dune_src_install vchan-xen
}
|