dev-ml/llvm-ocaml: Remove 9.0.1 RCs and live
[gentoo.git] / dev-ml / onanomsg / onanomsg-1.0-r2.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit opam eutils
7
8 DESCRIPTION="nanomsg bindings for OCaml"
9 HOMEPAGE="https://github.com/rgrinberg/onanomsg"
10 SRC_URI="https://github.com/rgrinberg/onanomsg/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="WTFPL-2"
13 SLOT="0/${PV}-bigstring"
14 KEYWORDS="~amd64"
15 IUSE="+lwt +ocamlopt test"
16 RESTRICT="!test? ( test )"
17
18 RDEPEND="
19         dev-libs/nanomsg:=
20         dev-lang/ocaml:=[ocamlopt?]
21         dev-ml/ocaml-ctypes:=
22         dev-ml/ocaml-ipaddr:=[ocamlopt?]
23                 dev-ml/sexplib:=
24         dev-ml/ppx_deriving:=[ocamlopt?]
25         dev-ml/ocaml-containers:=[ocamlopt?]
26         dev-ml/ocaml-bigstring:=
27         lwt? ( dev-ml/lwt:=[ocamlopt(+)?] )
28 "
29 DEPEND="${RDEPEND}
30         test? ( dev-ml/ounit )
31 "
32
33 src_prepare() {
34         epatch "${FILESDIR}/bigstring.patch" \
35                 "${FILESDIR}/tests.patch" \
36                 "${FILESDIR}/testrun.patch"
37         default
38 }
39
40 src_compile() {
41         ocaml pkg/build.ml \
42                 native=$(usex ocamlopt true false) \
43                 native-dynlink=$(usex ocamlopt true false) \
44                 lwt=$(usex lwt true false) \
45                 ounit=$(usex test true false) \
46                 || die
47 }
48
49 src_install() {
50         opam_src_install nanomsg
51         dodoc CHANGES README.md
52 }