dev-ml/ppx_sexp_conv: add missing ppx_traverse_builtins dep
[gentoo.git] / dev-ml / ocaml-ipaddr / ocaml-ipaddr-2.7.1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 DESCRIPTION="OCaml library for manipulation of IP (and MAC) address representations"
7 HOMEPAGE="https://github.com/mirage/ocaml-ipaddr"
8 SRC_URI="https://github.com/mirage/ocaml-ipaddr/archive/${PV}.tar.gz -> ${P}.tar.gz"
9
10 LICENSE="ISC"
11 SLOT="0/${PV}"
12 KEYWORDS="~amd64"
13 IUSE="+ocamlopt test"
14
15 RDEPEND="dev-ml/sexplib:=
16         dev-ml/ppx_sexp_conv:=
17         dev-lang/ocaml:=[ocamlopt?]
18 "
19 DEPEND="${RDEPEND}
20         dev-ml/ocamlbuild
21         dev-ml/topkg
22         dev-ml/findlib
23         test? ( dev-ml/ounit )
24 "
25
26 src_compile() {
27         ocaml pkg/pkg.ml build \
28                 --tests $(usex test "true" "false") || die
29 }
30
31 src_test() {
32         ocaml pkg/pkg.ml test || die
33 }
34
35 src_install() {
36         opam-installer -i \
37                 --prefix="${ED}/usr" \
38                 --libdir="${D}/$(ocamlc -where)" \
39                 --docdir="${ED}/usr/share/doc/${PF}" \
40                 ipaddr.install || die
41         dodoc CHANGES.md README.md
42 }