dev-ml/findlib: x86 stable wrt bug #708874
[gentoo.git] / dev-ml / js_of_ocaml / js_of_ocaml-3.0.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 findlib eutils
7
8 DESCRIPTION="A compiler from OCaml bytecode to javascript"
9 HOMEPAGE="http://ocsigen.org/js_of_ocaml/"
10
11 if [ "${PV#9999}" != "${PV}" ] ; then
12         inherit git-r3
13         SRC_URI=""
14         EGIT_REPO_URI="https://github.com/ocsigen/js_of_ocaml"
15         KEYWORDS=""
16 else
17         SRC_URI="https://github.com/ocsigen/js_of_ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
18         # Breaks dev-ml/eliom dev-ml/async_js dev-ml/ocsigen-toolkit
19         KEYWORDS=""
20         #KEYWORDS="~amd64"
21 fi
22
23 LICENSE="LGPL-2.1-with-linking-exception"
24 SLOT="0/${PV}"
25 IUSE="+ocamlopt +camlp4 +lwt doc +deriving +ppx +xml test"
26 RESTRICT="!test? ( test )"
27
28 RDEPEND="
29         >=dev-lang/ocaml-3.12:=[ocamlopt?]
30
31         camlp4? ( dev-ml/camlp4:= )
32
33         dev-ml/cmdliner:=
34         dev-ml/cppo:=
35
36         lwt? ( >=dev-ml/lwt-2.4.4:= )
37
38         dev-ml/ocamlbuild:=
39
40         dev-ml/ocaml-migrate-parsetree:=
41         dev-ml/ppx_tools_versioned:=
42         dev-ml/uchar:=
43
44         ppx? ( dev-ml/ppx_tools:= dev-ml/ppx_deriving:= )
45
46         xml? ( >=dev-ml/tyxml-4:= dev-ml/reactiveData:= )
47 "
48 DEPEND="${RDEPEND}
49         dev-ml/jbuilder
50         dev-ml/opam
51         test? ( dev-util/patdiff )
52 "
53 REQUIRED_USE="xml? ( ppx )"
54
55 src_compile() {
56         emake
57         use doc && emake doc
58 }
59
60 oinstall() {
61         opam-installer -i \
62                 --prefix="${ED}/usr" \
63                 --libdir="${D}/$(ocamlc -where)" \
64                 --docdir="${ED}/usr/share/doc/${PF}" \
65                 --mandir="${ED}/usr/share/man" \
66                 ${1}.install || die
67 }
68
69 src_install() {
70         use camlp4 && oinstall js_of_ocaml-camlp4
71         oinstall js_of_ocaml-compiler
72         use lwt && oinstall js_of_ocaml-lwt
73         oinstall js_of_ocaml-ocamlbuild
74         oinstall js_of_ocaml
75         use ppx && oinstall js_of_ocaml-ppx
76         use ppx && oinstall js_of_ocaml-toplevel
77         use xml && oinstall js_of_ocaml-tyxml
78 }