36ce72ef643c5188f9aa33b78b76d44739061255
[gentoo.git] / dev-ml / opam / opam-1.3.1-r1.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
7
8 DESCRIPTION="A source-based package manager for OCaml"
9 HOMEPAGE="http://opam.ocaml.org/"
10 LICENSE="LGPL-3-with-linking-exception"
11 SLOT="0/${PV}"
12 KEYWORDS="~amd64 ~arm ~ppc"
13 IUSE=""
14
15 if [[ ${PV} != 9999 ]]; then
16         SRC_URI="https://github.com/ocaml/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
17 else
18         inherit git-r3
19         EGIT_REPO_URI="https://github.com/ocaml/opam.git"
20 fi
21
22 DEPEND="dev-lang/ocaml:=
23         || ( net-misc/wget net-misc/curl )
24         dev-ml/extlib:=
25         dev-ml/ocaml-re:=
26         dev-ml/ocamlgraph:=
27         dev-ml/cmdliner:=
28         dev-ml/cudf:=
29         >=dev-ml/dose3-5:=
30         dev-ml/uutf:=
31         dev-ml/jsonm:=
32 "
33 RDEPEND="${DEPEND}
34         dev-ml/findlib
35 "
36
37 src_prepare() {
38         epatch "${FILESDIR}/stublibs.patch"
39 }
40
41 src_compile() {
42         emake -j1
43         cd doc
44         emake man
45 }
46
47 src_test() {
48         EMAIL=foo@bar.com emake -j1 tests
49 }
50
51 src_install() {
52         default
53         emake DESTDIR="${D}" OPAMINSTALLER_FLAGS="--prefix=\"${ED}/usr\" --libdir=\"${D}/$(ocamlc -where)\"" libinstall
54 }