1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit findlib eutils opam
8 DESCRIPTION="Type-driven code generation for OCaml"
9 HOMEPAGE="https://github.com/ocaml-ppx/ppx_deriving"
10 SRC_URI="https://github.com/ocaml-ppx/ppx_deriving/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14 KEYWORDS="~amd64 ~ppc ~x86"
15 IUSE="doc +ocamlopt test"
16 RESTRICT="!test? ( test )"
20 dev-ml/ocaml-migrate-parsetree:=
27 test? ( dev-ml/ounit )"
30 cp pkg/META.in pkg/META || die
32 native=$(usex ocamlopt true false) \
33 native-dynlink=$(usex ocamlopt true false) \
39 ocamlbuild -j 0 -use-ocamlfind -classic-display \
40 src_test/test_ppx_deriving.byte -- || die
42 ocamlbuild -j 0 -use-ocamlfind -classic-display \
43 src_test/test_ppx_deriving.native -- || die
49 mv "${ED}/usr/lib/ppx_deriving/ppx_deriving" "${D}/$(ocamlc -where)/ppx_deriving/" || die
51 use doc && dohtml api.docdir/*