dev-ml/llvm-ocaml: Bump to 10.0.0rc3
[gentoo.git] / dev-ml / eliom / eliom-9999.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit eutils multilib findlib
7
8 DESCRIPTION="A web framework to program client/server applications"
9 HOMEPAGE="http://ocsigen.org/eliom/"
10
11 if [ "${PV#9999}" != "${PV}" ] ; then
12         inherit git-r3
13         SRC_URI=""
14         EGIT_REPO_URI="https://github.com/ocsigen/eliom"
15         KEYWORDS=""
16 else
17         SRC_URI="https://github.com/ocsigen/eliom/archive/${PV}.tar.gz -> ${P}.tar.gz"
18         KEYWORDS="~amd64"
19 fi
20
21 LICENSE="LGPL-2.1-with-linking-exception"
22 SLOT="0/${PV}"
23 IUSE="doc +ocamlopt +ppx"
24
25 RDEPEND=">=dev-lang/ocaml-4.03:=[ocamlopt?]
26         >=dev-ml/js_of_ocaml-2.8.2:=[xml]
27         >=www-servers/ocsigenserver-2.8:=
28         >=dev-ml/tyxml-4:=
29         >=dev-ml/deriving-0.6:=
30         >=dev-ml/reactiveData-0.2.1:=
31         dev-ml/ocaml-ipaddr:=
32         dev-ml/react:=
33         dev-ml/ocaml-ssl:=
34         >=dev-ml/lwt-2.5.0:=
35         dev-ml/lwt_react:=
36         dev-ml/camlp4:=
37         ppx? ( >=dev-ml/ppx_tools-0.99.3:= )"
38 DEPEND="${RDEPEND}
39         dev-ml/ocamlbuild
40         dev-ml/opam"
41
42 src_compile() {
43         if use ocamlopt ; then
44                 emake PPX=$(usex ppx true false) all
45         else
46                 emake PPX=$(usex ppx true false) byte
47         fi
48         use doc && emake doc
49         emake man
50 }
51
52 src_install() {
53         opam-installer \
54                 --prefix="${ED}/usr" \
55                 --libdir="${D}/$(ocamlc -where)" \
56                 --docdir="${ED}/usr/share/doc/${PF}" \
57                 --mandir="${ED}/usr/share/man" \
58                 || die
59         dodoc CHANGES README.md
60         if use doc ; then
61                 docinto client/html
62                 dodoc -r _build/src/lib/client/api.docdir/*
63                 docinto server/html
64                 dodoc -r _build/src/lib/server/api.docdir/*
65         fi
66 }