56b86b5efe9111da6a6454e0d7d663f4807ffd7c
[gentoo.git] / dev-ml / ppx_import / ppx_import-1.2.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
7
8 DESCRIPTION="A syntax extension for importing declarations from interface files"
9 HOMEPAGE="https://github.com/whitequark/ppx_import"
10 SRC_URI="https://github.com/whitequark/ppx_import/archive/v${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="MIT"
13 SLOT="0/${PV}"
14 KEYWORDS="~amd64"
15 IUSE="+ocamlopt test"
16 RESTRICT="!test? ( test )"
17
18 DEPEND="
19         dev-lang/ocaml:=[ocamlopt?]
20         dev-ml/ppx_tools:=
21         dev-ml/cppo:=
22 "
23 RDEPEND="${DEPEND}"
24 DEPEND="${DEPEND}
25         test? ( dev-ml/ounit dev-ml/ppx_deriving )
26         dev-ml/ocamlbuild
27         dev-ml/findlib
28 "
29
30 src_compile() {
31         cp pkg/META.in pkg/META
32         ocaml pkg/build.ml \
33                 native=$(usex ocamlopt true false) \
34                 native-dynlink=$(usex ocamlopt true false) \
35                 || die
36 }
37
38 src_test() {
39         ocamlbuild -classic-display -use-ocamlfind src_test/test_ppx_import.byte --     || die
40 }