dev-ml/ocamlbuild: 0.10.1 and 0.11.0 don't compile with ocaml-4.09
[gentoo.git] / dev-ml / mtime / mtime-1.1.0.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 eutils opam
7
8 DESCRIPTION="OCaml module to access monotonic wall-clock time"
9 HOMEPAGE="http://erratique.ch/software/mtime https://github.com/dbuenzli/mtime"
10 SRC_URI="http://erratique.ch/software/mtime/releases/${P}.tbz"
11
12 LICENSE="ISC"
13 SLOT="0/${PV}"
14 KEYWORDS="~amd64"
15 IUSE="javascript test"
16 RESTRICT="!test? ( test )"
17
18 RDEPEND="dev-lang/ocaml:=[ocamlopt]
19         javascript? ( dev-ml/js_of_ocaml:= )
20 "
21 DEPEND="${RDEPEND}
22         dev-ml/topkg
23         dev-ml/ocamlbuild
24         dev-ml/findlib"
25
26 src_compile() {
27         ocaml pkg/pkg.ml build \
28                 --with-js_of_ocaml $(usex javascript true false) \
29                 --tests $(usex test true false) \
30                 || die
31 }
32
33 src_test() {
34         ocaml pkg/pkg.ml test || die
35 }