Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/js_of_ocaml/
Date: Wed, 07 Sep 2016 10:23:19
Message-Id: 1473243790.3d546ae25cf8da778a7c3abbfa4c708b68b42094.aballier@gentoo
1 commit: 3d546ae25cf8da778a7c3abbfa4c708b68b42094
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 7 10:16:07 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 7 10:23:10 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d546ae2
7
8 dev-ml/js_of_ocaml: add live ebuild
9
10 Package-Manager: portage-2.3.0
11
12 dev-ml/js_of_ocaml/js_of_ocaml-9999.ebuild | 66 ++++++++++++++++++++++++++++++
13 1 file changed, 66 insertions(+)
14
15 diff --git a/dev-ml/js_of_ocaml/js_of_ocaml-9999.ebuild b/dev-ml/js_of_ocaml/js_of_ocaml-9999.ebuild
16 new file mode 100644
17 index 00000000..41d79c3
18 --- /dev/null
19 +++ b/dev-ml/js_of_ocaml/js_of_ocaml-9999.ebuild
20 @@ -0,0 +1,66 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +inherit findlib eutils
28 +
29 +DESCRIPTION="A compiler from OCaml bytecode to javascript"
30 +HOMEPAGE="http://ocsigen.org/js_of_ocaml/"
31 +
32 +if [ "${PV#9999}" != "${PV}" ] ; then
33 + inherit git-r3
34 + SRC_URI=""
35 + EGIT_REPO_URI="https://github.com/ocsigen/js_of_ocaml"
36 + KEYWORDS=""
37 +else
38 + SRC_URI="https://github.com/ocsigen/js_of_ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
39 + KEYWORDS="~amd64"
40 +fi
41 +
42 +LICENSE="LGPL-2.1-with-linking-exception"
43 +SLOT="0/${PV}"
44 +IUSE="+async +ocamlopt doc +deriving +ppx +ppx-deriving +react +xml X"
45 +
46 +RDEPEND="
47 + >=dev-lang/ocaml-3.12:=[ocamlopt?,X?]
48 + >=dev-ml/lwt-2.4.4:=
49 + async? ( dev-ml/async_kernel:= )
50 + react? ( dev-ml/react:= dev-ml/reactiveData:= )
51 + xml? ( >=dev-ml/tyxml-4:= )
52 + ppx? ( dev-ml/ppx_tools:= )
53 + ppx-deriving? ( dev-ml/ppx_deriving:= )
54 + dev-ml/cmdliner:=
55 + dev-ml/menhir:=
56 + dev-ml/ocaml-base64:=
57 + dev-ml/camlp4:=
58 + dev-ml/cppo:=
59 + dev-ml/uchar:=
60 + deriving? ( >=dev-ml/deriving-0.6:= )"
61 +DEPEND="${RDEPEND}
62 + dev-ml/ocamlbuild"
63 +
64 +src_configure() {
65 + printf "\n\n" >> Makefile.conf
66 + use ocamlopt || echo "BEST := byte" >> Makefile.conf
67 + use ocamlopt || echo "NATDYNLINK := NO" >> Makefile.conf
68 + use deriving || echo "WITH_DERIVING := NO" >> Makefile.conf
69 + use X || echo "WITH_GRAPHICS := NO" >> Makefile.conf
70 + use react || echo "WITH_REACT := NO" >> Makefile.conf
71 + use ppx || echo "WITH_PPX := NO" >> Makefile.conf
72 + use ppx-deriving || echo "WITH_PPX_PPX_DERIVING := NO" >> Makefile.conf
73 + use async || echo "WITH_ASYNC := NO" >> Makefile.conf
74 +}
75 +
76 +src_compile() {
77 + emake -j1
78 + use doc && emake doc
79 +}
80 +
81 +src_install() {
82 + findlib_src_preinst
83 + emake BINDIR="${ED}/usr/bin/" install
84 + dodoc CHANGES README.md
85 + use doc && dohtml -r doc/api/html/
86 +}